Assembly: ground the first part; drag free joint chains (#2804) (#2805)

* assembly(feat): ground first parts and drag free joint chains

Ground the first top-level part when it is created and let face dragging reposition free occurrences or any member of a floating joint chain in one undo step. Preserve exact repeated-placement frames, joint values, modifier selection and Escape cancellation. Keep the accumulated fixture, viewport layout and documentation integration fixes from the existing PR.

Signed-off-by: Karl Von Richter<karl@embeint.com>

* assembly(fix): update movable fixtures for first-part grounding

Accept the documented grounded override in component creation, explicitly free movement fixtures, and keep linked clipboard pastes movable even in an empty document. Cover first and reused linked pastes, default insertion grounding, and single-step undo in the existing link tests.

Signed-off-by: Karl Von Richter<karl@embeint.com>

* assembly(test): keep the motion-cost crank free

Unground the first component in the document-level joint-face measurement fixture so its motion samples can rotate after first-part grounding. Preserve the rotation and shared-measurement assertions that caught the Linux CI failure.

Signed-off-by: Karl Von Richter<karl@embeint.com>

* assembly(test): free the frame placement fixture

Create the frame-member placement fixture ungrounded before moving it above its root sketch. Keep its world-space member assertions while respecting first-part grounding in the frame tests added on main.

Signed-off-by: Karl Von Richter<karl@embeint.com>

---------

Signed-off-by: Karl Von Richter<karl@embeint.com>
This commit is contained in:
Karl Von Richter
2026-10-23 23:15:34 +00:00
committed by GitHub
parent 30b01e8d79
commit 0dffb206b1
75 changed files with 1094 additions and 115 deletions
+16
View File
@@ -14,6 +14,14 @@ Properties accepts the leaf occurrence ID and the full path. Move can use world
{"occurrence":4,"path":[2,4],"space":"world","translate":[10,0,0],"capture":false}
```
A drag in the viewport, or `occurrence.drag`, moves one exact placement and its floating joint chain by a world translation:
```json
{"path":[2,4],"at":[0,0,10],"point":[20,0,10]}
```
It captures that placement's position (other pending positions stay pending) and is one undo step. With the design active, the viewport drags the placement on the picked body's path just inside the design; with a component placement active, the one just inside it. Grounded placements and placements that joints hold to something fixed are refused; a free chain of joints moves together, and a chain through a placement used several times is refused. The design's first top-level part is grounded when it is made (not when a design is opened); copies start free.
World movement includes pending parent and child positions. The default space remains parent-local for existing scripts. Capture Position commits pending transforms; Revert Position drops them. Copying an occurrence copies that selected occurrence's effective transform, including its pending position.
An occurrence definition inside a component is shared by every instance of that parent component. Moving, grounding, copying, or deleting that nested definition changes all its parent instances. Selecting its exact path determines the world frame used for movement and Properties; it does not create an independent child definition.
@@ -60,6 +68,14 @@ Use `sketch.redefine` with the sketch ID and a new plane to repair or convert an
Paste New remaps internal certified targets and authoring paths to the copied definitions. Timeline paste reports retained external face targets and refuses translating such attachments until an explicit fixed-plane conversion establishes independent geometry. Rename preserves certified body identity; another producer using the same body name cannot repair a lost attachment.
## Floating joint chains
Dragging any member of a floating joint chain carries the chain together without changing its
joint values. A chain joined to a grounded part still uses `joint.reach` within its joints.
Repeated nested definitions are shared: their other instances follow in their respective
parent frames. The selected exact path determines the local change, which is carried through
the solver's first-placement frame to jointed peers, including repeated peers.
## Change the size of a standard component
An inserted standard part is one component with an active catalogue configuration.