From 84913e57d380e46caa495c8747efe94eb2ba0464 Mon Sep 17 00:00:00 2001 From: PaddleStroke Date: Thu, 6 Mar 2025 15:39:11 +0100 Subject: [PATCH] Assembly: Fix use of datum axis in joints --- src/Mod/Assembly/UtilsAssembly.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Mod/Assembly/UtilsAssembly.py b/src/Mod/Assembly/UtilsAssembly.py index 5995a21ad1..692a742f8d 100644 --- a/src/Mod/Assembly/UtilsAssembly.py +++ b/src/Mod/Assembly/UtilsAssembly.py @@ -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()