gumyr / build123d

A python CAD programming library
Apache License 2.0
382 stars 72 forks source link

Compute a mid axis given two axes #645

Open gumyr opened 1 week ago

gumyr commented 1 week ago

Originally part of Issue #327

The axis can be in whatever orientation, 2 axis can always be considered in the same plane, with potentially one of the axis offset in the Z direction of the common plane. In such case the start point of the mid axis is the intersection of the two axis in the common plane projected in the mid plane. And the mid axis direction is the mid vector of the axis direction.

image

Would yield: image

Top view: image

Then the case when axis are parallel is a special case where the start point is the mid point of both axis start point as you won't be able to find an intersection