Joints: offsets, angles and values typed as expressions follow their parameters (#2385) (#2386)

Thanks @NOWN-DEV.
This commit is contained in:
NOWN-DEV
2026-10-19 04:13:13 +02:00
committed by GitHub
parent 57d210130c
commit c66e33284b
11 changed files with 432 additions and 11 deletions
+8
View File
@@ -38,6 +38,14 @@ point, its x and y running along the two edges into the face. The edge, the face
are found again by name, so a bracket set 40 mm in from a panel's corner (a planar joint with
values `[40, 40, 0]`) stays 40 mm in from that corner when the panel changes size.
A joint's offset, angle and values can be typed as expressions over the design's parameters
(`"offset": "gap + 2"`, `"values": ["travel"]`). The joint keeps them and works them out again
whenever the design changes, so a part seated `gap` above a panel moves with `gap`. Renaming a
parameter carries into the joints that use it, and deleting one they use is refused. If an
expression stops working out (say a parameter becomes an angle), the joint is left out of the
solve and `joint.solve` gives the reason, instead of placing the part from old numbers. Typing a
plain number, or driving the value, drops that expression.
The check behind it, `inspect.clearance`, does all of that in one call for any number of bodies,
which suits scripts and agents checking a whole assembly: