Closed jdegenstein closed 1 week ago
Here is a simpler case that is also broken:
someplane3 = Plane(origin=(0, 0, 0.01), x_dir=(1, 0, 0), z_dir=(0, 0, 1))
with BuildLine(someplane3) as someline:
zz = JernArc((0, 0), (1, 0), radius=20, arc_size=359)
print(zz.radius) #returns 13.15... instead of 20
More investigation indicates that the localized tangent is wrong, as are the center point and end of arc.
An even simpler broken example that is parallel to the XY plane:
someplane4 = Plane.XY
someplane4.origin = (0, 0, 1)
with BuildLine(someplane4) as someline:
zz = JernArc((0, 0), (1, 0), radius=20, arc_size=359)
print(zz.radius) # returns 0.1745... instead of 20
from inside the JernArc class -- WorkplaneList.localize(tangent)=Vector: (1.0, 0.0, 1.0)
which is incorrect, I believe a tangent (Vector) should NOT be affected by the Plane origin -- only by the x/z directions of the Plane.
The arbitrary input plane has a nonzero origin, and a nontrivial z-direction. This does not seem to be an issue for the built-in planes like
Plane.XY
,Plane.YZ
, etc. The radius of the generated arc is wrong, as is the direction -- it is not co-planar with the local x,y of the input plane.