56f09f3993ce99d7e6dfd4af6379a600d4b184d9
125 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c8314687fc | Construction points and axes: Browser rows, and pickable in the view and dialogs (#4312) (#4320) | ||
|
|
878339cac8 | Sketch patterns: count, spacing, and angle follow parameters (#5231) (#5332) | ||
|
|
59cad5f0bb |
Colored components (feature request #2507) (#2877)
* feat: add colored components inspection toggle * feat: persist component colors and add cycling controls * feat: assign component colors in creation order * fix: update component color menu integration and translations * fix: proper description for pending format change. * fix: deleted duplicated format change description from docs/pending. * Compare the component colour counter in the features-only check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Vadim Kalinsky <vadim@kalinsky.com> Co-authored-by: bherbruck <brennen.herbruck@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
826244bb28 |
Text parameters: a sketch text's words built from them follow every change (#727) (#6364)
* Test: a text's words follow its text parameters, and so does its cut A sketch text whose words are an expression of text parameters (`Label + '-L'`): a parameter edit and a configuration row that sets the parameter relabel the text, the text's cut follows, and the expression is saved with the design. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PsiqyXWBFGTCX9J51bhysc * Text parameters: a sketch text's words built from them follow every change A design's parameters are numbers; a text's words (a part label, a size code) could only be typed. Text parameters hold words: `parameters.add` or `parameters.change` with `unit: "text"` (the expression is the text, quotes optional), and `sketch.text` and `sketch.edit_text` take `text_expression` (quoted texts and text parameters joined by `+`, `Label + '-L'`) instead of `text`. The text is laid out anew from its expression on every evaluation, so a parameter edit, a configuration row or a script relabels it and the features built on it (a cut, an emboss) follow in the same rebuild. The design file keeps the text parameters and each text's expression (one pending format change); a configuration table's parameter column can be a text parameter; the Parameters dialog lists them under the unit `text`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PsiqyXWBFGTCX9J51bhysc * Text parameters: the joints' same-but-features check compares the text parameters The joints are solved once per change unless the design differs only in its features (same_but_features, #6372), which names every Document field. The text parameters are a field of their own and change what a text's words evaluate to, so two designs that differ in them are not the same but for their features. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3045d0787e |
Dialog curve picks keep their sketch (#4057) (#4081)
* Dialog curve picks keep their sketch (#3726) * Format Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Format Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Adapt context-menu test to Sel::SketchCurve's sketch field Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Path Flange picks keep their sketch too Path Flange (#4096) landed after this PR and still looked its path up in the newest sketch with those ids. --------- Co-authored-by: bherbruck <brennen.herbruck@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
52e5bc114e |
Display cosmetic internal and external threads (#2367) (#2868)
* claim: #2367 * feat: distinguish cosmetic threads in shaded views * test: keep cosmetic thread coverage compatible with current sections and assemblies |
||
|
|
dfde1e032d |
mcp setup: add SolidCraft to the AI clients on this computer; plain mcp finds a late app (#6379)
solidcraft-cli mcp setup (alias install) and Help > Connect AI assistants edit each installed client's own configuration in place, with this program's absolute path: OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed and VS Code. Only the solidcraft entries change; a stale path is refreshed and an entry the user changed is left alone. Plain mcp keeps looking for the app while its headless session has no work, and says on every tool result that it is headless when the app was not found. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
cc1e654690 |
Warn when a design is open elsewhere or changed on disk (#5467) (#5468)
* claim: #5467 * Warn when a design is open elsewhere or changed on disk (#5467) The desktop app keeps a lock file next to each open design (.~<file>.lock: computer, user, version, opened and refreshed times), refreshes it every minute and removes it on close; a lock not refreshed for three minutes is stale and ignored. Opening a design that another SolidCraft has open asks: Open Read-Only, Open Anyway or Cancel. A read-only design saves only to another file. A design remembers its file's size and modification time when it is opened or saved. Save over a file another program or computer changed since asks: Save a Copy (the default), Overwrite or Cancel. Programmatic calls never ask: doc.open reports open_elsewhere and takes read_only, and file.save over a changed file returns an error until it is given overwrite: true. ui.documents answers both questions. |
||
|
|
7af97e3729 |
Editing an Extrude or Revolve shows its sketch (#5336) (#5443)
* claim: #5336 * Editing an Extrude or Revolve shows its sketch (#5336) A finished sketch is hidden once a feature uses it, and it stayed hidden while that feature's dialog was open for editing, so no other profiles could be picked. The session now holds the sketch of the feature being edited; the edit dialog sets it while it is open and clears it however it closes, and that sketch is drawn without changing stored visibility. |
||
|
|
2b620338df |
perf: solve the joints once per parameter change (#6372)
A parameter change evaluates the model and solves the joints inside the command (so that it can refuse a value that breaks a sketch), and `Session::execute` refreshes again after the command and solves every joint a second time, although nothing has moved since. On 40 small parts jointed rigidly to a plate's holes (half of the joints lifted by an expression), changing the lifts' parameter took 0.85 s on main and takes 0.45 s now; changing one part's thickness, 1.96 s and 1.52 s (CLI, medians of 5 runs). The session now keeps the design the joints were last solved for, as the solve left it, and the model that solve read. A refresh that finds the same model, and a design that differs from the solved one at most in its features, leaves the joints as they are: the joints read features only through the model, and a value edit stores the new solutions of the sketches it drove after its solve, so its design is a new one by the time of the second refresh. Placements and bounding boxes come out identical. Test: `a_parameter_change_solves_the_joints_once` counts one solve per change (two before), checks the jointed part still follows the hole, and that a captured move of a jointed part is still solved back. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a5f7f5a921 |
Batch: consecutive parameter edits can rebuild the design once (#5822) (#5839)
* claim: #5822 * Batch: consecutive parameter edits can rebuild the design once (#5822) An agent's batch of parameter edits, one parameter per step, evaluated the design once per edit: an edit early in the timeline rebuilds nearly all of it, and 21 such edits ran for minutes. engine.batch and the MCP batch tool take coalesce_parameters (default false). With it, each run of consecutive plain parameter edits (parameters.change with only a name and an expression, or with changes) is set as one parameters.change {changes}: one rebuild for the run. Any other step ends a run, so later steps see the design up to date. Every step still gets its own result (coalesced: the run's length); the run is one undo step. A run whose combined edit is refused (a new parameter, which changes can't make; a bad expression) runs step by step, so a refused edit is still named by its own step. The app's off-thread evaluation computes the run the same way. The grouping is solidcraft_engine::batch_params, shared by both runners. 21 parameter edits on a plate with 21 extruded bosses (in-process MCP, ci profile): 40.1 s step by step, 3.5 s coalesced, the same volume. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Batch coalescing: say a run skips the states between its edits; test it against step by step (#5822) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a402c5e502 |
Snap points: the centre, middle and ends an edge or face offers, in the engine (#5881) (#5882)
* claim: #5881 * Snap points: the centre, middle and ends an edge or face offers (#5881) Phase 1 of #5881. `solidcraft_engine::snap::snap_points` gives the points a picked item offers as picks, from Measure's exact shapes: a round edge its centre (an arc also its ends and exact middle, joined across pieces the kernel split it into), a straight or other edge its ends and middle, a flat face the centre of its area, a cylinder or cone the centres of its ends, a sphere or torus its centre, a vertex itself. Nothing uses them yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
dbdeeec2e9 |
Undo restores what a hide put away (#2219) (#4780)
* Undo: what is hidden lives in the snapshot, so hiding is a step (#2219) `Session::execute` records a step only when the document `Arc` changes, and what is hidden lives in `Session::visibility` — saved with the design, but outside the document. `browser.visibility` was also declared `.noundo()`, and `Snapshot` had no field for it, so even a recorded step could not put a hidden body back: undo went to the command before the hide and left it hidden (#2219). `Snapshot` and `Checkpoint` now carry the `Visibility`, `go_to` restores it, and `Session::execute` treats a visibility change as a change of its own. That change is display-only, so it refreshes the view with a revision bump (`refresh_display`) instead of evaluating a model a hide does not touch. The command also takes `folder: "all"` (every body, sketch, construction item, origin item and joint, plus the browser folders and occurrence hides) so Show All can be one step, and asking for the state an item already has no longer reorders the hidden lists: a redundant hide is not a step and leaves no unsaved changes. * Show/Hide: the menus run browser.visibility, so the history has it (#2219) The hide and show actions wrote `session.visibility` directly instead of running the command: the body and face menus (`ui.hide` / `ui.show`), the `V` key (`context_menu::toggle_visibility`), the browser rows' eyes, the Origin rows and `ui.originAll` / `ui.originPart`. The engine could record a step and there was nothing to record — which is why the release still answered "nothing to undo" after hiding from the Browser. They all run `browser.visibility` now (the repo rule that the UI acts through commands), and `ui.showAll` is that one `folder: "all"` call, so Show All is one undo step rather than three. `docs/occurrence-workflows.md` says what visibility does in the history. |
||
|
|
1e81e65e7e |
Browser tree hover stays fast on a nested STEP assembly (#3892) (#3894)
* claim: #3892 * Browser tree hover stays fast on a nested STEP assembly (#3892) Hovering a placement row lit its whole subtree by walking it again (Session::occurrence_bodies) on every frame, and opening a STEP file makes its top placement active, so every highlight rebuild walked the whole assembly again for the active placement's bodies. On a nested assembly each walk resolves every placement below it, which cost 0.5 s or more per walk. - Session::occurrence_bodies remembers its answers per placement until the document, the evaluated model or the pending moves change (occurrence_bodies_shared hands out the shared list). - The highlight looks hovered bodies and faces up by name instead of scanning the hovered list once per body. |
||
|
|
9227685483 |
Smooth sketch dragging on large imported faces (#3222) (#3480)
* claim: #3222 * Sketch drag: project a face sketch's links once per live gesture (#3222) Every live sketch.drag frame refreshed the sketch's links before solving the drag. For a sketch on a face that projects all of the face's edges again: 115-460 ms per frame on the top face of a 600 x 500 mm plate with 120 holes imported from STEP, against about 1 ms for the drag's own solve. The model the links come from cannot change during the gesture. The session now remembers the sketch, document and revision a live frame left. The gesture's next frame reuses the links while nothing else has run: any other command (undo included) or any other change to the design makes the next frame project them again. A test counts the projections. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Sketch drag test: drop an unread assignment (#3222) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
8cbde001ef |
Front … Isometric View commands, Ctrl+1…7 by default (#5057) (#5058)
* Ctrl+1…7 turn the view to the standard views (#5057) Front, back, left, right, top, bottom and isometric, handled with the other view keys beside Ctrl+8: animated like the view cube, reserved so no command can take them, and ignored on the flat pattern page. * Front … Isometric View are commands, Ctrl+1…7 their default keys (#5057) The standard views become seven commands (view.front, view.back, view.left, view.right, view.top, view.bottom, view.isometric) whose default shortcuts are Ctrl+1…7, instead of keys the window handles itself. They show in Keyboard Shortcuts, can be moved to other keys or cleared, and the digits can be given to other commands. In the app they turn the view as the view cube does; headless they set the session camera, keeping target, distance and projection. |
||
|
|
4f4b1fc2d2 | Sketch: select edge midpoints for horizontal and vertical constraints (#5159) | ||
|
|
9e6e0b8df1 |
Render workspace: complete experimental ribbon, resources and effects integration (#5493) (#5494)
* wip(render): reconcile completed material and image pipeline source with 0.20 (#5493)
Source-only integration reference for staged review, not a merge-ready aggregate.
Donor: 0xlillith/solidcraft@aea20b0115.
Upstream:
|
||
|
|
b7b25f9e2b |
Render workspace: first basic delivery to main (#6050)
* Normalize UI container violation paths across platforms (#5599)
Report repository-relative paths with forward slashes so diagnostics and the existing nested-package regression assertions agree on Windows and Unix. Keep the container detection rules unchanged.
Validation: official ui-containers gate and all seven focused xtask tests passed; rustfmt and diff checks passed. Only xtask/dependencies were compiled; no application build or heavy tests.
(cherry picked from commit 44b58d8e103a5fbc816ebf7c22b8de768ddf592b)
Scoped render-branch prerequisite from #4507, coordinated under #5493. No unrelated translation/kernel changes are included. Fresh Windows fmt, seven ui_containers regressions and the production container gate pass on render base
|
||
|
|
807e367bdb |
Hole: place a Single hole by distances from reference edges (#37) (#2931)
A Single hole can take up to two straight edges of its face as references,
each with the distance of the hole's centre from that edge's line, measured
in the face's plane. `solid.hole` takes them as `references: [{edge, distance}]`;
the edges are found again by their persistent names, else their points, so
the hole follows them when the part changes, and each distance is a
parameter. A bad reference (no edge there, a curved edge, one square to the
face, parallel edges, a negative distance, a centre off the face) is refused.
In the Hole dialog, Reference 1 and 2 follow the face, each with its Distance
row; the canvas shows each distance as a dimension from its edge to the hole,
with a box just past the edge to type it in. Picking an edge measures its
distance (and its box takes the keyboard), typing one moves the hole, and
moving the hole measures them again. Edit Feature picks the edges again with
their distances.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
6c6ffe4802 |
MCP: wait out long requests, honest batch outcomes, batch tool aliases (#2901)
Rebased onto main as one commit (was 120d26f7, df488f9a, db9d1073 plus merges of main). - A request the app reports as still running (#1618) is waited for on the same connection through `control.pending`; past the wait the error says it was not cancelled and will still apply (or only write its file), later calls are not sent behind it, and the new read-only `pending` tool returns its result once it lands. - A failed batch says what really happened: `rolled_back` only when the design is back where the batch started (as #3288 / #3242 on main: the app's `rolled_back` is believed; for an older app, every completed step undone; only a rollback asked for is reported as one), plus `applied`, `not_run` and `failed.still_running`. - A batch step may name a tool (set_parameter, list_commands, describe_command, execute, measure, inspect_design, undo, redo, export, save, open, new_design, crash_reports); screenshot, body_topology, batch and pending are refused before anything is sent. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2e5924ed5e |
Preserve construction references when axes and points are renamed (#4419) (#4449)
* claim: #4419 * fix: preserve renamed construction references (#4419) |
||
|
|
4353f34bd1 |
Delete removes a selected construction axis (#4692) (#4695)
* claim: #4692 * Delete removes a selected construction axis (#4692) Delete on a construction axis skipped it with "the origin axes can't be deleted". It now deletes the construction axis feature, like construction planes; the origin axes X, Y and Z are still refused. |
||
|
|
4bdeaacde6 |
Crash reports: keep component.activate in the journal (#5079) (#5121)
* claim: #5079 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Crash journal keeps component.activate (#5079) Activating a component changes only the session's active component and occurrence path, not the design, so the journal dropped the command and a crash report's replay built later parts under the previously active component. The journal now also keeps a command that changes either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
7e472bc4da |
Cancel Sketch: leave a sketch without keeping its changes (#3838) (#3938)
* claim: #3838 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SBN24y2TcqRcm2zn8Gkj27 * Cancel Sketch: leave a sketch without keeping its changes (#3838) sketch.cancel (Cancel Sketch, ribbon Exit group and the sketch's right-click menu) puts the design back as it was when the open sketch was created or opened for editing: a new sketch is removed with its dimension parameters, an edited one returns to how it was. It is one undo step, so Undo goes back into the sketch. The session remembers the design and the undo history at the point a sketch is entered. Cancel uses that only while the history still runs through it (the same steps before, every step since taken in this sketch); otherwise it refuses and points to Undo, so a stale entry can never throw away later work. The icon is the approved close glyph in the sketch accent (alias sketch_cancel); ja and zh carry the new label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SBN24y2TcqRcm2zn8Gkj27 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
5d92ad1e23 |
Renaming a plane keeps its projections, canvases and hidden state (#4353) (#4354)
* claim: #4353 * Renaming a plane keeps its projections, canvases and hidden state (#4353) timeline.rename only renamed the feature in other features' references. A sketch's projection of a construction plane, a canvas placed on it and the hidden list keep it by name too, so they lost it: the sketch warned that the plane no longer exists, the canvas left the view and a hidden plane showed again. Document::rename_feature_keys renames it in sketch links and canvases, as rename_body_keys does for bodies; the selection follows in the command, and the hidden list in Session::refresh_from, so a hidden plane stays hidden through undo and redo too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
769dfff1a5 |
Section Analysis: a Hatch option (#4563) (#4565)
* claim: #4563 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Section Analysis: a Hatch option, off for a plain cut in the body's colour (#4563) The Section Analysis dialog gets a Hatch check box beside Flip, and inspect.section a hatch?: bool (default true), so scripts, the CLI and the control channel reach it too. Hatched, a cut is its body's colour tinted toward the cap colour with 45 degree stripes, as before; off, it is the body's own solid colour. The viewport (cap alpha in the uniform), the CPU rasterizer and ui.render follow it, and the section keeps it when hidden and shown again or edited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3ed1829cc7 | fix: retain circular sketch pattern Quantity expressions (#4435) (#4607) | ||
|
|
4256775274 |
Joint: avoid redundant analysis and residual placement work (#5185) (#5186)
* claim: #5185 * Joint: reuse residual placements and skip discarded mobility reports (#5185) |
||
|
|
63d81cc096 |
Motion Trace: regenerate kept curves only when inputs change (#5248) (#5270)
* claim: #5248 * feat(motion): regenerate kept traces when source inputs change * feat(motion): add a parametric Chebyshev trace demo * perf(joints): reuse face measurements across motion samples Face-centred joint origins called Body::faces on every solve, bypassing the reference-mesh reuse used for rigid placements. Share face measurements with unchanged model geometry at the existing tolerance, while guarding replaced bodies and applying offsets after the cached measurements. Cover repeated named/nearest-face solves, shape edits, retained snapshots and direct replacement with deterministic work counts. The 145-point Chebyshev dimension and range updates retain identical sampled and interpolated curves. * perf(naming): skip preparation for cached face names Both face lookup paths spawned fresh workers over every body even when their name cells were ready. Prepare only cold cells, with direct handling of zero or one cold body. Preserve the existing parallel naming path and all face selection semantics. Deterministic regressions cover repeated picked and unique-name lookups, misses, partial warmup, renames, snapshots and moved copies. Release Chebyshev medians fall from 859 to 50 ms for a dimension edit and 871 to 34 ms for a sweep edit; all 145 samples and interpolated points remain identical. Full cargo xtask ci passes with RUST_TEST_THREADS=4 and the existing local Windows validation overlays. |
||
|
|
408d30ea56 |
Joint drive moves parts without evaluating them (#3391) (#3397)
* Joint drive moves parts without evaluating them A joint drive (also the Drive dialog and motion steps) changes only occurrence transforms, yet it re-evaluated nearly the whole timeline: every feature that might read another component's geometry (a sketch with any link, even to its own axis) hashed every occurrence's transform into its fingerprint, so any motion invalidated it and everything after it, and no new pose was ever in the cache. - Placement digest: a feature now hashes only where the geometry it actually reads lies relative to its own frame (link sources, anchors, profiles and paths from other components, mirror placements; To Object and face/edge-picked planes read every component, relatively). Moving parts that keep those relative placements leaves every result in place: nothing is evaluated or re-meshed. In-context features whose referenced part really moved still rebuild. - Evaluated ahead, applied once: `Ahead::evaluate` returns what it evaluated and `Session::prime` lets the window-thread pass take it (history commands and dialog OK), so an off-thread command no longer costs twice on designs past the cache's budget. - Contact meshes are kept per body geometry across drives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Joint drive: booleans read only their input bodies' placements A join, cut or intersect with named targets, and a Combine, read every placement, so a joined part transferred to a component re-ran its boolean at each new joint pose. Each now hashes only the placements of the bodies it actually takes as inputs, resolved in its timeline input state (before any later BodyTransfer), relative to the frame that evaluates it; Combine reads its tools relative to its target. Unresolved and legacy component or path reads keep the conservative dependency. 24 new joint_pose_ tests cover new angles, transfers, targets, save/reopen, undo and real relative motion (900 -> 800 mm3). Supplement offered on #3397 by takuto-NA. Co-Authored-By: takuto-NA <183465875+takuto-NA@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Creating a component recomputes nothing A new, empty component changes nothing a feature reads, yet it changed the placement fingerprint of every targeted boolean, Combine and To Object feature, so `component.create` evaluated the timeline again: - the first component of a design: `placement_digest` returned 0 while the design had no placements and a nonzero value once it had one; - To / From Object and legacy face- or edge-picked planes hashed every component, not just those holding the bodies, sketches and construction geometry the feature can reach. Co-Authored-By: Tyler Chiriboga <18270301+Tyler-Chiriboga@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test: creating a component after a legacy face sketch recomputes nothing A face extruded after its construction certificate is gone (a patterned cut, a pad joined flush with it, then one more cut) is sketched on a legacy face plane, which reads every placed body. A new, empty component must not change what it reads either (reported by Tyler Chiriboga). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: takuto-NA <183465875+takuto-NA@users.noreply.github.com> Co-authored-by: Tyler Chiriboga <18270301+Tyler-Chiriboga@users.noreply.github.com> |
||
|
|
776541b081 |
Agent commands compute off the window thread, so the window stays live (opt-in) (#1989) (#3340)
An agent's design changes over the control channel (engine.execute, engine.batch) are evaluated ahead on a copy of the session on an `agent` worker, then run on the window thread reusing every feature computed there (doc::KeptResults, whatever the bounded evaluation cache dropped); the worker also makes the display meshes of the bodies they end with. Exports run on a copy. While a change computes, or the agent cursor acts one out, ui.*, inspection and screenshots answer; later design changes wait their turn. A chip names the command with Stop. A person's edit meanwhile goes first; a replaced design refuses the request. Preference: Preferences > AI, agent_off_thread, off by default. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2b1cb2c4e1 |
MCP batch: rollback restores the original document (#3242) (#3288)
* claim: #3242 * MCP batch: rollback restores the design the batch began in (#3242) A failed batch with rollback: true reported rolled_back: true even when the design never went back. Two defects, both fixed: - file.new (and any document-replacing command) replaced the session with it, taking its checkpoints down too, so a batch that failed after file.new had nothing to restore. Session::replace_design now carries the checkpoints over to the fresh session: the checkpoint belongs to the batch, not to the session that happened to be holding the document. - rolled_back echoed the requested flag. It now reports whether the design is actually back: the app answers engine.batch with a new restored field, and the MCP tool reports restored && rollback. An app that predates the field falls back to undone/completed. * Batch: answer with main's rolled_back field after the merge (#3242) Upstream #2900 put the real restore check on engine.batch as `rolled_back` while this branch named it `restored`; the merge kept main's control test and this branch's field, and CI caught it. Standardize on main's wire name: the app answers `rolled_back`, the MCP tool reads it (fallback for older apps unchanged), docs and tests follow. The checkpoint carry-over across file.new is unchanged. --------- Co-authored-by: DahakBuilds <dahakbuilds@users.noreply.github.com> |
||
|
|
5d9ebe9911 |
Renaming a feature no longer rebuilds the design (#3044) (#3097)
* perf: renaming a feature evaluates nothing (#3044) A feature's name labels it and builds nothing, but a timeline rename evaluated the whole design again (about 70 s on the Prusa Core One assembly, and again for undo). When the only change is one feature's name, the model renames its result, sketch and construction geometry in place and takes the renamed design's fingerprints. A rename other features follow (a plane a sketch is on) or of a failed feature still evaluates the design. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Guard cheap commands on designs with thousands of bodies, plus a scaling bench (#3044) (#3121) Cheap commands stay cheap on designs with thousands of bodies, with a scaling bench. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
9e78e86b92 |
perf: renaming a body evaluates nothing (#3044) (#3095)
A body rename changes names only, but committing it went through the general "design changed" path: the whole timeline was evaluated again. On an imported assembly that means reading the STEP file again and meshing every body (about 100 s on the Prusa Core One, and the same again for undo). When the only change from the previous design is one body rename (the features' stored body names and the body-keyed maps the rename updates), the model now renames the body in its results instead: every body keeps its geometry and meshes, and the fingerprints are set to the renamed design's so the next evaluation reuses everything. Undo and redo of the rename take the same path. A rename the model can't follow that way (the body is changed or named by a later feature, sheet metal, threads) still evaluates the design as before. `bench-open --ops script.json` times commands and their undo on an opened design, with the view work each leaves. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
e98e065584 |
Open saved designs from the model they were saved with (#3053) (#3102)
* WIP: adopt the saved model on open (#3053) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP: tests * WIP: bench-open opens as Open does * docs: opening from the saved model * Tests: an edit after opening evaluates from the feature it changes * clippy * Read SOLIDCRAFT_NO_MODEL_CACHE through the env helper * Open: no picture from the model when the model itself opens; cancel test evaluates * Saved model: bodies passed through found without writing their record; states list runs of bodies * Adopted results go into the evaluation cache: an undone edit, or the marker rolled forward, takes them again * Model cache size guard: the saved model's writer --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
953fd7d5f8 |
Typed parameter contracts and JSON Schemas for solid.box and solid.extrude (#2829) (#2611)
* Spike: typed parameter contracts and JSON Schemas for solid.box and solid.extrude The schema RFC's spike (plan/schema-spike.md). solid.box and solid.extrude get typed contracts with generated JSON Schemas (2020-12), checked in front of the unchanged handlers by a per-session level: off (the default, which changes nothing), warn (the call runs and gains param_warnings) or strict (the call is refused and the design left alone). Also engine.describe and the MCP tool describe_command, `solidcraft-cli mcp --param-check off|warn|strict`, a FeatureResult type for feature replies, and an env-var audit recorder (SOLIDCRAFT_PARAM_AUDIT) used to check the contracts against every test. Local spike branch; not for upstream as is (see the results report). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Parameter contracts: put the audit recorder behind a feature; drop two ignored test keys The audit recorder is now on only in a build with the engine's `param-audit` feature and `SOLIDCRAFT_PARAM_AUDIT` set. Its code is still compiled, linted and tested without the feature. `scripts/param_audit.py` summarises a test run's audit logs, and the schema module's docs give the steps for converting a further command. Two tests passed keys their command ignores, which the audit found: `position` on `solid.box` (`hole_face_tests.rs`) and `symmetric` on `solid.extrude` (`face_tests.rs`). Both are removed, so the tests build what they always did. Comments no longer call the contracts a spike. 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> |
||
|
|
e9b1a077d7 |
Delete: check what a delete breaks off the window thread (#2678) (#2679)
* claim: #2678 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * WIP: timeline.dependents shares the evaluation cache (#2678) The check before a delete evaluated the edited design on a fresh model: it recomputed the whole timeline and left nothing for the delete. It now evaluates on a copy of the session's model. Adds Ahead::replies for running such checks off the window thread (the UI part is still to come). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Delete: check what a delete breaks off the window thread (#2678) Both checks a delete makes first (timeline.dependents for the timeline's Delete, the selection.delete dry run for Delete on the selection) evaluate the history after the deleted feature, on the window thread. A part with a slow feature froze the window for as long as everything after it took (5.9 s in the report). They now compute off the window thread like undo and the history marker: within the app's 150 ms wait they carry on at once, otherwise the window says it computes and the delete (or the confirmation) follows when the report is in. A design changed meanwhile is checked again; a second Delete meanwhile is left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: run the checks again (the run for 3b94e8e0 was cancelled when the PR left draft) 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> |
||
|
|
a6b44ab0d3 |
Profiles and cap attachments fall back to the best match when a sketch outline changes (#2897)
Thanks @SS-EN. |
||
|
|
02c77df5f7 |
inspect.clearance: mesh each body once per check instead of once per pair (#2867)
* inspect.clearance: pairs whose bodies did not change are not measured again Each clearance check measured every close pair again, though between two checks usually only a few bodies change or move. Results are now kept per pair, keyed by both bodies' geometry and placement and the check's settings; a pair whose two bodies are unchanged is taken from that cache. With 40 overlapping parts, a check after moving one of them took 0.8 s instead of 23 s (741 of 780 pairs reused). Pairs that could not be worked out are tried again each time. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * inspect.clearance: boxes and placed keys exactly as before the reuse The pair boxes are taken over the mesh's triangles with finite corners, as a distance shape's are, so pruning is unchanged. A placed body's identity now includes its model body's own frame, so two placements are never mistaken for one another. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * inspect.clearance: a large body is meshed once for all its pairs Each pair that touches cuts the larger body down to the pair's region with a kernel boolean, and that boolean meshed the whole body twice: once for its checks and once inside the intersection. A sheet with 600 faces paid about 2.5 s per pair for meshes that were the same every time. A body can now keep its meshes for reuse (Body::keeping_meshes); its booleans take the meshes from there, and the intersection takes its shell meshes from there too (truck-shapeops: and_with_history_meshed). Clearance uses such copies for one check. Results are unchanged to the bit. On a 3 x 2 m sheet with bends and 300 holes, the clip took 0.23 s per pair instead of 2.6 s, and 24 rivets took 5.6 s instead of 16.5 s. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: bherbruck <brennen.herbruck@gmail.com> |
||
|
|
99d8d382b9 |
Bill of materials: part properties on components and assembly.bom (#1888) (#1899)
* Bill of materials: part properties on components and assembly.bom A component definition now carries part properties (part number, description, revision, other tools' keys) and free text properties, saved with the component and shared by its occurrences. component.metadata and component.metadata.set read and change them in one undo step; Paste New copies them; parts.insert numbers standard parts from their standard and size, and parts.resize renumbers them. assembly.bom counts the placed components (flat: parts at any depth through their subassemblies; top: direct children), grouped by part number or by definition, sorted by part number, and writes CSV (fixed, quoted columns) or JSON. The app gets a Bill of Materials window on the INSPECT panel that lists, edits and exports the rows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Bill of materials: name a merged row's equal definitions once Two standard parts with the same size are separate definitions with the same name; their row now reads "SHCS M6x20" instead of repeating it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Window widths test: close the Bill of Materials window between commands The test closes the floating windows a command opens before starting the next one; the Bill of Materials window was left open and measured against the next dialogs' limits. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Bill of materials: sub-parts in their part's row, and part properties without re-evaluating assembly.bom takes group_children: true. A part with a part number keeps what is placed inside it (a bolt's washer and nut) in its own row, listed under it as children (items 1.1, 1.2, with each and count) instead of rows of their own; bolts with different contents stay different rows, and total_occurrences is the same either way. The window has a switch for it and shows the children under their part; the CSV lists them after their row. Changing part properties re-evaluated the model, re-seated every joint and rebuilt the placed model: 361 ms per change with 30 jointed bolts. A change that only touches components' metadata and properties now takes the same path as a render-only change (proved on the whole Document), also for its undo and redo: 0.6 ms. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Bill of materials: look the structure up once, not per subassembly Deciding whether a subassembly is a part (it has bodies of its own) scanned every body of the model for each subassembly, and each body looked up its feature by a linear search of the timeline: subassemblies × bodies × features. assembly.bom now indexes the placements, the body owners (Document::body_owners: one pass over the bodies with the timeline in a map, the same rule as model_body_component) and the numbered components once per call. 600 bodies and features with 60 subassemblies: 8.1 ms → 1.3 ms; the old cost grows with the cube of the design's size. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: bherbruck <brennen.herbruck@gmail.com> |
||
|
|
9eb1540a34 |
Docs: describe SolidCraft as independent CAD (#2768)
Reword comments, docs and package descriptions so they describe SolidCraft's own behaviour instead of comparing it to another product. The trademark notice, the commercial-CAD rule and the navigation preset name stay as they were. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
8a2d142333 |
fix: a cut takes only its sketch, a join adds only it (#1310)
Thanks @NOWN-DEV. |
||
|
|
0a66697da8 |
Continuity Analysis tool, legend and theme colours on #1642's inspect.continuity; curvature combs on faces (#770) (#1247)
Thanks @jyviko. |
||
|
|
b04e0801d6 |
Per-command timings for script runs and batches (#1868)
Thanks @DuBearte. |
||
|
|
2c020dbcbc |
Revert #1682 (three-axis milling) (#1715)
Thanks @bherbruck. |
||
|
|
737c9358d0 |
Add three-axis milling with independent CAM and Fusion validation (#1682)
Thanks @CypherNaught-0x. |
||
|
|
4d58d3bbca |
Extrude: to an object through the body, the automatic operation is Cut (#1633) (#1636)
Thanks @DuBearte. |
||
|
|
bbd4f29ebb |
Class-A surfacing 3/3: blend curves, curved-edge fillets, the G2 corner and continuity analysis (#1642)
Thanks @midasdf. |
||
|
|
d5640b5efb |
Timeline marker, undo and redo compute off the window thread (#1675)
Thanks @phanoob. |