c1925bb219081a84c13c8a96bc657ee89d87d746
151
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c1925bb219 |
Render appearance: click, drag and paint to assign, Pick Up, copy and paste (#6281) (#6431)
* Render appearance: click, drag and paint to assign, Pick Up, copy and paste, and Remove * Exclude the workspace Shots strip from dialog width checks * Exclude the collapsed Shots control from dialog width checks * Retain assembly cache listings and measure actual dialog bounds * fix: handle toast button rectangles in assignment status * fix: restrict gallery note measurement helper to tests * test: measure assignment help at the catalogue footer * fix: share the command revision snapshot after restacking |
||
|
|
e6dc105134 |
Point clouds: insert PLY, XYZ and PTS scans as a modelling reference (#5151) (#5381)
* Point clouds: insert PLY, XYZ and PTS scans as a modelling reference (#5151) A point cloud is kept in the design as a reference, drawn as depth-tested dots and never a body. - io: a PLY reader (ASCII, binary little/big endian; x, y, z of any numeric type, optional colours, other elements skipped; counts checked against the file) and XYZ/PTS text, thinned evenly past max_points. PLY meshes with faces can also come in through file.insert_mesh. - doc: Document.point_clouds (shared f32 points relative to an f64 origin, colours, units, rigid placement, size and colour), stored as a binary container part; format change in pending/point-clouds.rs. - engine: pointcloud.insert / edit / delete / list; doc.open opens a cloud as a new design; selection.delete takes point_clouds; view bounds include them. - gpu: an instanced point-sprite pipeline (16 bytes a point). - ui: Browser Point Clouds folder with eyes, menu and an Edit Point Cloud card; drop, Open, Insert and file dialogs take .ply/.xyz/.pts; a CPU viewport fallback; messages in en, en-GB, ja, zh, de and ko. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Point clouds: colour by the file, one colour or height, from the UI (#5151) The Edit Point Cloud card gets Color By (File Colors, Single Color, Height). Height is a blue-to-red ramp over design Z, between the cloud's own two heights or, by default, a range worked out from the points (all but the lowest and highest 2 %, from an even sample). pointcloud.insert and pointcloud.edit take color_by and height_range; pointcloud.list reports them. The colour of each point is worked out in one place (PointCloud::shade) for the GPU and CPU viewports. Also: the card's dropdowns compare the picked index (a dropdown's response doesn't report the pick, so File Units did not change either). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Point clouds: integrate format registration and viewport caches (#5151) * Point clouds: satisfy current UI audits and document comparisons (#5151) Route model RGB data through the theme conversion boundary, provide a compact ribbon label, and include point clouds in the new document comparison. Gate the Unix-only CLI-link helper and test so Windows all-target checks remain buildable after the rebase. * Point clouds: isolate translations for current main (#5151) Move the existing 74 messages unchanged into one pending locale file and attribute it through a pending row, following the current repository workflow. Repository checks, 50 tooling tests, final workspace Clippy, wasm and generated-catalog equality checks passed after the rebase. * Point clouds: fit the rebased code to main's GpuTarget and Frame Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Compare point clouds when reusing placement-independent results Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Point clouds: complete command help and required translations (#5151) * Point clouds: size the save cap from the raised limit after the rebase 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> |
||
|
|
866029aaa2 |
Engine: one sketch store for the sketch commands (W38.0, #5425) (#6336)
* Engine: one sketch store for the sketch commands (W38.0, #5425, no behaviour change) The sketch commands found and kept the sketch they work on in about forty places, each its own way. They now go through one module, cmd::sketch_store, so a drawing session (W38a/b) can put sheet and view sketches behind the same calls without the commands changing again. - target: the command's `sketch` param or the sketch being edited (target_sketch, moved). - active: the sketch being edited, if any. The thirteen commands that need one keep their own refusal text; unifying the three texts is a separate, visible change. - read and write: the only calls from the sketch commands to Document::sketch and sketch_mut. - update: change a sketch on a copy of the document and keep both, the edit the text and link commands made by hand (sketch.text, sketch.edit_text, the projection, intersection and include links, sketch.fit_curves_to_section, sketch.break_link). As before, those paths neither solve the sketch nor run its checks. - checked: the checks an edited sketch passes (the periodic splines), shared by edit_solved and sketch.offset.break. edit and edit_solved stay in sketch.rs and load and keep their sketch through read and write. Imported text, snap points and the face projections keep their own shape (a text that can't be linked is skipped, snap points copy the document only when one is needed) through read and write. The reads and writes that are about the design's own sketches stay as they are, each on a line marked `// design-only:` (Redefine Sketch Plane, a joint's curve, a motion trace's wire, and the session's live drag, parameter edits and `created` diff). A source scan, each_sketch_command_goes_through_the_store, fails when a command reads or writes a sketch, or asks for the active one, anywhere but the store or a marked design-only line in the files that work on the design's sketches. Every existing sketch test is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Engine: the sketch store's scan also catches the active sketch taken as a value (#5425, review of #6336) The scan only caught `active_sketch.ok_or`, so main's `let Some(id) = s.active_sketch else …` could have come back unseen (0xlillith's review). It now also flags the value-read forms: `) = s.active_sketch` (let-else and if let), `=> s.active_sketch` (a match arm), `s.active_sketch.and_then(` and `s.active_sketch.map(`. State checks (`is_some`, `is_none`, `== Some(`), assignments and snapshot copies stay allowed. The wider scan found five commands that hand-rolled the store's `target` rule (a `sketch` param or the sketch being edited). They now call `sketch_store::target`: sketch.inspect, sketch.glyphs, sketch.export_dxf, inspect.curvature_comb and inspect.minimum_radius (their `curves` form). Their refusals become target's: - no `sketch` and none being edited: "no sketch is being edited" (was "no such sketch (and none is active)", or "no such sketch" for sketch.glyphs); - an unknown name or id: "no sketch `X`" (an unknown id used to reach "that sketch is not evaluated"); - a feature that is not a sketch: "`X` is not a sketch"; - a `sketch` that is neither an id nor a name (true, a list, an object): refused, where it used to fall back to the sketch being edited. A null `sketch` still means none given (the scenario harness sends one): target now reads it that way for every sketch command (target_reads_a_null_sketch_as_none_given). No test, doc or schema text named the old wording; the params docs ("sketch?: id|name (default active)") still hold. The two remaining value reads, the default sketch for a feature (features.rs) and the sketch a measurement prefers (measure_sel.rs), go through `sketch_store::active`, with no change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Engine: a number in `sketch` is an exact sketch id, never a name (#5425, review of #6336) `sketch_store::target` turned a JSON number into text and looked it up with `Document::find_feature`, which falls back to a name when no feature has that id. So `{"sketch": 999999}` could pick a sketch named "999999" whose id is something else, and export or inspect it. sketch.export_dxf, sketch.glyphs and the two curvature inspects read an exact id before they moved onto the store; the other sketch commands (the old `target_sketch`) and sketch.inspect read a number as text. One rule now, for every command that takes `sketch`: a number is an exact id (`as_u64`, then the feature with that id); text is an id written out or a name, as before. A number that isn't a whole number of 0 or more (negative, fractional) is refused with "`sketch` must be an id or a name"; an id no feature has gives "no sketch `N`", as before. Nothing in the tests, docs, scenarios or examples names a sketch with digits, so nothing relied on the old fallback. Test (sketch_store): a sketch named "999999" with another id. sketch.export_dxf, sketch.glyphs (with another sketch being edited, for its enabled check), inspect.curvature_comb and inspect.minimum_radius (with a real curve id) refuse `{"sketch": 999999}`, find the sketch as `"999999"` and by its own id, and refuse -1 and 1.5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Engine: MidPoint finds its sketch through the store too (#5425, after #5011) #5011 added a caller of the old `target_sketch` (MidPoint's `line_stays`, which swaps a point picked after its line) after this branch's base. It now reads the sketch through `sketch_store::target` and `sketch_store::read`, as the other sketch commands do, so a number there is an exact id too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Engine: standard parts fix their sketch's entities through the store (#5425, after #6376) #6376 (a standard part's sketches are fully defined) reads the sketch being drawn straight from the document's features, after this branch's base. `fix_all` now takes it from `sketch_store::active` and `sketch_store::read`, as the store's scan requires, with the same result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Engine: Toggle Diameter and Delete on a profile find their sketch through the store (#5425) Two sketch commands landed on main after the store: sketch.toggle_diameter (#7729) still called the removed sketch::target_sketch, and Delete on a picked profile (#7107) read the sketch straight from the document. Both now go through sketch_store (target and read), and the store's source scan passes again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Sketch dimensioned: use the sketch store's target after the rebase Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Sketch dimensioned: read the sketch through the 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> |
||
|
|
f595f38e1c |
Define a named parameter inline from any value input (#4071) (#7341)
* claim: #4071 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Define a named parameter inline from any value input (#4071) Any value input, typed or sent as a command's expression parameter, takes `name = expression` (or `#name = expression`): the design gets the user parameter `name` with that expression, and the input stores `name`, in the command's one undo step. - doc: the lexer skips a definition's `name =`, so until the design stores it the text evaluates as its expression and commands read and check it like any value. `Document::define_inline` then turns every stored definition (feature inputs and placements, dimension parameters, sketch pattern and text values, joint and coupling values, sheet metal and plastic rules, canvas planes) into a user parameter, the unit following how the input reads a bare number. A taken, reserved or empty name, two different values for one name, and a definition in a parameter's own expression or a configuration cell are refused; all or nothing. - engine: `Session::execute` runs it after any command whose parameters hold definition-shaped text; the reply has `defined` (the first name, as `sketch.dimension` already gives) and `definitions`. A refusal fails the command, which leaves the design as it was. - `parameters.change` with `new = expression` renames the parameter it changes (a dimension's or feature input's own, references following) and sets it; when the value is just `new`, it sets `new`. `changes` refuses definitions. `expr.evaluate` reports `defines`. - UI: lengths keep the name when the design unit is applied; sketch text sends a definition as typed and previews only its value; the box corner and offset Distance 2 use the value; fields whose command keeps no expression (sketch scale, move, chamfer) refuse a definition with the way to name it. The dimension editor says which parameter it named. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
02ac56d12f |
Feature windows choose Join, New Body or Cut from what the material touches (#6901) (#6903)
* claim: #6901 * Feature windows choose Join, New Body or Cut from what the material touches (#6901) Extrude, Revolve, Loft, Sweep, Coil and the Box, Cylinder, Sphere and Torus choose their operation by running the Join on a copy of the design off the window thread and counting the pieces: Join when the material makes one body with what it touches, New Body when it would be a separate piece, Cut when it lies inside a body (Revolve and the four primitives; Extrude keeps its own Cut). The choice changes only when a check is in, a pick in the Operation row (the shown option included) stops it for good, and OK waits for a running check. Hidden bodies take no part: with some hidden, the shown ones become the feature's targets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Operation row: a pick in Extrude stops its own choice at once; ja/zh strings, gallery entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Operation check: contact test first, mesh volumes for Cut, OK takes the evaluated Join Material touching no body is a New Body without running the Join (the contact test costs 0-240 ms where the Join costs seconds on a large body). Inside is told from display-mesh volumes instead of exact ones (8 s on a 400-hole plate). The check evaluates the Join through Session::ahead, and OK of the same commands takes it (Session::prime) rather than computing it again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Preference: Choose the operation automatically (on by default) Preferences > Design gets "Choose the operation automatically" (auto_operation, on by default). Off, feature windows don't choose Join, New Body or Cut from what their material touches: each keeps the operation it opens with (Extrude its own Join or Cut), no check runs and OK doesn't wait for one, as before Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Arabic, Hebrew, Vietnamese and Turkish strings for the operation choice and its preference Arabic, Hebrew and Vietnamese are complete catalogs now, and Turkish has a full catalog, so this change's three strings get them too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Operation check: a closed window's check stops; the icon audit doesn't choose A window's operation check kept running after the window closed, a Join on the design for nothing, and the test harness waited for it after every step: the icon audit, which opens every window, took ~30 min instead of ~1. The check now runs under a Progress, and closing the window (or one that doesn't choose) abandons it: its evaluation stops at the next feature and nothing waits for it. The icon audit turns auto_operation off, as it only looks at icons (75 s again). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Box placement test: the window keeps its New Body The test #6248 added places a box that overlaps Base and expects a second body; with #6901 the window would join or cut it. The test is about where the box goes, so it turns auto_operation off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Join pieces: read the target lists leniently after the rebase 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> |
||
|
|
65784cae2f |
Save As offers the open file's own name, not the name stored in the design (#8329) (#8354)
* claim: #8329 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019FAWPuFoh9qxn2uS2j53QZ * Save As offers the open file's own name (#8329) Save As, Save As JSON and Save a Copy proposed the design's name, the one stored inside the file. Copies of a file under other names keep the stored name, so "Sample Plate-bug.solidcraft" was offered "Sample Plate.sc", the same as its sibling, and one replaced the other. Session::save_as_name() offers the stem of the open file unless the design was renamed since it was opened or last saved, and the design's name otherwise (a new design, or one renamed in the Browser). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019FAWPuFoh9qxn2uS2j53QZ --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
f103468dba |
Params: a list parameter refuses a wrong type instead of losing entries (#6651) (#6683)
* claim: #6651 * test(#6651): a list parameter of the wrong type is refused A list parameter such as a cut's `targets` or an export's `bodies` loses entries without an error: a value of the wrong type reads as an empty list, which most commands take to mean "every body". The regression test drives the engine the way a user does: two bodies, a box cut that crosses both and is meant for one of them, and a `targets` of the wrong type. The command must refuse it and leave the design as it was. * fix(#6651): a list parameter refuses a wrong type instead of losing entries A list parameter of the wrong type was read as an empty list, and an empty list means "every body" to most commands: a cut meant for one body cut every body it touched and the command reported success. A wrong type is now an error that names the parameter, the offending entry index and the value it got. A list longer than 10000 entries is an error instead of being cut short. `null` stays absent, as the schema contract says, and a plain string is still a list of one. The 80 call sites now propagate the error instead of losing entries; the commands that take feature keys, which may be named or numbered, read them with their own reader. |
||
|
|
3a951bc8c3 |
Sketch: dimension new shapes as drawn (squashed onto current main) (#5987)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
7e8f87dc57 |
Extrude: a face shared by two bodies is resolved in the active occurrence (#419) (#6469)
* claim: #419 * fix(#419): a face shared by two bodies is resolved in the active occurrence |
||
|
|
ebdc0bc07e |
Assembly: deeply nested body selection no longer stalls the window (#7502) (#7694)
* claim: #7502 * Assembly: name placed bodies from a per-design index, reveal the Browser from the body's path, evict cache entries singly (#7502) * Release the placement index before in-place document edits so pinning body names stays in place --------- Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com> |
||
|
|
d245541075 |
Reuse placement-independent model results (#6525) (#6527)
* claim: #6525 * perf(eval): reuse local geometry across placement changes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(engine): preserve recovery journal through shared refresh The shared evaluator retains the document Arc, so refresh and body-name pinning can copy it after command_done recorded its address. The next read then mistakes that copy for an outside edit and discards the replay. Record completion after refresh, name pinning or failed-command restoration. Add a minimal journaled box/inspect regression in the existing crash suite. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ad749d3399 |
Joints: the model is evaluated for the placements a solve leaves (#7084) (#7085)
Session::refresh evaluated the model and then solved the joints, which writes the solved placements into the design. A feature that reads where a part is placed kept the result made for the placement before the solve: a mirror of a jointed part's body, made from the root, ended up 4 mm below the part after a move the slider took back. When the solve moves parts, the model is now evaluated again for the placements the design holds, and the joints solved for that model, at most three rounds. Features that don't read placements come from the cache. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3ad5a360f2 |
Engine: keep the model and placed world across appearance-only edits (#7396)
Evaluation and placement never read appearances, yet an appearance edit re-evaluated the model and placed every occurrence again. A whole-document proof that only appearances changed now takes the existing render-only refresh, which keeps the model and retargets the world-placement cache. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
614e006eac |
Engine: keep every placed body's frame with the world state (#7411)
Each command that names a body (appearance, material, move, ...) mapped it to its component's own name by working out every placed body's world name and frame, so a command on a large assembly cost a walk of the whole design. The list is now kept with the world-placement cache while it is current. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
afd6a5c584 |
Send to Slicer: send the selected bodies to a slicer (#2595) (#3600)
* Add Open in Slicer for the selected bodies (#2595) One command saves the selected bodies as a 3MF in millimetres (an STL if the 3MF can not be written) and opens it in the last slicer used. It is on the File menu, the Mesh tab and the body right-click menu. The first time, or when that slicer is gone, it asks which one with the same list Save as mesh uses. The Save as mesh dialog is unchanged. * Send slicer files to a private per-user folder (#2595) Files sent to a slicer used to go to a shared folder in the temp directory. They now go to the user cache folder (mode 0700 on Unix), under a name that stays the same for the same design and bodies, so sending again replaces the file and the slicer can reload it. The file is written to a temporary name and renamed into place. If the name can not be replaced, as on Windows while the slicer holds the file open, the copy gets a number and the status line says so. Files older than seven days are deleted at startup. The first send tells the user that sending again replaces the open file, and so does the tooltip of Open in Slicer. Send to slicer in Save as mesh uses the same path. * Open files in a running slicer (#2595) PrusaSlicer, SuperSlicer, Bambu Studio and Cura are started with --single-instance, so a slicer that is already open loads the file instead of opening a second window. OrcaSlicer has no such flag and is left alone, and macOS bundles are single-instance already. PrusaSlicer 3.0 ships a launcher entry that already carries --single-instance-on-url; it keeps that one and never gets a second flag. It is a preference, on by default, and scripts can pass single_instance. Preferences also gets a button to forget the slicer Open in Slicer remembers. * List slicers the desktop entries say open 3MF or STL (#2595) On Linux the scan of desktop entries now also lists a program that claims 3MF or STL in MimeType, even when it is not in our table of known slicers. The table still supplies names, ids, icons and flags for the ones it knows. Entries marked NoDisplay or Hidden are skipped, and so are terminal programs and SolidCraft itself. The existing size and count limits stay. The Windows scan now looks inside a Prusa3D folder, where PrusaSlicer installs itself. * Only start slicers the user can see or chose (#2595) file.save_mesh took a slicer parameter that could be any executable path, so a script or an MCP client could run any program. The slicer now has to be one of the detected slicers (by id or name) or a program the user already added under Custom, which the app hands to the engine from its settings. The same rule holds for file.open_in_slicer. The agent chat already asked before any file command; its question now also names the slicer. * Review fixes for Open in Slicer (#2595) The file name hash keeps all 64 bits instead of 32. When Open in Slicer has to fall back to an STL, the status line now says so. The engine test that sets the chosen programs clears them again. The unused "could not make the folder" message is gone from the catalogs, and the docs say plainly that finding slicers by file type is Linux only. * Keep unsaved designs apart and hide Open in Slicer in the browser (#2595) Two unsaved designs with the same name and body names got the same file in the slicer folder. Every document now has a uid that is new for each New, Open and Recover and stays the same for the life of the document, and the file name uses it (with the process id) until the design has a path. At the first Save As the name changes to the path-based one, so the slicer gets one new file; the old one goes with the seven-day sweep. The browser can not start a program, so Open in Slicer is now disabled there: the engine command reports why, the File menu item and the body and component right-click items are greyed, and starting it anyway says so on the status line instead of opening a dialog. The Save as mesh dialog keeps its browser guard for the open flow too. * Put the Session doc comment back on Session (#2595) The new NEXT_UID static had landed between the doc comment and the struct it describes. * List every install of a slicer, and test the first Save As (#2595) Detection kept one entry per known slicer, so a system PrusaSlicer 2.9 and a Flatpak 3.0 beta showed up as one. Every distinct install is listed now. The same program found twice, through a desktop entry and through PATH, is still one. When a slicer has several installs, each gets an id made from where it was found (prusa#comprusa3dprusaslicer) that stays the same on every run, and a name worked out from its command and location without running anything: PrusaSlicer (system), PrusaSlicer (Flatpak, beta), PrusaSlicer (AppImage). A lone install keeps its plain id and name. The plain id or name still picks the first install, so a remembered "prusa" keeps working. Single-instance flags and the other per-slicer behaviour go by the id without the install part. Also a test that the first Save As changes the file name once and later sends keep the name that comes from the saved path. * Start PrusaSlicer 3.0 first and send the file once it is ready (#2595) PrusaSlicer 3.0 starts through slic3r-app-launcher, which ignores a file given at a cold start whatever the flag, and loads it over D-Bus when an instance is already running. A small table in slicers.rs names such slicers by their command; today it holds that launcher, so PrusaSlicer 2.9 and OrcaSlicer are untouched. Ready means a name starting with com.prusa3d.prusaslicer.BroadcastListener. is on the session bus, read from busctl --user list with no new dependency. If busctl is missing or fails, nobody waits and the file is sent as before. When the slicer is not ready, Open in Slicer starts it without the file and looks every 200 ms for up to 10 seconds. The wait runs on another thread, so the window stays live, and the status line says Starting PrusaSlicer. Once the name appears the file is sent with the same arguments as before. If the limit passes, the status line says the slicer did not respond, that the file is already saved, and to send again. A second click during the wait only repeats the Starting line, so there is one launch and one send. Scripts calling file.open_in_slicer wait inside the command by default, or pass wait: return or no. * Always show the slicer picker for Open in Slicer (#2595) File > Open in Slicer, the Mesh tab entry and the right-click entry now always open the picker, with the slicer used last time pre-selected, so the usual case is one click or Enter. Scripts and file.open_in_slicer with a slicer still send without a dialog. The preference button that forgot the remembered slicer is gone: it could no longer make anything ask again, and it did not clear the pre-selection either. The guide says how it works now. * Leave Bambu Studio out of the single-instance list (#2595) Open files in a running slicer now adds --single-instance for PrusaSlicer, SuperSlicer and Cura only. Bambu Studio is started as it is, so it may open a second window. A test pins that, for the detected slicer and for one the user picked as a custom program. The guide and the preference tooltip no longer name Bambu Studio as getting the flag. * Sort the English catalog and leave features.md to the generator (#2595) cargo xtask lists wanted one message moved in en.json after the rebase. docs/features.md is written by the Generated files workflow on main, so the row I had added by hand is gone from this branch; the workflow adds Open in Slicer when it lands. * Drop the unused folder message from the Vietnamese catalog (#2595) Vietnamese arrived on main after I removed ui.save_mesh_temp_failed from the other catalogs, so the check that every translated id exists in English failed on it. Nothing uses the message any more. * Say so when a started slicer can not be found again (#2595) After Open in Slicer had started a slicer on its own, a failure to look it up again to send the file just returned, so the status line stayed on Starting and then nothing. It now says the slicer was started, that it can not be found to send the file, and where the file is saved. A test covers it. * Say why a failed busctl ends the wait (#2595) If busctl fails partway through a wait, the wait stops and the file is sent, the same as when busctl can not be run at all. That is on purpose: a file sent too early is dropped quietly and costs one more send. A comment in wait_for_ready says so. * Keep the readiness wait inside its limit (#2595) wait_until asked the probe before checking the deadline, including right after a sleep, so a yes could be accepted after the limit, and busctl ran with no timeout, so one look could outlast the whole wait. The deadline is checked first now, the probe is told how much time is left, and busctl is given at most two seconds (less near the end of a wait) and is killed after that. A hung busctl counts as not telling, which sends the file as before. This covers the first look on the UI thread too. Tests cover a slow probe, the shrinking time left, and a fake busctl that hangs, answers and fails. * Send the file that was already written once the slicer is ready (#2595) When the wait for a started slicer ended, the UI ran file.open_in_slicer a second time. That exported the design again on the UI thread, from whatever the session looked like by then, and could write a numbered copy while the timeout message still named the first file. The wait now keeps the slicer it found and the answer of the first call, and opens the file that was written. A test changes the design during the wait and shows the same file is sent, is not written again, no command runs, and no second file appears. * Send with the single-instance flag after starting a slicer (#2595) After Open in Slicer has started a launcher that needs a start first, the file has to reach the instance that is now running, so the send that follows a start carries --single-instance whatever the preference says. A normal send, to a slicer that was already up, still follows the preference. A comment in both places says why. The test uses a plain launcher command with the preference off: the normal send has no flag and the send after a start has it. * Find the remembered slicer again after an uninstall (#2595) With two installs the remembered key is prusa#prusaslicer. Remove the other install and the lone one is plain prusa, which matched neither the exact key nor the plain-key fallback, so the picker fell back to the first slicer in the list, maybe a different one. The key is now also matched by the part before the #, so the same slicer is pre-selected. A test covers the lone install, a plain key with two installs, an exact key, and that another slicer is never picked. * Say a second click did not send anything while a slicer starts (#2595) While a started slicer is being waited for, another click showed Starting <the first slicer> even when it had picked another slicer or other bodies. It now says it is still waiting for that slicer and that nothing else was sent. The test checks the wording and that it names the slicer being waited for. * Label macOS installs by their application (#2595) An open -a command resolved its program to /usr/bin/open, so every application on a Mac was labelled system. Labels for open commands now come from the .app path: /Applications is system and a folder under home is shown as ~/Applications. A test with two PrusaSlicer.app bundles and a made-up home checks both labels and that the ids differ. * Pick the same place for a program found twice every time (#2595) When two desktop files, or a desktop file and PATH, pointed at one program, the first one read was kept and its file name went into the id, so the ids could change with the order the folders were read in even though nothing was installed or removed. The place that sorts first now speaks for the program. A test with two aliases and a second install lists them with the folders in both orders and gets the same ids and commands. * Treat flatpak run spelled two ways as one install (#2595) flatpak run ... and /path/to/flatpak run ... with the same arguments had different install keys, so one invocation could be listed twice. The launcher is now compared by its file name and the arguments are kept, so both give the same key, while a different branch is still its own install. The test uses a real launcher file so the full-path entry is not skipped as stale. * Say plainly that a late yes is accepted on purpose (#2595) The comment on wait_until said a slow probe could not accept a yes that came too late. That was not what the code does: no probe is started after the limit, but one already running may finish and its yes is taken, because the file should still go. The comment now says so, with the bound: the limit plus that last probe, which in production is given the time left and so ends by the limit. A test has a probe that runs past the limit and says yes, and checks it is accepted and the wait stays within limit plus the probe time, and that a probe that says no is not followed by another. * Give reading busctl the same deadline as running it (#2595) After busctl exited, the output was read with a join that could wait forever if a process it left behind kept the pipe open. The reader now hands the text back over a channel and the wait uses the time that is left of the same limit, and gives up with nothing otherwise. The polling sleep no longer overshoots the time left either. A test uses a fake busctl that backgrounds a sleep with its output inherited and exits at once: the call returns within its limit. * Tell two different flatpak launchers apart (#2595) Comparing only the file name of the launcher made /opt/tool-a/flatpak run ... and /usr/bin/flatpak run ... with the same arguments one install even when they are different programs. The launcher is now found the way any program is, through PATH and with links followed, and its name stands in only where it can not be found. The test has flatpak on PATH and the same file by its path as one install, a different executable of the same name as a second, a different branch as a third, and the fallback when there is no PATH. * Keep waiting when busctl is slow, send only when it is missing or fails (#2595) Since the busctl timeout, a slow busctl came back as "can not tell", and that was read as send now. One slow look, likely just when a cold PrusaSlicer 3.0 is starting under load, ended the wait and sent the file early, which gets dropped. The look now says why it has nothing: slow means not up yet, so the wait goes on to its limit and then reports that the slicer did not respond; a missing or failing busctl still means it can not be told and the file is sent. The comments name only those two cases. Tests use fake busctl programs: one that hangs keeps the wait going to the limit and times out, a missing one sends at once, one that says not up and then fails sends, and one that names the slicer is ready. * Do not open an empty path when the answer had no file (#2595) If the answer kept for a started slicer had no path, the send ran open with an empty string. The tick now says there is no file to send and starts nothing. The test gives a wait with no path, checks the error line, and that the fake slicer was never run. * Drop the unused folder message from the Danish catalog (#2595) Danish arrived on main with ui.save_mesh_temp_failed, which this branch removed from English because nothing uses it any more, so the check that every translated id exists in English failed. The entry is gone from the Danish catalog too. * Always start the 3.0 launcher with the single-instance flag (#2595) A hand run showed that starting the PrusaSlicer 3.0 launcher with no file while a 3.0 is already running forwards to it and exits when the flag is there, but opens a second full window when it is not. A slow first look at the bus can start the launcher twice, and with the preference off the flag was stripped. A slicer that has to be started first now keeps the flag on that start whatever the preference says, the same reasoning as the send after a start; when nothing runs the flag does no harm. A normal send with the preference off still has none. The test covers the launcher entry, a bare launcher command, a normal send and a slicer that is not on the table. * Swap --single-instance-on-url where it does not hand the file over (#2595) A hand run on the PrusaSlicer 2.9.6 Flatpak showed that its entry's --single-instance-on-url does not forward a file to the running instance: every send opened a new one, three after a cold start and two sends. With plain --single-instance the second process finds the first, forwards, and exits. So when a command carries --single-instance-on-url and the slicer is not on the wait table, that is, not the 3.0 launcher, it is replaced by --single-instance, with the file markers handled as before, when the preference is on, and stripped when it is off. On the 3.0 launcher the flag does forward and stays. The comment on the rule says why. A test uses the real 2.9.6 and 3.0 Flatpak command lines. * Cut long slicer names to fit the picker (#2595) With installs listed on their own, a name like PrusaSlicer (Flatpak, master) is wider than its row. The list painted it with no limit, so it ran out of the popup, and the closed selector wrapped it onto a second line. The list now lays the name out on one line that ends in an ellipsis when it does not fit, the selector truncates, and the full name is in the tooltip when it was cut (for a program the user added, ahead of the delete hint). A test checks that a long name is cut to one line within the width and a short one is left alone. * Keep the 3.0 launcher's flag on a send whatever the preference says (#2595) A hand run with the single-instance preference off showed the 3.0 launcher needs its flag on a send too, not only on a start: a cold start with a file and no flag loaded nothing, and a send to a running 3.0 left a launcher process that never forwarded. A slicer on the wait table now gets the flag on every launch, as it already did when started alone. The doc comment says why. The preference text, in English, Japanese and Chinese, and the guide now say that PrusaSlicer 3.0 is the exception to turning this off. The tests that took the flag away with the preference off now expect it, for the launcher entry, a bare launcher command and the 3.0 Flatpak line; the test of the send in the UI checks the first send carries it. * Keep the install-flag swap to PrusaSlicer, found by what it is (#2595) The swap of --single-instance-on-url for --single-instance ran for any program whose command had the flag, so another program with that flag would have been rewritten. It is now a PrusaSlicer rule: it applies to a slicer recognised as PrusaSlicer by its identity, its id or, for a program the user picked, the name it goes by, never by a version number. The single-instance table uses the same identity check. A test keeps the flag of a program that is not PrusaSlicer, strips it when the preference is off, and swaps it for a picked program named PrusaSlicer. * Do not promise a hard bound in the wait comment (#2595) The comment on wait_until said the production probe ends by the limit. Its clock starts after the process is spawned, and killing and reaping the process and scheduling are not bounded by it, so it is a polling and read budget with process overhead on top. The comment says that. Comment only. * Tell PrusaSlicer 2 from 3 by the installed version (#2595) PrusaSlicer 2 and 3 need different handling, and the rules had to guess from the command line. Each install of PrusaSlicer now carries its major version, read when it is detected from the release at the top of its appstream metadata and never by running the program: a Flatpak's own files (the branch the command names, else the current one), or the metainfo file beside a desktop entry. PrusaSlicer older than 3 is sent the file with --single-instance in place of --single-instance-on-url, which does not hand a file over there, and is not waited for. PrusaSlicer 3 and newer keeps the launcher's flag, is started on its own, waited for, and sent the file. When the version can not be read, the command decides as before: the slic3r-app-launcher launcher counts as 3, and any other entry is left as it is. A program that is not PrusaSlicer is untouched whatever its flags. Tests use metadata fixtures, no Flatpak: 2.9.6, 3.0.0-alpha10, a branch that is not installed, a system package, an unreadable version with and without the launcher, and a non-PrusaSlicer program with the same flag. * Make the busctl wait tests steady under load (#2595) One of them failed once in a full run at its first assertion and passed alone. A script that has only just been written can fail to start (text file busy) while another test forks, and that reads as a busctl that is missing. The fake programs are now started once, patiently, with a flag they answer at once, before a test relies on them; a hanging one uses exec so it is killed cleanly. The time bounds that could trip on a busy machine are several seconds now, and the checks are on outcomes: not ready and keeps waiting, send now, and the number of looks. Thirty runs alone, thirty of the whole slicers filter and thirty of the busctl tests under eight busy loops all pass. * Say what the busctl reader thread leaves behind (#2595) The thread that reads busctl output is left to end when the pipe closes. A busctl that answered but left a process holding its stdout reads as slow, and every poll of such a bus can leave one blocked reader behind until that process lets go. A comment next to the thread says so. Comment only. * Make Save as mesh a plain export (#2595) Save as mesh asked for the bodies and the format, and could also send the file to a slicer with a checkbox and a slicer list. Sending now has its own command, so the checkbox, the list and the Send label are gone from this dialog: bodies, format, a file dialog, Save. The two settings that only the checkbox used, save_mesh_send and save_mesh_slicer, are no longer kept; a settings file that still has them loads, and they are ignored. The strings only they used are gone from the catalogs. The slicer list stays in the dialog of Open in Slicer. file.save_mesh keeps its slicer parameter for scripts. The guide describes the two as separate. * Rename Open in Slicer to Send to Slicer (#2595) The command sends a file to a slicer rather than opening one, and a later Send to App can share the name. File menu, Mesh tab, right-click menus, the dialog button, status lines, the guide and the English, Japanese and Chinese strings now say Send to Slicer, and the command id file.open_in_slicer is file.send_to_slicer. It is new in this change, so there is no alias. The remembered slicer is stored as send_slicer, and the question the agent chat asks says send to. Module and type names stay as they are. * Put the send targets in one table and one send pipeline (#2595) The known slicers, the list of slicers with a single-instance flag and the rule for slicers that must be started and waited for were three separate things. They are one table of targets now: id, label, kind, names and program files, accepted formats and the default, how the file is handed over, the single-instance flag, the version from which PrusaSlicer's on-url flag hands a file over, and the wait-for-ready rule. Programs that are not in the table are slicers with the same defaults. The kind is slicer, the only one so far; its comment says it is where a later Send to App would plug in. The send itself is one function: write the bodies, find the target, start it and wait if its rule says so, hand the file over, report. Detection and resolution take a kind. Nothing changes for what already worked. file.save_mesh keeps its slicer parameter, now through the same function, with its export arguments and result unchanged: a cold PrusaSlicer 3 is started and waited for before the file goes, and it accepts the program path of a detected slicer as file.slicers lists it (file.slicers gives it as program). A path is accepted only when it is the program of exactly one detected target, and that target's own command and arguments run; a launcher several entries share, such as /usr/bin/flatpak, is refused as ambiguous, and any path nobody listed or chose is refused. The parameter and the code say it may be deprecated later in favour of file.send_to_slicer or a Send to App workflow, which is a possibility and not a plan. Tests go through file.save_mesh itself for the two reported failures, a listed AppImage path and a cold PrusaSlicer 3 that is waited for, with the slicers and the busctl made up; and they check that the result and the file are what an export without a slicer gives, and that a path that is not listed, or is shared by two entries, writes nothing. The pipeline has its own tests: a cold launcher waited for, one already up, wait return, and one that never comes up. A test of save_mesh that shared a file name with another is given its own. * Keep an AppImage's id through an upgrade (#2595) When a slicer has several installs, each gets an id made from where it was found. For an AppImage that was its file name, which carries the version, so upgrading it changed the id and the remembered choice missed. The id is now made of the slicer's id, the fact that it is an AppImage and a short hash of its folder, so a new version that replaces the old one in the same folder keeps the id, and the same AppImage in another folder is its own install. Two versions kept side by side in one folder are two installs: while both are there, their file names are added to their ids to tell them apart. A remembered id is found again only when it names exactly one install. An id that was one AppImage and is now two versions, or a plain id that is now several installs, is treated as not remembered, so the picker starts from the first entry as on a first run and does not quietly pick another install; a single install left of the same slicer is still found, as before. Installs that are not AppImages are told apart as before. An id from before this change no longer matches. Tests cover an upgrade, two versions side by side, a second folder, and the picker's side of each case. * Add Open with EasyPrint to Send to Slicer EasyPrint is Printables' slicer in the browser. It's a plain text row in the Send to Slicer dialog, backed by a new file.open_in_easyprint command. The command exports the bodies as a 3MF (or STL), hands them to the host to upload to slicer.printables.com/import, and the app opens the link that comes back. The desktop app uploads with ureq and the browser build with fetch, so this is the one send target that works on the web. The model leaves the machine, so the command refuses without consent: true, the dialog asks once and remembers, and an AI agent's request asks first. A model over 100 MB is refused before anything is sent, and a failed upload shows as an error with the reason. The chat's privacy note said SolidCraft sends nothing anywhere, which isn't true any more, so it now says that about the chat. New strings are in every catalog. * Place Send to Slicer on the Insert Files panel |
||
|
|
739e442824 |
Links: ask before following a design's network paths (#7372)
A path a design names (a linked design, a sketch text's font file) now goes through one rule before any file call: a network location is reached only once its server is allowed, a device path never. Update Links and Open Linked Design ask first (Allow once / Always allow this server / Cancel); Preferences > Design lists the allowed servers and can allow every network location. component.links reports such a link's found as unknown with a reason, without looking for it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
64ba396c05 |
Part properties: one table of keys (#4784) (#4786)
* claim: #4784 * Part properties: one table of keys, each with its scope, check and label (#4784) SolidCraft's part-property keys (project, part number, revision, author, organization, description, licence) were declared once but listed again by hand in each command, error, dialog and window. They are now one table, metadata::KEYS: each row has the key, where it may be set (Scope: the design, a component or both), how its value is checked and the message id of its label. A new key is one row. Metadata::set is told whose metadata it changes (Owner::Design or Owner::Component), and a key is taken where its scope covers that owner. is_well_known, both set commands, document.metadata, component.metadata, the refusals, the Design Properties dialog and the Bill of Materials window read the table; the hand-written lists are gone (WELL_KNOWN, the label match whose fallback named any unknown key "License", the window's three labels). metadata::BOM_KEYS names, in column order, the keys a bill of materials lists for each part: component.metadata returns them, component.metadata.set takes each as a parameter of its own and the window edits them; a test keeps each one a row of the table that a component takes. Free properties use the keys' text rule (metadata::check_text) instead of a copy of it. The params docs point to document.metadata's properties instead of repeating the keys. Every key accepted before still is, on the design and on a component. Two things change: - a refused key or a full metadata on a component says "part property" ("`bogus` is not a part property: …", "part properties are limited to …"), not "design property"; - changing the design's own properties no longer evaluates the model. The fields that change no geometry are named once, Document::with_part_properties_of: the design's metadata, and each component's metadata and free properties. It compares them first and copies the design only when one differs, as before. The shortcut is for a session's own edits only. A command that gives the session another design (doc.open, file.new, doc.recover: through Session::replace_design, which now counts them) is refreshed in full, however little the new design differs from the one before, so its joints are solved and its occurrence state pruned. Before, opening a design that differed from the open one only in render settings or component properties skipped that; with the design's properties in the list it would have for two revisions of one part too. Tests: the table (one row per key, the dialog's order); the bill of materials' keys (rows a component takes, in column order); each scope on each owner, and refusals that name the owner (the empty key, an unknown key, a 256-byte key shown cut); the text check at 4096 bytes, line breaks, tabs and control characters; hostile keys and values refused without a change; only-part-property changes in each scope, and changes beside them (units, a component's name, an added, removed or swapped component); document.metadata.set, remove, undo and redo evaluate nothing; opening a revision that differs only in its author solves its joint; the component wording, the shortcuts and the limits; the dialog's and the window's labels from the table. What the tests can't reach: every row is Scope::Both, so a known key refused for its owner (the wrong-owner branch of check) can't happen yet. It becomes live with the first single-scope row, bom_type, a component-only key. Left for later (not this topic): - Metadata::others() ignores scope, so a component-only key stored on the design would be neither a dialog field nor listed under other tools' data. It matters from the first single-scope key (bom_type). - assembly.bom's rows, its CSV columns and the window's grid headers still name the three keys by hand; the bill of materials module's rewrite will read BOM_KEYS. - The bill of materials types (P1, #5107, into drawings) still use WELL_KNOWN and the two-argument set: once this is on main, bom_type is rebuilt on it as one KEYS row with Scope::Component, set through Owner::Component. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2863b80574 |
Sketch: 3D arc command (#5681) (#5682)
* claim: #5681 * sketch: exact circular arcs on drawn 3D wires (#5681) Add WireArc (centre, unit normal, radius, start/end) as an optional analytic form on drawn 3D sketch wires, with arc_from_3_points, arc_sweep and sagitta-bounded arc_polyline; add_drawn_arc_in stores the arc, its three defining fit points and its samples; move_drawn_point re-derives the arc atomically and refuses collinear points; validate_wires checks saved arcs. * engine,ui: sketch.arc3d exact 3D arc command (#5681) sketch.arc3d draws an exact circular arc through three world points in a 3D sketch, stored analytically beside its fit points and samples; sketch.move3d rebuilds it, sketch.inspect reports centre/radius/sweep; placement mapping (map_wire, now shared with the engine's world state) transforms the arc. One pending design-format file records the new field. The viewport's 3-Point Arc tool draws a 3D arc when clicked off the sketch plane, with a live arc preview; the SKETCH panel offers sketch.arc3d. * ui,engine: 3D Arc button starts an interactive tool (#5681) sketch.arc3d now maps to a Draw(3) tool handled by sketch3d: three world clicks (start, end, through - same order as the 2D arc tool) run the command, with the live arc preview and snapping. The command is only enabled while a 3D sketch is open, so the toolbar never offers a tool that could only fail. Locale labels for the command. * ui: cargo fmt --------- Co-authored-by: RayGalt <RayGalt@pm.me> |
||
|
|
13cd45d1f1 |
Apply complete feature transactions off the window thread (#3133) (#3135)
* claim: #3133 * Apply complete feature transactions off the window thread Evaluate dependent history and prepare reference and GPU display caches before accepting a guarded result. Preserve the evaluated original model for safe editor cancellation and journal only accepted commands. * fix(ui): preserve original marker across sketch-to-feature edits * test(ui): verify edit-sketch cleanup and guard Unix link fixture * test(ui): fix texture disposal and unreachable assertion in feature tests * fix(build): compile CLI link inspection only on Unix |
||
|
|
2755c9ccfb |
Pin auto-generated body names (#6402) (#6403)
* Pin auto-generated body names Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Fixed body counter Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Fixed formatting Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Altered test behaviour to reflect new pinned body names Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
4ab6d92952 |
Agent chip: the batch step and its command, centred above the navigation bar (#5748)
While an agent's batch computes off the window thread (#1989), the chip reads N/M · <command>. It is centred on the navigation bar, just above it, and moves up past any toast or panel it would cover. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
cd66495e14 |
Preserve plastic rules and hidden bodies through renames (#4421) (#4425)
* claim: #4421 * Fix body metadata and visibility across renames (#4421) |
||
|
|
19c8eb846e |
Crash reports: keep journaling through file.new and doc.open (#6550) (#6551)
* claim: #6550 * Crash reports: keep journaling through file.new and doc.open (#6550) `Session::replace_design` swapped in the fresh session without its `crash_journal` flag, and the app turns it back on only at its next frame. So `file.new`/`doc.open` never recorded how they ended, the commands sent after them in the same frame (a control-channel or MCP batch) were not journaled, and a crash report then named `file.new` as the command in flight. `replace_design` now keeps the flag, like the other session-wide fields it keeps; only the design on screen has it set. Test: `commands_right_after_a_new_design_are_journaled` (crash_tests.rs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
e1ff3fa9c0 |
Batch: refuse a step that would fail at its turn before the first step runs (#5853) (#6781)
* claim: #5853 * Batch: refuse a step that would fail at its turn before the first step runs (#5853) engine.batch and the MCP batch tool checked only a batch's shape up front. A misspelled command id in a late step was found at its turn, after every earlier step had run, and then all of it was rolled back: a 160-step batch with a typo as its last step ran for a minute and changed nothing. solidcraft_engine::batch_preflight::check finds, before anything runs, the first step the batch would certainly refuse at its turn: a step without a command, an unknown command id (the error names the closest ids, as at the step's turn) or, with strict parameter checking, a call that breaks its command's typed contract. Anything that depends on the design is left to the step's turn. - engine.batch (control channel) checks against the app's registry and its session's level; view.pick, which the app answers itself, passes. - The MCP batch tool checks when the commands run in its own process (headless, with --param-check from the backend). A running app may be another version with other commands and checks the batch itself; its reply's not_run is passed on. - The refusal is the failing step's reply with completed 0, undone 0, not_run listing every step and a note. Tests that used an unknown command only to make a late step fail now use a step that fails at its turn (a bad extrude distance), so they still test rollback, timings and file.new as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FN5eEMrqWWXqi65FcK8GXq --------- Co-authored-by: sascha2101 <221609842+sascha2101@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d895fef354 |
Control channel: a pushed design.changed event for clients that subscribe (#6985) (#6986)
* claim: #6646 * Control channel: document.revision, a design revision and a document id (#6646) A program that follows the open design asks document.revision and exports only when the answer moves: document_id names the open design (kept through edits, saves and renames, another for each design started or opened, never shared between two tabs or two runs) and revision moves whenever the design, what is hidden or an uncaptured component position changes. It stays put on reads, selections and view changes, unlike the session's view revision. The revision is read lazily: the session remembers the design it last reported (held weakly, so Arc::make_mut can never change it in place and its address can't be reused) and takes a new number from one counter for the whole run when the design is another one. The control method answers at once, also while a slow command computes; engine.execute reaches the same command for scripts and MCP. * document.revision: hash the run's id prefix with the process's random keys A clock set before 1970 gave every run the prefix 0, so a restarted app could answer a new design with the id and revision of the old one. The docs no longer promise an answer at once: a screenshot waiting for an opened design to be meshed still holds the requests behind it. * document.revision: its label in the complete catalogs (ja, zh) * claim: #6985 * Control channel: control.subscribe and design.changed events (#6985) A connection that sends control.subscribe gets the active design's id and revision in the reply (as document.revision answers), then a {"event":"design.changed","params":{document_id, revision}} line whenever either changes, so a live link need not poll. The window publishes the design at the end of each frame's logic and drawing while a connection is subscribed (one atomic load otherwise). Each subscribed connection waits on that from a thread of its own and writes the latest after a 100 ms gap, so a burst of changes is one line. Replies and events share one lock per connection, each written whole (#6390). * control.subscribe: the reply before any event, a second one refused The events thread started before the subscribe reply was written, so a change right after the window's answer could reach the client before the reply that named the older revision. The subscription now starts holding the connection's line lock and writes the reply under it. A second control.subscribe on a subscribed connection is refused on the connection itself: its answer could arrive behind a newer event. When no thread or socket is left for the events, the reply says it did not subscribe instead of ok. * control.subscribe: a second one does not lose a finished late reply The already-subscribed answer came before the busy check, so a request that timed out and had finished since lost its reply: control.pending then said the app ended it without one. It now comes after the busy check and drops a finished late reply as every other request does. * control_server: declare the subscribe guard at the top of the loop Clear of the lines #6643 changes (its token check moves to where the declaration was). * control_server: the subscription's items beside serve Away from the lines next to send, where #6643 adds token_of. * control test: New on a blank design reuses its tab, so redo the box first --------- Co-authored-by: MateuszSychXpl <151755914+MateuszSychXpl@users.noreply.github.com> |
||
|
|
03bf992bc1 |
Keep linked components valid through Undo after Save As (#6860) (#6877)
* claim: #6860 * fix: preserve linked component targets across Save As history (#6860) |
||
|
|
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: |
||
|
+33 |
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 |
||
|
|
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> |