DECISION: the log line written when a preview arrives reuses previewSummary(), so it counts parts and open
solids the same way as the header.
WHY: found by driving the real editor in a browser (ego-browser) after the editor commit of this series.
A part notebook with two open solids (a body and a tool, no Part yet) showed "2 open solids" in the header
but "model shown: 2 parts" in the log: the log still counted every node as a part, which was true while a
Part could hold several bodies and is false now that a Part holds exactly one solid (see
design-docs/part-holds-one-solid.md; the owner's point was that the editor's side-by-side solids are
notebook values, not parts, so the editor must not call them parts).
- App.tsx: log.push("ok", ...) uses t("model shown: {{summary}}", { summary: previewSummary(nodes) }).
- zh-CN.json: the two plural strings it replaces are one string with the summary.
Checked in the browser: a part notebook with two open solids -> header "2 open solids", log "model shown: 2
open solids"; the same notebook with a make_part_rpart cell -> header "1 part". editor-web vitest (331) and
tsc --noEmit pass.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
DECISION: the editor keeps letting solids exist side by side (a tool next to its body), but they are no longer
the bodies of one implicit Part. With exactly one open solid the Part is implicit as before; with several the
notebook has no product yet and the editor asks the author which solid is the part.
WHY - THE DISCUSSION (owner and assistant, 2026-11-10; full account in design-docs/part-holds-one-solid.md)
This is the editor need that started the whole multi-body Part: several solids in one notebook with no
assembly constraint (pattern a tool, then cut). The owner's judgement was that solving it inside the Part
makes assembly hard and was wrong; the agreed answer was "a Part is one solid, and the editor supports the
several solids some other way". This commit is that other way at the editor: the solids stay visible and
editable (the preview draws them, commit "runtime + preview"), and the product is chosen, never guessed. A
guess would silently leave a solid out of the exported Part; the author knows which solid is the part.
WHAT CHANGES
- editor/gui_features.py
- snapshot(): the implicit product exists only for exactly one open solid (and its dict loses `bodies`);
several open solids give `product: null` while `open` still lists them.
- use_as_product(): when the notebook has no product, a part notebook and a body that is open, it writes
the product cell `<stem> = scad.make_part_rpart(part_id=scad.notebook_id(), body=<chosen>)`. Before, it
refused ("no product cell"), which would have left the author without a way out.
- editor-web
- FeatureTree: a notice with one "use <solid>" button per open solid while there is no product and
several solids are open ("N solids are open, and a Part holds exactly one solid. Choose the part:").
The product badge reads the one product body.
- features.ts: FeatureState.product loses `bodies`.
- preview.ts previewSummary: nodes `node/<id>/body:<name>` are now the notebook's open solids, not the
bodies of a part, so the header says "N open solids" (zh-CN strings added) instead of "1 part · N bodies".
- tests: test_editor / test_editor_features follow the new product dict and the required `body` argument
of Part; a new test drives the editor flow end to end (two open solids -> no product, a headless run
raises SeveralOpenBodiesError naming them -> use_as_product -> the Part exists and the notebook runs).
Checked: editor-web vitest (331 tests) and tsc --noEmit pass; the editor test files pass except for the
multi-body fixtures of other files, which are updated in the tests commit of the series.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- the face and shell values no later cell reads are drawn with the model (node/surface/<name>: light blue, seen from both sides; a sketch's face stays the sketch layer's) and picked whole in the "sketch / curve / surface" mode, highlighted and shown in the inspector
- picked curves offer Ruled surface (two), Loft surface, Fill (a closed loop: the `fill` feature, make_surface_patch_rface), Flat face (a flat loop: `flat_face`, make_face_from_wire_rface with the loop's normal), Network surface (two families of crossing curves, found from where they cross: Gordon) besides Sweep and Join into a wire (lib/curve-net.ts finds loops, their plane and the families)
- picked surfaces offer Sew (`sew`: sew_faces_rshell of faces and shells) and a shell Close into a solid (`solid_from_shell`), which becomes the part's body; each starts at once with its values filled from the picks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The kernel reports the kind of every top-level value (live_value_kinds) and the feature list uses it for cells written as code: a path or a face made in code is no longer taken for a body, so it is not the product and it is offered where a wire or a face is asked for.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Server: the feature list carries what each selection slot holds as references (gui.refs), an edit keeps the references it is given for items with no entity on screen (a face a shell opened is not drawn), and a reference given twice is selected once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the XY grid is drawn per pixel (scene/ground-grid.ts): power-of-ten spacings fading into each other with the zoom,
the coarser level strong, fading out a few camera distances from the target; the X, Y and Z axes are red, green and
blue lines through the origin as far as the camera sees
- the axis gizmo: a click on an end of an axis turns the view to look from that side (slerped about the target), the
arrows in the band around it turn the view by 45° about the screen's axes, and a button beside it switches between
perspective and parallel projection (remembered in the browser; the sketch canvas keeps its own and gives the
chosen one back)
- the floating inspector and the operation panel fold into a one-line pill and back by growing or shrinking
(lib/useSizeTransition.ts); a cell folds and unfolds by its height
- the feature tree shows each operation's icon (a code feature: a code icon); the sketch, revolve, curve and assembly
operations have theirs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- fillet_rsolid / chamfer_rsolid accept the list a splitting cut returns: each piece gets the picked edges on it, the
selector's cardinality is checked over all pieces, the result is the pieces in order (a Solid stays a Solid). A GUI fillet
after a cut that split the body failed with a TypeError and the part lost its product.
- Sketch: pick/snap tolerance 9 -> 16 px, the snap mark is a larger ring.
- Skill: the GUI-feature half of editor-collaboration.md is its own page (editor-gui-features.md); the page was over
the 300-line limit after the workplane and ref sections.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The close click compared point ids only, so a click back on a draft's own first point (not yet a sketch point) added one
more control point instead of closing; the only way to finish was Enter, which nothing on screen said.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Space (or the command 'Workplane from selection', also on the selection bar)
reads the selection as one constructor (lib/workplanes.ts workplaneRequest:
a flat face, a face + an edge, two faces, three vertices in pick order, one
edge), adds the 'workplane' feature cell, makes it the active workplane and
turns the camera to it once the kernel reports its frame (Space with nothing
selected looks at it again). A new sketch goes on the active workplane; the
plane chooser lists every workplane, and a sketch on one keeps the variable
(Frame.workplane) so its cell writes plane=<variable>. Sketches on a
workplane are drawn at the frame the kernel last reported. WorkplanePatches
draws each workplane variable as a small labelled patch (the active one blue).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The document gets a bspline entity (control point ids, degree) that becomes add_bspline_rsketch; the solve returns each
B-spline as the SDK samples it (sample_curve_rcurvature), so the editor draws the SDK's curve, its control polygon (the
points are the handles: dragging one reshapes the curve) and, for a picked spline, its curvature comb. Loops and faces through
B-splines are the SDK's profiles.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two renderer bugs the orthographic sketch view exposed: without the occlusion pass the edge pass auto-cleared the face
target (the faces vanished, hidden edges showed), and the edge depth bias assumed a perspective projection (in orthographic
every edge sank behind its face).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The preview's nodes carry color/opacity (a body colour, else the material's);
the viewer draws a node in properties.color (preview or package scene), else
the material tint, else the default grey, see-through below opacity 1. The
colour slot is a picker (sRGB #rrggbb) converted to the SDK's linear RGB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On top of the merge: the bindings it touched (cut_rsolid on_split, make_part_rpart body/bodies) take the typed signature
vocabulary; a kind = "part" notebook's implicit Part is made of all its open bodies (named by their variables, the pieces of a
split cut <name>_1..n) and is recorded in the definition (one result node, so its content hash is stable across cache hits);
product values are walked through their own children, not as plain dataclasses; the skill says how bodies and the implicit Part
work; the editor marks every body of the implicit Part as the product.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The crossings are the ones trim_rsketch cuts at (the same solved geometry and intersection code), returned by the sketch solve the
editor already calls. The frontend's own intersection module is gone; its end-to-end coincidence tests moved to sketch-chain.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Manual mode: features and assemblies, the command bar and the selection bar. Code mode: notebook and workspace (the original design).
The two are never on one page; both side panels leave to the left and right with an ease-in and the other mode's arrive with a decelerating curve.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>