fix(assembly): extend findPlacement() datum and origin handling (#55) #83
Reference in New Issue
Block a user
Delete Branch "fix/assembly-datum-placement"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Extends the Assembly solver's
findPlacement()function to properly handle datum and origin objects in joint constraints.Problem:
findPlacement()only handledApp::Line(origin axes),PartDesign::Plane, andPartDesign::Point(with minimal logic). Missing types silently returned identity placement, making joints with those references non-functional.Added support for:
App::Plane— XY/XZ/YZ origin planes with correct rotationsApp::Point— origin pointPartDesign::Line— extracts edge midpoint and direction from datum shape, using the samePart.Plane(origin, direction).Rotationconvention asPart::GeomLineedgesPartDesign::Point— extracts vertex position from shape geometry (was returning rawobj.Placement)Fixes:
obj.Shape.isNull()validation to allPartDesign::*branchesPartDesign::PlaneandPartDesign::Pointnow fall back toobj.Placementon invalid shape instead of identityCloses #55