SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Merge pull request #120 from CypherNaught-0x/feat/timeline-inspect
bherbruckf9d61590f36a
diff --cc docs/book/src/guide/features.mdindex 9aeff45603,4250411d37..161246958b--- a/docs/book/src/guide/features.md+++ b/docs/book/src/guide/features.md@@@ -52,9 -26,44 +52,48 @@@ Feature references to faces and edges akeeps them on the right face (see [Persistent naming](../dev/naming.md)). When a reference can'tbe found, the feature warns instead of silently picking another face.+ ## Editing a feature from a script++ `timeline.inspect {feature}` returns a feature's `definition`: the fields `timeline.edit` changes,+ with their current values. `timeline.edit {feature, set}` merges `set` into that definition+ (objects are merged field by field, anything else replaces the value), rebuilds the feature and+ reports `recomputed` and `restored`. The feature's type cannot change, and sketch geometry is+ edited with the sketch commands. Expressions are text (`"30"`, `"30 mm"`, `"width / 2"`,+ `"45 deg"`); a bare number is a length in the design's units, or degrees for an angle.++ ```json+ {"command": "timeline.inspect", "params": {"feature": "Slab"}}+ → {"type": "ExtrudeFeature",+ "definition": {"sketch": 1, "profiles": {"type": "all"}, "operation": "new_body",+ "extent": {"distance": "10", "direction": "positive"}},+ "inputs": [{"label": "Distance", "param": "d1", "expression": "10", "unit": "mm"}], …}+ {"command": "timeline.edit", "params": {"feature": "Slab", "set": {"extent": {"distance": "12"}}}}+ ```++ `inputs` lists the feature's named inputs. `parameters.change {name: "d1", expression}` sets one+ of those directly. Optional fields that are not set do not appear in the definition; they can+ still be added through `set`. The fields of the common features:++ | Feature | Fields |+ |---|---|+ | Extrude | `extent`: {`distance`, `direction`: positive\|negative\|symmetric, `distance2`, `start_offset`, `through_all`, `taper`, `to`, `to_offset`, `from`}; `operation`: new_body\|join\|cut\|intersect; `targets`; `profiles`; `sketch` |+ | Revolve | `angle`, `angle2`, `symmetric`, `axis`, `to`, `operation`, `targets`, `profiles`, `sketch` |+ | Fillet | `radius`, `edges` (a point on each edge), `body`, `style` |+ | Chamfer | `distance`, `distance2` or `angle`, `flip`, `edges`, `body` |+ | Box | `length`, `width`, `height`, `corner`, `operation` |+ | Cylinder | `radius`, `height`, `base`, `axis`, `operation` |+ | Hole | `diameter`, `depth`, `position`, `direction`, `hole` (simple, drilled, counterbore, countersink), `thread`, `to` |+ | Shell | `thickness`, `faces`, `direction`, `body`, `tangent_chain` |+ | Draft | `angle`, `faces`, `neutral`, `pull`, `body` |+ | Offset face | `distance`, `faces`, `body` |+ | Pattern | `pattern` (its kind and counts/spacing), `features`, `bodies` |+ | Mirror | `plane`, `features`, `bodies`, `combine` |++ For any other feature, `timeline.inspect` shows the fields.+Press **Delete** on anything selected (bodies, faces, sketches, features, planes, components,canvases). It runs as one undoable step and lists the features that would go with it or fail.++Face Extrude, face Revolve, and Press Pull retain linked generated profiles. When a modified planar face has no construction certificate, these internal profiles use the legacy named-face attachment and projection behavior so upstream edits still update the plane and outline. This compatibility path is private to those modeling tools: newly attached user sketches require a certified face or an explicitly fixed plane. Legacy internal attachments can follow the nearest matching face after topology changes; inspect their result after major upstream edits. Activate the intended occurrence before generating a face profile from a repeated component; capture a separately moved source position before creating a legacy profile across components.++A negative Press Pull across a planar face containing a round through-hole can still fail when the Boolean cutter has coincident curved faces. This operation reports an error and preserves the design atomically; positive face extrusion and Press Pull retain the hole and remain linked.