* The command reference: the parameters as a table, with their type and whether they are required (#5237)
The command reference shows each command's parameters as one raw line of
registry notation, so a reader has to read it as code to learn what a
command takes. The generated page now lists the same parameters as a table:
the name, the type, whether the command needs it, and what the registry
says about it. The complete parameter text stays in the automation details,
so nothing is lost for the scripts that read it.
The table is generated from the command registry, like the rest of the page,
so it cannot drift from the commands. The notation is read by a small parser
that knows what the registry writes: names written apart share the type
that follows them, a question mark marks a parameter optional, a pipe
between names offers alternative names for one parameter, a pipe after the
colon lists the types it accepts, a parenthesis says what the parameter
does, and the text after an arrow is the reply the command gives, not a
parameter.
Co-Authored-By: Claude <noreply@anthropic.com>
* test: the parameter table keeps its description literal
The parameter table shows registry text, so a description that carries
inline Markdown must be shown literally: backticks, emphasis and links
are characters, not syntax.
The type of a parameter ends where its sentence ends, so the sentence
that follows it is not part of the type.
Both tests fail on the current code.
* fix: render the parameter description as prose
The description cell of the parameter table is registry text, and the
rest of the file already renders registry text with prose(): backticks,
emphasis and links are characters, not syntax. table_cell() only kept
the table and the page intact, so a description like `#name = expression`
came out as a code span and a description with `*bold*` came out as
emphasis.
The name and the type keep table_cell(): they are identifiers and
notation, and they are not Markdown prose.
* fix: cut the parameter type at the end of the sentence
A type runs to the end of the clause, so the sentence that follows it
belongs to the command, not to the type: `construction?: bool. Returns
sides {bottom, right, top, left}` showed the whole sentence as the type
of `construction`, and the description of `sides` with it.
The type now ends at a full stop followed by a space and a capital
letter. A dotted or multiword type such as `sketch.rectangle` or
`number or expression` does not match that pattern, so it keeps its
current handling.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* claim: #11941
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* User parameters: input and output schemas for Add, Rename, Delete, Comment, Favorite and Move (#11941)
describe_command now gives the exact parameters and reply of the six
commands that manage a design's user parameters by name, and the warn
and strict parameter checks use them. The handlers read their
parameters from the raw JSON, so the contracts in the new
schema/parameters.rs read each key as its handler does, with its
message; `value` stays as parameters.add's other name for `expression`,
and `comment` is required in the schema but left to the handler's
message in the type. The replies are built from typed values instead of
json! literals, with the same JSON; parameters.add's reply flattens an
untagged AddedValue (a number's value or a text parameter's text).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Parameters: the schemas count a `null` expression and Move's neighbour as left out
`parameters.add` reads a `null` `expression` or `value` as left out
(`expr_arg`), so the schema's "expression or value" alternatives now
also need the key's type (number or text): `{"expression": null}` alone
no longer matches, while `{"expression": null, "value": 3}` does.
`parameters.move` needs exactly one of `before` and `after`. The schema
now says so with a `oneOf` whose alternatives each need their key as
text, so a `null` neighbour (read as left out) counts as neither, and
both or neither is refused. `conforms` doesn't read `oneOf`, so the test
pins it and counts the matching alternatives itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
- timeline.redefine maps a surface revolve's {origin, dir} axis through an edit-only table entry
- a new surface revolve still goes whole through to_active_frame (picked edge and face axes)
- tests: made and edited in a moved and a turned component against the solid revolve; a picked edge axis
Co-authored-by: P'tite Tête <asso@ptitetete.com>
* claim: #12155
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Motion studies: input and output schemas for Motion Study, List and Delete (#12155)
describe_command now gives the exact parameters and reply of
motion.study, motion.list and motion.delete, and the warn and strict
parameter checks use them. The handler reads its parameters from the
raw JSON, so the contracts in schema/motion.rs read each key as it
does, with its message (a study by id or name, steps, and keys of
[step, value] points); whether the study, joint and value exist stays
the handler's to check. The replies are built from typed values
instead of json! literals, with the same JSON, through `typed_reply`
(the contact commands' helper, renamed now that it serves both);
motion.list's traces stay as motion_trace.rs builds them.
The parameter audit found two tests in cmd/motion_tests.rs sending
`delete: true` to motion.delete, a key only Edit Contact Set takes; a
`deletion` helper now sends it only there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Motion Study: a point's step must be a number in the schema, as the handler reads it
The schema typed both elements of a key's point as "a number or text",
so `["0", 20]` matched it although the handler refuses a step that isn't
a number ("points are [step, value]"). The two are now typed apart with
`prefixItems`: the step a number, the value a number or an expression,
each under 1e9 in size, as `study_key_problem` and the handler read them.
Elements after those two, which the handler ignores, are left free.
The 1e9 limit, written twice in the key check, is now the named
`MAX_POINT_MAGNITUDE`, used by the check and the schema alike. A new test
checks nine point shapes against both the schema and the key check, so
the two can't drift apart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
* claim: #12222
* Web app: clippy for wasm passes with -D warnings (#12222)
cargo clippy -p solidcraft-web --target wasm32-unknown-unknown stopped at
drop(file) in safe_write.rs and showed 12 more warnings only that target
has. Each is fixed where it is:
- safe_write::create_atomic and control_auth::write_token_file_with close
their File by scope (a block; Result::map's closure) instead of drop(),
which clippy's drop_non_drop flags where File is a stub.
- Native-only imports, the AHEAD constant and the point-cloud worker's
Condvar are behind cfg(not(target_arch = "wasm32")); Exported::bodies
and Start::Later, read or built only natively, allow dead_code there.
- home::ask_present uses ctx in its browser branch; the browser blur stub's
begin returns a Scope, as the native one does.
- The web app drops three map_err(JsValue::from) on dyn_into's error,
which is a JsValue already.
Native builds behave the same.
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>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
browser.collapse_all, browser.expand_all, browser.group, browser.move,
browser.order, browser.rename_group, browser.ungroup, browser.visibility
and body.rename now publish input and output schemas, so agents and
scripts can read exactly which parameters they take and what they
return, and the warn and strict parameter checks cover them.
Each parameter is read the way the handler reads it today, with the same
error messages. The replies are built from typed values and serialize to
the same JSON as before. Part of #2829.
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
* Extract a component whose body was built in another component
component.extract now takes along the outside features that built, changed or moved
in a body the component owns, when they touch nothing that stays outside. Otherwise
it names the feature that blocks it. Fixes#12142.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Kernel case: extracting a component with a body moved in now succeeds
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #11766
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Render presets: input and output schemas for the native studio and quality profile commands (#11766)
describe_command now gives the exact parameters and reply of
render.preset.resolve and render.preset.apply (review and apply a
native studio composition) and render.quality.prepare (review a fixed
sampling budget), and the warn and strict parameter checks use them.
The handlers already read their parameters with strict serde types;
those types move to the new schema/render_presets.rs, gain descriptions
and JsonSchema, and become the contracts. The replies are built from
typed StudioComposition and QualityPlan values instead of json!
literals, with the same JSON.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Render presets schema: `set` names the setup's fields
As on #11762 and #11742: `patched_settings` reads a `set` patch onto
the saved setup as a RenderSetup, which refuses unknown fields, so the
schema now names the setup's 14 fields with additionalProperties false
(still at most 13 at once). A new test covers it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* claim: #11862
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Physical materials: input and output schemas for New, Edit, Inspect and Delete Physical Material (#11862)
describe_command now gives the exact parameters and reply of
material.create, material.edit, material.inspect and material.delete,
and the warn and strict parameter checks use them. The handlers read
their parameters from the raw JSON, so the contracts in the new
schema/materials.rs read each key as its handler does, with its
message: `null` keeps its meaning (`color: null` and `physical_card:
null` clear), the look keys reuse the appearance commands' types, and
the card keeps the handler's own check, with its schema from
schema/material_properties.rs (whose card_schema becomes pub(super)).
The replies are built from typed values instead of json! literals, with
the same JSON.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Colour schema: a colour's text form allows what color_param reads
inspect::color_param trims the text and drops any number of leading
`#`, so " #ff00ff " and "##ff00ff" are colours to appearance.assign
and the material commands, but ColorParam's published pattern refused
them. The pattern is now built from schema::types' whitespace class (as
AxisDir's is), which becomes pub(crate), and a test pins it next to the
reader's answers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Colour pattern: a byte may be `+` and one hex digit, as the reader takes it
`inspect::color_param` parses each of the three bytes with
`u8::from_str_radix`, which accepts a leading `+`, so "+fff00" is read as
[15, 255, 0] today. The schema's pattern asked for six hex digits and
would have made strict refuse a colour the handler accepts. The pattern
now allows either two hex digits or `+` and one digit per byte, and the
test pins both the reader's answer and the pattern's text, since
`conforms` doesn't read patterns.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* claim: #11761
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Render HDR: input and output schemas for Inspect HDR Source and Save Render Settings with HDR (#11761)
describe_command now gives render.hdr.inspect's and
render.settings.capture_hdr's exact parameters and reply, and the warn
and strict parameter checks use them. The handlers already read their
parameters with strict serde types; those types move to the new
schema/render_hdr.rs, gain descriptions and JsonSchema, and become the
contracts, so the check is no stricter than the handlers. The replies
are built from typed HdrInspected and HdrCaptured values instead of
json! literals, with the same JSON. `expected_sha256` is the doc crate's
HdrId, whose schema is written by hand (64 lowercase hex digits or null).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Render HDR schema: `set` names the setup's fields, and its job may be the saved one's
`patched_settings` puts a `set` patch's keys onto the saved setup and
reads the result as a RenderSetup, which refuses unknown fields. The
schema now names the setup's 14 fields with additionalProperties false
(still at most 13 at once), so `set: {"widht": 10}` is refused, as the
handler refuses it; the values stay the handler's to check. The
description now says the setup the changes make (a saved one keeps the
fields left out) needs a cpu_raytrace or gpu_path job, not that every
patch must give one. A new test covers the field names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* claim: #11375
Co-authored-by: Cursor <cursoragent@cursor.com>
* Web: tab title follows a renamed design (#11375).
When an OPFS design is renamed, open tabs keep the new path and a borrowed design name so the tab matches the file list.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
* claim: #11088
* test(ui): cover Paste New into a selected parent
* test(ui): use SolidCore Vec3 in clipboard regression
* test(ui): verify copied face attachment through menu
* style(ui): apply clipboard test formatting
---------
Co-authored-by: ermanyop-stack <278786764+ermanyop-stack@users.noreply.github.com>
Document::placements scanned every occurrence for each component it visited,
so its cost was placements times occurrences, on every world placement. The
new OccurrenceTree (crates/doc/src/occurrence_tree.rs) lists each component's
children once, in one pass and in document order; placements walks it with
the same order, caps and stop behaviour, through placements_with, which takes
each occurrence's transform from the caller. inside_component reads the same
index instead of scanning per component.
Tests compare the walk with the scanning one on 13 shapes and on hostile
generated documents, at its caps, in document order and with a given
transform. Release, 97,540 placements: about 120 ms -> 15.5 ms, the same in
either run order (docs/perf.md).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* timeline.reorder: say when nothing moved, and return the new index (#12140)
A position past the end was capped to the last slot; when the feature was
already there the command reported success with no sign nothing moved. The
reply now gives position (index now), from and moved, with a note that says
why nothing moved or that the last slot was used. A move that puts a feature
ahead of what it uses says so, and the command refuses before changing the
design if the feature would not land at the asked position.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* timeline.reorder: word a refused move by its direction; note a marker-only change
A feature moved later can fail for reasons other than order, such as a cut that
removes its body, so the move-earlier hint is given only when it moved earlier.
With `active`, a feature left in place gets a note saying only the history
marker moved, or that nothing moved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: offline script marker diagnostics for #3956
Co-Authored-By: Codex <noreply@openai.com>
* Report script build markers in offline web test timeouts
Expose the existing started and shared dataset markers in diagnostic state. Preserve missing markers as null without changing readiness or retry behavior.
Co-Authored-By: Codex <noreply@openai.com>
---------
Co-authored-by: Codex <noreply@openai.com>
* Arabic: one spelling of component in the Browser rows start closed note, dialog wording in the tab-close tip
* Arabic: no direction marks in the MCP compact output note
* Arabic: general term for the surface grain angle, Output name in the image import note and the Output inspector header
* Arabic: one word for the mouse in the right-click notes of the intersection curve pick and the Play History button
* Arabic: bridging term in the Hole dialog, intersection curve help pronoun, ground shadow tip wording
* Arabic: pan term in the drag-keeps-mode help and the vertical pan direction option
* Arabic: Move Sketch Points name, Move tool name in the drag highlight preference, file format wording in the newer-file notices
* claim: Parameter Sweep's schema requires parameter
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Parameter Sweep: the schema requires `parameter`, as text
`inspect.parameter_sweep` refuses a call without `parameter`, or with a
`null` or numeric one ("`parameter` is required (parameters.list)"), but
its published schema (#10978) neither required the key nor ruled out
`null`: the field's `#[schemars(required)]` has no effect on a key with
`serde(default)`, and `Option<String>` publishes `["string", "null"]`.
The contract keeps the key optional in its type, so the handler, not the
check, gives its own message when it's left out; the schema now requires
it through a struct-level transform, as the contact commands do, and
types it as a string. A new test checks the schema against a call
without the key, with `null` and with a number; it fails without this
change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Sketch modify: name the public command in the split and trim errors (#4712)
Part of #4712.
The split inside the sketch modify tools refused in the name of the
internal `split` step, and the free-form trim in the name of the
internal `trim` one: `invalid parameters for `split`: a circle needs
two points to split at` names a command nobody can write, so an agent
or script reading the message has nowhere to go.
Both now name the public command the caller used: `sketch.modify` for
the split shared by trim and break, `sketch.trim` for the trim. The
descriptions are unchanged.
Co-authored-by: Hermes Agent <noreply@anthropic.com>
* Sketch modify: the split names the command the caller used (#4712)
`sketch.modify` is not a command a caller can write: the registered
sketch commands are `sketch.trim`, `sketch.trim.path` and `sketch.break`.
The split shared by trim and break therefore refused in the name of a
command that does not exist, and a script reading the message had
nowhere to go.
`split_at` takes the command of its caller and refuses in that name:
`sketch.trim` when the trim splits the curve, `sketch.break` when the
break does. Both callers already had the command in hand.
The test now states the decision: the refusal of `sketch.break` carries
`sketch.break`, and the rendered text names no other command.
Co-authored-by: Hermes Agent <noreply@anthropic.com>
---------
Co-authored-by: Hermes Agent <noreply@anthropic.com>
* Extrude: Two Sides keeps each distance on the side Direction gives it
Distance 2 stays on the side Direction gives it, whatever the sign of Distance 1, and its value box shows on the canvas. Rebased onto main as one change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Two Sides extrude: keep older designs' sides by a marker, and the full profile search
- A saved two-sided extrude is marked `second_follows_first` instead of having a literal
negative distance rewritten: expressions such as `-width` keep the old sides when their
parameters change, `-0 mm` keeps its span, and a feature's named inputs keep their values.
- Live sketch drags and the restored model cache use the full profile search evaluation uses,
so a sketch whose only closed boundary is projected keeps its profiles.
- The canvas Distance 2 box stays while its text does not evaluate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Tests: give the extrude added on main the second_follows_first field
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* Appearance: theme picker with carousel, grid, filters and Day/Night slots
* Appearance: theme picker arrows move a screenful of themes
* Theme picker: translations, token metrics, wheel helper in navigation, reveal tolerance
* Theme picker: keep both new Appearance preferences after the rebase
* Appearance: adapt theme picker to egui 0.37
* claim: #2398
* Extrude: the distance arrow stops at a parallel face and outlines it (#2398)
While Extrude's distance arrow is dragged, a flat face parallel to the
profile and lying over it takes the distance exactly once the tip comes
within 8 screen points of its plane, and the face is outlined as a hovered
face is. A cut dragged through a block so stops at its far side. Faces
beside the profile don't catch the arrow; Alt/Ctrl (free drag) turns it off.
The distance stays a number in the existing parameter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Extrude face stop: clippy (test-only current, +=)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Extrude face stops: a preference, on by default, keeps the old round steps (#2398)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Extrude face stops: follow world_state returning a Result (#2398)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Extrude face stops: import Vec/Plane from solidcore_record after the layer split
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>
* joints: support custom names in dialog and type-based default names
Allow users to specify a custom name in the Joint dialog and generate
type-prefixed default names (e.g. "Planar Joint1", "Revolute Joint1")
instead of generic "Joint{n}".
- Add `name` field to `JointForm` and display a text row in the Joint
dialog with a dynamic placeholder matching the chosen type.
- Update `new_joint_name` in `cmd/joints.rs` to take `JointKind` and
prefix auto-generated names with the joint kind label.
- Prioritize non-empty custom names and pass them through `joint.create`,
`joint.as_built`, and `joint.edit`.
- Pre-populate the existing joint name in `edit_joint` to allow renaming
directly from the Edit Joint dialog.
* joints: add tests for custom and type-based joint naming
Verify that the joint dialog and engine command layer correctly generate
type-prefixed default names and respect user-specified custom names.
- Add engine-layer test `new_joints_generate_type_prefixed_names_or_keep_custom_name`
to verify `joint.create` and `joint.as_built` naming logic.
- Add UI-layer test `joint_dialog_applies_custom_name_or_falls_back_to_type_default`
to ensure the `JointForm` captures and submits names correctly.
* Format dialogs_assembly_tests.rs (trailing blank line)
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: #8256
* Add initial Bulgarian translation (114 keys)
* Delete claim.txt
* Delete translate.py
* Delete assets/locales/bg.json
* Restore the bg catalog the locale list needs, fix indent
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Bulgarian: translate the strings the catalog tests require, drop ids that no longer exist
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: #10963
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Copy, Cut and Paste: input and output schemas (#10963)
sketch.copy, sketch.cut and sketch.paste get typed contracts and reply
types in schema/sketch_clipboard.rs and leave unconverted.txt. `at` and
`translate` read as the paste reads them, with its message; the replies
are built from Copied and Pasted, with the same JSON as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch clipboard: import Vec2 from solidcore_record after the layer split
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
* claim: #10442
* Viewport: no dark patch between nearby bodies (#10442)
The ground shadow was one ellipse under the box around all shown bodies,
darkest in its middle, which for two bodies side by side is the empty
floor between them. Bodies whose footprints meet now share one ellipse
(as before) and bodies apart get one each, on the same ground level and
with the same rings; more than 64 groups fall back to the single ellipse.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #5431
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Create Sketch: pick an origin plane through a body in front of it (#5431)
While a dialog waits for a plane, the origin and construction planes are
drawn over the bodies, but picking sorted them by depth, so the face of a
body in front always took the click. When the nearest face hides the
nearest plane under the pointer, the planes now sort just ahead of that
face (in their own depth order, still behind a profile on it). A face at
the same depth as a plane still wins the tie (#31), and nothing changes
when no dialog is waiting for a plane.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* view_confirm_corner: draw the line where the view shows it
Create Sketch now picks the origin XY plane through the extruded box, so the
sketch is flipped to face the view and (50, 0) -> (70, 10) fell outside it.
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>
* claim: #5961
* Sketch: sketch.move_points moves several points, each to its own target (#5961)
A script editing a traced outline could move one sketch point per call,
and only by its id: an agent that had to move two points of a
490-segment polyline redrew the whole sketch instead, breaking every
dimension and feature built on it.
sketch.move_points {moves: [{point | near, to}], tolerance?} drags each
point to its own target in one edit (one undo step), as sketch.move_point
drags one, and the sketch is solved. `near` picks the sketch point
closest to a coordinate, refused when none lies within `tolerance`
(default 0.1 mm) or two are as close. Every point is found before any
moves. The reply gives each point's id, its target, where it ended up and
whether it got there, so a fixed or constrained point is reported rather
than silently left in place.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Move the new command label to a pending locale file
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Fix the new command for the sketch store and geometry split
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Carry the new command label in every complete catalog
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* sketch.move_points reads the sketch through sketch_store
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>
* Open a design from a newer SolidCraft with a warning instead of refusing it
A newer format number or an unknown change no longer blocks opening. What
this version can read opens; a feature it can't read stays on the timeline
with an error, and fields, sections and container parts it doesn't know are
named in the reply and written back by Save, under the file's own number.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Saving a newer design from the CLI, and editing a feature this version can't read
`run --save` writes a design holding a feature only a newer build can build;
`--out` still stops, since it would export the part without that feature.
Edit Feature on such a feature says why instead of opening the palette.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Translate the newer-design notice for the complete catalogs; clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* claim: #7273
* Viewport: drag a component as a GPU layer of its own
Each step of a Move triad drag placed the component anew, and the
viewport then rebuilt the model scene and uploaded it again. The dragged
bodies are now drawn from the scene built where the drag found them,
moved on the GPU by the drag's motion; the rest of the model stays as it
was. In the viewport a step meshes, builds and uploads no geometry;
only the transform (and the ground shadow) changes.
- gpu: Frame::moving draws a second scene with its own model matrix
(U.model, applied in every vertex entry, instanced parts included);
blocks, evaluated chunks and instanced triangles pass between the
model scene and the layer instead of being uploaded again; glass is
sorted in the layer's frame; the AO prepass and see-through pass
cover it; the frame key includes the layer.
- doc: ModelBody::display_moved_from gives the rigid motion between two
worlds' copies of one solid.
- ui-egui: the model scene without the dragged bodies is built once;
dragged bodies are matched by name; the step's body boxes are the
start boxes moved; selected or hovered dragged bodies light where they
stand. A drag back where it began keeps its layer. A section, an
analysis, continuity seams or no GPU draw the drag as before;
capturing the move makes the scene whole again.
* feat(ui): a setting to keep the highlight under the pointer while Move drags
A Move triad drag drawn as a GPU layer picks nothing under the pointer, which keeps a step from
meshing the dragged bodies where they stand and from looking up the Browser row a highlight
follows. Preferences > Tools > Assembly Move > "Highlight what is under the pointer while dragging
a component" (`move_drag_highlights`, off by default) picks and highlights as before.
Also: the drag layer test takes `as_chunks` (clippy 1.99's `chunks_exact_to_as_chunks`).
* fix(ui): say when the Move drag highlight setting applies
The label names Move's arrows, and the tooltip says that with a section or an analysis shown the drag highlights all the same, and that a part dragged along its joints never does.
* claim: tap marking records once in the model cache
* Model cache: write each tap marking record once and share it between states
Problem: every state of a saved model wrote the cosmetic tap markings of all the features
before it, so the records grew with the square of the features. A design of 400 marked
cylinders wrote 34 of its 37 MB manifest that way: past the 32 MiB limit the save thinned the
cache (590 of 806 states left out, opening evaluates them again) and wrote the manifest
several times while choosing what to keep.
Solution: the records keep a list of markings, each written once (keyed by its text, as the
sheet bodies are); a state names its markings as runs of places, like its bodies and
sketches. A marking at the same place in the state written just before, equal to the bit, is
found without writing it as text. A thinned model keeps the whole list and counts it once;
the reader counts the markings with what a state holds. The cache format is now /6: an older
cache is a miss and the design is evaluated as before. The design document is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Saved model: count each tap marking by its text against the held limit
A state clones every marking it lists, so a run repeating one large marking could hold far more than MAX_HELD items of memory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
A selected face was filled flat in `sel_face`. An imported mesh (STL, OBJ)
is a single face, so clicking it in the viewport painted the whole part as
one flat blue silhouette and hid every wall, pocket and edge. The fill is
now lit like the hover fill, which already was.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch: an outline drawn inside a shape past its neck is refused, not looped
An inward offset of a closed outline wider than half a neck of the
shape would pinch it into two; one chain can't be that, and its pieces,
each joined only to its neighbours, ran back over each other in a loop.
When the outline itself doesn't cross itself and its offset would, the
offset is refused like other offsets the shape can't take. An outline
that already crosses itself (a bow tie) keeps its crossing offset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Loop guard: the arc's direction comes with its source, not with the offset piece
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Loop guard: a touch counts, lines along each other count, tolerances from the outline's size
An outline split where it crosses itself only touches itself there and
was taken for simple, so its offset was refused: between pieces that
aren't neighbours a touch now counts as crossing. A neck exactly twice
the distance gives two lines lying along each other, which cross at no
point: such an overlap now counts too. The tolerances come from the
outline's own size plus the coordinates' rounding, not from how far it
lies from the origin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch offset: pass the arc direction from the outline after the dog bone change
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>
* Sketch: a selection held back in part follows the pointer, not past it
Dragging a selection part of which cannot move (a rectangle with a corner
on the origin, all four sides selected) took the dragged side nearly twice
as far as the pointer. `sketch.drag` reported the grab where the average of
all dragged points went; the held corner kept that behind the side, and the
next frame's catch-up overshot. It now reports how the dragged point that
got furthest toward the pointer moved, so what can follow moves 1:1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch drag test: unwrap the world state after the engine change
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>
* claim: #7126
* Sheet metal: a corner torn between flanges of two features closes (#7126)
With the rule's corner relief `tear`, a flange made after another,
meeting it at a corner of the base, left the corner open: its setback
stopped the earlier bend at the corner while that panel ran on R + T
past it (an (R + T) x BA rectangle missing in the flat), and the new
panel stopped at the corner, R from the earlier panel's inner face
rather than the rule's gap. Folded, a hole about R + T across showed at
the base corner. A corner between the flanges of one feature is torn
(#809); one between two features was not.
Such a butt corner is now closed and torn: the new panel ends the gap
from the earlier panel's inner face, and both bends run on to where
their panels' ends start, each end on the plane through its start at
the corner (on the bend's outer face) and the outer edge of its panel's
end. In the flat that end is (cos(th - phi) - cos th)/(1 - cos th) of
the way along at the turn phi (sin phi at 90 degrees), one Bezier of
degree 9 (`tear_curved`). Folded, the corner closes but for a sliver.
In a thick sheet the bends' inner faces would cross beside the corner
(at 90 degrees where R^2 < (R + T)(R - g): with the gap 0.8 from about
2 mm). There the new bend's end eases toward (1 - cos phi)/(1 - cos th)
of the way along (`tear_ease`, still one Bezier), as little as keeps the
bends apart; the earlier bend and both panels' ends stay as they are.
A corner that can't be torn so (opposite or over-90-degree bends, a gap
wider than the radius, overlap in the flat) keeps what it had, with a
note.
The test that pinned a two-feature corner as never torn keeps its
open-corner half; the two-feature corner moves to the new tests, which
cover sheets from 0.9 to 3 mm.
Fixes#7126.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsiqyXWBFGTCX9J51bhysc
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Dimension: aligned across the line, horizontal or vertical by the pull past an end
Review on #7355: the aligned length must stay the default, and the box
rule shrank its zone to a thin strip on a shallow line. Now `auto` is
the distance between the two points everywhere across from them
(between the perpendiculars through them, and a tenth of their distance
past), and only a clear pull past an end changes it: up or down from
that end gives the horizontal distance, sideways the vertical one. The
two meet on the diagonals through the end, so both zones stay wide on a
shallow or steep line. Midpoint pairs keep main's box rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch Dimension: two midpoints keep the distance between them past their box's corners
As before #7355 and on main: text above or below the midpoints' bounding box
measures horizontally, beside it vertically, and anywhere else (inside it or
past its corners) the distance between them. The corners fell through to the
line rule and became horizontal or vertical (found in review).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>