The joint origin input only accepted faces, edges and vertices, so the world origin and sketch points could not be picked to place a joint. Extend the origin input's snap mask with ORIGIN and POINTS and resolve a sketch point (and the empty-body world-origin vertex) to a world snap in snap_of, so a joint can be placed on the design origin or a hole centre like Fusion.
* Sketch Project: a face or edge of a part's second placement projects where that placement is (#9957)
Projecting the face of `Block (Part:2)` failed with "face of Block: the
face no longer exists". The pick's body name was turned into the
definition's own name, and the model a sketch reads holds only each
component's first placement, so the face was looked for on the first
placement, somewhere else.
Sketch picks now keep the name the browser shows, and the further
placements a sketch's links name are placed into the model it reads
(`with_placed_copies`), when the sketch is evaluated and when a link is
added or refreshed. Only the named ones are placed. A link to a body
the model lacks also makes the sketch follow every placement, so moving
the copy moves what was projected from it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Project: a projection from a second placement follows renames of its part and body (#9957)
The link keeps the copy by the name the browser shows (`Block (Part:2)`),
which a rename of the component or of the body changes. component.rename
and body.rename now rename it in the sketches' links as well.
The copies a sketch reads are found through their component's bodies,
not by going through every body for every placement.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The Scale dialog gets a Type row, Uniform or Per axis. Per axis shows
X, Y and Z rows and sends factors, which solid.scale already takes. A
Scale made with factors opens per axis with its three values; before,
they rode along as an extra and the dialog's factor did nothing.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #4644
* Add the Fair Surface and Match Surface dialogs (#4644)
Neither command had a dialog, so the toolbar and command search ran them
with no parameters and they failed with "`body` is required".
Fair Surface picks the surface or some of its faces and sets the
strength, the iterations, whether the edges are kept and an optional
tolerance (blank: 0.001 of the body's size). Match Surface picks the
surface or face to rebuild, the target and an edge chain of the target,
and the continuity (G1, G2 or G3, default G2). Both preview, and Edit
Feature restores the saved picks and settings. New labels go through
the catalogs with English, Japanese, Chinese, German and Korean text.
* Keep surface-dialog strings pending with complete translations (#4644)
* Fair tolerance is a length; Fair and Match picks reopen on their saved bodies
The Fair dialog's tolerance now goes through the same design-unit length
conversion as the other surface lengths, on OK and when an edit is refilled.
Editing a Fair or Match feature looks its face and edge picks up on the body
they were saved on, so a coincident face or edge of another body cannot take
their place.
* Surface dialogs: strings stay in the pending catalog only (#4644)
* Surface dialogs: edge picks use the session world, as main's edge_sel now does (#4644)
* Surface dialogs: refuse to refill when a saved pick no longer resolves, and pass body names by reference (#4644)
* Surface dialogs: Fair and Match now open dialogs, so the refused-command tab test no longer lists them (#4644)
* Stderr: a closed stderr no longer stops the app, the CLI or the MCP server (#10111)
`eprintln!` panics with "failed printing to stderr" when stderr is a
pipe its reader has closed. A process another program starts writes
into such a pipe: `solidcraft mcp` under an agent, and the app that
one starts, which inherits it. #10111 is the app stopping that way
while an agent (Codex) connected. `solidcraft_geom::note!` (re-exported
as `solidcraft_engine::note!`) writes the same line and ignores a
failed write, as the CLI's logger already does; the app, the CLI, the
MCP server, the crash hook and the crates they run use it instead of
`eprintln!` outside tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Stderr: test that a closed stderr leaves the CLI's exit code as it is (#10111)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Stderr: the old name's alias and the fuzz command don't stop on a closed stderr either (#10111)
`solvecraft-cli` writes its deprecation notice before it starts
`solidcraft-cli`, so an agent still configured with the old name got the
panic before the MCP server started (found in review). It and the fuzz
command now write through `note!` too, and the test covers the alias.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Browser: the component menu keeps its everyday actions and groups the rest in flyouts
A component's or placement's right-click menu had grown to about thirty entries in seven
blocks. Activate, Edit in Place, Open Linked Design, Move/Copy, Show/Hide, Isolate, the
clipboard, Delete, Rename, Appearance, Physical Material and Properties stay on the menu;
Ground, Capture and Revert Position, Unlock Contents and Turn Up Axis move to a Position
flyout, Relink Source or Extract to File and the exports to File, New Component, New Group
and Paste New to New, and Show All Bodies, Cycle Component Color, Expand All and Collapse
All to Display. context_menu::entries lists a menu with its flyouts, as ui.menuPick reads it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Browser: the component menu nests its flyouts by topic, and flyouts no longer scroll
Position (Ground, Capture and Revert Position, Unlock Contents, Turn Up Axis), Component
(New Component, Rename, Appearance, Physical Material, Cycle Component Color, Relink Source
or Extract to File, Properties; Design on the design's row), Export (Export, Save As Mesh,
Send to Slicer) and Browser (New Group, Expand All, Collapse All) each open a flyout; Paste
New stays with the clipboard and Show All Bodies with Show/Hide. Flyouts open inside flyouts,
so Appearance keeps its quick choices inside Component; the keys walk in and out of them.
A flyout no longer scrolls or sits away from its row: every flyout has its own area, measured
whole, where a short one used to squeeze every later one into its height. A component's only
body is no longer offered as a component of its own on a folded Bodies folder's entries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Browser: the component menu starts with what a double-click does, and keeps the old order of its sections
A linked component's menu starts with Edit in Place and Open Linked Design when a double-click
edits it in place (double_click_components), and with Activate otherwise. Position, Component
and Export follow Move/Copy, then the clipboard, then Show/Hide and Isolate, with Browser last,
as the sections came before the flyouts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Browser: Show All Bodies is on a component's menu only while a body is hidden
It is listed while a body is hidden itself, in a hidden placement, or in a hidden Bodies folder or
group of bodies, anywhere in the design, since that is what it shows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Browser: Relink Source and Extract to File sit right below Rename in the Component flyout
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Browser: Placement and Organize flyouts, Turn Up Axis back as a flyout, and flyout fixes
Placement (Ground, Turn Up Axis, Capture and Revert Position, Unlock Contents) follows
Move/Copy above the first separator, Turn Up Axis opens its two turns in a flyout again, and
the Browser flyout is called Organize. The Component flyout has three blocks: New Component
with Relink Source or Extract to File, then Appearance, Physical Material and Cycle Component
Color, then Rename and Properties.
A flyout of a flyout that opened to the left opens to the left too instead of covering the
menu, Left back to the menu chooses the row that opened the flyout, ui.menuPick refuses a row
that only opens a flyout, and the icon audit checks every level. The guides and the control
protocol describe the new menu paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Browser: ui.menu gives a flyout's rows their placeholder flag too
ui.menu set placeholder only on the top-level rows, so a client reading
a flyout row's placeholder got nothing. The icon audit now reads the flag
of the flyout rows instead of resolving their icons itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #11505
* Selection filter: started from command search, it offers Faces, Bodies, Components (#11505)
Command search ran select.filter with no parameters, which could only fail
with "missing field `mode`". Started from the UI (command search, a
shortcut, ui.start), it now opens its three modes as a menu with the
current one marked, as View > Visual style and Navigation tool do (#8868).
Programmatic calls keep their contract and open nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: thocsmith <193096300+thocsmith@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #8201
* Sketch Mirror: use an origin axis that is not in the sketch plane (#8201)
A sketch on a part face does not hold the world X, Y or Z axis, so Mirror refused the pick. It now mirrors about the axis's projection into the sketch plane and keeps that line linked as fixed reference geometry. An axis perpendicular to the plane stays refused because it has no line in the plane. The sketch's own X and Y axes keep working as before.
* claim: #3523
* Linux 3D mouse: decode spacenavd's axes in its documented frame (#3523)
spacenavd reports x to the right, y up and z away from the user, with the
rotations about those axes. The decoder treated y as away and z as up, so
with a stock spacenavd push and lift traded places, as did sideways tilt
and twist. Map the daemon's axes to the raw HID frame as translation
[x, -z, -y] and rotation [rx, -rz, -ry].
The decode still runs before a device's calibration and the per-axis
motion choice, so both apply unchanged on top of the corrected reading.
The tests now move each daemon axis on its own, in both directions, so a
swap of two axes can no longer pass.
Adds DeepSeek and Qwen presets to both endpoint protocols: OpenAI-compatible (api.deepseek.com, dashscope-intl compatible-mode/v1) and Anthropic-compatible (api.deepseek.com/anthropic, dashscope-intl apps/anthropic).
Co-authored-by: Claude Code <noreply@anthropic.com>
* claim: #2217
* Dialogs: drag a value's label sideways to change it (#2217)
A value row's label (expr_row, hint_row) now scrubs a literal value: about a
hundredth of its size per point of drag, on that step's grid, Shift ten times
finer, Ctrl/Cmd ten times coarser. The unit and decimal mark stay as typed, a
size never turns negative, and expressions and parameters are left alone. The
text changes as if typed, so previews follow and OK still makes one command.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Label drag: measure from the press point, cap values, keep scrub kit-private
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix: Revolve axis origin takes expressions instead of silently zero
- AxisRef::Line origin is a PointExpr evaluated with parameter values in the design unit (format note in pending)
- An unreadable origin or dir is a BadParams error instead of (0, 0, 0)
- Edit Feature keeps the saved expressions of an untouched origin or dir, for solid and surface revolves, in moved components too
- Face role names stay stable with a parameter-driven axis
* chore: Re-run PR checks after the description fix
* fix: Edit Feature of a revolve maps nothing where nothing is placed
- unplaced designs skip world_state and the pick table, as before the merge
- the untouched-edit test checks that OK applied the edit (CodeRabbit)
---------
Co-authored-by: P'tite Tête <asso@ptitetete.com>
* claim: #8220
* Agent chat: Custom instructions in Preferences, added to the system note (#8220)
Preferences > AI gets a multi-line Custom instructions field, saved with
the other AI preferences (agent_instructions, kept by page resets like
other user-written text). The chat adds the text after its own system
note when a session starts, by the routes #9811 set up: ACP session/new
(the Claude adapter's _meta key, the standard systemPrompt field, the
Antigravity key) and the system message or field of every API protocol.
Connect and New chat set it, so an edit applies from the next chat and
never changes the one running. Blank text adds nothing; at most 4000
characters are kept, in the field, over ui.agent_chat and from a hand-
edited settings file. ui.agent_chat takes and reports `instructions`.
* Custom instructions: typing in the field stays in the field
The text area did not report itself to Preferences search as a key sink, so with
the field focused, search took the typed characters and moved focus away. The
field now notes the sink while it has focus, like the other preference fields,
and the #8220 test types into it.
---------
Co-authored-by: MateuszSychXpl <151755914+MateuszSychXpl@users.noreply.github.com>
The tool face of Split Body is now a face pick: it is named when it is
picked and found again by that name, as other face picks are, so a split
by a rail's face follows the rail when a parameter moves it.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #12066
* Hole: a hole on a face that another part touches drills its own part (#12066)
A hole placed by position with no direction drills against the outward
normal of the face at the point. That face was looked for on every body,
so where another part touched the face at the hole, the part made first
won. The hole then drilled away from the part `targets` named and cut only
the tool's run-in pocket into it, without an error.
A hole that names its bodies now goes by their faces wherever one of them
passes through its position, when it is made (hole_direction_at) and when
a design is evaluated (hole_dir_into_face). Saved holes whose direction
leaves their own body's face there are mirrored into it, as format 18 does
for a thin plate's far side; the pending format note records it. A hole
whose bodies have no face at its position (placed on another part's face
to drill the part behind it) goes by every body's faces, as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVKpSUSGYjbrBhfZGjqZEE
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The value text is drawn level, in an upright box, and the line runs
through its middle. The layout stopped the line where the box's farthest
corner reaches along it (half.x*|u.x| + half.y*|u.y|), not where the line
leaves the box (min(half.x/|u.x|, half.y/|u.y|)). They agree only when the
line is level or upright: at 45 degrees a radius leader stopped about
12 px short of its text, and an aligned dimension's line broke too wide
around its value.
One helper, box_exit, gives where the line leaves the box, for the radial
leader, the linear break and the leader to a text pulled past the
extension lines. Whether the text fits between the arrows still goes by
the whole box. A text box that isn't finite counts as empty, and one
larger than a sketch can be is held to MAX_COORD.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #10428
Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
* Primitives: a pick field waits for its pick and says what it is for
Clicking Face, Reference 1 or 2 in the Cylinder window, or Point in the
Box, Sphere and Torus windows, and then clicking something the field
does not take (empty space, the cylinder's own preview) gave the
keyboard to Diameter, so the field no longer looked active and nothing
said why the click picked nothing. A pick field clicked into now keeps
the keyboard until a click picks something, and a click it does not
take leaves a note under the form saying what the field is for.
These fields also get their own tooltips: Face is the face or vertex
the cylinder stands on, Reference 1 and 2 are straight edges of that
face the distances below are measured from, and Point is a vertex,
edge, face, sketch point or the origin whose point fills X, Y and Z.
Fixes#10428
Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
---------
Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
* claim: #6818
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* Hole: the handle drawn with the shared marker (#6818)
A Single hole's drag handle (Move holes by clicking or dragging) is drawn with the placement
marker from place_gizmo/look.rs instead of its own ring and cross, so a hole and a Rest on the
same model show one language for the same action. place_gizmo::marker is the one crate-visible
door: it runs the marker's hover and drag motions under the handle's id and draws the crosshair,
never dimmed. Hole keeps its snapping, the click that takes a hole out, its handle names and its
hover text.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* Hole: hole_handle removed (#6818)
The shared marker draws the handle now; nothing else used it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* Hole: the marker takes no colours it does not use (#6818)
place_gizmo::marker took a &Tokens only to hand it to crosshair, which reads its colours itself,
so the hole's show fetched tokens nothing read. The argument and that fetch go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Hole: a test sees the handle drawn as the shared marker (#6818)
The hole tests found the handle by its published position, which the look does not change. This
one reads what the frame paints round it: the white dot and four dashed arms at rest, no ring
round the centre, arrowheads when pointed at, solid shafts while it drags. It fails with the old
ring and cross back on the call line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Place handles: marker hover eases in 120 ms, drag in 220 ms (Refs #6818)
The marker answered the pointer in 220 ms and a drag in 360 ms, which felt slow on review. Both
stay in look.rs as the one place a later preference can read them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* Evaluation: a construction axis moved past a feature makes it evaluate again (#9544)
The state digest in a feature's cache key left out the construction
geometry before it, and the context digest hashes construction features
without their order. A feature started from the same key with or without
the axis before it, so after a move it kept its old result, and a cached
state restored whole brought back the construction list it was made with.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Evaluation: say plainly what an empty construction list hashes (#9544)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* claim: #9236
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* GPU path tracer: don't rerun a setup that crashed in the driver (#9236)
A driver that takes the process down while it compiles the path tracer
(RADV on an RX 7600) is beyond error scopes and unwind guards. A running
setup now keeps gpu-path-setup.json (its adapter key) in the settings
folder, removed when the setup answers or the app closes normally. A
launch that finds it for the same adapter leaves the setup failed with an
explanation and a Try again button; CPU ray tracing stays available, and
a driver update changes the key and so tries again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Appearance: a picture of your own behind the model
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Background picture: a label that fits its row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #11949
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Contact sets: input and output schemas for the seven contact commands (#11949)
describe_command now gives the exact parameters and reply of
contact.enable_sets, enable_all, disable_all, create, edit, list and
check, and the warn and strict parameter checks use them. The handlers
read their parameters from the raw JSON, so the contracts in
schema/motion.rs read each key as its handler does, with its message:
`occurrences` (OccurrenceKeys) and `set` are required in the schemas
but left to the handlers' messages in the types, through a small
`require` transform. The replies are built from typed values instead of
json! literals, with the same JSON; the listed sets mirror the doc
crate's ContactSet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
A 2D TRIMMED_CURVE in a pcurve read its basis straight through read_curve,
past the depth check that only the cached entry points (curve_in, curve_2d,
surface_in) made. A trimmed curve whose basis is itself, or a loop of two,
recursed until the stack overflowed and the app closed.
The depth check now sits in read_curve and read_surface, which every curve
and surface read passes through, so any chain of references, a cycle
included, ends at MAX_GEOM_DEPTH with an error that names the entity:
"curve #9: definitions nested more than 12 deep, or referring to
themselves". The other nested entities (surface, seam, intersection and
bounded surface curves, pcurves, 3D offset curves, offset, trimmed,
revolution and extrusion surfaces) already went through the checked entry
points; they now share the one check.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: Sketch: keep profile outlines and trim/extend cuts between mouse moves
* Sketch: keep profile outlines and trim/extend cuts between mouse moves
Hovering a large sketch sampled every profile's loops into polylines for
each point asked, and Trim/Extend intersected the hovered curve with every
other curve on every mouse move.
- Loop2::contains rejects points clearly outside a box from the loop's end
and control points before sampling; Region2::outline samples the loops
once (RegionOutline). Profile keeps both in OnceLocks and answers
Profile::contains from them (viewport pick, profile_at_point, profile
selection by points). Answers are unchanged: the box margin covers
rounding, and non-finite values or negative conic weights skip the box.
- sketch_modify splits the cuts on a curve (TrimHover) from choosing the
piece around the cursor. The UI keeps one per sketch state and curve,
and Extend's preview per sketch state, curve and growing end (afresh
when the sketch has an infinite line).
Plate with 400 circles (801 profiles), release, per mouse move: UI frame
5.19 -> 1.11 ms, with Trim 9.45 -> 1.50 ms; 30 lines x 30 splines: Trim
piece 6.10 -> 0.0002 ms. Equivalence tests compare with the old answers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch: keep the profile outline helpers in the sketch crate
The outer loop's box, the clearly-outside test and the outline sampled
once move from geom into crates/sketch/src/profiles.rs as private items
built from geom's public types, so the PR leaves crates/geom untouched.
Profile::contains answers exactly as before; the geom test moves to the
sketch profile tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Box window: a picked point fills Corner and Center in the design's unit
A vertex, edge or face picked into the Box window's Point input wrote its X, Y and Z as millimetre text whatever the design's length unit was, so an inch design showed "50.8 mm" where the other fields read inches. The fields now take the point through length_input::model, as Move and the Hole references do, so they read "2 in" there and stay "50.8 mm" in a millimetre design. The same applies to the Sphere and Torus centre.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Box window: a picked point reads to a millionth of the design's unit
length_input::model divides without rounding, so a vertex at 38.1 mm read "1.5000000000000002 in" in an inch design. length_input::shown rounds to a millionth of the design's unit, as the millimetre text did before, and the test pins that case.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Box window: a picked point keeps the micrometre in every design unit
length_input::shown rounds to a millionth of the design's unit, and the picked point's text is what OK sends, so in a metre design a vertex could move by up to half a millimetre. Document::design_length keeps the micrometre in every unit and still writes 38.1 mm as "1.5 in". The test now covers a metre design with a point that is not round in mm, and the Sphere and Torus centre.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Arabic: view-mode name, face term and Fillet command name in the hidden-edge selection preference
* Arabic: translate the sketch tool hints and errors, clearer Fillet phrase in the hidden-edge selection help
* Sketch Trim: a cut on a shape's centre ends the piece there, with no second point
Trimming half of a center rectangle's diagonal left two points at the centre. Trim dropped the diagonal's Midpoint constraint and ended the kept half on a new point held only on the other diagonal, so the old centre was free and the new end slid along the other diagonal. Dragging a corner pulled them apart.
A cut that lands on a point held at the middle of the trimmed line or of the cutter now ends the kept piece on that point. When the trimmed line held it, the Midpoint moves to the cutter if the point is the cutter's middle too (a rectangle's diagonals bisect each other), and otherwise the point is held on the cutter as a new end would be.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Trim: weld the cut end before a parallel distance moves onto it
A distance between parallel lines that measured from the trimmed line's end moves to the kept piece's start. When that start is a cut welded to a centre point, the move named the new point, which the trim then removed along with the dimension. The weld now happens first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Trim: test that a parallel distance moves onto the welded centre
Trimming the start half of a center rectangle's diagonal moves a distance to a parallel line onto the kept half's start, which is the centre. The test fails if the weld runs after that move: the dimension then names the cut point and is removed with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Trim: the centre comment names the case that reaches it
Only a line carries a Midpoint, so the comment's ellipse case could not reach this code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Trim: a crossing line whose middle is only near the cut gets no midpoint hold
Trimming a line at its held midpoint moved that hold onto the cutter whenever the cutter's middle sat at the cut, so a crossing line that merely happened to have its middle there was tied to the point. The hold now moves only when the sketch makes the two lines diagonals of a parallelogram (each pair of opposite sides held parallel, horizontal or vertical), as a center rectangle's are; otherwise the point stays on the cutter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Trim: ask the solver whether a cutter's middle is held at a cut midpoint
Moving a cut midpoint's hold onto the cutter only for a parallelogram of parallel, horizontal or vertical sides missed rectangles the sketch holds another way: with the bottom side held square to a side instead of horizontal, trimming a diagonal at the centre left the centre held only on the other diagonal, one degree of freedom freer than before. The hold now moves when the sketch already implies it, that is when adding it to the sketch as it was takes away no degree of freedom.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Trim: solve for the implied midpoint only when a cut lands on one
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
a_long_expression_opens_wide_while_edited_and_enter_applies_it moved the cursor to the end of the wrapped field with Ctrl+End. The control channel's cmd flag also sets ctrl, and on macOS egui treats Ctrl with End as an unhandled Emacs-style chord, so the cursor stayed where the click put it. The typed " * 2" did not land at the end, the parameter kept its old expression, and the test failed on macOS while it passed on Linux.
The test now uses Command+Down with ctrl off, which egui maps to the end of the text on every platform. What the test checks is unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #11584
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch: the sketch follows a dimension's value while it is typed (#11584)
While a new dimension's value was typed, only the dimension moved: the sketch's curves, points, constraint glyphs and other dimensions stayed at the old size until Enter. The typed value was already solved in a scratch session; it is now solved in the frame it is typed, and the open sketch is drawn from that solve, for every kind of curve, within the display cache's limits per sketch. Esc draws the design again. Picking and snapping of curves and points stay on the design, and no hover highlight of the design is painted while a value is typed. A value that does not solve keeps the last one that did.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Dimension: the sketch scene follows each solve of a typed value, not its address (#11584)
The sketch scene was keyed on the preview's address, which a later solve can have once the drawn one is freed; the scene would then stay at the old value. Each solve now has a number, and the scene is keyed on it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Dimension: while a value is typed, no design profile is lit over the sketch, and its curves are sampled before its fills (#11584)
The profile under the pointer was lit where the design has it, over the sketch drawn at the typed value; it is no longer, and the highlight is built again when the value is let go. The typed sketch's profiles were sampled before its curves from the one budget, so a sketch whose fills used it up lost its curves; the curves now go first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Dimension: a selected profile is not lit over the sketch while a value is typed either (#11584)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Dimension: the view goes to the typed preview only once a value is typed (#11584)
A picked dimension's value box opened with a draft that is the design as it is, and the view already treated it as the typed preview: the profile under the pointer, the selection and the hover went dark before anything was typed. The preview now starts with the first key, completion or reference.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Dimension: a reference picked into the value is solved at once (#11584)
The overlays read the preview before the editor solves a changed value, so for the click's frame they drew the solve before the reference.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Dimension: a selected sketch curve is not lit where the design has it while a value is typed (#11584)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Dimension: the pointer's x, y readout is not drawn while a value is typed, as the hover is not (#11584)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Dimension: curvature combs, the design's teeth, are not drawn while a value is typed (#11584)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Dimension: while a value is typed only the open sketch loses its hover and profile highlights; other sketches keep theirs (#11584)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #11718
* Sketch Transform: turn and scale about a picked point, such as a rectangle's corner (#11718)
The Transform window turned and scaled the picked entities only about the
middle of their box. It now has a Center field, as Move does. A sketch point
picked there is the point Scale and Angle work about, and Position moves it.
The box, its corner handles and the knob in the view follow the same pivot.
With Center empty, Transform works as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Transform: a click on a corner picks it as Center while Center waits for a pick (#11718)
The rectangle corner the issue wants to turn about sits under the box's
corner handle, so a click there started a scale. While the Center field
waits for a pick, the box's handles leave clicks to the sketch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Transform: the handles work again once Center has its point (#11718)
Center is the window's last field, so a pick there left it active, and the
box's handles stayed off until another field was clicked. They are now off
only while Center is empty and waiting for its pick.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Ribbon: a tool pinned into the Finish Sketch group shows pressed
The Finish Sketch and Finish Editing groups never drew the pressed state for any of their buttons, so a drawing tool dragged into them (the group at the ribbon's right edge takes drops) looked like a one-shot action while it ran. Only Finish, Cancel and Finish Edit are now left out of the pressed state.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Ribbon: test that Finish, Cancel and Finish Edit stay plain under a press
None of the three runs as a tool or leaves a dialog behind, so a press is the one way they could light up. The tests now press each one and fail if any of them is dropped from the exclusion. Finish Edit is pressed and released in the edit-in-place test, so the release is also the click that finishes the edit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Ribbon: Finish with AutoConstrain stays plain under a press like Finish
Finish with AutoConstrain belongs to the Finish Sketch group and ends the sketch like Finish, but it was not in the list of buttons left out of the pressed state, so once pinned as a button it lit while the pointer was held on it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #8768
* feat: Browser folders start closed and find a body only when asked, behind a preference
Preferences › Layout › Browser rows start closed (`browser_rows_start_closed`, off by
default) starts the Browser's folders closed, and placements too whatever "Components start
open" (#9274) says. Rows then open with their arrow, Expand All or Find in Browser, which opens
just the rows down to its body and closes again the ones the last find opened. A body picked in
the 3D view leaves the Browser as it is, and only the body Find in Browser found has the rows
above it marked, so a large assembly's placements are not named again after each edit.
With the preference off, folders start open, placements start as "Components start open"
says, and a pick in the 3D view opens the Browser down to its body, as on main. Find in Browser
looks the body's placement up once and opens its rows before drawing, instead of each row
testing the revealed path while it is drawn.
* Browser tests: read the row order from the Browser's content frame
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #9719
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Dynamics: rigid-body solver core with joints, gravity and springs (#9719)
A new L1 crate, solidcraft-dynamics (geom only): rigid bodies in maximal coordinates, joint constraint equations with analytic Jacobians for rigid, revolute, slider, cylindrical, planar and ball joints, gravity, linear spring-dampers and constant loads; the index-1 equations of motion solved through a rank-revealing Schur complement (repeated joint equations are solved, not refused); RK4 and Dormand-Prince 5(4) with position and velocity projection; joint values, rates, reactions and energies at every output sample; caps on bodies, joints, rows, steps and samples; Result errors only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Dynamics: take Vec3 from the record crate after the layer split, refresh the lock file
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
- section() kept the loose fit whenever it had fewer curves, even when it had merged 2 mm walls and an R2 round into one R2.85 arc that misses the walls, leaving the outline open
- The tight fit is now also kept when the loose one strays from the exact crossings (on planes and rulings) and the tight one does not; capped work, other curves count as near
- Test: a box with R2 corner rounds and four tapered grooves stopping 2 mm short, cut at Y=20
Co-authored-by: P'tite Tête <asso@ptitetete.com>
The probe ran `nvram` through PATH, which a Finder launch may not list
and which a look-alike earlier in it could change. The doc comment that
said exec would need unsafe is replaced by a description of what the
code does. Behaviour is otherwise unchanged.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* claim: #10220
* Web app: keep unsaved work in the browser instead of the leave-page box (#10220)
A new preference, off by default, on Preferences > General > Saving (web
app only): "Keep unsaved work in this browser instead of asking when the
tab closes". With it on, each open design with unsaved changes keeps a
copy in the browser's private storage (keep-<page>-<design>.sc/.json),
written once the design has been still for 0.8 s (at most 4 s after the
first change it lacks) and again on pagehide or when the page is hidden.
While every copy is current, beforeunload doesn't ask. A copy goes when
its design is saved, closed, or the preference is turned off.
The next visit offers the copies newer than their design's last save in
SolidCraft's own window, "Restore unsaved design: <name>, changed
<time>?", one window for several, with Restore, Open saved version, and
Discard. A page holds a Web Lock while it runs, so another open tab's
copies are never offered or removed.
With the preference off, the single autosave and the browser's prompt
work exactly as before.
* Web app: the restore window comes from the UI kit's recovery module (#10220)
The kit's text and divider helpers are private to the UI crate, so the
"Restore unsaved design?" window moves to recovery_ui
(browser_copies_window), beside the desktop recovery window, and the web
shell only maps its answer. Also keeps the window handle for the page
listeners instead of using the one moved into the app.
* Web app: restore window buttons sit in one row (#10220)
* Web app: keep unsaved work and still ask, unless told not to (#10220)
Keeping a copy in the browser no longer replaces the browser's leave-page
box by itself. A second option, shown once work is kept and on by default,
leaves the box in place; off, the box appears only while a copy isn't current.
* Web app: kept-copy review fixes (#10220)
A failed write of a kept copy waits 30 s before the next try, a recovery
copy is dropped only after the remembered saved file has opened, the
preference is documented under its current label, and the ui.prefs list
is sorted again.
* claim: #10223
* Quick-access bar: pin ribbon commands to the application bar (#10223)
A command's menu (a ribbon button, a section drop-down row or a command
search result) has Add to Quick Access: the command's own icon joins the
application bar after Save, Undo and Redo. A click starts it as its
ribbon button does, a drag along the bar reorders the buttons, and the
button's menu has Remove from Quick Access. Empty, and so not drawn, by
default; it holds up to 24 commands.
The list is kept with the toolbar's customisations (`quick_access` in
the toolbar's saved document), so it is saved, exported with the
keyboard shortcuts and carried by settings profiles.
* Quick access: a pinned family variant no longer replaces the ribbon choice
A quick-access click now starts the pinned command with start_pinned, so it
starts exactly that command and leaves the sketch family remembered choice
(the main ribbon button) unchanged.
* claim: #8517
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* web: editing embed for host pages (?embed=editor, #8517)
A host page that keeps the files itself and frames SolidCraft for modelling needs
the modelling UI without the application chrome. `?embed=editor` runs the web app
as such an embed:
- no application bar (logo, File menu, document tabs, update, help, report a bug)
and no start page; the layout is docked;
- the ribbon, browser, timeline and properties stay; Ctrl+Z and Ctrl+Y still undo
and redo;
- Ctrl+N, Ctrl+O, Ctrl+S, Ctrl+W and Ctrl+, are left to the host;
- nothing is kept in the browser (no stored designs, autosave, recovery prompt,
preferences or leave-page prompt), as with the existing viewer embed.
The existing `?embed&open=` viewer embed is unchanged. SolveApp gets one flag,
`embed_editor`, for desktop and test hosts too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* control: document.export / document.import / document.saved for a host (#8517)
An editing embed's host keeps the design itself. Three control methods
(window.solidcraft.request in the browser; the desktop control channel too; not
the agent chat's, whose method list is unchanged):
- `document.export` -> {name, revision, dirty, format: "json", text}: the active
design as a `.json` design file holds it. `revision` is the one
`document.revision` answers, so a host that follows the design compares one number.
- `document.import {text, name?}`: replaces the active design with that text,
timeline and parameters as saved, opened saved with a new `document_id`. It runs
as a design opened in a tab of its own, with the old tab closed without asking,
so whatever was open in the old design leaves with it. A text that does not read
leaves the design as it was. Waits behind a file loading or a design change, as
commands do, and evaluates on the window thread.
- `document.saved {revision}`: the host saved that revision; refused when the
design has changed since.
They are control methods, not commands: they act on the app's open design. The
browser API test gets a round trip through all three.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: aduijs <7501203+aduijs@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>