Assembly: Add support for body subobjects (coordinate systems, datums...) and various fixes

This commit is contained in:
Paddle
2023-12-21 17:20:22 +01:00
committed by PaddleStroke
parent 22e4d7f2dd
commit 43019a8f34
4 changed files with 42 additions and 18 deletions

View File

@@ -342,10 +342,8 @@ class Joint:
return App.Placement()
if not elt or not vtx:
# case of whole parts such as PartDesign::Body or PartDesign::CordinateSystem.
plc = UtilsAssembly.getGlobalPlacement(obj, part)
plc = assembly.Placement.inverse() * plc
return plc
# case of whole parts such as PartDesign::Body or PartDesign::CordinateSystem/Point/Line/Plane.
return App.Placement()
elt_type, elt_index = UtilsAssembly.extract_type_and_number(elt)
vtx_type, vtx_index = UtilsAssembly.extract_type_and_number(vtx)