Assembly: Fix use of datum axis in joints

This commit is contained in:
PaddleStroke
2025-03-06 15:39:11 +01:00
committed by GitHub
parent 2bcb3e8ff0
commit 84913e57d3

View File

@@ -947,6 +947,13 @@ def findPlacement(ref, ignoreVertex=False):
if not elt or not vtx:
# case of whole parts such as PartDesign::Body or App/PartDesign::CordinateSystem/Point/Line/Plane.
if obj.TypeId == "App::Line":
if obj.Role == "X_Axis":
return App.Placement(App.Vector(), App.Rotation(0.5, 0.5, 0.5, 0.5))
if obj.Role == "Y_Axis":
return App.Placement(App.Vector(), App.Rotation(0.5, 0.5, 0.5, 0.5))
if obj.Role == "Z_Axis":
return App.Placement(App.Vector(), App.Rotation(-0.5, 0.5, -0.5, 0.5))
return App.Placement()
plc = App.Placement()