Compare commits

...

631 Commits

Author SHA1 Message Date
bherbruck afd81380ab Release 0.30.0 2026-11-01 21:55:18 -05:00
bherbruck 3125a79827 Release 0.30.0 (#10894)
Bump the workspace to 0.30.0 and fold the pending design format changes into format 47.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 21:55:11 -05:00
kaltenbrunnermarkus eb0cecee31 Web app: the offline check with the real app finishes its download (#10368) (#10370)
* claim: 10368

* Web offline test: each copy of a real build gets a file of its own (#10368)

With --site, the six builds were copies of one real build that differed
only in index.html. The overlapping-downloads step holds back the files
the next build lacks, so nothing of v5 was held: its download finished
before v6 launched, v6's worker then retired and deleted it (correctly,
no page used it), and the step waited 240 s to see it complete.

Successive deployments differ in more file names than that (Trunk names
files after their contents). Each copy now gets own-<build>.txt, like
the stand-in's build-named script, so v5's own file is held as the step
intends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 00:10:42 +00:00
semmelrinde 27951f40c3 Parameters: the Filter box also reads expressions (#9706) (#10385)
Typing a parameter's name now lists every parameter whose expression
uses it, and a value finds the parameter that holds it. The filter
still reads names, comments and groups, and a text parameter's text.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 00:10:09 +00:00
Homero Thompson 9e3cf05c4f fix(sketch): a line of another sketch projects from the Project dialog (#10390)
A straight line of another sketch, picked into the Project dialog, came
in as a named sketch curve, which the projection preselection did not
know: it refused with "select geometry or bodies that can be projected"
although the OK button was live. The same reference the external pick
stands for is now made for it, so the line projects (#10291).

Co-authored-by: vdirienzo <vdirienzo@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-11-02 00:10:01 +00:00
Homero Thompson 6459c9fcf0 A context error is not something to report (#10181) (#10594)
* wip: the diagnosis of #10181 (the bug reproduces on current main)

sketch.project has .enabled(in_sketch) (crates/engine/src/cmd/sketch_project.rs:24)
and in_sketch (crates/engine/src/cmd/mod.rs:285) answers 'no sketch is being edited'.
Pressing P outside a sketch goes keymap::press -> sketch_tool_for
(crates/ui-egui/src/keymap.rs:451-457) -> app.start("sketch.create") with
d.then_start = Some("sketch.project"): the sketch IS created, but the Project
dialog opens and the command is refused, so the dialog shows the red row and the
'Create Issue...' button, which opens the Report a bug form over the viewport.

The probe here reproduces the bug on the CURRENT main (two variants). It is a
diagnostic probe, not the regression test: it must be replaced before a PR.

* test: a context error offers no Create Issue button (#10181)

The Project panel showed the red row for a CONTEXT error ('sketch.project is not
available right now: no sketch is being edited') and offered the 'Create Issue...'
button, which opens the Report a bug form over the viewport. A context error is
not something to report, so the panel must not offer it.

RED: the test fails with the exact message of the issue.

* fix: a context error is not something to report (#10181)

The Project panel offered "Create Issue..." for the error the engine
raises when the command is not available in the current context
("`sketch.project` is not available right now: no sketch is being
edited (Create Sketch or Edit Sketch first)"). That refusal is guidance
about the context, not a failure of the design, so there is nothing to
report: ending the sketch under an open Project panel should not invite
the user to file a bug.

error_rows already spared the missing-pick errors ("select ...", "pick
...") the same way. It now spares the context refusals too, using the
engine's own kind rather than the message text: CommandSpec gains
disabled_refusal, which is the engine's own Disabled refusal for the
command in the current session, and the UI matches the dialog's error
against it. A real failure of the command (an invalid face, say) still
shows the red row with "Create Issue...".

* style: rustfmt the test of #10181

The formatter joins the two asserts of the test onto one line (the
repository sets max_width = 150 and use_small_heuristics = Max). The
tokens of the file are unchanged: the diff is the line breaks of the
asserts and nothing else.
2026-11-02 00:09:40 +00:00
austin62jake 5e7f3651fb Angle fields: a decimal point typed into an angle stays (#10582) (#10631)
* Angle fields: a decimal point typed into an angle stays (#10582)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Angle fields: a decimal point typed into an angle stays (#10582)

Edit Canvas applies its Angle box at each keystroke and keeps the angle
in radians, so the box gets back a hair off the value it set; egui's
DragValue takes that for a change made elsewhere and rewrites the text
being typed, dropping a decimal point just typed (-3.7 became -37).
angle_field now hands the DragValue the value it set while the value it
is given is within 1e-9 of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 00:09:32 +00:00
Colin Faulkingham da586bc048 Fix viewport Unisolate after isolating a component (#9894) (#10635)
* claim: #9894

* Fix viewport recovery after component isolation
2026-11-02 00:09:23 +00:00
austin62jake 062a7b8288 Tangent Arc: a first click off a curve's end is refused at once, saying where to click (#10653) (#10655)
* Tangent Arc: a first click off a curve's end is refused at once, saying where to click (#10653)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tangent Arc: a first click off a curve's end is refused at once, saying where to click (#10653)

The Tangent Arc tool took any first click as its start; a click on a
line between its ends snaps to a place that is no point yet (on:l3:...,
mid:l1), and the second click then failed with "unknown sketch point"
naming that internal reference.

The tool now refuses such a first click at once, with its own hint as
the error, asking the command's rule (tangent_arc_starts_at, factored
out of arc_tangent: the picked point or one at the same place, and a
drawn curve leaving it). The command refuses a snapped start with its
existing message that start must be the end point of a line or arc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 00:09:17 +00:00
Colin Faulkingham 5bbfa5ea6c Sketch: preserve source geometry when deleting a pattern (#10651) (#10661)
* claim: #10651

* fix(sketch): preserve source geometry when deleting patterns
2026-11-02 00:09:10 +00:00
austin62jake 75c46dad7b Tests: the autosave scenario crashes once its autosave has landed (#10690) (#10694)
* Tests: the autosave scenario crashes once its autosave has landed (#10690)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tests: the autosave scenario crashes once its autosave has landed (#10690)

s25_autosave_recovery 'crashed' right after the extrude; under load the
autosave of it, written on a worker thread, had not landed, so the next
launch recovered the earlier autosave without the body (step 16).

The harness's crash restart now runs frames, bounded, until the active
autosave has caught up (Autosaver::caught_up: no write running and the
last autosave holds the design as it is). The app's own ticks still do
the writing, so an autosave that stopped writing still fails the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 00:09:03 +00:00
github-actions[bot] af54b09bb1 Regenerate generated files and fold pending files [skip ci] 2026-11-02 01:51:55 +00:00
github-actions[bot] dcbca523a0 Regenerate generated files and fold pending files [skip ci] 2026-11-02 01:42:49 +00:00
froglemonade2 e9b08f4af4 Control channel: report the dialog as data, the open tool windows, and what ui.start opened (#9087) (#10740)
* claim: #9087

* Control channel: report the dialog as data, the open windows, and what ui.start opened (#9087)

`ui.inspect.dialog` (and `ui.editFeature`'s reply) was the dialog's Rust Debug text, which
changed with every refactor and couldn't be parsed. It is now an object: the dialog's command,
title, the feature an edit rebuilds, its selection inputs, its error, and the commands OK runs
(or what it waits for). `hover` in `ui.inspect` and `ui.selection` is a selection-like item
instead of Debug text.

`ui.inspect` gains `windows`: the tool windows open beside the model (Parameters, Bill of
Materials, Design Properties, Sketch Report, material card review) by the command that opens
each, and the Help menu's (About, Updates, Shortcuts, Crash Reports, Report, Messages) by their
`ui.help` item. Before, an agent couldn't tell these windows were open.

`ui.start` and `ui.editFeature` reply with what they opened (tool, dialog, windows), the status
line, and `pending` when the start waits for the history and opens on a later frame.

Scenario `dialog` checks match words of the dialog's state from the app directly, so the
scenario files are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 00:08:48 +00:00
Dahak Builds 6a7275a5af Agent chat: copy an entire sent prompt or assistant message (#10675) (#10741)
* claim: #10675

* agent chat: Copy message on each sent prompt and assistant text block (#10675)

A visible Copy message button on each copyable transcript message and a
right-click menu with the same action. Assistant replies copy their
original Markdown, prompts copy the text as entered; picture-only prompts
and thoughts get no action. Hover-only message areas keep partial text
selection working.

* agent chat: complete Copy message locales and tests (#10675)

* agent chat: route the message copy menu through ui_kit::Container (ui-containers gate)

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-11-02 00:08:41 +00:00
PapaEcho 666356dba0 Assistant: configurable show/hide shortcut (#10764) (#10767)
* claim: #10764

* Assistant: make show/hide shortcut configurable (#10764)
2026-11-02 00:08:23 +00:00
austin62jake 3fe2b3386f Sketch: Remove Spline Point takes one point out of a spline (#10783) (#10793)
* Sketch: Remove Spline Point takes one fit point out of a spline (#10783)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: Remove Spline Point takes one point out of a spline (#10783)

sketch.spline.remove_point takes one fit or control point out of a
spline. The spline keeps its id and runs through its other points, which
stay where they are. The point goes with the constraints on it, unless
another curve uses it. A closed spline's closing point, an end joined to
other geometry, the last 2 points (3 when closed), and projected, offset
or patterned splines are refused with a message.

The right-click menu of a spline point, picked alone, offers it beside
Reverse Spline Direction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 00:08:11 +00:00
Colin Faulkingham afe06a1a3d Edit Joint: show components for point and frame origins (#7749) (#10838)
* claim: #7749

* fix(ui): show components for point and frame joint origins
2026-11-02 00:07:29 +00:00
Colin Faulkingham eaf34d2528 Construction planes: refuse duplicate feature names (#10707) (#10743)
* claim: #10707

* Fix construction plane name collisions (#10707)
2026-11-02 00:06:59 +00:00
Dahak Builds 2b9261050f Sketch: stop tying expression-placed points to the origin with an automatic Coincident (#10703) (#10722)
* claim: #10703

* Sketch: do not tie expression-placed points to the origin with an automatic Coincident

A point whose coordinates are parameter expressions follows those
expressions. When they came to 0 at draw time the point landed on the
origin and connect_points tied it there with a Coincident, exactly like
a snapped click; the next parameter change then conflicted with the tie.
connect_points now skips points that carry exprs; plain-number points
keep the snap.

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-11-02 00:06:51 +00:00
semmelrinde eac1425661 Hole: a face name shared by two bodies is no split face (#10699) (#10872)
* Face names: one name on two bodies is no split face (#10699)

A hole placed on the top of one of two bodies an extrude made, or on a
piece of a split body, warned "face `F2:top` was split; using the piece
nearest the picked point": the face name is on both bodies, and any
name found more than once counted as split. A name on several bodies,
one face on each, now finds the face the point lies on without the
note; pieces on one body, or a point on none of them, still say split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Hole: look for a face name shared by two bodies on the body the point is on (#10699)

The lookup over every body counts a name on several bodies as split on
purpose (a copy's face is not a piece of the source's, see
`the_same_face_on_a_copy_is_not_a_piece_of_the_named_bodys_face`), so
the first change, which made it unique there, is undone. A hole whose
face name is found split while its point lies on one of those faces now
looks again on that body alone: one face of the name there is the face,
whole; pieces on that body still say split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 00:06:43 +00:00
github-actions[bot] 88dbda42a7 Regenerate generated files and fold pending files [skip ci] 2026-11-02 00:31:13 +00:00
Homero Thompson 9e30ff5878 fix(#5505): a zero length dimension keeps constraining the sketch (#10790)
The residual of a length dimension is the magnitude of the distance between
the line's two ends. At zero the magnitude has no derivative, so the rank
analysis read the constraint as if it were not there and the sketch reported
a degree of freedom that was not there.

At zero the two ends of the line meet, so the residual says it with the
vector between them, the way a coincidence does. That is the treatment a
distance of zero already gets (upstream #4397); the length family was left
out of it.

Regression test: crates/sketch/src/tests.rs, zero_length_keeps_the_line_constrained.

Co-authored-by: Homero Thompson <homero@local>
2026-11-02 00:05:09 +00:00
thocsmith 4c4c768d57 Cancel button on the Computing toast (#8266) (#10366)
* claim: #8266

* Computing toast: a Cancel that gives up on the move (#8266)

The Computing toast for a history command (marker move, undo, redo,
suppress, reorder) or a delete's check computing off the window thread now
has a Cancel button. It drops the job and the commands queued behind it;
the design stays as it was, since a deferred command only runs for real
once its evaluation is in. A feature edit applying keeps its dialog's own
Cancel, so its toast shows none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: thocsmith <193096300+thocsmith@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 00:04:53 +00:00
Dahak Builds 83fe1f874f Sketch Project: keep hidden origin planes hidden in Project (#10778) (#10834)
* claim: #10778

* Sketch Project: keep hidden origin planes hidden (#10778)

WIP from dead worker: fix + test written, gates not yet run.

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-11-02 00:04:45 +00:00
Colin Faulkingham 0734616104 View cube: follow the selected projection (#10634) (#10640)
* claim: #10634

* Make navigation cube follow viewport projection (#10634)
2026-11-02 00:04:43 +00:00
Dahak Builds d68d86dae9 Dialog form cards widen their label column for the current language (#10620) (#10646)
* claim: #10620

* widen dialog form-card label columns to the measured label width (#10620)

* fix compile of the grow tests

* grow the card only past the label cap and tag the form scope in place (#10620)

* keep scope_grow crate-internal so the gallery scan stays element-only (#10620)

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-11-02 00:04:41 +00:00
rugbymauri 7d86a8cfd3 Sketch: dragging a constrained centre point of a centre rectangle moves it, not resizes it (#10510) (#10535)
* claim: #10510

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

* Sketch: dragging a centre rectangle's constrained centre point keeps the rectangle's size

A centre rectangle's centre sits on the middle of its diagonal, and a
press there picked the diagonal's midpoint before the centre point. The
drag then took the diagonal by its middle: with the centre free the
rectangle moved along, but with the centre held (on the origin, on a
line) the diagonal turned and stretched about it, and the rectangle
grew or shrank with the pointer, many times its size.

A drag that starts on a line's middle where a point is held by a
Midpoint constraint now drags that point, as a drag that starts on the
point does. A centre held on the origin stays there and the rectangle
keeps its size; a centre on a line slides the whole rectangle along it;
a free centre still moves the rectangle. Clicking the middle still
selects the line's midpoint for constraints.

Fixes #10510

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

---------

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
2026-11-02 00:04:38 +00:00
semmelrinde cea07cbc66 Sketch Slice: cut at the sketch plane while a Section Analysis is on (#10705) (#10768)
With a section on, Slice in the Sketch Palette lit up but the model was
still cut only by the section: the viewport took the sketch's plane only
when there was no section. Slice now takes it whenever it is on in the
sketch being edited; the section comes back when Slice is turned off or
the sketch closes. A slice is hatched as it is without a section.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 00:02:59 +00:00
Colin Faulkingham 0b90731096 Dialogs: readable sketch selection labels (#10752) (#10770)
* claim: #10752

* Fix readable sketch selection labels in dialogs (#10752)
2026-11-02 00:02:37 +00:00
SilentWolf75 afa4f72f7d Insert SVG: say why a sketch is too large (#10874) (#10880)
* claim: #10874

Co-authored-by: Cursor <cursoragent@cursor.com>

* Insert drawing: name the sketch size cap when a file is too dense (#10874)

A large SVG/DXF failed with opaque \"sketch is too large\". Say the 20000 point/curve limit and that scale alone does not reduce entity count, and refuse dense drawings before adding them.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-01 23:37:55 +00:00
Sebastian Höpfl cfc46448a8 Joints: an edge origin shares the joint faces' measurement (#10866)
`face_of` called `Body::faces`, which tessellates the whole body, on every
solve. Face origins went through the cached `ModelBody::joint_faces`, at
the same tolerance, but edge origins never did, so one edge origin on a
large body cost a drag or a Drive Joints step far more than the solve.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 22:51:42 +00:00
github-actions[bot] 58c64ca4d4 Regenerate generated files and fold pending files [skip ci] 2026-11-01 22:29:27 +00:00
Nathan Dane 5c7e50cb67 Preferences redesign 2/11: shared widgets and painters in ui_kit (#9874) (#9890)
* claim: #9874

* Add shared Preferences cards, figure painters and gallery entries to ui_kit

* Preferences: Arabic, Hebrew and Vietnamese carousel labels

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Use the app's selection colours in the Preferences cards

* Measure Preferences figure inks and use shared palette metrics

---------

Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 21:58:35 +00:00
Colin Faulkingham b6aabb88ff Insert Design: place reused links from their parent origin (#10813) (#10825)
* claim: #10813

* fix: place reused linked designs from parent origin (#10813)
2026-11-01 21:47:53 +00:00
DuBearte a1dc849e8d Sketch Fillet and Chamfer: a refused size's error goes once the size fits (#9316) (#9469)
A corner dialog copied the preview's error into its own, where nothing
cleared it when the preview recovered. The dialog already shows the
preview's error, so the copy is gone.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 21:25:21 +00:00
Kushagra Kumar 446590dca1 fix(engine): report design variant in timeline.inspect and accept in timeline.add (#10748) (#10792)
* fix(engine): report design variant in timeline.inspect and accept in timeline.add (#10748)

* ci: refresh checks to clear cancelled workflow run
2026-11-01 21:00:44 +00:00
CamWight 303236e524 Tests: io's byte mutator moves to a testkit crate, a dev-dependency only (#5184) (#7682)
* Tests: io's byte mutator moves to a testkit crate, a dev-dependency only (no behaviour change)

`solidcraft-testkit` (the Testkit class xtask/src/layers.rs reserves) holds the mutator and the
no-panic check unchanged: the same seeds, mutations, budget and doc comment. io's reader fuzz
tests use it as a dev-dependency and give the same case counts; the mutator's own test moves
with it. The co-editing wire's decoders will fuzz with it too (#5184, CE6).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Cargo.lock: testkit at the workspace version

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>
2026-11-01 20:28:58 +00:00
bherbruck 97336ccfe7 Kernel pause: pull requests are judged by the kernel directories they change (#10807)
A pull request outside crates/kernel, crates/geom and vendor/truck* is no longer labelled for a
kernel word in its title. Issues and discussions keep the title check.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 20:19:41 +00:00
cronos e1d4cb433c Cover sketch line-arc fillets in both selection orders (#10242) 2026-11-01 20:19:16 +00:00
Thodoris Tsagkogeorgas 0ad74f2577 Revolve: keep the angle grab point when the sweep is zero (#9601) (#9602)
A revolve of 0° still builds no solid. The handle stays on the profile so the angle can be dragged back into range.
2026-11-01 20:18:27 +00:00
semmelrinde 835e261593 Coil: up and down arrows on the Revolutions field (#7481) (#7766)
* claim: #7481

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Coil: step arrows on the Revolutions field (#7481)

The Coil dialog drew Revolutions as a plain expression row, the one
count without the step arrows the pattern quantities have. It is now a
count row from 1 to 200 turns (the helix's limit); a fraction still
types in, and an arrow steps it to the next whole turn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 20:12:56 +00:00
github-actions[bot] 84c3b6356c Regenerate generated files and fold pending files [skip ci] 2026-11-01 20:42:12 +00:00
github-actions[bot] d730a273dc Regenerate generated files and fold pending files [skip ci] 2026-11-01 20:33:03 +00:00
semmelrinde 89cb651084 Warnings: quote a long generated name by its start and end (#8673)
A chamfer's warning quoted the full generated names of fourteen split edges,
122,701 characters (#8541). Names over about 80 characters are now quoted by
their first 48 and last 24 characters.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 20:12:42 +00:00
Kai Evans 9efcb461f8 Feature edits: OK computes off the window thread in a dialog without a live preview too (#7388)
Offset Plane and a cosmetic Thread have no live preview, so their edits' OK ran on the window
thread and recomputed every later feature there. Any edit now goes through the off-thread
transaction. The editor's pinned original is used only while the dialog previews, as
open_feature_edit keeps it: a Thread switched from Modeled to cosmetic edits the design as it is,
so a body hidden meanwhile doesn't refuse it as a changed design.
2026-11-01 20:11:05 +00:00
Daniel 958ab867cd Press Pull on a chamfer or fillet face edits it where you clicked (#4986) (#9771)
* claim: #4986

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Press Pull on a chamfer's face changes the chamfer's distance (#4986)

A chamfer's face is flat, so solid.press_pull and the Press Pull start
path in the UI took it for a planar face and extruded it. Both now look
for a fillet's or chamfer's face before asking whether the face is
planar, so a chamfer's face reopens the chamfer and its distance grows
by the distance pulled, as a fillet's radius already does. A first pick
with Press Pull already open is routed the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Press Pull on a blend face puts the arrow on the edge clicked

A fillet or chamfer reopened by Press Pull from one of its faces drew
its radius or distance arrow on the feature's first stored edge, which
can be a corner the user did not click and cannot see (the Sample
Plate's fillet, from the far corner). The click's point now goes with
the reopened dialog as a hint that is never saved, and the arrow sits
on the feature's edge nearest it, at the point on that edge nearest the
click. Opened any other way (the history, Edit Feature) the arrow stays
on the first edge as before.

A click point that is not finite is not kept, and a point on a flat face next to a chamfer still extrudes that face (tested).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 20:11:00 +00:00
Jesper We cffa6e1580 Loft and Surface Loft: two sections from one sketch (#8221) (#8222)
* claim: #8221

* Loft and Surface Loft: two sections from one sketch (#8221)
2026-11-01 20:10:13 +00:00
semmelrinde ce296a1ad5 Extrude preview: a round face sweeps round walls, with lines up its corners only (#8838)
The live preview of extruding a picked face built its walls from the
face's display triangles and drew a line up the wall at every boundary
point, each wall piece shaded flat. A round face (the Bolted Flange's
flange) looked like a polygon while extruding. Lines now go up only
where an edge of the face ends and the outline turns there more than
its curves do, and a wall's normal turns with it between smooth pieces.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 20:09:21 +00:00
semmelrinde 0515dee9ce Colour popover: a held step button keeps stepping, and R, G and B have tooltips (#10201) (#10203)
* Colour popover: a held step button keeps stepping, and R, G and B have tooltips (#10201)

The step buttons beside each colour number sensed clicks only. egui
stops counting a press as a possible click once it outlasts its longest
click (0.8 s), so the held button stopped repeating after 8 steps. They
now sense drags too, which keeps a long press down on the button until
it is let go.

R, G and B now carry tooltips (Red, Green, Blue) as H, S and V already
did: a single letter doesn't name the colour in every language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Colour popover: the R, G and B tooltips in Vietnamese too, a complete catalog (#10201)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 20:08:43 +00:00
Vvynot 0478f7e401 Hole: reference Distance shows the document precision (#10693) (#10777)
* Hole: reference Distance shows the document precision (#10693)

A measured reference distance showed the raw float (10.000000868569572 mm).
The field now reads at the document's length precision while Refs keeps the
measured value for the model, so OK still sends what was measured.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Hole: restored literals use the document precision (#10693)

Round every literal reference distance on Edit Feature, including comma
decimals and exact whole values; expressions stay as written.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-01 20:05:49 +00:00
Rec0iL 52f0b52b45 Agent chat: a searchable model picker with a custom entry, listed from every provider, and OpenClaw and OpenRouter presets (#2582) (#10255)
* ui_kit: search_picker, a filtered dropdown with a custom entry

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Agent chat: endpoints list their models with names, say when listing fails, and OpenClaw and OpenRouter presets (#2582)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Agent chat: a typed model goes to endpoints and to agents that offer a model option

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Agent chat: the header's model pickers search and take a custom model

The popup can't grow once it is open, so search_picker now fixes the height of what changes below
its box when it opens: the custom row or a late list could otherwise end up out of reach.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* AI preferences: pick an endpoint's model when adding it and on its card (#2582)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Agent chat: model picker rows read from the left, and a refused typed model says which

From running it: list_picker centres its text, which reads badly for a long list of ids, and an
agent's own refusal can say no more than "Internal error". The search box also asks for a repaint
while it waits for the focus, so an idle window does not stop short of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Agent chat: docs for the model picker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Agent chat: an endpoint's answer that is no model list says so, an empty list too, and editing lists with the kept key

A 200 without a `data` array (a web page where the endpoint should be, as OpenClaw's gateway
serves until its chat endpoint is enabled) was cached as a successful, empty listing, so the
picker stayed blank with nothing to say and never asked again. Now it is an error with its own
note, an empty list says so, and both are asked for again the next time.

The Edit dialog lists its endpoint's models when it opens, with the kept key read from the
keychain on the listing's thread, as the card does; the key stays out of the field.

The method-not-found test expects the refusal notice that names the model, as every refused
model gets since this branch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Agent chat: models from several providers fold under their providers inside the picker

As Chemiseblanc does in #10187: with two or more groups, `search_picker` draws each group as a
header with a chevron, the name and how many of its choices are listed, and a click folds or opens
it. Before anything is typed only the current value's group (and the one the caller asks for) is
open; a group with a match opens once something is typed; a fold made by hand stays until the popup
closes. Enter takes the first row shown, so never one folded away. A lone group keeps its plain
heading.

The header's model picker feeds its providers in as groups, so the separate provider drop-down
goes; the control channel's `provider` now says which group opens first. A header click gives the
focus back to the search box, so typing goes on filtering.

The dialog's listing test checks what kind of listing it got rather than translated words, which
the listing thread may render in another language than the test's.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Agent chat: rustfmt the provider groups

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Agent chat: an endpoint's models named `Vendor: Model` fold under their vendors

OpenRouter lists `openai/gpt-6.1-terra` as "OpenAI: GPT-6.1 Terra". A listing whose ids read
`vendor/model` and whose names read `Vendor: Model` now names its providers, so the picker folds
it under its vendors like a multi-provider agent; the rows read the model's name, and the id stays
in the tooltip and in the search. An agent's own `Provider: …` word still comes first. One vendor
is one flat list, as before.

The Add dialog's picker has no current model to prefer, so with nothing to prefer every group
starts open; folding is a click away.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 20:01:26 +00:00
ABDULLAH 1ae93218a7 Arabic: outline term in the cut preview tint help (#10801) 2026-11-01 19:50:21 +00:00
P'tite Tête 3017641b41 fix: Projection d'une silhouette à congés coniques fermée en un profil (#10773)
- snap_tangent_arcs : chaque extrémité d'arc prend la ligne la plus proche
- une ligne ne prend qu'une extrémité d'un arc ; l'autre passe à sa ligne suivante
- une ligne plus loin sur le contour est ignorée quand l'extrémité touche déjà une autre pièce
- tests : 4 unitaires (project_order.rs) et the_silhouette_of_conic_rounds_closes

Co-authored-by: P'tite Tête <asso@ptitetete.com>
2026-11-01 19:41:32 +00:00
github-actions[bot] 17b9a8e67f Regenerate generated files and fold pending files [skip ci] 2026-11-01 19:55:56 +00:00
github-actions[bot] 90c09eaaf9 Regenerate generated files and fold pending files [skip ci] 2026-11-01 19:48:16 +00:00
Dahak Builds 251573a5a4 MCP: compare the model with a reference picture (#1486) (#6416)
* claim: #1486

* Compare picture: overlap and edge offsets of the model against a reference picture (#1486)

inspect.compare_picture lays the model's silhouette over the part found in a
PNG or JPEG and slides it to the best overlap: overlap (0..1), the model's
edges against the picture's in mm at nine stations, and an overlay PNG. The
MCP tool compare_picture runs it and hands the overlay back as an image block.

inspect.silhouette grows a reusable silhouette::outline for the model side.

* chore: re-trigger checks (defaults line already present in PR body)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* i18n: carry the Compare Picture label in Arabic, Hebrew and Vietnamese too

The complete-catalog guard (every_complete_catalog_carries_every_english_message)
failed because the pending file covered only en/ja/zh; ar, he and vi are
complete catalogs and need the key as well.

* Compare picture: one uniform scale, capped fit, sturdier part finding

Review on #6416: fit no longer stretches the axes apart (width is the default,
both scales uniformly by width and reports aspect_mismatch); the fitted model
takes the same MAX_GRID cap as the picture; the border flood seeds only from
border pixels near the border's main colour, reads alpha, retries at a
stricter step, and says which case failed; the slide searches the whole
placement range instead of a tenth around the centre; the model's holes get
the picture's fill rule; crop becomes crop_px / crop_fraction with explicit
units. Pins #1486's bracket (overlap 0.865, bottom -10 mm at the upright) and
adds a regression test per problem.

* Compare picture: alpha only for a see-through border, part_fills_crop, outline-only wording

Review re-test on #6416: one translucent backdrop pixel no longer switches the read to
alpha — alpha decides only when most of the border is see-through, and any ink is then
part, so a part drawn at alpha 100 survives; part_fills_crop: true takes the crop box as
the part itself, for one view cropped tight off a board where the part takes most of the
border and the flood would keep the backdrop strip instead; a third backdrop pass compares
each pixel to the border's main colour, so a white part on (245, 245, 245) JPEG at quality
75 separates; the command, tool and docs descriptions now say the compare is outline only:
holes are not compared. A banded light backdrop stays a follow-up. A test per case.

* MCP compare: format the picture tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
2026-11-01 18:30:18 +00:00
Nathan Dane bdce595fb3 Render results: retained renders, Live and render compare, render all shots (#6281) (#7375)
* Render results: keep up to eight completed renders and select or discard them

* Render results: Live and render compare with a divider, and render all shots

* fix: use comparison theme tint and reveal reset test targets

* fix: restore Unicode expectations in render workspace tests
2026-11-01 18:30:11 +00:00
semmelrinde 862807ffc9 Lost GPU: the per-frame probe meets a D3D12 device reset before the first upload does (#6528) (#7767)
* claim: #6528

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Lost GPU: the per-frame probe opens a command list, as the upload would (#6528)

On a reset D3D12 device the empty submission before a frame's uploads
went through (it only signals a fence), and the first queue write then
panicked inside wgpu-core (PendingWrites::activate unwrapping Lost).
The probe now submits a command buffer with a debug marker: finishing it
makes the same begin_encoding call, through a path where wgpu loses the
device and runs its lost callback instead of panicking. The picture
capturer's probe does the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:20:40 +00:00
github-actions[bot] 6f368a5b77 Regenerate generated files and fold pending files [skip ci] 2026-11-01 19:01:13 +00:00
rbousigues88 a0ed5a9923 Measure: a fillet's torus or a sphere reports its radius (#7159) (#7160)
* claim: #7159

* Measure: a fillet's torus or a sphere reports its radius (#7159)

The face of a fillet round a circular edge is a torus and a ball's face a sphere, which
Measure listed by area only. Their face item now carries radius, diameter and surface
(and the ring radius of a torus); they stay out of Shape, so distances are unchanged.

Fixes #7159.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 18:03:17 +00:00
N3MI-DG 38ae728538 Preview: new surface is tinted whatever its size, and the tints can be turned off (#9111) (#9112)
* claim: #9111

* Preview: new surface is tinted whatever its size, and the tints can be turned off (#9111)

A preview decided which faces of a changed body were new surface by asking
whether their triangle centroids lay on the old body, within a tolerance that
follows the part's size. A round or chamfer small beside the part never leaves
that tolerance, so it was drawn as if it had always been there, and sampling at
a fixed step told alike faces apart by nothing but how many triangles they had.

The kernel already records which faces an operation generated, so `build` takes
that record alongside the geometric test. The test stays because a body carries
the history of whatever last made it, which is not the previewed operation when
a parameter change re-evaluates the design: the record only ever adds faces to
the answer. The vote itself now asks about every centroid of a small face,
spreads a large face's samples without a resonant step, and calls a face new
above an eighth of its samples, which a blend tangent on both of its sides
reaches with the one row of facets in five that is clearly off the old surface.

Graphics gains two settings, both on as they come, so nothing changes out of
the box: Tint new surface in a preview draws a changed body as itself when it
is off, working out no face at all, and Show removed material in red leaves the
see-through cut and the ghost of the shape a feature replaces fully
transparent, drawing only their outlines.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-11-01 18:02:57 +00:00
github-actions[bot] 147d1cfadd Regenerate generated files and fold pending files [skip ci] 2026-11-01 18:35:09 +00:00
github-actions[bot] d135e1659c Regenerate generated files and fold pending files [skip ci] 2026-11-01 18:26:58 +00:00
froglemonade2 3ccf04d4b2 Edit Extrude: close on the first Escape (#9084) (#9757)
* claim: #9084

* Edit Extrude: close on the first Escape (#9084)

An edit dialog whose value names a parameter (`T` in Edit Extrude) opened with
that field focused and its completion list showing the longer names (`tan(`),
unarmed. The list took the first Escape, so the dialog needed two.

An unarmed list now leaves Escape to the window until the box is typed in, as
it already leaves Enter and Tab; once typed in, Escape dismisses the list first
as before. Its hint drops "Esc dismiss" in that state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:02:39 +00:00
N3MI-DG 2014e60ae6 Sketch Offset: an Instances count stacks offsets one behind another (#9827) (#9828)
* claim: #9827

* Sketch Offset: an Instances count stacks offsets one behind another (#9827)

Offset made one offset at a time, so a set of evenly spaced outlines meant
running it again on the curves it had just made, once per ring: a separate undo
step and a separate driving dimension each time.

`sketch.offset` now takes `instances`, a whole number or a unitless expression
from 1 to 100 (1, today's behaviour, by default). The per-group work the command
did inline becomes `offset_rung`, and `offset_ladder` runs it once per instance,
each rung offsetting the one before it the same distance again, so instance n
stands n distances from the curves picked. Every rung of a side is driven by
that side's own dimension, so editing it moves the whole set and keeps the
spacing even, and each side of a Two Sides or Symmetric offset grows its own
ladder. A rung the shape has no room for refuses the whole command and names
which instance it was.

A later rung reads its side from the geometry, through the rung's own
normal-distance annotation, rather than from the distance's sign: an output's
stored ends need not run the way the chain through them is walked, and a
reversed walk reads the same sign as the other side. A circle is the exception
and keeps the sign, because it offsets concentrically with no chain to walk, and
a step past a ring smaller than the distance lands beyond the centre, where the
circle's "outside the current radius" side test reads as the outward side: an
inward ladder turned round and grew again (1, 4, 1, 4 mm) instead of running out
of room.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Sketch Offset: the Instances row in the offset window (#9827)

The offset window gets an Instances row under Distance: a whole number with step
arrows, 1 by default, so the count can be walked up a ring at a time and the
preview follows each step. The count is not kept in the design, as Mirror's and
Scale's values are not, so the window sends the number it evaluates to rather
than the text.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* UI kit: a count's step arrows are not text (#9827)

The arrows stand inside the editor, which asks for the text cursor across its
whole rect, so hovering one showed an I-beam and the arrows read as part of the
number. They take the ordinary cursor back after it, and the pointer is read
from the arrow's rect rather than from the hover the editor underneath competes
for, which keeps the hover highlight in step with it.

The pattern Quantity rows share this field and had the same thing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Sketch Offset: Instances label in the complete catalogs and the other shipped languages

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch Offset Instances: translations for the complete catalogs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
2026-11-01 18:02:32 +00:00
Nathan Dane c454c05f88 Preferences redesign 1/11: design reference in docs (#9873) (#9889)
* claim: #9873

* Add the Preferences design reference: pages, figures, measurements, tokens

* Fix the selection look in the design reference to match the app
2026-11-01 18:02:24 +00:00
merik 1cc90036fb File: a command for each export format, so each can have a key (#10176) (#10177)
File › Export STEP…, STL…, 3MF…, OBJ… and URDF… were UI actions around
the shared file.export, so Keyboard Shortcuts had no row for them.
file.export_step, _stl, _3mf, _obj and _urdf now do what those items do
when started from a key, command search or the menu (a save picker; Save
As Mesh for STL and 3MF), and take a path when called with JSON. The File
menu shows their keys. Each has a contract and a reply type
(schema/file.rs).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:02:16 +00:00
Dahak Builds 176c22acaa MCP: explain when an unknown command id is actually an MCP tool name (#10678) (#10680)
* claim: #10678

* MCP: explain when an unknown command id is actually an MCP tool name

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-11-01 15:36:04 +00:00
ABDULLAH 2ab5dedfc1 Arabic: pan term in the Creo navigation help (#10667) 2026-11-01 15:13:48 +00:00
Dahak Builds e77c55549f Sketch: a value box must not swallow a click on the reference line's endpoint (#10600) (#10639)
* claim: #10600

* Sketch: a value box must not swallow a click that lands on a sketch point (#10600)

The construction line tools' Length box waits beside the pointer. When the
pointer reaches the reference line's own endpoint it can land under that box
(the box is anchored to the tool hover, which freezes while the pointer rests
on the box), and the box's text edit takes the click, so the tool never sees
it. A release over the tool's own value box or construction/normal switch that
lands on a snapped sketch point now goes to the tool; a click on the box away
from any sketch point still edits the box.

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-11-01 13:31:14 +00:00
github-actions[bot] e7bb038795 Regenerate generated files and fold pending files [skip ci] 2026-11-01 13:27:53 +00:00
Marcel Karger a5a561caae Add Creo Parametric navigation preset (#3507) (#9322)
* claim: #3507

Co-authored-by: Codex <codex@openai.com>

* Add Creo Parametric navigation preset (#3507)

Add middle-button orbit, Shift+middle pan and Ctrl+middle vertical drag
zoom, with downward dragging zooming in. Keep the default navigation
preset and existing presets unchanged.

Refs #3507

Co-authored-by: Codex <codex@openai.com>

* Navigation: Creo preset needs the NX preset's reverse_drag_zoom field

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:57:15 +00:00
Dahak Builds 462de5b9d2 Fix extrude preview placement in placed components (#2103) (#10596)
* claim: #2103

* Pin #2103: extrude-cut preview placement on placed component occurrences

* Format #2103 regression tests

* Satisfy clippy lints in #2103 regression tests

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-11-01 12:46:17 +00:00
kaltenbrunnermarkus be425c6102 Assemblies: use lookup maps when building the world state (#10497)
* claim: Assemblies: use lookup maps when building the world state

* Assemblies: use lookup maps when building the world state

world_state_reusing, made again after every geometry command in a design
with components, filtered all bodies for every placement, searched the
timeline for every sketch and construction of a placed part, and searched
all bodies twice per tap and placement. It now builds the feature to
component map, the bodies of each component (in body order) and each
tap's component and body offset once per call. The result and its order
are unchanged.

On a 100-part assembly placed 5 times (800 sketches, 200 taps) one world
state drops from 124 ms to 9.5 ms (release, median).

A test-only counter of searches through all features or all bodies
checks that the work no longer grows with the sketches and taps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:39:41 +00:00
Colin Faulkingham bc4d35b097 Avoid rebuilding bodies when rename updates feature references (#6287) (#10588)
* claim: #6287

* fix: reuse body geometry when renaming references (#6287)
2026-11-01 12:15:47 +00:00
Colin Faulkingham 78c5b8de42 Fix fastener placement on transformed washers (#9648) (#10583)
* claim: #9648

* Fix fastener picks on transformed washers
2026-11-01 12:13:41 +00:00
kaltenbrunnermarkus 9738861d61 Sketch drag: the crash test cleans up its folder like its neighbours (#10602)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:13:19 +00:00
ABDULLAH 0cf4da606c Arabic: one term for parameters in the equation curve and text help and the joint move hint (#10604) 2026-11-01 12:09:56 +00:00
github-actions[bot] 074cc758ee Regenerate generated files and fold pending files [skip ci] 2026-11-01 12:12:00 +00:00
kaltenbrunnermarkus 47e8b96c2f Placement digests look up bodies by name once (#10492)
A join, cut or intersect without explicit targets reads where every body
of its component is placed. Its placement digest searched the model for
each of those bodies by name, then the timeline for its component and the
placements for that component's frame: O(B^2 + B*F) per feature, on every
evaluation, also when every feature comes from the cache.

The bodies, their components (Document::model_body_components) and each
component's frame are now looked up once per digest. The bodies are still
hashed in name order with the same values, so every digest stays the same
bit for bit and saved caches stay valid.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 11:45:22 +00:00
Dahak Builds 7b3d84fb33 Per-component History hiding (#10393) (#10578)
* claim: #10393

* Per-component History hiding: flag, commands, Browser menu, bar toggle (#10393)

* Carry the new History-hiding strings in the complete catalogs (#10393)

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-11-01 11:42:33 +00:00
github-actions[bot] 59a40aabc0 Regenerate generated files and fold pending files [skip ci] 2026-11-01 11:43:09 +00:00
kaltenbrunnermarkus b557f22f97 Sketch: a construction/normal switch in the construction line tools (#10258) (#10551)
* Sketch: a construction line with a length can be a normal line (#10258)

`construction: false` on a construction line command that has a
`length` makes the segment a normal sketch line, ready to close a
profile, instead of construction geometry. The default stays
construction, and an infinite line is always construction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: a length box in the construction line tools (#10258)

The horizontal, vertical, parallel and perpendicular construction line
tools show a Length box beside the pointer from the start. It stays
empty (shown as infinite) and leaves the keyboard to the tool's
shortcuts until a digit is typed; then the box takes the keyboard.
Without a length the tools work as before: one click, an infinite line.
With a length the first click sets the start and a second click the side
the segment runs to, sent as the command's `length` and `near`, so the
segment gets its length dimension. The angle tool has a Length box
beside its Angle box. A typed length keeps the start's snap, and the
preview draws the segment the click will create.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: a construction/normal switch in the construction line tools (#10258)

A Construction | Normal switch sits under the Length box of the
construction line tools. Normal sends `construction: false`, so a
segment with a length becomes a normal sketch line, ready to close a
profile, without converting it afterwards. The switch starts at
Construction with each start of a tool. An infinite line is always
construction, so without a length the switch is greyed out and its
tooltip says why. It belongs to the tool alone: the Sketch Palette's
drawing line type (X) is left as it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 11:15:21 +00:00
github-actions[bot] 29acaf8642 Regenerate generated files and fold pending files [skip ci] 2026-11-01 10:44:57 +00:00
kaltenbrunnermarkus 36bdf4ea3c Sketch drag: drop the second document copy per frame (#10507)
* claim: Sketch drag: drop the second document copy per frame

* Sketch drag: drop the second document copy per frame

edit_solved copied the document to edit it, then stored it with
`*s.doc_mut() = doc`. The command's undo snapshot still holds the old
document, so doc_mut copied the whole design a second time only to
overwrite it. Store the edited document with Session::set_doc instead,
which forgets the same caches and puts it in a new Arc. The design lands
at a new address as before and the command's end records it for the
crash journal (#7502).

A live drag frame on a design of 200 sketches (20k curves) drops from
19.2 ms to 9.4 ms; 50 sketches: 2.3 ms to 1.7 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 10:13:17 +00:00
kaltenbrunnermarkus ddd65cc4bb Move: say a part's joint conflicts instead of 'no movable joint axis' (#10509)
* claim: Move: say a part's joint conflicts instead of 'no movable joint axis'

* Move: say a part's joint conflicts instead of 'no movable joint axis'

When a joint of the selected part conflicts with the others (the solver
can't close its loop), Move found no axis and said "This part has no
movable joint axis.", pointing at joint types and limits. It now names
the conflicting joint and suggests editing, suppressing or deleting it.
Parts with no free joint value and no conflict keep the old message.

Refs #10331

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 10:10:01 +00:00
kaltenbrunnermarkus 2a410c2d76 Sketch: Intersect can pick sketch lines (#10484) (#10512)
* claim: #10484

* Sketch: Intersect can pick sketch lines and model edges (#10484)

The Intersect dialog only took faces or whole bodies, so a click on a
line of another sketch (the sides of a rectangle crossed by a plane
through its middle) picked nothing, although sketch.intersect already
cuts edges and sketch curves with the sketch plane. The pick list now
takes faces, edges and other sketches' curves, and the selection filter
reads Geometry | Bodies like Project's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 10:09:55 +00:00
ABDULLAH 01b43999a5 Arabic: unambiguous last sentence in the Plane Through Axis And Point help (#10561) 2026-11-01 10:09:49 +00:00
Dahak Builds bcb5efcaa4 Right-to-left: multi-word Hebrew/Arabic names read backwards; prefs search misses multi-word labels (#10471) (#10562)
* claim: #10471

* Show given names in bidi display order; find RTL prefs labels typed in reading order (#10471)

crate::bidi ran over catalog text only, so a multi-word Hebrew or Arabic
body name showed its words left to right in stored order, and Preferences
search compared display-order labels against reading-order queries.
given_name now returns right-to-left names in display order (browser rows,
tabs, status bar all draw names through it), and text_matches also scores
the query after the same bidi transform.

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-11-01 10:09:44 +00:00
semmelrinde 74ee047d3f Configuration rules: Then says it lists only the table's columns, and how to add one (#10532) (#10544)
* Configuration rules: Then says it lists only the table's columns, and how to add one (#10532)

A rule drives or restricts a column of the table only, so Then leaves out a
feature without a Suppress column or a parameter without a column, where
When lists them all. A note under the list now says so and points at Add
Column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Configuration rules: the two notes in the complete catalogs (Arabic, Hebrew, Japanese, Vietnamese, Chinese)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 10:09:38 +00:00
kaltenbrunnermarkus ab6e6941c7 View: look hidden bodies up in a set (#10496)
* claim: View: work out consumed sketches and hidden bodies once per revision

* View: work out the sketches features use once per design

Each sketch_shown call walked every feature of the design to tell whether
the sketch is used, and the viewport asks about every sketch several
times a frame. The used sketches are now gathered into a set once per
design (keyed on the design itself, so any edit reads them again).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* View: look hidden bodies up in a set

body_visible walked the hidden-bodies list for every body asked about, and
the viewport asks about every body several times a frame. The hidden
bodies now join the hidden joints and folders in the view's visibility
index, built when the list changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:59:42 +00:00
github-actions[bot] a93d7b207c Regenerate generated files and fold pending files [skip ci] 2026-11-01 10:14:19 +00:00
kaltenbrunnermarkus 2b65164159 View: work out the sketches features use once per design (#10545)
* claim: View: work out consumed sketches and hidden bodies once per revision

* View: work out the sketches features use once per design

Each sketch_shown call walked every feature of the design to tell whether
the sketch is used, and the viewport asks about every sketch several
times a frame. The used sketches are now gathered into a set once per
design (keyed on the design itself, so any edit reads them again).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:53:47 +00:00
kaltenbrunnermarkus fbb00dc7b2 Canvas: store reference image data as shared text so edits stop copying it (#10489)
* claim: Canvas: store reference image data as shared text so edits stop copying it

* Canvas: store reference image data as shared text so edits stop copying it

Every edit clones the document, because the undo history still holds the
old one, and the canvas image was a plain String: each of the up to 200
undo states owned its own copy of the base64 text. Canvas::data is now
Arc<str>, like the shared STEP text, meshes and point clouds; serde's rc
feature writes it as the same JSON string, so design files stay byte for
byte the same.

A 4.2 MB image with 250 edits: peak memory 1.09 GiB -> 42 MB, run time
1.16 s -> 0.12 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:46:17 +00:00
semmelrinde 7702316039 Bosnian: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10445)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:44:28 +00:00
semmelrinde bb0b9a1d2f Browser: a folder that holds only a new group shows it (#10526) (#10529)
* Browser: a folder that holds only a new group shows it (#10526)

New Group from the root's context menu made an empty group in the Bodies
folder, but the Browser draws no folder without items, so in a design
with no bodies yet nothing appeared. A folder that holds groups is now
drawn with them, even before anything is in it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Browser: test that a new group in an empty folder shows and takes a dragged body (#10526)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:44:17 +00:00
kaltenbrunnermarkus 74eda80b5d Extrude dialog: work out the automatic operation once, not every frame (#10491)
* claim: Extrude dialog: work out the automatic operation once, not every frame

* Extrude dialog: work out the automatic operation once, not every frame

An open Extrude window with the automatic operation on asked the engine
for `auto_operation` every frame. That probes the bodies with
`Mesh::contains`, rays through every triangle, so a large part cost tens
of milliseconds per frame with nothing changing.

The window now keeps the answer with a key over what it depends on: the
extrude's parameters (participants included), the design's revision and
id, and the active component and occurrence path. The latch still runs
every frame as before.

Open Extrude over a 1M-triangle mesh body: 29.8 -> 0.87 ms per frame
(headless harness, median of 3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:43:06 +00:00
kaltenbrunnermarkus ea63eec845 Extrude dialog: keep the taper limits while the profile is unchanged (#10503)
* claim: Extrude dialog: keep the taper limits while the profile is unchanged

* Extrude dialog: keep the taper limits while the profile is unchanged

The taper handle is drawn every frame while the extrude window is open,
and every frame it worked out the inradius of each picked profile and of
each of its holes: a grid search over every side, about 200 ms a frame
for a plate with 64 round holes. Only the height changes between frames.

The radii are now kept in the window's state with the profiles they were
worked out for, and worked out again only when the profiles differ. The
limits come from the same arithmetic, so they are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:37:47 +00:00
HiroKenEz 64a55392d8 Sketch: a Line chain survives Undo (#10016) (#10019)
* claim: #10016

* Sketch: a Line chain survives Undo (#10016)

Undo could take away the segment the chain was drawing on from, and every
further click was then refused with "unknown sketch point". The chain now
remembers where each segment started and goes back to the last one still there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:19:23 +00:00
github-actions[bot] 3a6920d10f Regenerate generated files and fold pending files [skip ci] 2026-11-01 09:39:05 +00:00
kaltenbrunnermarkus 228b311a6f Raytracer: map faces to looks once (#10502)
* claim: Raytracer: map faces to looks once

* Raytracer: map faces to looks once per body

Preparing a body for the CPU raytracer walked the body's face look list
one entry per work step for every triangle, so a body cost T x (F + 1)
steps (each through the job host) instead of T. The face looks are now
sorted once per body, keeping the first entry per face as before, and
each triangle finds its look with one binary search. Pixels are
unchanged; with 10 000 faces and 50 to 500 face looks, preparation
drops by 40 to 88 %.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:16:23 +00:00
kaltenbrunnermarkus 16f00d4cf9 Opening: validate the document once when a model cache is present (#10501)
* claim: Opening: validate the document once when a model cache is present

* Opening: validate the document once when a model cache is present

Opening a design that keeps its model parsed and validated document.json
twice: reading the model cache checked it before decoding the cached
bodies, and read_document, which follows straight after, runs the same
migrations and validation and fails the open when they fail. The open
path now reads the model without that check; geometry(),
read_design_geometry and the preview keep it. A broken document fails the
open with the same error as before.

3,000-feature design with its model cache, bench-open parse step:
426 -> 293 ms (median of 8, heavy machine load). Saving the opened
design gives a byte-identical file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:16:12 +00:00
Dahak Builds 9fa3c85c68 Invert the curved ViewCube roll arrows (option) (#10483) (#10539)
* claim: #10483

* ViewCube: an option to invert the curved roll arrows (#10483)

A new Navigation preference, "Invert the curved roll arrows"
(invert_curved_roll_arrows, off by default): with it on, the two curved
arrows at the cube's corner roll the view the other way within the
screen plane - the clockwise arrow rolls counterclockwise and the
counterclockwise arrow rolls clockwise. The sibling of the cardinal-arrow
inversion from #10286, which left these arrows alone.

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-11-01 09:13:00 +00:00
github-actions[bot] cda0277c3e Regenerate generated files and fold pending files [skip ci] 2026-11-01 08:49:46 +00:00
kaltenbrunnermarkus f233f000e8 Mesh imports: compare by pointer before comparing contents (#10490)
* claim: Mesh imports: compare by pointer before comparing contents

* Mesh imports: compare by pointer before comparing contents

MeshData derived PartialEq, so the dirty check and the autosave check
walked every coordinate and index of a scanned mesh after each edit,
although the document and its saved copy share the same arrays. Compare
shared arrays by pointer first and value by value otherwise, as Points
and Colors already do. About 1.9 ms per comparison for a mesh of one
million triangles goes to nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:17:11 +00:00
kaltenbrunnermarkus fcb0a925e2 Sketch: hash sets for the stale-pattern check before each solve (#10493)
* claim: Sketch: use a lookup map for curves in pattern upkeep

* Sketch: use a lookup map for curves in pattern upkeep

Pattern upkeep runs before every solve, each drag frame included, and
looked up every copy curve and its arc points with a linear search over
all ids. Dragging another line in a sketch with a 500-copy slot pattern
spent about two thirds of each frame there. The ids now resolve through
maps built once per call; the result is the same to the bit.

The solve bench gains a circular slot pattern section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: hash sets for the stale-pattern check before each solve

The check whether a pattern lost a seed, copy or relation built three
ordered sets of all ids before every solve. Only membership is asked, so
hash sets give the same answer; a drag frame in a sketch with a 500-copy
pattern takes another third less.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:17:05 +00:00
kaltenbrunnermarkus 71624cf7fa Sketch: use a lookup map for curves in pattern upkeep (#10524)
* claim: Sketch: use a lookup map for curves in pattern upkeep

* Sketch: use a lookup map for curves in pattern upkeep

Pattern upkeep runs before every solve, each drag frame included, and
looked up every copy curve and its arc points with a linear search over
all ids. Dragging another line in a sketch with a 500-copy slot pattern
spent about two thirds of each frame there. The ids now resolve through
maps built once per call; the result is the same to the bit.

The solve bench gains a circular slot pattern section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 09:16:59 +00:00
PapaEcho ce72abacf9 Construct: plane through an axis and a point (#10178) (#10472)
* claim: #10178

* feat: add plane through axis and point (#10178)
2026-11-01 09:15:25 +00:00
Dahak Builds f25a8e6abc Fix tooltip delay bypass on sequential menu hovers (#10481) (#10482)
* claim: #10481

* Restart tooltip delay per menu row and place tips beside the drop-down (#10481)

* Format

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-11-01 09:10:54 +00:00
Leo 24b91bd453 Sketch Concentric: accept a circle or arc and a sketch point (#10487) 2026-11-01 07:57:43 +00:00
github-actions[bot] 22f12e80e4 Regenerate generated files and fold pending files [skip ci] 2026-11-01 08:13:20 +00:00
semmelrinde 1b02f38732 German: translate the 20 messages the catalog lacks (Move Sketches to Their Parts, the view cube's arrows, view angle locks and more) (#10488)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 07:45:55 +00:00
Frank 7239c95858 Sketch Project: round edges project as arcs, not short lines (#10312)
Projecting a whole body fitted its outline from mesh edges: a round wall seen
edge-on has triangles leaning a hair either way, so the outline zig-zagged
between both rims and broke into two-point pieces (lines), and seams where two
faces' triangles don't share vertices counted as open, outline edges. Faces
that face one way all over (planes, cylinders and cones about the sketch
normal) now decide for all their triangles, near vertices are welded, and a
seam between two faces facing the sketch is no outline. A STEP hook went from
159 lines to 10 lines and arcs.

A single rounded or chamfered rim of a cut curved face is a spline that only
follows its circle; read as Bezier pieces it came in as twenty splines. An
edge read as spline pieces that stays on a circle within 1e-5 of its radius,
in a plane parallel to the sketch, now comes in as that arc.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 07:13:00 +00:00
clark19990 f90b6116d5 Measure: datum planes, axes and points, at exact distances (#10157)
* Measure: datum planes, axes and points, at exact distances

The Measure tool took faces, edges, vertices and sketch geometry; a datum
plane or axis could not be picked into it, and a point set of an infinite
plane or axis would measure the wrong thing anyway.

Describe origin and construction planes, construction axes and construction
points as items, accept PLANES, AXES and CONSTRUCTION_POINTS (and the origin)
in the Measure dialog, and give the new shapes exact closest points:

- a point and a plane: the perpendicular distance;
- a point and a line: the perpendicular distance;
- two planes: parallel distance, or zero where they meet;
- a plane and a line: zero where they cross;
- two lines: the skew distance.

The panel and the quick readout show a plane's point and normal, and an
axis's point and direction.

Test: a point 10 above the XY plane, 5 from the Z axis, and a plane and an
axis that meet.

* Select: a straight sketch line is a curve in an input that takes curves

Adding axes to Measure's input made a straight sketch line match the "axis"
rule before the sketch-line rule, so a picked external sketch curve became a
SketchCurve instead of the ExternalSketchCurve Measure records. The axis rule
now applies only to inputs that take axes on their own (Move's direction and
the like), not to inputs that also take curves.

Test: measure_input_fits_external_sketch_geometry, and the Move axis picks.

* rustfmt: format the new selection filter and measure code

* Measure: drop an unused normalisation in the skew-line distance

---------

Co-authored-by: clarkliu <277482660@qq.com>
2026-11-01 07:04:03 +00:00
semmelrinde 38b9ff223b Frames: a renamed cut-off piece keeps its name when the design is rebuilt from its features (#10438) (#10466)
* Frames: test that a renamed cut-off piece keeps its name in a rebuild from the features alone (#10438)

solidcraft-cli eval rebuilds a saved design without its saved model; the
rename made after a cut then lands on the first line's member. The test
reproduces it on main; the fix follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Frames: a renamed cut-off piece keeps its name when the design is rebuilt from its features (#10438)

Since #10132 a cut's pieces past the first belong to the cut and the piece
that keeps the body's name to the body's own feature. Ordering the pieces
by their faces then moved the names among them but left each body's
feature behind, so the cut-off piece said the frame member feature made
it. body.rename stored its new name there, in the first line's slot, and a
rebuild from the features alone (solidcraft-cli eval of the saved file)
named member A after it. A name now moves together with the feature it
belongs to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 06:43:40 +00:00
github-actions[bot] d96d547f6b Regenerate generated files and fold pending files [skip ci] 2026-11-01 06:53:11 +00:00
github-actions[bot] 05a8911f83 Regenerate generated files and fold pending files [skip ci] 2026-11-01 06:43:56 +00:00
semmelrinde 1581d85cba Czech: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10446)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:44:50 +00:00
semmelrinde ad54bdf8eb Danish: translate the 69 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10447)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:44:32 +00:00
C.Vengels 7bafc99390 Send to Slicer: the Print face input takes one face for each body sent (#10468)
With several bodies to send (after Add all bodies, say), the Print face
input refused every face. It took a print face only when exactly one
body was sent; any other pick was cleared at once, with a note in the
status bar only. Each body's print face then had to be set with Ctrl+B,
or by sending that body alone.

The input now holds the print face of each body being sent. A face
picked in it becomes its body's print face, in place of the one it had.
A click on a body's print face takes it out and clears only that body's.
A face of a body that is not being sent is refused with a message
(`ui.print_face_body_not_sent`, in place of `ui.print_face_one_body`).
Each change is still one `body.print_face` command, so it undoes on its
own. Picks in this window are no longer widened to the other pieces of
the face's surface, so a click on a print face takes it out rather than
adding its neighbours.

The user guide (guide/files.md) says so. The new message is in
assets/locales/pending/print-face-each-body.json, in all 31 languages;
the old one is removed from the catalogs.

Test: dialogs_save_mesh::tests::the_print_face_input_takes_one_face_for_each_body_sent
(fails without the change: the second body's face is refused).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:44:15 +00:00
semmelrinde e537a63988 Croatian: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10449)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:44:11 +00:00
semmelrinde 984a5de001 Galician: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10448)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:44:11 +00:00
semmelrinde a799318b0f Hungarian: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10450)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:44:00 +00:00
github-actions[bot] f989b3309f Regenerate generated files and fold pending files [skip ci] 2026-11-01 06:18:58 +00:00
github-actions[bot] 8771b734e4 Regenerate generated files and fold pending files [skip ci] 2026-11-01 06:09:49 +00:00
semmelrinde ef081519d5 Italian: translate the 62 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10453)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:43:48 +00:00
semmelrinde 2a3d29766e Indonesian: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10451)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:43:38 +00:00
semmelrinde 058f17cc37 Malay: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10454)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:43:32 +00:00
semmelrinde 6475418169 Norwegian Bokmål: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10455)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:43:20 +00:00
semmelrinde 1a76f80bae Dutch: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10456)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:42:36 +00:00
semmelrinde f7ceba9cca Romanian: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10457)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:42:34 +00:00
semmelrinde 249ca9267a Russian: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10458)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:42:32 +00:00
semmelrinde 119168cb3e Turkish: translate the 67 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10461)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:42:19 +00:00
semmelrinde 2eb81a79b5 Swedish: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10460)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:42:19 +00:00
semmelrinde b503340b06 Ukrainian: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10462)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:42:18 +00:00
semmelrinde 63123e9237 Serbian: translate the 68 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10459)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:42:05 +00:00
semmelrinde c843d1fb28 Traditional Chinese: translate the 67 messages main gained after batch 10, the regrouped Preferences included (batch 11) (#10463)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:41:16 +00:00
semmelrinde 483e21ab1b Sketch: Break Link in the context menu of projected geometry (#10417) (#10421)
* Sketch: Break Link in the context menu of projected geometry (#10417)

Projected curves and points (model edges and vertices, another sketch's
curves) could only be unlinked through command search, although Trim and
other refusals say "use Break Link on it". The sketch context menu now
offers Break Link when the selection holds projected geometry; text keeps
Explode Text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: test Break Link in a projected edge's context menu (#10417)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 04:41:25 +00:00
kaltenbrunnermarkus 9f37003dfa Browser: Features folders scrolled out of view skip working out their mark (#10439)
* Browser: Features folders scrolled out of view skip their mark

A folded Features folder shows the worst error or warning mark of the
features it holds. Working that out scans the design's whole history, and
from 16 features builds a table of all of them: per placement, on every
frame, whether the row is on screen or not. In a long tree of placements of
a part with a long history this was most of the window's frame while
orbiting.

A row scrolled out of view paints nothing (`tree_row` only takes its space),
so its mark is now worked out only when the row is on screen, as the
placement rows already do for their own state. The rows on screen show the
same marks.

Refs #6083

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Scale tests: time each frame of an orbit around a large design

`scale_tests::orbit_frame_cost` (ignored, manual) turns the view with the
right button over a design (a STEP file inserted as the app opens one, a
design file, or the generated assembly) with the model scene built, as the
app builds it once a renderer is there. Per frame it times the window
thread's frame and its named steps (`frame_watch`), egui's tessellation,
and the renderer's prepare, draw recording and GPU work on an offscreen
device (`OffscreenFrames::frame_parts`); without an adapter it times the
window thread alone. `painted` fingerprints the tessellated picture once
the view rests, to compare two builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 04:40:39 +00:00
Christian Glombek 4c44126a4d Sketch: sketch.create says which way the origin planes' sketch axes run (#10397)
On XZ a sketch's y runs along world -Z, so a value written as a height lands
below the plane; only the modelling skill's reference said so. The command's
parameter text now gives the axes of all three origin planes (XY: +X, +Y;
XZ: +X, -Z; YZ: +Y, +Z), and a test pins them.

Assisted-by: LLM
2026-11-01 04:19:07 +00:00
Christian Glombek 5c1aad8a09 Assembly: Relink Source takes a .json design, as Insert Design does (#10394)
`component.insert_design` links a design saved as a .sc container or as plain
JSON (`.json`), but `component.relink` refused every path that was not a
container ("choose a saved .sc design"), so a component linked to a JSON
design could not be pointed at another one. Relink now takes any design path
Insert Design takes (`is_design_path`: .sc, a legacy extension or .json); the
file is read by the same `design_bodies`, which already reads both. The Relink
Source file dialog opens on a filter that lists .json among the designs, too.

Assisted-by: LLM
2026-11-01 04:18:49 +00:00
kaltenbrunnermarkus 9d01f6e005 Sketch: construction lines with a length (#10258) (#10427)
* claim: #10258

* Sketch: construction lines with a length (#10258)

The horizontal, vertical, angle, parallel and perpendicular construction
line commands take an optional `length`: the line becomes a construction
segment from `at`, running towards `near`, held by a length dimension
that follows its expression. Without `length` the line stays infinite,
as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 04:13:03 +00:00
ashxddaga 127373a950 fix(ui): fade or unfade browser row dynamically when visibility toggles (#9953) (#9967)
- In entry_row (crates/ui-egui/src/browser.rs), use live  rather than cached  for the  property
- Ensures eye toggle dynamically fades or unfades rows for sketches and bodies without requiring a cache rebuild
- Add regression test in browser_card_tests

Fixes #9953
2026-11-01 04:10:32 +00:00
kaltenbrunnermarkus 64fe82b6c1 Engine: open a design a feature at a time (#10198) (#10274)
OpenSteps splits doc.open of a design into steps for a caller that must
keep working meanwhile (the web app, which has one thread): start reads
the file, each step evaluates the next feature by moving a copy's history
marker one feature on (so every result before it is reused), and finish
puts the design in the session's place with doc.open's reply. The next
feature's imported STEP text is offered first, so a caller can read it
in parts. Session::opened and opened_at are split into small helpers so
both paths build the session the same way; doc.open is unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 03:39:22 +00:00
kaltenbrunnermarkus fafa575c9f Find a saved model's sheets by their text, not a record built per state (#10418)
Saving a design with its model cache asked, for every state, for each sheet-metal body it holds,
and built that sheet's JSON record each time only to find it written already. A design of 906
states with 300 sheets spent most of its save there. The sheet's text written straight from it
is the key now; its record is built only the first time. The records and the file are the same.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 03:20:05 +00:00
kaltenbrunnermarkus 7e701aabc1 Save: write the model cache manifest without copying the model's records (#10419)
* Find a saved model's sheets by their text, not a record built per state

Saving a design with its model cache asked, for every state, for each sheet-metal body it holds,
and built that sheet's JSON record each time only to find it written already. A design of 906
states with 300 sheets spent most of its save there. The sheet's text written straight from it
is the key now; its record is built only the first time. The records and the file are the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Write the model cache manifest without copying the model's records

The manifest was built as a JSON tree, which copied the whole model's records (13 to 33 MB of
records in large designs) before writing them, and a cache too big for the file wrote it again for
each try at fewer states. The manifest is now written from the records where they are, its fields
in the sorted order the tree wrote them, so the file is the same byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 03:19:59 +00:00
acebear17 9475e0e1a4 Docs/design approach 10063 (#10409)
* claim: #10063

* docs: add a design approach and workflows chapter to the user guide (#10063)

Adds guide/design-approach.md after the window tour: the parametric idea, principles for designs that change well, the timeline and rollback marker, bodies vs components and occurrences, common workflows with links, a term map for users of other CAD software, and where to find help.

* docs: match the chapter to the app's labels and sketch colours (#10063)

Checked in the web app (0.29.0): the timeline strip is headed History, the toolbar shows New Sketch and Parameters for Create Sketch and Change Parameters, and fully constrained geometry turns white in the default dark theme rather than dark.

* docs: tighten the design approach chapter's wording (#10063)

The glossary covers most, not all, of the chapter's terms; Redo moves forward; the timeline is shown as the History strip; Report a bug drafts a report for the user to file and sends nothing itself.
2026-11-01 02:27:40 +00:00
kaltenbrunnermarkus a8be28563c Sketch: leave out the exact roundoff estimate away from the pixel bound (#10267)
A flat node's roundoff allowance took a hypot per control point. Twice
|x| + |y| bounds each hypot from above with room to spare for rounding,
and rounding keeps sums monotonic, so whenever the flatness test passes
with that larger allowance it passes with the exact one too. Only nodes
whose chord distance comes near the 0.5 px bound (or with a non-finite
term) now take the exact hypots, and they decide as before.

Same result for every node: the reference comparison test still matches
bit for bit.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 02:16:37 +00:00
NOWN-DEV a69a7c6ffe Inspect: measure names_only lists every world body without measuring (#10402)
A caller that only needs the bodies' names (assembly occurrences included,
e.g. "Body2 (Part:2)") had to measure every body, or read document.inspect,
which lists definition bodies only. `inspect.measure {names_only: true}`
returns each world body's name and its definition's name, honouring the
`bodies` filter; an unknown name is refused before anything is measured.
The MCP `measure` tool passes it through, directly and as a batch step;
`summary` leaves such a list as it is, since there is nothing to narrow.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 02:12:23 +00:00
Nathan Dane 7366fe0ecc Blur behind panels: render path, zero cost when off (#8876) (#9809)
* claim: #8876

* Add optional viewport-only Kawase blur and native UI composition

* Fix vendored panel hook imports and deprecated float constant import

* Drain texture updates in the full GPU blur fixture

* Hold the blur evidence fixture camera fixed across radii

* Address blur compositor lint checks

* Share animated Render preview background with blur source

* Use resolved Design background for blur source

* Exercise blur rendering independently of software adapter policy in CI

* Use stock egui hosts instead of vendoring the full crate

* Preserve feature-window open handling with stock egui hosts

* Target the native Window in close-handling regression fixture
2026-11-01 01:37:44 +00:00
MarkusRe 60d79e7ea2 Browser: show F2 shortcut on Rename context menu rows and route key when open (#10388)
Show F2 beside Rename on context menus where F2 already renames the
target (bodies, features and sketches, construction planes, components and
occurrences, browser groups, and canvases). Saved views and joints remain
without a shortcut label because F2 does not rename them without a menu.

When a context menu is open, pressing F2 routes through press_shortcut to
rename the menu's target (such as a clicked browser group or canvas) and
close the menu, rather than renaming the viewport selection.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Gemini 3.8 Flash <noreply@google.com>
2026-11-01 01:37:25 +00:00
kaltenbrunnermarkus 653bc00be4 Sketch: work out each sampled point's clip distances and screen position once (#10343)
Each node of the display curve sampler recomputed a control point's
seven clip distances for every clip plane it tested (up to 7 times for
the reject test, 3 more for the depth test, once more for the cut), and
projected each point to the screen twice. They are now worked out once
per node into arrays and read from there.

Most nodes are split rather than drawn. A node is flat only when every
control point lies within the pixel bound of its chord after adding a
roundoff allowance that is never negative, so a point already farther
than the bound decides "split" on its own; the allowance (four hypot
and divisions per point) is now left out for those nodes.

Same values in the same order: the reference comparison test from the
previous commit still matches bit for bit.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 01:12:51 +00:00
kaltenbrunnermarkus 915dd9a83f Viewport: the comment above build_sketch_scene describes the sketch scene (#10367)
The doc comment of the ground shadow had slid onto build_sketch_scene when
that function was added above ground_shadow. Give it back to ground_shadow
and describe what build_sketch_scene builds.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 01:12:43 +00:00
semmelrinde b99d4ddde9 Sketch Coincident: a selected line midpoint is a point it takes (#10311) (#10315)
* Sketch Coincident: a selected line midpoint is a point it takes (#10311)

A selected midpoint goes to the command as {midpoint: line}, as
Horizontal/Vertical's alignment takes it, but Coincident wanted a point
id and refused it with "b must be a point or curve". The command now
puts a point at the line's middle, tied there by a Midpoint constraint
(or uses the one already tied there), and makes that point coincident
or puts it on the other curve, in one undo step. The toolbar button and
the context menu send a selected midpoint that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch Coincident: test a line midpoint in the command, the toolbar and the context menu (#10311)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 00:44:48 +00:00
kaltenbrunnermarkus 425417b36a Web app: open a large design without freezing the page, with progress and Cancel (#10198) (#10211)
* Engine: open a design a feature at a time (#10198)

OpenSteps splits doc.open of a design into steps for a caller that must
keep working meanwhile (the web app, which has one thread): start reads
the file, each step evaluates the next feature by moving a copy's history
marker one feature on (so every result before it is reused), and finish
puts the design in the session's place with doc.open's reply. The next
feature's imported STEP text is offered first, so a caller can read it
in parts. Session::opened and opened_at are split into small helpers so
both paths build the session the same way; doc.open is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Web app: open a design a few features a frame, with progress and Cancel (#10198)

On the web, a design to open is now a staged file load like a STEP file
(#1376): its features are evaluated for about 30 ms a frame through
OpenSteps, a feature's imported STEP file is read a solid per frame first
and held so the feature finds it read, the progress card counts the
design's features, Cancel works between steps, and the meshes are made
a few per frame afterwards. The desktop app keeps its worker thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Web app: design links and the files window open designs with progress and Cancel (#10198)

Design links (?open=URL, as embedded viewers use), the files window and
designs opened from the computer went through the one-shot open_path,
which froze the page on a large design. They now use the staged open; a
design link becomes an unsaved copy under the link's name once the open's
reply arrives (SolveApp::open_path_answered).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 00:17:15 +00:00
kaltenbrunnermarkus b7a6967ef2 Web app: open a design a few features a frame, with progress and Cancel (#10275)
* Engine: open a design a feature at a time (#10198)

OpenSteps splits doc.open of a design into steps for a caller that must
keep working meanwhile (the web app, which has one thread): start reads
the file, each step evaluates the next feature by moving a copy's history
marker one feature on (so every result before it is reused), and finish
puts the design in the session's place with doc.open's reply. The next
feature's imported STEP text is offered first, so a caller can read it
in parts. Session::opened and opened_at are split into small helpers so
both paths build the session the same way; doc.open is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Web app: open a design a few features a frame, with progress and Cancel (#10198)

On the web, a design to open is now a staged file load like a STEP file
(#1376): its features are evaluated for about 30 ms a frame through
OpenSteps, a feature's imported STEP file is read a solid per frame first
and held so the feature finds it read, the progress card counts the
design's features, Cancel works between steps, and the meshes are made
a few per frame afterwards. The desktop app keeps its worker thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 00:16:01 +00:00
NOWN-DEV 68105938e2 Sketch: a text rebuilt with other words keeps the far-move walk (#10357)
A sketch holding a text whose words come from a text parameter is left
unsolved after the words change and its links then move far, with the
warning "the sketch constraints conflict (k1, ..., k10)". The same two
changes the other way round solve.

Repro: a sketch with three projected points, a construction rectangle on
them and a centred text along its far side, the text's words given by a
text parameter. Change the parameter's words, then move the source
geometry about 280 mm. Without the word change it solves; with it, the
sketch warns of conflicting constraints.

Other words are other outlines: the text is built anew with new points
and curves. The solve that walks a sketch from its stored state to a far
link move (and the check for sides the jump turned over) refused the two
sketches as not the same entities, and the single jump left alone failed.

`Sketch::stored_with_rebuilt_texts` gives the stored sketch as this one
has its entities when they differ only by rebuilt texts: the texts'
entities as they are now, every other point, radius, arc turn and
constraint value as stored. `Document::solve_sketch` walks from that, so
the points pair up again. Sketches that differ in anything else are
refused as before.

Test: sketch_project::side_tests::a_label_follows_its_source_far_after_a_text_parameter_gave_it_other_words
(fails without the fix with the conflict warning above).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 00:15:32 +00:00
ABDULLAH 11e283ba77 Arabic: reasoning effort label, view cube arrow note (roll term, tanween spelling), Look group heading (#10355) 2026-11-01 00:11:16 +00:00
kaltenbrunnermarkus c25c2f3a21 Sketch: sample display curves without a heap copy per subdivision (#10342)
The pixel-bounded curve sampler that draws sketch curves and profile
outlines ran again on every camera move, and each subdivision step
allocated: every span's control points were a Vec, splitting one in
half built a Vec per de Casteljau level, each node's projection was
collected into a Vec, and every drawn part grew from two vertices.

The control points now live inline in a fixed array (`Hull`, at most a
degree-9 Bezier), the halves are worked out in place with the same
`mix` level by level, the projection goes into a reused array, and a
new part starts with room for eight vertices. The arithmetic and its
order are unchanged, so the points are the same bit for bit.

Tests: `samples_the_same_points_bit_for_bit_as_the_reference` keeps the
previous sampler as a reference and compares paths, quality and budget
use over every segment kind, slanted and far-off planes, orthographic
and perspective views from far out to far in, clipped and unclipped,
with ample and spent budgets. Ignored timings:
`sampler_cost_against_the_reference` (render) and
`sketch_scene_cost_while_the_camera_moves` (ui-egui).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 00:10:37 +00:00
kaltenbrunnermarkus e0582668bb Web app: an opened design is drawn when its meshes cannot be made on a thread (#10362)
The web build cannot start the open-meshing thread. Its fallback counted
every body done but listed none ready, so whatever the file load opened
on the web drew no bodies and kept "Loading parts n/n" up for good. The
fallback now lists every body ready and the viewport meshes as it draws,
as the fallback meant to. Found while opening a design through the file
load in the browser (#10198).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 00:10:20 +00:00
Colin Faulkingham df04e7742f Assembly: let components extruded from reference faces move independently (#10289) (#10332)
* claim: #10289

* fix: preserve placement of face-derived components (#10289)
2026-10-31 23:51:18 +00:00
github-actions[bot] 56b77b405d Regenerate generated files and fold pending files [skip ci] 2026-11-01 00:09:18 +00:00
raykholo e4a67d1e30 Assembly: move sketches to the part they're drawn on (#10218) (#10219)
* claim: #10218

* Assembly: move sketches to the part they're drawn on (#10218)

`component.move_sketches.to_parts` moves each given sketch, or every sketch in the design, whose
plane is an exactly attached face of a part's body into that part through
`component.move_sketches`, as one undo step. Sketches with no single part to go to stay where they
are, and the reply lists what moved and what stayed, with the reason. The Sketches folder's menu
offers it for the folder's sketches (or the selected ones), and a sketch's menu for that sketch or
the selected sketches; the status bar says how many moved and why the others stayed.

`component.move_sketches` now keeps a face-attached sketch where it is on its face: the sketch is
authored in the new component's placement (the face's own when the component owns the face), and
its picked point and repair plane are carried into it. Before, a face-attached sketch moved out of
the design was left without an author placement and failed to evaluate.

* Tests: the moved part is free to move; face anchor path

* Tests: move the to_parts test to the component command tests

* Shorter label: Move Sketches to Their Parts
2026-10-31 23:42:47 +00:00
Dahak Builds ed9599d1e4 View angles card: per-axis zero buttons and locks (#4581) (#10344)
* claim: #4581

* View angles card: per-axis zero buttons and locks (#4581)

The readout card under the orientation gizmo already showed and edited the
view's yaw, pitch and roll in degrees. Each axis row now also has a zero
button that turns that angle to 0 degrees at once, and a lock: a locked
angle stays put while orbiting, turning with the arrow keys or using a 3D
mouse, and its field and zero button go inert, so a symmetrical view can
hold its yaw and roll at 0 while only the pitch is adjusted.

* clippy: drop needless borrow in keep_locked call

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 23:39:24 +00:00
bherbruck 3a5195b0a0 Release 0.29.0 2026-10-31 19:20:30 -04:00
bherbruck beb35029a4 Release 0.29.0 (#10347)
Fold the pending design format changes (align-axis-mask, equation-variable-unit, link-file-digests) into format 46.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 19:20:15 -04:00
semmelrinde 80fb02f0b8 Sketch Ellipse: Major radius and Minor radius boxes while drawing (#10279) (#10282)
* Sketch Ellipse: Major radius and Minor radius boxes while drawing (#10279)

The Ellipse tool showed no value boxes. After the centre it now shows
Major radius, after the end of the major axis Minor radius; a typed value
places the point at that size and becomes the ellipse's dimension, as for
a circle's Diameter. sketch.draw.dimensioned takes major_radius and
minor_radius for sketch.ellipse, so Dimension new shapes covers it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch Ellipse: test the typed radii in the tool and in sketch.draw.dimensioned, and say so in the guide (#10279)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch Ellipse: rustfmt the new engine test (#10279)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 23:18:35 +00:00
kaltenbrunnermarkus a5c8fa7be7 Viewport: faster highlight with many bodies selected (#10204)
* claim: faster highlight with many bodies selected

* Viewport: find selected bodies by name once per highlight build

With every body of a large assembly selected, each hover change built the
highlight again and looked every selected body up along the world's bodies
(`ModelState::body` scans them), which is quadratic: about 2.2 million name
comparisons on 2,116 bodies, some 3 ms of every hover change.

The selected bodies, faces and edges are now found in a map by name, made at
the first lookup. A name held by more than one body finds the first, as the
scan did, so the same bodies are lit in the same order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Viewport: measure hover changes with many bodies selected

An ignored scale test: every body of a design selected (a file named by
SOLIDCRAFT_SCALE_DESIGN, else a generated grid of 1,440 boxes), the pointer
moving from face to face, timing each hover change's highlight build headless
and as the app builds it on a GPU (bodies drawn from their plans, and from the
model scene's blocks). Run with `--ignored --nocapture`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 23:14:05 +00:00
MarkusRe 4c3d1484c5 Parameters: show one rename tooltip per name (#10309)
Keep full names in the tooltip only when the name cell clips them, and keep
the double-click rename hint without stacking a second popup. Cover short
and long names, favorites, and double-click input with a regression test.

Co-authored-by: Codex <noreply@openai.com>
2026-10-31 22:48:33 +00:00
Colin Faulkingham e0c1b8adbd Sketch: snap to infinite construction-line crossings (#10011) (#10285)
* claim: #10011

* Fix snapping at infinite construction-line crossings (#10011)
2026-10-31 22:23:57 +00:00
bherbruck 604515cfb3 Test: hovering a large body checks the pick index doesn't block, without timing (#10325)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 22:23:51 +00:00
github-actions[bot] 57d789c0aa Regenerate generated files and fold pending files [skip ci] 2026-10-31 22:34:32 +00:00
github-actions[bot] 4e9656ea9a Regenerate generated files and fold pending files [skip ci] 2026-10-31 22:25:42 +00:00
Nathan Dane 07160d9366 Preferences redesign 3/11: page structure, aliases and profile card (#9875) (#9907)
* claim: #9875

* Preferences: split pages and preserve aliases and profiles

* Preferences: preserve moved-page regressions and complete translations

* Preferences: retain newly added settings in profiles

* Preferences: target Tools in tool-cursor persistence tests
2026-10-31 22:05:20 +00:00
Dahak Builds c111b5f2fb ViewCube: option to invert directional rotation arrows (#10254) (#10286)
* claim: #10254

* ViewCube: an option to invert the directional rotation arrows (#10254)

A new Navigation preference, "Invert the view cube rotation arrows"
(invert_navigator_arrows, off by default): with it on, an arrow around the
cube orbits the camera the way the arrow points, as in Fusion and Inventor,
instead of rotating the cube toward the side the arrow sits on. Left and
right, and up and down, trade places, and each tooltip names the action
actually performed. The curved roll arrows are not inverted: they name the
rotation they perform, not a direction.

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 22:00:16 +00:00
Nathan Dane 4594d81f7a Gruvbox: light and dark themes with three contrast choices (#10292)
* claim: consolidate Gruvbox contrast variants

* Consolidate Gruvbox variants into light and dark contrast choices

* Check both original Gruvbox viewport gradient endpoints

* Reset Gruvbox scenario state before independent theme checks
2026-10-31 21:58:30 +00:00
raykholo 2e3448f348 Sketch: an option to make the part active when sketching on its face (#10215) (#10216)
* claim: #10215

* Sketch: an option to make the part active when sketching on its face (#10215)

Preferences › Sketch › "Sketching on a part's face makes that part active", off by default.
When it is on, a sketch started on a face of another component's body activates that component
at the picked placement first and is made there, as after an explicit activate. The part stays
active, so what is built from the sketch lands in the same part.

For scripts the same is `sketch.create` `activate_part: true`; the reply's `activated` names the
component and placement. On an error the active component goes back to what it was.

* Tests: a free part, no edge projection, the sketch on the face plane
2026-10-31 21:52:09 +00:00
github-actions[bot] e5c6e3ef1e Regenerate generated files and fold pending files [skip ci] 2026-10-31 21:57:31 +00:00
rugbymauri 57df47b763 Sketch: clicking the running tool's button ends it, so clicks select again (#10151) (#10263)
* claim: #10151

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

* Sketch: clicking the running tool's button ends it, so clicks select again (#10151)

The lit ribbon button of the running sketch tool started the tool over
when clicked again, so it gave no way out: every click in the view kept
drawing or measuring, and Ctrl+click never reached selection. Esc and
right-click already end a tool, but the pressed button looks like the
natural switch.

A second click on the running tool's button (large ribbon buttons and
the constraint grid) now ends the tool. Persistent analysis toggles keep
their own on/off. The old behaviour stays behind the Sketch preference
"Clicking the running tool's button ends it" (ribbon_click_ends_tool).

Fixes #10151

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

---------

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
2026-10-31 21:32:48 +00:00
PapaEcho 42145719a0 Measure: start with the current selection (#10169) (#10234)
* claim: #10169

* fix: initialize Measure from preselected items (#10169)
2026-10-31 21:26:40 +00:00
rugbymauri 64421a2cb9 3D mouse: turns a rolled or upside-down view the way the cap is pushed (#10083) (#10262)
* claim: #10083

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

* 3D mouse: turns a rolled or upside-down view the way the cap is pushed (#10083)

In the default upright (turntable) orbit the cap's Spin rolls the view,
but its Tilt and Turn went straight into yaw and pitch, which ignore the
roll. Rolled upside down, every push moved the model the opposite way on
screen; rolled on its side, tilt moved it sideways.

The device now takes Tilt and Turn back through the view's roll before
the orbit, for the cap and for a device app over the navigation bridge.
An unrolled view behaves exactly as before; Free orbit was already
view-relative and is unchanged.

Fixes #10083

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

---------

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
2026-10-31 21:20:10 +00:00
ABDULLAH 711e41233f Arabic: orbit/pan/zoom verbs in the NX navigation help, System language choice, measuring bodies progress (#10272) 2026-10-31 21:19:33 +00:00
kaltenbrunnermarkus cf0508e5c8 Sketch: held solves that cannot succeed give up sooner (#6606) (#10208)
* claim: #6606

* Sketch: held solves that cannot succeed give up sooner (#6606)

A status-only solve (the held solves of a drag) only asks whether it
succeeds. When LM sits in a least-squares valley of conflicting
constraints it crawled on to its 500-iteration limit, and a held solve
runs LM up to three times. Such a solve now leaves a component once the
iteration has stalled far from a solution: over the last 20 iterations
the sum of squared residuals fell by at most 1e-5 of itself while the
largest residual is still above 1e-4 mm.

Successful solves are unaffected: on about 62,000 LM runs that succeeded
(the sketch and engine tests and 120 generated sketch scripts with 2,900
drags) the slowest still fell by 1.4e-3 over any 20 iterations while
that far off. Solves with an analysis keep iterating (their report names
the violated constraints), and live frames are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 20:51:32 +00:00
Dahak Builds bace1a1228 Assistant: set the reasoning effort per API agent (#10241) (#10259)
* claim: #10241

* Assistant: send a per-API-agent reasoning effort on /chat/completions (#10241)

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 20:48:42 +00:00
Colin Faulkingham bda8b6b2e8 Fix Touchpad navigation with focused tool fields (#10231) (#10253)
* claim: #10231

* fix(ui): allow touchpad navigation with focused tool fields
2026-10-31 20:48:28 +00:00
P'tite Tête 52765304cd fix: Sketch rectangles and centre circles take expressions (#10251)
- sketch.rectangle.center and two_point: a corner given with expressions is a fixed point that follows its parameters, as with sketch.line
- sketch.circle.center: a radius or diameter naming a parameter is a driving dimension; a string naming none is just the number; bare numbers read in the design unit
- A radius that is not a number is refused with its own message and no longer passed over for diameter
- sketch.circle.two_tangent: a string radius reads bare numbers in the design unit

Co-authored-by: P'tite Tête <asso@ptitetete.com>
2026-10-31 20:07:36 +00:00
Colin Faulkingham ec526d2b3d Sketch: keep polygon inputs clear of the preview (#10035) (#10199)
* claim: #10035

* Sketch: keep polygon inputs clear of the preview (#10035)
2026-10-31 20:06:03 +00:00
ABDULLAH 3b3d93f333 Arabic: selection wording for the freehand lasso option, clearer view cube fit note, tanween spelling (#10249) 2026-10-31 20:05:41 +00:00
kaltenbrunnermarkus 05f30c1674 Browser: a click just past a feature's name selects it instead of opening its sketch (#10079) (#10213)
* claim: #10079

* Browser: a click just past a feature's name selects it instead of opening its sketch (#10079)

The Edit Profile Sketch button on a browser feature row began 2 points after
the name, so a click that landed just past the name, or a press on the name
that slipped a few points before its release, opened the profile sketch.
The button now starts 8 points after the name, wider than egui's 6-point
click slop; the gap selects the row like the name does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 20:05:28 +00:00
Colin Faulkingham bba2fc1400 Report omitted print-face selections in command-script exports (#10230) (#10235)
* claim: #10230

* fix: report omitted print-face assignments in script exports
2026-10-31 19:58:48 +00:00
Dahak Builds 538d7fcb43 Language: follow the system language by default (#10138) (#10183)
* claim: #10138

* Follow the system language on a first start (#10138)

The language preference defaults to a new 'system' value: the OS locale
(sys-locale) is matched against the catalog list - exact tag, base
language, then English - and a System choice sits at the top of the
Preferences language list. A saved language still wins.

* Drop the explicit deref clippy flagged; regenerate THIRD-PARTY-LICENSES.txt for sys-locale

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 19:50:08 +00:00
Ben Rog-Wilhelm 8be56316f6 Sketch Chamfer: several corners at once, as Fillet does (#8998)
The three sketch chamfers take `points: [corners]` (a point reference or
{a, b} each), as sketch.fillet does: every corner is cut alike in one
edit, and a corner that can't be cut, or is named twice, refuses them all.
The Chamfer window sends every picked corner instead of refusing a second.


Claude-Session: https://claude.ai/code/session_01PVKpSVXR9iiwSM9B25kpvq

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 19:28:14 +00:00
github-actions[bot] eda51873aa Regenerate generated files and fold pending files [skip ci] 2026-10-31 19:33:49 +00:00
Colin Faulkingham d4144ddf9b Select: resolve faces and edges from a point or index (#10171) (#10191)
* claim: #10171

* fix(select): resolve faces and edges from a point or index
2026-10-31 19:11:54 +00:00
Dahak Builds c39f44e190 Orbit ignores floating input fields passing under the cursor (#10128) (#10206)
* claim: #10128

* Orbit ignores floating input fields passing under the cursor (#10128)

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 19:04:33 +00:00
clark19990 5b8d8416e9 Navigation: an NX mouse mapping (#10156)
* Navigation: an NX mouse mapping

NX's CAD1 scheme drags the middle button to rotate, middle + left to zoom and
middle + right to pan. The mouse mappings here hold one button at a time, so
the preset takes the middle drag with Shift (pan) and Ctrl (zoom) for those two
drags, leaves the right button to the context menu, and fits on a middle
double-click as NX does.

The help text says which NX drags the modifiers stand for.

* Navigation NX note: translations for the complete catalogs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Navigation NX note: use the message id nav.nx.help in the pending file

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: clarkliu <277482660@qq.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 18:44:45 +00:00
github-actions[bot] 1f2356fa7b Regenerate generated files and fold pending files [skip ci] 2026-10-31 19:06:16 +00:00
github-actions[bot] e29e32f197 Regenerate generated files and fold pending files [skip ci] 2026-10-31 19:00:09 +00:00
kaltenbrunnermarkus 76e009ab10 Viewport: blend grid levels while zooming instead of popping (#9570) (#9608)
* claim: #9570

* Cross-fade the viewport grid between levels while zooming (#9570)

grid_step switches the spacing in a step (1, 2, 5 times a power of ten), so
the whole grid swapped at once as the view zoomed through a switch and
popped over and over while scrolling. Near a switch the drawn grid now
draws the outgoing and incoming levels together, weighted by a smoothstep
over about 19% of zoom either side, each level's lines on their own places
on the plane so a fading level never shifts. A line both levels share is
drawn once; its colour and width blend between minor and major.

grid_step itself is unchanged, so sketch snapping, dash lengths and the
tools keep their spacing; the dominant drawn level is always grid_step's.
The viewport and the headless picture share grid_lines, so they still draw
the same grid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fade out the fine grid before a non-nested coarser level appears (#9570)

The levels go 1, 2, 5 times a power of ten. From 1 to 2 and from 5 to 10
every coarser line is also a finer one, but 5 is not a multiple of 2, so
cross-fading the 2 and 5 levels drew lines at 0, 2, 4, 5, 6, 8, 10 mm at
once, which looked restless.

At that switch the finer level's own lines now fade out over the first
half of the cross-fade and the coarser level's own lines fade in over
the second, so the two are never drawn together. The lines both levels
share (every 10 mm, the finer level's major lines) stay at full strength
throughout, so the grid never goes blank. The cross-fade spans the same
zoom range as before, and the nested switches cross-fade as they did.

grid_levels keeps its shares (adding up to 1, grid_step's level the
stronger one); grid_lines draws a line only one level has as strongly
as that level's own lines. The headless and viewport tests now check
half strength at the nested 5 to 10 switch and no 2 or 5 mm line right
at the 2 to 5 switch; a new test zooms through 2 to 5 in four decades.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 18:35:49 +00:00
froglemonade2 441d67f9ff View cube and axis gizmo: a standard view centres and fits the model (#10091) (#10092)
* claim: #10091

* View cube and axis gizmo: a standard view centres and fits the model (#10091)

A new Navigation preference, "Fit the model after a navigator view change"
(`navigator_fit`, off by default): with it on, a face, corner or arrow of
the view cube and an axis tip of the gizmo look at the middle of the model
from the one distance that fits its bounding sphere, so Home, an opened
design and every view chosen on a navigator share one zoom and one centre
and only the direction changes. Off, both navigators turn in place as
before.

"Home and Fit size" (`home_fit_size`, 10–100 %, default 100 %) is how much
of the view between the panels and the controls the model fills when Home,
Fit, an opened design or a navigator view change frames it; 100 % is the
framing as before.

`view.navigate` takes an optional `fit: true` with a direction or a turn,
so programmatic callers get the same framing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-31 18:34:13 +00:00
semmelrinde 6541a4e980 Assistant: the agent list and the boxes under the switcher keep the panel's margin (#10172) (#10179)
* Assistant: the agent list and the boxes under the switcher keep the panel's margin (#10172)

The agent switcher above them sits in the panel's side margin, but what
the panel draws under it before a connection (the Agent row with Add
agent and Refresh, the agents found, what isn't installed, the New chat
confirmation and the sign-in box) started at the panel's very edge, and
Refresh was cut off at the right. They now keep the same side margin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Assistant: test that the agent list keeps the panel's side margin (#10172)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Assistant: the margin test passes the labels without a needless borrow (#10172)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 18:31:55 +00:00
thocsmith 85197c1224 Selection: a freehand lasso that takes what is fully inside it (#4376) (#10185)
* claim: #4376

* Selection: a freehand lasso that takes what is wholly inside it (#4376)

The SELECT panel gets a Lasso checkbox (UiState::lasso_select, ui.set
lassoSelect). With it on, a primary drag from empty space draws a
freehand loop; the release selects through the same path as the window
box: items whose points are all inside the loop and no segment crosses
it, so a concave loop leaves out a curve that bulges out of it. Shift
and Ctrl add as with the box. ui.drag takes via waypoints (and scenario
drag steps take more than two points) so agents and tests can draw it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: thocsmith <193096300+thocsmith@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 18:31:21 +00:00
Colin Faulkingham ed66adac5c Keep renamed bodies visible when reusing hidden names (#10163) (#10175)
* claim: #10163

* fix(engine): preserve visibility when renaming into hidden names
2026-10-31 18:15:56 +00:00
ABDULLAH e88295ceba Arabic: isometric view wording in the Extrude view preference, equation curve range unit option and note, quoted menu names in the graphics card note, tanween spelling (#10189)
* Arabic: isometric view wording in the Extrude view preference

* Arabic: equation curve range unit option and note read naturally

* Arabic: tanween spelling in the new bold-font and delete-first messages, menu and option names quoted in the graphics card note
2026-10-31 18:15:34 +00:00
Kyle a.k.a. TechSquidTV aeca117045 Sketch: offset chains lines whose corners are coincident (#5019) (#8858)
* claim: #5019

* sketch offset: chain lines whose corners are coincident, not only shared

Lines drawn one by one meet at their own points held by Coincident
constraints. The offset walked shared points only, so each such line was
offset on its own, to the left of the way it was drawn: a closed
rectangle came apart, both horizontals moving up. The same split shows
next to a fillet or chamfer, whose other corners stay Coincident pairs.

Chain ends held by a Coincident constraint as one joint, the way
Sketch::chain() and axis_implied already do, so a closed outline offsets
as one closed shape.

Fixes #5019.

* test(sketch): cover coincident offset loops after trim and blends

* refactor(sketch): share and cache coincident endpoint groups
2026-10-31 17:37:38 +00:00
Dahak Builds 31326e9898 Frames: renaming a cut-off piece of a frame member renames a different member after a rebuild (#10123) (#10132)
* claim: #10123

* Frames: a renamed cut-off piece keeps its own name through a rebuild (#10123)

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 17:32:32 +00:00
github-actions[bot] a9e9f8b82b Regenerate generated files and fold pending files [skip ci] 2026-10-31 17:36:03 +00:00
austin62jake 8558b37e44 Edit dialogs: a stored number shows with its unit, Fillet, Chamfer, Shell, Draft and more (#1936) (#8697)
* claim: #1936 (Fillet, Chamfer, Extrude, Shell and Draft edit dialogs)

* Fillet, Chamfer, Shell and Draft: a stored number edits with its unit (#1936)

Their edit dialogs showed a value stored as a bare number as it was, so a
fillet made with a radius of 2 opened as "2" and a chamfer angle of 30 as
"30", where the other dialogs, and since #2107 the Plastic ones, read
"2 mm" and "30 deg". The Fillet radius, the Chamfer distances and angle,
the Shell thickness and the Draft angle now go through shown_expr, as the
Plastic dialogs do.

Extrude is left as it is: its editor keeps an unchanged expression exactly
as stored (extrude_edit_tests), and writing the unit would change it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Offset Face, Stock, Offset Plane, Plane at Angle, Pipe and Emboss too (#1936)

The rest of the dialog_descriptors! table's length and angle fields that
copied the stored text as it was now go through shown_expr as well: the
Offset Face distance, the Stock margin, the Offset Plane offset, the Plane
at Angle angle, the Pipe diameter and wall, and the Emboss depth. Scale's
factor has no unit and still shows as stored.

The test also edits an offset face, a stock and an offset plane.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Revolve, Thread, Rib and Web too (#1936)

The custom edit paths that copied a stored length or angle as it was now
go through shown_expr as well: the Revolve angle, the Thread length, and
the Rib and Web thickness and depth. The test also edits a revolve.

The Rectangular and Circular Patterns stay as they are, like Extrude:
their editors keep an unchanged definition exactly as stored
(preselect_tests::feature_mirror_and_patterns_reopen_as_feature_replays_even_for_body_creators).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 16:58:34 +00:00
Colin Faulkingham aa244bcee4 Fix copying drawn 3D sketch curves (#10134) (#10146)
* claim: #10134

* fix: copy drawn 3D sketch curves (#10134)
2026-10-31 16:53:47 +00:00
PaddleStroke eaf3acc297 Colour popover: step buttons, HSV fields and recent colours (#9234) (#9398)
* claim: #9234

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Colour popover: step buttons, H/S/V fields and recent colours (#9234)

Every colour field of the app opens the same ui_kit popover. It gains:
- step buttons beside each number (R, G, B and the new H, S, V): a press
  steps once, holding repeats, for live fine-tuning;
- H (degrees), S and V (percent) fields on the same gamma HSV as the square;
- a row of the last 12 colours picked in any colour field. A colour joins
  when an edit is finished; fine-tuning in one opening replaces its entry.
  The list is saved with the app's settings (`recent_colors`), hostile
  saved entries dropped and the list capped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Recent colours: keep the shared list outside ui_kit, crate-visible only (#9234)

The store and the per-frame sync with the saved settings move to
crate::recent_colors; the ui_kit colour popover only shows the list and
adds finished picks. No plain pub escape from the gallery's ui_kit rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:51:56 +00:00
semmelrinde c392791f2c Sketch drag: a step that throws points far from the sketch, or presses a line to no length, counts as failed (#8600)
* Sketch drag: a step that throws points far from the sketch counts as failed

A held step of a drag that moved a point more than 1000 times the sketch's
size plus the drag's way was taken as solved, so a drag could leave points
around 1.4e6 mm away while reporting it reached the cursor. Such a step now
fails like one the solver cannot solve, and the cursor correction refuses it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch drag: a step that presses a line to no length counts as failed too

An end dragged past the point where its line would have to turn over (a
line held at its midpoint and by an angle, dragged past the midpoint; a
rectangle's corner dragged across the opposite side) pressed the line to no
length, where it has no direction left for its constraints. A step leaving a
line under 1/1000 of its length at the drag's start now fails like one that
throws points far away, so the drag stops just short of it (48 such drags in
4000 random sketches, none with this).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:45:35 +00:00
rvmzym5xv8-star 0fb2e9b06b MCP batch: refuse a command entry with an unknown key (#7854) (#7865)
* claim: #7854

* MCP batch: refuse a step with an unknown key (#7854)

A step's parameters under another key (`args`) were dropped and the
command ran without them. The batch is now refused before its first
step, naming the key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* MCP batch: a step carrying `expect` is refused, saying it is the batch's argument

#9904 gave batch an `expect` argument and tested that a step carrying one runs with
nothing checked. That is the silent drop this branch refuses: the step is now refused
before it runs, and the error says `expect` belongs to the batch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:26:23 +00:00
clark19990 b410c577e0 Light a feature's faces when it is selected, even after a later edit renamed them (#9848)
* Light a feature's faces after a later edit renamed them

Selecting a feature in the Browser or the timeline lights its geometry on the
model, by the face names the feature gave (`F<feature>:…`). A later edit that
moves or renames those faces (Offset Face, Replace Face, Delete Face) leaves
them named after whatever last touched them, so selecting the earlier feature
lit nothing.

When no face carries the feature's name, compare the model states either side
of it instead: a face whose name is new, or whose area, centroid or plane
moved, is a face the feature changed. Each is found on the body as it is now
by its name, or by a parallel plane and nearest centre, so a face a later
feature moved again is still lit.

The Browser row of the feature a picked face belongs to already lights; that
is unchanged (a body row lights too, as #3009 asks).

Test: a box raised twice with Offset Face; selecting the first raise lights
the face the second one renamed.

* Browser: light the feature of a picked face, not its whole body

Picking a face in the view lit the body's row as if the body were selected,
which in NX is not what a face pick shows: the Part Navigator marks the
feature the face belongs to. Faces, edges and vertices no longer light their
body row; the feature row of the picked face shows as selected instead
(`picked_feature`), while the session's selection stays the face or edge, so
Replace Face, sketches and the rest keep the pick they take.

The live face of the view still lights the face itself; the timeline already
marked the feature of a picked face and is unchanged.

Tests: the browser's 178 tests pass (selection arrays unchanged; only the
rows lit differ).

---------

Co-authored-by: clarkliu <277482660@qq.com>
2026-10-31 16:26:05 +00:00
semmelrinde d95b8208b3 Sketch Fillet: a radius of half a side rounds both its corners (#2500) (#8238)
The second fillet of a side whose radius is half its length needs all
that is left of the line, and was refused as too large. Such a fillet
now takes the whole line: the line goes, the arc ends where the line did
and is tangent to the curve that goes on from there. A 20 x 10 rectangle
filleted with r = 5 becomes a slot, a 10 x 10 square a circle. Several
corners in one call keep their arcs by id, as removing a line renumbers
the curves.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:15:20 +00:00
semmelrinde 99f8cff454 Sketch Fillet: a corner held by Coincident takes a fillet when a dimension measures to it (#7507) (#7778)
* claim: #7507

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch Fillet: a corner held by Coincident takes a fillet when a dimension measures to it (#7507)

Before rounding a corner whose two lines meet only through a
Coincident constraint, Fillet and Chamfer weld the two points into
one, but not when anything else referred to the second line's point,
such as a dimension measuring to the corner: the fillet was then
refused ("the lines must share a corner point"). The point is now
welded as well, and what referred to it refers to the corner, the
same place. A point that a constraint names together with the corner,
or a linked point, is still not welded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:15:04 +00:00
semmelrinde 3292cba4ad Sketch Fillet and Chamfer: two lines that share no end are brought to where they meet (#6912, #7759) (#8426)
Two selected lines that stop short of each other or cross were refused
with "the lines must share a corner point". Now each line's end on the
shorter side of their meeting point moves there first (extending a line
that stops short, cutting a line that runs past), and the corner is
rounded or cut as before. Parallel lines, ends held by other geometry
and lines whose length is held are refused and change nothing.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:14:40 +00:00
semmelrinde 6fa023b3ab Sketch Break: refuse an offset's curves, as Trim and Extend do (#8645)
An offset's ends follow its source curves on every solve, so a break's new
ends were pulled back: a broken offset arc came out in three pieces going
the long way round, and the solve moved curves the break never touched.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:14:14 +00:00
lewis2e 510378d965 Sketch offset: an offset circle no longer reports a degree of freedom (#9264) (#9573)
The offset sets an offset circle's radius from its source after the solve,
but the solve still counted that radius as a free unknown, so a
dimensioned circle and its offset reported 1 DOF instead of 0. Lines and
arcs were not affected: the offset already holds their end points. The
solve now holds an offset circle's radius too.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:12:29 +00:00
github-actions[bot] c8a9159ac5 Regenerate generated files and fold pending files [skip ci] 2026-10-31 16:47:49 +00:00
github-actions[bot] fca86a414e Regenerate generated files and fold pending files [skip ci] 2026-10-31 16:39:00 +00:00
Colin Faulkingham b76fcae341 Preferences: retain Show tool at cursor between sessions (#10033) (#10049)
* claim: #10033

* fix(ui): persist tool cursor preference (#10033)
2026-10-31 16:10:37 +00:00
phanoob e64202417f Pattern and Mirror dialogs: explain Object Type, and say why a sketch is not taken (#10057) (#10097)
* claim: #10057

* Pattern and Mirror dialogs: explain Object Type, and say why a sketch is not taken (#10057)

The Object Type row of the Rectangular, Circular and Path Pattern and Mirror
dialogs gets a tooltip saying what Bodies and Features are and that a sketch
is neither. A sketch clicked for their objects, in the view, the Browser or
the History, now shows a hint naming what to pick and what to do with a
sketch instead of being ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:10:09 +00:00
PaddleStroke 6a4b5c90c8 Properties: measure faster, show progress, and stop when closed (#8706) (#8730)
* claim: #8706

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Properties: measure faster, show progress, and stop when closed (#8706)

Properties on a large assembly measured every placed copy of every body
afresh (transform plus three fine tessellations each), so it took minutes.
#5203 (in #8103) already moved the measurement beside the window; this
builds on it.

- A rigid placement reuses the body's own cached measurement: volume, area
  and counts unchanged, centre placed, box from the placed corners (quarter
  turns) or from the body's shared mesh placed (other turns). Scaled or
  mirrored placements are still measured as placed.
- Bodies are grouped by component once and the subtree traversal groups
  occurrences by parent once (both were quadratic).
- The measurement beside the window is watched by a Progress: the card
  says "Measuring... n of N bodies" with a bar, and closing it (or
  switching designs) cancels the worker at its next body instead of
  leaving it running.
- component.properties and occurrence.properties are answered on a copy for
  control-channel requests too, as inspect.measure is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Properties: count the measuring work instead of timing it in the reuse test (#8706)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:04:38 +00:00
Colin Faulkingham 2e981d66e8 Sketch: allow dimension edits with tangent caps (#4823) (#9494)
* claim: #4823

* fix: resize sketches with tangent offset caps (#4823)
2026-10-31 16:04:29 +00:00
PaddleStroke ef0914ff94 Design tabs: optionally keep each design's dialog, tool and toolbar tab (#9360) (#9656)
A switch between design tabs cancels the open dialog and tool of the design
left and shows MODEL. With the new Interface preference "Keep dialogs and
tools open when switching designs" (keep_work_on_tab_switch, off by default)
each tab keeps its dialog (with its picks and values), its editing state, its
tool and its toolbar tab, and has them back when it is shown again. A feature
still computing after OK is cancelled as before. A feature edit's saved source
revision follows the view refresh of the switch, so its Cancel still restores
the history.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:04:22 +00:00
froglemonade2 0476154973 Update Links: linked designs that changed while the tab was away come back as one undo step (#9743) (#9753)
* claim: #9743

* Update Links: linked designs that changed while the tab was away come back as one undo step (#9743)

Coming back to an assembly's tab read each changed link in an Update Links
run of its own, so each became its own undo step: one Undo took back one
component and left another copy of the same part at the new version.

component.update_links now takes `components`, a list, and goes on past a
design it cannot read: that link keeps its bodies, is named in `failed` and
gets a warning. The tab return sends one request with every changed link,
records as read only the ones that were, and says on the status line which
one could not be read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:04:05 +00:00
Thodoris Tsagkogeorgas 5e265089c7 Sketch: offset corners trim when they cross and extend when they fall short (#10089)
The chain walk follows ends that share a point, a coincident constraint, or
the same position. The offset then meets at the intersection.
2026-10-31 16:03:31 +00:00
semmelrinde 31a0c99a2c Delete: the delete runs with what its check computed ahead, instead of building the history again (#9917) (#10090)
* Delete: the delete runs with what its check computed ahead (#9917)

With the history rolled back, a delete builds the history after the
marker to see what it breaks, once in the check that runs off the window
thread (Session::ahead) and once more in the delete itself, on the window
thread. The check's results were lost on the way: the dry run's scratch
session and the whole-history copy dropped what the model keeps, and the
check's kept results never reached the delete. The scratch and the copy
now keep what their model keeps, and the delete (at once or after the
confirmation) runs with the check's kept results, so it finds the
history there instead of building it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Delete: test that a confirmed delete runs with what its check kept (#9917)

With the history rolled back, deleting a side of the plate's outline is
checked off the window thread and confirmed first; the confirmation
carries the check's kept results, and the delete adds nothing to them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:19:57 +00:00
Dahak Builds ce3b0d4086 Hide the origin point behind bodies like the axes and planes (#10050) (#10103)
* claim: #10050

* Hide the origin point behind bodies like the axes and planes

The origin point is a flat dot painted after the 3D scene, so it always sat
over bodies while the axes and planes respect the through-bodies rule
(#2697, #2618). Ask the meshes the same question the depth test asks the
axes: is a nearer kept face in front of the origin along the view ray.

Fixes #10050

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 15:14:46 +00:00
austin62jake d782d45cce Sketch: a centre rectangle's centre lines up with the axes when dragged (#10086) (#10087)
* Sketch: a centre rectangle's centre lines up with the axes when dragged (#10086)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: a centre rectangle's centre lines up with the axes when dragged (#10086)

A centre rectangle's centre is held at the middle of a construction
diagonal (Midpoint), on none of its curves. Dragged by the centre, the
rectangle's own lines stayed snap targets and held the centre at their
middle, so it never lined up with the origin; dragged as a whole, the
centre wasn't a moving point, so only the corners lined up.

drag_snap::moving_points now takes all dragged entities at once and
treats a point held at a line's middle as going where the line's ends
go: it moves with a line whose two ends move, and when it is dragged
its line and the shape round it are no targets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 14:31:19 +00:00
Dahak Builds 9a44641970 Fix Circular Pattern dialog showing two fields active at once (#10066) (#10078)
* claim: #10066

* Keep one dialog field active at a time (#10066)

Pick fields drew their accent ring from the dialog's active-input index
while text editors drew theirs from egui keyboard focus, so a Circular
Pattern dialog could show Axis and Quantity active together. A pick
field now drops its ring while a text editor holds the keyboard, and
clicking a pick field (or its clear button) takes the keyboard back.
Selection routing (d.active) is unchanged.

* Format editor_has_focus onto one line

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 14:01:09 +00:00
austin62jake 2b1ca94e2d Navigation: wheel and trackpad gestures go on under a value box (#10061) (#10073)
* Navigation: wheel and trackpad gestures go on under a value box (#10061)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Navigation: wheel and trackpad gestures go on under a value box (#10061)

Any area above the model took navigation's wheel input, so a two-finger
pan, orbit or zoom stopped as the pointer crossed a floating value box
(Extrude's distance), and none could start over one. Model-anchored
canvas areas (Surface::Canvas: value boxes, a dimension's editor,
readouts) scroll nothing: navigation's wheel, trackpad pan and orbit and
pinch now go on under them. Their clicks stay theirs, and with value
stepping on the wheel stays with the value under the pointer.

Container::area records the canvas areas it builds; navigation asks
whether the top layer under the pointer is one (container::is_canvas).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 14:01:05 +00:00
github-actions[bot] f30fce0fc1 Regenerate generated files and fold pending files [skip ci] 2026-10-31 14:25:05 +00:00
github-actions[bot] f4b74fcb1b Regenerate generated files and fold pending files [skip ci] 2026-10-31 14:17:58 +00:00
semmelrinde 59efc86826 Rename Body: a pasted placement's body renames by the name the browser shows (#10017) (#10026)
* Rename Body: a pasted placement's body renames by the name the browser shows (#10017)

The browser lists the bodies of a component's second placement by their
placed names (`KB (K:2)`) and the context menu's Rename sends that name,
but body.rename looked it up only among the model's own bodies and
refused it ("no body"). It now takes a placed copy's name as the body it
shows, as appearance.assign does (#9740): the body is renamed in its
component, so every placement shows the new name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Rename Body: test renaming a pasted placement's body by its placed name (#10017)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Rename Body: the test also hides the copy first and undoes the rename (#10017)

A copy hidden by its placed name stays hidden under its new name, and
one undo brings both names back (checks from the review on #10026).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:48:14 +00:00
leValdemar19 24ce89e0fc Modify ▸ Delete with nothing selected asks for a pick instead of a parameter error (#9079) (#9114)
* claim: #9079

* Modify ▸ Delete with nothing selected asks for a pick instead of a parameter error (#9079)

Starting `timeline.delete` from the ribbon, the command palette or the
control channel ran it with no parameters, so the notice showed the
engine's check ("`features` must list features, or `groups` timeline
folders"). It now deletes what is selected, as the Delete key does, and
with nothing selected shows a hint saying what to pick, changing nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:35:33 +00:00
rugbymauri a476e645b0 Browser: F2 renames a selected group (#10005) (#10013)
* claim: #10005

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

* F2 renames a group clicked in the Browser (#10005)

A group has no selection of its own: clicking its Browser row only
records it as the picked folder, which V uses. F2's rename_selection
looked only at the selection, picked components and canvases, so on a
group it did nothing, or renamed a body that was still selected.

F2 now takes a clicked group row first, as V does, and opens the same
Rename box as the group's context-menu Rename, which commits through
browser.rename_group. This works for groups inside components as well.

Fixes #10005

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

---------

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
2026-10-31 13:35:26 +00:00
leValdemar19 3385d1c570 Viewport: dark parts keep their shape: linear-light shading and a sky fill (#7974) (#9028)
* claim: #7974

* Viewport: dark parts keep their shape: linear-light shading and a sky fill (#7974)

Preferences > Graphics "Keep the shape of dark parts" (off by default)
shades the viewport in linear light: the key light and eye fill over a
sky fill that grows as a face turns up, plus the 4% of that sky every
dielectric reflects (a little more toward grazing), encoded to sRGB
once. Near-black faces keep a gradient; light and mid-grey faces stay
within a few levels of the sRGB shading. The world's up direction and
the switch ride in a new `sky` vec4 at the end of the viewport uniform,
and the frame key, so turning it on redraws. Off, the shader takes the
old path unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:30:07 +00:00
austin62jake f0acea0992 Preferences: a shortcut recorded from a search result takes the key (#10043) (#10058)
* Preferences: a shortcut recorded from a search result takes the key (#10043)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Preferences: a shortcut recorded from a search result takes the key (#10043)

A Preferences search lists matching shortcuts with their key buttons,
but a recording started there only counted while the Shortcuts page
itself was open, and the page skipped its recorder during a search: the
key went into the search box and ran its command behind Preferences.

keymap::capturing now counts a recording while a search shows, and the
recorder runs for it; clicking back into the search field stops the
recording, so the search keeps its own typing. The recording's message,
a taken key's Use anyway / Cancel choice and the next-step hint show
above the search's shortcut matches too (outcome, shared with the page).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 13:28:40 +00:00
Colin Faulkingham 6047c0d5a1 Viewport: keep the ground grid stable through grazing views (#10014) (#10031)
* claim: #10014

* fix(ui): stabilize the ground grid near the horizon
2026-10-31 13:28:34 +00:00
Dahak Builds 34c378c063 Save As: rename the design to the new file's name (#4907) (#10036)
* claim: #4907

* Save As: rename the design to the new file's name when its name was borrowed (#4907)

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 13:22:10 +00:00
github-actions[bot] dc6e25250c Regenerate generated files and fold pending files [skip ci] 2026-10-31 13:48:06 +00:00
ashxddaga 2e22ff8035 fix(ui): disable bold in Edit Text when font has no bold face (#9940) (#9958)
* fix(ui): disable bold in Edit Text when font has no bold face (#9940)

- Check whether font has bold face via font_data_styled() before enabling bold toggle
- Automatically uncheck bold and disable bold button with explanatory tooltip for built-in font
- Prevent sending bold: true in sketch.edit_text when font lacks bold face
- Add unit regression test in sketch_text::tests

Fixes #9940

* style: format choice.rs in ui_kit

* i18n: move sketch_text.no_bold to pending locale catalog with complete translations

* test(sketch_text): assert disabled bold on built-in font without error (#9940)
2026-10-31 12:57:46 +00:00
rugbymauri cb9b50b11e Assistant: switching models no longer reports "Method not found" for session/set_model (#9970) (#10022)
* claim: #9970

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

* Agent chat: no error when an agent does not serve session/set_model (#9970)

An ACP agent can list models in the unstable `models` field of its
session/new reply without serving `session/set_model`; it answers
JSON-RPC -32601 and the Assistant showed that as an error each time the
model was switched. Agents that offer the model as a configuration option
already go through session/set_config_option. A -32601 reply to
session/set_model is now logged at debug level instead of shown; every
other error still shows.

Fixes #9970

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

---------

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
2026-10-31 12:51:26 +00:00
github-actions[bot] a22aeaaf93 Regenerate generated files and fold pending files [skip ci] 2026-10-31 13:19:38 +00:00
semmelrinde d4eeedbf95 Delete: in a rolled-back history, the check builds the history once when nothing breaks (#9917) (#9972)
* Delete: the check in a rolled-back history builds the history once when nothing breaks (#9917)

With the history rolled back, the check before a delete (which features
the delete would break) built the whole history twice, before and after
the change, with the marker removed. On a large design each build ran
every boolean after the marker: deleting twelve splines took half a
minute on the window thread. Only a feature that fails after the change
can be newly broken, so the history after it is built first, and when
nothing fails there the history before it isn't built at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Delete: test that the check in a rolled-back history still reports what breaks (#9917)

Deleting a hole in the plate changes the plate and every cut after the
marker and breaks none of them: the check reports nothing. Deleting a
side of the outline breaks the plate, and the check still says so, with
a cache too small to keep a state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:29:30 +00:00
Colin Faulkingham c512c8e86a Feature editor: close when its feature is removed (#9394) (#10027)
* claim: #9394

* Fix stale feature editors after Undo and deletion (#9394)
2026-10-31 12:26:46 +00:00
SilentWolf75 1bcc1125f0 Graphics: apply the chosen card, or say when it could not (#8341) (#9252)
* claim: #8341

Co-authored-by: Cursor <cursoragent@cursor.com>

* Graphics: keep a preferred card when surface marks it incompatible (#8341)

Prefer the saved adapter by exact then case-insensitive name, including when only listed as surface-incompatible, and explain in Preferences when another card is still in use.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Format and clippy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:00:52 +00:00
ashxddaga 7c013333db feat(engine,ui): allow restricting point-to-point align to chosen axes (#9946) (#10015)
* feat(engine,ui): allow restricting point-to-point align to chosen axes (#9946)

* style: apply cargo fmt across crates

* fix(clippy): use filter then map instead of bool::then in filter_map
2026-10-31 12:00:17 +00:00
kaltenbrunnermarkus 7e0f8a9a4c History: build the row plan once per revision and draw only the visible rows (#9616)
* claim: History: build the row plan once per revision and draw only the visible rows

* History: build the row plan once per change and draw only the rows in view

The vertical History worked out its rows from the design on every frame: for each row it
searched every folder's last feature (cubic in features and folders), cloned every name, and
looked up each row's result, sketch and selection by a linear search. It also drew and
hit-tested every row, including the ones scrolled out of view.

- The row plan (features, folders' depth, extent, header places, contents and joints, the rows
  with listed sketches, which sketches have patterns) is built once per design change, keyed
  by session, revision, marker, counts and the "Sketches: under their feature" choice, and kept
  in the egui context; the visible order is kept beside it until a folder or fold opens.
- A feature row outside the scroll area's clip takes its place and publishes its handles, but
  is not drawn or made interactive; one being found, dragged or focused, or under an open
  menu, is drawn as before.
- Selection and results are collected once per frame; folder rows read their contents from
  the plan.
- The horizontal strip collects the picked features (selection and dialog items) once per
  frame and writes a chip's tooltip only while it shows.

Tests compare the plan with the per-frame searches it replaced on tangled folders in every
fold state, the kept plan with a fresh one after each kind of change, and the History drawn
with every row against the culled one (same places, same text in view, fewer rows drawn).
An ignored test times the panel on a large design.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Drop a needless borrow

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>
2026-10-31 11:54:50 +00:00
SilentWolf75 18e200f262 UI: recover chrome after sleep wakes a black window (#8749) (#8952)
* claim: #8749

Co-authored-by: Cursor <cursoragent@cursor.com>

* Recover egui chrome after a long pause between frames.

Sleep/wake can leave the window black while the GPU device stays up: re-upload
the font atlas, clear cached icon textures, and repaint when the frame clock
jumps so the ribbon and panels are not stuck blank (#8749).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Format

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:54:16 +00:00
github-actions[bot] bd0f0f3471 Regenerate generated files and fold pending files [skip ci] 2026-10-31 12:39:18 +00:00
github-actions[bot] e39d741862 Regenerate generated files and fold pending files [skip ci] 2026-10-31 12:30:11 +00:00
austin62jake ea9ea7bba8 Sketch: a driven dimension nothing fixes any more takes a value again (#10018) (#10023)
* Sketch: a driven dimension nothing fixes any more takes a value again (#10018)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: a driven dimension nothing fixes any more takes a value again (#10018)

A dimension placed while a constraint fixed what it measures goes in
driven, and stayed driven once that constraint was deleted: a
double-click only said it has no value to edit. The double-click now
tries making it driving on a scratch copy; when nothing else fixes it,
the value box opens at the measured value, and Enter makes it driving
(sketch.toggle_driven) at the typed value (parameters.change) in one
undo step. A refused value goes back to a checkpoint, so it stays
driven. While something still fixes it, it stays read-only as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 11:53:42 +00:00
sascha2101 07fa5e4f1f Sketch: Project gives its new curves the selected line type (#9945) (#10009)
* claim: #9945

* Sketch: Project gives its new curves the selected line type (#9945)

The sketch palette gives the drawing line type (construction, centerline, infinite) to the
curves a SKETCH › CREATE command reports under `curves`. Project reports what it made per link,
`links[].curves`, so its curves were never found and stayed normal lines whatever the palette
said. `apply_mode` now also reads the links' curves, so a projected line becomes construction,
centerline or infinite and a projected circle construction, in the projection's own undo step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMbqRqYimvY26QzcvrojSC

---------

Co-authored-by: sascha2101 <221609842+sascha2101@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:40:14 +00:00
semmelrinde 2a51f42495 Serbian: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#10001)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:25:34 +00:00
HiroKenEz 8f259d5b83 Sketch: the Line tool can switch to a tangent arc and back without changing tool (#9489) (#9553)
* claim: #9489

* Sketch: the Line tool can switch to a tangent arc and back without changing tool (#9489)

With Preferences > Sketch > "Rest on a line's last point to switch to a
tangent arc" on (off by default), leaving the chain's last point and resting
back on it for 0.35 s makes the next click a tangent arc, by the existing
sketch.arc.tangent command, and the same gesture goes back to lines. A label
at the cursor says which. sketch.arc.tangent's end can now name an existing
point, so an outline drawn this way closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: the cursor label names the command in words (#9489)

The label asked the catalog for a message id that doesn't exist, so it showed
the id. It now takes the command's translated label, and the test checks the
words it paints. Moved clear of the pointer's own badge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:21:59 +00:00
semmelrinde a6b9d5a5b2 Browser: a sketch shown before an Extrude still hides once it is used (#9954) (#9971)
Show/Hide put every sketch it showed in `shown_sketches`, the list of
finished sketches kept shown although a feature uses them. Hiding and
showing a sketch nothing used yet put it on that list, so once an
Extrude used it, it stayed shown instead of hiding itself as a sketch
never hidden does. Show now marks only a sketch a feature already uses;
one nothing uses is shown anyway and leaves the list alone.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:19:34 +00:00
semmelrinde 18e4b9ea9f Bosnian: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9999)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:19:27 +00:00
semmelrinde 7cccb2b52e Croatian: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#10000)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:19:21 +00:00
semmelrinde 7d7a1ecfa5 Russian: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#10002)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:19:04 +00:00
semmelrinde 1202a79e25 Danish: translate the 349 messages main gained after batch 9, the toolbar's command help included (batch 10) (#10003)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:18:58 +00:00
semmelrinde fbafdfdcb6 Ukrainian: translate the 349 messages main gained after batch 9, the toolbar's command help included (batch 10) (#10004)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:18:52 +00:00
semmelrinde 2744063631 Norwegian Bokmål: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9998)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:17:23 +00:00
Frank 8e53d5050e View corner Cancel: cancel an unfinished tool before the sketch (#6709) (#9584)
* claim: view corner Cancel cancels an unfinished tool first (#6709)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* View corner Cancel: cancel an unfinished tool before the sketch (#6709)

With OK and Cancel in the view's corner on, the cross took the whole sketch
even with a line half drawn. It now takes the steps one Esc takes first (a
drag, Select Other, the tool's points, then the tool) and cancels the sketch
only when nothing is unfinished. Esc and the cross share cancel_unfinished.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:12:36 +00:00
github-actions[bot] fde56d3c8b Regenerate generated files and fold pending files [skip ci] 2026-10-31 12:05:01 +00:00
github-actions[bot] 81a6a3dcde Regenerate generated files and fold pending files [skip ci] 2026-10-31 11:55:25 +00:00
Colin Faulkingham 3eb76a8b3b Agent chat: continue after creating or opening a design (#7526) (#9980)
* claim: #7526

* Agent chat: continue across agent-initiated design changes
2026-10-31 11:12:00 +00:00
semmelrinde 60de59d5a9 Czech: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9984)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:11:54 +00:00
semmelrinde ad0b5c9d05 Hungarian: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9986)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:11:48 +00:00
semmelrinde ff08eb0043 Italian: translate the 371 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9987)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:11:41 +00:00
semmelrinde 6bfd53a55a Dutch: translate the 371 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9988)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:11:35 +00:00
semmelrinde 709cb62fe8 Romanian: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9989)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:11:29 +00:00
semmelrinde ee4786cd8f Swedish: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9991)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:11:23 +00:00
semmelrinde 6a4fef151f Turkish: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9992)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:11:16 +00:00
semmelrinde d3574dd493 Traditional Chinese: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9993)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:11:10 +00:00
semmelrinde d2a3430147 Malay: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9995)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:11:04 +00:00
semmelrinde 598556bca9 Indonesian: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9996)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:10:58 +00:00
semmelrinde 80341ec13b Galician: translate the 373 messages main gained after batch 9, the toolbar's command help included (batch 10) (#9997)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:10:52 +00:00
github-actions[bot] 7be5d93e51 Regenerate generated files and fold pending files [skip ci] 2026-10-31 11:28:33 +00:00
HiroKenEz 5bb3b6717f Equation curves: the variable can carry its range's unit (#9333) (#9549)
* claim: #9333

* Equation curves: the variable can carry its range's unit (#9333)

A curve can set variable_unit "range" (or tick the new box in its window): the
variable is then a length, so a ^ 2 / (4 * t) is a length when a is one. Start
and end must both be lengths, or one a length and the other a plain number in
the design's unit; anything else is refused. Saved only when set, as one pending
format change; without it curves behave as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:54:06 +00:00
kaltenbrunnermarkus 5b6e5815a3 Engine: lower the per-command cost of evaluating large designs (#9615)
* claim: Engine: lower the per-command cost of evaluating large designs

* Engine: lower the per-command cost of evaluating large designs

- The fingerprint texts of features are kept in one store shared by every
  worker, not per worker: a command evaluated ahead runs on a new worker each
  time, where the per-worker store was always empty and every feature was
  written out again. Same texts, same hashes.
- Pinning body names after a command keeps, per feature, the names of the
  bodies it made with the state they were read from, so it no longer searches
  every result's bodies (features x bodies per command), and finds results by
  their index before searching.
- Pinning fingerprints the timeline again only from the first renamed feature
  (or a pattern or mirror of features replaying one) when the model proves its
  fingerprints are the design's; the fingerprints are those of the full pass.
- The evaluation cache's byte count looks bodies and sketches up instead of
  searching them per body (bodies squared per feature). Same counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:51:16 +00:00
github-actions[bot] 376c313214 Regenerate generated files and fold pending files [skip ci] 2026-10-31 10:41:12 +00:00
Colin Faulkingham ab665ee3b3 Edit Sketch: open an existing sketch from the ribbon (#9705) (#9829)
* claim: #9705

* Fix Edit Sketch ribbon selection and chooser (#9705)
2026-10-31 10:13:35 +00:00
sascha2101 f0d47e1d26 Preferences: turn the view to isometric when Extrude opens, and back afterwards (#9176) (#9948)
* claim: #9176

* Preferences: turn the view to isometric when Extrude opens, and back afterwards (#9176)

Two new preferences on the Design page, next to "Extrude to a picked target", both off by
default:

- `extrude_view_isometric`: each time Extrude opens, the view turns to the isometric view, so
  the depth can be seen right after a sketch seen face-on.
- `extrude_view_return` (only with the first): when Extrude closes, by OK, Cancel or Esc, the
  view goes back to where it was before it turned, keeping the projection as the end of a sketch
  does (#7038). The check is per frame, so every way the dialog closes is covered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMbqRqYimvY26QzcvrojSC

---------

Co-authored-by: sascha2101 <221609842+sascha2101@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:13:08 +00:00
Dahak Builds a2365228ab eval_more: one FaceSlice value for the face helpers (#2684) (#9960)
* claim: #2684

* eval_more: one FaceSlice value for the face helpers (#2684)

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 09:52:29 +00:00
froglemonade2 e2a7a45c44 MCP: batch and execute take expect {volume, bodies, bbox} and flag a mismatch (refs #3380) (#9904)
* MCP: batch and execute take expect {volume, bodies, bbox} and flag a mismatch (refs #3380)

An optional `expect` argument on the `batch` and `execute` tools: the volume
(with a relative `tol`, default 0.002), body count and bounding box (0.05 mm)
the agent computed before building. Once the call has gone through the server
measures the design as the `measure` tool does and the reply gains
`expectation: {ok, measured, expected, mismatch}`. A mismatch flags the tool
result `isError` with the mismatch text first; the design is kept as built.
A malformed `expect` is refused before anything runs. Without `expect`
nothing changes, and a batch step carrying one is a step with a stray key.

In 29 logged agent sessions every agent computed these numbers beforehand
and then spent a `measure` call plus a comparison by hand after every stage;
one missed a 0.25 mm skin until it compared. Volume and body count are
kernel-independent checks.

Refs #3380

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* MCP expect: filter then map for the bbox coordinates that are off (clippy)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* MCP: expect's coordinate text helper no longer shares a name with the JSON reader

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: bherbruck <tenbee91@gmail.com>
2026-10-31 09:48:08 +00:00
kaltenbrunnermarkus fa21db7df8 Save: hard-link the backup copy and check for unsaved changes once per revision (#9617)
* claim: Save: hard-link the backup copy and check for unsaved changes once per revision

* Save: keep the backup as a hard link and check for unsaved changes once per revision

The backup of a save is the old file under a second name (a hard link renamed over the
old .bak) instead of a copy written out again; where links are refused (FAT, shares,
cloud folders) or the old file cannot be flushed, it is copied as before. Every point a
save can stop at leaves the design file whole and the backup the version before it.

Session::is_dirty compared the whole document with the saved one each time it was asked,
which the window does every frame for every tab. The answer is kept per revision and pair
of documents; the cache holds both, so neither can change in place while it stands, and
doc_mut lets it go first so edits stay in place.

On the rover in two unsaved tabs an idle frame takes 15.0 ms instead of 19.3 ms; a save
with its backup of the 11.8 MB file writes in 9.6 ms instead of 18.9 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 09:29:20 +00:00
github-actions[bot] 4fda59af80 Regenerate generated files and fold pending files [skip ci] 2026-10-31 09:45:43 +00:00
MarkusRe 776dfc9c18 Agent chat: the system note reaches agents beyond the Claude adapter (#9811) (#9818)
* claim: #9811

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Agent chat: the system note reaches agents beyond the Claude adapter

The note only went out as `_meta.systemPrompt.append`, an extension of the
Claude adapter, so Codex and Antigravity never saw it. It now also goes in
the standard ACP `systemPrompt` field for agents that offer it, and in
`_meta.antigravity.systemPrompt.append` for Antigravity.

Fixes #9811

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 09:16:41 +00:00
P'tite Tête 6583c28231 fix: French catalog complete, 342 missing messages translated (#9941)
- 247 help texts (help.*) and 95 UI messages: theme options, viewport status, quick measure, personal sheet-metal rules, analysis details, sketch report
- Terms aligned with fr.json; no-break space before : ; ? ! as in the catalog
- Pending file, folded on main after merge

Co-authored-by: P'tite Tête <asso@ptitetete.com>
2026-10-31 09:16:34 +00:00
N3MI-DG 6b24775413 Extrude: with every body hidden, a new extrude stays New Body instead of turning to Cut (#9919) (#9920)
* claim: #9919

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Extrude: with every body hidden, a new extrude stays New Body instead of turning to Cut (#9919)

Smart Extrude passed the shown bodies as `participants` to keep hidden
ones out (#6901), but with none shown that list was empty, and the
engine reads an empty list as the whole scope: a profile on a hidden
body chose Cut, which has no shown body to change, so nothing was
previewed and OK did nothing. With no body shown it now chooses New
Body.

The operation it latches for a side is also decided again when a body
is shown or hidden while the window is open, as a new start already
does (#467): showing the body an extrude goes into turns it to Cut,
hiding it again back to New Body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 09:16:30 +00:00
austin62jake c4f9269409 Report a bug: the window can be dragged by its title (#9916) (#9934)
* Claim #9916

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Report a bug: the window can be dragged by its title (#9916)

The window was pinned at the top middle of the screen (ui_kit::Window
anchor), over the model, in a sketch or not. It now starts there and can
be moved (`placed`), as the file-load card can.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 09:16:04 +00:00
froglemonade2 9b31d29443 MCP: server instructions that say how to plan, build and verify (refs #3380) (#9903)
The `initialize` instructions were one paragraph of command shapes. Replace
them with version-neutral guidance: read `skill_reference solidcraft-modeling`
first, plan the numbers, build in a few `batch` calls, the primitive routes
and the fillet-shell-inside-holes order, what follows a parameter, `measure`
after each stage with a coalesced parameter check, and `timeline.edit` /
`parameters.change` / `edit.checkpoint` to fix instead of rebuilding. The
Assistant's system note gets the same pointer; docs/mcp.md says so.

`instructions_name_only_real_tools` now checks the command ids as well as the
tools, and `instructions_recipe_builds_a_parametric_shelled_box` builds a part
the way the instructions describe and checks its volume, axes and parameters.

Refs #3380

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-31 09:09:53 +00:00
froglemonade2 e16647a63f MCP: measure summary and body_topology faces: cylinders for small verification replies (refs #3380) (#9853)
* MCP: measure summary and body_topology faces: cylinders for small verification replies (refs #3380)

`measure {"summary": true}` replies one short object per body (name,
volume_mm3, bbox, faces, closed) with body_count and total.volume_mm3,
as a tool and as a batch step. `body_topology {"faces": "cylinders"}`
replies only the cylindrical faces, the kernel's split halves merged
by radius and axis line into {radius, origin, axis, extent, names},
and no edges. Both defaults are unchanged. The merge uses only what
model.faces and model.edges already reply.

Measured on a 13-feature enclosure, body_topology is 74 KB and measure
1.1 KB per body; agents filter them with scripts, and seven of 29
benchmark runs asked for exactly a cylinders-only listing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* MCP: keep body_topology's cylinder merge next to check_parameters' without a name clash

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: bherbruck <tenbee91@gmail.com>
2026-10-31 08:56:37 +00:00
Wenyao Ma 5281734a22 UI: add theme-aware button hover and press feedback (#4984) (#5331)
* fix(ui): add theme-aware button interaction feedback (#4984)

* fix(ui): preserve footer button identity in overlapping dialogs

* fix(ui): preserve native button widths in toast actions
2026-10-31 08:32:45 +00:00
austin62jake b5fe8776b5 Assembly: default names skip names in use (part of #9738) (#9898)
* Claim part of #9738

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Assembly: default names skip names in use (part of #9738)

Contact sets, motion studies and exploded views were named by how many
there were, and a component's placements by how many it had, so after a
delete the next default name repeated one still in use, and commands
given that name acted on the first. They now take the first number no
item has, as joints' and the app's dialogs' default names already do; a
placement keeps the next number when it is free.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 08:28:50 +00:00
Dahak Builds 8986a670e5 3-Point Circle keeps snapped clicks as coincident constraints (#9858) (#9922)
* claim: #9858

* 3-Point Circle keeps snapped clicks as coincident constraints (#9858)

The tool sent only the three clicked positions, so a click snapped to a
point or curve left no constraint and the circle was free once drawn.
Each click now goes as its snap, as the 3-Point Arc's do, and the engine
adds a PointOnCurve for each referenced point, as the centre circle's
through click does (#3099).

* Fix #9858 test: assert the clicked midpoint point, not the line end

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 08:27:13 +00:00
froglemonade2 c528964363 MCP: check_parameters tries parameter values and puts the design back (refs #3380) (#9910)
A new tool that checkpoints the design, sets every value in one
parameters.change, reports measure, errors and cylinder axes, and
restores the checkpoint, so the loop set_parameter / measure /
body_topology / set back costs one call and one rebuild.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-31 08:24:41 +00:00
github-actions[bot] 251c20bef0 Regenerate generated files and fold pending files [skip ci] 2026-10-31 07:53:06 +00:00
austin62jake 3c0d4e120e Linked designs: one changed while the assembly was closed is read again when it opens (#9739) (#9872)
* Claim #9739

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Linked designs: one changed while the assembly was closed is read when it opens (#9739)

A link now keeps the SHA-256 of its design file's bytes as the assembly
last read them (DesignLink::file_sha256, a pending format change), set by
Insert Design, Relink, Extract to File and Update Links. component.links
reports `changed` from it, hashing a file again only when its time or
size changed (vfs::design_path_stamp, behind the design-path rule). The
app treats a link it meets for the first time whose file changed as not
read yet, so opening an assembly, in its own tab or in place of the blank
design, reads those parts again as a tab coming back does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Linked designs: read what changed last when a design opens in place of the blank one (#9739)

A read is taken up only by the design revision it started from, and
adopt bumped the revision after starting it, so the read was dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 07:28:24 +00:00
Badger B bfd6aa9b7d Add German translations, batch 9 (#7237) (#9915)
Adds the last 79 German translations for messages that exist in en.json
but are missing from de.json, in a new pending file as described in
assets/locales/pending/README.md. Covers the agent chat tool summaries,
the history, sending to a slicer, Perforate, the window system and the
web app.
2026-10-31 07:24:48 +00:00
ABDULLAH 44d7c1fb6f Arabic: viewport and camera terms in the new view help and tab colour options, parameter, K factor, trim strip, run-off and standoff wording (#9909) 2026-10-31 06:55:14 +00:00
github-actions[bot] db696ec24b Regenerate generated files and fold pending files [skip ci] 2026-10-31 07:05:30 +00:00
Badger B a69c5770a4 Add German translations, batch 8 (#7237) (#9902)
Adds 130 German translations for messages that exist in en.json but are
missing from de.json, in a new pending file as described in
assets/locales/pending/README.md. Covers the Render studio (lighting,
environment, sun, depth of field), bounded volume and interior scattering,
saved shots, the timeline messages, thread direction and the agent chat
and endpoint settings.
2026-10-31 06:23:53 +00:00
momysnow da23eb1377 Sketch dialog follows "Dialog buttons at top" (#9860) (#9884)
* claim: #9860

Co-Authored-By: Claude <noreply@anthropic.com>

* Sketch panel follows Dialog buttons at top (#9860)

The Sketch panel drew Finish Sketch, Look at and Slice in a footer under
its options even with Preferences > Interface > Dialog buttons set to
Top. Panel::palette now reads the same published preference as the
feature cards and draws its footer row under the header, above the
options, when it is Top. With the preference off nothing changes.

Changes a default: no

Co-Authored-By: Claude <noreply@anthropic.com>

* Docs: Dialog buttons at top also moves the Sketch panel's Finish row (#9860)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 06:23:41 +00:00
austin62jake 5d9e4d5f95 joint.drive: a suppressed joint stores nothing, and the reply says what was asked and why a value differs (#9742) (#9862)
* claim: #9742

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019FAWPuFoh9qxn2uS2j53QZ

* joint.drive: a suppressed joint stores nothing; the reply says what was asked and why a value differs (#9742)

Driving a suppressed joint answered moved: false with "H is suppressed"
but wrote the values into the joint, with an undo step, so the part
jumped when the joint was unsuppressed. A suppressed joint outside any
motion link now stores nothing.

The reply gains `requested` (the values asked for, before limits and
links) and `held`: each driven value that ended up elsewhere, with why
(a motion link sets it, as a screw's travel follows its turn; a limit;
contact; a closed loop). A drive that moves nothing gives the first held
value's why as `reason`, so driving a screw's distance alone no longer
answers moved: false without one.

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>
2026-10-31 05:57:24 +00:00
Dahak Builds 75b3fb678c Sketch: conflict messages no longer name a nonexistent id or claim full constraint wrongly (#9735) (#9859)
* claim: #9735

* Sketch: conflict messages name real constraints, not the refused one's id or a false 'fully constrained' (#9735)

* fmt + clippy: contains over iter().any (#9735)

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 05:56:42 +00:00
github-actions[bot] 827713cc2f Regenerate generated files and fold pending files [skip ci] 2026-10-31 06:14:31 +00:00
ABDULLAH 4cf104ea2c Arabic: clearer wording in the new Sketch ribbon help (undo, mirror and revolve names, turned part, polygon sizes, normal direction) (#9870)
Co-authored-by: bherbruck <tenbee91@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 05:53:32 +00:00
Badger B 4fd8f8475c Add German translations, batch 7 (#7237) (#9864)
* Add German translations, batch 7 (#7237)

Adds 130 German translations for messages that exist in en.json but are
missing from de.json, in a new pending file as described in
assets/locales/pending/README.md. Covers the parameter list setting and
the Render panel pages: GPU material overrides, nested dielectrics, saved
optics, output size, physical background, presentation filters, preview,
quality budget, regrade and the result area.

* German batch 7: render.result_sequence follows the catalog's Checkpoint term

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: bherbruck <tenbee91@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 05:47:17 +00:00
github-actions[bot] 9fdf380286 Regenerate generated files and fold pending files [skip ci] 2026-10-31 05:35:14 +00:00
austin62jake affe37bcc3 Body names: inspect.interference refuses an unknown body; appearance.chain and appearance.list take a placed copy's name (#9740) (#9856)
* claim: #9740

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019FAWPuFoh9qxn2uS2j53QZ

* Body names: inspect.interference refuses an unknown body; appearance reads take a placed copy's name (#9740)

inspect.interference dropped a name that is no body, so a misspelled or
wrongly cased name left that body unchecked and two overlapping cubes
answered count 0. It now refuses the name, as inspect.clearance does,
naming the closest body when one is near enough to be a typo or another
case (cmd::no_body, on the existing edit_distance).

appearance.chain, appearance.list and appearance.replace's scope take a
placed copy's name (KB (K:2)) and a placement's (K:2) for the body and
component they show, as appearance.assign already does, through two
Session helpers: own_body_name (on body_frames) and component_or_placement,
which appearance.assign now uses too. A name that is neither is still
refused. select.set already refuses an unknown body on main (#9737).

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>
2026-10-31 05:07:04 +00:00
PeppaWutz 9d8ab72da7 Ribbon tooltips: help for every remaining toolbar command (#9060) (#9868)
The last 106 commands on the backlog get the two-sentence help under
their tooltip, in English, German, Japanese, Chinese, Arabic, Hebrew and
Vietnamese: Surface, Sheet Metal, Plastic, Inspect, Construct,
Configure, Parameters, Library, View and the few single ones (Bill of
Materials, Frame Member, Pattern on Path, Convert Mesh, checkpoints).

With that the backlog is empty, so it goes: the test is now
every_toolbar_command_has_help, and the docs that mentioned the backlog
say so. The help tests use sketch.drag, which is not on the ribbon, as
the command without help.
2026-10-31 05:04:31 +00:00
Nathan Dane 160662ffec Tab colours: per-tab surfaces and fade (#8876) (#9808)
* claim: #8876

* Resolve theme tab surfaces with cached Oklab transitions

* Apply tab surfaces to unauthored Render preview backgrounds

* Allow quantized endpoint colours late in cubic Render fades

* Keep tab surface publication from restyling ordinary widgets
2026-10-31 04:39:12 +00:00
github-actions[bot] b5550d01c1 Regenerate generated files and fold pending files [skip ci] 2026-10-31 05:05:00 +00:00
PaddleStroke fd5d0e6738 Assemblies: mass, centre of mass and inertia per occurrence and rigid group (#9715) (#9717)
* claim: #9715

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Assemblies: mass, centre of mass and inertia per occurrence and rigid group (#9715)

assembly.mass_properties (and Session::mass_properties) gives, for every
occurrence and every rigidly-joined group, mass (kg), centre of mass (mm) and
the inertia tensor about it in world and frame axes (kg mm2), the input
the multibody dynamics work needs. Bodies are measured as Properties
measures them (kernel volume and centre, mesh gyration), once per body,
then moved by each placement and combined by the parallel-axis theorem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 04:35:29 +00:00
PaddleStroke 0067dcab28 Settings: edit an added AI agent (#9619) (#9653)
* claim: #9619

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Settings: edit an added AI agent (#9619)

Agents you added in Preferences > AI get an Edit button between Test and
Remove. It reopens the Add agent dialog filled with the agent's name and
command, or its protocol, preset, endpoint, model and request timeout, and
Save changes the entry in place: same id, permission override and
always-allowed tools. The stored key is never read back into the dialog;
an empty key field keeps it (still only sent to HTTPS or this computer),
a new key replaces it. The control channel gets `edit_dialog`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 04:33:18 +00:00
snowsh1ne 2f6ca7e46b Linux: optional system title bar (server-side decorations) (#9263)
On Linux the window always had no OS decorations and drew Windows-style
caption buttons in the application bar. SOLIDCRAFT_TITLEBAR=system, or
"titlebar": "system" in graphics.json, now opens the window with the
desktop's own title bar and buttons (server-side decorations where the
compositor offers them). The default is unchanged; Windows and macOS
are unaffected.


Claude-Session: https://claude.ai/code/session_01Gnm1n2PVPqghMuR9kHWXfh

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 04:12:39 +00:00
PaddleStroke c2f66107cf Sketch: paste copied sketch geometry into another design (#9258) (#9675)
* claim: #9258

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: paste sketch geometry copied in another design (#9258)

Sketch geometry copied or cut in a sketch (sketch.copy / sketch.cut) now pastes into a sketch of another open design with Ctrl+V or the context menu, at the cursor or at the copied coordinates, with the constraints and dimensions among it. A dimension whose expression names the copied design's parameters keeps its value, in its unit; a text keeps its numbers. SketchClip::for_another_design prepares the clipboard; the app keeps the last sketch copy beside the cross-design body/component copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 04:11:57 +00:00
github-actions[bot] ec5f4b8740 Regenerate generated files and fold pending files [skip ci] 2026-10-31 04:29:13 +00:00
Dahak Builds 91aefd5abc Refuse sketch values that collapse a curve in settle_value_edit (#9729) (#9837)
* claim: #9729

* Refuse value edits that collapse a sketch curve: settle_value_edit runs settle's shrunk/flung checks (#9729)

* rustfmt

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 04:08:20 +00:00
PaddleStroke f1c2fc8804 Assistant: a new tab keeps the agent's sign-in (#9293) (#9669)
* claim: #9293

* Assistant: a sign-in confirmed in one tab holds in every tab (#9293)

The latest sign-in evidence per agent is window state: keep it across
tab switches, new tabs and replaced designs instead of resetting it with
the tab's conversation, so a new tab no longer marks the agent as signed
out when discovery's login probe is older than the chat's proof.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 04:01:52 +00:00
Nathan Dane d7cba9e96d Preferences: theme options list and the opacity option (#8876) (#9807)
* claim: #8876

* claim: #8876

* Theme options: persist per-theme values and expose preferences contracts

* Restore selected theme mode after stopping a followed theme

* claim: #8876

* Preferences: render theme options and apply readable panel opacity

* Use floating-point scale expectation in theme preferences scenario

* Keep panel opacity colour construction inside theme tokens

* Complete theme options translations in Arabic Hebrew and Vietnamese

* Let standalone theme sliders fill their option cells
2026-10-31 04:01:29 +00:00
PeppaWutz 849bb392d2 Ribbon tooltips: help for the Sketch tools (#9060) (#9847)
* claim: #9060

* Ribbon tooltips: help for the Sketch tools (#9060)

84 sketch commands get the two-sentence help under their tooltip, in
English, German, Japanese, Chinese, Arabic, Hebrew and Vietnamese, and
leave the backlog: every Create tool (lines, rectangles, circles, arcs,
slots, polygons, splines, conic, ellipse, text, points, the 3D sketch
tools, Project, Intersect and the other reference tools), every Modify
tool (Trim, Extend, Break, Offset, Fillet, the chamfers, Move, Scale,
Transform, Blend Curve), the patterns and Mirror, every constraint,
AutoConstrain, Sketch Dimension, Create/Edit/Finish/Cancel Sketch and
copy, cut and paste. The help tests use inspect.zebra as the
undocumented example, since sketch.trim has help now.
2026-10-31 04:01:09 +00:00
thocsmith 3b77567932 Docs: joint flip needs x for point origins; checkpoints are single use, 16 kept (#9746) (#9844)
joint.create's flip text and the assemblies guide said two origins at one
point with the same z stay as they are; a point origin without x takes its
x from z, so a part turned about z turns back. Say so, and point to giving
x on both origins or joint.as_built.

edit.checkpoint and edit.restore_checkpoint now say that restoring or
forgetting uses the checkpoint (and later ones) up and that only the last
16 are kept, and the "no checkpoint N" error says why. The editing and
mechanisms skills no longer read as if a checkpoint can be restored twice.

Co-authored-by: thocsmith <193096300+thocsmith@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 03:48:13 +00:00
Homero Thompson 810a9558bd perf(#3892): index the hidden joints and folders of the view (#9823)
The browser asks about every joint of the design on every frame, and
the answer walked the list of hidden joints: a nested STEP assembly
hides thousands of them, so a frame cost grew with the size of the
design.

Session keeps the hidden joints and folders as sets and answers from
them. The sets are built when the view changes and kept until it
changes again: the revision says the design changed, and the lists
say the view changed under it (the view is replaced outside the
engine too, without a revision of its own).

The behaviour is unchanged: the hidden joint stays hidden, the shown
one stays shown, and undo and redo keep the hiding right.
2026-10-31 03:01:33 +00:00
PaddleStroke d7ae568790 Insert SVG: say why a drawing has nothing to import (#9641) (#9652)
* claim: #9641

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Insert SVG: say why a drawing has nothing to import, and read UTF-16 files (#9641)

An SVG with nothing SolidCraft draws (only an embedded picture, shapes
pulled from another file with <use>, or not an SVG at all) was refused with
"invalid parameters for sketch.insert_svg: the drawing has no geometry
SolidCraft reads". It now names the file and says why, pointing pictures at
Insert Canvas and Canvas to Sketch. SVG files with a byte-order mark or in
UTF-16 now read, and a gzip-compressed (.svgz) file is refused clearly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Insert SVG: decode UTF-16 with as_chunks (clippy)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 03:00:32 +00:00
PaddleStroke 43a549d967 Render: start the GPU path tracer setup only when the GPU image method is chosen (#9041) (#9668)
* claim: #9041

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Render: start the GPU path tracer setup only when the GPU image method is chosen (#9041)

Entering the Render workspace started the GPU path tracer setup even with
the default Raster image method. The setup compiles the path shader, which
some Vulkan drivers (Mesa RADV/ANV, NVIDIA) take gigabytes over: the memory
climb reported while orbiting in Render. The setup now starts only while
Render is open with the GPU path method.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 02:59:05 +00:00
Dahak Builds 7228e218bf Preferences: unapplied changes no longer reach the settings file (#9730) (#9831)
* claim: #9730

* Preferences: unapplied changes no longer reach the settings file while the dialog is open (#9730)

* Preferences: hold unapplied changes out of the settings file while the dialog is open

While prefs_window.snapshot is set, SolveApp::prefs() writes the snapshot's
values - the ones Cancel restores - so the periodic autosave, quit, window
close, web save and control channel can no longer persist a change that was
never applied. Apply re-baselines the snapshot; settings the dialog cannot
change keep saving live. Adds regression tests and updates the tests that
pinned the old behavior.

Fixes #9730

* prefs: bind the snapshot's shadow outside json! so the ui-containers guard reads it

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 02:58:02 +00:00
ABDULLAH 67b491671f Arabic: viewport term in the viewport status preferences and details, tolerance, flip and colour key wording in the details cards (#9836) 2026-10-31 02:57:10 +00:00
momysnow 60b9e9d188 Edit Joint: show the two sides and pick them again (#9686) (#9692)
* claim: #9686

Co-Authored-By: Claude <noreply@anthropic.com>

* Edit Joint: joint.edit takes the two sides

joint.edit accepts a and b in the form joint.create takes them (read by the same origin_param), so a joint can move its attachment without being deleted. A side left out keeps its place. The two sides must stay on different occurrences, checked as joint.create does. Limits, values, expressions and the name are kept; a relation's values start again where its parts are.

joint.edit gets an input contract and reply type (schema/joints.rs), and leaves schema/unconverted.txt.

Co-Authored-By: Claude <noreply@anthropic.com>

* Edit Joint shows both sides and picks them again

The Edit Joint dialog now shows the two sides in the same selection inputs as Joint, each pre-filled with the face or edge of its own component under the origin. OK sends joint.edit a or b only for a side picked again, so an untouched side keeps its origin exactly.

Co-Authored-By: Claude <noreply@anthropic.com>

* Edit Joint: a moved side turns the part as joint.create would

joint.edit kept the joint's old angle when a side changed, so the part could turn by a half turn about its axis when the new origin's x lay the other way. When a side moves and no angle is given, the angle is worked out again as joint.create does (the least turn from where the part is now); a relation's angle is its tilt and stays.

The mechanisms reference says joint.edit takes a and b.

Co-Authored-By: Claude <noreply@anthropic.com>

* Edit Joint: pre-fill sides by name, send the angle only when changed

A side shows the face or edge its snap names, the piece nearest its stored pick when the name has several, else the one nearest that pick; it no longer searches outward from the frame origin, which could show the plate beside a hole for the hole's wall. A point or frame side shows nothing. OK sends the angle only when the user changed it, so a side moved without it turns the part as joint.create would.

Co-Authored-By: Claude <noreply@anthropic.com>

* Edit Joint: a moved side leaves an angle expression alone (#9686)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 02:27:54 +00:00
Nathan Dane ca005237a1 Theme files: options, overlays and requires (#8876) (#9805)
* claim: #8876

* Theme files: add options, overlays and requirements
2026-10-31 02:25:34 +00:00
Colin Faulkingham 213e05da5f Shortcuts: normalize and validate text bindings (#9733) (#9800)
* claim: #9733

* Fix text shortcut normalization and current bindings (#9733)
2026-10-31 02:25:15 +00:00
bherbruck 251d18588a Release: build macOS on macos-15 runners (macos-14 is retired on Nov 2) (#9804)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 02:11:55 +00:00
github-actions[bot] 97f48a9f63 Regenerate generated files and fold pending files [skip ci] 2026-10-31 02:55:13 +00:00
PaddleStroke 72a265e4fc Nightly action matrix: a sketch on the sensor enclosure lid's top keeps its attachment (#9465) (#9670)
* claim: #9465

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Face attachments: a piece of a face its certificate finds the other pieces of keeps that certificate (#9465)

The nightly action matrix has refused a sketch and an offset plane on the
sensor enclosure lid's underside (`examples/sensor_enclosure :: Lid/F2:top`)
since #8278. The lid's lip, joined below it, parts the underside into a ring
and a panel; the ring rests on the case and is named after the case's top,
so the lid's cap certificate (via certified_pieces) finds only the panel.
#8278 then refused the certificate because it doesn't find the picked face,
and the history-name fallback can't take a name made by another body's
feature.

A face that is no pattern or mirror copy and lies on the same oriented plane
as the pieces the certificate finds is another piece of that face: the
certificate stands for it, as before #8278. Copies (the #8278 case) still
fall back to their own history name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 02:02:24 +00:00
PaddleStroke 3877ef08b9 Measure: drag the labels away from the part (#8510) (#9395)
* claim: #8510

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Measure: drag the labels away from the part (#8510)

The distance and X/Y/Z labels in the view follow a drag of the pointer and keep
a leader to what they measure; a double-click or a new measurement puts them
back. A press on a label picks nothing, starts no box selection and opens no
Select Other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 02:00:23 +00:00
PaddleStroke cce337f83f Sketch: alignment guides from any hovered point while drawing (#9105) (#9673)
* claim: #9105

* Sketch: alignment guides from any hovered point while drawing (#9105)

While a drawing tool waits for a point, hovering a line or arc end, a
rectangle corner or a free point wakes the same temporary horizontal/
vertical tracking guide as a circle centre or line midpoint. Idle
hovering keeps centres and midpoints only. Preference
sketch_tracking_points (on) turns it off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 02:00:07 +00:00
PaddleStroke 5304294107 Browser: a Joints folder under each component lists the joints that attach it (#9130) (#9404)
* claim: #9130

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Browser: a Joints folder under each placement lists the joints that attach it (#9130)

Each component placement in the Browser gets a Joints folder (closed at
first) listing the joints whose Component 1 or Component 2 is that
placement, each beside the placement it joins it to. The rows are the
root folder's joints: click picks, the eye hides the glyph, double-click
edits and the menu is the joint's menu. The root Joints folder is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 01:59:53 +00:00
PaddleStroke b8eb8d262c Settings: saved to disk as soon as they change, not only when the app closes normally (#8275) (#9711)
* claim: #8275

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Settings: written to disk in the frame they change, not only at a clean exit (#8275)

eframe saves app.ron every 30 s and when the window closes normally. A
change made since the last save was lost whenever the app didn't close
normally: ended from the Task Manager, stopped by a sign-out or shutdown,
or crashed or hung in the graphics driver on the way out. The next start
then showed the old settings (View navigator back to Axes, Display quality
back to Normal).

The desktop app now writes its settings and flushes them in the frame they
change (frames with input and the one after), as the web app already does
(#8644). Unchanged settings are not written again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Settings: write at most once a second, and only after input that can change them (#8275)

Review: pointer motion came in every frame while the mouse moved, so the
settings were serialized every frame; and some settings change in every frame
(a panel's width while its edge is dragged), which would have flushed app.ron
on the UI thread each frame. Only clicks, keys, text, paste, wheel and pinch
count as input now, and the file is written at most once per second: a change
made in between waits, a repaint is asked for when its second is over, and it
is written then, so an idle app still writes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 01:57:54 +00:00
github-actions[bot] 28cbca72c5 Regenerate generated files and fold pending files [skip ci] 2026-10-31 02:26:00 +00:00
PaddleStroke 9d18034e13 Sketch drag: a line is never shrunk to a point to follow the cursor (#9062) (#9728)
* claim: #9062

* Sketch drag: a line is never shrunk to a point to follow the cursor (#9062)

A line's end on a horizontal construction line through the origin, dragged
up off it, made the construction line vanish. A horizontal row is
b.y - a.y, which a line a hair long meets at any tilt, so the drag's held
solves met the point-on-line by shrinking the construction line: to 1e-5 mm
on the first frame, 1e-7 mm by the tenth, and the end went up.

A drag step (held solve, the tangent-ends-held solve, and each cursor
correction pose) that shrinks a line or circle from over 1e-3 to under
1e-4 now counts as failed, as a step that wraps an arc does. The end then
stays on the construction line, which keeps its length.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 01:54:19 +00:00
PaddleStroke d61ec60480 Assistant: say when an installed agent can't start, and how to reinstall it (#9034) (#9655)
* claim: #9034

* Assistant: say when an installed agent can't start, and how to reinstall it (#9034)

An agent whose program is found but fails its `--version` check without
printing a version (npm's opencode.exe left as a placeholder when the
package's setup script did not run, which Windows refuses with "not
compatible with the version of Windows you're running") was listed like
a working one, and connecting only said "The agent stopped." with the
system's message.

Discovery now keeps why the program did not start: the spawn error
(Windows' `%1` replaced with the program) or, through a `.cmd` shim, the
first stderr line or the exit status. A probe that times out still says
nothing. The picker shows "Installed, but it does not start: ...", and
connecting first explains it with the agent's install command and Refresh.
The control channel status carries `problem`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 01:52:59 +00:00
Dahak Builds c4538c53e1 Fix Move feature editor prefill showing wrong values (#9696) (#9803)
* claim: #9696

* Show an edited Free Move its stored turn as the X/Y/Z angles that remake it (#9696)

* cargo fmt

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 01:51:40 +00:00
ABDULLAH b6b0d80332 Arabic: tanween spelling in the new ribbon help, fastener and standard part placement notes (#9820) 2026-10-31 01:51:32 +00:00
github-actions[bot] 42166bd6b7 Regenerate generated files and fold pending files [skip ci] 2026-10-31 01:56:59 +00:00
Nathan Dane 5bd5be9543 Viewport status item: standard details card (#8613) (#8614)
* Keep viewport summary menus below modal owners

* Build viewport status details from shared blocks

* Keep details focus checks outside context data locks

* Preserve native editor Escape ownership in details cards

* Initialize strict contract test sessions directly

* Translate viewport status detail cards

* Use inferred slider options and test legacy Section editing
2026-10-31 01:27:12 +00:00
PaddleStroke 2f09c90542 Exploded View: grey it out until the design has two components (#9142) (#9659)
* claim: #9142

* Exploded View: grey it out until the design has two components (#9142)

On a part made of plain bodies (the sample plate) Exploded View opened its
dialog and failed on OK with "an exploded view needs two or more
occurrences". The command is now disabled until the design has two or more
occurrences, and its tooltip says why and which commands make components.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 01:18:34 +00:00
Colin Faulkingham 8311ae5c5d BOM: group purchased children under inseparable parts (#9744) (#9794)
* claim: #9744

* Fix grouped BOM children for inseparable parts
2026-10-31 01:17:58 +00:00
Dahak Builds 4973638b56 Selection follows body rename so Delete targets the right body (#9737) (#9789)
* claim: #9737

* Selection follows body renames; stale body selections are dropped (#9737)

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 01:17:28 +00:00
rugbymauri 8a61069fbb Control channel: document.inspect reports undo, redo and path in the app (#9624) (#9632)
* claim: #9624

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

* Control channel: document.inspect reports undo, redo and path in the app (#9624)

The app answers document.inspect on a scratch copy of the session, which
has no undo or redo history and no file path, so the reply always said
undo 0, redo 0, path null. Take those three values from the live session
and put them into the reply.

Fixes #9624

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

---------

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
2026-10-31 01:15:03 +00:00
PaddleStroke 55bea620c7 Continuous orbit turns about the Orbit around point (#1044) (#9690)
* claim: #1044

* Continuous orbit turns about the Orbit around point (#1044)

With Orbit around set to the point under the cursor (or the origin), Continuous
orbit still turned about the view's centre. Cursor orbits move that centre off
the model, so the model swung across and out of the view while it spun. The
spin now turns about the origin, or the model point in the middle of the view
(else the middle of the bodies in view), held from start to stop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 01:14:03 +00:00
rugbymauri c755e067f5 Sketch pane: stays still at 125 % display scaling (#9457) (#9598)
* claim: #9457

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

* Keep the sketch pane still at fractional display scaling (#9457)

Right-docked cards were placed by their right edge from last frame's
measured width, which flipped by one physical pixel each frame at
scales such as 125 % in the Docked layout. Place them by their left
edge from the width they are held to instead.

Fixes #9457

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

---------

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
2026-10-31 00:49:10 +00:00
Colin Faulkingham f73479ddf2 Preserve multiline fields and accept a BOM in parameter CSV imports (#9732) (#9772)
* claim: #9732

* fix(params): preserve quoted CSV records and BOM headers (#9732)
2026-10-31 00:46:57 +00:00
Dahak Builds 772815b4c0 Sketch Extend: only an end on a circle counts as held (#9731) (#9773)
* claim: #9731

* Sketch Extend: only an end on a circle counts as held (#9731)

grow_line's on-circle test was true for every point inside the circle; test distance to the circle instead. Also pin the new end point of a held-end extension onto the curve it stops on, as the free-end path does.

* Fix regression test harness usage and held-end setup (#9731)

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-31 00:45:22 +00:00
Erlis Vidal 6d89de1f5a Construction planes, axes and points hide with their component's placement (#9790) (#9791)
construction_visible checked the item's own hide and its folder, but not
the placement its component is drawn at, so hiding Part:1 left Part's
planes, axes and points on screen. It now asks feature_placement_visible,
the check sketches already made; the placement path is computed in one
place for both.
2026-10-31 00:44:47 +00:00
ABDULLAH 6375529b44 Arabic: colour key wording in the analysis status help, browser eye note, print face highlight tip, constraint glyph note, parameters apply-live option (#9446)
* Arabic: colour key wording in the viewport analysis status help

* Arabic: tanween and direction-neutral wording in the browser eye position note

* Arabic: outline wording and no direction mark in the print face highlight tip

* Arabic: sketch term in the constraint glyph note

* Arabic: checkbox wording and discard verb in the parameters apply-live option
2026-10-31 00:43:02 +00:00
CaRLymx bdd7605d47 Spanish (es-ES): catch up with en.json (2026-10-31/01) (#9781)
Add 50 missing messages from upstream main (5f60d78):
- Sort/Order UI: 3 keys
- Parameters live apply: 4 keys
- Preferences viewport/parameters: 8 keys
- Render output profiles: 3 keys
- Sheet personal rules: 17 keys
- Sketch text formula: 1 key
- UI 3D mouse, agent chat, viewport status: 14 keys

Validations: i18n --check ✅, lists ✅, assets ✅
Placeholders: 0 mismatches
Keys: 4828/4828 (100%)

Co-authored-by: carlymx <24634598+carlymx@users.noreply.github.com>
2026-10-31 00:42:11 +00:00
momysnow ffbaf292f0 Browser: drag over the eyes to show or hide many rows at once (#9680) (#9681)
* claim: #9680

Co-Authored-By: Claude <noreply@anthropic.com>

* Browser: drag over the eyes to show or hide many rows at once (#9680)

Press an eye and drag up or down over other eyes: each eye the pointer passes
takes the first eye's new state (shown or hidden), and the whole drag is one
undo step. A plain click is unchanged. Dragging near the list's top or bottom
edge scrolls it. A component's eye now goes through browser.visibility, so it
is undoable like a body's.

Co-Authored-By: Claude <noreply@anthropic.com>

* Browser: fix the eye drag's undo merge and layering (#9680)

Merge the drag's steps from the undo depth noted at press, when the design
and visibility still match, instead of searching the history. Run the merge
every frame from logic(), so a release under an overlay is never missed. An
eye under a popup or tooltip no longer takes part in the drag. Adds a
regression test for a drag from the Origin's eye after a show.

Co-Authored-By: Claude <noreply@anthropic.com>

* Browser: say when the eye drag's undo merge gives up (#9680)

Co-Authored-By: Claude <noreply@anthropic.com>

* Gallery test: the eye-drag state key is not a renderable element

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: bherbruck <tenbee91@gmail.com>
2026-10-31 00:35:34 +00:00
github-actions[bot] 2b4f07a0e8 Regenerate generated files and fold pending files [skip ci] 2026-10-31 00:50:08 +00:00
PeppaWutz 4b1556d102 Ribbon tooltips: help for the Assemble and Insert tools and the Create primitives (#9060) (#9069)
* claim: #9060

* Ribbon tooltips: help for the Assemble and Insert tools and the Create primitives (#9060)

56 commands get the two-sentence help under their tooltip, in English,
German, Japanese, Chinese, Arabic, Hebrew and Vietnamese, and leave the
backlog: every Assemble tool (components, joints, contact, motion,
position), every Insert tool (files, images, 2D, library, links) and the
Model > Create drop-down primitives (box, cylinder, sphere, torus, cone,
coil, pipe, thread, rib, web, emboss, boundary fill, bounding solid).
Their drop-down rows now show a tooltip as well. The help tests use
sketch.trim as the undocumented example, since solid.rib has help now.
2026-10-31 00:22:31 +00:00
Colin Faulkingham 0fe5bf114c Timeline: resolve exact feature names before ID fallbacks (#9689) (#9748)
* claim: #9689

* Resolve timeline names before falling back to feature IDs
2026-10-31 00:08:24 +00:00
PaddleStroke 526cdfd247 Zebra: flat faces keep one stripe colour while the view turns (#2153) (#9761)
* claim: #2153

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Zebra: flat faces keep one stripe colour while the view turns (#2153)

A face whose normal lies in the upright plane through the view (every
horizontal face) reflects straight ahead, where the zebra's sideways
coordinate is zero: exactly on the edge between a black and a white
stripe. Rounding then picked one or the other from frame to frame, so
the face flickered while the camera orbited. Straight ahead is now white.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 00:03:59 +00:00
bherbruck ee6b85605a Release 0.28.0 2026-10-30 19:50:14 -04:00
bherbruck 045cfed6a7 Release 0.28.0 (#9766)
Fold the pending design format changes (browser-nested-groups, point-cloud-properties, print-faces) into format 45.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 19:50:02 -04:00
github-actions[bot] 5f60d78658 Regenerate generated files and fold pending files [skip ci] 2026-10-30 23:45:03 +00:00
Dahak Builds 646eb97eaf motion.list gives study keys in motion.study units (#9741) (#9760)
* claim: #9741

* motion.list gives study keys in motion.study units

Angle keys came back in radians while motion.study takes degrees, so an
agent that listed a study and wrote it back changed every angle by a
factor of 57.3, silently. Convert key values on the way out like
joint.list does (degrees for angles, mm for distances), give each key a
unit and its joint's name, and add a round-trip regression test.

---------

Co-authored-by: Dahak Builds <dahakbuilds@users.noreply.github.com>
2026-10-30 23:03:40 +00:00
PaddleStroke 2cf8df2ef6 Section caps: a body touching another along a curved face keeps its own cap (#9407) (#9665)
* claim: #9407

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Section caps: a body touching another along a curved face keeps its own cap (#9407)

Seen through a cut, a far wall and another body's face lying on it (a shaft
in its bore, a ring in its housing) are the same surface faceted two ways, so
the marking pass let the other body's face win in streaks. The section's
passes now first count the faces behind the cut in the stencil (back +1,
front -1): where the count says the cut runs through a body but a front face
won, the back faces are drawn again pulled toward the eye by a few pixels and
take the cap back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 23:01:28 +00:00
PaddleStroke 0096e694dd Parameters: an option to apply edits together, when you choose (#9279) (#9400)
* claim: #9279

* Parameters: an option to hold edits until Apply or OK (#9279)

"Apply each change as you leave its field" (on by default, remembered in
the preferences as parameters_apply_live). Off: an expression edit is
checked when its field is left but waits, without a preview; Apply or OK
sets every held edit in one parameters.change {changes}, so the design
rebuilds once and one undo takes them back. Cancel, the close button and
Escape drop them. Turning the option back on applies what waits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Docs: the parameters_apply_live preference in ui.prefs (#9279)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Parameters: the hint says edits wait for Apply or OK when they do (#9279)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 22:57:45 +00:00
github-actions[bot] c29bd18190 Regenerate generated files and fold pending files [skip ci] 2026-10-30 23:16:06 +00:00
Badger B 8e9e270027 Add German translations, batch 6 (#7237) (#9759)
Adds 130 German translations for messages that exist in en.json but are
missing from de.json, in a new pending file as described in
assets/locales/pending/README.md. Covers the remaining CPU lighting and
reflection controls, render diagnostics, lens and film effects, GPU path
tracer options, HDR source details, the resource library and the raw
linear EXR options.
2026-10-30 22:51:12 +00:00
fkirill 1b927421f6 Restore Browser and source-body context during Extrude editing (#5573) (#5576)
* claim: #5573

* Keep Browser and source bodies in the Extrude edit context (#5573)

* fix: keep Browser feature rows after manual rollback

---------

Co-authored-by: Kirill Frolov <k.a.frolov@vk.team>
2026-10-30 22:03:03 +00:00
PaddleStroke 8d22b3a41a DXF export: the full R2000 file structure strict readers need (#9144) (#9662)
* claim: #9144

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* DXF export: the full release 2000 file structure strict readers need (#9144)

The view and flat pattern DXF left out parts of the AC1015 file that a
strict reader expects: the CLASSES section, the VPORT, VIEW, UCS, APPID
and DIMSTYLE tables (with *Active, ACAD and Standard) and the ACAD_GROUP
dictionary under the root dictionary. They are written now, along with
$DWGCODEPAGE; the active viewport looks at the whole drawing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 22:01:27 +00:00
PaddleStroke edcf02c0d4 Crash reports: a window opened after startup no longer labels the run 'during startup' (#8776) (#9661)
* claim: #8776

* Crash reports: a window opened after startup no longer labels the run "during startup" (#8776)

egui-wgpu reports "window surface" and "surface configure" for every native
window, also the ones opened after startup, such as the agent chat in its own
window. Each one overwrote the journal's "running" phase, so a later unclean
exit was reported as "during startup (surface configure, N s after launch)".
crash::startup_step records a startup step only until the app runs, and the
app's egui-wgpu hook calls it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 22:00:19 +00:00
rugbymauri b85d5a665c Browser: the recover-unsaved-work card always shows Recover and Discard (#9472) (#9636)
* claim: #9472

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

* Browser: the recover-unsaved-work card always shows Recover and Discard

A window's scrolling body was only offered the height the card had the
frame before. A card first laid out while the page was still tiny (a
browser canvas not sized yet) kept a body of no height for good, so only
its title showed and the required choice could not be made. The body is
now offered the room the screen leaves and shrinks to its content, which
also covers the desktop recovery card and every other system window.

Fixes #9472

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

---------

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
2026-10-30 21:41:29 +00:00
github-actions[bot] a232df7751 Regenerate generated files and fold pending files [skip ci] 2026-10-30 22:20:32 +00:00
Badger B 4757c3cee6 Add German translations, batch 5 (#7237) (#9697)
Adds 130 German translations for messages that exist in en.json but are
missing from de.json, in a new pending file as described in
assets/locales/pending/README.md. Covers the quick measurement, a few
Preferences labels and a large part of the Render panel (adaptive
sampling, surface aging, camera background, CPU lighting and environment).
2026-10-30 21:27:08 +00:00
github-actions[bot] 736f334301 Regenerate generated files and fold pending files [skip ci] 2026-10-30 21:50:16 +00:00
semmelrinde e721004f62 Croatian: translate the 14 messages main gained after batch 8, new Preferences included (batch 9) (#9540)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 21:00:37 +00:00
rugbymauri 88d87729d4 Browser History: drag rows to reorder features (#9565) (#9599)
* claim: #9565

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

* feat(browser): reorder features by dragging rows of the History in the browser

Let users drag features in the History shown in the browser to move them, with the same drop bar and checks as the History at the left, while the rollback marker still drags on its own.

refs: #9565
Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

---------

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
2026-10-30 21:00:29 +00:00
ABDULLAH c7597ea66f Arabic: render term in the CPU resource profile size notes, pan and tilt verbs in the 3D mouse sketch orbit note (#9693) 2026-10-30 21:00:22 +00:00
github-actions[bot] f3389c3af7 Regenerate generated files and fold pending files [skip ci] 2026-10-30 21:19:55 +00:00
Janiz-zzz a0a52f6657 Add Finnish (fi) UI localization (#9626) (#9631)
* Add Finnish (fi) UI localization (#9626)

A fi catalog ("Suomi") translated from en.json, all 4801 messages,
registered in LOCALES between es and fr, with
finnish_catalog_is_registered_and_translates_keys, the language listed
in docs/localization.md (registered and partial) with its terms, and a
pending attribution row.

Fixes #9626

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Finnish: the 3D mouse Restore defaults button gets its own label

It shared its text with Restore defaults elsewhere on the page, so the layout test found
the wrong button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Janiz-zzz <267742026+Janiz-zzz@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
2026-10-30 20:46:03 +00:00
github-actions[bot] cc9787f80e Regenerate generated files and fold pending files [skip ci] 2026-10-30 20:50:14 +00:00
fkirill 8e80d98610 Pre-highlight whole bodies for body selection inputs (#5572) (#5575)
* claim: #5572

* Highlight whole bodies for body selection inputs (#5572)
2026-10-30 20:24:45 +00:00
semmelrinde f8a8114843 Malay: translate the 35 messages main gained after batch 8, new Preferences included (batch 9) (#9535)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 20:24:22 +00:00
rugbymauri 98bfe1af9c Viewport: a docked Assistant beside an inverted view area no longer crashes (#9492) (#9499)
* claim: #9492

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

* fix(viewport): keep running when the view area comes out inside out

Make the layout beside the docked Assistant give way instead of closing the app when a window reconfigure leaves the view area inverted.

refs: #9492
Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>

---------

Signed-off-by: Maurizio Monticelli <maurizio@whatwedo.ch>
2026-10-30 20:06:19 +00:00
Alex Lytvynenko ffbf9836cc Agent chat: support ACP configuration options and OpenCode V2 (#3305) (#3867)
* claim: #3305

* fix(agent-chat): support ACP configuration options (#3305)

Handle current select options for model, thinking effort and mode, with confirmed snapshots and legacy compatibility. Full quality gate attempted; draft delivery authorized with unrelated geometry/property/timing failures documented in PR #3867.

* fix(agent-chat): keep configuration selectors inline (#3305)

Use compact value pickers and bounded wrapping to preserve conversation space; verified at normal and narrow widths with the installed OpenCode V2 server.

* style(agent-chat): format tool events
2026-10-30 20:00:26 +00:00
Homero Thompson 806adb6c46 A sketch curve id that breaks a name is refused (#5858) (#9606)
* claim: #5858

* fix(#5858): a curve id that cannot be written into a name is refused
2026-10-30 19:53:51 +00:00
phanoob 250ed2f266 Parameters: the expression field opens wide while you edit it (#9358) (#9384)
* claim: #9358

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Parameters: the expression field opens wide while you edit it (#9358)

A parameter's expression that is too long for its cell opens over the
cells to its right while it has focus, wraps instead of scrolling, and
shows the live value or error under it. Enter still applies it and the
field returns to its column; a short expression stays in its cell. The
add row's expression field does the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 19:47:44 +00:00
bherbruck 56f07a5598 Hover test: allow the first hover half of the index time, not a third (#9638)
On a loaded runner the hover alone has taken 70 ms against a 190 ms index, which failed
unrelated pull requests. Waiting for the index would still cost all of it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 19:41:24 +00:00
rlartot dfdad35d08 Extrude: a sketch picked in the Browser or History takes all its profiles (#6106) (#6154)
* claim: #6106

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Extrude: a sketch picked in the Browser or History takes all its profiles (#6106)

With Extrude, Revolve or Emboss open, a plain click on a sketch row in the
Browser or on a sketch in the History now fills Profiles with every profile of
that sketch (the island inside another profile's hole is left out). Before, the
click only changed the selection, which the dialog never reads.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 19:29:34 +00:00
github-actions[bot] 1cef0d83df Regenerate generated files and fold pending files [skip ci] 2026-10-30 19:48:48 +00:00
PaddleStroke a99c57ffc7 3D mouse: optional orbit while a sketch is open (#2227) (#9406)
* claim: #2227

* 3D mouse: optional orbit while a sketch is open (#2227)

A new Navigation preference, "Turn sketches with the 3D mouse"
(space_mouse_sketch_orbit, off by default), lets the cap and a device
app turn the view while a sketch is open and seen square on, as the
mouse already can. Off keeps today's behaviour: pan and zoom until the
view is tilted away from the sketch (#6687). Restore defaults on the
3D mouse section resets it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* 3D mouse: keep the settings list in order 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>
2026-10-30 19:22:58 +00:00
Colin Faulkingham cdffdcbbef Selection mode: the Modelling SELECT panel shows and clears component picking (#9382) (#9485)
* claim: #9382

* Show component picking in the Modelling Select panel (#9382)
2026-10-30 19:03:10 +00:00
ABDULLAH 4f05716f69 Arabic: follow the shortened English of the quick measurement preference note (#9604) 2026-10-30 19:03:07 +00:00
semmelrinde f0567d6a48 Hungarian: translate the 35 messages main gained after batch 8, new Preferences included (batch 9) (#9528)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:57:35 +00:00
semmelrinde 6e9ffe83d2 Romanian: translate the 35 messages main gained after batch 8, new Preferences included (batch 9) (#9531)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:57:28 +00:00
semmelrinde 2647ec51fc Ukrainian: translate the 95 messages the catalog lacks (#9591)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:57:17 +00:00
AsTechEvolves 23587433e2 Assistant: say when a Claude reply hit the length limit or was declined, not that the model lacks tools (#9495) (#9500)
* claim: #9495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Assistant: say when a reply hit its length limit or was declined, not that the model lacks tools (#9495)

The API client never read why an answer stopped, so a Claude reply cut
off at max_tokens while thinking (its thinking text is empty by default),
or a refusal, ended the turn as normal with nothing said. The chat then
blamed tool support: "The model didn't use SolidCraft's tools".

Reply now carries the stop reason: Anthropic stop_reason max_tokens and
refusal, or OpenAI finish_reason length and content_filter and a message
refusal. Any other value is a normal end. The turn ends with that reason,
which already keeps the tool-calling notice away, and the chat shows
what happened in place of the raw "(max_tokens)", for ACP agents too. A
tool call cut off at the length limit has incomplete input, so it is
neither run nor kept in the history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:56:14 +00:00
Daniel Dimitrov 0414de7b98 Hole: each dropdown option shows the hole it makes while hovered (#9577)
* Hole: each dropdown option shows the hole it makes while hovered

Extents, Hole Type, Hole Tap Type and Drill Point list names only, so seeing
what an option makes meant picking it. Hovering an option now shows a small
section of that hole beside the list, drawn by the dialog's own section
painter from a copy of the form with the option applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhpMr6L9PR8SJXjM6MbQrD

* Hole: give the dropdown previews a gallery entry

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: danieldimitrov86 <danieldimitrovdev@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
2026-10-30 18:54:18 +00:00
Kevin Ravensberg 295bd0e165 Render: fit the product inside the picture's frame, after the saved setup loads (#5763) (#5764)
While Frame shows the picture's frame, the preview projects into that frame
rather than the viewport, but Fit Product and the fit on entering Render
framed the product for the viewport's free area, so a picture taller than
wide cut the product at its sides. The fit now uses the viewport layout
seen from the frame (the frame as the viewport, the free area inside it
with the usual 16-point margin).

Entering Render fitted before the saved setup replaced the draft, so a cold
workspace with a portrait setup fitted for the old draft's aspect; the fit
now runs once the setup in effect is loaded.

render.camera.fit takes the picture's aspect (0.000001 to 1000000) through
Camera::fit_aspect, which publishes only a valid fitted camera: an aspect
that would divide the distance into infinity is refused and the previous
camera, document and undo stay as they were.
2026-10-30 18:30:45 +00:00
github-actions[bot] 0b34d3590d Regenerate generated files and fold pending files [skip ci] 2026-10-30 19:12:20 +00:00
austin62jake aedbf0b1d4 Preferences: an option to keep value boxes out of the view (#9479) (#9547)
* Claim #9479

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Preferences: an option to keep value boxes out of the view (#9479)

Design > "Show values beside their handles in the view", on by default.
Off, a command's value box (Extrude's Distance, Fillet's Radius, a hole's
reference distances...) isn't drawn over the model; the command window's
value field takes the keyboard that opening the window or a pick gives the
box, its text selected, so a number typed after a pick still sets it. The
handles stay and still drag the value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Preferences: the value box option in Arabic, Hebrew and Vietnamese too (#9479)

The complete catalogs must carry every English message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 18:30:04 +00:00
semmelrinde a13e0e0ceb Danish: translate the 1055 messages the catalog lacks outside the Render workspace (catch-up 1 of 2) (#9589)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:29:51 +00:00
semmelrinde 6f05c19c42 Danish: translate the Render workspace's 1245 messages (catch-up 2 of 2) (#9590)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:29:44 +00:00
HiroKenEz db0c25522e Render: a size the CPU profile can't render names the profile that can (#8941) (#8943)
* claim: #8941

* Render: a size the CPU methods refuse names the profile that renders it (#8941)

The Shots strip offers 4K UHD whatever the method. Under the default CPU
raster, and under CPU ray tracing's default Compact profile, Render was then
refused with English engine text that didn't say how to render that size.

The refusal is now translated and names the smallest CPU resource profile that
admits the size (with CPU ray tracing, for raster, which has no profiles). The
size lists mark such presets. Nothing is switched: method, profile and
resolution still change only when chosen, and GPU path tracing is unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:16:36 +00:00
CaRLymx e6c999bbcd Spanish (es-ES): catch up with en.json (2026-10-30) (#9569)
- Base: origin/main (71b3a70, post #9448)
- en.json: 4,778 keys → es.json: 4,778 keys (100% complete)
- 1,033 reusable translations from previous catch-up branch
- 88 newly translated keys (construction lines, point cloud, print face, quick measure, recovery, UI hints, update checks)
- Terminology per glossary: 'Servicio de API', 'Desactivar/Reactivar', 'alma/ala', 'Ángulo de plegado/Ángulo incluido', 'vinculación de superficie', 'toma/escenario/estudio/configuración', 'X-Líneas' (construction lines), 'cara de impresión', 'bisectriz', 'tangente común'
- 0 placeholder mismatches, catalog sorted alphabetically
- cargo xtask i18n --check ✅, cargo xtask lists ✅, cargo xtask assets ✅

Co-authored-by: carlymx <24634598+carlymx@users.noreply.github.com>
2026-10-30 18:07:52 +00:00
PaddleStroke 180a725c0e Parameters: sort the list by name within each section (#8563) (#8725)
* claim: #8563

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Parameters: sort each section by name (#8563)

The Name heading of every Parameters table steps through A to Z, Z to A and the
listed order. Each section sorts on its own: Favorites, User Parameters and each
model group (the groups keep the design's order). Names compare in natural order
(d2 before d10, letters ignoring case). The choice is kept in egui's persisted
memory like a section's open state. While sorted, a user parameter's move arrows
are disabled. The sortable heading and natural_cmp live in ui_kit::table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Parameters sort: gallery entry for the sortable heading, natural_cmp private

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:02:06 +00:00
Steven Waters 4ba6a9744b Browser: allow nesting groups and re-ordering groups & components (#9109) (#9116)
* Browser: nest groups and reorder components

Groups can hold other groups (up to 8 levels) and be reordered with the
items around them. Sub-components can be reordered too, through a new
`components` list in `browser_order` that is not drawn as a folder.

Document: `BrowserGroup` gains `parent`; group items and `browser_order`
lists hold `BrowserEntry` values (a number is a group, a string an item).
One pending format file; older designs read unchanged. Loading and
refreshing drop what the lists name that is gone, and cut cycles and
over-deep nesting to the top level.

Engine: `browser.group` takes `parent`; `browser.move`, `browser.order`
and `browser.ungroup` handle groups. A change to only the browser's
groups and order no longer re-evaluates the model.

UI: nested rows, dragging a group row (top of a row: before it, the rest:
into it), New Group inside a group, and dropping a placement on the top
of a sibling to reorder it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Fixed formatting

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Fixed unintended side effect in render scene browser test

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Preserve group order in render workspace

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Increased test coverage

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Updated clipboard test from upstream main for group item type

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 17:40:33 +00:00
Nathan Dane ae998906ff Viewport: fold three status items into a summary badge (#8549) (#8558) 2026-10-30 17:33:23 +00:00
phanoob 634f0a2308 Sketch text: number parameters in the words, and = for a formula in Edit Text (#9281) (#9386)
* claim: #9281

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch text: a number parameter in the words shows its value (#9281)

A text's words expression can now name a number parameter: `'W' + Width`
reads "W85 mm" (lengths in the design's units, angles in degrees, up to
three decimals). `number(Width)` drops the unit and `number(Width, 2)`
fixes the decimals. The words and the cut follow a parameter edit in the
same rebuild, a rename reaches inside number(), and deleting the parameter
is refused while a text shows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch text: a Text starting with = builds its words from parameters (#9281)

In Edit Text, a Text that starts with = is the words' expression
(='W' + number(Width)): OK keeps it, the dialog shows it again with its =,
and an untouched OK no longer turns it into typed words. Typed words still
replace it, and a saved text that happens to start with = stays typed
until it is edited. The field's tooltip says how.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch text: the formula hint in every complete catalog (#9281)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:28:31 +00:00
phanoob 306b78ce16 Expressions: Down arrow in an empty field lists the parameters (#9246) (#9385)
* claim: #9246

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Expressions: Down arrow in an empty field lists every named parameter (#9246)

In an empty expression field, Down opens the completion list with every
named parameter (not just the first eight), armed on the first one; Up and
Down walk it, the list scrolls to keep the chosen row in view, and Enter
inserts it. A field that already holds text keeps Down for itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Expressions: Preferences caps the Down-arrow parameter list (#9246)

Down arrow in an empty field lists the parameters up to "Parameters
listed by Down arrow" in Preferences > Design (default 50, 5 to 200),
favourites and the design's own parameters first, so a large design
does not build a list of hundreds of rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Expressions: a label that fits for the parameter list cap (#9246)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Expressions: the parameter list cap in every complete catalog (#9246)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:27:56 +00:00
Badger B 678da425da Add German translations, batch 4 (#7237) (#9554)
Claude-Session: https://claude.ai/code/session_01YVbV9BQxn5xzooBo8yEt9a

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:27:13 +00:00
froglemonade2 fc499441e2 Lost GPU: the old process exits instead of hanging in the driver, after the settings are saved (#9044) (#9054)
After a lost device the next start began from on_exit, while eframe was
still writing app.ron, and the old process then hung in
vkDestroySwapchainKHR on NVIDIA. Start it from Drop for App instead, after
eframe has joined the settings save and before it drops the window's GPU
surface, and end the process there after a loss. The update restart moves
there too. The loss reason is passed to the next start and shown in its
note.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:26:33 +00:00
github-actions[bot] 1cf5f83924 Regenerate generated files and fold pending files [skip ci] 2026-10-30 18:38:33 +00:00
bherbruck 6a465abee9 Quick measurement: stop the off-thread test failing when the thread is fast (#9566)
The test asserted the readout was still empty right after the first poll, but the measuring thread can finish first, so it failed now and then in merge groups and on unrelated pull requests. It now asserts only that the measurement arrives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:37:42 -04:00
github-actions[bot] 89a3e89d62 Regenerate generated files and fold pending files [skip ci] 2026-10-30 18:31:05 +00:00
Cyryl Sochacki 58c0fc396f i18n(pl): translate 1155 missing UI messages (#9102)
Everything en.json gained since the last catch-up except the render.*
messages: Preferences, navigation bar, assistant settings, materials,
hole presets, joint move, edit in place, point clouds, view angles,
tool help texts and error hints. Added as one pending locale file.
2026-10-30 17:19:37 +00:00
GavinSchmidt 0952686c1b Sheet metal: personal Sheet Metal Rules, saved in the profile and offered by every design's rule manager (#9346) (#9520)
* Sheet metal: personal rules library in the profile, offered by every design's rule manager

Adds personal_sheet_rules.rs and its tests, the personal_sheet_rules preference, and the rule manager wiring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UqPNsVN9JQhyMReCXXsRSu

* Sheet metal: pending strings for personal rules

English and the complete catalogs (ar, he, ja, vi, zh), plus de and ko.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UqPNsVN9JQhyMReCXXsRSu

* Docs: personal rules in the sheet metal guide

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UqPNsVN9JQhyMReCXXsRSu

* Docs: glossary entry for personal sheet metal rule

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UqPNsVN9JQhyMReCXXsRSu

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 17:12:12 +00:00
semmelrinde 64b506dccf Sketch: the coordinate readout starts right of the pointer arrow (#9480) (#9484)
* Sketch: the coordinate readout starts right of the pointer arrow (#9480)

The readout of a sketch tool's point (2D and 3D sketches) started 10
points below and right of the snapped point, under the system arrow,
which hangs about 12 points wide below the hot spot and covered the
first value. It now starts 18 points right and 10 below the pointer
(the point snaps away from it), from the snapped point only when there
is no pointer over the view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: the readout clears the next larger pointer too (#9480)

The reporter uses the system's pointer size 2, whose arrow is about
18 × 28 points: start the readout 26 points right of the hot spot
instead of 18, and test against that arrow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:57:45 +00:00
semmelrinde 61195235d8 Layout: three more edge clamps give way in an inside-out view (#9504)
The clamp that crashed #9492 (f32::clamp between a view's edges, which
panics once the view comes out inside out) also sits in the room tool
windows get beside the docked Assistant, the Render selection bar's
anchor and a left-anchored panel's anchor. Use shell::within there,
the clamp that gives the lower edge for an empty range (#9271).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:57:38 +00:00
semmelrinde 6241decaf9 Galician: translate the 35 messages main gained after batch 8, new Preferences included (batch 9) (#9537)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:57:22 +00:00
semmelrinde 3288adf3dd Czech: translate the 35 messages main gained after batch 8, new Preferences included (batch 9) (#9525)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:50:24 +00:00
semmelrinde 5b53a1354a French: translate the 35 messages main gained after batch 8, new Preferences included (batch 9) (#9527)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:50:17 +00:00
semmelrinde 579dddaea0 Italian: translate the 35 messages main gained after batch 8, new Preferences included (batch 9) (#9529)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:50:10 +00:00
semmelrinde 9052b69e81 Dutch: translate the 31 messages main gained after batch 8, new Preferences included (batch 9) (#9530)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:50:04 +00:00
semmelrinde 2c5d875ab7 Swedish: translate the 35 messages main gained after batch 8, new Preferences included (batch 9) (#9532)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:49:57 +00:00
semmelrinde 04efc68578 Turkish: translate the 32 messages main gained after batch 8, new Preferences included (batch 9) (#9533)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:49:51 +00:00
semmelrinde 0e137b947f Traditional Chinese: translate the 35 messages main gained after batch 8, new Preferences included (batch 9) (#9534)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:49:44 +00:00
github-actions[bot] 97a24941d2 Regenerate generated files and fold pending files [skip ci] 2026-10-30 17:34:50 +00:00
github-actions[bot] c2a19bf375 Regenerate generated files and fold pending files [skip ci] 2026-10-30 17:27:38 +00:00
semmelrinde e40d7aaee7 Indonesian: translate the 35 messages main gained after batch 8, new Preferences included (batch 9) (#9536)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:49:30 +00:00
semmelrinde 2b18b68307 Norwegian Bokmål: translate the 35 messages main gained after batch 8, new Preferences included (batch 9) (#9538)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:49:23 +00:00
semmelrinde b9ae8814d4 Bosnian: translate the 14 messages main gained after batch 8, new Preferences included (batch 9) (#9539)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:49:16 +00:00
semmelrinde f3a4c62240 Serbian: translate the 14 messages main gained after batch 8, new Preferences included (batch 9) (#9541)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:49:10 +00:00
semmelrinde dbf38d84ef Russian: translate the 14 messages main gained after batch 8, new Preferences included (batch 9) (#9542)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:49:03 +00:00
github-actions[bot] f913a2a459 Regenerate generated files and fold pending files [skip ci] 2026-10-30 17:00:07 +00:00
Nathan Dane f504c82216 Viewport: integrate Section status with current UI changes (#8548) (#8557) 2026-10-30 16:23:37 +00:00
SilentWolf75 df18823d0a Start: tell same-named recent designs apart (#9081) (#9174)
* claim: #9081

Co-authored-by: Cursor <cursoragent@cursor.com>

* Tell same-named recent designs apart (#9081)

Show the file name with extension, ellipsize long paths in the middle so the end stays visible, and label imports by kind (STEP, STL, …) instead of always Design.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Start: Recent paths take their ink from the theme, and the middle-ellipsis helper is exported for tests only

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:21:26 +00:00
austin62jake 0396b2d00a Model cache: a design with mesh bodies keeps its saved model (#9170) (#9218)
* claim: #9170

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019FAWPuFoh9qxn2uS2j53QZ

* Model cache: a design with mesh bodies keeps its saved model (#9170)

One mesh body (an inserted STL or 3MF, or a STEP part shown as a mesh of
its faces) left the model cache out for the whole design, so opening it
evaluated every feature again. The doc records refused mesh bodies, and
the native B-rep codec the io cache stores bodies with refuses them too.

Kernel work is paused, so the kernel is left alone: the io cache stores a
mesh body as its own slice kind (SCMESH01, a JSON header with the counts,
colour and paint, then the vertices as f64 and triangles as u32), read
back through mesh_body, with_color and with_paint. A mesh body is kept
only when its slice reads back as the same vertices bit for bit, the same
triangles, colour and paint. The decoder checks the counts against the
bytes before allocating. The picture shown while opening draws a mesh
body with its own triangles (native_preview_mesh refuses mesh bodies).

Cache version 4 -> 5; docs/design-container.md describes the mesh slice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019FAWPuFoh9qxn2uS2j53QZ

* Model cache: decode mesh slices with as_chunks, as clippy asks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
2026-10-30 16:17:27 +00:00
AsTechEvolves b1c132bc9a Assistant: drop earlier thinking blocks when history is trimmed, so Claude requests stop failing (#9417) (#9448)
* claim: #9417

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Assistant: drop earlier thinking blocks when history is trimmed (#9417)

Claude signs each thinking block against the conversation before it. Once
drop_old_views swaps an older view for a note, or trim_history drops the
oldest messages, every later block stops matching and the API refuses the
request with HTTP 400 "Invalid signature in thinking block". For the
Anthropic protocol, a trim now also removes the thinking and
redacted_thinking blocks from earlier replies, which the API allows. A
reply that was only thinking keeps a short note. Requests where nothing
was trimmed are sent unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:13:35 +00:00
github-actions[bot] 71b3a70254 Regenerate generated files and fold pending files [skip ci] 2026-10-30 16:24:57 +00:00
github-actions[bot] bcdecd19f4 Regenerate generated files and fold pending files [skip ci] 2026-10-30 16:17:21 +00:00
austin62jake 3b3f860adc Sketch: Project takes a construction axis, not only X, Y and Z (#9324) (#9471)
* claim: #9324

* Sketch: Project takes a construction axis, not only X, Y and Z (#9324)

sketch.project with {"axis": "Axis1"} upper-cased the name, and the axis link knew only the
origin axes, so a construction axis failed with "unknown axis `AXIS1`". X, Y and Z (any case)
are still the origin axes; any other name must be a construction axis, kept as its feature names
it. The link finds the axis where the timeline before the sketch puts it (construction_axis_in,
as Revolve does) and projects it as an origin axis: its line in the sketch plane, or a point
when the axis stands square to it. Renaming the axis renames the link, as for a construction
plane's projection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 15:51:57 +00:00
PaddleStroke f0d5666a74 Closing: stop the Home picture builds instead of waiting for every cold recent file (#8398) (#9416)
* claim: #8398

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Closing: stop the Home picture builds instead of waiting for them (#8398)

Dropping SolveApp waited up to 10 s for the Home picture threads to end
(#6063). The thumbnails thread imports and rebuilds every cold recent
file (STEP and mesh imports, designs without a stored picture) one after
another, and its channel only closes once all are done, so closing the
window froze until every cold recent was built or the 10 s ran out.

The picture threads now build under a shared progress watch that
finish_pictures cancels first: the design being built stops at its next
feature (a STEP import at its next step), the remaining cold files are
skipped, and a build stopped part way draws and caches no picture.
Pictures already on the GPU are still waited for, so the driver crash
#6063 fixed stays fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:46:06 +00:00
Kai Evans f1c2f67d63 Quick measurement: the selection's length, area or distance in the view's corner (#7000) (#7513)
* Quick measurement: the selection's length, area or distance in the view's corner (#7000)

With edges, faces, sketch curves or points selected, the view's bottom right corner above History
shows what they measure, as the Measure tool lists it: an edge's length (Ø and R for a round
one), a face's area, a point's position; two items' distance and angle; several edges' or faces'
count and total. It is computed off the window thread from a copy of the session whenever the
selection or the design changes, and a click copies it. Preferences > Interface turns it off. The
Measure dialog's rows come from the same function.

* Quick measurement: off by default, turned on under Preferences > Interface (#7000)

The quick_measure preference now defaults to false, so nothing changes until it is turned on.
Its tests turn it on, and a new test checks that nothing shows until it is.
2026-10-30 15:46:01 +00:00
Homero Thompson 32900556e0 Control server: a subscribed connection is told of design changes (#8315) (#8333)
* claim: #8315

* fix(control-server): release the watch seat deterministically (#8315)

The seat a subscribed connection holds on the DesignWatch lived in the
events thread alone, so it left the watch only when that thread ended:
on the first write a closed client refuses, which needs the design to
move, or when the thread noticed the end of the stream, which waits for
the connection's own thread to come out of its blocking read. A closed
connection could therefore keep counting on the watch for a second or
more, and the test that asks for the count to be gone could lose its
race with the ten seconds it waits.

The seat is now shared: it leaves the watch once, whichever thread sees
the connection's end first, the connection's own thread at the end of
the stream or the events thread at the first refused write. The count
of subscribed connections is right as soon as the connection is gone,
and the events a subscribed connection is told of do not change.
2026-10-30 15:45:51 +00:00
Frank bf14bf3678 Inspect Sketch: clicking it shows a Sketch report window (#6262) (#6263)
* claim: #6262

* Inspect Sketch: the ribbon button opens a Sketch report window (#6262)

sketch.inspect gets a place on the Sketch tab (Inspect panel). ui.start opens a
read-only Sketch report: solver status, degrees of freedom left, counts of
curves, points, constraints and profiles, the curves and points that are not
fully constrained, and Copy JSON. engine.execute still only returns the JSON.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Inspect Sketch: a Sketch Report button on the Sketch tab while a sketch is open (#6262)

SKETCH/INSPECT placed it in the Inspect tab's Surface Quality drop-down, which
is hidden while a sketch is edited. It now has its own Inspect panel on the
Sketch tab, labelled Sketch Report; the test clicks the ribbon button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch Report: strings in a pending locale file, help for sketch.inspect (#6262)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch Report: the Sketch tab fits at 1366 px; the width test closes the report (#6262)

The panels left of the Finish group keep the gap before it when they are fitted,
so they collapse before they reach it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Frank <plexi32@gmail.com>
2026-10-30 15:39:25 +00:00
DuBearte f0a5fc5016 Open: a DWG file says what it is and what to do instead (#9328) (#9487)
Opening a DWG stopped with "design file is not UTF-8 JSON". It is told
apart by its signature, whatever the file is called, and the error points
to STEP or DXF.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:40 +00:00
github-actions[bot] ad1652683b Regenerate generated files and fold pending files [skip ci] 2026-10-30 15:48:25 +00:00
github-actions[bot] 0d778e074b Regenerate generated files and fold pending files [skip ci] 2026-10-30 15:39:35 +00:00
PaddleStroke 0b2d51d301 Sketch: a projected face follows a resize that moves its corners far (#9001) (#9453)
* claim: #9001

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: a projected face follows a resize that moves its corners far (#9001)

A sketch on the face of an angle kept its projected face boundary (and
reported "projected face boundary identity is ambiguous") when the wall
thickness changed: the inner corner moved by more than a tenth of the face,
past the nearest-point match, and the same-order fallback refused faces.

Accept the same-order layout when, for every point, the point read in that
order is also clearly the nearest one on the same loop with lines the same
way. Rims and holes, and rotated readings of a rectangle, stay refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:05:36 +00:00
Frank bf7979d4a7 Insert Part: seat a fastener in several holes at once (#9341) (#9342)
* claim: #9341

* Insert Part: seat a fastener in several holes at once (#9341)

parts.insert / parts.fastener take `at` as one pick or a list of picks.
The part is built once as one component; each hole gets its own
placement and rigid seat joint. All placements are made before any is
seated, since joint.create takes the part's seating point where the
placement is. The insert now runs on a scratch session like
parts.resize, so it is one undo step, and a pick off every body fails
it before anything is made.

The Insert Part dialog's hole input is multi-select ("Holes
(optional)") and OK passes every pick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Insert Part: picks on one hole's rim seat one part (#9341)

A hole's rim is drawn as two half-circle edges, and one click on it
picks both, so four clicks gave eight picks and two screws per hole.
Picks whose wall point lies level on the same hole axis, on the same
body placement, are one hole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:37:02 +00:00
DuBearte 5439bfc0b5 Expressions: a decimal comma inside plain parentheses (#9408) (#9447)
A comma separates arguments only directly in a function call, so plain
parentheses take a decimal comma like the rest of an expression:
`-(width-0,5)/2`. The UI no longer rewrites commas before wrapping a value
in the design unit's parentheses.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:34:56 +00:00
austin62jake c2ea096abb Assistant on Windows: find Node in its install folder when the launcher's PATH lacks it (#9297) (#9458)
* claim: #9297

* Assistant on Windows: find Node in its install folder when the launcher's PATH lacks it (#9297)

An npm-installed agent starts on Windows through its .cmd shim, which runs `node`, with the PATH
search_dirs makes: SolidCraft's own PATH, then npm's and other installers' folders. Node's own
install folder was not among them, so started from a launcher that leaves it off the PATH (the
ArtCraft launcher), the agent stopped with "'node' is not recognized". The search now also takes
%ProgramFiles%\nodejs, %ProgramFiles(x86)%\nodejs and nvm-windows' %NVM_SYMLINK%, after
everything it took before. search_dirs reads its variables through search_dirs_in, so a test can
give it a launcher's environment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 14:27:10 +00:00
Colin Faulkingham 085853315d Sketch: copy completed sketches between designs (#5427) (#8962)
* claim: #5427

* Sketch: paste completed sketches across design tabs
2026-10-30 14:09:37 +00:00
Mario Geiger 332f96c26a Point clouds: colour and filter by any property the file carries (#8816) (#8819)
* Point clouds: colour and filter by any property of a PLY file, on range tracks (#5151)

A PLY file's other vertex properties are kept as named numbers on the
points (whole-numbered for integer types; a comment `property: 0 name,
1 name` names a label's values). A cloud is coloured by any of them, a
ramp or a palette for whole numbers, and filtered by up to eight, each a
range or a set of named values. The GPU colours and filters the points
itself, so editing a range uploads nothing.

In the Edit Point Cloud card each range is a track, as in an audio
editor: a histogram of the property over what the other filters keep,
stacked by colour, under an overview strip. Ranges are drawn, moved,
snapped to colour changes, typed (Start, End, Length, relative values)
and played (Space or Play). The automatic colour range is exactly the
values the property takes over what the filters keep.

pointcloud.insert and pointcloud.edit take color_by: <property>,
color_range and filters; pointcloud.list reports them with the
properties. docs/point-clouds.md describes it all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Point clouds: note the saved properties, colouring and filters as a pending format change (#8816)

A design now saves a cloud's per-point columns and their value names, colouring by a property and
filters; an older release must refuse it instead of dropping them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:02:29 +00:00
PaddleStroke 56e752c182 Toasts: a close (×) with a countdown ring instead of a Close button; a shorter 3D mouse driver label (#7971) (#8763)
* claim: #7971

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Toasts: a close (×) with a countdown ring instead of a Close button (#7971)

Every toast the user may close (the status, the 3D mouse offer and the
stand-up note) has a close (×) at its top right, handle toast:<name>:close,
in place of a Close button; it does what the button did, is a kit-drawn
button with an accessible name and hover text, reachable by Tab, and dead
behind an issue report. Toasts that go by themselves draw a thin ring
around it that shrinks over their time; pointing at the offer or the note
starts their time again, as before, so their ring is full while pointed at.

The 3D mouse offer keeps three buttons, Calibrate…, Use Direct Driver (the
detail in its tooltip) and Never show again, on one row: the corner
toasts are 400 points wide, as the row's estimated widths need 356.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Toasts: lay buttons out at their drawn widths; corner toasts 360 wide (#7971)

The toast's button rows used an estimate of each button's width that ran
about 40 points over the kit button as drawn, which wrapped the 3D mouse
offer's three buttons and left the main action short of the right edge.
Each button's drawn width is now remembered and the rows laid out with it
(the estimate stands in for the one frame before a button was first
drawn), so the main action is flush right; the corner width is the
smallest round one that fits the offer's three buttons in a row: 360.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Toasts: keep the analysis status test whole after rebasing onto main

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>
2026-10-30 13:48:29 +00:00
github-actions[bot] 014ccf5ff4 Regenerate generated files and fold pending files [skip ci] 2026-10-30 15:12:22 +00:00
github-actions[bot] ab309f2219 Regenerate generated files and fold pending files [skip ci] 2026-10-30 15:05:46 +00:00
TaeHeon Kim 6c9afc6f7e Start the window on OCLP Macs with SYSTEM_VERSION_COMPAT=1 (#3080) (#8930)
On Macs patched with OpenCore Legacy Patcher the OS reports a newer
macOS version than the GPU's Metal compiler supports, so wgpu picks a
shader standard the compiler refuses (`invalid value 'metal3.2'`) and
the window never draws.

The variable has to be set before the process starts, and Rust 2024
makes `set_var` unsafe (this crate denies unsafe code), so main()
now re-launches the binary with SYSTEM_VERSION_COMPAT=1 when the OCLP
NVRAM key (OCLP-Version) is present, and exits with the child's status.
A process that already has the variable set never re-launches, so
there is no loop and a user's own value is respected. If the check or
the spawn fails, startup continues normally.

Tested on an OCLP Mac: one re-launch message, graphics render
correctly; with SYSTEM_VERSION_COMPAT=1 set beforehand it does not
re-launch.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 13:48:19 +00:00
SvenCarstensen aff8106205 Help: check for updates and show results in the selected language (#8896)
* Help: add manual update checks and status window

* Test manual update checks and localized results

* Add update check to the native Help menu

* Localize Help update checks in all app languages

* Document manual update checks from Help

* Document ui.help updates control action
2026-10-30 13:41:00 +00:00
semmelrinde 8ced905843 macOS: quitting on a Mac with a Touch Bar no longer crashes (#7535) (#7762)
* claim: #7535

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Vendor accesskit_macos 0.26.3 as published (#7535)

The published package, unchanged, so the next commit shows the fix as a diff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* macOS: quitting on a Mac with a Touch Bar no longer crashes (#7535)

eframe's accessibility adapter (accesskit_macos 0.26.3) swaps the window's
view to a subclass of its own. When AppKit's Touch Bar observes the first
responder (nextResponder), key-value observing subclasses the view again.
Dropping the adapter on quit reset the view's class, which threw away KVO's
subclass, so AppKit's removal of its observer raised NSRangeException ("not
registered as an observer") and the app ended with EXC_BREAKPOINT.

accesskit_macos 0.27.2 fixes this (AccessKit/accesskit#835), but egui 0.36
is on accesskit 0.24, so vendor 0.26.3 with 0.27.2's src/subclass.rs and its
tests: the adapter leaves the class alone when KVO subclassed the view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:35:37 +00:00
SilentWolf75 21340ba019 Web: Chinese UI loads a Chinese font (#8894) (#8981)
* claim: #8894

Co-authored-by: Cursor <cursoragent@cursor.com>

* Web: load Simplified/Traditional Chinese fonts for zh and zh-TW (#8894)

BIZ UDPGothic only covers Japanese, so Chinese UI showed tofu. Ship locale-glyph Craft UI SC/TC subsets and fetch the matching face on demand.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-30 13:33:23 +00:00
Colin Faulkingham 8b25fa0ae4 Configurations: reject invalid parameter expressions when saving rows (#9088) (#9414)
* claim: #9088

* Configurations: reject invalid row expressions (#9088)
2026-10-30 13:32:50 +00:00
ReDead c0b0369aa2 Sketch: hide constraint glyphs when zoomed out (#8980) (#9023)
* claim: #8980

Hide constraint glyphs when zoomed out (claim).

Co-authored-by: ReDead <ReDead@users.noreply.github.com>

* Sketch: hide constraint glyphs when zoomed out (#8980)

Fixed-size constraint glyphs stayed visible at every zoom and cluttered the
view when far out. Hide them below a sketch-plane scale threshold, with the
old always-on behaviour behind hide_constraint_glyphs_zoomed_out.

Co-authored-by: ReDead <ReDead@users.noreply.github.com>

* i18n: complete-catalog strings for zoom-hide preference (#8980)

Add ar/he/vi translations for prefs.hide_constraint_glyphs_zoomed_out
(and its note) so cargo xtask i18n --check no longer reports 6 gaps in
complete catalogs.

Co-authored-by: ReDead <ReDead@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ReDead <ReDead@users.noreply.github.com>
2026-10-30 13:31:09 +00:00
Frank 44a9f9ee42 GPU path tracer: the path shader compiles on NVIDIA's Vulkan driver (#6705) (#6850)
Native compilers inline every call, and `main` inlined 33 BVH walks: three
sample_path calls, and a shadow walk per light source family. NVIDIA's
compiler (driver 610.88) crashed in nvgpucomp64.dll or ran out of memory.

- main settles the adaptive budget first, then samples at one call site.
- direct_light takes over direct_studio, visible and the fixed-light loop:
  one loop over the sources with one shadow-ray call site, drawing random
  numbers in the same order.
- next_vertex (a select) replaces (a+1u)%3u: after a BVH walk that index
  crashed NVIDIA's compiler within seconds.

main now inlines 5 BVH walks; main_inlines_few_bvh_walks counts them with
naga, so the limit holds without an NVIDIA GPU.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:28:57 +00:00
kaltenbrunnermarkus f331a0740b Model cache: write each set of sketch keys once, and build the states on threads (#9010)
Problem: every state of a saved model wrote the evaluation key of each sketch before it, so a
design of many sketches and many features after them repeated the same map over and over. In
the SELENE rover (5,484 features, 2,116 bodies) that was 27 of the 33.5 MB manifest: the
manifest hit its 32 MiB limit, the save thinned the cache (#3220) to 2,140 of 5,484 states, and
every open evaluated the 3,344 left-out features again. Reading the kept states one after
another took a few seconds more.

Solution: as for sheet bodies (#6152), the records keep a list of sketch-key sets, each distinct
set written once, as the keys it sets and drops relative to the set written before it; a state
names its set by place. A thinned model keeps the whole list and counts it once against its
budget. The reader counts every set's keys, and each state's, towards MAX_HELD before it copies
them (a short record can stand for a large set), then builds the states on threads
(kernel::map_on_threads) once the shared records are read. The cache format is now /5: an older
cache is a miss and the design is evaluated.

SELENE's manifest is 15.9 MB with every state kept; opening it evaluates nothing. Parse and
evaluate on opening, release build, median of 5 on a shared machine: 7.36 s -> 1.14 s. The
evaluated bodies are identical (inspect.measure of all 2,116 bodies).

Claude-Session: https://claude.ai/code/session_013WUFq6QFBqmZjxwaKy2J1M

Co-authored-by: Markus Kaltenbrunner <kaltenbrunnermarkus@users.noreply.github.com>
2026-10-30 13:28:16 +00:00
fkirill 12636b67be Select hidden geometry with Select Other and fit the list to the window (#5574) (#5577)
* claim: #5574

* Pick hidden geometry near long clicks in a five-row list (#5574)

* fix: make Select Other configurable and fit its list to the window

---------

Co-authored-by: Kirill Frolov <k.a.frolov@vk.team>
2026-10-30 13:25:56 +00:00
semmelrinde 9f5ac92faa Saved model cache: keep fast opening after an update (#7168) (#7354)
* claim: #7168

* Saved model cache: keep fast opening after an update (#7168)

The model cache was read only by the exact build that wrote it (same app
version and commit), so every update evaluated every design again on its
first open. It is now keyed by the evaluation source instead: a digest of
the committed source the model is computed from (doc and the workspace
crates it is built from, the patched truck crates, locked external
dependencies, workspace build settings without the version, and the
cache reader), with the platform. An update that changed none of that
opens designs from their cache; one that changed any of it evaluates
them again, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:25:42 +00:00
PaddleStroke 6e39efd4ac Theme: System follows the desktop's dark/light setting on Linux GNOME (#7944) (#8123)
* claim: #7944

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Theme: System follows the desktop's dark/light setting on Linux (#7944)

On GNOME (Wayland, or X11 through XWayland) the window toolkit never reports
the desktop's dark or light preference, nor its changes, so Theme: System kept
its colours. The Linux app now reads org.freedesktop.appearance color-scheme
through the XDG Desktop Portal's Settings interface (then GNOME's color-scheme
and gtk-theme when it has no preference) on a thread of its own, follows the
portal's SettingChanged signal, and falls back to gsettings or a slow poll.
The window reads the answer through Services::desktop_dark; the decision from
the raw values is prefs::desktop_prefers_dark. Windows and macOS keep the
window toolkit's theme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:25:23 +00:00
C.Vengels 3c40edd12a Print face: Send to Slicer lays a body on its marked face (#8429) (#8433)
* claim: #8429

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Print face: Send to Slicer lays a body on its marked face (#8429)

A body can have one flat print face (Document::print_faces, held by the
certified target a sketch on a face holds). body.print_face {body, point?}
marks or clears it. Send to Slicer, Save Mesh with a slicer and EasyPrint
turn and move the exported copy so the face lies on the bed at Z = 0 with
the centre of mass over the origin; a face that can't be found is a
warning and that body is exported as it lies. Move/Copy and Mirror give a
copy its source's print face. One pending format file; the command
has its own icon (print_face).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Print face: Ctrl+B, the face menu and the Send to Slicer row (#8429)

Ctrl+B and the face context menu mark the selected flat face as its
body's print face, or clear it. Send to Slicer shows the print face of
the one body being sent in a Print face input, takes a flat face picked
in the viewport and clears it when emptied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Print face: a light tint in the viewport and its strength in Preferences (#8429)

Each visible body's print face is tinted towards the theme's section
colour and outlined, at the strength set under Preferences > General >
Slicer (print_face_highlight, 0 to 1, 20 % by default; 0 hides it). The
user guide describes the print face, and the known limitation after a
shell of a shelled body is listed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:25:18 +00:00
github-actions[bot] 81b620d7aa Regenerate generated files and fold pending files [skip ci] 2026-10-30 14:36:14 +00:00
SixSolid 9af2ae9a0f Agent chat window: an off-screen chat window no longer stalls the main window (#9118) (#9119)
* claim: #9118

* Agent chat window: an off-screen chat window no longer stalls the main window (#9118)

The chat popped out into its own window is an immediate viewport: eframe draws
and presents it inside the main window's frame. Both surfaces waited for vsync,
and a Wayland compositor sends no frame callbacks to a window it isn't showing,
so the main window stalled behind the chat window's present.

A surface other than the main window's is now configured with Mailbox, else
Immediate, when the configured mode waits for vsync and the surface offers one
(viewport_present_mode in the vendored egui-wgpu). The main window keeps vsync
and still paces both.
2026-10-30 13:24:30 +00:00
Kai Evans 1754318df7 Browser: the visibility eye at the right end of each row (#8718) (#8720)
* claim: #8718

* Browser: the eye sits in a column at each row's right end (#8718)

Tree rows draw the visibility eye right-aligned at the row's end, clear of
the fold arrow and the radio and of a floating scroll bar; names stop short
of it. Preferences > Interface > Eye next to the fold arrow
(browser_eye_left) keeps the old position. Rows report their control
positions so placement handles and inline rename follow the layout.

* Docs: the browser's eye column and browser_eye_left (#8718)

* Browser: the eye's tip shows by the eye at the row's end (#8718)

* Browser: a gap keeps the fold arrow and the radio apart; the eye clears a floating scroll bar (#8718)

The eye's old slot leaves a 10 pt gap instead of 4 pt, so the radio's hit
area is 7.5 pt from the fold arrow's and History pattern rows step in from
their sketch as far as browser children do. The eye's inset follows the
scroll style: only a floating bar laid over the rows takes room. Rows
publish indent:<label> where their depth puts them.

* Tests: browser depth checks run on the default layout, by indent handles (#8718)
2026-10-30 13:24:22 +00:00
semmelrinde f273195144 Czech: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9427)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:23:55 +00:00
semmelrinde 247a77e1b1 French: translate the 25 messages main gained after batch 7, construction lines included (batch 8) (#9428)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:23:48 +00:00
semmelrinde ce4212a33a Hungarian: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9429)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:23:41 +00:00
semmelrinde 522bd95254 Italian: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9430)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:23:34 +00:00
semmelrinde b0b1e6832e Dutch: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9431)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:23:27 +00:00
semmelrinde 3cb9aa07b5 Romanian: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9433)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:23:19 +00:00
semmelrinde 60f6836ab7 Swedish: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9434)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:23:12 +00:00
github-actions[bot] 43f0438fbb Regenerate generated files and fold pending files [skip ci] 2026-10-30 13:58:26 +00:00
github-actions[bot] ded10b52da Regenerate generated files and fold pending files [skip ci] 2026-10-30 13:49:40 +00:00
Frank 4bc5bdc791 Reverse zoom direction no longer flips 3D mouse zoom (#8993) (#8994)
* claim: #8993

* Reverse zoom direction no longer flips 3D mouse zoom (#8993)

The checkbox sits under Wheel and trackpad and now reverses the wheel
(and the navigation bridge's wheel-style steps) only. The 3D mouse cap
zooms by its own per-axis invert switch alone: device_camera no longer
takes a reverse_zoom argument, nor does the test model in Preferences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:23:12 +00:00
semmelrinde 1baaebd3ef Turkish: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9436)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:23:05 +00:00
semmelrinde 97e467f2d1 Traditional Chinese: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9437)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:22:58 +00:00
semmelrinde 665ff84495 Malay: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9438)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:22:52 +00:00
semmelrinde 07b3b92703 Indonesian: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9439)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:22:45 +00:00
semmelrinde ddf56e1246 Galician: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9440)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:22:38 +00:00
semmelrinde 0ddbe87935 Norwegian Bokmål: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9441)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:22:31 +00:00
semmelrinde 19dc8b6881 Bosnian: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9442)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:22:25 +00:00
semmelrinde 3e2e229dd1 Croatian: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9443)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:22:18 +00:00
semmelrinde c8d9a4bfdd Serbian: translate the 29 messages main gained after batch 7, construction lines included (batch 8) (#9444)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:22:12 +00:00
Dane Doubell 6c764dce06 Sketch: pick a whole profile or chain for Mirror/Move/Copy/Scale entities (#8390) (#8812)
* claim: #8390

* Sketch modify: pick a whole profile or chain for the shared Entities input (#8390)

- Click inside a closed profile selects its whole boundary (and its holes);
  double-click a curve selects its whole chain, for Mirror, Move/Copy, Scale
  and the patterns. Single curves and points keep working as before.
- The mirror line may itself be among the entities: the command leaves the
  line in place and mirrors the rest, instead of rejecting it.

* Mirror: the shared line case is valid, not an error (#8390)

Update the half-filled-window test: a mirror line that is also among the
entities is now accepted (the command leaves it in place and mirrors the
rest), matching the engine.

---------

Co-authored-by: Dane Doubell <2853036+danedoubell@users.noreply.github.com>
2026-10-30 13:13:53 +00:00
SilentWolf75 655e771455 Update: Cancel stops the download sooner (#8908) (#8946)
* claim: #8908

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update Cancel clears the UI and stops before checksum downloads.

Drop the install job as soon as Cancel is pressed so Downloading ends
immediately, and check the cancel flag around feed refresh and
checksum GETs so a stall before the package body no longer ignores it.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-30 13:13:44 +00:00
bherbruck 15f74b7981 Agent chat composer: one margin, input box fills its area; hint stays on one line (#7268)
* Assistant composer: the input box fills its area, and the hint stays on one line

The composer footer inset the box by its own margin on top of the box's text
padding. The footer now has no margin, so the box spans it on all four sides and
only the text padding remains. The hint is painted on a single row, cut with an
ellipsis when the panel is narrow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Assistant composer: the hint takes its colour from the theme, not a literal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 12:47:04 +00:00
github-actions[bot] 9b607f6f1f Regenerate generated files and fold pending files [skip ci] 2026-10-30 12:38:49 +00:00
github-actions[bot] ab67126eec Regenerate generated files and fold pending files [skip ci] 2026-10-30 12:31:20 +00:00
Nathan Dane 3b8cbc4e22 Viewport: surface analysis status items and legend keys (#8547) (#8556) 2026-10-30 12:12:19 +00:00
Frank f59f6698f1 Ribbon drop-downs as a grid of large icons, as an option (#4739) (#5012)
* Ribbon drop-downs as a grid of large icons, as an option (#4739)

Preferences > Interface gets two settings, both off by default:

- Menus: List | Large icons. With Large icons a panel's drop-down shows its
  commands as rows of up to five icons at 32 px (twice the list's), keeping
  the list's group headings and order. The name, shortcut and help are in
  the tooltip, as on a ribbon button. Arrow keys move across and between
  rows; a click starts the command; right-click and drag pin it as before.
  Resting on an icon for two seconds arms a pin in its corner; a quicker
  click anywhere starts the command, so nothing is pinned by accident. A
  pinned command shows its pin.
- "Leave pinned commands out of the drop-down menus": a drop-down (list or
  grid) leaves out the commands the ribbon shows as buttons; a panel too
  narrow for its buttons lists them again, and a menu is never left empty.

No icon artwork or colours change. Sketch > Create keeps its family list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch > Create in the large-icon grid: every variant under its family (#4739)

With Menus: Large icons, Sketch > Create showed its family sub-menus as
plain text rows (Line, Rectangle, Circle, ...), unlike every other menu. It
now shows every variant as a large icon under its family's heading, then the
other tools under "More". The list keeps its family sub-menus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Large-icon menus: groups side by side, no footer (#4739)

A menu of two or more headed groups (Sketch > Create's families, Model >
Modify's Edges, Faces, Bodies, Specialise) puts the groups side by side, each
heading over a column of its icons, at most two across. Menus without groups,
or one too wide for the window, keep rows of up to five. The pinning note
under the large-icon menus goes: the tooltips and right-click menus say it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Large-icon menus: a separator line between groups side by side (#4739)

As between the ribbon's sections: a 1 px line in the theme's border colour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Large-icon menus: at most three rows, growing to the right (#4739)

A menu fills five columns, more when that would take over three rows (Model >
Create: 7 x 3); in grouped menus a group too big for three rows gets more
columns. Only a window too narrow for that wraps into more rows. A test checks
every panel's menu of every tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Large-icon menus: group headings centred over their icons (#4739)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Drop-down group headings: smaller than the drop-down's header, not in capitals (#4739)

Edges, Faces, Bodies (and Sketch > Create's families) were drawn in capitals
at font_small, which reads larger than the drop-down's own header
(font_caption). They now use font_micro, written as named, in the list and the
large-icon grid. Review feedback on #5012.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Large-icon menus: start a command from the grid at its icon, as main's rows do (#4739)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Ribbon icon grid strings: a pending locale file, with ar, he and vi (#4739)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Large-icon menus: commands in no group stand apart, so a left-out group doesn't move them (#4739)

With Convert to Sheet Metal pinned and left out of Model > Modify, its
Specialise group went and Delete, in no group, moved under Bodies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 11:59:08 +00:00
Rick Morgans bd1525dcfb Expressions: hyperbolic functions sinh, cosh, tanh and their inverses (#9332) (#9334)
* claim: #9332

* Expressions: hyperbolic functions sinh, cosh, tanh and their inverses (#9332)

`sinh`, `cosh`, `tanh` and `asinh` take a unit-less number and give one,
as `exp` does; `acosh` refuses x < 1 and `atanh` refuses |x| >= 1, worded
as `asin` and `ln` refuse what lies outside their domain. They are in the
expression help (`FUNCTIONS`, the parameter autocomplete), the
hostile-expression fuzz tokens, the parameters and equation-curve guides,
and the checking skill's list of functions. Horn flares (Salmon's hypex
`cosh h + T sinh h`), catenaries and the tractrix can now be written as
they are stated instead of expanded into `exp`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 11:13:59 +00:00
kaltenbrunnermarkus 1e5eb1e3b8 Sketch: find profiles island by island, so dragging in a large imported logo stays smooth (#6896) (#9313)
* claim: #6896

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013WUFq6QFBqmZjxwaKy2J1M

* Sketch: find profiles island by island and say when the search is cut short (#6896)

Every live drag frame ran the profile search over the whole sketch: every
spline piece of a large imported logo was sampled, checked for crossings
and traced again, about 100 ms per frame at 6,000 degrees of freedom.

Profile curves are now split into islands whose enlarged piece boxes do
not touch (the margin exceeds every tolerance the search uses), each
island's loops are found on their own and cached by a fingerprint of its
geometry, and the loops are nested into profiles over the whole sketch in
the order a single search finds them, so profiles, ids, holes and
whole-boundary certificates stay the same. The end-near-crossing lookup
covers its whole reach, independent of the grid's cell size.

The 50,000-piece limit now holds per island, and a sketch that still
exceeds it gets a warning instead of silently missing profiles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013WUFq6QFBqmZjxwaKy2J1M

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 11:13:52 +00:00
ABDULLAH a1483d63c1 Arabic: plural wording in the Discard autosaves title (#9354)
recovery.discard_all_title read "discard {count} of the autosave"; it now names the autosaves as a plural.
2026-10-30 11:10:28 +00:00
semmelrinde 491687d4c1 Sketch: the cursor snaps On a spline, ellipse or conic while drawing, as on a line or circle (#9321) (#9343)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 11:10:25 +00:00
Rick Morgans 66bd64cc5e Engine: one contract check for a call, used by the preflight, the bridge and the app (#9339)
`schema::issues(id, params)` looks up the command's typed contract and
lists what is wrong with the parameters (none without a contract or for
an unknown id). The batch preflight, the MCP bridge's pre-send check and
the app's check of a design-switching command each did that lookup
themselves; they now call it. No behaviour change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 10:21:06 +00:00
jeromehzl f9146cdd58 Hole: a Hole at sketch points hides its sketch as an Extrude does (#9082) (#9211)
sketch_consumed knew Extrude, Revolve and the sheet metal flanges but not
a Hole drilled at a sketch's points, so that sketch stayed drawn inside the
holes. A Multiple hole now counts as using its sketch; Edit Feature shows
its points while the dialog is open. Single holes keep their sketch shown,
since a hidden sketch offers no points to snap to.
2026-10-30 09:37:53 +00:00
github-actions[bot] 23e7ac767e Regenerate generated files and fold pending files [skip ci] 2026-10-30 09:58:59 +00:00
phanoob 3ac7a196c9 Recover unsaved design?: Discard all, with a confirmation (#9299) (#9300)
* claim: #9299

* Recover unsaved design?: Discard all, with a confirmation (#9299)

A Discard all button at the left of the window's footer, away from Later.
It asks first ("Discard 7 autosaves? This cannot be undone.", Discard all /
Cancel), then discards every listed autosave the way its own Discard button
does (doc.recovery_discard on each id). Cancel goes back to the list
unchanged. The button publishes the handle recovery:discard_all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 09:26:04 +00:00
Logan Night 202e713cf1 Preferences: search finds settings in rows without a label (#9265) (#9318)
* claim: #9265

Co-Authored-By: Claude Code <noreply@anthropic.com>

* Preferences: a setting in a row with no label is found by the words it shows (#9265)

A search hid a row by its label before its controls were drawn. Seven checkbox rows and two segmented rows on the Interface page have no label, so "status bar", "search results" and "reveal on hover" found nothing. A hidden row with no label now keeps the words of its controls, as a dropdown keeps its value, and is drawn when they match. Each such row has a key of its own, so its neighbours are not drawn with it.

Co-Authored-By: Claude Code <noreply@anthropic.com>

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
2026-10-30 09:25:24 +00:00
N3MI-DG 63923da2ca Viewport: an opened design is framed at the home view, in the middle of the view (#9195) (#9204)
* claim: #9195

* Viewport: an opened design is framed at the home view, in the middle of the view (#9195)

A fit the viewport cannot frame yet is kept and asked again on the next frame instead
of being consumed and lost, so a design opened from the Home screen or by launching on
a file no longer comes up at the default camera, wherever its own coordinates put it.

Framing then centres the model on the view rather than on the free rectangle between
the floating controls: `Layout` carries `middle`, the view without the panels, computed
before the compass, the navigation bar and the OK/Cancel corner join the obstacles. The
model is still sized to `drawable`, so it stays clear of every control, but only a panel
moves it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Viewport: keep the centred fit clear of the controls, and frame --sample (#9195)

The fit framed the model into a rectangle the size of `drawable` centred on `middle`, which is
not inside `drawable`, so the model could sit under the compass, the navigation bar or the
render product frame. The model is now sized to `drawable` as before, and only the room left
over in it moves the model towards the middle of the view.

`s27_move_triad` turns the Z ring on its far side: the model now sits further right, and the
Move dialog that docks on the right afterwards covered the ring's old grab point.

A launch with `--sample` builds the design straight into the session and never asked for a
fit; it now comes up at the home view, framed, like an opened design.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Viewport tests: the cursor orbit's pivot keeps the pixel it was picked on (#9195)

With the model now centred on the view, one of the test's perspective drag points lands within
the pick tolerance of the box's top edge, and the pick snaps the pivot onto that edge, a few
pixels from the cursor. The orbit keeps that point still, as it should; the test compared it
with the cursor instead of with where it started.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-10-30 09:14:18 +00:00
jeromehzl 7e22aed739 View ribbon: Visual style and Navigation tool offer their choices instead of an error (#8868) (#9127)
Both commands need a choice, but start_with_variant_memory only special-
cased the parameterless display toggles, so a click on the ribbon (or
command search, a shortcut, ui.start) ran them with {} and showed only
the engine's "style must be ..." / "tool must be ..." error.

They now open a short menu, the way Units does: under the ribbon row
that started it (a second click closes it), or in the middle of the view.
Visual style lists the four styles with the current one checked; the
Navigation tool lists Orbit, Pan and Zoom, and picking the latched one
releases it, as its navigation-bar button does. The four styles come
from one list shared with the navigation bar's menu.
2026-10-30 09:04:39 +00:00
jeromehzl 966b10e731 Sketch: a feature on a failed sketch names that sketch (#9075) (#9276)
A sketch that failed (a dimension set negative by a parameter) left every
feature built on it with "unknown sketch 1 (it must come earlier in the
timeline)", which points at the timeline order. The evaluation now notes
the features that failed earlier in the pass, and a feature whose input
sketch is one of them fails with "sketch `Sketch1` failed: <its error>".
That result is never cached, since the cache key holds neither the
sketch's name nor its error: a second failing value or a rename shows
up at once.
2026-10-30 09:03:46 +00:00
github-actions[bot] 99eda4cd1b Regenerate generated files and fold pending files [skip ci] 2026-10-30 09:24:07 +00:00
jeromehzl 47292bb2bd Preferences: the window covers the ribbon behind it (#9078) (#9243)
A page window (Preferences) filled its frame with
dialog_body.gamma_multiply(0.97), which also scales the alpha, so the
ribbon's labels showed through its title bar, search field and heading.
It now uses the opaque dialog_body, as every other window does; the
navigation bar keeps its own translucent resting fill.
2026-10-30 09:01:33 +00:00
semmelrinde 37dc878f31 Shell: test the interface scale raised in a narrow window, the crash #9271 fixed (#9315)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 08:58:15 +00:00
Igor Bronovskyi 7da02460d8 i18n(uk): add pending translations for strings added in upstream (#8977)
* i18n(uk): add pending translations for missing strings

* i18n(uk): add pending translations for new strings from upstream

* i18n(uk): improve pending translations

* i18n(uk): professional translation of all pending strings

* i18n(uk): finish the pending translations for 29 October

Every value in uk-sync-29oct.json is now Ukrainian except the seven symbols
and formulas that must stay unchanged: the modifier keys, HDR and the three
inertia tensors.

Terminology follows uk.json: spot light is "прожектор", directional light is
"спрямоване", body is "тіло", render is "рендеринг". Camera orientation keeps
тангаж, рискання and крен.

Removes history-origin-bodies.json, which was empty after its content moved
into this file.
2026-10-30 08:39:45 +00:00
P'tite Tête f73f4da665 fix: Find a folded folder's mark in one pass over a long history (#9294)
- worst_status searched the history and the results for each feature of a folded folder, the square of the history's length every frame
- A folder of 16 features or more now finds places and results in tables built once, first of an id winning as feature_index and Model::result do
- Frame on a 4,880-body design: 20.4 ms -> 7.9 ms (M4 Max, release, headless)
- Test a_folders_mark_is_the_worst_of_its_features_own

Co-authored-by: P'tite Tête <asso@ptitetete.com>
2026-10-30 08:16:36 +00:00
github-actions[bot] ef5985f841 Regenerate generated files and fold pending files [skip ci] 2026-10-30 08:22:05 +00:00
Ahmad Khan 71bb4f7c98 Docs: a beginner's page for equation curves, with pictures and examples (#9282)
A new user guide page, Equation curves, under Sketching: the first curve step by step, Explicit and
Parametric explained with tables of rules to type (a line, a parabola, a wave, a circle, a spiral),
radians, parameters with the involute of a base circle, building a part (a closed flower curve
extruded), editing, and common mistakes. The technical details stay in a short section for scripts
and agents.

Seven pictures, rendered by `cargo xtask book` from new scripts in docs/book/scripts/equation-*.json
(gitignored output, attributed in attribution/pending/docs-equation-curves.md). The Sketching page
keeps a short summary and links to the new page.
2026-10-30 07:54:27 +00:00
Rick Morgans 92af4a21c8 Control channel: a per-request param_check level, applied and confirmed by the app (#9184) (#9185)
* claim: #9184

* Control channel: a request's own param_check level, applied and confirmed by the app (#9184)

`engine.execute`, `engine.batch` and `engine.script` take an optional
`param_check: "off"|"warn"|"strict"` in their params. The app runs the
request at that level through the same `run_checked` path and batch
preflight a headless session uses, puts its own level back, and every
reply says the level it ran at as `param_check` beside `ok`. A command
that switches designs keeps the app's level; any other word is refused.
Readings and exports answered on a copy off the window thread keep the
level too.

`control.capabilities`, answered at once on the control-server thread,
lists what the channel does beyond the methods every version has:
`{"param_check": ["off", "warn", "strict"]}`. An older app answers
"unknown method".

The MCP bridge asks it once per connection. When the app lists the
level, every call and batch goes with it and the app checks against its
own commands; otherwise the bridge checks before sending, as #9073 does.
At strict, a reply that doesn't say the app checked the call is an error,
and the next calls are checked by the bridge. Also: `add_param_warnings`
takes the reply by `&mut`, and `with_param_check` sits beside
`Remote::new`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Control channel: a design-switching command is checked at the request's level

Review fixes for #9184. `component.edit_in_place`, `component.finish_edit`,
`view.next_tab` and `view.previous_tab` ran at the app's own level and
echoed `off`, so a misspelt call went through at strict. They now have
their parameters checked at the request's level before they run (and
still run at the app's own level, as each design keeps its own), and the
reply echoes the requested level. The MCP bridge at strict now requires
the echo to match its level, not just to be there. `param_check` is read
only by `engine.execute`, `engine.batch` and `engine.script`; other
methods ignore it. The off-thread test now shows the design change
computing off the window thread before it is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 07:24:41 +00:00
ABDULLAH 5d6c5bab39 Arabic: sketch and spline terms in the construction line help and hints (#9269) 2026-10-30 07:05:00 +00:00
semmelrinde 8251be9c06 Shell: content kept outside a changed viewport no longer turns inside out and crashes the Render frame overlay (#9271)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 07:01:16 +00:00
Steve Jason 3d744cc8a2 A formula that is a bare number gets the design unit (#9261) 2026-10-30 06:42:04 +00:00
github-actions[bot] 1447bc772a Regenerate generated files and fold pending files [skip ci] 2026-10-30 06:56:11 +00:00
semmelrinde 7b24a1dc1e Sketch corners: a round that would use up an arc, or where the curves meet smoothly, is refused (#8813)
* Sketch corners: a round that would use up a whole arc is refused

A quarter arc of radius 5 running into a line along it, rounded with
radius 5, put the round's tangent point at the arc's other end and left
an arc of no length. round_corner now skips a round whose tangent point
falls on either curve's other end; with none left it says that radius
does not fit, as for two lines (found by a local trim fuzzer).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch corners: a round where the curves meet smoothly is refused

A line running on from an arc's end along its tangent (off only by rounding)
has no corner, but the round's tangent points landed within 1e-7 mm of it and
the round came out as an arc of no length (found by a local trim fuzzer). The
corner test's line met its arc this way too and was checking that output; it
now meets the arc at a corner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 06:23:17 +00:00
Nathan Dane d95f40ac88 Ribbon: pressed state for commands that stay on (#8546) (#8555)
* claim: #8546

* Ribbon: pressed state for commands that stay on (#8546)
2026-10-30 06:20:31 +00:00
austin62jake 82ac9a6b03 sketch.inspect: each profile loop names a curve once, not once per segment (#9179) (#9186)
* claim: #9179

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019FAWPuFoh9qxn2uS2j53QZ

* sketch.inspect: each profile loop names a curve once, not once per segment (#9179)

A profile records one curve id per piece its loop walks, and a conic or
spline is walked as many short pieces, so sketch.inspect listed a single
Bezier curve 50 times in a profile's `curves` and as often in a hole loop.
The reply now names each curve of a loop once, in the order the loop walks
them (solidcraft_sketch::distinct_curves, as delete and profile references
already do). The solved profiles keep their per-piece lists.

The lists are now a profile pick as they stand: a whole_boundaries pick
refuses a curve named twice, and the regression test extrudes the wall
from the reply's lists.

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>
2026-10-30 06:14:06 +00:00
Homero Thompson 6ab46b6488 fix(#7058): the selection tools reach the geometry an SVG import leaves in the document (#7368)
An SVG import leaves a sketch with regions and no body. The marquee (box select) took only the bodies, so the imported geometry was unreachable with the selection tools: a marquee over it selected nothing, and a click on a region did not take it either.

The marquee now takes the regions of the shown sketches when the design has no body. A design that already has a body keeps the old exclusive behaviour: the marquee takes the bodies alone, not the regions of the sketches that are shown. A dialog that asks for edges or faces (the Patch dialog) never takes the regions: they are neither.
2026-10-30 06:03:16 +00:00
Matthew Knutson 991082fbaf Typed contracts for the construction axes, points and planes (#2829) (#7750)
* claim: #2829 (construct.* contracts)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Typed contracts for the construction axes, points and planes

The 19 construct.* commands get input contracts and FeatureResult as
their output, with shared types for references, planes, a plane or
face base, an axis line and a construction plane's name, each calling
the reader its handler uses (split out of geo, plane_param, the face
capture and named_axis_line).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 06:03:04 +00:00
github-actions[bot] 4d338ba2eb Regenerate generated files and fold pending files [skip ci] 2026-10-30 06:02:42 +00:00
AsTechEvolves 94b399e98f Preference: keep the view when a sketch opens; Look At faces it on request (#9188) (#9190)
* claim: #9188

* Preference: keep the view when a sketch opens, Look At faces it on request (#9188)

Preferences > Sketch > "Turn to face a sketch when it opens" (on by default,
so nothing changes unless it is turned off). Off: creating or editing a
sketch leaves the view as it is, a sketch started on a face no longer
re-centres on the picked point, and Look At (the palette button, Ctrl+8)
still turns to face the sketch. The control channel sets it as
`ui.prefs {"sketch_open_look_at": false}`.

Changes a default: no

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 05:32:56 +00:00
Homero Thompson 5aa41703f7 Control channel: ui.home refuses a sample index that names no sample (#9087) (#9212)
* claim: #9087

* fix(#9087): ui.home refuses a sample index that names no sample

The control channel passed the sample index straight to open_sample, which drops an index that names no sample and says nothing. The request then replied ok, so an agent could not tell a typo from a sample that had opened.

The index is checked before it reaches open_sample: an index that names no sample is refused with the valid range in the error. A sample that exists still opens, as before.
2026-10-30 05:27:06 +00:00
austin62jake d9aa73b597 Measure: an exact circle's or arc's length agrees with its circumference (#9086) (#9227)
* claim: #9086 (edge lengths)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Measure: an exact circle's or arc's length agrees with its circumference (#9086)

Measure gave a circle's or an arc's length_mm as the length of the
polyline drawn for it, which runs inside the curve, while the same reply
gave its circumference or arc_length from the exact circle. When the edge
is known exactly (the kernel's circle, or a sketch's own circle or arc),
length_mm is now its radius times its angle. A circle fitted to a mesh
body's polyline keeps the polyline's length.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 05:27:00 +00:00
github-actions[bot] 6e4e94a8a8 Regenerate generated files and fold pending files [skip ci] 2026-10-30 05:30:32 +00:00
github-actions[bot] ae2a5b2c0d Regenerate generated files and fold pending files [skip ci] 2026-10-30 05:24:44 +00:00
railconstr 81cbcef31c Sketch: add construction-line toolkit (#8239) (#8679)
Co-authored-by: railconstr <335242259+railconstr@users.noreply.github.com>
2026-10-30 05:02:54 +00:00
semmelrinde e3d9090e6c Russian: translate the 580 messages the catalog lacks, Render panels included (batch 7) (#9231)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 04:54:25 +00:00
SilentWolf75 b8e93270b4 Sketch: align view to plane when editing a rotated component sketch (#9029) (#9042)
* claim: #9029

Co-authored-by: Cursor <cursoragent@cursor.com>

* Square sketch axes when looking at a turned plane (#9029)

Look At only yaw-aligned sketches facing world up/down, so a sketch on a rotated component stayed tilted on screen. Roll (or yaw at the poles) so the sketch's x runs right and y is upright.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-30 04:27:24 +00:00
SilentWolf75 ef628d1c86 Canvas: pick Calibrate points on the image (#9108) (#9208)
* claim: #9108

Co-authored-by: Cursor <cursoragent@cursor.com>

* Canvas calibrate: pick Point A and B with viewport clicks (#9108).

The Calibrate card only had typed coordinates, so users could not mark the image. Clicks on the canvas now fill A then B, with on-image markers and a short hint.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Calibrate canvas: ja/zh/ar/he/vi strings for the click hints

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 04:25:52 +00:00
SilentWolf75 d93b1cb282 Sketch Trim: prefer free curves over projected edges (#8979) (#9224)
* claim: #8979

Co-authored-by: Cursor <cursoragent@cursor.com>

* Sketch Trim: prefer free curves over projected edges (#8979).

When Trim/Extend/Break is active, linked face edges yield to nearby drawn curves, and the refuse message names Break Link.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-30 04:25:45 +00:00
Derek Van Allen a66a517c40 Persistent naming: a proposal from a second implementation (#7990)
* Persistent naming: a proposal from a second implementation

A design proposal for the persistent-naming failures still open (#4341,
#5198, #5308, #5857, #5858, #5860, #5861), from building persistent naming
in Form Studio: fall back by lineage, never by geometry alone; a suppressed
maker is not a lost reference; names saved as structured one-level values;
ordinals from the feature, not the kernel's face order; split picks resolve
to all pieces; body identity apart from the display name. Documentation
only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Persistent naming proposal: body identity follows the #5308 plan

Change 6 now agrees with bluecmd's plan on #5308: an id minted from
next_id and stored per feature slot, better than the derived identity
the first version proposed. It adds that a stored id is only as stable
as the slot assignment, which today follows each lump's least face
name, and gives the lineage signature from the #5308 discussion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 04:17:54 +00:00
semmelrinde f3ee34d372 English: American spelling throughout the base catalog, British only in English (UK), and "1 body" (#9085) (#9194)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 04:16:23 +00:00
SilentWolf75 c94d1e9894 Inspect: keep analysis legends clear of left History (#4515) (#9210)
* claim: #4515

Co-authored-by: Cursor <cursoragent@cursor.com>

* Inspect: keep analysis legends clear of a left History (#4515).

Draft, Accessibility and Curvature legends were painted at the viewport's left edge under a left History sidebar. Place them in the free workspace content instead.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-30 03:59:33 +00:00
kaltenbrunnermarkus 46a2d6b53c ui-egui offscreen tests pick their GPU by SOLIDCRAFT_GPU (#9052)
offscreen_device() asked wgpu for its default adapter and ignored the
SOLIDCRAFT_GPU policy that headless pictures follow, so with
SOLIDCRAFT_GPU=software the ui-egui offscreen tests still opened the
hardware GPU. Under hardware or software the adapter now comes from
solidcraft_gpu::select (new pick_among, which pick uses too); under cpu
there is none; unset (auto) keeps wgpu's default adapter as before.

Part of #9040.


Claude-Session: https://claude.ai/code/session_013WUFq6QFBqmZjxwaKy2J1M

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 03:55:09 +00:00
austin62jake c9935007e8 Sketch: the Sketch Grid box in the Sketch panel turns the sketch's grid off (#9147) (#9187)
* claim: #9147

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch: the Sketch Grid box in the Sketch panel turns the sketch's grid off (#9147)

The box sets the open sketch's hide_grid, but the viewport drew the grid
whenever a sketch was open, so hide_grid only reached the ground grid and
the box did nothing. An open sketch now shows its grid whatever the Grid
switch says, unless its own Sketch Grid option is off; the window guides
that renders and the control channel use follow the same rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 03:55:05 +00:00
ABDULLAH 7b9d37c787 Arabic: Off wording in the recent snap note matches the other preference notes (#9215) 2026-10-30 03:52:57 +00:00
bherbruck aa1fe28ddf Release 0.27.1 2026-10-29 23:34:31 -04:00
bherbruck 8f1b456275 Release 0.27.1 (#9181)
* Release 0.27.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Render job test: wait for the cancelled job's reservation to be released

The worker drops a job's reservation just after the job turns terminal, so
checking admitted bytes right after wait_timeout raced (10 of 40 local runs
failed). Poll with a deadline, as dielectric_tests does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 23:34:23 -04:00
JK3D 8a6a064d37 Headless pictures: draw counts come back with the picture they count (#7521) (#7522)
* claim: #7521

* fix: headless pictures return their draw counts with the picture

`the_renderer_counts_what_it_draws` drew with `Capturer::rgba` and then
read `Capturer::last_stats()`. The capturer is shared with the binary's
other tests, which draw on it from parallel threads, so another picture
could land between the two calls and the test read its counts (e.g. 10224
triangles for the empty design).

`Capturer::rgba_with_stats` returns the picture and its counts, read while
the call still holds the device. `last_stats()` is removed; this test was
its only caller (the performance overlay reads the viewport renderer's own
stats handle).

New test `pictures_drawn_at_once_each_count_their_own` draws empty and box
designs from eight threads on the shared capturer. Against the old pair it
failed 25 of 40 full runs of the `capture` binary; it passes with the new
call.

* fix: a headless picture waits for its read-back's answer

A picture maps its read-back buffer, waits for its submission with
`device.poll(PollType::Wait)`, and then checked once with `try_recv`
whether the map callback had run. wgpu calls a finished mapping's
callback from whichever thread next maintains the device, in a poll or
in any `queue.submit`, after it lets go of the device. When another
thread got there first, the wait returned with the mapping done but its
callback not yet called, and the picture failed with "not supported yet:
reading a picture back without waiting for the browser", the error meant
for a browser.

On the shared capturer, the other thread is another picture's device
check (`probe_lost` submits nothing before it takes the capturer's lock),
so the `capture` tests failed now and then: `bad_picture_sizes_are_errors`
(its last 8 x 8 picture), `pictures_show_a_plain_cut_without_the_hatch`,
`pictures_blend_a_line_that_is_not_opaque`. In the app, the window's
frames are submitted on the device its thumbnails and `ui.render`
pictures are drawn on.

A native picture now waits for the answer, up to the picture timeout; a
browser still answers later, on its own.

New test `pictures_read_back_while_another_thread_uses_the_device`: 2,000
small pictures while another thread polls their device. Without the fix
it failed 19 of 20 runs (1 to 7 pictures each); with it, 150 of 150 runs
pass. `bad_picture_sizes_are_errors` now prints the error it gets.
2026-10-30 03:19:33 +00:00
github-actions[bot] f35f3197c3 Regenerate generated files and fold pending files [skip ci] 2026-10-30 04:44:58 +00:00
github-actions[bot] 78499f44af Regenerate generated files and fold pending files [skip ci] 2026-10-30 04:36:06 +00:00
semmelrinde 5b5201f1a6 Galician: translate the 386 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9162)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 03:02:11 +00:00
semmelrinde f28ff15ffb Hungarian: translate the 386 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9154)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 03:01:02 +00:00
semmelrinde 4f8bbec9fb French: translate the 356 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9153)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 03:00:21 +00:00
semmelrinde 77ebf1326c Italian: translate the 377 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9155)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 03:00:09 +00:00
github-actions[bot] fdc95337cf Regenerate generated files and fold pending files [skip ci] 2026-10-30 04:11:55 +00:00
github-actions[bot] 0e053e5e61 Regenerate generated files and fold pending files [skip ci] 2026-10-30 04:02:58 +00:00
semmelrinde 6bbb4276c0 Romanian: translate the 386 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9151)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 03:00:02 +00:00
semmelrinde 6d641c87c4 Malay: translate the 386 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9160)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:59:47 +00:00
semmelrinde 553f5fb9b8 Czech: translate the 386 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9152)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:59:46 +00:00
semmelrinde 88dd699715 Swedish: translate the 386 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9157)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:59:38 +00:00
semmelrinde c092e0551b Dutch: translate the 383 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9156)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:59:14 +00:00
semmelrinde c320dc421c Turkish: translate the 369 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9158)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:58:58 +00:00
semmelrinde 0f489a5777 Croatian: translate the 384 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9165)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:58:49 +00:00
semmelrinde 3df709be63 Norwegian Bokmål: translate the 386 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9163)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:58:45 +00:00
semmelrinde 875ac2ce49 Traditional Chinese: translate the 385 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9159)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:58:31 +00:00
semmelrinde 698275874f Indonesian: translate the 386 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9161)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:58:10 +00:00
semmelrinde 0d4470cd8c Bosnian: translate the 384 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9164)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:57:53 +00:00
semmelrinde 5dfc3481c1 Serbian: translate the 384 messages the catalog lacks, Render Light and Frame stages included (batch 7) (#9166)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:57:11 +00:00
bherbruck b596bfc730 Bottom bar: keep active toggles readable when the selected fill is as dark as the accent (#9168) (#9171)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 22:42:27 -04:00
Colin Faulkingham d11d268597 Render: reject excessive pixel work during preflight (#5088) (#5728)
* claim: #5088

* fix: reject excessive render pixel work during preflight (#5088)
2026-10-30 01:35:12 +00:00
github-actions[bot] 4b0ba62c69 Regenerate generated files and fold pending files [skip ci] 2026-10-30 01:13:55 +00:00
taylorhayis 313d2bdb41 Sketch: snap where two recent centre and midpoint guides meet (#8694) (#8744)
* Sketch: snap where two recent centre and midpoint guides meet (#8694)

The alignment guide remembered one reference and did not move the cursor. Keep the previous centre or midpoint as well, and snap a drawing point to where their guides cross.

* Sketch: keep the recent-guide crossing snap off until asked (#8694)

The crossing snap was on whenever alignment guides were. Give it its own Sketch preference, off by default, so the guides stay visual until someone turns the snap on.

* Sketch recent snap: ar/he/vi strings and clippy borrow fixes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 00:40:05 +00:00
Colin Faulkingham 079f6e61e6 Sketch: show no geometry for an empty sketch (#9077) (#9104)
* claim: #9077

* Sketch: show no geometry for empty viewport sketches (#9077)
2026-10-30 00:33:47 +00:00
Rick Morgans 4a781b8cd8 MCP: --param-check checks calls to the running app (#9072) (#9073)
* claim: #9072

* MCP: --param-check checks calls to the running app (#9072)

`mcp --connect` (and `mcp` once it bridges to an app) took
`--param-check` and forwarded every call unchecked, while the app's own
session is always off. `Remote` now checks each `engine.execute` and
`engine.batch` against this server's command contracts before sending:
`strict` refuses a call, or a batch with such a step, without sending
anything, and `warn` adds `param_warnings` to the app's reply (each
step's result in a batch). A command with no contract here goes to the
app unchecked. `Auto` carries the headless session's level over when it
bridges to a late app. `batch_preflight::contracts` is the contract half
of the existing preflight, for a runner in another process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 00:33:42 +00:00
bherbruck 5b0eb08473 Release 0.27.0 2026-10-29 19:53:24 -04:00
semmelrinde 87206f20c8 Theme: the System theme leaves the window to follow the system appearance (#8983) (#9103)
theme::apply always sets egui's theme to light or dark, and egui's own window
sync then told the native window to be light or dark. A macOS window told so
keeps that appearance and no longer reports the system appearance changing,
so with Theme set to System the app stayed light after macOS turned dark. The
app now syncs the window itself: the system's appearance while the theme
follows it, the theme's own otherwise (for the title bar).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 23:51:07 +00:00
Logan Night 5a24d4095a Sketch: an old edge-on projection keeps its line when it is re-resolved (#9025) (#9097)
* claim: #9025

Co-Authored-By: Claude Code <noreply@anthropic.com>

* Sketch: an old edge-on projection keeps its line when it is re-resolved (#9025)

A face seen edge-on was saved as two lines on the same two points, one each way, and is one line now. Re-resolving the link dropped both lines and built a new one under a new id, so an offset that names the first line as its source failed with "an offset source vanished or changed shape". Keep the first line and drop only the second.

Co-Authored-By: Claude Code <noreply@anthropic.com>

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
2026-10-29 23:50:29 +00:00
bherbruck 9df8837d43 Release 0.26.1 2026-10-29 06:33:09 -04:00
bherbruck 409ab1ed45 Release 0.26.0 (zip 9.1.3) 2026-10-28 19:41:38 -04:00
bherbruck 5e03fe2f4b Release 0.26.0 2026-10-28 19:32:17 -04:00
bherbruck 37a586dd61 Release 0.25.1 2026-10-27 20:58:30 -04:00
bherbruck a79f40a711 Release 0.25.0 2026-10-27 18:05:39 -04:00
bherbruck b5728f284b Release 0.24.1 2026-10-27 08:34:27 -04:00
bherbruck 5965439a15 Release 0.24.0 2026-10-26 19:23:21 -04:00
bherbruck 586a358ed4 Release 0.23.1 2026-10-26 07:07:21 -04:00
bherbruck 7770f8982d Release 0.23.0 2026-10-25 18:18:39 -04:00
bherbruck 72ad6383ef Release 0.22.1 2026-10-25 10:38:39 -04:00
bherbruck 0537623a75 Release 0.22.0 2026-10-24 18:53:43 -04:00
bherbruck 65d288227e Release 0.21.0 (rc.2's code, version only)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:51:08 -04:00
bherbruck fedb3bcdb1 Release 0.21.0-rc.2 2026-10-23 17:14:38 -04:00
bherbruck 097b8b7550 Release 0.21.0-rc.1
The tree is main at f120285c9 exactly; the previous release commit is kept as a parent so release only moves forward.
2026-10-23 13:48:05 -04:00
bherbruck af7ca3a8a2 Release 0.21.0-rc.1
The tree is main at b31fddb98 exactly; the previous release commit is kept as a parent so release only moves forward.
2026-10-23 13:37:43 -04:00
bherbruck 27ddb725c7 Release 0.21.0-rc.1
The tree is main at 2bf3d4e11 exactly; the previous release commit is kept as a parent so release only moves forward.
2026-10-23 12:10:02 -04:00
bherbruck a06bdf5cfc Release 0.20.0
The tree is main at 030187452 exactly; the previous release commit is kept as a parent so release only moves forward.
2026-10-22 18:34:40 -04:00
bherbruck 33fdcdb3a0 Release 0.19.0
The tree is main at 5899e5b6c exactly; the previous release commit is kept as a parent so release only moves forward.
2026-10-21 21:13:33 -04:00
bherbruck c07ab5f8f9 Release 0.18.4
The tree is main at 728f753b8 exactly; the previous release commit is kept as a parent so release only moves forward.
2026-10-21 12:26:34 -04:00
bherbruck fea32f8aac Release 0.18.3
The tree is main at 034aa60d4 exactly; the previous release commit is kept as a parent so release only moves forward.
2026-10-21 08:46:37 -04:00
bherbruck 4927214976 Release 0.18.2
The tree is main at 57bcc4083 exactly; the previous release commit is kept as a parent so release only moves forward.
2026-10-20 22:09:18 -04:00
bherbruck b621819c0c Release 0.18.1
The tree is main at 522ae7755 exactly; the previous release commit is kept as a parent so release only moves forward.
2026-10-20 17:39:11 -04:00
bherbruck ec552a5300 Release 0.18.0
The tree is main at c3151fb7f exactly; the previous release commit is kept as a parent so release only moves forward.
2026-10-20 16:28:59 -04:00
bherbruck e0cc740cc3 Release 0.17.0
The tree is main at 511faedcf exactly; the 0.16.x release commits are kept as a parent so release only moves forward.
2026-10-20 11:41:48 -04:00
bherbruck 5de48e916d Release 0.16.2 2026-10-19 00:39:30 +00:00
bherbruck 80af7bbe3e Release 0.16.2
Version 0.16.2: 0.16.1 with the rigid orbit fix (#2753). Same design format (27).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 00:38:53 +00:00
bherbruck 191e983423 Fix orbit about the picked point (regression in 0.16.0) (#2753)
Orbiting about the point under the cursor (or the origin) turned the camera
about its target and then panned to put the pivot back. The pan works at the
target's depth with the parallel-view scale, so in a perspective view the
pivot slid off its pixel and the model swung about the camera.

The camera now turns rigidly about the pivot: Camera::orbit_about keeps the
pivot's coordinates in the camera's frame and rebuilds the target from the
new orientation, so the pivot stays exactly on its pixel in both projections.
The Shift snap spring and view.navigate's pivot orbit use the same.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit e88779218)
2026-10-19 00:38:52 +00:00
bherbruck 2b9445b049 Release 0.16.1 2026-10-18 20:16:21 +00:00
bherbruck 7ddf48ca16 Release 0.16.1
Version 0.16.1: 0.16.0 with the orbit fix (reverts #2142). Same design format (27).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 20:12:04 +00:00
bherbruck d2f6848377 Revert #2142: orbit about the picked point like 0.15.0
#2142 made orbiting about the point under the cursor turn the camera in place instead of turning the part about that point. Restore the 0.15.0 behaviour.

This reverts commit cac4bccea8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 20:12:00 +00:00
bherbruck 0b6d6fecd8 Release 0.16.0 2026-10-18 18:16:11 +00:00
bherbruck fa691707c2 Release 0.15.0 2026-10-17 13:54:24 +00:00
bherbruck b9a55c74e2 Release 0.15.0
Version 0.15.0; the pending design-format changes are folded into format 26.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:53:44 +00:00
bherbruck 2bb9c81069 Release 0.14.0 2026-10-16 09:19:14 +00:00
bherbruck cedb51b8ea Release 0.14.0
Version 0.14.0; the pending design-format changes are folded into format 25.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:19:10 +00:00
bherbruck 66d13059dd Release 0.13.1 2026-10-15 21:56:43 +00:00
bherbruck 800ea40c0d Release 0.13.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:56:35 +00:00
bherbruck 20442eecd3 Agent chat on Windows: start npm agents through their .cmd shim
npm puts a Unix shell script with the bare name (codex-acp,
claude-code-acp, gemini) beside the .cmd shim. The lookup tried the bare
name first, so every npm-installed agent failed with "not a valid Win32
application (os error 193)". Windows now only considers .exe/.cmd/.bat,
and a command saved with the bare path runs the shim beside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 60ea8c69d2)
2026-10-15 21:51:01 +00:00
bherbruck 22d1cd7032 Release 0.13.0 2026-10-15 20:34:13 +00:00
bherbruck 6a0dc18655 Fix the Windows 32-bit and macOS release builds
On 32-bit Windows SetWindowLongPtrW is SetWindowLongW, which takes and
returns i32, so the window-procedure hook didn't compile for i686.
The macOS app bundle now signs the bundled solidcraft-cli before the
bundle itself; codesign refuses a bundle with an unsigned helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 94e76cd97e)
2026-10-15 20:34:12 +00:00
bherbruck e006dbf1af Release 0.13.0
The tree is the 0.13.0 version commit (8241a750fa) on main exactly; the previous release is kept as a parent so release only moves forward.
2026-10-15 19:59:50 +00:00
bherbruck 8241a750fa Release 0.13.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:59:42 +00:00
bherbruck 41779cf7bb Release 0.12.0: release branch follows main again after the 0.11.1 patch
The tree is main at c36a6f9f exactly; the 0.11.1 patch commit is kept as a parent so release only moves forward.
2026-10-15 13:32:01 +00:00
bherbruck b01b9689c8 Release 0.11.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 20:41:41 +00:00
bherbruck 4426da6f5d Windows: start Direct3D 12 first, and Vulkan only without a D3D12 GPU (#1190)
* Windows: start Direct3D 12 first, and Vulkan only without a D3D12 GPU

wgpu started Vulkan, D3D12 and OpenGL together and preferred Vulkan, so
every Windows start loaded all installed Vulkan drivers. An old Intel
Vulkan driver (igvk64.dll) crashed 0.10.1 at startup inside the driver.

The app now probes D3D12, then Vulkan, then OpenGL, one backend at a
time, and starts only the first with a hardware adapter (WARP when none
has one). WGPU_BACKEND still wins; graphics.json's "backend" sets the
order by hand; the software renderer (safe mode, the retry) uses D3D12
alone. A new Windows CI job starts the real app under several settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CI: a test filter YAML parses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CI: the startup smoke test writes graphics.json where the app reads it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CI: run the WARP shader tests one at a time

WARP's shader JIT (d3d10warp.dll) crashed twice in 124 runs of the gpu
tests with four test threads, with a null read inside its own optimizer
while several devices compiled compute pipelines at once. Serial runs
did not crash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 95ea05e7c8)
2026-10-14 20:41:37 +00:00
bherbruck 5ead82e627 Release 0.11.0: release branch follows main again after the 0.10.1 patch
The tree is main at cccbe125 exactly; c29b0d2f (0.10.1) is kept as a parent so release only moves forward.
2026-10-14 20:07:41 +00:00
bherbruck c29b0d2f13 Release 0.10.1 2026-10-14 14:41:19 +00:00
bherbruck 480fd8d517 Fix the startup crash on D3D12 with FXC: CPU fallback for the tessellation pipeline, FXC-friendly shader (#1098) (#1099)
* GPU tessellation: a pipeline the device cannot build falls back to CPU meshing instead of crashing (#1098)

Build the tessellation compute pipeline inside error scopes; TessGpu::new returns an error,
and the viewport logs it and meshes bodies on the CPU. A Windows CI job builds the pipeline
with D3D12's FXC on the WARP adapter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tessellation shader: basis functions in one-dimensional local arrays, so D3D12's FXC compiles it (#1098)

FXC has to unroll loops that write an array inside a struct (Basis.n0/n1) or a 2-D array
(ndu) by a counter, and cannot with run-time trip counts (X3511). A2.2 basis functions in a
local 1-D array returned whole; derivatives from the degree p-1 functions; the pole step
offsets computed rather than indexed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:41:16 +00:00
bherbruck 4c09fa5355 Hovered and selected faces light solidly again over GPU-drawn bodies (#1064)
Since the model's mesh went back to the reference mesher (#940), the GPU viewport drew
opaque bodies from their display plans while hover and selection lit faces with the
reference mesh's triangles. Two triangulations of the same face at equal depth fought, so
a hovered face shimmered in wedges instead of lighting whole.

Faces lit over a body drawn from its plan now use the plan's own triangles
(ModelBody::plan_mesh, evaluated once on the CPU), and the highlight pass gets a small
depth bias toward the eye so f32 rounding between the GPU and CPU evaluations of the same
triangles cannot speckle it either.

Test: every face of a box with a pocket and a round boss, hovered and rendered offscreen
through the viewport's real pipelines on the GPU path, lights the same pixels as on the
CPU path (skipped without a GPU adapter).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:56:47 +00:00
788 changed files with 117979 additions and 7116 deletions
+4 -3
View File
@@ -1,6 +1,7 @@
# While a new geometry kernel is evaluated, new issues, pull requests and discussions about kernel
# work are labelled `kernel-paused` for a maintainer to answer (CONTRIBUTING.md, "Kernel work is
# paused"). The logic is in scripts/kernel-paused/ (tested in ci.yml).
# While a new geometry kernel is evaluated, new issues and discussions about kernel work, and new
# pull requests that change the kernel directories, are labelled `kernel-paused` for a maintainer to
# answer (CONTRIBUTING.md, "Kernel work is paused"). The logic is in scripts/kernel-paused/ (tested
# in ci.yml).
name: Kernel paused
on:
+2 -2
View File
@@ -350,7 +350,7 @@ jobs:
name: macOS build ${{ matrix.arch }}
needs: version
if: needs.version.outputs.build == 'true'
runs-on: macos-14
runs-on: macos-15
strategy:
fail-fast: false
matrix:
@@ -384,7 +384,7 @@ jobs:
name: macOS universal
needs: [version, macos-build]
if: needs.version.outputs.build == 'true'
runs-on: macos-14
runs-on: macos-15
env:
SOLIDCRAFT_VERSION: ${{ needs.version.outputs.version }}
SOLIDCRAFT_BUILD_DATE: ${{ needs.version.outputs.date }}
+149 -4
View File
@@ -84,6 +84,8 @@ Editable drawing code, native projects and shipped exports are collected under `
| docs/book/src/generated/tool-preview.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/tool-preview.json`; gitignored) | MIT OR Apache-2.0 |
| assets/fonts/liberation-sans/LiberationSans-Regular.ttf | Red Hat, Inc. (Liberation Fonts 2.x; digitized data Google) | https://github.com/liberationfonts (Debian fonts-liberation), unmodified; licence text in assets/fonts/liberation-sans/OFL.txt; used for sketch Text outlines | SIL OFL 1.1 |
| assets/fonts/biz-udp-gothic/BIZUDPGothic-Regular.ttf | The BIZ UDGothic Project Authors | https://github.com/googlefonts/morisawa-biz-ud-gothic (Google Fonts), unmodified; licence text in assets/fonts/biz-udp-gothic/OFL.txt; used for web UI Japanese font | SIL OFL 1.1 |
| assets/fonts/craft-ui-sc/CraftUI-SC.otf | Adobe / Google Inc. (Noto Sans SC); SolidCraft subset | https://github.com/notofonts/noto-cjk Sans/SubsetOTF/SC Regular, glyph-subset for assets/locales/zh.json and renamed Craft UI SC (OFL reserved-name); licence text in assets/fonts/craft-ui-sc/OFL.txt; web UI Simplified Chinese | SIL OFL 1.1 |
| assets/fonts/craft-ui-tc/CraftUI-TC.otf | Adobe / Google Inc. (Noto Sans TC); SolidCraft subset | https://github.com/notofonts/noto-cjk Sans/SubsetOTF/TC Regular, glyph-subset for assets/locales/zh-TW.json and renamed Craft UI TC (OFL reserved-name); licence text in assets/fonts/craft-ui-tc/OFL.txt; web UI Traditional Chinese | SIL OFL 1.1 |
| tests/step-conformance/cone_point.step | step-conformance contributors | generated from formulas by https://github.com/dan335/step-conformance (corpus/generated, 96f30bb); import regression fixture | CC0-1.0 |
| tests/step-conformance/cone_point_vertex.step | step-conformance contributors | generated from formulas by https://github.com/dan335/step-conformance (corpus/generated, 96f30bb); import regression fixture | CC0-1.0 |
| tests/step-conformance/cylinder.step | step-conformance contributors | generated from formulas by https://github.com/dan335/step-conformance (corpus/generated, 96f30bb); import regression fixture | CC0-1.0 |
@@ -125,6 +127,8 @@ Editable drawing code, native projects and shipped exports are collected under `
| assets/appearances/library.rs | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 |
| assets/appearances/opaque_finishes.rs | SolidCraft contributors | original illustrative opaque finish values; no external dataset, textures or measured engineering data | MIT OR Apache-2.0 |
| assets/fonts/biz-udp-gothic/OFL.txt | The BIZ UDGothic Project Authors | Unmodified accompanying font licence | SIL OFL 1.1 |
| assets/fonts/craft-ui-sc/OFL.txt | Adobe / Google Inc. (Noto CJK); SolidCraft header | Accompanying OFL for CraftUI-SC.otf | SIL OFL 1.1 |
| assets/fonts/craft-ui-tc/OFL.txt | Adobe / Google Inc. (Noto CJK); SolidCraft header | Accompanying OFL for CraftUI-TC.otf | SIL OFL 1.1 |
| assets/fonts/ibm-plex-mono/OFL.txt | IBM Corp. | Unmodified accompanying font licence | SIL OFL 1.1 |
| assets/fonts/ibm-plex-sans/OFL.txt | IBM Corp. | Unmodified accompanying font licence | SIL OFL 1.1 |
| assets/fonts/liberation-sans/OFL.txt | Red Hat, Inc.; Liberation Fonts contributors | Unmodified accompanying font licence | SIL OFL 1.1 |
@@ -185,11 +189,7 @@ Editable drawing code, native projects and shipped exports are collected under `
| assets/shaders/viewport.wgsl | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 |
| assets/styles/ui/palettes.rs | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 |
| assets/styles/ui/themes/gruvbox-dark.json | SolidCraft contributors | original SolidCraft theme file mapping SolidCraft's UI colours to the Gruvbox palette's colour values (Gruvbox by Pavel Pertsev, https://github.com/morhetz/gruvbox, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/gruvbox-dark-hard.json | SolidCraft contributors | original SolidCraft theme file mapping SolidCraft's UI colours to the Gruvbox palette's colour values (Gruvbox by Pavel Pertsev, https://github.com/morhetz/gruvbox, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/gruvbox-dark-soft.json | SolidCraft contributors | original SolidCraft theme file mapping SolidCraft's UI colours to the Gruvbox palette's colour values (Gruvbox by Pavel Pertsev, https://github.com/morhetz/gruvbox, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/gruvbox-light.json | SolidCraft contributors | original SolidCraft theme file mapping SolidCraft's UI colours to the Gruvbox palette's colour values (Gruvbox by Pavel Pertsev, https://github.com/morhetz/gruvbox, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/gruvbox-light-hard.json | SolidCraft contributors | original SolidCraft theme file mapping SolidCraft's UI colours to the Gruvbox palette's colour values (Gruvbox by Pavel Pertsev, https://github.com/morhetz/gruvbox, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/gruvbox-light-soft.json | SolidCraft contributors | original SolidCraft theme file mapping SolidCraft's UI colours to the Gruvbox palette's colour values (Gruvbox by Pavel Pertsev, https://github.com/morhetz/gruvbox, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/solidcraft-95.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 |
| assets/styles/ui/themes/platinum-9.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 |
| assets/styles/ui/themes/cupertino.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 |
@@ -610,6 +610,150 @@ Original SolidCraft drawings, Open for owner review; no runtime assignments.
| assets/icons/ui/design/svg/flat/status_pin.svg | SolidCraft contributors | Original analytic pin icon for persistent viewport results | MIT OR Apache-2.0 |
| assets/locales/pending/render-wear.json | SolidCraft contributors | Original UI labels and translations | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/equation_curve.svg | SolidCraft contributors | two-tone modelling icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
| assets/locales/pending/sketch-recent-snap.json | SolidCraft contributors | Original preference messages for the recent centre and midpoint snap | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/construction_line.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/construction_line_horizontal.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/construction_line_vertical.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/construction_line_angle.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/construction_line_parallel.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/construction_line_perpendicular.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/construction_line_tangent_external.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/construction_line_tangent_at.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/construction_line_tangent_two.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/construction_line_bisector.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| docs/book/src/generated/equation-circle.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/equation-circle.json`; gitignored) | MIT OR Apache-2.0 |
| docs/book/src/generated/equation-flower.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/equation-flower.json`; gitignored) | MIT OR Apache-2.0 |
| docs/book/src/generated/equation-involute.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/equation-involute.json`; gitignored) | MIT OR Apache-2.0 |
| docs/book/src/generated/equation-line.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/equation-line.json`; gitignored) | MIT OR Apache-2.0 |
| docs/book/src/generated/equation-parabola.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/equation-parabola.json`; gitignored) | MIT OR Apache-2.0 |
| docs/book/src/generated/equation-spiral.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/equation-spiral.json`; gitignored) | MIT OR Apache-2.0 |
| docs/book/src/generated/equation-wave.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/equation-wave.json`; gitignored) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/print_face.svg | SolidCraft contributors | two-tone modelling icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
| assets/locales/fi.json | SolidCraft contributors | Original Finnish translation of SolidCraft's English catalog, AI-assisted (Claude Code) clean-room from the English and not yet reviewed line by line by a native speaker; no commercial CAD text used | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/plane_axis_point.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| docs/design/preferences/figures/aa-2x.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/aa-2x.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/aa-4x.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/aa-4x.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/aa-8x.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/aa-8x.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/aa-off.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/aa-off.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/agent-pointer-speed.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/agent-pointer-speed.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/ao-on.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/ao-on.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/assembly-move.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/assembly-move.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/browser-card.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/browser-card.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/browser-column.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/browser-column.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-axes.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-axes.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-bends.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-bends.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-draft.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-draft.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-failed.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-failed.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-fixed.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-fixed.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-projected.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/colour-vision-projected.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/direct-interaction.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/direct-interaction.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/frame-rate.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/frame-rate.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/history-bottom.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/history-bottom.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/history-in-browser.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/history-in-browser.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/history-left.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/history-left.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/history-under-browser.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/history-under-browser.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/layout-schematic.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/layout-schematic.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/measure-axis-distances.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/measure-axis-distances.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/mouse-mapping.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/mouse-mapping.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/navigator-axes.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/navigator-axes.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/navigator-cube.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/navigator-cube.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/orbit-centre.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/orbit-centre.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/orbit-cursor.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/orbit-cursor.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/orbit-origin.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/orbit-origin.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/orientation-y-up.dark.svg | SolidCraft contributors | original SolidCraft artwork: the Orientation figure copied from the app and extracted from the Preferences redesign board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/orientation-y-up.light.svg | SolidCraft contributors | original SolidCraft artwork: the Orientation figure copied from the app and extracted from the Preferences redesign board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/orientation-z-up.dark.svg | SolidCraft contributors | original SolidCraft artwork: the Orientation figure copied from the app and extracted from the Preferences redesign board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/orientation-z-up.light.svg | SolidCraft contributors | original SolidCraft artwork: the Orientation figure copied from the app and extracted from the Preferences redesign board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/quick-measure.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/quick-measure.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/select-bodies.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/select-bodies.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/select-faces-edges.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/select-faces-edges.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-conflict.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-conflict.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-exit-keep.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-exit-keep.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-exit-previous.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-exit-previous.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-exit-unless-turned.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-exit-unless-turned.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-guides.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-guides.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-hide-glyphs.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-hide-glyphs.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-state-icons.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/sketch-state-icons.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/style-shaded-edges.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/style-shaded-edges.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tess-coarse.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tess-coarse.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tess-fine.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tess-fine.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tess-normal.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tess-normal.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tess-ultra.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tess-ultra.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-dark.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-dark.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-gruvbox.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-gruvbox.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-imported.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-imported.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-light.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-light.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-system-dark-half.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-system-dark-half.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-system-light-half.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/theme-system-light-half.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tool-cursor.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tool-cursor.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tool-extrude.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tool-extrude.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tool-hole.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tool-hole.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tool-placement.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/tool-placement.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/vertex-markers.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/vertex-markers.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/view-angles.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/view-angles.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/view-grid.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/view-grid.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/view-perspective.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/view-perspective.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/view-shadow.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| docs/design/preferences/figures/view-shadow.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
| `assets/locales/pending/sketch-offset-instances.json` | SolidCraft contributors | Original offset instance-count label and translations | MIT OR Apache-2.0 |
## Code adapted from sibling projects
@@ -669,6 +813,7 @@ copied into SolidCraft.
| Directory | Source | Licence | Changes |
|---|---|---|---|
| vendor/accesskit_macos | accesskit_macos 0.26.3, https://github.com/AccessKit/accesskit (The AccessKit contributors) | MIT OR Apache-2.0 | the subclassing adapter and its tests from 0.27.2: dropping the adapter keeps AppKit's key-value observers (vendor/README.md) |
| vendor/truck-meshalgo | truck-meshalgo 0.4.0, https://github.com/ricosjp/truck (RICOS Co. Ltd.) | Apache-2.0 | meshing: bounded parameter searches, collapsed-boundary projection, subdivision and provisional fixed-grid previews (vendor/README.md) |
| vendor/truck-stepio | truck-stepio 0.3.0, https://github.com/ricosjp/truck (RICOS Co. Ltd.) | Apache-2.0 | STEP writer: intersection-curve surfaces written at unique ids (vendor/README.md) |
| vendor/truck-shapeops | truck-shapeops 0.4.0, https://github.com/ricosjp/truck (RICOS Co. Ltd.) | Apache-2.0 | robust meshing and nearest-parameter fallback in booleans; degenerate intersection-curve rejection; face and edge history of booleans; trace macro; corner choice at vertices several intersection curves end on; reuse of an operand's meshes (vendor/README.md) |
+7 -6
View File
@@ -19,12 +19,13 @@ Questions, ideas or want to say what you're working on? Join the [Discord](https
## Kernel work is paused
We're evaluating a new geometry kernel. Until that's decided, please don't open issues, pull
requests or discussions about kernel work: booleans, fillets, chamfers, shell, offsets, sweeps and
lofts, threads and holes, STEP/IGES import and export, tessellation, or anything else that changes
`crates/kernel/`. The pinned issue on the tracker explains it. New ones get the `kernel-paused`
label (`.github/workflows/kernel-paused.yml`) and a maintainer answers them. Crashes and data loss
are still taken as issues, and everything outside the kernel carries on as normal.
We're moving to a new geometry kernel. Until that's done, please don't open pull requests that
change `crates/kernel/`, `crates/geom/` or `vendor/truck*`, or issues and discussions about kernel
work: booleans, fillets, chamfers, shell, offsets, sweeps and lofts, threads and holes, STEP/IGES
import and export, or tessellation. The pinned issue on the tracker explains it. New ones get the
`kernel-paused` label (`.github/workflows/kernel-paused.yml`) and a maintainer answers them. Crashes
and data loss are still taken as issues. Pull requests outside those directories carry on as normal,
including the dialogs and tools for these features.
## Get it running (about 10 minutes on a fast machine)
Generated
+39 -20
View File
@@ -60,8 +60,6 @@ dependencies = [
[[package]]
name = "accesskit_macos"
version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce02dc63b43f0c9296af9ac946312a2dc8814427d7a64d2d600971dac55b6076"
dependencies = [
"accesskit",
"accesskit_consumer 0.38.0",
@@ -4210,7 +4208,7 @@ dependencies = [
[[package]]
name = "solidcraft"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"block2 0.6.2",
"eframe",
@@ -4242,15 +4240,16 @@ dependencies = [
"windows-sys 0.61.2",
"winit",
"x11rb",
"zbus 5.19.0",
]
[[package]]
name = "solidcraft-3dx-client"
version = "0.27.0"
version = "0.30.0"
[[package]]
name = "solidcraft-cli"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"image",
"log",
@@ -4262,7 +4261,7 @@ dependencies = [
[[package]]
name = "solidcraft-derive"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"proc-macro2",
"quote",
@@ -4271,7 +4270,7 @@ dependencies = [
[[package]]
name = "solidcraft-doc"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"log",
"serde",
@@ -4288,7 +4287,7 @@ dependencies = [
[[package]]
name = "solidcraft-engine"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"image",
"log",
@@ -4309,7 +4308,7 @@ dependencies = [
[[package]]
name = "solidcraft-geom"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"serde",
"serde_json",
@@ -4318,7 +4317,7 @@ dependencies = [
[[package]]
name = "solidcraft-gpu"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"image",
"log",
@@ -4338,7 +4337,7 @@ dependencies = [
[[package]]
name = "solidcraft-io"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"cadmpeg-core",
"cadmpeg-ir",
@@ -4356,13 +4355,14 @@ dependencies = [
"solidcraft-doc",
"solidcraft-geom",
"solidcraft-kernel",
"solidcraft-testkit",
"thiserror 2.0.21",
"zip",
]
[[package]]
name = "solidcraft-kernel"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"log",
"proptest",
@@ -4382,8 +4382,9 @@ dependencies = [
[[package]]
name = "solidcraft-mcp"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"image",
"serde_json",
"solidcraft-engine",
"solidcraft-gpu",
@@ -4391,7 +4392,7 @@ dependencies = [
[[package]]
name = "solidcraft-render"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"image",
"moxcms",
@@ -4400,12 +4401,13 @@ dependencies = [
"serde_json",
"sha2 0.10.9",
"solidcraft-geom",
"web-time",
"weezl",
]
[[package]]
name = "solidcraft-sketch"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"harfrust",
"serde",
@@ -4418,14 +4420,18 @@ dependencies = [
[[package]]
name = "solidcraft-space-mouse"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"serde",
]
[[package]]
name = "solidcraft-testkit"
version = "0.30.0"
[[package]]
name = "solidcraft-ui-egui"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"arboard",
"egui",
@@ -4444,6 +4450,7 @@ dependencies = [
"solidcraft-gpu",
"solidcraft-space-mouse",
"syn 2.0.119",
"sys-locale",
"tiny-skia",
"toml",
"ttf-parser",
@@ -4455,7 +4462,7 @@ dependencies = [
[[package]]
name = "solidcraft-web"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"eframe",
"egui",
@@ -4559,6 +4566,18 @@ dependencies = [
"syn 2.0.119",
]
[[package]]
name = "sys-locale"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4"
dependencies = [
"js-sys",
"libc",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "tempfile"
version = "3.27.0"
@@ -4566,7 +4585,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
dependencies = [
"fastrand",
"getrandom 0.3.4",
"getrandom 0.4.3",
"once_cell",
"rustix 1.1.5",
"windows-sys 0.61.2",
@@ -5998,7 +6017,7 @@ checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7"
[[package]]
name = "xtask"
version = "0.27.0"
version = "0.30.0"
dependencies = [
"proc-macro2",
"serde",
+6 -1
View File
@@ -5,7 +5,7 @@ members = ["crates/*", "apps/*", "xtask"]
exclude = ["vendor"]
[workspace.package]
version = "0.27.0"
version = "0.30.0"
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.95"
@@ -28,6 +28,8 @@ solidcraft-space-mouse = { path = "crates/space-mouse" }
solidcraft-mcp = { path = "crates/mcp" }
solidcraft-derive = { path = "crates/derive" }
solidcraft-3dx-client = { path = "crates/threedx-client" }
# test tooling: a dev-dependency only (xtask/src/layers.rs)
solidcraft-testkit = { path = "crates/testkit" }
# foundation
thiserror = "2"
@@ -165,6 +167,9 @@ egui-wgpu = { path = "vendor/egui-wgpu" }
# winit 0.30 never binds and eframe 0.36 still requires winit 0.30.
winit = { path = "vendor/winit" }
# macOS: dropping the accessibility adapter leaves AppKit's key-value observers intact (#7535).
accesskit_macos = { path = "vendor/accesskit_macos" }
# Mutation testing (cargo-mutants, docs/mutation-testing.md): the ci profile with incremental
# builds, since every mutant rebuilds the crates above the one it changes.
[profile.mutants]
+38 -3
View File
@@ -1,6 +1,6 @@
Third-party software in SolidCraft
SolidCraft (the desktop app, solidcraft-cli and the web app) is built from the 560 crates below.
SolidCraft (the desktop app, solidcraft-cli and the web app) is built from the 561 crates below.
Generated by `cargo xtask licences` from Cargo.lock and the crates' own licence files.
SolidCraft's own licence is in LICENSE-MIT and LICENSE-APACHE, and NOTICE.
@@ -403,6 +403,7 @@ syn 1.0.109 (MIT OR Apache-2.0)
syn 2.0.119 (MIT OR Apache-2.0)
syn 3.0.6 (MIT OR Apache-2.0)
synstructure 0.13.2 (MIT)
sys-locale 0.3.2 (MIT OR Apache-2.0)
tempfile 3.27.0 (MIT OR Apache-2.0)
termcolor 1.4.1 (Unlicense OR MIT)
thiserror 1.0.69 (MIT OR Apache-2.0)
@@ -1836,8 +1837,8 @@ approx 0.4.0, as-raw-xcb-connection 1.0.1, atspi 0.29.0, atspi-common 0.13.0, at
cgmath 0.18.0, chardetng 0.1.17, codespan-reporting 0.13.1, encoding_rs 0.8.42, kurbo 0.13.1,
multiversion_no_op 1.0.0, nohash-hasher 0.2.0, peniko 0.6.1, polycool 0.4.0, raw-window-metal 1.1.0,
rustls-platform-verifier 0.7.1, self_cell 1.3.0, siphasher 1.0.4, spade 2.15.1, static_assertions
1.1.0, ureq 3.4.2, ureq-proto 0.6.4, utf8_iter 1.0.4, x11rb 0.13.2, x11rb-protocol 0.13.2, zeroize
1.9.1, zeroize_derive 1.5.0, zune-core 0.5.3, zune-jpeg 0.5.15
1.1.0, sys-locale 0.3.2, ureq 3.4.2, ureq-proto 0.6.4, utf8_iter 1.0.4, x11rb 0.13.2, x11rb-protocol
0.13.2, zeroize 1.9.1, zeroize_derive 1.5.0, zune-core 0.5.3, zune-jpeg 0.5.15
================================================================================
Apache License
@@ -13570,6 +13571,32 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================================================
sys-locale 0.3.2
================================================================================
MIT License
Copyright (c) 2021 1Password
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================================================
tempfile 3.27.0
================================================================================
@@ -16799,6 +16826,14 @@ Bundled fonts (SIL Open Font License, Version 1.1)
Copyright 2022 The BIZ UDGothic Project Authors (https://github.com/googlefonts/morisawa-biz-ud-mincho)
Source: https://github.com/googlefonts/morisawa-biz-ud-gothic
- CraftUI-SC.otf (assets/fonts/craft-ui-sc/CraftUI-SC.otf)
Copyright 2014-2021 Adobe / Google Inc. (Noto Sans SC subset for SolidCraft web zh)
Source: https://github.com/notofonts/noto-cjk (Sans SubsetOTF/SC)
- CraftUI-TC.otf (assets/fonts/craft-ui-tc/CraftUI-TC.otf)
Copyright 2014-2021 Adobe / Google Inc. (Noto Sans TC subset for SolidCraft web zh-TW)
Source: https://github.com/notofonts/noto-cjk (Sans SubsetOTF/TC)
- IBMPlexSans-Variable.ttf (assets/fonts/ibm-plex-sans/IBMPlexSans-Variable.ttf)
Copyright 2017 IBM Corp. with Reserved Font Name "Plex"
Source: https://github.com/IBM/plex
+4 -6
View File
@@ -720,11 +720,8 @@ fn cmd_mcp(args: &[String]) -> Result<(), String> {
eprintln!("solidcraft mcp: the design's folder is left out because {why}; add it with --allow-path if you mean it");
}
}
// How a headless session treats calls that break a command's parameter contract.
// How calls that break a command's parameter contract are treated, headless or bridged.
let param_check = parse_param_check("mcp", args)?;
if param_check != solidcraft_engine::schema::ParamCheck::Off && flag(args, "--connect").is_some() {
eprintln!("solidcraft mcp: --param-check applies to headless sessions; calls to the app are not checked yet");
}
let backend: Box<dyn solidcraft_mcp::Backend> = match (flag(args, "--connect"), flag(args, "--in")) {
(Some(_), Some(_)) => return Err("mcp: use either --connect or --in, not both".into()),
(Some(addr), None) => {
@@ -732,7 +729,7 @@ fn cmd_mcp(args: &[String]) -> Result<(), String> {
return Err(format!("mcp: --connect wants HOST:PORT, such as 127.0.0.1:7878, not `{addr}`"));
};
// Serve without the app too: the tools connect once it runs, and say it isn't until then.
let mut remote = solidcraft_mcp::Remote::new(addr, flag(args, "--token"));
let mut remote = solidcraft_mcp::Remote::new(addr, flag(args, "--token")).with_param_check(param_check);
if let Err(e) = remote.try_connect() {
eprintln!(
"solidcraft mcp: no SolidCraft app at {addr} yet ({e}); start it with `solidcraft --control {port}` \
@@ -752,7 +749,8 @@ fn cmd_mcp(args: &[String]) -> Result<(), String> {
let auto = !args.iter().any(|a| a == "--headless");
if auto && let Some(port) = discover_app() {
eprintln!("solidcraft mcp: bridged to the running app at 127.0.0.1:{port} (--headless starts a session of its own)");
return serve_mcp(Box::new(solidcraft_mcp::Remote::new(&format!("127.0.0.1:{port}"), flag(args, "--token"))), scope);
let remote = solidcraft_mcp::Remote::new(&format!("127.0.0.1:{port}"), flag(args, "--token")).with_param_check(param_check);
return serve_mcp(Box::new(remote), scope);
}
let mut headless = solidcraft_mcp::Headless::default();
headless.session.param_check = param_check;
+3 -1
View File
@@ -229,7 +229,9 @@ fn known_pending_concepts_and_released_files_round_trip_with_inert_metadata() {
assert!(output.status.success(), "{}", String::from_utf8_lossy(&output.stderr));
let reopened = io::read_design(&std::fs::read(&destination).unwrap()).unwrap();
assert_eq!(reopened.metadata, document.metadata);
assert_eq!(reopened.name, document.name);
// #4907: `run --save` maps to Save As, and a borrowed design name
// follows the destination file's stem instead of keeping the old name.
assert_eq!(reopened.name, format!("resaved-{index}"));
assert_eq!(reopened.features, document.features);
assert_eq!(std::fs::read(&source).unwrap(), bytes);
}
@@ -123,3 +123,42 @@ fn a_design_naming_a_sketch_and_its_extrude_alike_replays_from_its_script() {
assert_eq!(names, ["Block", "Block"], "{first:#}");
assert_eq!(second["commands"], first["commands"], "the replayed design's script has the same steps");
}
/// #10230: script export must disclose the print-face state that replay leaves out.
#[test]
fn script_export_warns_about_omitted_print_faces_on_stderr() {
let dir = std::env::temp_dir().join(format!("solidcraft-print-face-script-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let saved = dir.join("block.sc");
let exported = dir.join("block.json");
let mut s = Session::default();
s.execute("solid.box", &json!({"length": 20, "width": 10, "height": 5, "body_name": "Block"})).unwrap();
s.execute("body.print_face", &json!({"body": "Block", "point": [10, 5, 0]})).unwrap();
s.execute("file.save", &json!({"path": saved})).unwrap();
let native = std::fs::read(&saved).unwrap();
for to_file in [false, true] {
let mut cmd = std::process::Command::new(env!("CARGO_BIN_EXE_solidcraft-cli"));
cmd.arg("script").arg(&saved);
if to_file {
cmd.arg("--out").arg(&exported);
}
let out = cmd.output().unwrap();
let stderr = String::from_utf8_lossy(&out.stderr);
assert!(out.status.success(), "{stderr}");
assert!(stderr.contains("note: the script leaves out print-face assignments (body.print_face)"), "{stderr}");
let script = if to_file {
assert!(out.stdout.is_empty(), "--out must keep stdout empty");
std::fs::read(&exported).unwrap()
} else {
out.stdout
};
let script: Value = serde_json::from_slice(&script).unwrap();
let mut replayed = Session::default();
replayed.run_script(&script).unwrap();
assert!(replayed.doc.print_faces.is_empty());
assert_eq!(replayed.doc.features, s.doc.features);
assert_eq!(std::fs::read(&saved).unwrap(), native, "export must not change the source design");
}
std::fs::remove_dir_all(dir).unwrap();
}
+4
View File
@@ -22,6 +22,10 @@
<link data-trunk rel="rust" data-bin="solidcraft-web" data-wasm-opt="z" data-weak-refs />
<link data-trunk rel="copy-file" href="../../assets/fonts/biz-udp-gothic/BIZUDPGothic-Regular.ttf" data-target-path="fonts" />
<link data-trunk rel="copy-file" href="../../assets/fonts/biz-udp-gothic/OFL.txt" data-target-path="fonts" />
<link data-trunk rel="copy-file" href="../../assets/fonts/craft-ui-sc/CraftUI-SC.otf" data-target-path="fonts" />
<link data-trunk rel="copy-file" href="../../assets/fonts/craft-ui-sc/OFL.txt" data-target-path="fonts/craft-ui-sc" />
<link data-trunk rel="copy-file" href="../../assets/fonts/craft-ui-tc/CraftUI-TC.otf" data-target-path="fonts" />
<link data-trunk rel="copy-file" href="../../assets/fonts/craft-ui-tc/OFL.txt" data-target-path="fonts/craft-ui-tc" />
<link data-trunk rel="css" href="../../assets/styles/web/loading.css" />
<link data-trunk rel="copy-file" href="../../assets/styles/web/loading-logo.svg" />
<!-- Installable as an app (manifest.webmanifest); the icons are the Linux exports of the app mark. -->
+27 -8
View File
@@ -15,6 +15,9 @@ type Reply = Result<(String, Vec<u8>), String>;
pub struct Download {
reply: Rc<RefCell<Option<Reply>>>,
pending: Option<(String, Vec<u8>)>,
/// The downloaded design being opened (a few features a frame, #10198): the answer to come,
/// the name it takes and the file it was read from.
opening: Option<(std::sync::mpsc::Receiver<serde_json::Value>, String, String)>,
}
impl Download {
@@ -33,13 +36,14 @@ impl Download {
}
pub fn tick(&mut self, app: &mut SolveApp, ctx: &egui::Context) {
self.opened(app);
if let Some(reply) = self.reply.borrow_mut().take() {
match reply {
Ok(file) => self.pending = Some(file),
Err(error) => app.set_status(format!("Could not open design link: {error}"), true),
}
}
if self.pending.is_none() || app.file_picker_busy() {
if self.pending.is_none() || self.opening.is_some() || app.file_picker_busy() {
return;
}
if solidcraft_ui_egui::documents::any_dirty(app) {
@@ -71,18 +75,33 @@ impl Download {
}
}
let Some((name, bytes)) = self.pending.take() else { return };
// The extension selects the design loader even when the URL has no extension.
let path = &format!("/linked/design.{}", solidcraft_engine::io::DESIGN_EXT);
vfs::insert(path, bytes);
app.open_path(path);
if app.session.path.as_deref() == Some(path.as_str()) {
// The extension selects the design loader even when the URL has no extension. Named
// after the link, as the progress card shows the file's name.
let file: String = name.chars().map(|c| if matches!(c, '/' | '\\') { '_' } else { c }).collect();
let path = format!("/linked/{}.{}", if file.is_empty() { "design" } else { &file }, solidcraft_engine::io::DESIGN_EXT);
vfs::insert(&path, bytes);
// Opened as any design is, with its progress and Cancel; finished in `opened`.
self.opening = Some((app.open_path_answered(&path), name, path));
self.opened(app);
}
/// The downloaded design is in: it is an unsaved copy under the link's name.
fn opened(&mut self, app: &mut SolveApp) {
let Some((rx, _, _)) = &self.opening else { return };
let (ok, cancelled) = match rx.try_recv() {
Ok(reply) => (reply["ok"].as_bool() == Some(true), reply["error"].as_str().is_some_and(|e| e.contains("cancelled"))),
Err(std::sync::mpsc::TryRecvError::Empty) => return,
Err(std::sync::mpsc::TryRecvError::Disconnected) => (false, false),
};
let Some((_, name, path)) = self.opening.take() else { return };
if ok && app.session.path.as_deref() == Some(path.as_str()) {
app.session.path = None;
app.session.doc_mut().name = name;
app.session.mark_unsaved();
} else {
} else if !ok && !cancelled {
app.set_status("Could not open design link: the downloaded file is not a valid SolidCraft design", true);
}
let _ = vfs::remove(path);
let _ = vfs::remove(&path);
}
}
+79 -30
View File
@@ -273,8 +273,10 @@ mod web {
}
const JAPANESE_FONT_PATH: &str = "./fonts/BIZUDPGothic-Regular.ttf";
const CHINESE_SC_FONT_PATH: &str = "./fonts/CraftUI-SC.otf";
const CHINESE_TC_FONT_PATH: &str = "./fonts/CraftUI-TC.otf";
type FontLoadResult = Rc<std::cell::RefCell<Option<Result<Vec<u8>, String>>>>;
type FontLoadResult = Rc<std::cell::RefCell<Option<Result<(String, Vec<u8>), String>>>>;
struct Shell {
app: SolveApp,
@@ -292,11 +294,17 @@ mod web {
rename_focus: bool,
/// The start page's recent designs were filled from the stored ones.
recents_synced: bool,
/// On-demand CJK font: fetched only when a CJK language is selected.
/// On-demand script fonts: fetched only when a CJK language is selected.
font: solidcraft_ui_egui::fonts::CjkFontLoader,
font_result: FontLoadResult,
/// The fetched CJK font's bytes: kept so a language change can re-order the fallbacks.
/// The fetched Japanese font's bytes: kept so a language change can re-order the fallbacks.
cjk_bytes: Option<Vec<u8>>,
/// The fetched Chinese font's bytes (Simplified or Traditional for this session).
chinese_bytes: Option<Vec<u8>>,
/// Which Chinese face `chinese_bytes` is: `"zh"` or `"zh-TW"`.
chinese_kind: Option<&'static str>,
/// Kind requested by the in-flight fetch (`"ja"`, `"zh"`, or `"zh-TW"`).
font_fetch_kind: Option<&'static str>,
/// The language the fonts were last set up for (a CJK UI leads with the CJK face).
font_language: String,
space_mouse: SpaceMouse,
@@ -367,7 +375,8 @@ mod web {
// Designs opened from the computer's disk (the files window): open them.
let opened: Vec<_> = self.files.opened.borrow_mut().drain(..).collect();
for path in opened {
self.app.open_path(&path);
// A few features a frame, with progress and Cancel (#10198).
self.app.open_path_async(&path);
self.files.panel.set(false);
}
// Recent designs whose file is gone are dropped from the list.
@@ -408,7 +417,7 @@ mod web {
path
};
match intent {
Intent::Open => self.app.open_path(&path),
Intent::Open => self.app.open_path_async(&path),
Intent::Insert | Intent::Theme => self.app.drop_path(&path),
}
self.files.panel.set(false);
@@ -572,7 +581,7 @@ mod web {
let path = format!("{}{name}", files::OPFS);
match what {
"open" => {
self.app.open_path(&path);
self.app.open_path_async(&path);
self.files.panel.set(false);
}
"insert" => {
@@ -674,65 +683,102 @@ mod web {
files::autosave(&self.files, None);
}
/// Fetch and install the CJK font when a CJK language is selected. If that fails, this
/// Whether the shell already has the on-demand face the live language needs.
fn script_font_ready(&self) -> bool {
match solidcraft_ui_egui::fonts::web_script_font_kind(solidcraft_ui_egui::i18n::effective_language(&self.app.preferences.language)) {
Some("zh") => self.chinese_bytes.is_some() && self.chinese_kind == Some("zh"),
Some("zh-TW") => self.chinese_bytes.is_some() && self.chinese_kind == Some("zh-TW"),
Some("ja") => self.cjk_bytes.is_some(),
_ => true,
}
}
/// Fetch and install a script font when a CJK language is selected. If that fails, this
/// session falls back to English (no tofu); the saved language preference is kept.
fn tick_font(&mut self, ctx: &egui::Context) {
let done = self.font_result.borrow_mut().take();
if let Some(res) = done {
let kind = self.font_fetch_kind.take();
let installed = match res {
Ok(bytes) => {
self.cjk_bytes = Some(bytes);
Ok((path, bytes)) => {
match kind {
Some("zh") => {
self.chinese_bytes = Some(bytes);
self.chinese_kind = Some("zh");
}
Some("zh-TW") => {
self.chinese_bytes = Some(bytes);
self.chinese_kind = Some("zh-TW");
}
_ => {
self.cjk_bytes = Some(bytes);
}
}
log::info!("loaded web script font from {path}");
true
}
Err(err) => {
log::warn!("failed to fetch CJK font from {JAPANESE_FONT_PATH}: {err}");
let path = match kind {
Some("zh") => CHINESE_SC_FONT_PATH,
Some("zh-TW") => CHINESE_TC_FONT_PATH,
_ => JAPANESE_FONT_PATH,
};
log::warn!("failed to fetch script font from {path}: {err}");
false
}
};
if installed {
log::info!("loaded web CJK font from {JAPANESE_FONT_PATH}");
} else if solidcraft_ui_egui::fonts::needs_cjk_font(&self.app.preferences.language) {
log::warn!("CJK font unavailable; showing English for this session");
let effective = solidcraft_ui_egui::i18n::effective_language(&self.app.preferences.language);
if !installed && solidcraft_ui_egui::fonts::needs_cjk_font(effective) {
log::warn!("script font unavailable; showing English for this session");
}
self.font.finished(installed, &mut self.app.preferences.language);
self.apply_fonts(ctx);
ctx.request_repaint();
}
if self.font.tick(&mut self.app.preferences.language) {
self.fetch_font(ctx);
let ready = self.script_font_ready();
let effective = solidcraft_ui_egui::i18n::effective_language(&self.app.preferences.language);
if self.font.tick(&mut self.app.preferences.language, ready) {
self.fetch_font(ctx, solidcraft_ui_egui::fonts::web_script_font_kind(effective).unwrap_or("ja"));
}
// The CJK face leads only a CJK UI: its Cyrillic glyphs are full-width, so switching
// to Ukrainian (or English) must put the Latin face back in front.
if self.app.preferences.language != self.font_language {
if solidcraft_ui_egui::i18n::effective_language(&self.app.preferences.language) != self.font_language {
self.apply_fonts(ctx);
}
}
/// Set up the UI fonts for the live language, keeping the fetched CJK font as a fallback
/// (it leads only for a CJK UI, see [`solidcraft_ui_egui::fonts::install_cjk_font_for`]).
/// Set up the UI fonts for the live language, keeping fetched script fonts as fallbacks
/// (Chinese leads a Chinese UI; see [`solidcraft_ui_egui::fonts::install_web_script_fonts`]).
fn apply_fonts(&mut self, ctx: &egui::Context) {
match self.cjk_bytes.clone() {
Some(bytes) => {
solidcraft_ui_egui::fonts::install_cjk_font_for(ctx, bytes, &self.app.preferences.language);
}
None => solidcraft_ui_egui::fonts::setup_fonts(ctx),
let effective = solidcraft_ui_egui::i18n::effective_language(&self.app.preferences.language);
if self.cjk_bytes.is_none() && self.chinese_bytes.is_none() {
solidcraft_ui_egui::fonts::setup_fonts(ctx);
} else {
solidcraft_ui_egui::fonts::install_web_script_fonts(ctx, self.cjk_bytes.clone(), self.chinese_bytes.clone(), effective);
}
self.font_language.clone_from(&self.app.preferences.language);
self.font_language = effective.to_owned();
}
/// CJK text on screen with no CJK font yet (an English UI showing a Japanese name):
/// fetch the font, so the text does not stay tofu (#720).
/// CJK text on screen with no Japanese font yet (an English UI showing a Japanese name):
/// fetch the Japanese font, so the text does not stay tofu (#720).
fn watch_text_for_font(&mut self, ctx: &egui::Context) {
if self.font.watching_text() && solidcraft_ui_egui::fonts::painted_cjk(ctx) && self.font.text_needs_font() {
self.fetch_font(ctx);
self.fetch_font(ctx, "ja");
}
}
fn fetch_font(&self, ctx: &egui::Context) {
fn fetch_font(&mut self, ctx: &egui::Context, kind: &'static str) {
let path = match kind {
"zh" => CHINESE_SC_FONT_PATH,
"zh-TW" => CHINESE_TC_FONT_PATH,
_ => JAPANESE_FONT_PATH,
};
self.font_fetch_kind = Some(kind);
let slot = self.font_result.clone();
let ctx = ctx.clone();
let path = path.to_owned();
wasm_bindgen_futures::spawn_local(async move {
let res = fetch_font_bytes(JAPANESE_FONT_PATH).await;
let res = fetch_font_bytes(&path).await.map(|bytes| (path, bytes));
*slot.borrow_mut() = Some(res);
ctx.request_repaint();
});
@@ -962,6 +1008,9 @@ mod web {
font: Default::default(),
font_result: Rc::new(std::cell::RefCell::new(None)),
cjk_bytes: None,
chinese_bytes: None,
chinese_kind: None,
font_fetch_kind: None,
font_language,
space_mouse: SpaceMouse::default(),
wheel_gestures: solidcraft_ui_egui::WebWheelGestures::default(),
+5
View File
@@ -104,5 +104,10 @@ winit = { version = "0.30", default-features = false, features = ["x11"] }
raw-window-handle = "0.6"
x11rb = { version = "0.13", default-features = false }
[target.'cfg(target_os = "linux")'.dependencies]
# The desktop's dark or light preference through the XDG Desktop Portal (src/desktop_theme.rs,
# #7944); already in the tree through eframe's accessibility support (accesskit_unix).
zbus = { version = "5", default-features = false, features = ["async-io", "blocking-api"] }
[build-dependencies]
embed-resource = "3.0.11"
+116 -11
View File
@@ -413,11 +413,37 @@ impl Lines {
}
}
/// A subscribed connection's seat on the watch: it leaves exactly once, whichever thread sees
/// the connection's end first — the connection's own thread at the end of the stream, or the
/// events thread at the first write a closed client refuses. The seat used to wait for the
/// events thread alone, and that thread only leaves its wait when the design moves, so the
/// count could outlive the connection by a second or more (#8315).
struct Seat(Mutex<Option<Subscriber>>);
impl Seat {
fn new(counted: Subscriber) -> Self {
Seat(Mutex::new(Some(counted)))
}
/// Leave the watch now: the seat goes once, whoever gets here first.
fn release(&self) {
let counted = self.0.lock().unwrap_or_else(PoisonError::into_inner).take();
drop(counted);
}
}
impl Drop for Seat {
fn drop(&mut self) {
self.release();
}
}
/// A connection's `control.subscribe` (#6985): its `design.changed` lines, sent from a thread of
/// their own until the connection ends.
struct Subscription {
lines: Arc<Lines>,
stop: Arc<AtomicBool>,
seat: Arc<Seat>,
}
impl Subscription {
@@ -433,15 +459,17 @@ impl Subscription {
) -> Option<(Self, std::io::Result<()>)> {
let lines = Arc::new(Lines { socket: out.try_clone().ok()?, turn: Mutex::new(()) });
let stop = Arc::new(AtomicBool::new(false));
let seat = Arc::new(Seat::new(counted));
let first = lines.turn.lock().unwrap_or_else(PoisonError::into_inner);
let (l, s) = (lines.clone(), stop.clone());
let (l, s, watch_seat) = (lines.clone(), stop.clone(), Arc::clone(&seat));
// The connection's seat on the watch rides the events thread: it leaves when the thread
// does, so the next failed write to a closed client retires it even while the connection's
// own thread is slow to see the end of the stream (#7226).
std::thread::Builder::new().stack_size(64 * 1024).spawn(move || send_events(design, &l, &s, seen, counted)).ok()?;
// own thread is slow to see the end of the stream (#7226). The connection's own thread
// leaves it too, so a closed connection stops counting at once (#8315).
std::thread::Builder::new().stack_size(64 * 1024).spawn(move || send_events(design, &l, &s, seen, watch_seat)).ok()?;
let sent = send(&mut &lines.socket, reply);
drop(first);
Some((Subscription { lines, stop }, sent))
Some((Subscription { lines, stop, seat }, sent))
}
}
@@ -454,6 +482,9 @@ fn design_of(reply: &Value) -> Option<(String, u64)> {
impl Drop for Subscription {
fn drop(&mut self) {
self.stop.store(true, Ordering::Relaxed);
// The seat on the watch goes now: the connection is over, and nothing counts it any more
// (#8315).
self.seat.release();
// The socket closes now, not when the thread next looks; a line blocked on a client that
// stopped reading ends too.
let _ = self.lines.socket.shutdown(std::net::Shutdown::Both);
@@ -461,10 +492,10 @@ impl Drop for Subscription {
}
/// The `design.changed` lines of a subscribed connection, each time the design differs from the
/// last one it was told of (`seen`), until `stop`. Owns the connection's seat on the watch
/// (`counted`), so the seat leaves exactly when this thread does: on `stop`, or on the first
/// write a closed client refuses (#7226).
fn send_events(design: &DesignWatch, lines: &Lines, stop: &AtomicBool, mut seen: (String, u64), _counted: Subscriber) {
/// last one it was told of (`seen`), until `stop`. Holds the connection's seat on the watch
/// (`seat`), which it leaves when the thread ends: on `stop`, or on the first write a closed
/// client refuses (#7226).
fn send_events(design: &DesignWatch, lines: &Lines, stop: &AtomicBool, mut seen: (String, u64), seat: Arc<Seat>) {
while !stop.load(Ordering::Relaxed) {
let Some(now) = design.wait(&seen, stop, Duration::from_secs(1)).filter(|now| *now != seen) else { continue };
if lines.send(&json!({"event": "design.changed", "params": {"document_id": now.0, "revision": now.1}})).is_err() {
@@ -473,6 +504,17 @@ fn send_events(design: &DesignWatch, lines: &Lines, stop: &AtomicBool, mut seen:
seen = now;
std::thread::sleep(EVENT_GAP);
}
// The client is gone: it is not counted on the watch any more, whatever the connection's own
// thread still has to notice (#8315).
seat.release();
}
/// What this app's control channel does beyond the methods every version has, for a client to
/// find out before it relies on it (an older app answers `control.capabilities` with "unknown
/// method"). `param_check`: the levels `engine.execute`, `engine.batch` and `engine.script` take
/// as a request's own parameter check (#9184).
fn capabilities() -> Value {
json!({"param_check": solidcraft_engine::schema::ParamCheck::ALL.map(|l| l.name())})
}
/// Write `reply` on the connection: through its subscription once it has one.
@@ -535,15 +577,20 @@ fn serve_with(
let id = msg.get("id").cloned().unwrap_or(Value::Null);
let method = msg.get("method").and_then(Value::as_str).unwrap_or("").to_string();
let params = msg.get("params").cloned().unwrap_or(json!({}));
// A request that timed out may have finished since (#1618). `control.running` only
// looks, so it leaves that reply where it is.
let late = pending.as_ref().filter(|_| method != "control.running").and_then(|p| match p.reply.try_recv() {
// A request that timed out may have finished since (#1618). `control.running` and
// `control.capabilities` only look, so they leave that reply where it is.
let late = pending.as_ref().filter(|_| !matches!(method.as_str(), "control.running" | "control.capabilities")).and_then(|p| match p
.reply
.try_recv()
{
Ok(reply) => Some(reply),
Err(TryRecvError::Disconnected) => Some(json!({"ok": false, "error": "the app ended the request without a reply"})),
Err(TryRecvError::Empty) => None,
});
let mut r = if method == "control.running" {
json!({"ok": true, "result": running.result(connection)})
} else if method == "control.capabilities" {
json!({"ok": true, "result": capabilities()})
} else if method == "control.pending" {
match (pending.take(), late) {
(None, _) => json!({"ok": true, "result": {"pending": null}}),
@@ -750,6 +797,9 @@ mod tests {
let mut watcher = open();
let (r, rows) = running(&mut watcher, &|_| true);
assert!(r["ok"] == true && rows.is_empty(), "idle: {r}");
// What the app's control channel does beyond the methods every version has (#9184).
let r = watcher(json!({"id": 0, "method": "control.capabilities", "token": token}));
assert_eq!((&r["ok"], &r["result"]["param_check"]), (&json!(true), &json!(["off", "warn", "strict"])), "{r}");
let mut export = open();
let path = "/private/part.step";
@@ -781,6 +831,9 @@ mod tests {
let own: Vec<&Value> = r["result"]["running"].as_array().unwrap().iter().filter(|row| row["self"] == true).collect();
assert_eq!(own.len(), 1, "{r}");
assert_eq!(own[0]["command"], "file.export", "{r}");
// So may it ask what the app can do: answered at once, not refused as busy.
let r = export(json!({"id": 8, "method": "control.capabilities"}));
assert_eq!(r["result"]["param_check"], json!(["off", "warn", "strict"]), "{r}");
gate_tx.send(()).unwrap();
assert_eq!(queued.join().unwrap()["result"], "engine.batch");
@@ -886,6 +939,58 @@ mod tests {
assert!(!WATCH.subscribed());
}
/// #8315: a closed connection leaves the watch at once. The seat of a subscribed connection
/// goes when the connection's own thread sees the end of the stream, not only when the
/// events thread notices: that thread waits for the design to move, so a connection that
/// closed while the design stood still kept the watch counting it for a second or more.
#[test]
fn a_closed_connection_leaves_the_watch_at_once() {
static RUNNING: Running = Running::new();
static WATCH: DesignWatch = DesignWatch::new();
let token = "0123456789abcdef0123456789abcdef";
let listener = TcpListener::bind("127.0.0.1:0").unwrap();
let addr = listener.local_addr().unwrap();
let (tx, rx) = channel::<ControlRequest>();
// The window names the design once and then leaves it alone: nothing moves it, so the
// events thread has nothing to write and only the end of the connection can retire it.
std::thread::spawn(move || {
for req in rx {
if req.method == "control.subscribe" {
WATCH.publish("d-1", 3);
let _ = req.reply.send(json!({"ok": true, "result": {"document_id": "d-1", "revision": 3}}));
} else {
let _ = req.reply.send(json!({"ok": true, "result": req.method}));
}
}
});
std::thread::spawn(move || {
for stream in listener.incoming().flatten() {
let tx = tx.clone();
std::thread::spawn(move || serve_with(stream, token, tx, egui::Context::default(), false, WAITS, &RUNNING, &WATCH));
}
});
let s = TcpStream::connect(addr).unwrap();
s.set_read_timeout(Some(Duration::from_secs(10))).unwrap();
let mut out = s.try_clone().unwrap();
let mut lines = BufReader::new(s);
writeln!(out, "{}", json!({"id": 1, "method": "control.subscribe", "token": token})).unwrap();
let mut l = String::new();
lines.read_line(&mut l).unwrap();
let reply: Value = serde_json::from_str(&l).unwrap();
assert!(reply["ok"] == true, "{reply}");
assert!(WATCH.subscribed(), "the connection is subscribed");
// Let the events thread settle into its wait: the design stands still, so it has nothing
// to write, and only the end of the connection can retire it.
std::thread::sleep(Duration::from_millis(200));
// The client goes away without asking anything else.
drop((out, lines));
let deadline = Instant::now() + Duration::from_millis(400);
while WATCH.subscribed() && Instant::now() < deadline {
std::thread::sleep(Duration::from_millis(10));
}
assert!(!WATCH.subscribed(), "a closed connection is not counted on the watch");
}
/// A timed-out request that only reads is not said to "still apply", nor is one that only
/// writes a file (an export, #1989); a change is, by name.
#[test]
+195
View File
@@ -0,0 +1,195 @@
//! Linux: the desktop's dark or light preference, for Theme: System (#7944).
//!
//! The window toolkit does not pass it on everywhere: on GNOME (Wayland, or X11 through XWayland)
//! the window never learns it, nor when it changes, so the app kept its colours. This reads the
//! freedesktop setting through the XDG Desktop Portal's Settings interface on the session bus
//! (`org.freedesktop.appearance color-scheme`, then GNOME's `color-scheme` and `gtk-theme`), the
//! same setting other applications follow, and inside a Flatpak too. It runs on a thread of its
//! own: the first reading, then the portal's `SettingChanged` signal; where the signal can't be
//! had, a reading every few seconds. Without a portal it asks `gsettings` instead, on the same
//! thread. The window reads the last answer with an atomic load
//! (`solidcraft_ui_egui::Services::desktop_dark`), and the decision from the raw values is
//! `solidcraft_ui_egui::prefs::desktop_prefers_dark`.
use std::io::Read;
use std::sync::Arc;
use std::sync::atomic::{AtomicU8, Ordering};
use std::time::Duration;
use zbus::zvariant::{OwnedValue, Value};
const UNKNOWN: u8 = 0;
const DARK: u8 = 1;
const LIGHT: u8 = 2;
/// How often to read again where the portal's change signal is not available.
const POLL: Duration = Duration::from_secs(5);
/// How long one `gsettings` reading may take before it is given up.
const GSETTINGS_TIMEOUT: Duration = Duration::from_secs(2);
const PORTAL: &str = "org.freedesktop.portal.Desktop";
const PORTAL_PATH: &str = "/org/freedesktop/portal/desktop";
const SETTINGS: &str = "org.freedesktop.portal.Settings";
const APPEARANCE: &str = "org.freedesktop.appearance";
const GNOME: &str = "org.gnome.desktop.interface";
/// Start following the desktop's preference; the closure answers the latest reading (`None`
/// until there is one, or when the desktop says nothing).
pub fn start(ctx: &egui::Context) -> Box<dyn Fn() -> Option<bool>> {
let state = Arc::new(AtomicU8::new(UNKNOWN));
let (thread_state, ctx) = (state.clone(), ctx.clone());
if let Err(e) = std::thread::Builder::new().name("desktop-theme".into()).spawn(move || follow(&thread_state, &ctx)) {
log::warn!("desktop theme: no thread to follow it: {e}");
}
Box::new(move || match state.load(Ordering::Relaxed) {
DARK => Some(true),
LIGHT => Some(false),
_ => None,
})
}
/// Keep `state` on the desktop's preference, asking for a frame whenever it changes.
fn follow(state: &AtomicU8, ctx: &egui::Context) {
let publish = |dark: Option<bool>| {
let code = match dark {
Some(true) => DARK,
Some(false) => LIGHT,
None => UNKNOWN,
};
if state.swap(code, Ordering::Relaxed) != code {
ctx.request_repaint();
}
};
let portal = match portal() {
Ok(p) => Some(p),
Err(e) => {
log::info!("desktop theme: no settings portal ({e}); asking gsettings");
None
}
};
// The portal first; gsettings where there is none or it says nothing (its backend missing).
let read = |portal: Option<&zbus::blocking::Proxy<'static>>| portal.and_then(read_portal).or_else(read_gsettings);
let from_portal = portal.as_ref().and_then(read_portal);
let first = from_portal.or_else(read_gsettings);
publish(first);
// Wait for the portal's signal only when the portal answers: else the reading is gsettings',
// which only a new reading notices.
if let Some(p) = portal.as_ref().filter(|_| from_portal.is_some()) {
match p.receive_signal("SettingChanged") {
Ok(changes) => {
for message in changes {
if relevant(&message) {
publish(read(Some(p)));
}
}
log::info!("desktop theme: the portal's change signal ended; reading every few seconds");
}
Err(e) => log::info!("desktop theme: no change signal ({e}); reading every few seconds"),
}
} else if portal.is_none() && first.is_none() && !gsettings_available() {
// Neither the portal nor gsettings: nothing to follow; the window toolkit's theme stays.
return;
}
loop {
std::thread::sleep(POLL);
publish(read(portal.as_ref()));
}
}
/// The portal's Settings interface on the session bus.
fn portal() -> zbus::Result<zbus::blocking::Proxy<'static>> {
let connection = zbus::blocking::Connection::session()?;
zbus::blocking::Proxy::new(&connection, PORTAL, PORTAL_PATH, SETTINGS)
}
/// One reading through the portal.
fn read_portal(portal: &zbus::blocking::Proxy<'static>) -> Option<bool> {
let appearance = read_setting(portal, APPEARANCE, "color-scheme").and_then(|v| as_u32(&v));
// The GNOME settings only matter when the freedesktop one has no preference.
if matches!(appearance, Some(1 | 2)) {
return solidcraft_ui_egui::prefs::desktop_prefers_dark(appearance, None, None);
}
let gnome = read_setting(portal, GNOME, "color-scheme").and_then(|v| as_string(&v));
let gtk_theme = read_setting(portal, GNOME, "gtk-theme").and_then(|v| as_string(&v));
solidcraft_ui_egui::prefs::desktop_prefers_dark(appearance, gnome.as_deref(), gtk_theme.as_deref())
}
/// A setting through `ReadOne` (portal version 2), else the older `Read`.
fn read_setting(portal: &zbus::blocking::Proxy<'static>, namespace: &str, key: &str) -> Option<OwnedValue> {
let one: zbus::Result<OwnedValue> = portal.call("ReadOne", &(namespace, key));
one.or_else(|_| -> zbus::Result<OwnedValue> { portal.call("Read", &(namespace, key)) }).ok()
}
/// Whether a `SettingChanged` signal is about a setting the preference is read from.
fn relevant(message: &zbus::Message) -> bool {
let body = message.body();
let Ok((namespace, key, _)) = body.deserialize::<(String, String, OwnedValue)>() else { return false };
matches!((namespace.as_str(), key.as_str()), (APPEARANCE, "color-scheme") | (GNOME, "color-scheme" | "gtk-theme"))
}
/// The value inside the variants `Read` wraps it in (a portal answers one or two deep).
fn unwrap_variants<'v, 'a>(value: &'v Value<'a>) -> &'v Value<'a> {
let mut value = value;
for _ in 0..4 {
match value {
Value::Value(inner) => value = &**inner,
_ => break,
}
}
value
}
fn as_u32(value: &Value<'_>) -> Option<u32> {
match unwrap_variants(value) {
Value::U32(n) => Some(*n),
Value::I32(n) => u32::try_from(*n).ok(),
Value::U8(n) => Some(u32::from(*n)),
_ => None,
}
}
fn as_string(value: &Value<'_>) -> Option<String> {
match unwrap_variants(value) {
Value::Str(s) => Some(s.as_str().to_string()),
_ => None,
}
}
/// Without a portal: GNOME's settings through `gsettings` (`None` when it is not there).
fn read_gsettings() -> Option<bool> {
let gnome = gsettings("color-scheme");
let gtk_theme = gsettings("gtk-theme");
solidcraft_ui_egui::prefs::desktop_prefers_dark(None, gnome.as_deref(), gtk_theme.as_deref())
}
fn gsettings_available() -> bool {
gsettings("gtk-theme").is_some()
}
/// `gsettings get org.gnome.desktop.interface <key>`, its quoted answer, or `None` when the
/// program is missing, fails or does not answer in time.
fn gsettings(key: &str) -> Option<String> {
let mut child = std::process::Command::new("gsettings")
.args(["get", GNOME, key])
.stdin(std::process::Stdio::null())
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::null())
.spawn()
.ok()?;
let started = std::time::Instant::now();
loop {
match child.try_wait() {
Ok(Some(status)) if status.success() => break,
Ok(None) if started.elapsed() < GSETTINGS_TIMEOUT => std::thread::sleep(Duration::from_millis(20)),
_ => {
let _ = child.kill();
let _ = child.wait();
return None;
}
}
}
let mut out = String::new();
child.stdout.take()?.take(4096).read_to_string(&mut out).ok()?;
let value = out.trim().trim_matches('\'').to_string();
(!value.is_empty()).then_some(value)
}
+93 -10
View File
@@ -5,12 +5,25 @@
//! for recovery as a forced quit does, and starts again ([`restart`]), and the new start says what
//! happened ([`note`]). A device lost again soon after such a restart starts the next one on the
//! software renderer, which doesn't depend on the graphics driver.
//!
//! The old process ends without tearing down its GPU objects ([`end`]): on a lost NVIDIA device
//! destroying the window's swap chain busy-waits in the driver and never returns (#9044).
use crate::startup;
/// Set on the start after a lost device: when the device was lost (seconds since 1970).
pub const LOST_ENV: &str = "SOLIDCRAFT_DEVICE_LOST";
/// Set on the start after a lost device: why it was lost, as wgpu said it. The old process's
/// session journal, which recorded it, is gone by then.
pub const REASON_ENV: &str = "SOLIDCRAFT_DEVICE_LOST_REASON";
/// The longest reason passed on ([`REASON_ENV`]) and shown, in characters.
const REASON_CHARS: usize = 300;
/// How long the process may take to end ([`end`]) before it is aborted.
const END_GRACE: std::time::Duration = std::time::Duration::from_secs(3);
/// A loss this recent (seconds) counts for the start after it: its note, and a second loss
/// within it starts on the software renderer. Inherited by later starts, an older stamp is
/// ignored.
@@ -32,27 +45,54 @@ pub fn restart_on_software(after_recent_loss: bool, cpu_renderer: bool) -> bool
after_recent_loss || cpu_renderer
}
/// `reason` on one line, at most [`REASON_CHARS`] long; None when there is nothing to say.
pub fn reason(reason: Option<&str>) -> Option<String> {
let line = reason?.split_whitespace().collect::<Vec<_>>().join(" ");
(!line.is_empty()).then(|| line.chars().take(REASON_CHARS).collect())
}
/// What the start after a lost device tells the user, `software` when it runs on the software
/// renderer.
pub fn note(software: bool) -> String {
/// renderer, with what the driver reported ([`REASON_ENV`]).
pub fn note(software: bool, reason: Option<&str>) -> String {
let mut note = String::from(
"The graphics device was reset (the graphics driver stopped responding), so SolidCraft closed and started again. Unsaved changes were kept for recovery.",
);
if software {
note.push_str(" This start uses software rendering, which doesn't depend on the graphics driver.");
}
if let Some(reason) = self::reason(reason) {
note.push_str(&format!(" The graphics driver reported: {reason}"));
}
note
}
/// Start SolidCraft again with the same arguments, the loss stamped at `lost_at`, on the software
/// renderer when `software`.
pub fn restart(software: bool, lost_at: u64) {
let Ok(exe) = std::env::current_exe() else { return };
/// The command that starts `exe` again with `args`, the loss stamped at `lost_at` and its
/// `reason`, on the software renderer when `software`.
fn command(
exe: std::path::PathBuf,
args: impl IntoIterator<Item = std::ffi::OsString>,
software: bool,
lost_at: u64,
reason: &str,
) -> std::process::Command {
let mut command = std::process::Command::new(exe);
command.args(std::env::args_os().skip(1)).env(LOST_ENV, lost_at.to_string());
command.args(args).env(LOST_ENV, lost_at.to_string());
match self::reason(Some(reason)) {
Some(reason) => command.env(REASON_ENV, reason),
// Not one inherited from an earlier loss.
None => command.env_remove(REASON_ENV),
};
if software {
command.env(startup::RENDERER_ENV, "cpu");
}
command
}
/// Start SolidCraft again with the same arguments, the loss stamped at `lost_at` and its `reason`,
/// on the software renderer when `software`.
pub fn restart(software: bool, lost_at: u64, reason: &str) {
let Ok(exe) = std::env::current_exe() else { return };
let mut command = command(exe, std::env::args_os().skip(1), software, lost_at, reason);
#[cfg(windows)]
{
use std::os::windows::process::CommandExt;
@@ -64,6 +104,23 @@ pub fn restart(software: bool, lost_at: u64) {
}
}
/// End the process now, without tearing down what is left on the lost device: the window's swap
/// chain, the viewport's buffers and pipelines. On NVIDIA's Vulkan driver destroying the swap
/// chain of a lost device busy-waits forever, which left the old window frozen at 100% of a core
/// beside the new one (#9044). Should the exit itself get stuck in a library's exit handler, the
/// process is aborted after [`END_GRACE`].
pub fn end() -> ! {
let watchdog = std::thread::Builder::new().name("solidcraft-exit".into()).spawn(|| {
std::thread::sleep(END_GRACE);
eprintln!("SolidCraft graphics: still closing after the device was lost; aborting");
std::process::abort();
});
if let Err(e) = watchdog {
log::warn!("graphics: no exit watchdog: {e}");
}
std::process::exit(0)
}
#[cfg(test)]
mod tests {
/// Only a recent, well-formed stamp counts: a later start that inherited it says nothing.
@@ -84,8 +141,34 @@ mod tests {
assert!(!super::restart_on_software(false, false));
assert!(super::restart_on_software(true, false));
assert!(super::restart_on_software(false, true));
assert!(super::note(true).contains("software rendering"));
assert!(!super::note(false).contains("software rendering"));
assert!(super::note(false).contains("kept for recovery"));
assert!(super::note(true, None).contains("software rendering"));
assert!(!super::note(false, None).contains("software rendering"));
assert!(super::note(false, None).contains("kept for recovery"));
}
/// The start after a loss is told why (#9044): the old process's journal held the reason, and
/// it is deleted as that process closes.
#[test]
fn the_next_start_is_told_why_the_device_was_lost() {
let exe = std::path::PathBuf::from("solidcraft");
let args = ["--control".into(), "7979".into()];
let command = super::command(exe.clone(), args, true, 1_000, "Lost: Device lost\n (vkQueueSubmit)");
let env = |command: &std::process::Command, name: &str| {
command.get_envs().find(|(k, _)| *k == name).map(|(_, v)| v.map(|v| v.to_string_lossy().into_owned()))
};
assert_eq!(env(&command, super::LOST_ENV), Some(Some("1000".into())));
assert_eq!(env(&command, super::REASON_ENV), Some(Some("Lost: Device lost (vkQueueSubmit)".into())), "on one line");
assert_eq!(env(&command, crate::startup::RENDERER_ENV), Some(Some("cpu".into())));
assert_eq!(command.get_args().collect::<Vec<_>>(), ["--control", "7979"]);
// No reason: none inherited from an earlier loss either.
let command = super::command(exe, Vec::new(), false, 1_000, " ");
assert_eq!(env(&command, super::REASON_ENV), Some(None));
assert_eq!(env(&command, crate::startup::RENDERER_ENV), None);
let note = super::note(false, Some("Lost: Device lost"));
assert!(note.ends_with("The graphics driver reported: Lost: Device lost"), "{note}");
assert!(!super::note(false, Some(" \n ")).contains("reported"));
let long = "x".repeat(1_000);
assert_eq!(super::reason(Some(&long)).map(|r| r.chars().count()), Some(300));
}
}
+315 -10
View File
@@ -22,6 +22,8 @@
mod app_icon;
mod come_forward;
mod control_server;
#[cfg(target_os = "linux")]
mod desktop_theme;
mod device_lost;
#[cfg(target_os = "windows")]
mod native_crash;
@@ -97,6 +99,86 @@ struct App {
nav_bridge: nav_bridge::NavBridge,
/// Where the next file dialog opens: it follows the open design (#7756).
dialog_folder: DialogFolder,
/// Settings go to `app.ron` in the frame they change (#8275).
prefs_writer: PrefsWriter,
}
/// Settings written to the settings file soon after they change (#8275). eframe saves them
/// only every 30 s and when the window closes normally, so a change was lost whenever the app
/// did not get that far: ended from the Task Manager, stopped by a sign-out or shutdown, or
/// crashed or hung in the graphics driver on the way out.
///
/// Some settings change continuously (a panel's width while its edge is dragged), so the file
/// is written at most once per [`PrefsWriter::INTERVAL`], and a change made in between is written
/// when that interval ends.
#[derive(Default)]
struct PrefsWriter {
/// The settings written (or read at start) last.
written: Option<String>,
/// The previous frame had input that can change settings: what it changed shows in this
/// frame's settings.
input_before: bool,
/// When the settings were last written by this writer.
last_write: Option<std::time::Instant>,
/// A change waits until then to be written.
pending_until: Option<std::time::Instant>,
}
impl PrefsWriter {
/// The least time between two writes of the settings file.
const INTERVAL: std::time::Duration = std::time::Duration::from_secs(1);
/// The settings as they were read at start: they are on disk already.
fn read(prefs: String) -> Self {
Self { written: Some(prefs), ..Self::default() }
}
/// Whether this frame's settings are worth comparing: input that can change them came in this
/// frame or the one before, or a waiting change's time has come. Pointer motion alone isn't
/// such input; eframe's own save still catches anything else.
fn due(&mut self, input: bool, now: std::time::Instant) -> bool {
let due = input || self.input_before || self.pending_until.is_some_and(|at| now >= at);
self.input_before = input;
due
}
/// Write `prefs` and flush them to disk if they differ from the settings written last and the
/// last write is at least [`Self::INTERVAL`] old. Returns how long a change waits otherwise:
/// the caller asks for a frame then, so an idle app still writes it.
fn store(&mut self, storage: &mut dyn eframe::Storage, prefs: String, now: std::time::Instant) -> Option<std::time::Duration> {
if self.written.as_deref() == Some(prefs.as_str()) {
self.pending_until = None;
return None;
}
if let Some(wait) = self.last_write.map(|at| Self::INTERVAL.saturating_sub(now.saturating_duration_since(at))).filter(|w| !w.is_zero()) {
self.pending_until = Some(now + wait);
return Some(wait);
}
storage.set_string(solidcraft_ui_egui::prefs::STORAGE_KEY, prefs.clone());
storage.flush();
self.written = Some(prefs);
self.last_write = Some(now);
self.pending_until = None;
None
}
}
/// Input that can change a setting: a click, a key, typed or pasted text, a wheel or a pinch.
/// Pointer motion, which comes every frame while the mouse moves, cannot by itself.
fn changes_settings(event: &egui::Event) -> bool {
matches!(
event,
egui::Event::PointerButton { .. }
| egui::Event::Key { .. }
| egui::Event::Text(_)
| egui::Event::Paste(_)
| egui::Event::Cut
| egui::Event::Ime(_)
| egui::Event::MouseWheel { .. }
| egui::Event::Zoom(_)
| egui::Event::Rotate(_)
| egui::Event::AccessKitActionRequest(_)
)
}
impl eframe::App for App {
@@ -184,11 +266,21 @@ impl eframe::App for App {
solidcraft_ui_egui::space_mouse::buttons_hook(&mut self.solve, ctx, self.space_mouse.buttons(), raw);
self.solve.raw_input_hook(raw);
}
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
fn ui(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame) {
content_ui(&mut self.solve, ui);
// After the frame's UI, so a setting changed in it (Preferences' OK) is written now.
let now = std::time::Instant::now();
if self.prefs_writer.due(ui.input(|i| i.events.iter().any(changes_settings)), now)
&& let Some(storage) = frame.storage_mut()
&& let Some(wait) = self.prefs_writer.store(storage, self.solve.prefs(), now)
{
ui.ctx().request_repaint_after(wait);
}
}
fn save(&mut self, storage: &mut dyn eframe::Storage) {
storage.set_string(solidcraft_ui_egui::prefs::STORAGE_KEY, self.solve.prefs());
let prefs = self.solve.prefs();
storage.set_string(solidcraft_ui_egui::prefs::STORAGE_KEY, prefs.clone());
self.prefs_writer.written = Some(prefs);
}
fn on_exit(&mut self) {
// The agent chat's agent and everything it started end with the app.
@@ -202,13 +294,29 @@ impl eframe::App for App {
}
solidcraft_ui_egui::recovery_ui::close(&mut self.solve);
solidcraft_ui_egui::open_elsewhere::close(&mut self.solve);
// Before a restart below starts the next instance, which would otherwise get nothing from
// the 3D mouse driver (`solidcraft_3dx_client::stop`).
// Before a restart (`Drop for App`) starts the next instance, which would otherwise get
// nothing from the 3D mouse driver (`solidcraft_3dx_client::stop`).
#[cfg(target_os = "macos")]
solidcraft_3dx_client::stop();
solidcraft_engine::crash::end_session();
if let Some(lost_at) = self.gpu.as_ref().and_then(|g| g.lost_at) {
device_lost::restart(self.gpu.as_ref().is_some_and(|g| g.restart_on_software), lost_at);
// The next start (after a lost device, or into an update) begins once the app is dropped
// (`Drop for App`), when the settings are on disk.
}
}
impl Drop for App {
/// eframe drops its settings storage first, which waits for `app.ron` to be written, then the
/// app, then the window and its GPU surface. So the next start begins here: started from
/// `on_exit`, it read `app.ron` while the old process was still writing it, found it
/// unreadable and moved it aside, resetting every setting (#9044).
fn drop(&mut self) {
if let Some(gpu) = &self.gpu
&& let Some(lost_at) = gpu.lost_at
{
device_lost::restart(gpu.restart_on_software, lost_at, &gpu.reason);
// The window's GPU surface is still to be dropped, and on a lost device that may
// never return (#9044).
device_lost::end();
}
// An update asked to restart into the new version or to run its installer.
if let Some((program, args)) = solidcraft_ui_egui::update::take_launch(&mut self.solve) {
@@ -236,6 +344,8 @@ struct LostWatch {
restart_on_software: bool,
/// When the loss was seen: the app is closing to start again.
lost_at: Option<u64>,
/// Why, as wgpu said it: passed to the next start ([`device_lost::REASON_ENV`]).
reason: String,
}
impl App {
@@ -249,6 +359,7 @@ impl App {
eprintln!("SolidCraft graphics: the device was lost ({reason}); starting again");
solidcraft_engine::crash::phase(&format!("graphics device lost: {reason}"));
gpu.lost_at = Some(device_lost::now_secs());
gpu.reason = reason;
self.solve.quit_requested = true;
}
}
@@ -422,6 +533,12 @@ fn services(cc: &eframe::CreationContext<'_>, folder: &DialogFolder) -> Services
graphics_adapters: Vec::new(),
graphics_path: graphics_path().map(|p| p.to_string_lossy().to_string()),
window_system: window_system_now(),
// Linux: the desktop's dark or light setting, which the window is not told on every
// desktop (#7944). Windows and macOS: the window's own theme.
#[cfg(target_os = "linux")]
desktop_dark: Some(desktop_theme::start(&cc.egui_ctx)),
#[cfg(not(target_os = "linux"))]
desktop_dark: None,
http_get: Some(std::sync::Arc::new(http_get)),
http_download: Some(std::sync::Arc::new(http_download)),
// Already an installed app: only the browser build offers to install.
@@ -701,6 +818,24 @@ fn msaa() -> Option<u16> {
/// (`solidcraft_ui_egui::titlebar`). macOS keeps its traffic lights over the integrated bar.
const CUSTOM_TITLEBAR: bool = !cfg!(target_os = "macos");
/// Linux: the window manager's own decorations (server-side, or the compositor's frame) can be
/// asked for instead of the application bar ([`titlebar_choice`]). Elsewhere always `true`.
fn app_titlebar_wanted() -> bool {
if !cfg!(all(unix, not(target_os = "macos"))) {
return true;
}
let setting = graphics().and_then(|v| v.get("titlebar").and_then(serde_json::Value::as_str).map(str::to_string));
titlebar_choice(solidcraft_engine::geom::env::var("TITLEBAR").as_deref(), setting.as_deref())
}
/// Linux: whether the application bar is the title bar. `SOLIDCRAFT_TITLEBAR` (else
/// `graphics.json`'s `titlebar`) set to `system` gives the window the desktop's own title bar and
/// buttons; `app` (or anything else, or nothing) keeps the application bar as the title bar.
fn titlebar_choice(env: Option<&str>, setting: Option<&str>) -> bool {
let choice = env.map(str::trim).filter(|v| !v.is_empty()).or(setting.map(str::trim));
!choice.is_some_and(|v| v.eq_ignore_ascii_case("system"))
}
const DEPTH_BITS: u8 = 24;
/// A 32-bit float depth buffer, drawn with reversed depth (1 near, 0 far) so its precision follows
/// the distance from the eye (#1434). Only where every adapter offers it with a stencil
@@ -750,6 +885,16 @@ fn main() -> eframe::Result {
#[cfg(target_os = "macos")]
objc2_foundation::NSProcessInfo::processInfo().setProcessName(objc2_foundation::ns_string!("SolidCraft"));
mark("main");
// On OCLP-patched Macs, wgpu picks a Metal Shading Language standard that the system's
// compiler refuses (`invalid value 'metal3.2'`), because the patched OS reports a newer
// macOS version than the GPU's Metal compiler supports. Re-launching with
// SYSTEM_VERSION_COMPAT=1 makes the OS report the real (older) version so wgpu selects
// a standard the compiler accepts. The variable must be set before the process starts, so
// we detect OCLP here and re-exec immediately, before any macOS framework call (#3080, #4605).
#[cfg(target_os = "macos")]
if let Err(e) = startup::relaunch_with_version_compat() {
log::warn!("startup: OCLP check failed (continuing normally): {e}");
}
// Validate before legacy adoption, crash markers or any user preference read.
let settings = settings_dir().map_err(|error| eframe::Error::AppCreation(error.into()))?;
if std::env::var_os("SOLIDCRAFT_SETTINGS_DIR").is_none() {
@@ -821,7 +966,11 @@ fn main() -> eframe::Result {
// The launch before this one closed because its graphics device was lost (`App::watch_device`).
let after_loss = device_lost::recent(std::env::var(device_lost::LOST_ENV).ok().as_deref(), device_lost::now_secs());
if after_loss {
notes.push(device_lost::note(cpu_renderer));
let reason = std::env::var(device_lost::REASON_ENV).ok();
if let Some(reason) = device_lost::reason(reason.as_deref()) {
log::warn!("graphics: the last launch lost its device ({reason})");
}
notes.push(device_lost::note(cpu_renderer, reason.as_deref()));
}
if safe_mode {
notes.push("Safe mode: default settings (yours are kept for the next normal start), no recovery offer, software rendering.".into());
@@ -857,7 +1006,7 @@ fn main() -> eframe::Result {
eframe::egui_wgpu::WgpuSetup::CreateNew(setup) => setup.instance_descriptor.backends,
_ => eframe::wgpu::Backends::all(),
};
let custom_titlebar = CUSTOM_TITLEBAR && !startup::system_title_bar(cfg!(target_os = "windows"), started);
let custom_titlebar = CUSTOM_TITLEBAR && app_titlebar_wanted() && !startup::system_title_bar(cfg!(target_os = "windows"), started);
eframe::egui_wgpu::set_startup_hook(startup_step);
solidcraft_engine::crash::phase("window");
let options = eframe::NativeOptions {
@@ -961,6 +1110,7 @@ fn main() -> eframe::Result {
lost: rs.device_lost.clone(),
restart_on_software: device_lost::restart_on_software(after_loss, cpu_renderer),
lost_at: None,
reason: String::new(),
});
if !safe_mode {
app.preferences.graphics_adapter =
@@ -976,6 +1126,12 @@ fn main() -> eframe::Result {
})
.collect();
let info = rs.adapter.get_info();
if !app.preferences.graphics_adapter.is_empty() && !info.name.eq_ignore_ascii_case(app.preferences.graphics_adapter.as_str()) {
eprintln!(
"SolidCraft graphics: preferred adapter {:?} was not used; using {:?} instead",
app.preferences.graphics_adapter, info.name
);
}
let samples = scene_msaa_request(saved_samples);
let supported = scene_sample_choices(depth_bits, STENCIL_BITS, |depth| {
eframe::egui_wgpu::supported_msaa_samples(&rs.adapter, &rs.device, rs.target_format, depth)
@@ -1016,6 +1172,10 @@ fn main() -> eframe::Result {
app.session.doc_mut().name = "Sample Plate".into();
app.session.mark_saved();
app.session.undo.clear();
// Built straight into the session, so nothing asked for a fit: frame it at the
// home view as any opened design is (#9195). The fit waits for the first layout.
app.cam.set_view(solidcraft_engine::render::StandardView::Iso);
app.fit_view();
}
// Lock files next to open designs: a design open on another computer says so (#5467),
// the files given at launch included.
@@ -1076,6 +1236,8 @@ fn main() -> eframe::Result {
mark("app created");
solidcraft_engine::crash::phase("first frame");
Ok(Box::new(App {
// Before `app` moves: the settings as read, already on disk.
prefs_writer: PrefsWriter::read(app.prefs()),
solve: app,
starting,
frames: 0,
@@ -1099,12 +1261,13 @@ fn main() -> eframe::Result {
}
/// egui-wgpu is about to start a step of getting the graphics device and the window's surface up:
/// the crash journal keeps it, and the adapter once it is picked.
/// the crash journal keeps it until the app runs (a window opened later goes through the same
/// steps), and the adapter once it is picked.
fn startup_step(step: &'static str, detail: &str) {
if step == eframe::egui_wgpu::STEP_ADAPTER_CHOSEN {
solidcraft_engine::crash::set_environment(&format!("Renderer: {detail}"));
}
solidcraft_engine::crash::phase(step);
solidcraft_engine::crash::startup_step(step);
}
/// The renderer settings: with `cpu`, the software adapter (WARP, lavapipe, llvmpipe). The
@@ -1266,6 +1429,148 @@ mod backend_tests {
assert!(!prefer_x11(true, true, Some("GNOME"), over(Some("wayland"))));
assert!(prefer_x11(true, true, Some("niri"), over(Some("x11"))));
}
#[test]
fn the_desktops_title_bar_only_when_asked_for() {
use super::titlebar_choice;
// Nothing set: the application bar is the title bar, as before.
assert!(titlebar_choice(None, None));
// graphics.json's `titlebar`.
assert!(!titlebar_choice(None, Some("system")));
assert!(titlebar_choice(None, Some("app")));
// SOLIDCRAFT_TITLEBAR wins over the file; empty counts as unset; case and spaces don't matter.
assert!(!titlebar_choice(Some(" System "), Some("app")));
assert!(titlebar_choice(Some("app"), Some("system")));
assert!(!titlebar_choice(Some(""), Some("system")));
// Anything unknown keeps the application bar.
assert!(titlebar_choice(Some("ssd"), None));
}
}
#[cfg(test)]
mod prefs_writer_tests {
use super::PrefsWriter;
use solidcraft_ui_egui::prefs::{NavigatorStyle, STORAGE_KEY};
use std::collections::HashMap;
use std::time::{Duration, Instant};
/// eframe's settings file: what was flushed to disk is what the next start reads.
#[derive(Default)]
struct Disk {
pending: HashMap<String, String>,
flushed: HashMap<String, String>,
flushes: usize,
}
impl eframe::Storage for Disk {
fn get_string(&self, key: &str) -> Option<String> {
self.pending.get(key).cloned()
}
fn set_string(&mut self, key: &str, value: String) {
self.pending.insert(key.into(), value);
}
fn remove_string(&mut self, key: &str) {
self.pending.remove(key);
}
fn flush(&mut self) {
self.flushed = self.pending.clone();
self.flushes += 1;
}
}
fn new_app() -> solidcraft_ui_egui::SolveApp {
solidcraft_ui_egui::SolveApp::new(solidcraft_engine::Session::default(), solidcraft_ui_egui::Services::default())
}
/// #8275: Preferences' View navigator and Display quality, changed and confirmed, are on disk
/// in that frame, so the next start has them even when this one never closes normally (ended
/// from the Task Manager, a sign-out, a hang or crash in the graphics driver on the way out).
#[test]
fn changed_settings_reach_the_disk_in_the_frame_they_change() {
let mut app = new_app();
let mut disk = Disk::default();
let mut writer = PrefsWriter::read(app.prefs());
let now = Instant::now();
assert_eq!(writer.store(&mut disk, app.prefs(), now), None);
assert_eq!(disk.flushes, 0, "the settings read at start are not written again");
app.preferences.navigator_style = NavigatorStyle::Cube;
app.preferences.display_quality = "fine".into();
assert!(writer.due(true, now), "a frame with input is checked");
assert_eq!(writer.store(&mut disk, app.prefs(), now), None);
assert_eq!(disk.flushes, 1, "flushed at once, not left for eframe's next save");
assert_eq!(writer.store(&mut disk, app.prefs(), now + Duration::from_secs(5)), None);
assert_eq!(disk.flushes, 1, "unchanged settings are not written again");
// The next start reads them.
let mut next = new_app();
let stored = solidcraft_ui_egui::prefs::stored(|k| disk.flushed.get(k).cloned()).expect("settings on disk");
next.load_prefs(&stored);
assert_eq!(next.preferences.navigator_style, NavigatorStyle::Cube);
assert_eq!(next.preferences.display_quality, "fine");
assert!(disk.flushed.contains_key(STORAGE_KEY));
}
/// A frame without input is checked only right after one with input (whose clicks the UI
/// handled in that frame); after that, idle frames cost nothing. Pointer motion, which comes
/// every frame while the mouse moves, doesn't count as input.
#[test]
fn frames_are_checked_with_input_and_once_after_it() {
let now = Instant::now();
let mut writer = PrefsWriter::default();
assert!(!writer.due(false, now));
assert!(writer.due(true, now));
assert!(writer.due(false, now), "the frame after input");
assert!(!writer.due(false, now));
let click = egui::Event::PointerButton {
pos: egui::Pos2::ZERO,
button: egui::PointerButton::Primary,
pressed: false,
modifiers: egui::Modifiers::NONE,
};
assert!(super::changes_settings(&click));
assert!(super::changes_settings(&egui::Event::Text("5".into())));
assert!(!super::changes_settings(&egui::Event::PointerMoved(egui::Pos2::ZERO)));
assert!(!super::changes_settings(&egui::Event::MouseMoved(egui::Vec2::X)));
}
/// A setting that changes in every frame (a panel's width while its edge is dragged) doesn't
/// write the file in every frame: at most once a second, and the last change is on disk at
/// most a second after it was made, with a frame asked for then so an idle app writes it.
#[test]
fn a_continuous_change_is_written_once_a_second_and_its_end_soon_after() {
let mut app = new_app();
let mut disk = Disk::default();
let mut writer = PrefsWriter::read(app.prefs());
let start = Instant::now();
let frame = Duration::from_millis(16);
let mut asked = None;
// 1.5 s of dragging at 60 frames a second, with input in every frame.
for n in 0..94u32 {
let now = start + frame * n;
app.preferences.browser_width = 200.0 + n as f32;
assert!(writer.due(true, now));
asked = writer.store(&mut disk, app.prefs(), now);
}
assert_eq!(disk.flushes, 2, "the first change at once, then one a second later");
let wait = asked.expect("the last width waits, and a frame is asked for when it can be written");
assert!(wait <= PrefsWriter::INTERVAL);
// The drag ends: no more input. Frames before the wait is over don't even look.
let end = start + frame * 93;
assert!(writer.due(false, end + frame), "the frame right after input");
assert!(!writer.due(false, end + frame * 2), "an idle frame before the wait is over");
// The frame asked for writes the last width.
let then = end + wait;
assert!(writer.due(false, then));
assert_eq!(writer.store(&mut disk, app.prefs(), then), None);
assert_eq!(disk.flushes, 3);
let mut next = new_app();
let stored = solidcraft_ui_egui::prefs::stored(|k| disk.flushed.get(k).cloned()).expect("settings on disk");
next.load_prefs(&stored);
assert_eq!(next.preferences.browser_width, 293.0, "the width the drag ended at");
assert!(!writer.due(false, then + frame), "nothing waits any more");
}
}
#[cfg(test)]
+1
View File
@@ -101,6 +101,7 @@ impl NativeMenu {
])?;
for (action, label) in [
("docs", "Documentation"),
("updates", app.tr("update.check_for_updates")),
("shortcuts", "Keyboard Shortcuts"),
("messages", "Messages\u{2026}"),
("report", "Report an Issue\u{2026}"),
+111 -10
View File
@@ -137,8 +137,11 @@ pub struct AdapterChoice {
pub compatible: bool,
}
/// Choose only surface-compatible adapters. Names saved in preferences are exact; the
/// environment override follows wgpu's case-insensitive substring convention.
/// Choose an adapter by name. The environment override follows wgpu's case-insensitive
/// substring convention among surface-compatible adapters. A saved preference prefers an
/// exact (then case-insensitive) name among compatible adapters, and if the named card is
/// only listed as incompatible with the surface still picks it (#8341: otherwise the
/// preference is kept in the dialog while wgpu silently uses another GPU).
/// No match leaves selection to the normal wgpu request.
pub fn choose_adapter(adapters: &[AdapterChoice], environment: Option<&str>, preference: Option<&str>) -> Option<usize> {
// wgpu's environment helper panics on a missing name; an override must remain recoverable.
@@ -149,12 +152,14 @@ pub fn choose_adapter(adapters: &[AdapterChoice], environment: Option<&str>, pre
return Some(index);
}
}
if let Some(name) = preference.filter(|s| !s.is_empty())
&& let Some((index, _)) = compatible().find(|(_, a)| a.name == name)
{
return Some(index);
}
None
let name = preference.filter(|s| !s.is_empty())?;
let find = |pred: &dyn Fn(&AdapterChoice) -> bool, only_compatible: bool| {
adapters.iter().enumerate().find(|(_, a)| (!only_compatible || a.compatible) && pred(a)).map(|(i, _)| i)
};
find(&|a| a.name == name, true)
.or_else(|| find(&|a| a.name.eq_ignore_ascii_case(name), true))
.or_else(|| find(&|a| a.name == name, false))
.or_else(|| find(&|a| a.name.eq_ignore_ascii_case(name), false))
}
/// Leave Automatic on wgpu's normal request path; named choices may defer to it too.
@@ -292,6 +297,71 @@ pub fn window_instance_flags(flags: eframe::wgpu::InstanceFlags, intel_mac: bool
if intel_mac && env.map(str::trim).is_none_or(str::is_empty) { flags - eframe::wgpu::InstanceFlags::VALIDATION_INDIRECT_CALL } else { flags }
}
/// The environment variable that makes the macOS compatibility shim report an older OS
/// version to wgpu's Metal backend. On OCLP-patched machines the Metal compiler accepts
/// only up to the MSL standard of the original GPU, not the one the patched OS reports,
/// so wgpu picks a standard that the compiler refuses (`invalid value 'metal3.2'`).
/// Setting this variable before the process starts causes the OS to report the older
/// version and wgpu selects a supported MSL standard (#3080, #4605).
#[cfg(target_os = "macos")]
pub const SYSTEM_VERSION_COMPAT_ENV: &str = "SYSTEM_VERSION_COMPAT";
/// The NVRAM variable that OpenCore Legacy Patcher writes on every OCLP-booted system.
/// Its presence is the primary signal that `SYSTEM_VERSION_COMPAT=1` is needed.
#[cfg(target_os = "macos")]
pub const OCLP_NVRAM_KEY: &str = "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:OCLP-Version";
/// `true` if the OCLP NVRAM key is present on this system.
///
/// Runs `nvram <key>` and treats exit 0 as present. Any error (missing binary,
/// permission denied, key absent) returns `false` — this is a best-effort probe.
#[cfg(target_os = "macos")]
pub fn oclp_nvram_present() -> bool {
std::process::Command::new("nvram").arg(OCLP_NVRAM_KEY).output().map(|o| o.status.success()).unwrap_or(false)
}
/// Whether to re-launch with `SYSTEM_VERSION_COMPAT=1`: it is not set yet and OCLP shows through
/// the NVRAM key. The probe runs only when it is needed, so a re-launched process (variable
/// set) never starts `nvram`.
#[cfg(target_os = "macos")]
fn compat_wanted(compat_set: bool, nvram: impl FnOnce() -> bool) -> bool {
!compat_set && nvram()
}
/// If this process is running under OCLP and `SYSTEM_VERSION_COMPAT` has not been set,
/// re-launch the current binary with `SYSTEM_VERSION_COMPAT=1` added to the environment,
/// then exit with the child's status code.
///
/// `SYSTEM_VERSION_COMPAT=1` must be present **before** the process starts: setting it
/// with `std::env::set_var` inside `main` is too late because the macOS frameworks have
/// already queried the OS version by then. Re-launching is the only safe approach that
/// works without `unsafe` (a true `execve` replacement would require it).
///
/// Returns `Ok(false)` immediately when:
/// - `SYSTEM_VERSION_COMPAT` is already set (re-launched process, no loop), or
/// - the OCLP NVRAM key is absent.
///
/// Returns `Err` only when `std::env::current_exe()` fails or the child process cannot
/// be spawned; the caller should log the error and continue normally.
///
/// Never returns `Ok(true)`: a successful re-launch exits the current process.
#[cfg(target_os = "macos")]
pub fn relaunch_with_version_compat() -> Result<bool, String> {
// A set variable means this is the re-launched process: no loop.
if !compat_wanted(std::env::var_os(SYSTEM_VERSION_COMPAT_ENV).is_some(), oclp_nvram_present) {
return Ok(false);
}
log::info!("startup: OCLP detected; re-launching with {}=1", SYSTEM_VERSION_COMPAT_ENV);
eprintln!("SolidCraft: OCLP detected; re-launching with {}=1", SYSTEM_VERSION_COMPAT_ENV);
let exe = std::env::current_exe().map_err(|e| format!("could not find own executable: {e}"))?;
let status = std::process::Command::new(&exe)
.args(std::env::args_os().skip(1))
.env(SYSTEM_VERSION_COMPAT_ENV, "1")
.status()
.map_err(|e| format!("could not re-launch with {}: {e}", SYSTEM_VERSION_COMPAT_ENV))?;
std::process::exit(status.code().unwrap_or(1));
}
/// Windows with OpenGL: the window keeps the system title bar (#2063). The window without OS
/// decorations keeps its caption style while having no frame, and some OpenGL drivers (older
/// Intel HD/UHD) then show the picture a caption's height lower than the window, so it no longer
@@ -351,7 +421,8 @@ mod tests {
assert_eq!(choose_adapter(&cards, None, Some("removed")), None);
assert_eq!(choose_adapter(&cards, Some("missing"), Some("Discrete small")), Some(1));
assert_eq!(choose_adapter(&cards, Some(""), Some("Discrete small")), Some(1));
assert_eq!(choose_adapter(&cards, None, Some("Discrete")), None, "saved names are exact");
assert_eq!(choose_adapter(&cards, None, Some("discrete small")), Some(1), "preference matches without regard to case");
assert_eq!(choose_adapter(&cards, None, Some("Discrete")), None, "a preference is the full name, not a substring");
}
#[test]
@@ -360,11 +431,20 @@ mod tests {
assert_eq!(choose_adapter(&cards, None, None), None);
assert_eq!(choose_adapter(&cards, Some(""), Some("")), None);
cards[2].compatible = false;
assert_eq!(choose_adapter(&cards, Some("large"), Some("Discrete large")), None);
// Environment still needs a compatible adapter; a preference keeps the named card (#8341).
assert_eq!(choose_adapter(&cards, Some("large"), Some("Discrete large")), Some(2));
assert_eq!(choose_adapter(&cards, Some("small"), None), Some(1));
assert_eq!(choose_adapter(&[], None, None), None);
}
#[test]
fn preference_keeps_a_named_card_even_when_surface_says_incompatible() {
let mut cards = cards();
cards[1].compatible = false;
assert_eq!(choose_adapter(&cards, None, Some("Discrete small")), Some(1));
assert_eq!(choose_adapter(&cards, None, Some("discrete SMALL")), Some(1));
}
#[test]
fn automatic_adapter_preserves_the_previous_request_configuration() {
use eframe::egui_wgpu::WgpuSetupCreateNew;
@@ -414,6 +494,27 @@ mod tests {
assert_eq!(window_instance_flags(on, false, None), on);
}
#[cfg(target_os = "macos")]
#[test]
fn oclp_relaunch_needs_the_signal_and_no_compat_variable() {
use super::compat_wanted;
let probed = std::cell::Cell::new(false);
let probe = |found: bool| {
let probed = &probed;
move || {
probed.set(true);
found
}
};
// The re-launched process has the variable: no probe, no second re-launch.
assert!(!compat_wanted(true, probe(true)));
assert!(!probed.get());
// The OCLP NVRAM key is the signal.
assert!(compat_wanted(false, probe(true)));
// No signal: an ordinary Mac starts as it is.
assert!(!compat_wanted(false, probe(false)));
}
#[test]
fn switches_read_from_the_environment() {
assert!(env_on(Some("1")) && env_on(Some("yes")) && !env_on(Some("0")) && !env_on(Some(" ")) && !env_on(None) && !env_on(Some("false")));
Binary file not shown.
+96
View File
@@ -0,0 +1,96 @@
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'.
Copyright 2014-2021 Google Inc. with Reserved Font Name 'Noto'.
Subset for SolidCraft web UI (glyphs used by the zh locale); renamed Craft UI SC (no Reserved Font Name).
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
+96
View File
@@ -0,0 +1,96 @@
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'.
Copyright 2014-2021 Google Inc. with Reserved Font Name 'Noto'.
Subset for SolidCraft web UI (glyphs used by the zh-TW locale); renamed Craft UI TC (no Reserved Font Name).
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
+4 -1
View File
@@ -204,7 +204,10 @@ constraint = [
"c_polygon", "c_smooth", "c_symmetry", "c_tangent",
]
construction = [
"centerline", "construction", "infinite",
"centerline", "construction", "construction_line", "construction_line_angle",
"construction_line_bisector", "construction_line_horizontal", "construction_line_parallel",
"construction_line_perpendicular", "construction_line_tangent_at", "construction_line_tangent_external",
"construction_line_tangent_two", "construction_line_vertical", "infinite",
]
mesh = [
"mesh_body",
@@ -70,6 +70,16 @@ configuration_table false
conic false
constrainer false
construction false
construction_line false
construction_line_angle false
construction_line_bisector false
construction_line_horizontal false
construction_line_parallel false
construction_line_perpendicular false
construction_line_tangent_at false
construction_line_tangent_external false
construction_line_tangent_two false
construction_line_vertical false
contact_all false
contact_new false
contact_off false
@@ -171,6 +181,7 @@ pipe false
plane false
plane_along_path false
plane_angle false
plane_axis_point false
plane_midplane false
plane_perpendicular false
plane_tangent false
@@ -191,6 +202,7 @@ polygon false
polygon_circumscribed false
polygon_edge false
presspull false
print_face false
project false
project_surface false
rack_pinion false
@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Construction line through two points</title>
<path d="M8 52L56 12" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="10 5"/>
<circle cx="20" cy="42" r="5.8" fill="#ffffff"/>
<circle cx="20" cy="42" r="3.4" fill="#236ead"/>
<circle cx="44" cy="22" r="5.8" fill="#ffffff"/>
<circle cx="44" cy="22" r="3.4" fill="#236ead"/>
</svg>

After

Width:  |  Height:  |  Size: 472 B

@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Construction line at an angle</title>
<path d="M10.26 48.66L58.26 48.66" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M28.65 33.23A24 24 0 0 1 34.26 48.66" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10.26 48.66L54.26 11.66" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="10.26" cy="48.66" r="5.8" fill="#ffffff"/>
<circle cx="10.26" cy="48.66" r="3.4" fill="#236ead"/>
</svg>

After

Width:  |  Height:  |  Size: 646 B

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Angle bisector</title>
<path d="M13.92 12.18L9.92 52.17L54.92 44.17" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M12.11 30.29A22 22 0 0 1 31.58 48.33" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M9.92 52.17L47.3 11.83" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 526 B

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Horizontal construction line</title>
<path d="M8 32L56 32" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="10 5"/>
<circle cx="32" cy="32" r="5.8" fill="#ffffff"/>
<circle cx="32" cy="32" r="3.4" fill="#236ead"/>
</svg>

After

Width:  |  Height:  |  Size: 362 B

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Parallel construction line</title>
<path d="M9 37L41 9" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M23 55L55 27" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="10 5"/>
</svg>

After

Width:  |  Height:  |  Size: 380 B

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Perpendicular construction line</title>
<path d="M8 44L56 44" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 8L32 56" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 34L42 34L42 44" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 490 B

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Tangent at a curve point</title>
<circle cx="32" cy="34.26" r="17" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M8 17.26L56 17.26" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="32" cy="17.26" r="5.8" fill="#ffffff"/>
<circle cx="32" cy="17.26" r="3.4" fill="#236ead"/>
</svg>

After

Width:  |  Height:  |  Size: 480 B

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Tangent through an external point</title>
<circle cx="21.74" cy="38.77" r="14" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M53.6 8.23L28.55 55.9" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="51.74" cy="11.77" r="5.8" fill="#ffffff"/>
<circle cx="51.74" cy="11.77" r="3.4" fill="#236ead"/>
</svg>

After

Width:  |  Height:  |  Size: 502 B

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Common tangent to two curves</title>
<circle cx="20" cy="33.59" r="12" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="46" cy="33.59" r="8" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M6 19.27L58 27.36" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 509 B

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Vertical construction line</title>
<path d="M32 8L32 56" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="10 5"/>
<circle cx="32" cy="32" r="5.8" fill="#ffffff"/>
<circle cx="32" cy="32" r="3.4" fill="#236ead"/>
</svg>

After

Width:  |  Height:  |  Size: 360 B

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Plane through axis and point</title>
<path d="M26 15L56 32.32L38 42.71L8 25.39Z" fill="#b9ddf8" stroke="#236ead" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="0.1 5"/>
<path d="M15 18.4L53 40.34" fill="none" stroke="currentColor" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="22" cy="29" r="3.1" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 475 B

@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Print Face</title>
<path d="M9.72 26.17L4.5 20.95L4.5 40.85L9.72 46.07Z" fill="#b8c3cf"/>
<path d="M9.72 26.17L4.5 20.95L4.5 40.85L9.72 46.07Z" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M18.77 23.15L9.72 26.17L9.72 46.07L18.77 43.05Z" fill="#328bd3"/>
<path d="M18.77 23.15L9.72 26.17L9.72 46.07L18.77 43.05Z" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M13.55 17.93L18.77 23.15L9.72 26.17L4.5 20.95Z" fill="#e2e8ef"/>
<path d="M13.55 17.93L18.77 23.15L9.72 26.17L4.5 20.95Z" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M50.45 37.54L38.27 25.35L38.27 33.88L50.45 46.07Z" fill="#b8c3cf"/>
<path d="M50.45 37.54L38.27 25.35L38.27 33.88L50.45 46.07Z" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M59.5 34.53L50.45 37.54L50.45 46.07L59.5 43.05Z" fill="#8e9faf"/>
<path d="M59.5 34.53L50.45 37.54L50.45 46.07L59.5 43.05Z" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M47.31 22.34L59.5 34.53L50.45 37.54L38.27 25.35Z" fill="#e2e8ef"/>
<path d="M47.31 22.34L59.5 34.53L50.45 37.54L38.27 25.35Z" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M50.45 46.07L38.27 33.88" fill="none" stroke="#236ead" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M59.5 43.05L50.45 46.07" fill="none" stroke="#236ead" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M24.17 34.2L28.31 34.2" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M35.31 34.2L27.31 38.7L27.31 29.7Z" fill="#236ead"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

+584 -2
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2746 -1
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+89
View File
@@ -1,22 +1,42 @@
{
"A Single hole snaps to the middle of its face and to the centres of its round edges": "A Single hole snaps to the middle of its face and to the centres of its round edges",
"Base Center": "Base Centre",
"Center X": "Centre X",
"Center Y": "Centre Y",
"Center of mass": "Centre of mass",
"Centre to centre": "Centre to centre",
"Circle center": "Circle centre",
"Colour": "Colour",
"Copy all licences": "Copy all licences",
"Customize Toolbar": "Customise Toolbar",
"Customize…": "Customise…",
"Face center": "Face centre",
"Favorites": "Favourites",
"Favourite": "Favourite",
"Mass Center": "Mass Centre",
"Modeled": "Modelled",
"Select the centre the pattern turns around first": "Select the centre the pattern turns around first",
"Snap to face and edge centres": "Snap to face and edge centres",
"Specialise": "Specialise",
"cmd.appearance_favorite": "Favourite Look",
"cmd.component_cycle_color": "Cycle Component Colour",
"cmd.construct_point_center": "Point At Centre Of Circle/Sphere/Torus",
"cmd.inspect_center_of_mass": "Centre of Mass",
"cmd.inspect_colored_components": "Enable Component Colours",
"cmd.inspect_colored_components_disable": "Disable Component Colours",
"cmd.parameters_favorite": "Favourite Parameter",
"cmd.render_aging_describe": "Layered Surface Aging",
"cmd.render_effects_describe": "Lens and Creative Effects",
"cmd.sketch.construction_line": "Construction Line",
"cmd.sketch.construction_line.angle": "Construction Line at Angle",
"cmd.sketch.construction_line.bisector": "Angle Bisector",
"cmd.sketch.construction_line.horizontal": "Horizontal Construction Line",
"cmd.sketch.construction_line.parallel": "Parallel Construction Line",
"cmd.sketch.construction_line.perpendicular": "Perpendicular Construction Line",
"cmd.sketch.construction_line.tangent_at": "Tangent at Curve Point",
"cmd.sketch.construction_line.tangent_external": "Tangent through External Point",
"cmd.sketch.construction_line.tangent_two": "Common Tangent",
"cmd.sketch.construction_line.vertical": "Vertical Construction Line",
"cmd.sketch_arc_center_point": "Centre Point Arc",
"cmd.sketch_circle_center": "Centre Diameter Circle",
"cmd.sketch_rectangle_center": "Centre Rectangle",
@@ -27,8 +47,33 @@
"color.edit": "Click to edit colour",
"color.gamma": "Showing colour values in 0-255 gamma space",
"color.linear": "Showing colour values in 0-1 linear space",
"color.recent": "Recent colours",
"color.recent_help": "Colours you pick in any colour field appear here",
"color.saturation": "Saturation (per cent)",
"color.selected": "Selected colour",
"color.step_down": "Step down",
"color.step_up": "Step up",
"color.value": "Value, the brightness (per cent)",
"dxf.cancelled": "DXF export cancelled",
"dxf.cancelling": "Cancelling DXF export",
"help.apache": "Apache licence 2.0",
"help.appearance.assign": "Gives the selected bodies, faces or components a colour or a material look, without changing their weight. Use it to tell parts apart or to preview a finish.",
"help.face.delete": "Removes the selected faces and lets the neighbouring faces close the gap, or leaves the gap open as a surface. Use it to take off a rounded edge, a hole or a boss that is in the way.",
"help.font_details": "The interface uses egui's built-in fonts (Ubuntu Light and Hack, under the Ubuntu Font Licence and the MIT/Bitstream Vera licence; Noto Emoji and the emoji icon font, under the OFL and MIT). Sketch text uses Liberation Sans (SIL OFL 1.1). The Crafting Apps' optional font pack, craft-fonts (BIZ UDPGothic, Shippori Mincho, BIZ UDMincho, Noto Sans CJK SC, Noto Sans Arabic; SIL OFL 1.1), is not bundled in SolidCraft builds.",
"help.licences": "Licences",
"help.material.assign": "Sets what the selected bodies are made of, such as steel, aluminium or ABS. Use it so that the mass and weight match the real part.",
"help.mit": "MIT licence",
"help.solid.draft": "Tilts the selected faces by the angle you set, measured from a neutral plane. Use it on moulded or cast parts so that they slide out of the mould.",
"help.solid.revolve": "Spins a sketch profile around an axis to make a round solid. Use it for shafts, knobs, bowls and any part that is round about a centre line.",
"help.solid.split_body": "Cuts a body into separate bodies with a plane, the face of another body or a sketch line. Use it to make parts that are printed, machined or coloured on their own.",
"help.solid.split_face": "Divides the selected faces along a plane, the face of another body or sketch curves, without cutting the body. Use it to give part of a face its own draft, colour or offset.",
"help.third_party": "Third-party licences",
"home.new_mm_hint": "Millimetres · opens in Design",
"navbar.custom.customise": "Customise navigation bar…",
"navbar.custom.position_centre": "Centre",
"navbar.description.separator": "A thin line that groups neighbouring slots.",
"pattern.alignment_hint": "Counts include the original. Centre balances copies; Flip chooses the extra side for even totals.",
"prefs.bottom_centre": "Bottom centre",
"prefs.logo_theme": "Theme's colours",
"prefs.max_file_size": "Largest file to open",
"prefs.max_file_size_design": "Design files",
@@ -39,17 +84,27 @@
"prefs.megabytes": "MB",
"prefs.sketch_conflict_colour": "Conflicting geometry in the conflict colour",
"prefs.sketch_conflict_colour_note": "While a sketch's constraints conflict, the curves and points a failing constraint holds are drawn in the conflict colour too, not only its glyph or dimension. Off: they keep their usual colours.",
"prefs.sketch_construction_lines": "Extended construction line tools",
"prefs.sketch_recent_snap": "Auto snap to recent centres and midpoints",
"prefs.sketch_recent_snap_note": "While drawing, snap the cursor where the guides of the two most recent circle centres or straight-edge midpoints cross. Off: those guides stay visual and the cursor does not move.",
"prefs.sketch_state_icons": "Sketch icons in the colour of their state",
"prefs.sketch_state_icons_note": "In History and the browser, a sketch's icon takes the colour of its state (under constrained, fully constrained or conflicting) and its tooltip names the state. Off: every sketch has the same icon.",
"prefs.sketch_tracking_guides": "Centre and midpoint alignment guides",
"prefs.sketch_tracking_guides_note": "Hover over a circle centre or straight-edge midpoint, then move horizontally or vertically to show a temporary dotted guide.",
"prefs.status_bar_note": "A thin bar along the window's bottom edge shows what is being edited, the open sketch's state in its colour and the design's units; a click on the units changes them. The sketch's state then no longer shows in the view's corner.",
"prefs.structure.appearance_note": "Colours, text and accessibility.",
"prefs.structure.tools_note": "How modelling tools behave.",
"prefs.theme_follow": "Follow a theme file",
"prefs.theme_follow_error": "Not applied: {error}. The last good theme stays on.",
"prefs.theme_follow_launch": "Followed for this run only (--theme-file); reloaded whenever another tool rewrites it.",
"prefs.theme_follow_note": "Reloaded whenever another tool rewrites it. Choosing a theme stops following it.",
"prefs.theme_follow_off": "Off",
"prefs.theme_follow_stop": "Stop following",
"prefs.theme_option_opacity_help": "Adjust floating panel opacity. A readability floor protects text over viewport colours.",
"prefs.theme_option_tab_colours": "Tab colours",
"prefs.theme_option_tab_colours_help": "Use this theme’s panel and viewport colours for each ribbon tab.",
"prefs.theme_option_tab_fade_ms_help": "Fade panel and viewport colours when switching tabs. Zero switches instantly.",
"prefs.trackpad_zoom_modifier.help": "Hold only this key to zoom at the pointer with vertical scroll. Off keeps the existing scroll behaviour.",
"prefs.view": "View behaviour",
"prefs.viewport_background_colour": "Colour",
"render.aging_add": "Add aging layer",
@@ -79,6 +134,7 @@
"render.aging_target_help": "A named target must still match its captured index and name. Global masks are world-anchored; they do not follow moving parts. This is neither cavity detection nor true edge wear. Filter the list to reach additional bodies.",
"render.aging_target_search": "Filter body names",
"render.aging_upward": "Upward-facing deposition",
"render.appearance_editor.base_colour": "Base colour",
"render.backdrop_first": "Start / centre colour",
"render.backdrop_second": "End / edge colour",
"render.backdrop_x": "Centre X",
@@ -95,21 +151,31 @@
"render.base_color": "Base colour · sRGB",
"render.bloom_help": "Creative output-only glow from positive linear highlights, spread with three normalised box passes. Radius is in output pixels. Added in linear display light before sRGB; not a lens, volumetric effect or convergence improvement. The raw EXR is unchanged.",
"render.chromatic_offset": "Chromatic edge offset",
"render.cpu_area_editor_help": "Full side vectors in millimeters; U cross V points towards the emitting side. This differs from GPU half-edge vectors.",
"render.cpu_light_help": "Up to eight directional lights. An empty custom list turns them off; selecting a preset restores its lights. Colours are linear RGB and intensity is relative, not watts.",
"render.cpu_linear_color": "Linear colour (R, G, B)",
"render.effects_gpu_only": "These effects require GPU path tracing. Changing the page never switches the renderer automatically.",
"render.effects_help": "Combine ordered colour looks and image-space lens effects. Rendering and raw-master regrading use the same saved settings. Raw EXR stays unchanged. These are original artistic controls, not calibrated lens or branded-film emulations.",
"render.effects_reset_lens": "Reset lens effects",
"render.effects_seed": "Pattern seed",
"render.env_colour": "Colour",
"render.environment.radial_only": "Centre and radius apply to Radial mode.",
"render.error_finish_gesture": "finish the modelling gesture before previewing",
"render.error_finish_operation": "finish the current modelling operation before entering Render",
"render.film_grain": "Photographic grain",
"render.flare_ghosts": "Ghost rings per source",
"render.flare_halo": "Flare halo",
"render.flare_streak": "Anamorphic-style streak",
"render.flare_strength": "Highlight flare strength",
"render.flare_threshold": "Scene-linear flare threshold",
"render.frame_centre_mark": "Centre mark",
"render.hdr_primaries_declared": "The source declares its colour primaries.",
"render.hdr_primaries_srgb": "Colour primaries: sRGB/D65",
"render.hdr_primaries_undeclared": "The source does not declare primaries; review the renderer colour requirements.",
"render.image_cancelled": "Render cancelled",
"render.image_cancelling": "Cancelling",
"render.image_scene_stale": "Finish the modelling gesture or refresh the scene before checking or starting an image.",
"render.inspector_colour": "Colour",
"render.layer_down": "Move down",
"render.layer_enabled": "Layer enabled",
"render.layer_remove": "Remove layer",
@@ -124,6 +190,11 @@
"render.library_rig_help": "Fit once at an explicit centre and physical extent. Complete rigs include passive cards; calibration blockers still refuse. Conservative emitter/card clearance is checked before saving.",
"render.library_source_preview_help": "Authored base-colour source map. This is not a rendered or measured material preview.",
"render.library_unfavorite": "Remove favourite",
"render.light_behaviour": "BEHAVIOUR",
"render.light_preview_help": "Live view is unshadowed; Area lights use a centre-sample approximation. Render uses the complete light model.",
"render.light_product_centre": "Product centre",
"render.light_temperature": "Colour temperature",
"render.lighting_colour": "Colour",
"render.look_add": "Add colour look",
"render.look_bleach": "Bleach-bypass-inspired",
"render.look_cool": "Cool",
@@ -147,30 +218,48 @@
"render.radial_distortion": "Radial distortion",
"render.ribbon_aging": "Aging",
"render.ribbon_effects": "Effects",
"render.ribbon_studios_help": "Browse implemented studio compositions and review their replacements before applying. Concept-only scenes remain labelled.",
"render.sharpening": "Detail sharpening",
"render.soft_focus": "Soft focus",
"render.stage_panels.centre": "Centre",
"render.stage_panels.source_note": "Authored base-colour source map. Not a measured material.",
"render.studio_area_help": "Up to four one-sided rectangles. Orthogonal half-edges U and V define size; U × V faces the lit side. Coordinates are world-space millimetres.",
"render.studio_center": "Centre X, Y, Z (mm)",
"render.studio_hdr_help": "Radiance .hdr, 2:1 panorama, up to 2048 × 1024. EXR is unavailable. The colour assumption applies only when primaries are unspecified.",
"sketch_text.align_center": "Centre",
"ui.3d_mouse_kind_cap": "Return to Centre",
"ui.3d_mouse_looks_like_cap": "The reading stays put while you hold it, the way a Return to Centre device does.",
"ui.3d_mouse_orbit_tip": "Traced: the 3D mouse turns the view around the part of the model in the middle of the view when the turn begins, marked by a faint ball. Classic: around the view's centre",
"ui.3d_mouse_step_pull": "Pull the cap towards you, hold it, then let go.",
"ui.3d_mouse_switch_cap": "Calibrate as Return to Centre",
"ui.agent_chat_minimize": "Minimise to a strip",
"ui.ai_mode_edits_note": "Modelling commands run without asking; saving, opening, exporting and other file or destructive actions still ask.",
"ui.center": "Centre",
"ui.center_arc_follows_cursor": "Centre point arc follows the cursor's direction",
"ui.center_arc_follows_cursor_tip": "A centre point arc runs clockwise or counter-clockwise the way the cursor goes round its centre. Off: always counter-clockwise from the start.",
"ui.centerline": "Centreline",
"ui.colour_vision": "Colour vision",
"ui.colour_vision_note": "Changes the colours that carry a meaning: sketch states, axes, bends, analyses and icons. If you use Windows colour filters, keep this Off.",
"ui.colour_vision_off_tip": "The theme's own colours",
"ui.construction.ribbon_label": "X-Lines",
"ui.customizeToolbar": "Customise Toolbar…",
"ui.default_modelling_orientation": "Default modelling orientation",
"ui.design_properties.license": "Licence",
"ui.design_properties.organization": "Organisation",
"ui.details_curvature_caption": "Faces are coloured by their local radius of curvature.",
"ui.details_draft_caption": "Faces are coloured by their angle to the pull direction.",
"ui.export_keymap_tip": "Keys, S box favourites and the toolbar, as a file",
"ui.instances": "Instances",
"ui.layout_compact": "Compact",
"ui.layout_floating": "Floating",
"ui.material_review.claims": "Sources and licences are unverified claims. Missing values remain unknown.",
"ui.point_cloud_color_by": "Colour By",
"ui.point_cloud_file_colors": "File Colours",
"ui.point_cloud_no_file_colors": "The file has no colours",
"ui.point_cloud_single_color": "Single Colour",
"ui.properties.inertia_note": "About the centre of mass, in world axes (g·{unit}²)",
"ui.ribbon_labels": "Show text under ribbon icons",
"ui.view_centre": "View centre",
"ui.workspace_layout": "Workspace layout",
"ui.zoom_to_cursor_tip": "The wheel zooms towards the point under the cursor (off: towards the view's centre)",
"update.prefs_flatpak": "Flatpak updates this copy ({version}): run {command} or use your software centre. SolidCraft doesn't check."
+648 -66
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+248
View File
@@ -476,6 +476,7 @@
"Second point": "두 번째 점",
"Section": "단면",
"Section position": "단면 위치",
"Sections": "단면",
"Sections (one sketch each)": "단면 (각각 스케치 하나)",
"Select Other": "다른 항목 선택",
"Select Other: hold the left button still on the model (or right-click › Select Other…) to list everything under the cursor; click again on the same spot to select the next thing there. Double-click the middle button to go Home (Preferences › Navigation).": "다른 항목 선택: 모델 위에서 왼쪽 버튼을 가만히 누르고 있거나(또는 오른쪽 클릭 › 다른 항목 선택…) 커서 아래의 모든 항목을 나열합니다. 같은 위치를 다시 클릭하면 다음 항목이 선택됩니다. 가운데 버튼을 더블 클릭하면 홈으로 이동합니다(환경설정 › 탐색).",
@@ -711,6 +712,8 @@
"cmd.appearance_pick_up": "모양 가져오기",
"cmd.appearance_replace": "모양 바꾸기",
"cmd.assembly_bom": "자재 명세서",
"cmd.assembly_mass_properties": "질량 특성",
"cmd.body.print_face": "출력 바닥면",
"cmd.body_rename": "바디 이름 변경",
"cmd.browser_group": "새 그룹",
"cmd.browser_move": "브라우저 항목 이동",
@@ -756,6 +759,7 @@
"cmd.config_rule": "구성 규칙",
"cmd.config_rules": "구성 규칙",
"cmd.config_table": "구성 표시",
"cmd.construct.plane.axis_point": "축과 점을 지나는 평면",
"cmd.construct_axis_edge": "모서리를 통과하는 축",
"cmd.construct_axis_normal_to_face": "면에 수직인 축",
"cmd.construct_axis_through_cylinder": "원기둥/원뿔/토러스를 통과하는 축",
@@ -902,6 +906,9 @@
"cmd.pointcloud_edit": "포인트 클라우드 편집",
"cmd.pointcloud_insert": "포인트 클라우드 삽입",
"cmd.pointcloud_list": "포인트 클라우드",
"cmd.render.compare.divider": "렌더 비교 구분선 이동",
"cmd.render.result.discard": "렌더 결과 버리기",
"cmd.render.result.select": "렌더 결과 선택",
"cmd.render_backends": "렌더링 백엔드",
"cmd.render_batch": "모든 샷 렌더링",
"cmd.render_camera_fit": "렌더 대상 화면 맞춤",
@@ -958,6 +965,16 @@
"cmd.sheet_refold": "다시 접기",
"cmd.sheet_rules": "판금 규칙 목록",
"cmd.sheet_unfold": "펼치기",
"cmd.sketch.construction_line": "보조 직선",
"cmd.sketch.construction_line.angle": "각도 지정 보조 직선",
"cmd.sketch.construction_line.bisector": "각의 이등분선",
"cmd.sketch.construction_line.horizontal": "수평 보조 직선",
"cmd.sketch.construction_line.parallel": "평행 보조 직선",
"cmd.sketch.construction_line.perpendicular": "직교 보조 직선",
"cmd.sketch.construction_line.tangent_at": "곡선 위 점에서의 접선",
"cmd.sketch.construction_line.tangent_external": "외부 점을 지나는 접선",
"cmd.sketch.construction_line.tangent_two": "공통 접선",
"cmd.sketch.construction_line.vertical": "수직 보조 직선",
"cmd.sketch_arc_center_point": "중심점 호",
"cmd.sketch_arc_tangent": "접선 호",
"cmd.sketch_arc_three_point": "3점 호",
@@ -1080,9 +1097,11 @@
"cmd.timeline_rollback": "타임라인 마커 이동",
"cmd.timeline_stop": "기록 재생 중지",
"cmd.timeline_suppress": "특성 비활성화",
"cmd.ui.assistant": "도우미 표시 전환",
"cmd.view.render_browser": "렌더 브라우저",
"cmd.view.render_dock": "렌더 도크 이동",
"cmd.view.render_focus": "렌더 집중 보기",
"cmd.view.status_details": "뷰포트 상태 상세 정보",
"cmd.view.status_items": "뷰포트 상태 항목",
"cmd.view_ambient_occlusion": "앰비언트 오클루전",
"cmd.view_angle_readout": "뷰 각도",
@@ -1096,14 +1115,17 @@
"cmd.view_render_frame": "렌더 프레임 가이드",
"cmd.view_save": "새 이름 있는 보기",
"cmd.view_shots_strip": "샷 스트립",
"color.blue": "파랑",
"color.copy": "클릭하여 색상 값 복사",
"color.edit": "클릭하여 색상 편집",
"color.gamma": "색상 값을 0-255 감마 공간으로 표시 중",
"color.green": "초록",
"color.hex": "Hex",
"color.hex_help": "#rrggbb 또는 #rrggbbaa 입력. 6자리 값은 불투명도 유지",
"color.hex_hint": "#rrggbb",
"color.hue": "색조",
"color.linear": "색상 값을 0-1 선형 공간으로 표시 중",
"color.red": "빨강",
"color.saturation_value": "채도 및 명도",
"color.selected": "선택한 색상",
"config.column_filter_empty": "일치하는 열이 없습니다",
@@ -1150,9 +1172,14 @@
"dialog.dimension_insert_hint": "다른 구동 치수를 두 번 클릭하여 이름 삽입",
"dialog.dimension_name": "치수: {name}",
"dialog.edit_title": "{title} 편집",
"dialog.pattern_sketch_not_object": "바디나 피처를 선택하세요. 스케치는 둘 다 아닙니다. 곡선은 스케치 안의 패턴이나 대칭 복사로 반복하거나, 먼저 돌출하세요.",
"dialog.select": "↖ 선택",
"dialog.selected_count": "↖ {count}개 선택됨",
"dialog.selection_constraint": "구속 조건 {id}",
"dialog.selection_external_curve": "{sketch} · 곡선 {id}",
"dialog.selection_guidance": "변경할 입력을 선택하세요. 선택한 객체를 클릭하면 선택이 해제되며, Ctrl/Cmd를 누른 채 클릭해도 전환됩니다. 미리 보기를 확인한 다음 확인을 누르세요.",
"dialog.selection_midpoint": "중점 · {id}",
"dialog.selection_profile": "{sketch} · 프로파일 {number}",
"dialog.selection_step": "{step}/{total} 단계: {input} 선택",
"dialog.step": "단계",
"document.save_changes": "{name}의 변경 사항을 저장하시겠습니까?",
@@ -1193,12 +1220,23 @@
"help.attributions": "저작자 표시 (ATTRIBUTION.md)",
"help.build": "버전 {version} · 커밋 {commit} · 빌드 날짜 {date}",
"help.component.finish_edit": "제자리에서 편집 중인 부품을 저장하고 어셈블리로 돌아가 그 부품으로 어셈블리를 업데이트합니다. 연결된 부품의 변경을 마쳤을 때 사용하세요.",
"help.construct.plane.axis_point": "축과 축 위에 있지 않은 점을 포함하는 구성 평면을 만듭니다. 원점 축, 구성 축, 직선 모서리 또는 스케치 직선을 선택한 다음 꼭짓점, 스케치 점 또는 구성점을 선택합니다. 축 위의 점으로는 평면을 하나로 결정할 수 없습니다.",
"help.font_details": "인터페이스는 egui의 내장 글꼴을 사용합니다(Ubuntu Font Licence 및 MIT/Bitstream Vera 라이선스의 Ubuntu Light와 Hack, OFL 및 MIT의 Noto Emoji와 이모지 아이콘 글꼴). 스케치 텍스트는 Liberation Sans(SIL OFL 1.1)를 사용합니다. The Crafting Apps의 선택적 글꼴 팩 craft-fonts(BIZ UDPGothic, Shippori Mincho, BIZ UDMincho, Noto Sans CJK SC, Noto Sans Arabic; SIL OFL 1.1)는 SolidCraft 빌드에 포함되지 않습니다.",
"help.fonts": "글꼴",
"help.licences": "라이선스",
"help.mit": "MIT 라이선스",
"help.notice": "NOTICE",
"help.pointcloud.insert": "PLY, XYZ 또는 PTS 스캔을 모델 옆에 포인트 클라우드로 삽입합니다. 측정 데이터를 참고하여 모델링할 때 사용합니다.",
"help.sketch.construction_line": "두 점을 지나는 무한 보조 직선을 만듭니다. 스케치 프로파일을 나누지 않고 작도할 수 있습니다.",
"help.sketch.construction_line.angle": "스케치 X축을 기준으로 지정한 각도의 무한 보조 직선을 만듭니다. 점을 선택한 뒤 각도를 입력하거나 방향을 선택합니다.",
"help.sketch.construction_line.bisector": "교차하는 두 스케치 직선을 선택한 뒤 두 각의 이등분선 중 하나를 선택합니다. 결과는 원본 직선의 편집을 따릅니다.",
"help.sketch.construction_line.horizontal": "한 점을 지나는 무한 수평 보조 직선을 만듭니다. 나중에 편집해도 수평 구속이 유지됩니다.",
"help.sketch.construction_line.parallel": "스케치 직선을 선택한 뒤 평행한 무한 보조 직선을 배치합니다. 다른 참조를 선택하려면 마우스 오른쪽 버튼을 클릭합니다.",
"help.sketch.construction_line.perpendicular": "스케치 직선을 선택한 뒤 직교하는 무한 보조 직선을 배치합니다. 다른 참조를 선택하려면 마우스 오른쪽 버튼을 클릭합니다.",
"help.sketch.construction_line.tangent_at": "원이나 원호 위의 점, 또는 열린 스플라인이나 원뿔 곡선의 끝점에 접선을 만듭니다. 곡선을 선택한 뒤 접점을 선택합니다.",
"help.sketch.construction_line.tangent_external": "원 또는 원호, 외부 점, 접선 해를 차례로 선택합니다. 미리보기에는 그려진 원호 위의 접점만 표시됩니다.",
"help.sketch.construction_line.tangent_two": "두 원 또는 원호를 선택한 뒤 미리보기에서 공통 접선을 선택합니다. 접점은 그려진 곡선 위에 있어야 합니다.",
"help.sketch.construction_line.vertical": "한 점을 지나는 무한 수직 보조 직선을 만듭니다. 나중에 편집해도 수직 구속이 유지됩니다.",
"help.sketch.equation_curve": "범위에 걸쳐 수식으로 곡선을 그립니다: x(t)와 y(t), 또는 y = f(x). 수식에 매개변수를 쓸 수 있으며 곡선이 그 값을 따라갑니다. 사인파, 나선, 기어 이의 인벌류트에 사용합니다.",
"help.solid.chamfer": "선택한 모서리를 지정한 거리만큼 평평하게 깎습니다. 날카로운 모서리를 다듬거나 핀 또는 나사가 쉽게 들어가도록 할 때 사용합니다.",
"help.solid.extrude": "스케치 프로파일을 지정한 거리만큼 3D로 밀어내 재료를 더하거나 제거합니다. 평면 윤곽을 블록, 보스 또는 포켓으로 만들 때 사용합니다.",
@@ -1285,6 +1323,8 @@
"joint.from_bodies_hint": "선택한 각 바디가 제자리에 그대로 있으면서 자체의 새 구성 요소로 옮겨집니다.",
"joint.one_body": "두 선택이 모두 {body}에 있습니다. 두 번째는 다른 부품에서 선택하세요.",
"joint.one_component": "이 부품들은 한 구성 요소의 바디입니다: {bodies}. 관절은 한 구성 요소를 다른 구성 요소에 대해 움직이므로 부품마다 자체 구성 요소가 필요합니다.",
"joint_move.conflict": "이 부품의 조인트가 다른 조인트와 충돌합니다: {joint}.",
"joint_move.conflict_hint": "충돌하는 조인트를 편집, 비활성화 또는 삭제하여 다른 조인트가 부품을 배치할 수 있게 하세요.",
"keymap.command_id": "명령 ID",
"keymap.empty": "일치하는 명령이 없습니다",
"keymap.use_anyway": "그래도 여기서 {key} 사용",
@@ -1325,6 +1365,8 @@
"motion.track_name": "트랙 {number}",
"nav.alias.help": "Shift+Alt+왼쪽 드래그는 회전, Shift+Alt+가운데 드래그는 이동, Shift+Alt+오른쪽 드래그는 확대/축소입니다. 가운데 드래그로도 이동하고 오른쪽 드래그로도 회전합니다",
"nav.blender.help": "가운데 드래그는 회전, Shift+가운데 드래그는 이동, Ctrl+가운데 드래그는 확대/축소입니다. 오른쪽 드래그는 카메라에 영향을 주지 않습니다",
"nav.creo.help": "가운데 버튼을 끌면 회전, Shift+가운데 버튼은 이동, Ctrl+가운데 버튼을 위아래로 끌면 확대/축소합니다(아래로 끌면 확대). 휠을 굴려도 확대/축소합니다",
"nav.creo.label": "Creo",
"nav.free_orbit.help": "마우스와 3D 마우스로 롤을 유지하며 양 극점을 넘어 회전합니다. Shift 축 스냅은 비활성화됩니다.",
"nav.free_orbit.label": "자유 회전",
"nav.free_orbit.snap_help": "마우스와 3D 마우스로 양쪽 극점을 지나 회전할 수 있으며 롤 각도가 유지됩니다. 궤도 회전 드래그 중 Shift를 누르면 보기 방향과 롤 각도가 스냅됩니다.",
@@ -1505,10 +1547,14 @@
"prefs.bottom_centre": "하단 가운데",
"prefs.bottom_right": "오른쪽 아래",
"prefs.browser": "브라우저",
"prefs.browser_eye_left": "표시 아이콘을 접기 화살표 옆에 표시",
"prefs.browser_eye_left_note": "브라우저 행의 표시 아이콘을 행 오른쪽 끝의 열이 아니라 이전처럼 접기 화살표 옆에 표시합니다.",
"prefs.built_in": "기본 제공",
"prefs.button_left": "왼쪽 드래그",
"prefs.button_middle": "가운데 드래그",
"prefs.button_right": "오른쪽 드래그",
"prefs.carousel_next": "다음",
"prefs.carousel_previous": "이전",
"prefs.choose_font": "글꼴 파일 선택…",
"prefs.click": "클릭",
"prefs.contact_shading": "부드러운 접촉 음영",
@@ -1521,6 +1567,10 @@
"prefs.ctrl_cmd": "Ctrl / Cmd",
"prefs.curved_surfaces": "곡면",
"prefs.curves": "곡면",
"prefs.cut_preview_tint": "제거되는 재료를 빨간색으로 표시",
"prefs.cut_preview_tint_help": "미리 보기는 피처가 제거하는 재료와 대체되는 형상을 빨간색 반투명 고스트로 채웁니다. 끄면 이 채움이 완전히 투명해지고 윤곽선만 그려집니다.",
"prefs.dark_parts_shading": "어두운 부품의 형태 유지",
"prefs.dark_parts_shading_help": "선형 조명과 부드러운 하늘광으로 뷰를 음영 처리하여 어두운 면이 검게 뭉개지지 않고 그라데이션을 유지합니다",
"prefs.dead_zone_note": "빗금 친 영역이 데드존입니다. 그 안의 움직임은 무시됩니다.",
"prefs.default": "기본값",
"prefs.design": "설계 기본값",
@@ -1548,12 +1598,16 @@
"prefs.graphics": "그래픽",
"prefs.graphics_note": "속도와 부드러움 중에서 선택합니다. 각 선택의 효과가 샘플에 표시됩니다.",
"prefs.graphics_presets_note": "프리셋은 아래의 선택 항목을 한 번에 설정합니다.",
"prefs.hide_constraint_glyphs_zoomed_out": "축소 시 구속 조건 기호 숨기기",
"prefs.hide_constraint_glyphs_zoomed_out_note": "스케치를 충분히 축소하면 구속 조건 기호가 가려지지 않도록 숨깁니다. 끄기: 확대/축소와 관계없이 고정된 화면 크기를 유지합니다.",
"prefs.history": "이력",
"prefs.history_origin_bodies": "원점과 바디를 맨 위에 표시",
"prefs.history_origin_bodies_note": "왼쪽 또는 브라우저 아래의 히스토리가 활성 구성 요소의 바디 폴더와 원점으로 시작하며, 브라우저처럼 표시 아이콘과 메뉴가 있습니다. 아래쪽 히스토리는 바뀌지 않습니다.",
"prefs.history_play_button": "기록 컨트롤에 기록 재생 버튼 표시",
"prefs.history_play_button_note": "기록 컨트롤의 한 단계 뒤로와 한 단계 앞으로 사이에 기록 재생을 추가합니다. 컨트롤을 마우스 오른쪽 버튼으로 클릭해 표시하거나 숨길 수도 있습니다.",
"prefs.hold_stop_snapping": "누르고 있으면 스냅 중지",
"prefs.home_fit_size": "홈·맞춤 크기",
"prefs.home_fit_size_note": "홈, 맞춤, 연 디자인 또는 뷰 탐색기의 뷰 변경으로 모델을 화면에 맞출 때 모델이 뷰에서 차지하는 비율. 아래 설정과 관계없이 적용됩니다. 100 %: 패널, 나침반, 내비게이션 바 사이의 뷰를 가득 채웁니다.",
"prefs.icons_only": "아이콘만",
"prefs.imported_file": "가져온 파일",
"prefs.input": "입력",
@@ -1562,12 +1616,15 @@
"prefs.interface_note": "SolidCraft의 모양과 각 부분의 위치입니다.",
"prefs.interval_minutes": "{n}분",
"prefs.labels": "레이블",
"prefs.language_system": "시스템",
"prefs.layout": "레이아웃",
"prefs.layout_note": "컴팩트는 패널을 창 가장자리에 고정합니다. 브라우저 반투명은 플로팅에서 사용할 수 있습니다. 어시스턴트 위치는 어시스턴트 페이지에서 바꿀 수 있습니다.",
"prefs.left": "왼쪽",
"prefs.left_click": "왼쪽 클릭",
"prefs.line_drag_draws_one": "누른 채 드래그하면 선 하나 그리기",
"prefs.line_drag_draws_one_note": "선 도구에서 누르고 드래그한 뒤 놓으면 누른 곳에서 놓은 곳까지 선 하나를 그리고 거기서 끝납니다. 클릭하면 이전처럼 이어지는 선을 그립니다. 끄면: 드래그는 클릭처럼 놓은 곳에 점을 둡니다.",
"prefs.line_hover_tangent_arc": "선의 마지막 점에 머무르면 접선 호로 전환",
"prefs.line_hover_tangent_arc_note": "선 도구에서 선분을 그린 뒤 체인의 마지막 점에서 벗어났다가 돌아와 포인터를 그 위에 멈추면, 다음 클릭으로 접선 호의 끝점을 지정합니다. 같은 동작으로 선으로 돌아갑니다. 끔: 머물러도 아무 일도 일어나지 않습니다.",
"prefs.live_input": "실시간 입력",
"prefs.live_preview": "실시간 미리보기",
"prefs.max_file_size": "열 수 있는 최대 파일 크기",
@@ -1584,6 +1641,8 @@
"prefs.mouse_mapping": "마우스 매핑",
"prefs.navigation": "탐색",
"prefs.navigation_note": "마우스, 트랙패드, 3D 마우스로 뷰를 움직이는 방식입니다.",
"prefs.navigator_fit": "뷰 탐색기로 뷰를 바꾼 뒤 모델 맞춤",
"prefs.navigator_fit_note": "큐브의 면, 모서리, 화살표나 기즈모의 축을 클릭하면 어느 방향에서든 전체가 들어가는 한 거리(경계 구)에서 모델의 중심을 바라봅니다. 켜져 있는 동안 홈 뷰도 같은 확대/축소와 중심을 쓰므로 그 뒤에 고른 뷰는 방향만 바뀝니다. 끄면 뷰가 제자리에서 회전하며 대상과 확대/축소를 유지합니다.",
"prefs.not_on_gpu": "이 GPU에서는 사용할 수 없음",
"prefs.on": "켜짐",
"prefs.opaque": "불투명",
@@ -1592,8 +1651,14 @@
"prefs.origin_plane_names": "원점 평면 이름",
"prefs.origin_plane_names_note": "브라우저, 대화 상자, 목록에 표시되는 이름입니다. {top}은 XY, {front}는 XZ, {right}는 YZ이며 Z가 위쪽입니다. 명령, 스크립트, 저장된 디자인은 XY, XZ, YZ를 유지합니다.",
"prefs.overall_speed": "전체 속도",
"prefs.persistent_ribbon_pressed": "활성 리본 명령 강조 표시",
"prefs.persistent_ribbon_pressed_help": "효과가 켜져 있는 동안 리본 명령을 강조 표시합니다. 끄면 이전의 중립적인 모양과 명령 도움말을 유지합니다.",
"prefs.perspective_fov": "시야각",
"prefs.preview_choices": "선택 항목 미리보기",
"prefs.preview_tint_new_faces": "미리 보기에서 새 면에 색 입히기",
"prefs.preview_tint_new_faces_help": "바디를 변경하는 피처의 미리 보기에서 추가되는 면을 미리 보기 색으로 그릴 수 있습니다. 끄면 바디가 원래 색으로 그려집니다.",
"prefs.print_face_highlight": "출력 바닥면 강조",
"prefs.print_face_highlight_tip": "뷰에서 바디의 출력 바닥면을 색칠하고 윤곽을 그리는 강도입니다. 0 %이면 강조하지 않습니다.",
"prefs.project_options_dialog": "Project 옵션 대화상자",
"prefs.project_options_dialog_note": "켜기: 투영 전에 지오메트리 또는 바디와 투영 링크를 선택합니다. 끄기: 기존 직접 선택 작업 흐름을 유지합니다.",
"prefs.quality_default": "기본값",
@@ -1601,6 +1666,8 @@
"prefs.quality_slowest": "가장 느림",
"prefs.quality_smoother": "더 부드럽게",
"prefs.reports_saved": "{n}개 저장됨",
"prefs.ribbon_click_ends_tool": "실행 중인 도구의 버튼을 클릭하면 도구 종료",
"prefs.ribbon_click_ends_tool_note": "사용 중인 스케치 도구의 강조된 리본 버튼을 클릭하면 도구가 종료되어 뷰에서 클릭하면 다시 선택됩니다. 끄기: 클릭하면 도구가 다시 시작됩니다.",
"prefs.right_click": "오른쪽 클릭",
"prefs.saving": "자동 저장 및 복구",
"prefs.scale_note": "창에서 Ctrl + / Ctrl −로도 조절합니다. 버튼은 100%에서 28 px입니다.",
@@ -1609,6 +1676,8 @@
"prefs.search_empty": "일치하는 설정이 없습니다",
"prefs.select": "선택",
"prefs.select_one_item": "항목 하나 선택",
"prefs.select_other_hidden": "다른 항목 선택으로 숨겨진 형상 선택",
"prefs.select_other_hidden_help": "켜짐: 포인터 근처의 숨겨진 바디, 스케치 및 가려진 모서리를 포함합니다. 꺼짐: 포인터 바로 아래에 보이는 형상만 포함하는 기존 목록을 사용합니다.",
"prefs.selecting": "선택",
"prefs.shift": "Shift",
"prefs.shift_add_ctrl_toggle": "Shift는 추가만, Ctrl / Cmd는 토글",
@@ -1620,6 +1689,11 @@
"prefs.sketch_align_points_note": "그리는 동안 점이 한 스케치 점과 수평으로, 다른 점과 수직으로 동시에 맞춰지고 점선 안내선이 표시됩니다. 클릭하면 두 정렬이 모두 유지됩니다. 끄기: 이전 점에만, 한 번에 한 축씩 맞춥니다.",
"prefs.sketch_conflict_colour": "충돌하는 기하를 충돌 색상으로 표시",
"prefs.sketch_conflict_colour_note": "스케치의 구속 조건이 충돌하는 동안 실패한 구속 조건의 글리프나 치수뿐 아니라 그 구속 조건이 잡고 있는 곡선과 점도 충돌 색상으로 그립니다. 끄기: 평소 색상을 유지합니다.",
"prefs.sketch_construction_lines": "확장 보조 직선 도구",
"prefs.sketch_open_look_at": "스케치를 열 때 정면으로 돌리기",
"prefs.sketch_open_look_at_note": "끄기: 스케치를 만들거나 편집해도 뷰가 그대로입니다. 필요할 때 '바라보기'로 스케치를 정면으로 봅니다.",
"prefs.sketch_recent_snap": "최근 중심과 중점에 자동 스냅",
"prefs.sketch_recent_snap_note": "그리는 동안 최근에 사용한 두 원의 중심 또는 직선 모서리 중점의 안내선이 만나는 위치로 커서를 스냅합니다. 끄기: 안내선은 보기만 하고 커서는 움직이지 않습니다.",
"prefs.sketch_selection": "스케치 및 선택",
"prefs.sketch_selection_heading": "스케치 및 선택",
"prefs.sketch_selection_note": "스케치가 스냅되는 방식과 클릭으로 선택하는 방식입니다.",
@@ -1629,6 +1703,8 @@
"prefs.sketch_tab_always_note": "스케치가 열려 있지 않을 때도 스케치 탭이 리본에서 모델 바로 다음에 남아 있습니다. 그 그리기 도구는 선택한 평면이나 면, 또는 다음에 고르는 평면에서 스케치를 시작하고 그 안에서 도구를 바로 쓸 수 있게 합니다.",
"prefs.sketch_tracking_guides": "중심 및 중점 정렬 안내선",
"prefs.sketch_tracking_guides_note": "원 중심이나 직선 모서리의 중점에 마우스를 올린 다음 수평 또는 수직으로 이동하면 임시 점선 안내선이 표시됩니다.",
"prefs.sketch_tracking_points": "그리는 동안 끝점과 모서리에서도 정렬 안내선",
"prefs.sketch_tracking_points_note": "그리기 도구가 점을 기다리는 동안 선이나 호의 끝점, 직사각형 모서리, 자유 점에 마우스를 올리면 중심이나 중점과 같은 임시 점선 안내선이 표시됩니다. 끄면: 중심과 중점만.",
"prefs.sketching": "스케치",
"prefs.snap_drawing_note": "스케치 점을 그리거나 드래그하는 동안.",
"prefs.source": "소스",
@@ -1640,6 +1716,24 @@
"prefs.status_error": "오류",
"prefs.status_selected": "선택됨",
"prefs.status_warning": "경고",
"prefs.structure.appearance": "모양",
"prefs.structure.appearance_note": "색상, 텍스트 및 접근성.",
"prefs.structure.in_profile": "프로필에 포함",
"prefs.structure.layout": "레이아웃",
"prefs.structure.layout_note": "창 구성 요소의 위치.",
"prefs.structure.look": "보기",
"prefs.structure.measure_pointer": "측정 및 포인터",
"prefs.structure.mouse3d": "3D 마우스",
"prefs.structure.mouse3d_note": "SpaceMouse 및 SpaceNavigator.",
"prefs.structure.navigation_note": "마우스와 트랙패드. 3D 마우스는 별도 페이지에 있습니다.",
"prefs.structure.profile": "프로필",
"prefs.structure.profile_edited": "저장 후 변경됨",
"prefs.structure.profile_hover": "설정 프로필에 저장됨",
"prefs.structure.scale_percent": "{percent}%",
"prefs.structure.sketch": "스케치",
"prefs.structure.tools": "도구",
"prefs.structure.tools_note": "모델링 도구의 동작.",
"prefs.structure.work": "작업",
"prefs.supersampling_brief": "뷰를 더 크게 그린 뒤 줄여서 필터링합니다. 매우 선명하지만 더 무겁습니다.",
"prefs.tab_accent_note": "강조 색상이 활성 탭을 따라갑니다",
"prefs.theme_file": "테마 파일",
@@ -1649,6 +1743,16 @@
"prefs.theme_follow_note": "다른 도구가 파일을 다시 쓸 때마다 다시 불러옵니다. 테마를 선택하면 따르기를 중지합니다.",
"prefs.theme_follow_off": "끄기",
"prefs.theme_follow_stop": "따르기 중지",
"prefs.theme_option_opacity": "불투명도",
"prefs.theme_option_opacity_help": "플로팅 패널의 불투명도를 조정합니다. 뷰포트 색상 위에서도 텍스트를 읽을 수 있도록 최솟값이 적용됩니다.",
"prefs.theme_option_tab_colours": "탭 색상",
"prefs.theme_option_tab_colours_help": "각 리본 탭에 이 테마의 패널 및 뷰포트 색상을 사용합니다.",
"prefs.theme_option_tab_fade_ms": "탭 전환",
"prefs.theme_option_tab_fade_ms_help": "탭을 전환할 때 패널 및 뷰포트 색상을 서서히 변경합니다. 0이면 즉시 전환합니다.",
"prefs.theme_options_badge": "옵션",
"prefs.theme_options_more": "더 보기 · {count}",
"prefs.theme_options_reset": "초기화",
"prefs.theme_options_unavailable": "이 기기에서는 사용할 수 없음",
"prefs.timeline_half_hour": "−30분",
"prefs.timeline_now": "지금",
"prefs.timeline_quarter_hour": "−15",
@@ -1668,10 +1772,20 @@
"prefs.under_cursor": "커서 아래",
"prefs.units_precision": "단위 및 정밀도",
"prefs.updates": "업데이트",
"prefs.value_boxes_in_view": "뷰에서 핸들 옆에 값 표시",
"prefs.value_boxes_in_view_tip": "명령의 값(거리, 반경 등)을 모델 위 핸들 옆 상자에 표시합니다. 끄면 값은 명령 창에 입력하며, 선택 후 키보드 입력이 그 창으로 가고 모델을 가리는 것이 없습니다.",
"prefs.view": "뷰 동작",
"prefs.view_confirm_corner": "뷰 모서리에 확인 및 취소",
"prefs.view_confirm_corner_note": "대화 상자나 스케치가 열려 있는 동안 뷰 오른쪽 위의 체크와 X 표시가 대화 상자의 확인과 취소와 같은 동작을 하거나 스케치를 마치고 취소합니다. 뷰 탐색기는 그 아래로 내려갑니다.",
"prefs.viewport": "뷰포트",
"prefs.viewport_analysis_status": "뷰포트 해석 상태 표시",
"prefs.viewport_analysis_status_help": "활성 해석을 뷰포트 위에 표시하고 각 항목에서 범례를 엽니다. Esc로 최신 해석을 끕니다. 끄면 모서리 범례와 이전 Esc 동작으로 돌아갑니다.",
"prefs.viewport_section_status": "뷰포트 단면 상태 표시",
"prefs.viewport_section_status_help": "뷰포트에 단면 설정을 표시합니다. Escape 키와 활성 리본 버튼으로 단면을 끕니다. 비활성화하면 이전 단면 조작을 유지합니다.",
"prefs.viewport_status_details": "뷰포트 실시간 상세 정보",
"prefs.viewport_status_details_help": "표준 상세 카드에서 활성 분석 및 단면 설정을 편집합니다. 끄면 읽기 전용 분석 범례와 단면 대화상자로 돌아갑니다.",
"prefs.viewport_status_summary": "뷰포트 상태 항목 요약",
"prefs.viewport_status_summary_help": "상태 항목이 3개 이상이면 하나의 요약 배지로 표시합니다. 비활성화하면 모든 항목을 기존 행에 표시합니다.",
"prefs.wheel": "휠",
"prefs.wheel_trackpad": "휠 및 트랙패드",
"prefs.workspace": "작업 공간",
@@ -1681,6 +1795,10 @@
"properties.title": "속성: {name}",
"recovery.days_ago": "{count}일 전",
"recovery.detail": "{file} · 피처 {features}개 · {when} 자동 저장",
"recovery.discard_all": "모두 버리기",
"recovery.discard_all_detail": "이 작업은 되돌릴 수 없습니다.",
"recovery.discard_all_title": "자동 저장 {count}개를 버리시겠습니까?",
"recovery.discard_all_title_one": "자동 저장 1개를 버리시겠습니까?",
"recovery.hours_ago": "{count}시간 전",
"recovery.just_now": "방금",
"recovery.min_ago": "{count}분 전",
@@ -1729,6 +1847,10 @@
"render.appearances": "외관",
"render.assign_help": "클릭하여 선택 항목에 적용하거나 드래그하여 미리 보고 놓으세요. 선택이 없으면 칠하기를 시작합니다.",
"render.background": "장면 배경",
"render.batch_all_shots": "모든 샷 ({count})",
"render.batch_empty": "모든 샷을 렌더링하기 전에 샷을 저장하세요.",
"render.batch_limit": "한 번에 최대 32개의 샷을 렌더링할 수 있습니다.",
"render.batch_status": "{running}개 실행 중 · {waiting}개 대기 중",
"render.bloom_enable": "표시 블룸",
"render.bloom_help": "양의 선형 하이라이트를 세 번의 정규화 필터로 확산하는 출력 전용 효과입니다. 반경은 출력 픽셀 단위이며 sRGB 전에 더합니다. 렌즈·볼륨·수렴 개선이 아니며 원본 EXR은 변하지 않습니다.",
"render.bloom_opaque": "블룸에는 불투명 출력이 필요합니다. 투명 PNG를 몰래 합성하지 않고 거부합니다.",
@@ -1820,6 +1942,13 @@
"render.children.workstation": "워크스테이션",
"render.choose_look": "먼저 외관 라이브러리에서 외관을 선택하세요",
"render.clear_stage": "Remove saved stage",
"render.compare_divider": "비교 구분선",
"render.compare_live": "라이브",
"render.compare_live_preview": "라이브 미리보기",
"render.compare_render": "렌더 {number}",
"render.compare_side": "렌더 {number} · {shot}",
"render.compare_summary": "{shot} · {width} × {height} · PNG · {seconds}초 · {renderer} · 리비전 {revision}에서 캡처",
"render.compare_swap": "맞바꾸기",
"render.cpu_budget": "CPU 리소스 프로필",
"render.cpu_budget_bodies": "바디 수 상한",
"render.cpu_budget_compact": "컴팩트 (기존 제한)",
@@ -2232,7 +2361,9 @@
"render.output_ready": "렌더링 준비 완료",
"render.output_run_check": "검사 실행",
"render.output_size_limit": "{method}: 한 변 최대 {dimension} px, 총 {pixels} 픽셀. 가능한 최대 크기: {width} × {height}.",
"render.output_size_method_profile": "{width} × {height}을(를) 렌더링하려면 {method}와(과) {profile} CPU 리소스 프로필을 선택하거나 더 작은 크기를 선택하세요.",
"render.output_size_ok": "크기 정상 · {width} × {height} px",
"render.output_size_profile": "{width} × {height}을(를) 렌더링하려면 {profile} CPU 리소스 프로필이나 더 작은 크기를 선택하세요.",
"render.output_tools_inspector": "출력 검사기에서 크기와 형식을 편집하세요.",
"render.output_view_image": "이미지 보기",
"render.paint_label": "칠하기",
@@ -2286,6 +2417,10 @@
"render.result_actual": "100%",
"render.result_actual_size": "100%",
"render.result_reduced_display": "표시 미리보기를 뷰포트 장치 또는 캐시 제한에 맞춰 축소했습니다. 보관된 PNG와 내보내기는 전체 해상도를 유지합니다. 이 축소 보기에서는 원본 100% 검사가 불가능합니다.",
"render.results_choose": "보관된 결과",
"render.results_label": "렌더 {number} · {shot} · {seconds}초",
"render.results_stale_label": "{result} [이전 버전]",
"render.results_unnamed": "이미지",
"render.return_design": "설계로 돌아가기",
"render.ribbon_backgrounds": "배경",
"render.ribbon_check": "검사",
@@ -2364,6 +2499,7 @@
"render.size_custom": "사용자 지정…",
"render.size_full_hd": "풀 HD",
"render.size_hd": "HD",
"render.size_needs_profile": "{size} · {profile} 필요",
"render.size_presets": "크기 프리셋",
"render.size_presets_pending": "출력 편집기와 함께 제공 예정",
"render.size_preview": "미리보기",
@@ -2585,6 +2721,24 @@
"sheet.flange_type_base": "베이스",
"sheet.flange_type_contour": "윤곽",
"sheet.flange_type_edge": "모서리",
"sheet.personal_rules.confirm_delete": "삭제 확인",
"sheet.personal_rules.delete": "삭제",
"sheet.personal_rules.delete_prompt": "이 개인 규칙을 삭제할까요? 설계에 이미 있는 규칙은 바뀌지 않습니다.",
"sheet.personal_rules.full": "개인 라이브러리에 이미 규칙이 64개 있습니다.",
"sheet.personal_rules.invalid_name": "줄 바꿈이나 제어 문자가 없는 짧은 이름을 입력하세요.",
"sheet.personal_rules.invalid_values": "규칙 값을 모두 입력하세요. 각 값은 이 설계에서 계산할 수 있어야 하며, 두께는 양수, K 계수는 0에서 1 사이여야 합니다.",
"sheet.personal_rules.missing": "선택한 개인 규칙을 더 이상 사용할 수 없습니다.",
"sheet.personal_rules.name": "규칙 이름",
"sheet.personal_rules.name_exists": "같은 이름의 개인 규칙이 이미 있습니다. 다른 이름을 사용하세요.",
"sheet.personal_rules.name_hint": "고유한 이름",
"sheet.personal_rules.overwrite": "선택한 개인 규칙에 변경 사항 저장",
"sheet.personal_rules.rename": "이름 바꾸기",
"sheet.personal_rules.rule": "개인 규칙",
"sheet.personal_rules.save": "새로 저장",
"sheet.personal_rules.scope": "모든 설계에서 쓸 수 있도록 프로필에 저장됩니다.",
"sheet.personal_rules.select": "규칙 선택",
"sheet.personal_rules.title": "개인 규칙",
"sheet.personal_rules.unsupported": "이 규칙에는 이 버전에서 사용할 수 없는 값이 있습니다.",
"shortcut.json_error": "매개변수는 JSON 형식이어야 합니다: {error}",
"shortcut.no_command": "`{id}` 명령이 없습니다. JSON 앞의 텍스트는 명령 ID여야 합니다",
"shortcut.pin": "S 상자 맨 위에 고정",
@@ -2769,6 +2923,8 @@
"ui.3d_mouse_step_twist_counterclockwise": "캡을 시계 반대 방향으로 돌려 유지한 다음 놓으세요.",
"ui.3d_mouse_switch_cap": "중앙 복귀형으로 보정",
"ui.3d_mouse_switch_trackball": "트랙볼로 보정",
"ui.3d_mouse_use_direct": "직접 드라이버 사용",
"ui.3d_mouse_use_direct_tip": "spacenavd를 거치지 않고 3D 마우스를 직접(hidraw) 읽습니다.",
"ui.3d_mouse_view_axis": "뷰 축",
"ui.3d_mouse_view_off": "끔",
"ui.3d_mouse_view_off_tip": "3D 마우스 드라이버 프로필이 이 축을 끄므로, 이 축의 동작으로는 뷰가 움직이지 않습니다. 여기서 다른 축의 동작을 고르면 둘이 바뀌고, 그 동작은 더 이상 뷰를 움직이지 않습니다.",
@@ -2805,12 +2961,14 @@
"ui.agent_chat_auth_terminal": "터미널에서 이것을 실행한 뒤 다시 연결을 누르세요:",
"ui.agent_chat_auth_title": "에이전트에 로그인",
"ui.agent_chat_cancel": "취소",
"ui.agent_chat_cannot_start": "설치되어 있지만 시작되지 않습니다: {error}",
"ui.agent_chat_changes": "변경 {n}개, 실행 취소 한 번",
"ui.agent_chat_changes_of": "변경 {n}/{limit}",
"ui.agent_chat_close": "닫기",
"ui.agent_chat_command": "에이전트 명령",
"ui.agent_chat_connect": "연결",
"ui.agent_chat_copy": "복사",
"ui.agent_chat_custom_heading": "사용자 지정 모델",
"ui.agent_chat_custom_hint": "표준 입출력으로 Agent Client Protocol을 사용하는 모든 프로그램. 셸 없이 실행됩니다.",
"ui.agent_chat_denied": "거부함",
"ui.agent_chat_deny": "거부",
@@ -2852,7 +3010,15 @@
"ui.agent_chat_mode_all": "모두",
"ui.agent_chat_mode_ask": "확인",
"ui.agent_chat_mode_edits": "편집",
"ui.agent_chat_model_custom": "직접 입력 사용: {model}",
"ui.agent_chat_model_rejected": "에이전트가 {model}을(를) 받아들이지 않았습니다: {error}",
"ui.agent_chat_model_search": "모델 검색…",
"ui.agent_chat_model_tip": "에이전트가 사용하는 모델입니다. 선택은 이 에이전트에 기억됩니다.",
"ui.agent_chat_models_failed": "모델 목록을 가져올 수 없습니다: {error}",
"ui.agent_chat_models_heading": "사용 가능한 모델",
"ui.agent_chat_models_listing": "모델 목록을 가져오는 중…",
"ui.agent_chat_models_none": "엔드포인트에 나열된 모델이 없습니다",
"ui.agent_chat_models_not_a_list": "응답이 모델 목록이 아닙니다",
"ui.agent_chat_new": "새 채팅",
"ui.agent_chat_new_confirm": "새 채팅을 시작할까요? 현재 채팅은 지워집니다.",
"ui.agent_chat_next_picture": "다음 이미지",
@@ -2881,9 +3047,12 @@
"ui.agent_chat_queued_stopped": "대기 중 (중지됨, 보내지 않음)",
"ui.agent_chat_refresh": "새로 고침",
"ui.agent_chat_refused": "에이전트에게 허용되지 않음: {reason}",
"ui.agent_chat_reinstall": "{agent}이(가) 설치되어 있지만({program}) SolidCraft가 확인할 때 시작되지 않았습니다: {error}\n설치가 완료되지 않았거나 다른 종류의 컴퓨터용일 수 있습니다. `{install}`(으)로 다시 설치하고, 터미널에서 버전이 출력되는지 확인한 뒤 새로 고침을 누르세요.",
"ui.agent_chat_remove": "대기열에서 제거",
"ui.agent_chat_remove_file": "이 메시지에서 빼기",
"ui.agent_chat_remove_imported": "이 메시지에서 빼기. 부품은 디자인에 남습니다 (실행 취소하면 제거됨)",
"ui.agent_chat_reply_cut_off": "응답이 끝나기 전에 길이 한도에 도달해 불완전할 수 있습니다. 에이전트에게 계속하거나 더 짧게 답하라고 요청하세요.",
"ui.agent_chat_reply_declined": "모델이 이 메시지에 대한 답변을 거절했습니다.",
"ui.agent_chat_right": "오른쪽",
"ui.agent_chat_save": "저장",
"ui.agent_chat_send": "보내기",
@@ -2937,12 +3106,17 @@
"ui.ai_copy_suffix": "복사본",
"ui.ai_custom_url": "사용자 지정 URL",
"ui.ai_default": "기본값",
"ui.ai_edit": "편집",
"ui.ai_edit_agent_title": "에이전트 편집",
"ui.ai_edit_gone": "이 에이전트는 제거되었으므로 저장할 내용이 없습니다.",
"ui.ai_edit_tip": "이 에이전트의 이름, 명령 또는 엔드포인트를 변경합니다. 저장된 키는 표시되지 않습니다.",
"ui.ai_http_busy": "엔드포인트가 바쁘거나 한도에 도달했습니다. 나중에 다시 시도하세요",
"ui.ai_http_key": "엔드포인트가 키를 거부했습니다. 환경 설정 > AI에서 확인하세요",
"ui.ai_http_not_found": "엔드포인트나 모델을 찾을 수 없습니다. 기본 URL과 모델 이름을 확인하세요",
"ui.ai_http_too_large": "대화가 이 엔드포인트에 비해 너무 큽니다. 새 채팅을 시작하세요",
"ui.ai_key": "API 키",
"ui.ai_key_hint": "선택 사항, 시스템 키체인에 저장",
"ui.ai_key_keep_hint": "저장된 키를 유지하려면 비워 두세요",
"ui.ai_key_needs_https": "키는 HTTPS를 통해서만, 또는 이 컴퓨터로만 전송됩니다.",
"ui.ai_key_note": "SolidCraft 설정이 아닌 시스템 키체인에 저장됩니다. 로컬 서버라면 비워 두세요.",
"ui.ai_keychain_error": "시스템 키체인이 거부했습니다: {error}",
@@ -2969,6 +3143,7 @@
"ui.ai_preset": "프리셋",
"ui.ai_remove": "제거",
"ui.ai_reset": "재설정",
"ui.ai_save": "저장",
"ui.ai_settings": "AI 설정…",
"ui.ai_show_features": "AI 기능 표시",
"ui.ai_show_features_note": "에이전트 채팅: 이미 사용 중인 코딩 에이전트나 선택한 모델 엔드포인트가 열린 디자인을 다루는 패널입니다. 끄면 AI 버튼, 단축키, 메뉴 항목, 패널이 없고 아무것도 찾거나 시작하지 않습니다.",
@@ -3032,6 +3207,7 @@
"ui.circle": "원",
"ui.circular_pattern": "원형 패턴",
"ui.clear": "지우기",
"ui.clear_print_face": "출력 바닥면 해제",
"ui.clear_recent": "최근 항목 지우기",
"ui.clear_the_selection": "선택 해제",
"ui.click_selects_whole_bodies": "클릭하면 바디 전체 선택",
@@ -3066,6 +3242,17 @@
"ui.constant": "상수",
"ui.constraints_conflict": "구속 조건 충돌",
"ui.construction": "구성선",
"ui.construction.angle_hint": "보조 직선: 점 클릭 후 각도 입력 또는 방향 선택",
"ui.construction.bisector_hint": "이등분선: 교차하는 두 직선 선택 후 원하는 해 선택",
"ui.construction.common_hint": "공통 접선: 두 원/원호 선택 후 원하는 해 선택",
"ui.construction.contact_hint": "접선: 원/원호 또는 열린 스플라인/원뿔 곡선 선택 후 접점 선택 (자유 곡선은 끝점만)",
"ui.construction.external_hint": "접선: 원 또는 원호, 외부 점, 원하는 해를 차례로 선택",
"ui.construction.free_hint": "보조 직선: 두 점 클릭; 마우스 오른쪽 버튼으로 다시 시작",
"ui.construction.normal_needs_length": "무한 직선은 항상 보조선입니다. 일반 선을 그리려면 길이를 입력하세요",
"ui.construction.point_hint": "보조 직선: 통과할 점 클릭",
"ui.construction.reference_hint": "보조 직선: 직선 선택 후 점 선택; 마우스 오른쪽 버튼으로 참조 변경",
"ui.construction.ribbon_label": "보조선",
"ui.construction.side_hint": "보조 직선: 선이 뻗어 나갈 쪽 클릭; 마우스 오른쪽 버튼으로 다시 시작",
"ui.context_menu": "컨텍스트 메뉴",
"ui.continuity_g0": "G0 꺾임",
"ui.continuity_g1": "G1 접선",
@@ -3091,6 +3278,7 @@
"ui.dark": "어둡게",
"ui.default_modelling_orientation": "기본 모델링 방향",
"ui.delete": "삭제",
"ui.delete_select_first": "먼저 삭제할 항목을 선택하세요: 피처, 바디, 컴포넌트 또는 스케치 형상",
"ui.depth": "깊이",
"ui.design": "디자인",
"ui.design_properties.author": "작성자",
@@ -3104,6 +3292,40 @@
"ui.design_properties.part_number": "부품 번호",
"ui.design_properties.project": "프로젝트",
"ui.design_properties.revision": "리비전",
"ui.details_access_caption": "선택한 방향에서 공구가 각 면에 도달할 수 있는지 표시합니다.",
"ui.details_angle": "각도",
"ui.details_continuity_caption": "선택한 이음부를 편집합니다. 다른 이음부는 각자의 설정을 유지합니다.",
"ui.details_continuity_stale": "이전 형상입니다. 이 이음부를 편집하거나 화면에 맞추려면 분석을 다시 실행하세요.",
"ui.details_copy_list": "목록 복사",
"ui.details_curvature": "곡률 공차",
"ui.details_curvature_caption": "각 면의 국소 곡률 반지름에 따라 색상이 표시됩니다.",
"ui.details_direction": "공구 방향",
"ui.details_draft_caption": "금형 분리 방향에 대한 각 면의 각도에 따라 색상이 표시됩니다.",
"ui.details_edit_seam": "이음부 편집",
"ui.details_fixture": "UI 구성 요소 예시 — 샘플 데이터만 표시",
"ui.details_fixture_caption": "설명용 값을 사용하는 UI 구성 요소 예시입니다. 모델의 분석 결과가 아닙니다.",
"ui.details_fixture_problem": "문제가 있는 결과 예시",
"ui.details_fixture_readout": "측정값 예시",
"ui.details_flip": "뒤집기",
"ui.details_gap": "간격",
"ui.details_hatch": "절단면 해칭",
"ui.details_jump": "곡률 불연속",
"ui.details_key": "범례",
"ui.details_offset": "오프셋",
"ui.details_plane": "평면",
"ui.details_pull": "금형 분리 방향",
"ui.details_radius": "반지름",
"ui.details_readout": "측정값",
"ui.details_samples": "샘플 수",
"ui.details_seam": "{body} · 모서리 {edge}",
"ui.details_settings": "설정",
"ui.details_sharp_gap": "날카로운 이음 또는 간격",
"ui.details_show_all": "전체 {count}개 표시",
"ui.details_smooth": "매끄러움",
"ui.details_stripes": "줄무늬",
"ui.details_target": "형상에 맞게 보기 조정",
"ui.details_worst_seams": "연속성이 가장 나쁜 이음부",
"ui.details_zebra_caption": "반사된 줄무늬는 면이 얼마나 매끄럽게 이어지는지 보여 줍니다.",
"ui.diameter": "지름",
"ui.dimension": "치수",
"ui.direct_interaction": "직접 조작",
@@ -3148,6 +3370,7 @@
"ui.edit_in_place_saved_elsewhere": "부품이 다른 파일에 저장되었습니다. 어셈블리는 여전히 {name}에 연결되어 있습니다",
"ui.edit_in_place_wait": "디자인에서 실행 중인 작업이 끝날 때까지 기다리세요",
"ui.edit_section_analysis": "단면 분석 편집",
"ui.edit_sketch_empty": "편집할 스케치가 없습니다",
"ui.ellipse": "타원",
"ui.emboss_wrap_note": "지원되는 원통에 접하는 직교 선 프로파일은 자동으로 감깁니다. 대상을 고르려면 벽을 선택하세요.",
"ui.end_radius": "끝 반지름",
@@ -3158,12 +3381,15 @@
"ui.equation_explicit": "명시적",
"ui.equation_form": "형식",
"ui.equation_note": "변수는 단위가 없는 수입니다. sin(t)는 라디안으로 읽습니다. 단위가 없는 결과는 디자인 단위입니다.",
"ui.equation_note_range": "변수는 범위와 같이 길이입니다. 길이 매개변수와 함께 쓸 수 있으며, sin()에는 길이로 나누어 넣습니다. 단위가 없는 결과는 디자인 단위로 읽습니다.",
"ui.equation_parametric": "매개변수식",
"ui.equation_variable_unit": "변수에 범위의 단위 사용",
"ui.equation_x_of_t": "x(t)",
"ui.equation_y_of_t": "y(t)",
"ui.equation_y_of_x": "y(x)",
"ui.equivalent_radius": "등가 반지름",
"ui.expand": "펼치기",
"ui.explode_needs_two_components": "분해 보기는 구성 요소를 서로 떼어 놓으므로 설계에 구성 요소가 두 개 이상 있어야 합니다(새 구성 요소, 설계 삽입 또는 바디로 구성 요소 만들기)",
"ui.exportDxf": "DXF 내보내기…",
"ui.export_ellipsis_keymap": "내보내기…",
"ui.export_keymap_tip": "키, S 상자 즐겨찾기, 도구 모음을 파일로 내보내기",
@@ -3313,6 +3539,7 @@
"ui.insert_design.saved_file": "{name}에 저장되지 않은 변경 사항이 있어 저장된 파일을 삽입했습니다. 저장한 다음 링크 업데이트로 변경 사항을 가져오세요.",
"ui.insert_design.unsaved": "저장되지 않은 변경 사항",
"ui.inspect": "검사",
"ui.instances": "인스턴스",
"ui.intersect": "교차",
"ui.isolate": "분리 표시",
"ui.join": "접합",
@@ -3321,12 +3548,14 @@
"ui.joints": "조인트",
"ui.keyboard_shortcuts": "키보드 단축키",
"ui.language": "언어",
"ui.lasso_select": "올가미(자유롭게 둘러 그리기: 완전히 안쪽에 있는 것을 선택)",
"ui.layout_compact": "컴팩트",
"ui.layout_floating": "플로팅",
"ui.length": "길이",
"ui.length_decimals": "길이 소수점 자릿수",
"ui.light": "밝게",
"ui.line": "선",
"ui.line_arc_hint": "접선 호: 호의 끝점을 클릭합니다. 선으로 돌아가려면 마지막 점에 다시 머무르고, 끝내려면 오른쪽 클릭 또는 Esc를 누릅니다",
"ui.lock": "잠금",
"ui.loft": "로프트",
"ui.look_at": "바라보기",
@@ -3406,6 +3635,7 @@
"ui.part_size_shared": "부품을 다시 빌드하며 추가된 피처는 모두 대체됩니다. 이 구성요소의 모든 인스턴스가 업데이트됩니다.",
"ui.paste": "붙여넣기",
"ui.path": "경로",
"ui.pattern_object_type_tip": "바디: 뷰나 브라우저에서 선택하는 솔리드 형상이며, 각각 통째로 복사됩니다.\n피처: 돌출이나 구멍 같은 기록의 단계이며, 기록에서 또는 그 단계가 만든 면에서 선택합니다. 그 단계가 반복됩니다.\n스케치는 둘 다 아닙니다. 곡선은 스케치 안의 패턴이나 대칭 복사로 반복하거나, 먼저 돌출하세요.",
"ui.pattern_on_path": "경로 패턴",
"ui.perpendicular": "수직",
"ui.perspective_view": "원근 투영 뷰",
@@ -3437,6 +3667,11 @@
"ui.polygon": "다각형",
"ui.preferences": "환경 설정",
"ui.press_a_key": "키를 누르세요…",
"ui.print_face_body_not_sent": "이 면의 바디는 보내지지 않습니다. 먼저 바디에 추가하십시오",
"ui.print_face_cleared": "{body}: 출력 바닥면을 해제했습니다",
"ui.print_face_input": "출력 바닥면",
"ui.print_face_pick": "솔리드 바디의 평면 하나를 선택하면 출력 바닥면이 됩니다",
"ui.print_face_set": "{body}: 출력 바닥면을 설정했습니다. 슬라이서로 보내면 이 면이 아래로 놓입니다",
"ui.profile": "프로파일",
"ui.profile_plane": "프로파일 평면",
"ui.profiles": "프로파일",
@@ -3452,6 +3687,7 @@
"ui.properties.inertia_y": "Iyx, Iyy, Iyz",
"ui.properties.inertia_z": "Izx, Izy, Izz",
"ui.properties.measuring": "측정 중…",
"ui.properties.measuring_bodies": "측정 중… 바디 {total}개 중 {done}개",
"ui.properties.measuring_failed": "측정이 끝나기 전에 중단되었습니다.",
"ui.properties.principal_axis": "주축 {number}",
"ui.properties.principal_moments": "주관성 모멘트",
@@ -3513,6 +3749,7 @@
"ui.selectOther": "기타 선택…",
"ui.selectTangentChain": "접선 체인 선택",
"ui.select_all": "모두 선택",
"ui.select_components_by_face": "구성요소 선택(면을 클릭하면 해당 구성요소 선택)",
"ui.selection": "선택",
"ui.selection_modifiers": "선택 보조 키",
"ui.selection_shift_add_only": "Shift+클릭은 추가만 함",
@@ -3641,10 +3878,19 @@
"ui.view_centre": "뷰 중심",
"ui.viewport_status_clear": "{name} 끄기",
"ui.viewport_status_clear_hint": "{name} 끄기 · Esc",
"ui.viewport_status_edges": "모서리 {count}개",
"ui.viewport_status_from": "{direction} 방향에서",
"ui.viewport_status_key": "{name} 범례 표시",
"ui.viewport_status_minimum_radius": "최소 반지름",
"ui.viewport_status_pairs": "{count}쌍",
"ui.viewport_status_section_hatch": "{setting} · 해칭",
"ui.viewport_status_section_plane": "현재 평면",
"ui.viewport_status_section_tilted": "기울어짐 · {offset}",
"ui.viewport_status_stripes": "줄무늬 {count}개",
"ui.viewport_status_summary_clear": "모두 끄기",
"ui.viewport_status_summary_heading": "이 뷰에서",
"ui.viewport_status_summary_label": "{name} 외 {count}개 항목",
"ui.viewport_status_summary_more": "+{count}",
"ui.viewport_theme_follow": "테마 따르기",
"ui.visual_shaded_hidden_edges": "음영 처리 및 숨겨진 모서리",
"ui.visual_shaded_with_edges": "음영 처리 및 모서리",
@@ -3676,7 +3922,9 @@
"update.button": "업데이트",
"update.button_version": "{version}(으)로 업데이트",
"update.check_automatically": "업데이트 자동 확인",
"update.check_for_updates": "업데이트 확인",
"update.check_now": "지금 확인",
"update.check_unavailable": "이 설치에서는 업데이트를 확인할 수 없습니다.",
"update.checking": "확인 중…",
"update.copy": "복사",
"update.dmg_opened": "디스크 이미지를 확인하고 열었습니다: SolidCraft를 응용 프로그램 폴더로 끌어 기존 버전을 바꾼 뒤 SolidCraft를 다시 시작하세요.",
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1183 -1
View File
File diff suppressed because it is too large Load Diff
+26
View File
@@ -606,6 +606,8 @@
"cmd.appearance_library": "Biblioteca de aparências",
"cmd.appearance_list": "Listar aparências",
"cmd.assembly_bom": "Lista de materiais",
"cmd.assembly_mass_properties": "Propriedades de massa",
"cmd.body.print_face": "Face de impressão",
"cmd.body_rename": "Renomear corpo",
"cmd.browser_group": "Novo grupo",
"cmd.browser_move": "Mover itens do navegador",
@@ -815,6 +817,16 @@
"cmd.sheet_refold": "Redobrar",
"cmd.sheet_rules": "Listar regras de chapa metálica",
"cmd.sheet_unfold": "Desdobrar",
"cmd.sketch.construction_line": "Reta de construção",
"cmd.sketch.construction_line.angle": "Reta de construção em ângulo",
"cmd.sketch.construction_line.bisector": "Bissetriz",
"cmd.sketch.construction_line.horizontal": "Reta de construção horizontal",
"cmd.sketch.construction_line.parallel": "Reta de construção paralela",
"cmd.sketch.construction_line.perpendicular": "Reta de construção perpendicular",
"cmd.sketch.construction_line.tangent_at": "Tangente em um ponto da curva",
"cmd.sketch.construction_line.tangent_external": "Tangente por um ponto externo",
"cmd.sketch.construction_line.tangent_two": "Tangente comum",
"cmd.sketch.construction_line.vertical": "Reta de construção vertical",
"cmd.sketch_arc_center_point": "Arco por ponto central",
"cmd.sketch_arc_tangent": "Arco tangente",
"cmd.sketch_arc_three_point": "Arco por 3 pontos",
@@ -1282,6 +1294,8 @@
"prefs.orientation": "Orientação",
"prefs.overall_speed": "Velocidade geral",
"prefs.preview_choices": "Prévia das suas escolhas",
"prefs.print_face_highlight": "Destaque da face de impressão",
"prefs.print_face_highlight_tip": "Intensidade da cor e do contorno da face de impressão de um corpo na vista. 0 % não mostra destaque.",
"prefs.quality_default": "padrão",
"prefs.quality_fastest": "mais rápido",
"prefs.quality_slowest": "mais lento",
@@ -1561,6 +1575,8 @@
"ui.3d_mouse_step_twist_counterclockwise": "Gire a tampa no sentido anti-horário, segure e solte.",
"ui.3d_mouse_switch_cap": "Calibrar como retorno ao centro",
"ui.3d_mouse_switch_trackball": "Calibrar como trackball",
"ui.3d_mouse_use_direct": "Usar driver direto",
"ui.3d_mouse_use_direct_tip": "Ler o mouse 3D diretamente (hidraw) em vez de pelo spacenavd.",
"ui.3d_mouse_view_axis": "Eixo da vista",
"ui.3d_mouse_view_off": "Desligado",
"ui.3d_mouse_view_off_tip": "O perfil do driver do mouse 3D desliga este eixo, então o movimento dele não move a vista. Escolher aqui o movimento de outro eixo troca os dois, e esse movimento deixa de mover a vista.",
@@ -1830,6 +1846,7 @@
"ui.circle": "Círculo",
"ui.circular_pattern": "Padrão circular",
"ui.clear": "Limpar",
"ui.clear_print_face": "Limpar face de impressão",
"ui.clear_recent": "Limpar recentes",
"ui.clear_the_selection": "Limpar a seleção",
"ui.click_selects_whole_bodies": "O clique seleciona corpos inteiros",
@@ -1864,6 +1881,7 @@
"ui.constant": "Constante",
"ui.constraints_conflict": "Restrições em conflito",
"ui.construction": "Construção",
"ui.construction.ribbon_label": "Linhas aux.",
"ui.context_menu": "Menu de contexto",
"ui.continuity_g0": "G0 vinco",
"ui.continuity_g1": "G1 tangente",
@@ -2074,6 +2092,7 @@
"ui.infinite": "Infinita",
"ui.insert": "Inserir",
"ui.inspect": "Inspecionar",
"ui.instances": "Instâncias",
"ui.intersect": "Interseção",
"ui.isolate": "Isolar",
"ui.join": "Unir",
@@ -2187,6 +2206,11 @@
"ui.polygon": "Polígono",
"ui.preferences": "Preferências",
"ui.press_a_key": "pressione uma tecla…",
"ui.print_face_body_not_sent": "O corpo dessa face não está sendo enviado: adicione-o primeiro a Corpos",
"ui.print_face_cleared": "{body}: face de impressão removida",
"ui.print_face_input": "Face de impressão",
"ui.print_face_pick": "Selecione uma face plana de um corpo sólido para torná-la a face de impressão",
"ui.print_face_set": "{body}: face de impressão definida; Enviar ao fatiador apoia o corpo sobre ela",
"ui.profile": "Perfil",
"ui.profile_plane": "Plano do perfil",
"ui.profiles": "Perfis",
@@ -2377,7 +2401,9 @@
"update.button": "Atualizar",
"update.button_version": "Atualizar para {version}",
"update.check_automatically": "Verificar atualizações automaticamente",
"update.check_for_updates": "Verificar atualizações",
"update.check_now": "Verificar agora",
"update.check_unavailable": "A verificação de atualizações não está disponível para esta instalação.",
"update.checking": "Verificando…",
"update.copy": "Copiar",
"update.dmg_opened": "A imagem de disco está aberta e verificada: arraste o SolidCraft para Aplicativos, substituindo a cópia antiga, e reinicie o SolidCraft.",
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+151 -21
View File
@@ -20,6 +20,7 @@ struct U {
sel: vec4<f32>, // xyz a whole selected body's colour before lighting
product_lights_meta: vec4<f32>, // explicit preview flag and bounded count
product_lights: array<vec4<f32>,84>, // position/kind, radiance, axis/cone, attenuation
sky: vec4<f32>, // xyz = world up; w = 1: shade in linear light with a sky fill (#7974)
};
fn reversed() -> bool {
@@ -243,6 +244,44 @@ fn pushed(z: f32) -> f32 {
return clamp(z - select(-push, push, reversed()), 0.0, 1.0);
}
/// A far wall seen through the cut where another body's face lying on it was drawn in front of
/// it (a shaft in its bore, #9407): its cap colour again, at its depth pulled toward the eye by
/// `touch_depth`, so it wins over that face, which is faceted another way.
@fragment
fn fs_solid_touch(i: TOut, @builtin(front_facing) front: bool) -> CutOut {
var o: CutOut;
// Derivatives (in `touch_depth`) first, before `solid` may discard.
o.depth = touch_depth(i.wp, i.pos.z);
o.c = solid(i, front);
return o;
}
@fragment
fn fs_solid_touch_flat(i: FOut, @builtin(front_facing) front: bool) -> CutOut {
let t = flat_fragment(i, front);
var o: CutOut;
o.depth = touch_depth(t.wp, t.pos.z);
o.c = solid(t, front);
return o;
}
/// The depth of `wp` (depth `z`) pulled toward the eye by what may part two faceted copies of
/// one surface: 3 pixels' width along the view ray (display refinement keeps a facet's sag about
/// a pixel) and 2 pixels of the face's own depth slope (more where it turns from the eye).
fn touch_depth(wp: vec3<f32>, z: f32) -> f32 {
let px = min(length(dpdx(wp)), length(dpdy(wp)));
let slope = max(abs(dpdx(z)), abs(dpdy(z)));
var dir = -u.back.xyz;
if (u.eye.w > 0.5) { dir = wp - u.eye.xyz; }
let len = length(dir);
if (len < 1e-12) { return z; }
let c = u.vp * vec4<f32>(wp - dir * (3.0 * px / len), 1.0);
if (c.w <= 0.0) { return z; }
let pulled = c.z / c.w;
if (reversed()) { return clamp(max(pulled, z) + 2.0 * slope, 0.0, 1.0); }
return clamp(min(pulled, z) - 2.0 * slope, 0.0, 1.0);
}
/// Depth of the section plane on the view ray through `wp` (a far wall seen through the cut),
/// never behind the wall itself (`z`).
fn cap_depth(wp: vec3<f32>, z: f32) -> f32 {
@@ -385,8 +424,13 @@ fn analysis(i: TOut, k: f32) -> vec4<f32> {
let r = reflect(-v, n);
var side = cross(v, vec3<f32>(0.0, 0.0, 1.0));
if (length(side) < 1e-3) { side = vec3<f32>(1.0, 0.0, 0.0); }
let s = sin(dot(r, normalize(side)) * u.ana.y * 3.14159265);
let c = select(0.08, 0.95, s > 0.0);
let x = dot(r, normalize(side));
let s = sin(x * u.ana.y * 3.14159265);
// A face whose normal lies in the upright plane through the view (every horizontal
// face) reflects straight ahead: its sideways part is zero, on the edge between a black
// and a white stripe, and rounding picked one or the other from frame to frame while
// the view turned (#2153). Straight ahead is white.
let c = select(0.08, 0.95, s > 0.0 || abs(x) < 1e-4);
return out_color(vec4<f32>(vec3<f32>(c), 1.0));
}
if (u.ana.x > 4.5) {
@@ -507,6 +551,31 @@ fn lit(i: TOut, visibility: f32) -> vec4<f32> {
return lit_color(i, visibility, i.c);
}
/// sRGB to linear light, exact (the straight segment too, which `to_linear` leaves out).
fn srgb_decode(c: vec3<f32>) -> vec3<f32> {
return select(c / 12.92, pow((c + vec3<f32>(0.055)) / vec3<f32>(1.055), vec3<f32>(2.4)), c > vec3<f32>(0.04045));
}
fn srgb_encode(c: vec3<f32>) -> vec3<f32> {
let l = clamp(c, vec3<f32>(0.0), vec3<f32>(1.0));
return select(l * 12.92, 1.055 * pow(l, vec3<f32>(1.0 / 2.4)) - vec3<f32>(0.055), l > vec3<f32>(0.0031308));
}
/// The studio light summed in linear light, encoded once (#7974): the key and the eye fill as in
/// [`lit_color`], over a sky fill that grows as the face turns up, and the 4% every dielectric
/// reflects of that sky (a little more toward grazing), so a near-black face keeps a gradient. The sky
/// and the fill are what ambient occlusion (`visibility`) takes away. sRGB out.
fn sky_lit(base: vec3<f32>, n: vec3<f32>, diff: f32, fill: f32, visibility: f32) -> vec3<f32> {
let up = dot(n, normalize(u.sky.xyz)) * 0.5 + 0.5;
let sky = mix(0.18, 0.42, up);
// Schlick's rise toward grazing, tempered so mid-tones only gain a soft rim.
let fresnel = 0.04 + 0.2 * pow(1.0 - fill, 5.0);
let albedo = srgb_decode(base);
// Scaled so light and mid-grey faces land near where the sRGB shading puts them.
let light = albedo * (0.41 * diff + (0.66 * sky + 0.2 * fill) * visibility) + vec3<f32>(fresnel * sky * visibility);
return srgb_encode(light);
}
/// [`lit`] in a colour of its own: a whole highlighted body is lit in its colour lifted by the
/// hover amount, or in the selection colour, from the model's own plan triangles.
fn lit_color(i: TOut, visibility: f32, base: vec4<f32>) -> vec4<f32> {
@@ -533,6 +602,9 @@ fn lit_color(i: TOut, visibility: f32, base: vec4<f32>) -> vec4<f32> {
let fill = max(dot(n, v), 0.0);
let h = normalize(key + v);
let spec = pow(max(dot(n, h), 0.0), 40.0) * 0.25;
if u.sky.w > 0.5 {
return out_color(vec4<f32>(min(sky_lit(base.rgb, n, diff, fill, visibility) + vec3<f32>(spec), vec3<f32>(1.0)), base.a));
}
let k = 0.42 + 0.38 * diff + 0.25 * fill - (0.42 + 0.25 * fill) * (1.0 - visibility);
return out_color(vec4<f32>(min(base.rgb * k + vec3<f32>(spec), vec3<f32>(1.0)), base.a));
}
@@ -697,38 +769,96 @@ fn fs_line_all(i: LOut) -> @location(0) vec4<f32> {
return out_color(i.c);
}
// Point clouds: each point is a round dot a few pixels across, facing the screen, depth-tested
// and written like the model's faces, so the model hides the points behind it and they hide it.
// The colour's alpha carries the dot's size (eighths of a pixel).
// Point clouds (`view/clouds.rs`): each point is a round dot a few pixels across, facing the
// screen, depth-tested and written like the model's faces, so the model hides the points behind
// it and they hide it. The cloud's style colours them by their own colour, a ramp or a palette,
// and shows only those whose filtered values lie in its ranges or sets.
struct POut {
struct Cloud {
style: vec4<f32>, // x: colour (0 own, 1 ramp, 2 palette), y: dot size (px), z, w: ramp range
filters: array<vec4<f32>, 4>, // x: kind (0 off, 1 range y…z, 2 whole values y + i for the bits i of w)
};
@group(1) @binding(3) var<uniform> cloud: Cloud;
struct CIn {
@location(0) p: vec3<f32>,
@location(1) v: f32,
@location(2) f: vec4<f32>,
@location(3) rgb: vec4<f32>,
};
struct COut {
@builtin(position) pos: vec4<f32>,
@location(0) c: vec4<f32>,
@location(1) wp: vec3<f32>,
@location(2) at: vec2<f32>,
@location(0) wp: vec3<f32>,
@location(1) v: f32,
@location(2) f: vec4<f32>,
@location(3) rgb: vec3<f32>,
@location(4) at: vec2<f32>, // the place on its disc
@location(5) @interpolate(flat) has: u32,
};
@vertex
fn vs_point(@builtin(vertex_index) vi: u32, @location(0) p: vec3<f32>, @location(1) c: vec4<f32>) -> POut {
fn vs_cloud_dot(@builtin(vertex_index) vi: u32, i: CIn) -> COut {
var xs = array<f32, 6>(-1.0, 1.0, 1.0, -1.0, 1.0, -1.0);
var ys = array<f32, 6>(-1.0, -1.0, 1.0, -1.0, 1.0, 1.0);
let at = vec2<f32>(xs[vi], ys[vi]);
let size = max(c.a * 255.0 / 8.0, 1.0);
let centre = u.vp * vec4<f32>(p, 1.0);
let half = u.screen.xy * 0.5;
var o: POut;
o.pos = vec4<f32>(centre.xy + at * size * 0.5 / half * centre.w, centre.z, centre.w);
let size = max(cloud.style.y, 1.0);
let centre = u.vp * vec4<f32>(i.p, 1.0);
var o: COut;
o.pos = vec4<f32>(centre.xy + at * size / u.screen.xy * centre.w, centre.z, centre.w);
// Behind the eye: nothing.
if (near_z(centre) < 0.0) { o.pos = vec4<f32>(0.0, 0.0, 0.0, -1.0); }
o.c = vec4<f32>(c.rgb, 1.0);
o.wp = p;
o.wp = i.p;
o.v = i.v;
o.f = i.f;
o.rgb = i.rgb.rgb;
o.has = u32(round(i.rgb.a * 255.0));
// Dots under two pixels are squares: a disc that small loses its centre pixel.
o.at = at * select(1.0, 0.0, size < 2.0);
return o;
}
@fragment
fn fs_point(i: POut) -> @location(0) vec4<f32> {
if (clipped(i.wp) || dot(i.at, i.at) > 1.0) { discard; }
return out_color(i.c);
/// Whether filter `f` keeps the value `v`.
fn cloud_keeps(f: vec4<f32>, v: f32) -> bool {
if (f.x < 0.5) { return true; }
if (f.x < 1.5) { return v >= f.y && v <= f.z; }
let k = i32(round(v)) - i32(round(f.y));
return k >= 0 && k < 32 && ((bitcast<u32>(f.w) >> u32(k)) & 1u) != 0u;
}
fn cloud_ramp(t: f32) -> vec3<f32> {
var stops = array<vec3<f32>, 5>(
vec3<f32>(40.0, 70.0, 200.0), vec3<f32>(30.0, 170.0, 230.0), vec3<f32>(60.0, 200.0, 90.0),
vec3<f32>(240.0, 220.0, 60.0), vec3<f32>(230.0, 70.0, 50.0));
let k = clamp(t, 0.0, 1.0) * 4.0;
let j = min(u32(k), 3u);
return mix(stops[j], stops[j + 1u], k - f32(j)) / 255.0;
}
fn cloud_palette(v: f32) -> vec3<f32> {
var colours = array<vec3<f32>, 10>(
vec3<f32>(240.0, 140.0, 40.0), vec3<f32>(245.0, 205.0, 65.0), vec3<f32>(230.0, 65.0, 65.0),
vec3<f32>(165.0, 75.0, 190.0), vec3<f32>(65.0, 190.0, 115.0), vec3<f32>(75.0, 150.0, 220.0),
vec3<f32>(240.0, 120.0, 180.0), vec3<f32>(140.0, 105.0, 75.0), vec3<f32>(120.0, 215.0, 215.0),
vec3<f32>(190.0, 190.0, 80.0));
if (v < -0.5) { return vec3<f32>(150.0, 160.0, 176.0) / 255.0; }
return colours[u32(round(v)) % 10u] / 255.0;
}
@fragment
fn fs_cloud(o: COut) -> @location(0) vec4<f32> {
var out = clipped(o.wp) || dot(o.at, o.at) > 1.0;
for (var k = 0u; k < 4u; k++) {
out = out || (((o.has >> k) & 1u) != 0u && !cloud_keeps(cloud.filters[k], o.f[k]));
}
if (out) { discard; }
var c = o.rgb;
let mode = cloud.style.x;
if ((o.has & 16u) != 0u && mode > 1.5) {
c = cloud_palette(o.v);
} else if ((o.has & 16u) != 0u && mode > 0.5) {
c = cloud_ramp((o.v - cloud.style.z) / max(cloud.style.w - cloud.style.z, 1e-12));
}
return out_color(vec4<f32>(c, 1.0));
}
+42
View File
@@ -226,6 +226,28 @@ impl Tokens {
dialog_label: Color32::from_rgb(58, 70, 86),
selected_ink: Color32::from_rgb(26, 80, 127),
selected_bg: Color32::from_rgb(232, 241, 250),
figure_ground: Color32::from_rgb(247, 248, 250),
figure_line: Color32::from_rgb(111, 124, 143),
figure_face_top: Color32::from_rgb(255, 255, 255),
figure_face_left: Color32::from_rgb(228, 233, 240),
figure_face_right: Color32::from_rgb(201, 210, 222),
figure_card: Color32::from_rgb(255, 255, 255),
figure_white: Color32::WHITE,
figure_black: Color32::BLACK,
figure_accent: Color32::from_rgb(35, 110, 173),
figure_reference: Color32::from_rgb(138, 83, 0),
figure_axis_x: Color32::from_rgb(214, 69, 69),
figure_axis_y: Color32::from_rgb(46, 158, 91),
figure_axis_z: Color32::from_rgb(47, 111, 208),
figure_ok: Color32::from_rgb(47, 125, 91),
figure_warn: Color32::from_rgb(201, 138, 0),
pref_well: Color32::from_rgb(238, 241, 245),
pref_note: Color32::from_rgb(184, 74, 0),
pref_note_fill: Color32::from_rgb(251, 235, 221),
pref_on_accent: Color32::from_rgb(255, 255, 255),
pref_ok: Color32::from_rgb(39, 107, 44),
pref_ok_fill: Color32::from_rgb(229, 242, 230),
pref_disabled: Color32::from_rgb(138, 148, 163),
timeline_item: Color32::WHITE,
timeline_item_error: Color32::from_rgb(250, 220, 220),
timeline_marker: Color32::from_rgb(70, 76, 88),
@@ -345,6 +367,26 @@ impl Tokens {
t.dialog_label = t.text;
t.selected_ink = Color32::from_rgb(156, 199, 245);
t.selected_bg = Color32::from_rgb(42, 70, 110);
t.figure_ground = Color32::from_rgb(28, 31, 38);
t.figure_line = Color32::from_rgb(163, 174, 194);
t.figure_face_top = Color32::from_rgb(107, 119, 144);
t.figure_face_left = Color32::from_rgb(81, 91, 114);
t.figure_face_right = Color32::from_rgb(57, 66, 86);
t.figure_card = Color32::from_rgb(47, 52, 62);
t.figure_accent = Color32::from_rgb(140, 190, 245);
t.figure_reference = Color32::from_rgb(232, 194, 74);
t.figure_axis_x = Color32::from_rgb(242, 122, 122);
t.figure_axis_y = Color32::from_rgb(98, 212, 142);
t.figure_axis_z = Color32::from_rgb(108, 168, 247);
t.figure_ok = Color32::from_rgb(127, 209, 174);
t.figure_warn = Color32::from_rgb(232, 194, 74);
t.pref_well = Color32::from_rgb(47, 52, 62);
t.pref_note = Color32::from_rgb(240, 162, 122);
t.pref_note_fill = Color32::from_rgb(74, 51, 38);
t.pref_on_accent = Color32::from_rgb(15, 22, 32);
t.pref_ok = Color32::from_rgb(127, 209, 174);
t.pref_ok_fill = Color32::from_rgb(31, 58, 49);
t.pref_disabled = Color32::from_rgb(138, 148, 163);
t.construction_geom = icon_primary(crate::icon_svg::CONSTRUCTION_PRIMARY[1]);
t.error = Color32::from_rgb(240, 100, 96);
t.sketch_conflict = t.error;
@@ -1,171 +0,0 @@
{
"order": 20,
"provenance": "Original SolidCraft mapping of Gruvbox (MIT palette)",
"format": "solidcraft-theme/1",
"name": "Gruvbox Dark Hard",
"base": "dark",
"colors": {
"app_bar": "#141617",
"toolbar": "#1d2021",
"panel": "#1d2021",
"panel_header": "#3c3836",
"border": "#504945",
"text": "#ebdbb2",
"text_dim": "#a89984",
"accent": "#83a598",
"accent_soft": "#414f4b",
"sketch_accent": "#a1a322",
"error": "#fb4934",
"warning": "#fabd2f",
"icon": "#d5c4a1",
"timeline": "#141617",
"hover": "#46403e",
"sel_face": "#458588",
"sel_edge": "#83a598",
"sel_edge_rim": "#aec4bc",
"sel_profile": "#076678",
"sel_profile_edge": "#458588",
"hover_profile": "#83a59830",
"hover_profile_edge": "#83a598",
"sel_vertex": "#83a598",
"origin_plane": "#fe801950",
"origin_plane_edge": "#d65d0ec8",
"origin_plane_hover": "#83a59896",
"origin_point": "#d5c4a1",
"axis_x": "#fb4934",
"axis_y": "#b8bb26",
"axis_z": "#83a598",
"construction_plane": "#fe801940",
"construction_geom": "#e97926",
"body": "#a89984",
"body_edge": "#141617",
"manipulator": "#83a598",
"preview_add": "#83a598",
"preview_new": "#fabd2f",
"preview_sketch": "#b8bb26",
"preview_cut": "#fb49346e",
"cube_face": "#ebdbb2",
"cube_border": "#665c54",
"cube_text": "#282828",
"cube_hover": "#83a598",
"viewport_top": "#2c2c2c",
"viewport_bottom": "#2c2c2c",
"grid": "#443f3c",
"grid_major": "#504945",
"body_selected": "#83a598",
"sketch": "#83a598",
"sketch_fixed": "#ebdbb2",
"sketch_halo": "#141617",
"sketch_locked": "#b8bb26",
"dimension": "#fabd2f",
"dimension_driven": "#b57614",
"sketch_point": "#ebdbb2",
"sketch_point_free": "#83a598",
"dialog_bg": "#3c3836",
"dialog_border": "#504945",
"chip": "#458588",
"section_cap": "#d65d0e",
"profile_fill": "#83a59828",
"glyph_bg": "#2c2c2c",
"glyph_edge": "#fe614c",
"glyph_text": "#fe614c",
"overlay": "#1d2021f0",
"rubber_band": "#83a598",
"app_bar_text": "#ebdbb2",
"app_bar_hover": "#ebdbb21c",
"timeline_item": "#3c3836",
"timeline_item_error": "#63221f",
"timeline_marker": "#bdae93",
"field": "#141617",
"box_window": "#83a598",
"box_crossing": "#b8bb26",
"sketch_projected": "#d3869b",
"sketch_lost": "#fb4934",
"sketch_construction": "#fe8019",
"sketch_centerline": "#d65d0e",
"bend_up": "#b8bb26",
"bend_down": "#fe8019",
"interference": "#fb4934",
"icons.agent": "#d3869b",
"surface_fill": "#fe9755",
"surface_soft": "#382c20",
"surface_ink": "#fe8019",
"surface_accent": "#e97926",
"mesh_fill": "#e1ab32",
"mesh_soft": "#383323",
"mesh_ink": "#fabd2f",
"mesh_accent": "#c39429",
"form_fill": "#ea9bb0",
"form_soft": "#332c30",
"form_tab_ink": "#d3869b",
"form_accent": "#cf8297",
"sheet_fill": "#93c681",
"sheet_soft": "#2b332c",
"sheet_ink": "#8ec07c",
"render_fill": "#fc9483",
"render_soft": "#382523",
"render_ink": "#fb5d4a",
"render_accent": "#fe614c",
"sketch_soft": "#303322",
"sketch_ink": "#b8bb26",
"form_ink": "#ebdbb2",
"form_dim": "#bdae93",
"form_primary": "#83a598",
"form_error": "#fb4934",
"form_error_fill": "#63221f",
"form_success": "#b8bb26",
"form_success_fill": "#343a28",
"dialog_body": "#1d2021",
"dialog_footer": "#3c3836",
"dialog_rule": "#504945",
"control_fill": "#141617",
"control_border": "#7c6f64",
"dialog_label": "#ebdbb2",
"selected_ink": "#ebdbb2",
"selected_bg": "#414f4b",
"on_accent": "#1d2021"
},
"icon_palette": {
"ink": "#141617",
"line": "#d5c4a1",
"passive-1": "#c5c0b8",
"passive-2": "#9a948d",
"passive-3": "#706b64",
"guide": "#a89984",
"solid": [
"#b8dbcd",
"#9bbeb1",
"#83a598"
],
"surface": [
"#fcc4a3",
"#fe9755",
"#e97926"
],
"mesh": [
"#fbca67",
"#e1ab32",
"#c39429"
],
"form": [
"#fbbfce",
"#ea9bb0",
"#cf8297"
],
"sketch": [
"#d7db50",
"#babd2a",
"#a1a322"
],
"constraint": [
"#fcc2b7",
"#fc9483",
"#fe614c"
],
"construction": [
"#fcc4a3",
"#fe9755",
"#e97926"
]
}
}
@@ -1,172 +0,0 @@
{
"order": 30,
"provenance": "Original SolidCraft mapping of Gruvbox (MIT palette)",
"format": "solidcraft-theme/1",
"name": "Gruvbox Dark Soft",
"base": "dark",
"colors": {
"app_bar": "#1d2021",
"toolbar": "#32302f",
"panel": "#32302f",
"panel_header": "#3c3836",
"border": "#504945",
"text": "#ebdbb2",
"text_dim": "#a89984",
"accent": "#83a598",
"accent_soft": "#4e5954",
"selected_ink": "#ebdbb2",
"sketch_accent": "#a1a322",
"error": "#fb4934",
"warning": "#fabd2f",
"icon": "#d5c4a1",
"timeline": "#1d2021",
"hover": "#46403e",
"sel_face": "#458588",
"sel_edge": "#83a598",
"sel_edge_rim": "#aec4bc",
"sel_profile": "#076678",
"sel_profile_edge": "#458588",
"hover_profile": "#83a59830",
"hover_profile_edge": "#83a598",
"sel_vertex": "#83a598",
"origin_plane": "#fe801950",
"origin_plane_edge": "#d65d0ec8",
"origin_plane_hover": "#83a59896",
"origin_point": "#d5c4a1",
"axis_x": "#fb4934",
"axis_y": "#b8bb26",
"axis_z": "#83a598",
"construction_plane": "#fe801940",
"construction_geom": "#e97926",
"body": "#a89984",
"body_edge": "#1d2021",
"manipulator": "#83a598",
"preview_add": "#83a598",
"preview_new": "#fabd2f",
"preview_sketch": "#b8bb26",
"preview_cut": "#fb49346e",
"cube_face": "#ebdbb2",
"cube_border": "#665c54",
"cube_text": "#282828",
"cube_hover": "#83a598",
"viewport_top": "#373432",
"viewport_bottom": "#373432",
"grid": "#443f3c",
"grid_major": "#504945",
"body_selected": "#83a598",
"sketch": "#83a598",
"sketch_fixed": "#ebdbb2",
"sketch_halo": "#1d2021",
"sketch_locked": "#b8bb26",
"dimension": "#fabd2f",
"dimension_driven": "#b57614",
"sketch_point": "#ebdbb2",
"sketch_point_free": "#83a598",
"dialog_bg": "#3c3836",
"dialog_border": "#504945",
"chip": "#458588",
"section_cap": "#d65d0e",
"profile_fill": "#83a59828",
"glyph_bg": "#373432",
"glyph_edge": "#fe614c",
"glyph_text": "#fe614c",
"overlay": "#32302ff0",
"rubber_band": "#83a598",
"app_bar_text": "#ebdbb2",
"app_bar_hover": "#ebdbb21c",
"timeline_item": "#3c3836",
"timeline_item_error": "#702b28",
"timeline_marker": "#bdae93",
"field": "#1d2021",
"box_window": "#83a598",
"box_crossing": "#b8bb26",
"sketch_projected": "#d3869b",
"sketch_lost": "#fb4934",
"sketch_construction": "#fe8019",
"sketch_centerline": "#d65d0e",
"bend_up": "#b8bb26",
"bend_down": "#fe8019",
"interference": "#fb4934",
"icons.agent": "#d3869b",
"surface_fill": "#fe9755",
"surface_soft": "#4a3a2c",
"surface_ink": "#fe8b2e",
"surface_accent": "#e97926",
"mesh_fill": "#e1ab32",
"mesh_soft": "#4a412f",
"mesh_ink": "#fabd2f",
"mesh_accent": "#c39429",
"form_fill": "#ea9bb0",
"form_soft": "#453a3c",
"form_tab_ink": "#d996a8",
"form_accent": "#cf8297",
"sheet_fill": "#93c681",
"sheet_soft": "#3d4138",
"sheet_ink": "#8ec07c",
"render_fill": "#fc9483",
"render_soft": "#4a3330",
"render_ink": "#fc7e6f",
"render_accent": "#fe614c",
"sketch_soft": "#42412e",
"sketch_ink": "#b8bb26",
"form_ink": "#ebdbb2",
"form_dim": "#bdae93",
"form_primary": "#83a598",
"form_error": "#fb4934",
"form_error_fill": "#702b28",
"form_success": "#b8bb26",
"form_success_fill": "#343a28",
"dialog_body": "#32302f",
"dialog_footer": "#3c3836",
"dialog_rule": "#504945",
"control_fill": "#1d2021",
"control_border": "#7c6f64",
"dialog_label": "#ebdbb2",
"selected_ink": "#ebdbb2",
"selected_bg": "#4e5954",
"on_accent": "#1d2021"
},
"icon_palette": {
"ink": "#1d2021",
"line": "#d5c4a1",
"passive-1": "#c5c0b8",
"passive-2": "#9a948d",
"passive-3": "#706b64",
"guide": "#a89984",
"solid": [
"#b8dbcd",
"#9bbeb1",
"#83a598"
],
"surface": [
"#fcc4a3",
"#fe9755",
"#e97926"
],
"mesh": [
"#fbca67",
"#e1ab32",
"#c39429"
],
"form": [
"#fbbfce",
"#ea9bb0",
"#cf8297"
],
"sketch": [
"#d7db50",
"#babd2a",
"#a1a322"
],
"constraint": [
"#fcc2b7",
"#fc9483",
"#fe614c"
],
"construction": [
"#fcc4a3",
"#fe9755",
"#e97926"
]
}
}
+120 -2
View File
@@ -122,7 +122,6 @@
"control_fill": "#1d2021",
"control_border": "#7c6f64",
"dialog_label": "#ebdbb2",
"selected_ink": "#ebdbb2",
"selected_bg": "#48544f",
"on_accent": "#1d2021"
},
@@ -168,5 +167,124 @@
"#fe9755",
"#e97926"
]
}
},
"options": [
{
"id": "contrast",
"type": "choice",
"default": "standard",
"label": {
"de": "Kontrast",
"en": "Contrast",
"ja": "コントラスト",
"ko": "대비",
"zh": "对比度"
},
"help": {
"de": "Wähle die weiche, normale oder harte Gruvbox-Palette.",
"en": "Choose the soft, standard or hard Gruvbox palette.",
"ja": "Gruvboxのソフト・標準・ハードのパレットを選びます。",
"ko": "Gruvbox의 부드러운, 표준 또는 강한 팔레트를 선택합니다.",
"zh": "选择柔和、标准或强对比的 Gruvbox 配色。"
},
"values": [
{
"id": "soft",
"label": {
"de": "Weich",
"en": "Soft",
"ja": "ソフト",
"ko": "부드럽게",
"zh": "柔和"
}
},
{
"id": "standard",
"label": {
"de": "Standard",
"en": "Standard",
"ja": "標準",
"ko": "표준",
"zh": "标准"
}
},
{
"id": "hard",
"label": {
"de": "Hart",
"en": "Hard",
"ja": "ハード",
"ko": "강하게",
"zh": "强对比"
}
}
]
}
],
"overlays": [
{
"when": {
"opt": "contrast",
"eq": "soft"
},
"colors": {
"toolbar": "#32302f",
"panel": "#32302f",
"accent_soft": "#4e5954",
"viewport_top": "#373432",
"viewport_bottom": "#373432",
"glyph_bg": "#373432",
"overlay": "#32302ff0",
"timeline_item_error": "#702b28",
"surface_soft": "#4a3a2c",
"surface_ink": "#fe8b2e",
"mesh_soft": "#4a412f",
"form_soft": "#453a3c",
"form_tab_ink": "#d996a8",
"sheet_soft": "#3d4138",
"render_soft": "#4a3330",
"render_ink": "#fc7e6f",
"sketch_soft": "#42412e",
"form_error_fill": "#702b28",
"dialog_body": "#32302f",
"selected_bg": "#4e5954"
}
},
{
"when": {
"opt": "contrast",
"eq": "hard"
},
"colors": {
"app_bar": "#141617",
"toolbar": "#1d2021",
"panel": "#1d2021",
"accent_soft": "#414f4b",
"timeline": "#141617",
"body_edge": "#141617",
"viewport_top": "#2c2c2c",
"viewport_bottom": "#2c2c2c",
"sketch_halo": "#141617",
"glyph_bg": "#2c2c2c",
"overlay": "#1d2021f0",
"timeline_item_error": "#63221f",
"field": "#141617",
"surface_soft": "#382c20",
"mesh_soft": "#383323",
"form_soft": "#332c30",
"form_tab_ink": "#d3869b",
"sheet_soft": "#2b332c",
"render_soft": "#382523",
"render_ink": "#fb5d4a",
"sketch_soft": "#303322",
"form_error_fill": "#63221f",
"dialog_body": "#1d2021",
"control_fill": "#141617",
"selected_bg": "#414f4b"
},
"icon_palette": {
"ink": "#141617"
}
}
]
}
@@ -1,171 +0,0 @@
{
"order": 50,
"provenance": "Original SolidCraft mapping of Gruvbox (MIT palette)",
"format": "solidcraft-theme/1",
"name": "Gruvbox Light Hard",
"base": "light",
"colors": {
"app_bar": "#3c3836",
"toolbar": "#f9f5d7",
"panel": "#f9f5d7",
"panel_header": "#ebdbb2",
"border": "#d5c4a1",
"text": "#3c3836",
"text_dim": "#7c6f64",
"accent": "#076678",
"accent_soft": "#c9d8c4",
"sketch_accent": "#625e15",
"error": "#9d0006",
"warning": "#b57614",
"icon": "#504945",
"timeline": "#ebdbb2",
"hover": "#f1e5c1",
"sel_face": "#458588",
"sel_edge": "#076678",
"sel_edge_rim": "#83a598",
"sel_profile": "#076678",
"sel_profile_edge": "#458588",
"hover_profile": "#45858830",
"hover_profile_edge": "#458588",
"sel_vertex": "#076678",
"origin_plane": "#fe80195e",
"origin_plane_edge": "#d65d0ec8",
"origin_plane_hover": "#45858896",
"origin_point": "#d5c4a1",
"axis_x": "#cc241d",
"axis_y": "#98971a",
"axis_z": "#458588",
"construction_plane": "#fe801946",
"construction_geom": "#9b3407",
"body": "#bdae93",
"body_edge": "#3c3836",
"manipulator": "#076678",
"preview_add": "#458588",
"preview_new": "#d79921",
"preview_sketch": "#98971a",
"preview_cut": "#cc241d6e",
"cube_face": "#fbf1c7",
"cube_border": "#7c6f64",
"cube_text": "#3c3836",
"cube_hover": "#83a598",
"viewport_top": "#fbf8e3",
"viewport_bottom": "#ebdbb2",
"grid": "#d5c4a1",
"grid_major": "#bdae93",
"body_selected": "#83a598",
"sketch": "#076678",
"sketch_fixed": "#282828",
"sketch_halo": "#fbf8e3",
"sketch_locked": "#79740e",
"dimension": "#1f5c40",
"dimension_driven": "#4f7d64",
"sketch_point": "#282828",
"sketch_point_free": "#076678",
"dialog_bg": "#f9f5d7",
"dialog_border": "#d5c4a1",
"chip": "#458588",
"section_cap": "#d65d0e",
"profile_fill": "#fabd2f46",
"glyph_bg": "#fcfaeb",
"glyph_edge": "#a91714",
"glyph_text": "#a91714",
"overlay": "#f9f5d7eb",
"rubber_band": "#076678",
"app_bar_text": "#fbf1c7",
"app_bar_hover": "#fbf1c71c",
"timeline_item": "#f9f5d7",
"timeline_item_error": "#f0cbb2",
"timeline_marker": "#504945",
"field": "#fcfaeb",
"box_window": "#076678",
"box_crossing": "#79740e",
"sketch_projected": "#8f3f71",
"sketch_lost": "#9d0006",
"sketch_construction": "#af3a03",
"sketch_centerline": "#d65d0e",
"bend_up": "#79740e",
"bend_down": "#af3a03",
"interference": "#cc241d",
"icons.agent": "#8f3f71",
"surface_fill": "#df663c",
"surface_soft": "#f3e6c6",
"surface_ink": "#af3a03",
"surface_accent": "#9b3407",
"mesh_fill": "#c08024",
"mesh_soft": "#f4ebc7",
"mesh_ink": "#915e10",
"mesh_accent": "#7b5112",
"form_fill": "#c46fa2",
"form_soft": "#f1e6cf",
"form_tab_ink": "#8f3f71",
"form_accent": "#893a6c",
"sheet_fill": "#659f7a",
"sheet_soft": "#eaebcd",
"sheet_ink": "#3d7252",
"render_fill": "#e85a4d",
"render_soft": "#f2e1c6",
"render_ink": "#9d0006",
"render_accent": "#a91714",
"sketch_soft": "#efebc7",
"sketch_ink": "#6e6a0d",
"form_ink": "#3c3836",
"form_dim": "#665c54",
"form_primary": "#076678",
"form_error": "#9d0006",
"form_error_fill": "#f0cbb2",
"form_success": "#427b58",
"form_success_fill": "#dae3b6",
"dialog_body": "#f9f5d7",
"dialog_footer": "#ebdbb2",
"dialog_rule": "#d5c4a1",
"control_fill": "#fcfaeb",
"control_border": "#a89984",
"dialog_label": "#3c3836",
"selected_ink": "#3c3836",
"selected_bg": "#c9d8c4",
"on_accent": "#fbf1c7"
},
"icon_palette": {
"ink": "#3c3836",
"line": "#504945",
"passive-1": "#e9e3df",
"passive-2": "#b8b3af",
"passive-3": "#8a8581",
"guide": "#7c6f64",
"solid": [
"#87d5e9",
"#4e9caf",
"#076678"
],
"surface": [
"#feb299",
"#df663c",
"#9b3407"
],
"mesh": [
"#fcb864",
"#c08024",
"#7b5112"
],
"form": [
"#fbaad9",
"#c46fa2",
"#893a6c"
],
"sketch": [
"#d0cc73",
"#989439",
"#625e15"
],
"constraint": [
"#fab3a8",
"#e85a4d",
"#a91714"
],
"construction": [
"#feb299",
"#df663c",
"#9b3407"
]
}
}
@@ -1,171 +0,0 @@
{
"order": 60,
"provenance": "Original SolidCraft mapping of Gruvbox (MIT palette)",
"format": "solidcraft-theme/1",
"name": "Gruvbox Light Soft",
"base": "light",
"colors": {
"app_bar": "#3c3836",
"toolbar": "#f2e5bc",
"panel": "#f2e5bc",
"panel_header": "#ebdbb2",
"border": "#d5c4a1",
"text": "#3c3836",
"text_dim": "#7c6f64",
"accent": "#076678",
"accent_soft": "#c3ccae",
"sketch_accent": "#625e15",
"error": "#9d0006",
"warning": "#b57614",
"icon": "#504945",
"timeline": "#ebdbb2",
"hover": "#eedfb6",
"sel_face": "#458588",
"sel_edge": "#076678",
"sel_edge_rim": "#83a598",
"sel_profile": "#076678",
"sel_profile_edge": "#458588",
"hover_profile": "#45858830",
"hover_profile_edge": "#458588",
"sel_vertex": "#076678",
"origin_plane": "#fe80195e",
"origin_plane_edge": "#d65d0ec8",
"origin_plane_hover": "#45858896",
"origin_point": "#d5c4a1",
"axis_x": "#cc241d",
"axis_y": "#98971a",
"axis_z": "#458588",
"construction_plane": "#fe801946",
"construction_geom": "#9b3407",
"body": "#bdae93",
"body_edge": "#3c3836",
"manipulator": "#076678",
"preview_add": "#458588",
"preview_new": "#d79921",
"preview_sketch": "#98971a",
"preview_cut": "#cc241d6e",
"cube_face": "#fbf1c7",
"cube_border": "#7c6f64",
"cube_text": "#3c3836",
"cube_hover": "#83a598",
"viewport_top": "#f6edd0",
"viewport_bottom": "#ebdbb2",
"grid": "#d5c4a1",
"grid_major": "#bdae93",
"body_selected": "#83a598",
"sketch": "#076678",
"sketch_fixed": "#282828",
"sketch_halo": "#f6edd0",
"sketch_locked": "#79740e",
"dimension": "#1f5c40",
"dimension_driven": "#4f7d64",
"sketch_point": "#282828",
"sketch_point_free": "#076678",
"dialog_bg": "#f2e5bc",
"dialog_border": "#d5c4a1",
"chip": "#458588",
"section_cap": "#d65d0e",
"profile_fill": "#fabd2f46",
"glyph_bg": "#f8f2de",
"glyph_edge": "#a91714",
"glyph_text": "#a91714",
"overlay": "#f2e5bceb",
"rubber_band": "#076678",
"app_bar_text": "#fbf1c7",
"app_bar_hover": "#fbf1c71c",
"timeline_item": "#f2e5bc",
"timeline_item_error": "#eabe9c",
"timeline_marker": "#504945",
"field": "#f8f2de",
"box_window": "#076678",
"box_crossing": "#79740e",
"sketch_projected": "#8f3f71",
"sketch_lost": "#9d0006",
"sketch_construction": "#af3a03",
"sketch_centerline": "#d65d0e",
"bend_up": "#79740e",
"bend_down": "#af3a03",
"interference": "#cc241d",
"icons.agent": "#8f3f71",
"surface_fill": "#df663c",
"surface_soft": "#edd7ad",
"surface_ink": "#a83803",
"surface_accent": "#9b3407",
"mesh_fill": "#c08024",
"mesh_soft": "#eddcaf",
"mesh_ink": "#84560f",
"mesh_accent": "#7b5112",
"form_fill": "#c46fa2",
"form_soft": "#ead8b6",
"form_tab_ink": "#8f3f71",
"form_accent": "#893a6c",
"sheet_fill": "#659f7a",
"sheet_soft": "#e4ddb4",
"sheet_ink": "#38694b",
"render_fill": "#e85a4d",
"render_soft": "#ebd3ad",
"render_ink": "#9d0006",
"render_accent": "#a91714",
"sketch_soft": "#e8dcae",
"sketch_ink": "#66610c",
"form_ink": "#3c3836",
"form_dim": "#665c54",
"form_primary": "#076678",
"form_error": "#9d0006",
"form_error_fill": "#eabe9c",
"form_success": "#427b58",
"form_success_fill": "#dae3b6",
"dialog_body": "#f2e5bc",
"dialog_footer": "#ebdbb2",
"dialog_rule": "#d5c4a1",
"control_fill": "#f8f2de",
"control_border": "#a89984",
"dialog_label": "#3c3836",
"selected_ink": "#3c3836",
"selected_bg": "#c3ccae",
"on_accent": "#fbf1c7"
},
"icon_palette": {
"ink": "#3c3836",
"line": "#504945",
"passive-1": "#e9e3df",
"passive-2": "#b8b3af",
"passive-3": "#8a8581",
"guide": "#7c6f64",
"solid": [
"#87d5e9",
"#4e9caf",
"#076678"
],
"surface": [
"#feb299",
"#df663c",
"#9b3407"
],
"mesh": [
"#fcb864",
"#c08024",
"#7b5112"
],
"form": [
"#fbaad9",
"#c46fa2",
"#893a6c"
],
"sketch": [
"#d0cc73",
"#989439",
"#625e15"
],
"constraint": [
"#fab3a8",
"#e85a4d",
"#a91714"
],
"construction": [
"#feb299",
"#df663c",
"#9b3407"
]
}
}
+123 -1
View File
@@ -167,5 +167,127 @@
"#df663c",
"#9b3407"
]
}
},
"options": [
{
"id": "contrast",
"type": "choice",
"default": "standard",
"label": {
"de": "Kontrast",
"en": "Contrast",
"ja": "コントラスト",
"ko": "대비",
"zh": "对比度"
},
"help": {
"de": "Wähle die weiche, normale oder harte Gruvbox-Palette.",
"en": "Choose the soft, standard or hard Gruvbox palette.",
"ja": "Gruvboxのソフト・標準・ハードのパレットを選びます。",
"ko": "Gruvbox의 부드러운, 표준 또는 강한 팔레트를 선택합니다.",
"zh": "选择柔和、标准或强对比的 Gruvbox 配色。"
},
"values": [
{
"id": "soft",
"label": {
"de": "Weich",
"en": "Soft",
"ja": "ソフト",
"ko": "부드럽게",
"zh": "柔和"
}
},
{
"id": "standard",
"label": {
"de": "Standard",
"en": "Standard",
"ja": "標準",
"ko": "표준",
"zh": "标准"
}
},
{
"id": "hard",
"label": {
"de": "Hart",
"en": "Hard",
"ja": "ハード",
"ko": "강하게",
"zh": "强对比"
}
}
]
}
],
"overlays": [
{
"when": {
"opt": "contrast",
"eq": "soft"
},
"colors": {
"toolbar": "#f2e5bc",
"panel": "#f2e5bc",
"accent_soft": "#c3ccae",
"hover": "#eedfb6",
"viewport_top": "#f6edd0",
"sketch_halo": "#f6edd0",
"dialog_bg": "#f2e5bc",
"glyph_bg": "#f8f2de",
"overlay": "#f2e5bceb",
"timeline_item": "#f2e5bc",
"timeline_item_error": "#eabe9c",
"field": "#f8f2de",
"surface_soft": "#edd7ad",
"surface_ink": "#a83803",
"mesh_soft": "#eddcaf",
"mesh_ink": "#84560f",
"form_soft": "#ead8b6",
"sheet_soft": "#e4ddb4",
"sheet_ink": "#38694b",
"render_soft": "#ebd3ad",
"sketch_soft": "#e8dcae",
"sketch_ink": "#66610c",
"form_error_fill": "#eabe9c",
"dialog_body": "#f2e5bc",
"control_fill": "#f8f2de",
"selected_bg": "#c3ccae"
}
},
{
"when": {
"opt": "contrast",
"eq": "hard"
},
"colors": {
"toolbar": "#f9f5d7",
"panel": "#f9f5d7",
"accent_soft": "#c9d8c4",
"hover": "#f1e5c1",
"viewport_top": "#fbf8e3",
"sketch_halo": "#fbf8e3",
"dialog_bg": "#f9f5d7",
"glyph_bg": "#fcfaeb",
"overlay": "#f9f5d7eb",
"timeline_item": "#f9f5d7",
"timeline_item_error": "#f0cbb2",
"field": "#fcfaeb",
"surface_soft": "#f3e6c6",
"mesh_soft": "#f4ebc7",
"mesh_ink": "#915e10",
"form_soft": "#f1e6cf",
"sheet_soft": "#eaebcd",
"sheet_ink": "#3d7252",
"render_soft": "#f2e1c6",
"sketch_soft": "#efebc7",
"sketch_ink": "#6e6a0d",
"form_error_fill": "#f0cbb2",
"dialog_body": "#f9f5d7",
"control_fill": "#fcfaeb",
"selected_bg": "#c9d8c4"
}
}
]
}
+22 -1
View File
@@ -208,6 +208,7 @@ fn map_plane_ref(m: &Mat, p: &mut PlaneRef) {
}
PlaneRef::Midplane { .. }
| PlaneRef::TwoEdges { .. }
| PlaneRef::AxisPoint { .. }
| PlaneRef::ThreePoints { .. }
| PlaneRef::AlongPath { .. }
| PlaneRef::Perpendicular { .. } => {
@@ -418,6 +419,19 @@ impl Document {
false
}
/// Is `c` (or one of its ancestors) marked out of the History bar (#10393)? The root (0)
/// never is: its own features always show.
pub fn component_history_hidden(&self, mut c: u64) -> bool {
for _ in 0..1000 {
match self.components.iter().find(|x| x.id == c) {
Some(x) if x.history_hidden => return true,
Some(x) if x.parent != 0 => c = x.parent,
_ => return false,
}
}
false
}
/// Would putting a placement of `component` into `parent` put it inside itself: is `parent`
/// the component, or inside it, created in it or placed in it at any depth? Placements can sit
/// apart from where their component was created ([`Self::component_within`] follows only
@@ -456,7 +470,14 @@ impl Document {
let id = self.next_id.max(1);
self.next_id = id.checked_add(1).ok_or_else(|| DocError::Invalid("too many items in the design".into()))?;
let cname = self.components.iter().find(|c| c.id == component).map(|c| c.name.clone()).unwrap_or_default();
let k = self.occurrences.iter().filter(|o| o.component == component).count() + 1;
// The next number, or, when an occurrence already has that name (one before it was
// deleted, or of another component of that name), the first number none has (#9738).
let next = self.occurrences.iter().filter(|o| o.component == component).count() + 1;
let free = |k: &usize| {
let name = format!("{cname}:{k}");
!self.occurrences.iter().any(|o| o.name == name)
};
let k = std::iter::once(next).chain(1..).find(free).unwrap_or(next);
self.occurrences.push(crate::Occurrence { id, component, parent, name: format!("{cname}:{k}"), transform, grounded: false });
Ok(id)
}
+182
View File
@@ -0,0 +1,182 @@
//! The browser's groups as a tree: how deep a group sits, who holds whom, and pruning what a
//! saved design says about the browser down to what still exists.
use crate::document::{BROWSER_FOLDERS, BrowserEntry, BrowserGroup, Document, MAX_GROUP_NESTING};
use std::collections::{BTreeMap, BTreeSet};
impl Document {
pub fn browser_group(&self, id: u64) -> Option<&BrowserGroup> {
self.browser_groups.iter().find(|g| g.id == id)
}
/// The level of a group: 1 for a top-level group, 2 for a child of one, and so on. A chain
/// that loops or runs past the limit counts as one level too deep.
pub fn group_level(&self, id: u64) -> usize {
let mut level = 0;
let mut at = Some(id);
while let Some(g) = at {
level += 1;
if level > MAX_GROUP_NESTING {
return level;
}
at = self.browser_group(g).and_then(|g| g.parent);
}
level
}
/// Whether `ancestor` is `id` or holds it, at any depth.
pub fn group_within(&self, id: u64, ancestor: u64) -> bool {
let mut at = Some(id);
for _ in 0..=MAX_GROUP_NESTING {
match at {
Some(g) if g == ancestor => return true,
Some(g) => at = self.browser_group(g).and_then(|g| g.parent),
None => return false,
}
}
false
}
/// How many levels the group and the groups under it take: 1 for a group with no child group.
pub fn group_height(&self, id: u64) -> usize {
fn height(d: &Document, id: u64, left: usize) -> usize {
if left == 0 {
return 1;
}
1 + d.browser_groups.iter().filter(|g| g.parent == Some(id)).map(|g| height(d, g.id, left - 1)).max().unwrap_or(0)
}
height(self, id, MAX_GROUP_NESTING + 1)
}
/// The entries of a holder's list in display order: a group's contents, or the folder's top
/// level when `holder` is `None`. Groups the list names come where it names them. The child
/// groups it does not name (in creation order) go just after the last group it names, or
/// first when it names none, so they sit above the items as they always have. Entries for
/// groups that are not the holder's children are dropped.
pub fn ordered_entries(&self, component: u64, folder: &str, holder: Option<u64>) -> Vec<BrowserEntry> {
let listed: &[BrowserEntry] = match holder {
Some(g) => self.browser_group(g).map_or(&[], |g| &g.items),
None => self.browser_order.get(&format!("{component}/{folder}")).map_or(&[], Vec::as_slice),
};
let mine: Vec<u64> =
self.browser_groups.iter().filter(|g| g.component == component && g.folder == folder && g.parent == holder).map(|g| g.id).collect();
let mut out: Vec<BrowserEntry> = Vec::with_capacity(listed.len() + mine.len());
for e in listed {
match e {
BrowserEntry::Group(id) if !mine.contains(id) || out.contains(e) => {}
_ => out.push(e.clone()),
}
}
let at = out.iter().rposition(|e| matches!(e, BrowserEntry::Group(_))).map_or(0, |i| i + 1);
let unlisted: Vec<BrowserEntry> = mine.iter().map(|id| BrowserEntry::Group(*id)).filter(|e| !out.contains(e)).collect();
out.splice(at..at, unlisted);
out
}
/// The items in a group and in the groups inside it.
pub fn group_item_keys(&self, id: u64) -> Vec<String> {
let inside = self.browser_groups.iter().filter(|g| self.group_within(g.id, id));
inside.flat_map(|g| g.item_keys().map(str::to_string)).collect()
}
/// The group holding the item directly, in a component's folder.
pub fn group_of_item(&self, component: u64, folder: &str, key: &str) -> Option<&BrowserGroup> {
self.browser_groups.iter().find(|g| g.component == component && g.folder == folder && g.has_item(key))
}
/// Only the browser's groups and order changed (a group made, nested, moved into, ordered):
/// nothing is evaluated and no placement moves. The same whole-Document proof as
/// [`Document::differs_only_in_render`]; `next_id` may differ, as a new group takes an id.
pub fn differs_only_in_browser(&self, previous: &Document) -> bool {
if self.browser_groups == previous.browser_groups && self.browser_order == previous.browser_order {
return false;
}
let mut normalized = previous.clone();
normalized.browser_groups.clone_from(&self.browser_groups);
normalized.browser_order.clone_from(&self.browser_order);
normalized.next_id = self.next_id;
*self == normalized
}
/// What [`Document::browser_pruned`] depends on, cheaply: it can only find something to drop
/// after a feature, placement, component or group was added or removed. Ids are never
/// reused, so a removal followed by an addition still moves `next_id`.
pub fn browser_stamp(&self) -> [u64; 6] {
let n = |len: usize| u64::try_from(len).unwrap_or(u64::MAX);
[
self.next_id,
n(self.features.len()),
n(self.occurrences.len()),
n(self.components.len()),
n(self.browser_groups.len()),
n(self.browser_order.len()),
]
}
/// The groups and order lists with what they name that is gone dropped, or `None` when
/// nothing is: groups of a missing component or folder, a parent that is missing, elsewhere
/// or loops, entries for groups and sketches, construction items and placements that no
/// longer exist, repeats, and order lists of missing components. Body names are left alone:
/// only an evaluated model knows them.
pub fn browser_pruned(&self) -> Option<(Vec<BrowserGroup>, BTreeMap<String, Vec<BrowserEntry>>)> {
if self.browser_groups.is_empty() && self.browser_order.is_empty() {
return None;
}
let components: BTreeSet<u64> = self.components.iter().map(|c| c.id).collect();
let features: BTreeSet<u64> = self.features.iter().map(|f| f.id).collect();
let placed_in: BTreeMap<u64, u64> = self.occurrences.iter().map(|o| (o.id, o.parent)).collect();
let component_exists = |c: u64| c == 0 || components.contains(&c);
let placed = |component: u64, key: &str| key.parse::<u64>().ok().and_then(|o| placed_in.get(&o)) == Some(&component);
// Body names cannot be checked here; the other folders hold feature ids.
let item_exists = |folder: &str, component: u64, key: &str| match folder {
"bodies" => true,
"components" => placed(component, key),
_ => key.parse::<u64>().is_ok_and(|id| features.contains(&id)),
};
let mut groups = self.browser_groups.clone();
let mut order = self.browser_order.clone();
groups.retain(|g| component_exists(g.component) && BROWSER_FOLDERS.contains(&g.folder.as_str()));
let known: BTreeMap<u64, (u64, String)> = groups.iter().map(|g| (g.id, (g.component, g.folder.clone()))).collect();
let parents: BTreeMap<u64, Option<u64>> = groups
.iter()
.map(|g| (g.id, g.parent.filter(|p| *p != g.id && known.get(p).is_some_and(|(c, f)| *c == g.component && *f == g.folder))))
.collect();
// A loop, or a chain too deep, is cut at the group that makes it.
let too_deep = |id: u64| std::iter::successors(Some(id), |g| parents.get(g).copied().flatten()).nth(MAX_GROUP_NESTING).is_some();
let kept: BTreeMap<u64, Option<u64>> = parents.iter().map(|(id, p)| (*id, if too_deep(*id) { None } else { *p })).collect();
for g in &mut groups {
g.parent = kept[&g.id];
}
let mut taken: BTreeSet<(u64, String, String)> = BTreeSet::new();
for g in &mut groups {
let (component, folder, id) = (g.component, g.folder.clone(), g.id);
let mut seen = BTreeSet::new();
g.items.retain(|e| match e {
BrowserEntry::Group(c) => kept.get(c) == Some(&Some(id)) && seen.insert(*c),
BrowserEntry::Item(k) => item_exists(&folder, component, k) && taken.insert((component, folder.clone(), k.clone())),
});
}
let top = |c: u64, folder: &str, id: u64| kept.get(&id) == Some(&None) && known.get(&id).is_some_and(|(kc, kf)| *kc == c && kf == folder);
order.retain(|key, list| {
let Some((c, folder)) = key.split_once('/') else { return false };
let Some(c) = c.parse::<u64>().ok().filter(|c| component_exists(*c)) else { return false };
if !BROWSER_FOLDERS.contains(&folder) {
return false;
}
let mut seen = BTreeSet::new();
list.retain(|e| match e {
BrowserEntry::Group(id) => top(c, folder, *id) && seen.insert(e.clone()),
BrowserEntry::Item(k) => item_exists(folder, c, k) && seen.insert(e.clone()),
});
!list.is_empty()
});
(groups != self.browser_groups || order != self.browser_order).then_some((groups, order))
}
/// Put placements of one component in the order the browser shows them: the saved
/// `components` order, then the rest as they were.
pub fn sort_placements(&self, parent: u64, ids: &mut [u64]) {
let Some(order) = self.browser_order.get(&format!("{parent}/components")) else { return };
let rank: BTreeMap<&str, usize> = order.iter().enumerate().filter_map(|(i, e)| Some((e.as_item()?, i))).collect();
ids.sort_by_cached_key(|id| rank.get(id.to_string().as_str()).copied().unwrap_or(usize::MAX));
}
}
+4 -2
View File
@@ -15,8 +15,10 @@ pub struct Canvas {
pub name: String,
/// `png` or `jpeg`.
pub format: String,
/// The image file, base64.
pub data: String,
/// The image file, base64. Shared rather than owned: every edit clones the document (the undo
/// history keeps the old one), and an image of up to 16 MiB copied into each of the 200 undo
/// states would hold gigabytes. Serialized as the same JSON string as before.
pub data: std::sync::Arc<str>,
/// Pixel size of the image.
pub pixels: [u32; 2],
pub plane: PlaneRef,
+3 -1
View File
@@ -176,6 +176,8 @@ pub(crate) fn remap_link(
remap_link(b, ids, names, bodies, depth + 1);
}
LinkSource::Plane { name } => mapped_name(name, names),
// A construction axis, by name (#9324); the origin axes are no feature's.
LinkSource::Axis { name } if !matches!(name.as_str(), "X" | "Y" | "Z") => mapped_name(name, names),
_ => {}
}
}
@@ -314,7 +316,7 @@ fn checked_plane(p: &PlaneRef, depth: usize) -> crate::Result<()> {
checked_geo(g, depth + 1)?;
}
}
PlaneRef::Midplane { a, b } | PlaneRef::TwoEdges { a, b } => {
PlaneRef::Midplane { a, b } | PlaneRef::TwoEdges { a, b } | PlaneRef::AxisPoint { axis: a, point: b } => {
checked_geo(a, depth + 1)?;
checked_geo(b, depth + 1)?;
}
+15 -2
View File
@@ -344,10 +344,13 @@ fn model_line(st: &ModelState, g: &GeoRef) -> Result<(Vec3, Vec3)> {
_ => Err(bad("the face is not a cylinder, cone or torus")),
}
}
_ => Err(bad("pick a straight or circular edge, or a cylinder, cone or torus face")),
_ => Err(bad(MODEL_AXIS_REFS)),
}
}
/// What [`model_axis`] says about a reference that is neither an edge nor a face.
pub const MODEL_AXIS_REFS: &str = "pick a straight or circular edge, or a cylinder, cone or torus face";
/// The axis a feature turns about when an edge or face of the model is picked for it (a revolve,
/// a circular pattern, a plane at an angle), as [`model_line`] finds it. The direction is
/// oriented the same way however the edge or surface runs (its largest component positive), so
@@ -617,6 +620,16 @@ pub(crate) fn resolve_geo_plane(ctx: &Ctx, p: &PlaneRef) -> Result<Plane> {
};
Plane::new(o1, d1, n.cross(d1)).ok_or_else(degenerate)
}
PlaneRef::AxisPoint { axis, point: at } => {
let (origin, dir) = line(ctx, axis)?;
let dir = dir.normalized().ok_or_else(|| bad("the axis has no direction"))?;
let delta = point(ctx, at)? - origin;
let across = delta - dir * delta.dot(dir);
if !across.len().is_finite() || across.len() < 1e-9 {
return Err(bad("the point is on the axis: pick a point off the axis to define a unique plane"));
}
Plane::new(origin, dir, across).ok_or_else(degenerate)
}
PlaneRef::ThreePoints { a, b, c } => {
let (pa, pb, pc) = (point(ctx, a)?, point(ctx, b)?, point(ctx, c)?);
if (pb - pa).cross(pc - pa).len() < 1e-9 {
@@ -765,7 +778,7 @@ impl PlaneRef {
/// The references of a plane built from model geometry.
pub fn refs_mut(&mut self) -> Vec<&mut GeoRef> {
match self {
PlaneRef::Midplane { a, b } | PlaneRef::TwoEdges { a, b } => vec![a.as_mut(), b.as_mut()],
PlaneRef::Midplane { a, b } | PlaneRef::TwoEdges { a, b } | PlaneRef::AxisPoint { axis: a, point: b } => vec![a.as_mut(), b.as_mut()],
PlaneRef::Perpendicular { plane, line } => vec![plane.as_mut(), line.as_mut()],
PlaneRef::ThreePoints { a, b, c } => vec![a.as_mut(), b.as_mut(), c.as_mut()],
PlaneRef::Tangent { face, .. } => vec![face.as_mut()],
+345 -19
View File
@@ -97,6 +97,8 @@ pub enum PlaneRef {
Midplane { a: Box<GeoRef>, b: Box<GeoRef> },
/// Through two straight edges (lines) that lie in one plane.
TwoEdges { a: Box<GeoRef>, b: Box<GeoRef> },
/// Through a line (axis) and a point not on that line.
AxisPoint { axis: Box<GeoRef>, point: Box<GeoRef> },
/// Through three points.
ThreePoints { a: Box<GeoRef>, b: Box<GeoRef>, c: Box<GeoRef> },
/// Tangent to a face (cylinder, cone, sphere, torus) where the point `at` lies over it.
@@ -1083,6 +1085,11 @@ pub enum FeatureKind {
/// bodies follow. Replaces `to`.
#[serde(default, skip_serializing_if = "Option::is_none")]
to_plane: Option<PlaneRef>,
/// Point-to-point alignment: the directions the offset moves along (the chosen world
/// X/Y/Z axes in the frame of the bodies being moved). `None`: all three axes, the
/// offset in full.
#[serde(default, skip_serializing_if = "Option::is_none")]
axes: Option<Vec<Dir>>,
},
/// A helical coil: a circular or square section swept `turns` times about `axis`, rising
/// `pitch` per turn, on a helix of `diameter` (the section's centre, or its inside or outside).
@@ -2014,7 +2021,7 @@ fn fair_keep_edges() -> bool {
/// Triangles of one imported mesh body (millimetres). The arrays are shared by clones: every
/// edit keeps the design as it was for undo, and a scanned part's triangles (hundreds of
/// megabytes) are not copied for that.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct MeshData {
pub name: String,
/// x, y, z per vertex.
@@ -2025,6 +2032,20 @@ pub struct MeshData {
pub color: Option<[f32; 3]>,
}
/// The same mesh: shared arrays are the same without reading them, so the dirty check and
/// autosave after an edit elsewhere do not walk a scan's millions of coordinates. Arrays that
/// are not shared compare value by value, as before. Coordinates are finite (a design that
/// holds others does not load), so the shortcut only skips work.
impl PartialEq for MeshData {
fn eq(&self, other: &Self) -> bool {
use std::sync::Arc;
self.name == other.name
&& self.color == other.color
&& (Arc::ptr_eq(&self.triangles, &other.triangles) || self.triangles == other.triangles)
&& (Arc::ptr_eq(&self.positions, &other.positions) || self.positions == other.positions)
}
}
/// Points of a sketch, by id.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, solidcraft_derive::Walk)]
pub struct SketchPoints {
@@ -2062,6 +2083,11 @@ pub struct Component {
/// Free text properties of the definition (material grade, finish, supplier…), by name.
#[serde(default, skip_serializing_if = "std::collections::BTreeMap::is_empty")]
pub properties: std::collections::BTreeMap<String, String>,
/// Keeps this component's features (and its children's) out of the History bar (#10393).
/// The features still rebuild and the component still shows in the Browser; imported copies
/// whose features only exist to rebuild the copy can carry this flag.
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
pub history_hidden: bool,
}
/// One loft section: profiles of a sketch.
@@ -2407,6 +2433,167 @@ impl FeatureKind {
FeatureKind::MeshConvert { .. } => "MeshConvertFeature",
}
}
/// Design-file variant key (e.g. `"extrude"`, `"box"`, `"sheet_flange"`).
pub fn kind_key(&self) -> &'static str {
match self {
FeatureKind::BodyTransfer { .. } => "body_transfer",
FeatureKind::Sketch { .. } => "sketch",
FeatureKind::Extrude { .. } => "extrude",
FeatureKind::Revolve { .. } => "revolve",
FeatureKind::Fillet { .. } => "fillet",
FeatureKind::Chamfer { .. } => "chamfer",
FeatureKind::Box { .. } => "box",
FeatureKind::Cylinder { .. } => "cylinder",
FeatureKind::Sphere { .. } => "sphere",
FeatureKind::Torus { .. } => "torus",
FeatureKind::Cone { .. } => "cone",
FeatureKind::Combine { .. } => "combine",
FeatureKind::Pattern { .. } => "pattern",
FeatureKind::Mirror { .. } => "mirror",
FeatureKind::Hole { .. } => "hole",
FeatureKind::Thread { .. } => "thread",
FeatureKind::Loft { .. } => "loft",
FeatureKind::Sweep { .. } => "sweep",
FeatureKind::Shell { .. } => "shell",
FeatureKind::Draft { .. } => "draft",
FeatureKind::ConstructionPlane { .. } => "construction_plane",
FeatureKind::Split { .. } => "split",
FeatureKind::ConstructionAxis { .. } => "construction_axis",
FeatureKind::ConstructionPoint { .. } => "construction_point",
FeatureKind::SplitFace { .. } => "split_face",
FeatureKind::Scale { .. } => "scale",
FeatureKind::OffsetFace { .. } => "offset_face",
FeatureKind::DeleteFace { .. } => "delete_face",
FeatureKind::BoundingSolid { .. } => "bounding_solid",
FeatureKind::Pipe { .. } => "pipe",
FeatureKind::FrameMember { .. } => "frame_member",
FeatureKind::Emboss { .. } => "emboss",
FeatureKind::Rib { .. } => "rib",
FeatureKind::ReplaceFace { .. } => "replace_face",
FeatureKind::Align { .. } => "align",
FeatureKind::Coil { .. } => "coil",
FeatureKind::SheetBase { .. } => "sheet_base",
FeatureKind::SheetContour { .. } => "sheet_contour",
FeatureKind::SheetFlange { .. } => "sheet_flange",
FeatureKind::SheetHem { .. } => "sheet_hem",
FeatureKind::SheetPerforate { .. } => "sheet_perforate",
FeatureKind::SheetFold { .. } => "sheet_fold",
FeatureKind::SheetPath { .. } => "sheet_path",
FeatureKind::SheetUnfold { .. } => "sheet_unfold",
FeatureKind::SheetConvert { .. } => "sheet_convert",
FeatureKind::Boss { .. } => "boss",
FeatureKind::Lip { .. } => "lip",
FeatureKind::SnapFit { .. } => "snap_fit",
FeatureKind::Rest { .. } => "rest",
FeatureKind::BoundaryFill { .. } => "boundary_fill",
FeatureKind::Remove { .. } => "remove",
FeatureKind::Patch { .. } => "patch",
FeatureKind::Stitch { .. } => "stitch",
FeatureKind::Thicken { .. } => "thicken",
FeatureKind::SurfaceExtrude { .. } => "surface_extrude",
FeatureKind::Unstitch { .. } => "unstitch",
FeatureKind::ReverseNormal { .. } => "reverse_normal",
FeatureKind::SurfaceUntrim { .. } => "surface_untrim",
FeatureKind::SurfaceRevolve { .. } => "surface_revolve",
FeatureKind::SurfaceSweep { .. } => "surface_sweep",
FeatureKind::SurfaceLoft { .. } => "surface_loft",
FeatureKind::SurfaceOffset { .. } => "surface_offset",
FeatureKind::SurfaceRuled { .. } => "surface_ruled",
FeatureKind::SurfaceExtend { .. } => "surface_extend",
FeatureKind::SurfaceBlend { .. } => "surface_blend",
FeatureKind::SurfaceBoundary { .. } => "surface_boundary",
FeatureKind::SurfaceNetwork { .. } => "surface_network",
FeatureKind::SurfaceMatch { .. } => "surface_match",
FeatureKind::SurfaceFair { .. } => "surface_fair",
FeatureKind::SurfaceTrim { .. } => "surface_trim",
FeatureKind::Move { .. } => "move",
FeatureKind::Import { .. } => "import",
FeatureKind::MeshConvert { .. } => "mesh_convert",
FeatureKind::MeshImport { .. } => "mesh_import",
}
}
/// Map a display or Rust type name (e.g. `"HoleFeature"`, `"EdgeFlangeFeature"`)
/// to the canonical design-file variant key (`"hole"`, `"sheet_flange"`).
pub fn type_name_to_kind_key(name: &str) -> Option<&'static str> {
Some(match name {
"BodyTransferFeature" => "body_transfer",
"Sketch" => "sketch",
"ExtrudeFeature" => "extrude",
"RevolveFeature" => "revolve",
"FilletFeature" => "fillet",
"ChamferFeature" => "chamfer",
"BoxFeature" => "box",
"CylinderFeature" => "cylinder",
"SphereFeature" => "sphere",
"TorusFeature" => "torus",
"ConeFeature" => "cone",
"CombineFeature" => "combine",
"RectangularPatternFeature" | "PathPatternFeature" | "CircularPatternFeature" => "pattern",
"MirrorFeature" => "mirror",
"ConstructionPlane" => "construction_plane",
"HoleFeature" => "hole",
"ThreadFeature" => "thread",
"LoftFeature" => "loft",
"SweepFeature" => "sweep",
"ShellFeature" => "shell",
"DraftFeature" => "draft",
"SplitBodyFeature" => "split",
"SplitFaceFeature" => "split_face",
"ConstructionAxis" => "construction_axis",
"ConstructionPoint" => "construction_point",
"MoveFeature" => "move",
"ScaleFeature" => "scale",
"OffsetFacesFeature" => "offset_face",
"DeleteFaceFeature" => "delete_face",
"OffsetSurfaceFeature" => "surface_offset",
"BoundingSolidFeature" => "bounding_solid",
"PipeFeature" => "pipe",
"FrameMemberFeature" => "frame_member",
"EmbossFeature" => "emboss",
"BossFeature" => "boss",
"LipFeature" | "GrooveFeature" => "lip",
"SnapFitFeature" => "snap_fit",
"RestFeature" => "rest",
"BoundaryFillFeature" => "boundary_fill",
"BaseFlangeFeature" => "sheet_base",
"ContourFlangeFeature" => "sheet_contour",
"EdgeFlangeFeature" => "sheet_flange",
"HemFeature" => "sheet_hem",
"PerforateFeature" => "sheet_perforate",
"FoldFeature" => "sheet_fold",
"PathFlangeFeature" => "sheet_path",
"UnfoldFeature" | "RefoldFeature" => "sheet_unfold",
"ConvertToSheetMetalFeature" => "sheet_convert",
"CoilFeature" => "coil",
"RibFeature" | "WebFeature" => "rib",
"ReplaceFaceFeature" => "replace_face",
"AlignFeature" => "align",
"RemoveFeature" => "remove",
"PatchFeature" => "patch",
"SurfaceExtrudeFeature" => "surface_extrude",
"SurfaceRevolveFeature" => "surface_revolve",
"SurfaceSweepFeature" => "surface_sweep",
"SurfaceLoftFeature" => "surface_loft",
"BlendFeature" => "surface_blend",
"BoundaryFeature" => "surface_boundary",
"MatchFeature" => "surface_match",
"FairFeature" => "surface_fair",
"StitchFeature" => "stitch",
"ThickenFeature" => "thicken",
"TrimFeature" => "surface_trim",
"ExtendFeature" => "surface_extend",
"RuledSurfaceFeature" => "surface_ruled",
"UnstitchFeature" => "unstitch",
"ReverseNormalFeature" => "reverse_normal",
"UntrimFeature" => "surface_untrim",
"BaseFeature" => "import",
"MeshFeature" => "mesh_import",
"MeshConvertFeature" => "mesh_convert",
_ => return None,
})
}
/// Default name prefix (`Extrude` → `Extrude1`).
pub fn base_name(&self) -> &'static str {
match self {
@@ -2628,6 +2815,19 @@ pub struct DesignLink {
/// local overrides and survive a source update. Older links start with no baseline.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub inherited: Vec<LinkedBodyProperties>,
/// SHA-256 of the design file's bytes as this design last read them ([`Self::file_digest`]):
/// opened again, this design tells which linked files changed meanwhile (#9739). Links made
/// before it was kept have none and are taken as up to date.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub file_sha256: Option<String>,
}
impl DesignLink {
/// What [`Self::file_sha256`] keeps for a design file's `bytes`.
pub fn file_digest(bytes: &[u8]) -> String {
use sha2::{Digest, Sha256};
format!("{:x}", Sha256::digest(bytes))
}
}
/// The values last inherited by a linked body, not another editable material library.
@@ -2736,6 +2936,9 @@ pub struct Document {
/// Physical material per body (by body name); others use the default.
#[serde(default, skip_serializing_if = "std::collections::BTreeMap::is_empty")]
pub materials: std::collections::BTreeMap<String, String>,
/// The flat face per body (by body name) that a slicer export lays on the print bed.
#[serde(default, skip_serializing_if = "std::collections::BTreeMap::is_empty")]
pub print_faces: std::collections::BTreeMap<String, crate::config::ConfigFaceTarget>,
/// Physical materials defined in this design (`material.create`), next to the built-in ones.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub user_materials: Vec<UserMaterial>,
@@ -2756,9 +2959,11 @@ pub struct Document {
/// order; feature ids remain the source of truth when features are renamed or reordered.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub timeline_groups: Vec<TimelineGroup>,
/// Browser item order per component folder (`"<component>/<folder>"` → item keys).
/// Browser order per component folder (`"<component>/<folder>"` → groups and item keys).
/// The `components` folder orders a component's sub-components (by placement id); it is not
/// drawn as a folder.
#[serde(default, skip_serializing_if = "std::collections::BTreeMap::is_empty")]
pub browser_order: std::collections::BTreeMap<String, Vec<String>>,
pub browser_order: std::collections::BTreeMap<String, Vec<BrowserEntry>>,
/// Named views: saved cameras.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub named_views: Vec<NamedView>,
@@ -2847,8 +3052,69 @@ pub struct BrowserGroup {
#[serde(default)]
pub component: u64,
pub folder: String,
/// The group that holds this one; `None` is the top level of its folder.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub parent: Option<u64>,
/// The group's items and child groups in display order. A child group missing here still
/// belongs to it (its `parent` says so) and is listed after the ones that are here.
#[serde(default)]
pub items: Vec<String>,
pub items: Vec<BrowserEntry>,
}
/// One line of a browser order list: a group (a number in a saved design) or an item (a string:
/// an item key or body name, so a body named `"1"` never clashes with group 1).
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[serde(untagged)]
pub enum BrowserEntry {
Group(u64),
Item(String),
}
impl From<&str> for BrowserEntry {
fn from(key: &str) -> Self {
BrowserEntry::Item(key.to_string())
}
}
impl From<String> for BrowserEntry {
fn from(key: String) -> Self {
BrowserEntry::Item(key)
}
}
impl BrowserEntry {
pub fn item(key: &str) -> Self {
BrowserEntry::Item(key.to_string())
}
pub fn as_item(&self) -> Option<&str> {
match self {
BrowserEntry::Item(k) => Some(k),
BrowserEntry::Group(_) => None,
}
}
pub fn is_item(&self, key: &str) -> bool {
self.as_item() == Some(key)
}
}
/// How many groups may sit inside one another (a top-level group is level 1).
pub const MAX_GROUP_NESTING: usize = 8;
/// The folders a browser group or order list can be for. `components` only orders sub-components.
pub const BROWSER_FOLDERS: [&str; 4] = ["bodies", "sketches", "construction", "components"];
impl BrowserGroup {
/// The keys of the items directly in this group, in order.
pub fn item_keys(&self) -> impl Iterator<Item = &str> {
self.items.iter().filter_map(BrowserEntry::as_item)
}
/// Whether this group holds the item directly.
pub fn has_item(&self, key: &str) -> bool {
self.items.iter().any(|e| e.is_item(key))
}
}
/// A saved history folder. Folders may nest; each feature or joint belongs to at most one folder.
@@ -2982,6 +3248,7 @@ impl Document {
body_components: Default::default(),
body_offsets: Default::default(),
materials: Default::default(),
print_faces: Default::default(),
user_materials: Vec::new(),
appearances: Default::default(),
favorites: Default::default(),
@@ -2997,7 +3264,7 @@ impl Document {
}
/// Rename body `old` to `new` where the design keeps things by body name outside its
/// features: materials, appearances, plastic rules, configuration columns, offsets, components and the
/// features: materials, print faces, appearances, plastic rules, configuration columns, offsets, components and the
/// browser's groups and order. (The features are the rename command's to change.)
///
/// A name the design numbered (`Body1`) is not used again after the rename: the design's
@@ -3013,6 +3280,10 @@ impl Document {
if let Some(m) = self.materials.remove(old) {
self.materials.insert(new.to_string(), m);
}
if let Some(mut face) = self.print_faces.remove(old) {
face.body = new.to_string();
self.print_faces.insert(new.to_string(), face);
}
if let Some(rule) = self.plastic.assigned.remove(old) {
self.plastic.assigned.insert(new.to_string(), rule);
}
@@ -3039,22 +3310,23 @@ impl Document {
if let Some(c) = self.body_components.remove(old) {
self.body_components.insert(new.to_string(), c);
}
for g in self.browser_groups.iter_mut().filter(|g| g.folder == "bodies") {
for k in g.items.iter_mut().filter(|k| *k == old) {
*k = new.to_string();
let rename = |e: &mut BrowserEntry| {
if e.is_item(old) {
*e = BrowserEntry::item(new);
}
};
for g in self.browser_groups.iter_mut().filter(|g| g.folder == "bodies") {
g.items.iter_mut().for_each(rename);
}
for (_, v) in self.browser_order.iter_mut().filter(|(k, _)| k.ends_with("/bodies")) {
for k in v.iter_mut().filter(|k| *k == old) {
*k = new.to_string();
}
v.iter_mut().for_each(rename);
}
}
/// The single body rename (old name, new name) that turns `previous` into this design,
/// when that is all that changed: the features' stored body names (`made` gives the names
/// each feature's bodies have now, by feature id) and what [`Document::rename_body_keys`]
/// renames. `None` for any other change.
/// each feature's bodies have now, by feature id), typed body references, participants and
/// what [`Document::rename_body_keys`] renames. `None` for any other change.
pub fn body_rename_from(&self, previous: &Document, made: impl Fn(u64) -> Vec<String>) -> Option<(String, String)> {
if self.features.len() != previous.features.len() {
return None;
@@ -3085,8 +3357,16 @@ impl Document {
}
let (old, new) = rename?;
let mut expected = previous.clone();
let bodies = std::collections::BTreeMap::from([(old.clone(), new.clone())]);
for (f, g) in expected.features.iter_mut().zip(&self.features) {
f.body_names.clone_from(&g.body_names);
// Updating references to the renamed body changes no feature input other than its
// name (#6287). Keep the full comparison below: geometry, expressions, sketch links
// and face anchors must still agree before the model may reuse its geometry.
f.kind.remap_bodies(&bodies);
for body in f.participants.iter_mut().filter(|body| **body == old) {
body.clone_from(&new);
}
}
expected.rename_body_keys(&old, &new);
(expected == *self).then_some((old, new))
@@ -3366,10 +3646,14 @@ impl Document {
/// Read a design file's JSON (any format this build knows; older ones are upgraded).
pub fn from_json(s: &str) -> Result<Document> {
crate::render_resources::check_json_budget(s)?;
let d = crate::format::read(s)?;
let mut d = crate::format::read(s)?;
if d.features.len() > MAX_FEATURES || d.params.len() > MAX_PARAMS {
return Err(DocError::Invalid("document too large".into()));
}
// A design from elsewhere may nest groups too deep, loop, or name things that are gone.
if let Some((groups, order)) = d.browser_pruned() {
(d.browser_groups, d.browser_order) = (groups, order);
}
Ok(d)
}
pub fn to_json(&self) -> String {
@@ -3377,6 +3661,8 @@ impl Document {
}
pub fn feature(&self, id: u64) -> Option<&Feature> {
#[cfg(test)]
crate::eval::cost_tests::count_feature_search();
self.features.iter().find(|f| f.id == id)
}
pub fn feature_mut(&mut self, id: u64) -> Option<&mut Feature> {
@@ -3395,15 +3681,35 @@ impl Document {
self.features.iter().find(|f| f.name.eq_ignore_ascii_case(r))
}
/// Resolve a textual timeline reference. An exact name wins even when it looks like an id.
/// Older scripts also pass ids as strings or use a different case for a unique name.
pub fn resolve_feature_name(&self, name: &str) -> Result<&Feature> {
if let Some(feature) = self.features.iter().find(|f| f.name == name) {
return Ok(feature);
}
if let Ok(id) = name.parse::<u64>()
&& let Some(feature) = self.feature(id)
{
return Ok(feature);
}
let mut matches = self.features.iter().filter(|f| f.name.eq_ignore_ascii_case(name));
let feature = matches.next().ok_or_else(|| DocError::Invalid(format!("no feature `{name}`")))?;
if matches.next().is_some() {
return Err(DocError::Invalid(format!("ambiguous feature `{name}`. Use its exact name or numeric id")));
}
Ok(feature)
}
/// The feature a pattern or mirror seed names, resolved the way `replay()` resolved seed
/// names before seeds were keyed by id (#1134): an exact name match on a feature that is
/// not a sketch or a construction plane wins — a sketch and its extrude often share a
/// name, and the feature that makes geometry is the one to copy — else [`find_feature`].
/// name, and the feature that makes geometry is the one to copy. Other references use
/// the timeline lookup.
pub fn seed_feature(&self, name: &str) -> Option<&Feature> {
self.features
.iter()
.find(|x| x.name == name && !matches!(x.kind, FeatureKind::Sketch { .. } | FeatureKind::ConstructionPlane { .. }))
.or_else(|| self.find_feature(name))
.or_else(|| self.resolve_feature_name(name).ok())
}
fn unique_name(&self, base: &str) -> String {
@@ -3459,12 +3765,18 @@ impl Document {
} else {
0
};
let id = self.next_id.max(1);
self.next_id = id.checked_add(1).ok_or_else(|| DocError::Invalid("too many items in the design".into()))?;
let name = match name {
Some(n) if !n.trim().is_empty() => n.trim().to_string(),
_ => self.unique_name(kind.base_name()),
};
// Plane references share the feature namespace. A duplicate would silently select
// the first feature. Other shared names (a sketch and its extrude) remain supported.
let is_plane = matches!(kind, FeatureKind::ConstructionPlane { .. });
if self.features.iter().any(|f| f.name == name && (is_plane || matches!(f.kind, FeatureKind::ConstructionPlane { .. }))) {
return Err(DocError::Invalid(format!("another feature is called `{name}`")));
}
let id = self.next_id.max(1);
self.next_id = id.checked_add(1).ok_or_else(|| DocError::Invalid("too many items in the design".into()))?;
let f = Feature {
id,
name,
@@ -3862,6 +4174,7 @@ impl Document {
}
PlaneRef::Midplane { .. }
| PlaneRef::TwoEdges { .. }
| PlaneRef::AxisPoint { .. }
| PlaneRef::ThreePoints { .. }
| PlaneRef::Tangent { .. }
| PlaneRef::AlongPath { .. }
@@ -4014,7 +4327,7 @@ impl Document {
return Err(DocError::Invalid("a text's height must be positive".into()));
}
if let Some(e) = &exprs.text {
let words = self.eval_words(e).map_err(|error| DocError::Expr(format!("text: {error}")))?;
let words = self.eval_words(e, vals).map_err(|error| DocError::Expr(format!("text: {error}")))?;
if words.trim().is_empty() || words.chars().count() > solidcraft_sketch::MAX_TEXT_CHARS {
return Err(DocError::Invalid(format!("text: `{e}` gives no words, or too many")));
}
@@ -4059,6 +4372,11 @@ impl Document {
analysis: solidcraft_sketch::Analysis,
) -> Result<solidcraft_sketch::SolveReport> {
self.apply_dimension_values(vals, sk)?;
// A text built anew since it was stored (an expression gave it other words) has other
// outline entities: the stored sketch is taken with this sketch's, so the points still
// pair up for the side checks and the walk below.
let paired = moved_from.and_then(|from| sk.stored_with_rebuilt_texts(from));
let moved_from = paired.as_ref().or(moved_from);
let was = |sk: &Sketch| moved_from.and_then(|from| sk.positions_in(from));
let offsets = !sk.offsets.is_empty() || !sk.freeform_offsets.is_empty();
// Offsets always require another solve after refresh. Only that last report is
@@ -4097,6 +4415,14 @@ impl Document {
} else {
solidcraft_sketch::solve_after_edit_with_analysis(sk, stored, was(sk).as_deref(), analysis)
};
// An attachment to the old offset can prevent the source from moving at all.
// Retry from a source-only seed, adopting it only if every constraint still holds.
if !report.ok()
&& report.oversized.is_none()
&& let Some(retried) = sk.solve_after_offset_edit(stored, was(sk).as_deref(), analysis)
{
report = retried;
}
}
Ok(report)
}
+265 -53
View File
@@ -792,6 +792,11 @@ fn split_piece_of(name: &str) -> Option<&str> {
(!n.starts_with('0') && n.parse::<u32>().is_ok()).then_some(base)
}
/// The warning of a sketch whose profile search was cut short (#6896).
fn profiles_cut_short_note() -> String {
format!("some profiles may be missing: a group of touching curves is cut into more than {} pieces", solidcraft_sketch::MAX_PROFILE_EDGES)
}
/// Add `note` to a feature's warning.
fn append_warning(warning: &mut Option<String>, note: String) {
*warning = Some(match warning.take() {
@@ -1189,17 +1194,27 @@ impl ModelState {
/// to the budget keep only its last few states, so setting a parameter back recomputed what
/// had dropped out.
fn added_bytes(&self, before: &ModelState) -> usize {
// `before`'s bodies by solid, and its sketches by address: looked up per body and sketch,
// not searched (every feature's result is charged, so searching was bodies² per feature).
// Bodies sharing a solid are still told apart by `same_shape` (the mesh as well).
let mut solids: std::collections::HashMap<usize, Vec<&Body>> = std::collections::HashMap::with_capacity(before.bodies.len());
for o in &before.bodies {
solids.entry(o.body.solid_id()).or_default().push(&o.body);
}
let bodies: usize = self
.bodies
.iter()
.filter(|b| !before.bodies.iter().any(|o| o.body.same_shape(&b.body)))
.filter(|b| !solids.get(&b.body.solid_id()).is_some_and(|os| os.iter().any(|o| o.same_shape(&b.body))))
.map(|b| if b.bytes > 0 { b.bytes } else { b.body.retained_bytes() })
.sum();
let sketches: usize = self.sketches.iter().filter(|s| !before.sketches.iter().any(|o| Arc::ptr_eq(o, s))).map(|s| s.retained_bytes()).sum();
let kept: std::collections::HashSet<*const SolvedSketch> = before.sketches.iter().map(Arc::as_ptr).collect();
let sketches: usize = self.sketches.iter().filter(|s| !kept.contains(&Arc::as_ptr(s))).map(|s| s.retained_bytes()).sum();
bodies + sketches + self.sheets.len() * 4096 + self.threads.len() * 192 + self.construct.len() * 192
}
pub fn body(&self, name: &str) -> Option<&ModelBody> {
#[cfg(test)]
cost_tests::count(|c| c.body_searches += 1);
self.bodies.iter().find(|b| b.name == name)
}
@@ -1294,6 +1309,10 @@ pub struct Model {
kept: KeptSlot,
/// The imported texts' digests the last `evaluate` fingerprinted the features with.
step_digests: StepDigests,
/// The address of the shared document whose fingerprints the results were last given in
/// full, with [`fingerprints_digest`] of them then ([`Model::pinned_prefix`]). Only an
/// address: a reference to the document would make every in-place edit of it a copy.
fingerprinted: Option<(usize, u64)>,
/// The document context the last `evaluate` ran in ([`context_digest`]).
context: u64,
/// The last active result of each feature hidden by the history marker, with its document
@@ -1413,32 +1432,40 @@ fn quantize(sk: &mut solidcraft_sketch::Sketch) {
/// file's text by its digest.
/// Hash [`feature_json`] of `f` into `h`. Every evaluation fingerprints every feature, and in a
/// design built command by command almost all of them are the same as last time: the text of a
/// feature is kept (per thread, by id) with the feature it was written from, and written again
/// only when the feature differs. An Import's text also depends on its STEP digest, so it is
/// written each time as before.
/// feature is kept (by id) with the feature it was written from, and written again only when the
/// feature differs. An Import's text also depends on its STEP digest, so it is written each time
/// as before.
///
/// The texts are shared by every thread: a command evaluated ahead runs on a new worker thread
/// each time (the desktop's deferred commands and delete checks, the control channel's ahead
/// jobs), and a per-thread store started empty there, so every ahead run wrote out every
/// feature again. The lock is held only to look up or store an entry, never while a feature is
/// compared or written; an entry is the same whichever thread wrote it, since the text is a
/// function of the feature alone.
fn hash_feature_json(f: &Feature, steps: &StepDigests, h: &mut impl Hasher) {
type Written = std::collections::HashMap<u64, Arc<(Feature, String)>>;
static WRITTEN: std::sync::LazyLock<std::sync::Mutex<Written>> = std::sync::LazyLock::new(Default::default);
if matches!(f.kind, FeatureKind::Import { .. }) {
feature_json(f, steps).hash(h);
return;
}
thread_local! {
static WRITTEN: std::cell::RefCell<std::collections::HashMap<u64, (Feature, String)>> = std::cell::RefCell::new(std::collections::HashMap::new());
let seen = WRITTEN.lock().unwrap_or_else(|e| e.into_inner()).get(&f.id).cloned();
if let Some(seen) = seen
&& seen.0 == *f
{
seen.1.hash(h);
return;
}
WRITTEN.with(|written| {
let mut written = written.borrow_mut();
if let Some((seen, json)) = written.get(&f.id)
&& seen == f
{
json.hash(h);
return;
}
let json = feature_json(f, steps);
json.hash(h);
if written.len() >= 1 << 15 {
written.clear();
}
written.insert(f.id, (f.clone(), json));
});
#[cfg(test)]
cost_tests::count_written();
let json = feature_json(f, steps);
json.hash(h);
let entry = Arc::new((f.clone(), json));
let mut written = WRITTEN.lock().unwrap_or_else(|e| e.into_inner());
if written.len() >= 1 << 15 {
written.clear();
}
written.insert(f.id, entry);
}
fn feature_json(f: &Feature, steps: &StepDigests) -> String {
@@ -1933,13 +1960,7 @@ fn placement_digest(doc: &Document, f: &Feature, st: Option<&ModelState>) -> u64
None => u8::MAX.hash(&mut h),
}
}
for name in &reads.bodies {
name.hash(&mut h);
match st.and_then(|st| st.body(name)) {
Some(b) => hash_placement(&crate::mat_mul(&inverse, &body_world(doc, b)), &mut h),
None => u8::MAX.hash(&mut h),
}
}
hash_placed_bodies(doc, st, &reads.bodies, &inverse, &mut h);
// Legacy and component-wide reads still need the conservative offset dependency. Body
// reads above already include just their own offsets, in the frame that evaluates them.
if reads.all || !reads.components.is_empty() || !reads.paths.is_empty() {
@@ -1949,6 +1970,38 @@ fn placement_digest(doc: &Document, f: &Feature, st: Option<&ModelState>) -> u64
h.finish() | 1
}
/// The bodies part of [`placement_digest`]: each body read, in name order, and where it is placed
/// relative to the reading frame `inverse` (`u8::MAX` for one not in `st`), as [`body_world`]
/// places it. The bodies, their components and the components' frames are looked up once: a
/// join or cut without targets reads every body of its component, and searching the model, the
/// timeline and the placements again for each of them made every evaluation, even one served
/// from the cache, quadratic in the bodies.
fn hash_placed_bodies(doc: &Document, st: Option<&ModelState>, names: &std::collections::BTreeSet<String>, inverse: &Mat, h: &mut impl Hasher) {
let (Some(st), false) = (st, names.is_empty()) else {
names.iter().for_each(|name| (name, u8::MAX).hash(h));
return;
};
// The first body of a name, as `ModelState::body` finds it.
let mut index: std::collections::HashMap<&str, usize> = std::collections::HashMap::with_capacity(st.bodies.len());
for (i, b) in st.bodies.iter().enumerate() {
index.entry(b.name.as_str()).or_insert(i);
}
let components = doc.model_body_components(st);
let mut frames: std::collections::HashMap<u64, Mat> = std::collections::HashMap::new();
for name in names {
name.hash(h);
let found = index.get(name.as_str()).and_then(|&i| Some((st.bodies.get(i)?, *components.get(i)?)));
match found {
Some((b, component)) => {
let m = *frames.entry(component).or_insert_with(|| doc.component_transform(component));
let world = doc.model_body_offset(b).map(|offset| crate::mat_mul(&m, offset)).unwrap_or(m);
hash_placement(&crate::mat_mul(inverse, &world), h);
}
None => u8::MAX.hash(h),
}
}
}
/// Every occurrence's placement and every body offset (a feature read from a frame that cannot
/// be inverted).
fn placements_hash(doc: &Document) -> u64 {
@@ -2126,6 +2179,7 @@ impl Model {
/// Re-evaluate the document, reusing results up to the first changed feature.
pub fn evaluate(&mut self, doc: &Document) {
self.placement_inputs = None;
self.fingerprinted = None;
self.placement_local = true;
let (vals, perr) = evaluation_values(doc);
self.param_errors = perr;
@@ -2153,7 +2207,14 @@ impl Model {
feature_component.entry(f.id).or_insert(f.component);
}
let watched = crate::progress::begin(doc.features.len());
// The features that failed so far in this pass, by id: their names and errors (#9075).
let mut failed: std::collections::HashMap<u64, (String, String)> = std::collections::HashMap::new();
for (i, f) in doc.features.iter().enumerate() {
if let Some(r) = out.last()
&& let Some(e) = &r.error
{
failed.insert(r.id, (r.name.clone(), e.clone()));
}
self.placement_local = self.placement_local && placement_reuse::local_geometry(f, &feature_component);
let rolled_back = i >= marker;
// Retain at most one active result per rolled-back feature, even across several
@@ -2213,6 +2274,33 @@ impl Model {
if state.reserved_body_names != reserved {
Arc::make_mut(&mut state).reserved_body_names.clone_from(&reserved);
}
// A sketch the feature is built from failed earlier in this pass: the feature fails naming
// that sketch, with its error, as one using a failed parameter does (#9075), not as a
// sketch that must come earlier in the timeline. Never cached: the cache key holds
// neither the sketch's name nor its error (a rename, another failing value).
let failed_sketch = if failed.is_empty() {
None
} else {
f.kind.input_sketches().into_iter().find_map(|id| failed.get(&id)).map(|(name, e)| format!("sketch `{name}` failed: {e}"))
};
if let Some(e) = failed_sketch {
recomputed += 1;
reuse = false;
out.push(FeatureResult {
id: f.id,
name: f.name.clone(),
error: Some(e),
warning: None,
boolean_diagnostics: Default::default(),
ms: 0.0,
skipped: false,
stale: false,
fingerprint: fp,
unkept: false,
state: state.clone(),
});
continue;
}
// The same feature on the same inputs: its earlier result.
let key =
cache_key(f, fp, fingerprint(doc, 0, f, &vals, false, &self.step_digests) ^ placement_digest(doc, f, Some(&state)), ctx, &state);
@@ -2493,19 +2581,76 @@ impl Model {
/// Set every result's fingerprint to `doc`'s, so the next evaluation reuses every result
/// (after a change that builds nothing differently).
pub fn refingerprint(&mut self, doc: &Document) {
self.refingerprint_from(doc, 0);
}
/// How many leading results keep their fingerprints when `doc` has the body names of the
/// features `renamed` pinned, and nothing else changed (see [`Model::refingerprint_shared`]).
/// Every command pins, and fingerprinting the whole timeline again for it cost as much as
/// the fingerprinting of the evaluation itself. When the results hold `doc`'s fingerprints
/// (the address and digest kept when they were given prove it), those before the first
/// renamed feature stand, since nothing they read changes, unless a pattern or mirror of
/// features among them replays a renamed one (it fingerprints its sources' definitions
/// wherever they are). Without that proof: none.
pub fn pinned_prefix(&self, doc: &Arc<Document>, renamed: &[u64]) -> usize {
let proven = self.fingerprinted.is_some_and(|(of, digest)| of == Arc::as_ptr(doc) as usize && digest == fingerprints_digest(&self.results));
if !proven {
return 0;
}
let Some(first) = doc.features.iter().position(|f| renamed.contains(&f.id)) else { return doc.features.len() };
let replays_renamed = |f: &Feature| match &f.kind {
FeatureKind::Pattern { features, bodies, .. } | FeatureKind::Mirror { features, bodies, .. } => {
bodies.is_empty() && !features.is_empty() && replayed_sources(doc, features).iter().any(|g| renamed.contains(&g.id))
}
_ => false,
};
doc.features.iter().take(first).position(replays_renamed).unwrap_or(first)
}
/// Drop the proof [`Model::pinned_prefix`] reads: the document at that address is about to
/// change in place.
pub fn forget_fingerprints(&mut self) {
self.fingerprinted = None;
}
/// Fingerprint the results from `start` on for `doc`, chained onto the fingerprint before.
pub(crate) fn refingerprint_from(&mut self, doc: &Document, start: usize) {
self.placement_inputs = None;
self.fingerprinted = None;
self.step_digests = StepDigests::of(doc, &self.step_digests);
let start = start.min(self.results.len()).min(doc.features.len());
if start == self.results.len().min(doc.features.len()) {
return;
}
let (vals, _) = evaluation_values(doc);
let marker = doc.marker.unwrap_or(usize::MAX);
self.step_digests = StepDigests::of(doc, &self.step_digests);
let mut prev = 0;
let last = start.checked_sub(1).and_then(|i| self.results.get(i));
let mut prev = last.map_or(0, |r| r.fingerprint);
// Each feature's fingerprint reads the model it starts from, as evaluating does.
let mut before = Arc::new(ModelState::default());
for (i, (r, f)) in self.results.iter_mut().zip(&doc.features).enumerate() {
let mut before = last.map_or_else(|| Arc::new(ModelState::default()), |r| r.state.clone());
for (i, (r, f)) in self.results.iter_mut().zip(&doc.features).enumerate().skip(start) {
prev = chain_fingerprint(doc, &vals, f, prev, i >= marker, &self.step_digests, Some(&before));
r.fingerprint = prev;
before = r.state.clone();
}
}
/// Note that the results now hold `doc`'s fingerprints (for [`Model::pinned_prefix`]).
pub(crate) fn mark_fingerprinted(&mut self, doc: &Arc<Document>) {
self.fingerprinted = Some((Arc::as_ptr(doc) as usize, fingerprints_digest(&self.results)));
}
}
/// A digest of the results' features and fingerprints, which proves they are still the ones
/// [`Model::mark_fingerprinted`] saw (whatever changed them since).
fn fingerprints_digest(results: &[FeatureResult]) -> u64 {
let mut h = std::collections::hash_map::DefaultHasher::new();
results.len().hash(&mut h);
for r in results {
r.id.hash(&mut h);
r.fingerprint.hash(&mut h);
}
h.finish()
}
/// Key of the design's length unit (mm per unit) among the values (no parameter can be named
@@ -3199,6 +3344,11 @@ fn apply_traced_with(
// Not yet: a cut that splits one piece of such a body still splits all of them; keeping
// the untouched ones together needs each new piece traced to the piece it came from.
let mut taken: std::collections::BTreeSet<String> = state.bodies.iter().map(|b| b.name.clone()).collect();
// The pieces past the first belong to this feature, like a split's pieces (#10123):
// `body.rename` stores their names in this feature's `body_names`, in this order, so a
// renamed piece keeps its own name through a rebuild instead of landing on a sibling
// of the body it was cut from.
let mut extra = 0usize;
let mut split: Vec<ModelBody> = Vec::new();
for mb in std::mem::take(&mut state.bodies) {
let Some(&had) = affected.get(&mb.name).filter(|_| !state.sheets.iter().any(|s| s.body == mb.name)) else {
@@ -3214,13 +3364,18 @@ fn apply_traced_with(
// (so pieces of one face in different bodies are told apart).
let lineages = crate::lineage::Lineage::lumps(&mb.body, mb.lineage().as_deref(), &pieces);
for (k, (p, lineage)) in pieces.into_iter().zip(lineages).enumerate() {
let name = if k == 0 {
mb.name.clone()
let (name, made_by) = if k == 0 {
(mb.name.clone(), mb.feature)
} else {
(k..=k + taken.len()).map(|j| format!("{} ({j})", mb.name)).find(|n| !taken.contains(n)).unwrap_or_default()
let stored = f.body_names.get(extra).filter(|n| !n.trim().is_empty() && !taken.contains(*n)).cloned();
extra += 1;
let name = stored.unwrap_or_else(|| {
(k..=k + taken.len()).map(|j| format!("{} ({j})", mb.name)).find(|n| !taken.contains(n)).unwrap_or_default()
});
(name, f.id)
};
taken.insert(name.clone());
split.push(ModelBody::new(name, p, mb.feature).with_lineage(lineage));
split.push(ModelBody::new(name, p, made_by).with_lineage(lineage));
}
}
state.bodies = split;
@@ -4155,7 +4310,8 @@ fn blend_edges_on(mb: &ModelBody, f: &Feature, edges: &[crate::Position], idx: &
Some((_, Err(_))) | None => {
let mut w = None;
let refs: Vec<EdgeRef> = f.edge_refs.get(i).cloned().into_iter().collect();
let skipped = format!("edge `{}` no longer exists and was skipped", stored.map(String::as_str).unwrap_or("?"));
let skipped =
format!("edge `{}` no longer exists and was skipped", stored.map_or_else(|| "?".into(), |n| crate::name_lookup::quoted(n)));
// The name is gone. A pick on the axis of a round must not fall through to the
// tangency seam (#775). A sharp edge that moved still resolves from the point,
// which an edit relies on.
@@ -4164,7 +4320,7 @@ fn blend_edges_on(mb: &ModelBody, f: &Feature, edges: &[crate::Position], idx: &
} else if let Ok(q) = resolve_edges(&mb.body, &[p], &refs, &mut w) {
out.extend(q);
notes.push(match stored {
Some(n) => format!("edge `{n}` no longer exists; using the edge at the picked point"),
Some(n) => format!("edge `{}` no longer exists; using the edge at the picked point", crate::name_lookup::quoted(n)),
None => "an edge reference without a name was found by its point".into(),
});
} else {
@@ -4858,6 +5014,29 @@ pub fn revolve_extent_with_convention(
symmetric: bool,
to: Option<Vec3>,
convention: crate::RevolveConvention,
) -> Result<RevolveExtent> {
let extent = revolve_extent_for_handle(st, plane, regions, (origin, axis), (angle, angle2), symmetric, to, convention)?;
// A solid needs an open sweep inside one full turn. Zero and a turn past 360° keep a
// handle frame (`revolve_extent_for_handle`) and still fail here, with the same message.
if !(extent.sweep.abs() > 1e-9 && extent.sweep.abs() <= std::f64::consts::TAU + 1e-9) {
return Err(DocError::Invalid("the revolve angle must be more than 0 and at most 360°".into()));
}
Ok(extent)
}
/// Where the angle handle sits. A sweep of zero, or past a full turn, builds no solid and
/// [`revolve_extent_with_convention`] refuses it. The boundary is still a point on the circle,
/// and the grab point stays there so the angle can be dragged back into range.
#[allow(clippy::too_many_arguments)]
pub fn revolve_extent_for_handle(
st: &ModelState,
plane: &Plane,
regions: &[Region2],
(origin, axis): (Vec3, Vec3),
(angle, angle2): (f64, Option<f64>),
symmetric: bool,
to: Option<Vec3>,
convention: crate::RevolveConvention,
) -> Result<RevolveExtent> {
let (start, sweep) = match (to, angle2, symmetric) {
(Some(point), _, _) => {
@@ -4897,7 +5076,7 @@ pub fn revolve_extent_with_convention(
(None, None, true) => (-angle / 2.0, angle),
(None, None, false) => (0.0, angle),
};
if !(sweep.is_finite() && start.is_finite() && sweep.abs() > 1e-9 && sweep.abs() <= std::f64::consts::TAU + 1e-9) {
if !(sweep.is_finite() && start.is_finite()) {
return Err(DocError::Invalid("the revolve angle must be more than 0 and at most 360°".into()));
}
let points: Vec<Vec2> = regions.iter().flat_map(|r| r.outer.polyline(1e-2)).collect();
@@ -6497,7 +6676,17 @@ fn with_named_face_points(doc: &Document, state: &ModelState, f: &Feature) -> Op
if n.is_empty() {
continue;
}
match crate::name_lookup::locate_face_on_body(&fst, f.kind.face_body(), n, *p) {
let hit = crate::name_lookup::locate_face_on_body(&fst, f.kind.face_body(), n, *p);
// A hole on one of two bodies with the same face name (two bodies of one extrude, the
// pieces of a split body) is on that body's face, whole: the name is not split there
// unless that body has pieces of it too (#10699).
let hit = match hit {
Some(h) if hole_axis.is_some() && h.split && h.on_point => {
fst.bodies.get(h.body).and_then(|b| crate::name_lookup::locate_face_on_body(&fst, Some(&b.name), n, *p)).or(Some(h))
}
other => other,
};
match hit {
Some(hit) => {
if let Some(note) = hit.note(n) {
notes.push(note);
@@ -7060,10 +7249,10 @@ fn face_plane(st: &ModelState, picked: &Plane, at: Vec3, name: Option<&str>) ->
let note = if crate::naming::legacy_name(name).is_some() {
None
} else if !crate::naming::face_has_name(b, f.index, name) {
Some(format!("face `{name}` was split; using the piece nearest the picked point"))
Some(format!("face `{}` was split; using the piece nearest the picked point", crate::name_lookup::quoted(name)))
} else if !crate::naming::face_name_exact(b, f.index) && (f.centroid - at).dot(n).abs() > tol {
// Named from geometry and moved off the picked plane: geometry alone decided.
Some(format!("face `{name}` was found by geometry, not exact history; check it"))
Some(format!("face `{}` was found by geometry, not exact history; check it", crate::name_lookup::quoted(name)))
} else {
None
};
@@ -7223,7 +7412,13 @@ fn eval_feature(doc: &Document, vals: &BTreeMap<String, Value>, f: &Feature, st:
*warning = Some(warns.join("; "));
}
sk.validate_periodic_splines()?;
let profiles = find_profiles(&sk);
// A group of touching curves too large to search whole says so, rather than
// leaving profiles out silently (#6896).
let search = solidcraft_sketch::find_profiles_checked(&sk);
if search.incomplete {
append_warning(warning, profiles_cut_short_note());
}
let profiles = search.profiles;
let ends = solidcraft_sketch::loose_ends(&sk);
st.sketches.retain(|s| s.feature != f.id);
st.sketches.push(Arc::new(SolvedSketch { feature: f.id, name: f.name.clone(), plane, sketch: sk, report, profiles, ends }));
@@ -8065,6 +8260,7 @@ fn plane_reads_geometry(plane: &PlaneRef) -> bool {
PlaneRef::ThroughPoint { .. }
| PlaneRef::Midplane { .. }
| PlaneRef::TwoEdges { .. }
| PlaneRef::AxisPoint { .. }
| PlaneRef::ThreePoints { .. }
| PlaneRef::Tangent { .. }
| PlaneRef::AlongPath { .. }
@@ -8442,7 +8638,10 @@ pub fn world_state_reusing(doc: &Document, st: &ModelState, placed_before: &mut
return st.clone();
}
let mut placed_now = PlacedBodies::default();
let comp_of_feature = |id: u64| doc.feature(id).map(|f| f.component).unwrap_or(0);
// Looked up once: every sketch, construction and tap asked the timeline, and every placement
// went through all bodies, each time searching (a large assembly paid this every command).
let feature_components: std::collections::HashMap<u64, u64> = doc.features.iter().rev().map(|f| (f.id, f.component)).collect();
let comp_of_feature = |id: u64| feature_components.get(&id).copied().unwrap_or(0);
let first_path = |comp: u64| -> Vec<u64> {
let mut path = Vec::new();
let mut c = comp;
@@ -8465,7 +8664,24 @@ pub fn world_state_reusing(doc: &Document, st: &ModelState, placed_before: &mut
let mut jobs = Vec::new();
let owners = doc.model_body_components(st);
let names = crate::WorldNames::new(doc, st);
let bodies_of = |comp: u64| st.bodies.iter().zip(&owners).filter(move |(_, owner)| **owner == comp).map(|(b, _)| b);
let mut by_component: std::collections::HashMap<u64, Vec<&ModelBody>> = std::collections::HashMap::new();
for (b, owner) in st.bodies.iter().zip(&owners) {
by_component.entry(*owner).or_default().push(b);
}
let bodies_of = |comp: u64| by_component.get(&comp).into_iter().flatten().copied();
// Each tap's component and the offset of the body it is on (the first body of that name).
let mut first_body: std::collections::HashMap<&str, (&ModelBody, u64)> = std::collections::HashMap::new();
for (b, owner) in st.bodies.iter().zip(&owners).rev() {
first_body.insert(b.name.as_str(), (b, *owner));
}
let tap_frames: Vec<(u64, Option<&crate::Mat>)> = st
.threads
.iter()
.map(|t| match first_body.get(t.body.as_str()) {
Some((body, owner)) => (*owner, doc.model_body_offset(body)),
None => (comp_of_feature(t.feature), None),
})
.collect();
for (comp, path, m) in &placements {
for b in bodies_of(*comp) {
let bm = body_matrix(b, m);
@@ -8545,14 +8761,10 @@ pub fn world_state_reusing(doc: &Document, st: &ModelState, placed_before: &mut
}
}
// Unlike editable sketch guides, cosmetic surfaces belong to every occurrence.
for t in st
.threads
.iter()
.filter(|t| st.body(&t.body).map(|body| doc.model_body_component(body)).unwrap_or_else(|| comp_of_feature(t.feature)) == comp)
{
for (t, (_, offset)) in st.threads.iter().zip(&tap_frames).filter(|(_, (owner, _))| *owner == comp) {
let mut t2 = t.clone();
t2.body = names.name(&t.body, comp, &path);
let frame = st.body(&t.body).and_then(|body| doc.model_body_offset(body)).map(|offset| crate::mat_mul(&m, offset)).unwrap_or(m);
let frame = offset.map(|offset| crate::mat_mul(&m, offset)).unwrap_or(m);
t2.axis_point = crate::apply_point(&frame, t.axis_point);
t2.axis = crate::apply_vector(&frame, *t.axis).unit().unwrap_or(t.axis);
out.threads.push(t2);
@@ -8737,7 +8949,7 @@ mod chain_tests {
#[cfg(test)]
#[path = "eval_cost_tests.rs"]
mod cost_tests;
pub(crate) mod cost_tests;
#[cfg(test)]
#[path = "eval_whole_face_tests.rs"]
+438 -2
View File
@@ -12,20 +12,24 @@ use solidcraft_geom::{Plane, Vec2, Vec3};
use solidcraft_kernel as kernel;
use solidcraft_sketch::Sketch;
use crate::eval::{PlacementReads, body_world, hash_placement, placement_digest};
use crate::*;
/// Work counted on this thread: bodies moved, STEP texts digested, joint faces and bodies
/// measured.
/// measured, bodies searched for by name, features searched for by id.
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub(super) struct Counts {
pub moved: usize,
pub digested: usize,
pub joint_faces: usize,
pub measures: usize,
pub body_searches: usize,
pub feature_searches: usize,
}
thread_local! {
static COUNTS: Cell<Counts> = const { Cell::new(Counts { moved: 0, digested: 0, joint_faces: 0, measures: 0 }) };
static COUNTS: Cell<Counts> =
const { Cell::new(Counts { moved: 0, digested: 0, joint_faces: 0, measures: 0, body_searches: 0, feature_searches: 0 }) };
}
pub(super) fn count(f: impl FnOnce(&mut Counts)) {
@@ -36,6 +40,33 @@ pub(super) fn count(f: impl FnOnce(&mut Counts)) {
});
}
thread_local! {
static WRITTEN: Cell<usize> = const { Cell::new(0) };
}
/// A feature written out on this thread to be fingerprinted.
pub(super) fn count_written() {
WRITTEN.with(|c| c.set(c.get() + 1));
}
/// The features `f` writes out on this thread to fingerprint them.
fn written(f: impl FnOnce()) -> usize {
WRITTEN.with(|c| c.set(0));
f();
WRITTEN.with(Cell::get)
}
/// A search on this thread through all of a design's features for one.
pub(crate) fn count_feature_search() {
count(|c| c.feature_searches += 1);
}
/// The searches `f` makes on this thread through all features or all bodies.
fn searched(f: impl FnOnce()) -> usize {
let n = counted(f);
n.feature_searches + n.body_searches
}
/// The work `f` does on this thread.
fn counted(f: impl FnOnce()) -> Counts {
COUNTS.with(|c| c.set(Counts::default()));
@@ -143,6 +174,25 @@ fn joint_face_measurements_never_follow_a_replaced_body_or_stale_offset() {
assert_eq!(work.joint_faces, 0, "offsets are applied after the shared face measurements");
}
/// Every solve of a drag resolves its edge origins again: they share the joint faces' one
/// measurement, as a face origin does, instead of tessellating the whole body each time.
#[test]
fn an_edge_origin_measures_its_faces_once() {
use crate::joints::{JointOrigin, Snap};
let doc = Document::new("edge origin");
let mut state = ModelState::default();
state.bodies.push(ModelBody::new("Block".into(), kernel::box_solid(Vec3::ZERO, Vec3::new(10.0, 10.0, 10.0)).unwrap(), 0));
let pick = Vec3::new(5.0, 0.0, 10.0);
let origin = JointOrigin { occurrence: 0, snap: Snap::Edge { pick, edge: None, face: None, corner: None, axis: None } };
let work = counted(|| {
for _ in 0..8 {
let frame = joints::resolve_origin(&doc, &state.clone(), &origin).unwrap();
assert!(apply_point(&frame, Vec3::ZERO).dist(pick) < 1e-9);
}
});
assert_eq!(work.joint_faces, 1, "a solve must not measure the faces again: {work:?}");
}
/// `parts` imported files of two boxes each, every one in its own component placed away from
/// the origin (as inserted parts are).
fn placed_imports(parts: usize) -> Document {
@@ -358,6 +408,132 @@ fn an_imported_file_is_fingerprinted_by_its_text() {
assert_eq!(model.state().bodies.len(), 3);
}
/// Pinning body names fingerprints the timeline again only from the first renamed feature on
/// (`Model::pinned_prefix`), and gives the fingerprints the full pass gives: random pins
/// on a timeline of boxes, cuts, patterns of features (one placed before its source, as one made
/// with the timeline rolled back is), a suppressed feature and a history marker, after an
/// evaluation and after earlier pins.
#[test]
fn pinning_body_names_fingerprints_as_the_full_pass_does() {
let kind = |v: serde_json::Value| serde_json::from_value::<FeatureKind>(v).unwrap();
let mut doc = Document::new("pins");
let mut ids = Vec::new();
for i in 0..10 {
let x = 20.0 * i as f64;
let b =
kind(serde_json::json!({"type": "box", "corner": [x, 0.0, 0.0], "length": "10", "width": "10", "height": "10", "operation": "new_body"}));
ids.push(doc.add_feature(b, None).unwrap());
if i % 3 == 1 {
let c = kind(
serde_json::json!({"type": "cylinder", "axis": [0.0, 0.0, 1.0], "base": [x + 5.0, 5.0, -1.0], "height": "12", "radius": "2", "operation": "cut"}),
);
ids.push(doc.add_feature(c, None).unwrap());
}
}
let circular = |features: Vec<u64>| {
kind(serde_json::json!({"type": "pattern", "features": features, "bodies": [],
"pattern": {"type": "circular", "angle": "360 deg", "axis": [0.0, 0.0, 1.0], "count": "3", "origin": [0.0, -40.0, 0.0]}}))
};
ids.push(doc.add_feature(circular(vec![ids[2]]), None).unwrap());
// A pattern of a later feature, placed early in the timeline.
let early = doc.add_feature(circular(vec![ids[9]]), None).unwrap();
let at = doc.features.iter().position(|f| f.id == early).unwrap();
let f = doc.features.remove(at);
doc.features.insert(3, f);
ids.push(early);
doc.feature_mut(ids[5]).unwrap().suppressed = true;
let mut seed = 0x2545_f491_4f6c_dd1du64;
let mut next = |n: usize| {
seed ^= seed << 13;
seed ^= seed >> 7;
seed ^= seed << 17;
(seed % n as u64) as usize
};
let fps = |m: &Model| m.results.iter().map(|r| (r.id, r.fingerprint)).collect::<Vec<_>>();
let mut old = Arc::new(doc);
let mut model = Model::new();
model.evaluate_shared(&old);
let (mut proven, mut kept) = (0, 0);
for round in 0..60 {
if round % 20 == 10 {
// From an evaluation's fingerprints again, with the marker in some rounds.
let mut d = (*old).clone();
d.marker = (round == 30).then_some(d.features.len() - 2);
old = Arc::new(d);
model.evaluate_shared(&old);
}
let mut new = (*old).clone();
let mut renamed = Vec::new();
for _ in 0..1 + next(3) {
let f = &mut new.features[next(old.features.len())];
let slot = next(3);
f.body_names.resize(f.body_names.len().max(slot + 1), String::new());
f.body_names[slot] = format!("Pinned {round} {slot}");
renamed.push(f.id);
}
new.reserved_body_names.insert(format!("Body{}", 100 + round));
let new = Arc::new(new);
let start = model.pinned_prefix(&old, &renamed);
let first = new.features.iter().position(|f| renamed.contains(&f.id)).unwrap();
assert!(start <= first, "round {round}: kept {start} past the first renamed feature {first}");
proven += usize::from(start > 0);
kept += start;
let mut partial = model.clone();
partial.refingerprint_shared(&new, start);
let mut full = model.clone();
full.refingerprint_shared(&new, 0);
assert_eq!(fps(&partial), fps(&full), "round {round}");
assert_ne!(fps(&partial), fps(&model), "round {round}: the names are fingerprinted");
// The pinned fingerprints prove themselves for the next pin, as the full pass's do.
assert_eq!(partial.fingerprinted.as_ref().map(|(_, d)| *d), full.fingerprinted.as_ref().map(|(_, d)| *d));
model = partial;
old = new;
}
assert!(proven > 40 && kept > 0, "the stored fingerprints were reused: {proven} rounds, {kept} results");
// No proof, no reuse: results changed since, another design, or the design about to change
// in place.
let last = [*ids.last().unwrap()];
assert!(model.pinned_prefix(&old, &last) > 0);
let mut changed = model.clone();
changed.results[0].fingerprint ^= 1;
assert_eq!(changed.pinned_prefix(&old, &last), 0);
assert_eq!(model.pinned_prefix(&Arc::new((*old).clone()), &last), 0);
let mut forgot = model.clone();
forgot.forget_fingerprints();
assert_eq!(forgot.pinned_prefix(&old, &last), 0);
}
/// A design evaluated ahead, on a worker thread of its own, fingerprints its features from the
/// texts the window's evaluation wrote: none is written out again there (the store was per
/// thread, and every ahead run started it empty), and the fingerprints are the same.
#[test]
fn an_evaluation_on_another_thread_reuses_the_written_features() {
let mut doc = Document::new("ahead");
// Ids no other test's design uses: the store is shared by the tests running beside this one.
doc.next_id = 0x0007_e57a_4ead_0000;
for i in 0..40 {
let x = 20.0 * i as f64;
let b = serde_json::json!({"type": "box", "corner": [x, 0.0, 0.0], "length": "10", "width": "10", "height": "10", "operation": "new_body"});
doc.add_feature(serde_json::from_value(b).unwrap(), None).unwrap();
}
let mut window = Model::new();
let first = written(|| window.evaluate(&doc));
assert!(first >= doc.features.len(), "{first} written");
let fps = |m: &Model| m.results.iter().map(|r| r.fingerprint).collect::<Vec<_>>();
let (doc2, mut ahead) = (doc.clone(), window.clone());
ahead.no_cache = true;
let (work, ahead_fps) = std::thread::spawn(move || {
let work = written(|| ahead.evaluate(&doc2));
(work, fps(&ahead))
})
.join()
.unwrap();
assert_eq!(work, 0, "features written out again");
assert_eq!(ahead_fps, fps(&window));
}
/// A 10 mm square plate per hole along X, 4 mm thick, in component `comp`, with `holes` square
/// holes cut through it by boxes drawn in component `tools` (the plate's own, usually). The
/// plate's body name.
@@ -647,3 +823,263 @@ fn shared_evaluation_refreshes_live_sketches_and_keeps_unknown_features_conserva
assert!(model.results.iter().all(|r| r.error.is_none()));
assert!(model.evaluate_shared(&doc), "an unclassified feature must keep the ordinary evaluation path");
}
/// A saved model writes each set of sketch keys once, as the keys it sets and drops relative to
/// the set written before it (every state repeating its whole set made a 5,484-feature design's
/// model too large for its file, which then kept only some states and evaluated the rest on
/// opening). Every state reads back the keys it was evaluated with, also in a model thinned to
/// fewer states; a set that names no set before it is refused.
#[test]
fn saved_states_read_back_their_sketch_keys() {
let mut doc = Document::new("Sketch keys");
for i in 0..4 {
doc.add_feature(line_sketch(PlaneRef::Origin { name: "XY".into() }, Vec2::new(f64::from(i) + 1.0, 1.0)), None).unwrap();
for j in 0..3 {
let corner = point_expr(Vec3::new(f64::from(i) * 20.0, f64::from(j) * 20.0, 0.0));
let kind = FeatureKind::Box { corner, length: "5".into(), width: "5".into(), height: "5".into(), operation: Operation::NewBody };
doc.add_feature(kind, None).unwrap();
}
}
let mut model = Model::new();
model.evaluate(&doc);
let keys = |m: &Model| m.results.iter().map(|r| r.state.sketch_keys.clone()).collect::<Vec<_>>();
assert_eq!(model.state().sketch_keys.len(), 4);
let saved = model.saved(&doc).unwrap();
assert_eq!(saved.records["sketch_key_sets"].as_array().unwrap().len(), 4, "one set per sketch");
assert_eq!(saved.records["states"].as_array().unwrap().len(), doc.features.len());
assert_eq!(keys(&Model::adopt(&doc, &saved).unwrap()), keys(&model));
// The final state alone (every body costs more than the budget): the sets are all kept.
let pieces: Vec<Vec<(usize, usize)>> = (0..saved.bodies.len()).map(|i| vec![(i, 1 << 20)]).collect();
let (thinned, _, _) = saved.thinned(&pieces, 0).unwrap();
assert_eq!(thinned.records["states"].as_array().unwrap().len(), 1);
assert_eq!(thinned.final_state().unwrap().sketch_keys, model.state().sketch_keys);
assert_eq!(keys(&Model::adopt(&doc, &thinned).unwrap()), keys(&model));
// Sets and drops read as written; a base that is not an earlier set is refused.
let with_sets = |sets: serde_json::Value| SavedModel {
records: {
let mut r = saved.records.clone();
r["sketch_key_sets"] = sets;
r
},
bodies: saved.bodies.clone(),
};
let first = *model.state().sketch_keys.keys().next().unwrap();
let dropped = with_sets(serde_json::json!([
{"set": [[first, "0000000000000001"], [7, "0000000000000002"]], "drop": []},
{"base": 0, "set": [], "drop": []},
{"base": 1, "set": [[8, "0000000000000003"]], "drop": [first]},
{"base": 0, "set": [[7, "00000000000000ff"]], "drop": []},
]));
let want: BTreeMap<u64, u64> = [(7, 0xff), (first, 1)].into();
assert_eq!(dropped.final_state().unwrap().sketch_keys, want);
let dropped = with_sets(serde_json::json!([
{"set": [[first, "0000000000000001"], [7, "0000000000000002"]], "drop": []},
{"base": 0, "set": [], "drop": []},
{"base": 0, "set": [], "drop": []},
{"base": 1, "set": [[8, "0000000000000003"]], "drop": [first]},
]));
assert_eq!(dropped.final_state().unwrap().sketch_keys, [(7, 2), (8, 3)].into());
for base in [3, 4] {
let sets =
serde_json::json!([{"set": [], "drop": []}, {"set": [], "drop": []}, {"set": [], "drop": []}, {"base": base, "set": [], "drop": []}]);
assert!(with_sets(sets).final_state().is_err(), "base {base}");
}
}
/// The dirty check and autosave compare the whole document after every edit; a scanned
/// part's shared triangles must not be read for that. A coordinate that equals nothing (not a
/// number) shows whether the shared arrays were read: only reading them makes a mesh differ
/// from its own copy.
#[test]
fn comparing_a_copied_mesh_does_not_read_its_shared_arrays() {
let mesh = MeshData {
name: "Scan".into(),
positions: Arc::from([0., 0., 0., 1., 0., 0., 0., 1., f64::NAN]),
triangles: Arc::from([0, 1, 2]),
color: None,
};
let copy = mesh.clone();
assert!(copy == mesh, "a copy shares the arrays and is the same mesh without reading them");
let mut renamed = mesh.clone();
renamed.name = "Other".into();
assert!(renamed != mesh);
let mut coloured = mesh.clone();
coloured.color = Some([0.2, 0.4, 0.6]);
assert!(coloured != mesh);
let unshared = MeshData { positions: Arc::from(mesh.positions.to_vec()), ..mesh.clone() };
assert!(unshared != mesh, "arrays that are not shared still compare value by value");
let finite = MeshData { positions: Arc::from([0., 0., 0., 1., 0., 0., 0., 1., 0.]), ..mesh.clone() };
let equal = MeshData { positions: Arc::from(finite.positions.to_vec()), triangles: Arc::from(finite.triangles.to_vec()), ..finite.clone() };
assert!(equal == finite, "equal values in other arrays are the same mesh");
let flipped = MeshData { triangles: Arc::from([0, 2, 1]), ..finite.clone() };
assert!(flipped != finite);
}
/// `blocks` boxes, each its own body, in component `comp`, then a cut box without targets
/// through each of the first `cuts` (it cuts every body of its component).
fn blocks_with_cuts(doc: &mut Document, comp: u64, blocks: usize, cuts: usize) {
let y = 100.0 * comp as f64;
for k in 0..blocks {
let corner = point_expr(Vec3::new(20.0 * k as f64, y, 0.0));
let kind = FeatureKind::Box { corner, length: "10".into(), width: "10".into(), height: "4".into(), operation: Operation::NewBody };
let id = doc.add_feature(kind, None).unwrap();
doc.feature_mut(id).unwrap().component = comp;
}
for k in 0..cuts {
let corner = point_expr(Vec3::new(20.0 * k as f64 + 4.0, y + 4.0, -1.0));
let kind = FeatureKind::Box { corner, length: "2".into(), width: "2".into(), height: "6".into(), operation: Operation::Cut };
let id = doc.add_feature(kind, None).unwrap();
doc.feature_mut(id).unwrap().component = comp;
}
}
#[test]
fn an_evaluation_from_the_cache_does_not_search_the_bodies_for_each_cut() {
// Each cut reads where every body of its component is placed; looking each one up by name
// made an evaluation quadratic in the bodies, even with every feature taken from the cache.
let searches = |blocks: usize| {
let mut doc = Document::new("blocks");
blocks_with_cuts(&mut doc, 0, blocks, 3);
let mut model = Model::new();
model.evaluate(&doc);
assert!(model.results.iter().all(|r| r.error.is_none()), "{:?}", model.results.iter().find(|r| r.error.is_some()));
let work = counted(|| model.evaluate(&doc));
assert_eq!(model.last_recomputed, 0);
work.body_searches
};
let (few, many) = (searches(4), searches(24));
assert_eq!(few, many, "searches grew with the bodies: {few} for 4 blocks, {many} for 24");
}
/// The bodies part of the placement digest as it was before the bodies were looked up once:
/// each body searched by name, placed through [`body_world`].
fn digest_searching_each_body(doc: &Document, f: &Feature, st: &ModelState) -> u64 {
use std::hash::{Hash, Hasher};
let mut reads = PlacementReads::default();
reads.drawn_targets(Some(st), f);
let inverse = mat_inverse(&doc.component_transform(f.component)).unwrap();
let mut h = std::collections::hash_map::DefaultHasher::new();
for name in &reads.bodies {
name.hash(&mut h);
match st.body(name) {
Some(b) => hash_placement(&mat_mul(&inverse, &body_world(doc, b)), &mut h),
None => u8::MAX.hash(&mut h),
}
}
h.finish() | 1
}
#[test]
fn looking_bodies_up_once_keeps_every_placement_digest() {
// Two parts placed apart, a body moved into the other part and one moved within its part:
// each cut's digest is the one searching each body gave, bit for bit, so saved caches stay
// valid.
let mut doc = Document::new("digests");
let a = doc.add_component(Some("A"), 0).unwrap();
let b = doc.add_component(Some("B"), 0).unwrap();
blocks_with_cuts(&mut doc, a, 5, 2);
blocks_with_cuts(&mut doc, b, 4, 2);
blocks_with_cuts(&mut doc, 0, 3, 1);
place(&mut doc, a, rigid(Vec3::new(3.0, -7.0, 1.5), Vec3::ZERO, Vec3::Z, 0.4));
place(&mut doc, b, rigid(Vec3::new(-20.0, 5.0, 0.0), Vec3::ZERO, Vec3::X, 0.25));
let mut model = Model::new();
model.evaluate(&doc);
let names: Vec<String> = model.state().bodies.iter().map(|b| b.name.clone()).collect();
assert_eq!(names.len(), 12);
doc.body_components.insert(names[1].clone(), b);
doc.body_offsets.insert(names[2].clone(), rigid(Vec3::new(0.0, 0.0, 2.0), Vec3::ZERO, Vec3::Y, 0.1));
doc.body_offsets.insert(names[6].clone(), rigid(Vec3::new(1.0, 1.0, 0.0), Vec3::ZERO, Vec3::Z, -0.3));
model.evaluate(&doc);
let st = model.state();
let cuts: Vec<&Feature> = doc.features.iter().filter(|f| matches!(f.kind, FeatureKind::Box { operation: Operation::Cut, .. })).collect();
assert_eq!(cuts.len(), 5);
for f in cuts {
let digest = placement_digest(&doc, f, Some(&st));
assert_ne!(digest, 0);
assert_eq!(digest, digest_searching_each_body(&doc, f, &st), "cut {}", f.id);
}
}
/// `comps` parts, each with `bodies` boxes, `sketches` sketches and `taps` taps, placed `copies`
/// times: a design and its state, made without evaluating it.
fn placed_parts(comps: usize, bodies: usize, sketches: usize, taps: usize, copies: usize) -> (Document, ModelState) {
let mut doc = Document::new("placed parts");
let mut one = Document::new("one sketch");
one.add_feature(line_sketch(PlaneRef::Origin { name: "XY".into() }, Vec2::new(3.0, 4.0)), None).unwrap();
let mut m = Model::new();
m.evaluate(&one);
let solved = m.state().sketches.first().unwrap().clone();
let mut st = ModelState::default();
let solid = kernel::box_solid(Vec3::ZERO, Vec3::new(2.0, 3.0, 4.0)).unwrap();
for c in 0..comps {
let comp = doc.add_component(Some(&format!("C{c}")), 0).unwrap();
let o = doc.occurrences.iter_mut().find(|o| o.component == comp).unwrap();
o.transform = rigid(Vec3::new(10.0 * c as f64, 0.0, 0.0), Vec3::ZERO, Vec3::Z, 0.01 * c as f64);
for k in 1..copies {
doc.add_occurrence(comp, 0, rigid(Vec3::new(10.0 * c as f64, 20.0 * k as f64, 0.0), Vec3::ZERO, Vec3::Z, 0.02 * k as f64)).unwrap();
}
let mut names = Vec::new();
for b in 0..bodies {
let kind =
serde_json::from_value(serde_json::json!({"type": "box", "corner": [0, 0, 0], "length": "2", "width": "3", "height": "4"})).unwrap();
let name = format!("B{c}_{b}");
let id = doc.add_feature(kind, Some(&name)).unwrap();
doc.feature_mut(id).unwrap().component = comp;
st.bodies.push(ModelBody::new(name.clone(), solid.clone(), id));
names.push((name, id));
}
for s in 0..sketches {
let id = doc.add_feature(line_sketch(PlaneRef::Origin { name: "XY".into() }, Vec2::new(1.0 + s as f64, 2.0)), None).unwrap();
doc.feature_mut(id).unwrap().component = comp;
let mut s2 = SolvedSketch::clone(&solved);
s2.feature = id;
st.sketches.push(Arc::new(s2));
}
for t in 0..taps {
let (body, feature) = names[t % names.len()].clone();
st.threads.push(ThreadInfo {
feature,
body,
designation: "M6".into(),
major_diameter: 6.0,
radius: 3.0,
pitch: 1.0,
internal: true,
handedness: Default::default(),
axis_point: Vec3::new(1.0, 1.0, 0.0),
axis: solidcraft_geom::UnitVec3::Z,
start: 0.0,
end: 4.0,
});
}
}
(doc, st)
}
#[test]
fn placing_parts_looks_each_sketch_and_tap_up_once() {
// A large assembly searched all features for every sketch and construction, and all bodies
// twice for every tap and placement, each time its world state was made (every command).
let searches = |sketches: usize, taps: usize| {
let (doc, state) = placed_parts(4, 2, sketches, taps, 3);
let mut world = ModelState::default();
let n = searched(|| world = world_state(&doc, &state));
assert_eq!(world.bodies.len(), 4 * 2 * 3);
assert_eq!(world.sketches.len(), 4 * sketches);
assert_eq!(world.threads.len(), 4 * taps * 3);
n
};
assert_eq!(searches(8, 6), searches(1, 1));
}
#[test]
fn a_placed_tap_follows_its_body_offset() {
let (mut doc, state) = placed_parts(1, 1, 0, 1, 1);
let comp = doc.components[0].id;
doc.body_offsets.insert("B0_0".into(), rigid(Vec3::new(0.0, 0.0, 7.0), Vec3::ZERO, Vec3::Z, 0.0));
let world = world_state(&doc, &state);
let tap = world.threads.first().unwrap();
let expected =
apply_point(&mat_mul(&doc.component_transform(comp), &rigid(Vec3::new(0.0, 0.0, 7.0), Vec3::ZERO, Vec3::Z, 0.0)), Vec3::new(1.0, 1.0, 0.0));
assert!(tap.axis_point.dist(expected) < 1e-9, "{:?} {expected:?}", tap.axis_point);
}
+209 -164
View File
@@ -97,7 +97,7 @@ pub(super) fn eval(doc: &Document, vals: &BTreeMap<String, Value>, f: &Feature,
}
Ok(())
}
FeatureKind::Align { bodies, from, to, from_normal, to_normal, flip, from_plane, to_plane } => {
FeatureKind::Align { bodies, from, to, from_normal, to_normal, flip, from_plane, to_plane, axes } => {
// A plane on either side is worked out now, so the bodies follow it when it moves.
let (mut from, mut from_normal) = (from.0, from_normal.and_then(|n| n.normalized()));
if let Some(p) = from_plane {
@@ -126,6 +126,28 @@ pub(super) fn eval(doc: &Document, vals: &BTreeMap<String, Value>, f: &Feature,
(Some(_), Some(n)) => n * (to - from).dot(n),
_ => to - from,
};
// Point-to-point alignment can keep only the chosen world X/Y/Z directions,
// stored in the bodies' frame. A missing list means all three (the full offset).
let d = match axes {
None => d,
Some(dirs) if dirs.is_empty() => {
return Err(DocError::Invalid("the align axes enable none of X, Y and Z".into()));
}
Some(dirs) => {
let mut kept = Vec3::ZERO;
let mut used = false;
for a in dirs {
if let Some(a) = a.0.normalized() {
kept += a * d.dot(a);
used = true;
}
}
if !used {
return Err(DocError::Invalid("the align axes have no direction".into()));
}
kept
}
};
m[3][0] += d.x;
m[3][1] += d.y;
m[3][2] += d.z;
@@ -780,7 +802,10 @@ pub(super) fn sheet_eval(
hit.point
}
Some((n, Err(_))) => {
append_warning(warning, format!("edge `{n}` no longer exists; using the edge at the picked point"));
append_warning(
warning,
format!("edge `{}` no longer exists; using the edge at the picked point", crate::name_lookup::quoted(n)),
);
p.0
}
None => p.0,
@@ -821,12 +846,12 @@ pub(super) fn sheet_eval(
// (its outer level, `hi`) with z into the material, as with bend edges, so the sheet
// takes the plate's place: its thickness runs from `hi` back to `lo`.
let plane = Plane::from_normal(face.0 + n * hi, n * -1.0).ok_or_else(|| DocError::Invalid("face".into()))?;
let slice = FaceSlice { mesh: &mesh, plane, at: face.0, n, tol };
// Recesses in one face (an engraved label) become pockets; the outline is the other face's.
let recesses = plate_recesses(&mb.body, &mesh, &plane, face.0, n, (lo, hi), tol)?;
let recesses = slice.recesses(&mb.body, (lo, hi))?;
let mut walls = std::collections::HashMap::new();
let mut wall = |f: u32| *walls.entry(f).or_insert_with(|| sheet::round_wall(&mb.body, &plane, n, f));
let mut loops: Vec<Loop2> =
face_outline(&mesh, &plane, face.0, n, recesses.level, tol).iter().map(|l| sheet::outline_loop(l, &mut wall, tol * 1e-2)).collect();
let mut loops: Vec<Loop2> = slice.outline(recesses.level).iter().map(|l| sheet::outline_loop(l, &mut wall, tol * 1e-2)).collect();
loops.sort_by(|a, b| b.signed_area().abs().total_cmp(&a.signed_area().abs()));
let mut it = loops.into_iter();
let outer = it.next().ok_or_else(|| DocError::Invalid("no outline on that face".into()))?.ccw();
@@ -1584,43 +1609,58 @@ fn parted_note(sh: &sheet::SheetBody, material: &[Region2], before: &sheet::Shee
})
}
/// Outline loops (in `plane` coordinates) of the mesh triangles lying in the plane at distance
/// `level` from `at` along `n`: the edges used by one of them only, chained.
fn face_loops(mesh: &solidcraft_geom::Mesh, plane: &Plane, at: Vec3, n: Vec3, level: f64, tol: f64) -> Vec<Ring<Vec2>> {
face_outline(mesh, plane, at, n, level, tol).into_iter().map(|l| l.into_iter().map(|(p, _)| p).collect()).collect()
/// The face that [`FaceSlice::loops`], [`FaceSlice::outline`] and [`FaceSlice::recesses`] measure:
/// the mesh, the plane the outline's coordinates live in, the point `at` and normal `n` that levels
/// are measured from, and the tolerance. Callers build it once and pass it on unchanged.
/// (`n` stays a `Vec3` until #2675 lands `UnitVec3` upstream.)
struct FaceSlice<'a> {
mesh: &'a Mesh,
plane: Plane,
at: Vec3,
n: Vec3,
tol: f64,
}
/// [`face_loops`] with each point's B-rep face across the outline from it to the next point (the
/// wall the outline runs along there): the face off the plane that meets both points.
fn face_outline(mesh: &solidcraft_geom::Mesh, plane: &Plane, at: Vec3, n: Vec3, level: f64, tol: f64) -> Vec<Vec<(Vec2, Option<u32>)>> {
let on_plane = |t: &[u32; 3]| t.iter().all(|k| mesh.positions.get(*k as usize).is_some_and(|p| ((*p - at).dot(n) - level).abs() < tol));
let on: Vec<[u32; 3]> = mesh.triangles.iter().copied().filter(on_plane).collect();
let pos = |k: u32| mesh.positions.get(k as usize).copied().unwrap_or_default();
let q = |p: Vec3| ((p.x * 1e6).round() as i64, (p.y * 1e6).round() as i64, (p.z * 1e6).round() as i64);
// The faces off the plane at each point on it, by position to a millionth of a millimetre
// either way (a neighbouring face's mesh may round a shared point differently).
let mut touch: std::collections::HashMap<(i64, i64, i64), Vec<u32>> = Default::default();
for (t, f) in mesh.triangles.iter().zip(&mesh.tri_face).filter(|(t, _)| !on_plane(t)) {
for p in t.iter().map(|k| pos(*k)).filter(|p| ((*p - at).dot(n) - level).abs() < tol) {
let faces = touch.entry(q(p)).or_default();
if !faces.contains(f) {
faces.push(*f);
impl FaceSlice<'_> {
/// Outline loops (in `plane` coordinates) of the mesh triangles lying in the plane at distance
/// `level` from `at` along `n`: the edges used by one of them only, chained.
fn loops(&self, level: f64) -> Vec<Ring<Vec2>> {
self.outline(level).into_iter().map(|l| l.into_iter().map(|(p, _)| p).collect()).collect()
}
/// [`FaceSlice::loops`] with each point's B-rep face across the outline from it to the next
/// point (the wall the outline runs along there): the face off the plane that meets both points.
fn outline(&self, level: f64) -> Vec<Vec<(Vec2, Option<u32>)>> {
let (mesh, plane, at, n, tol) = (self.mesh, &self.plane, self.at, self.n, self.tol);
let on_plane = |t: &[u32; 3]| t.iter().all(|k| mesh.positions.get(*k as usize).is_some_and(|p| ((*p - at).dot(n) - level).abs() < tol));
let on: Vec<[u32; 3]> = mesh.triangles.iter().copied().filter(on_plane).collect();
let pos = |k: u32| mesh.positions.get(k as usize).copied().unwrap_or_default();
let q = |p: Vec3| ((p.x * 1e6).round() as i64, (p.y * 1e6).round() as i64, (p.z * 1e6).round() as i64);
// The faces off the plane at each point on it, by position to a millionth of a millimetre
// either way (a neighbouring face's mesh may round a shared point differently).
let mut touch: std::collections::HashMap<(i64, i64, i64), Vec<u32>> = Default::default();
for (t, f) in mesh.triangles.iter().zip(&mesh.tri_face).filter(|(t, _)| !on_plane(t)) {
for p in t.iter().map(|k| pos(*k)).filter(|p| ((*p - at).dot(n) - level).abs() < tol) {
let faces = touch.entry(q(p)).or_default();
if !faces.contains(f) {
faces.push(*f);
}
}
}
let near = |p: Vec3| {
let (x, y, z) = q(p);
let cells = (-1..=1).flat_map(|i| (-1..=1).flat_map(move |j| (-1..=1).map(move |k| (x + i, y + j, z + k))));
let mut faces: Vec<u32> = cells.filter_map(|c| touch.get(&c)).flatten().copied().collect();
faces.sort_unstable();
faces.dedup();
faces
};
let across = |a: Vec3, b: Vec3| {
let at_b = near(b);
near(a).into_iter().find(|f| at_b.contains(f))
};
chain_loops(mesh, plane, &on, across)
}
let near = |p: Vec3| {
let (x, y, z) = q(p);
let cells = (-1..=1).flat_map(|i| (-1..=1).flat_map(move |j| (-1..=1).map(move |k| (x + i, y + j, z + k))));
let mut faces: Vec<u32> = cells.filter_map(|c| touch.get(&c)).flatten().copied().collect();
faces.sort_unstable();
faces.dedup();
faces
};
let across = |a: Vec3, b: Vec3| {
let at_b = near(b);
near(a).into_iter().find(|f| at_b.contains(f))
};
chain_loops(mesh, plane, &on, across)
}
/// The loops (in `plane` coordinates) that bound the triangles `on` of the mesh.
@@ -1710,138 +1750,142 @@ struct LevelFace {
tris: Vec<(Vec3, f64)>,
}
/// The recesses of a plate lying between levels `lo` and `hi` along `n` (measured from `at`),
/// whose sheet is built in `plane`. A recess's floor is a face parallel to the plate inside its
/// thickness, lying in an opening of the face it is cut into, and its walls are square to the
/// plate (walls that are not show as material the plate's volume doesn't account for). A body
/// that is no plate once its recesses are filled has none, so the plate check refuses it as
/// before: a bent part, whose legs' faces lie inside its extent. Recesses are taken in one face
/// only, up to half the thickness deep, and no larger than the face they are cut into (a plate
/// raised in places is no plate of the raised thickness).
fn plate_recesses(body: &Body, mesh: &Mesh, plane: &Plane, at: Vec3, n: Vec3, (lo, hi): (f64, f64), tol: f64) -> Result<Recesses> {
let t = hi - lo;
let eps = t * 1e-3;
let level = |p: Vec3| (p - at).dot(n);
let mut faces: BTreeMap<u32, Option<LevelFace>> = BTreeMap::new();
for (tri, f) in mesh.triangles.iter().zip(&mesh.tri_face) {
let Some([a, b, c]) = mesh.tri(tri) else { continue };
let cr = (b - a).cross(c - a);
let len = cr.len();
if !(len > 1e-12) {
continue;
}
let up = cr.dot(n) > 0.0;
let entry = faces.entry(*f).or_insert(Some(LevelFace { lo: f64::MAX, hi: f64::MIN, up, area: 0.0, at: a, tris: Vec::new() }));
match entry {
Some(face) if face.up == up && cr.dot(n).abs() >= len * (1.0 - 1e-6) => {
for p in [a, b, c] {
face.lo = face.lo.min(level(p));
face.hi = face.hi.max(level(p));
}
face.area += len / 2.0;
face.tris.push(((a + b + c) / 3.0, len / 2.0));
impl FaceSlice<'_> {
/// The recesses of a plate lying between levels `lo` and `hi` along `n` (measured from `at`),
/// whose sheet is built in `plane`. A recess's floor is a face parallel to the plate inside its
/// thickness, lying in an opening of the face it is cut into, and its walls are square to the
/// plate (walls that are not show as material the plate's volume doesn't account for). A body
/// that is no plate once its recesses are filled has none, so the plate check refuses it as
/// before: a bent part, whose legs' faces lie inside its extent. Recesses are taken in one face
/// only, up to half the thickness deep, and no larger than the face they are cut into (a plate
/// raised in places is no plate of the raised thickness).
fn recesses(&self, body: &Body, (lo, hi): (f64, f64)) -> Result<Recesses> {
let (mesh, plane, at, n, tol) = (self.mesh, &self.plane, self.at, self.n, self.tol);
let t = hi - lo;
let eps = t * 1e-3;
let level = |p: Vec3| (p - at).dot(n);
let mut faces: BTreeMap<u32, Option<LevelFace>> = BTreeMap::new();
for (tri, f) in mesh.triangles.iter().zip(&mesh.tri_face) {
let Some([a, b, c]) = mesh.tri(tri) else { continue };
let cr = (b - a).cross(c - a);
let len = cr.len();
if !(len > 1e-12) {
continue;
}
let up = cr.dot(n) > 0.0;
let entry = faces.entry(*f).or_insert(Some(LevelFace { lo: f64::MAX, hi: f64::MIN, up, area: 0.0, at: a, tris: Vec::new() }));
match entry {
Some(face) if face.up == up && cr.dot(n).abs() >= len * (1.0 - 1e-6) => {
for p in [a, b, c] {
face.lo = face.lo.min(level(p));
face.hi = face.hi.max(level(p));
}
face.area += len / 2.0;
face.tris.push(((a + b + c) / 3.0, len / 2.0));
}
_ => *entry = None,
}
_ => *entry = None,
}
}
// The floors (face index, level, the face), and the areas of the plate's two faces (at `lo`
// and at `hi`).
let mut floors: Vec<(usize, f64, &LevelFace)> = Vec::new();
let (mut bottom, mut top) = (0.0, 0.0);
for (f, face) in faces.iter().filter_map(|(f, face)| Some((*f as usize, face.as_ref()?))) {
let d = (face.lo + face.hi) / 2.0;
if face.hi - face.lo > eps {
continue;
} else if (d - hi).abs() <= eps && face.up {
top += face.area;
} else if (d - lo).abs() <= eps && !face.up {
bottom += face.area;
} else if d > lo + eps && d < hi - eps {
floors.push((f, d, face));
// The floors (face index, level, the face), and the areas of the plate's two faces (at `lo`
// and at `hi`).
let mut floors: Vec<(usize, f64, &LevelFace)> = Vec::new();
let (mut bottom, mut top) = (0.0, 0.0);
for (f, face) in faces.iter().filter_map(|(f, face)| Some((*f as usize, face.as_ref()?))) {
let d = (face.lo + face.hi) / 2.0;
if face.hi - face.lo > eps {
continue;
} else if (d - hi).abs() <= eps && face.up {
top += face.area;
} else if (d - lo).abs() <= eps && !face.up {
bottom += face.area;
} else if d > lo + eps && d < hi - eps {
floors.push((f, d, face));
}
}
}
let none = || Recesses { level: lo, pockets: Vec::new(), volume: 0.0 };
if floors.is_empty() {
return Ok(none());
}
// A floor is a recess's where (most of) it lies in an opening of the face it is cut into:
// inside that face's outline and in a hole of it, not on an island in the hole. (Its
// triangles are those at its level within `eps`: `tol` may exceed a recess's depth.)
let loops_at = |level: f64| -> Vec<Loop2> { face_loops(mesh, plane, at, n, level, eps).into_iter().map(|l| Loop2::polygon(&l)).collect() };
let (top_loops, bottom_loops) = (loops_at(hi), loops_at(lo));
floors.retain(|(_, _, face)| {
let loops = if face.up { &top_loops } else { &bottom_loops };
let open = |p: Vec2| {
let k = loops.iter().filter(|l| l.contains(p)).count();
k >= 2 && k.is_multiple_of(2)
};
face.tris.iter().filter(|(c, _)| open(plane.to_local(*c))).map(|(_, a)| a).sum::<f64>() > face.area / 2.0
});
let Some(&(_, _, first)) = floors.first() else { return Ok(none()) };
// Filled, the recesses leave a plate: its outline as large at `lo` as at `hi` once their
// openings count, and its volume with theirs the outline times the thickness. Else (a bent
// part) they are none.
let depth_in = |d: f64, up: bool| if up { hi - d } else { d - lo };
let opened = |up: bool| floors.iter().filter(|f| f.2.up == up).map(|f| f.2.area).sum::<f64>();
let outline = bottom + opened(false);
let removed: f64 = floors.iter().map(|f| f.2.area * depth_in(f.1, f.2.up)).sum();
let volume = kernel::measure(body)?.volume;
if (outline - top - opened(true)).abs() > 1e-3 * outline || (outline * t - volume - removed).abs() > 1e-3 * volume.max(1.0) {
return Ok(none());
}
let pt = |p: Vec3| format!("({:.3}, {:.3}, {:.3})", p.x, p.y, p.z);
let up = first.up;
if let Some(other) = floors.iter().find(|f| f.2.up != up) {
return Err(DocError::Invalid(format!(
"not supported yet: converting a plate with recesses in both faces (at {} and {}); recesses in one face become pockets",
pt(first.at),
pt(other.2.at)
)));
}
let depth_of = |d: f64| depth_in(d, up);
if let Some(deep) = floors.iter().find(|f| depth_of(f.1) > t / 2.0 + eps) {
return Err(DocError::Invalid(format!(
"not supported yet: the recess at {} is {:.3} mm deep, more than half the plate's {:.3} mm; shallower recesses (an engraving, a label) become pockets",
pt(deep.2.at),
depth_of(deep.1),
t
)));
}
let face_area = if up { top } else { bottom };
if floors.iter().map(|f| f.2.area).sum::<f64>() > face_area {
return Err(DocError::Invalid(format!(
"not supported yet: converting a plate whose recesses are larger than the face they are in (a plate thinner than {t:.3} mm, raised in places)"
)));
}
// The floors' outlines, from a mesh fine enough to mark them by.
let fine = body.tessellate((t * 1e-2).min(tol).max(1e-4))?;
floors.sort_by(|a, b| depth_of(a.1).total_cmp(&depth_of(b.1)));
// Floors at one depth are one pocket where they meet.
let mut groups: Vec<(f64, Vec<Region2>)> = Vec::new();
for (f, d, ..) in &floors {
let on: Vec<[u32; 3]> = fine.triangles.iter().zip(&fine.tri_face).filter(|(_, g)| **g as usize == *f).map(|(tri, _)| *tri).collect();
let mut loops = boundary_loops(&fine, plane, &on);
loops.sort_by(|a, b| b.signed_area().abs().total_cmp(&a.signed_area().abs()));
let mut it = loops.into_iter();
let Some(outline) = it.next() else { continue };
let region = Region2 { outer: Loop2::polygon(&outline).ccw(), holes: it.map(|l| Loop2::polygon(&l).ccw().reversed()).collect() };
match groups.last_mut() {
Some((depth, regions)) if depth_of(*d) - *depth <= eps => regions.push(region),
_ => groups.push((depth_of(*d), vec![region])),
let none = || Recesses { level: lo, pockets: Vec::new(), volume: 0.0 };
if floors.is_empty() {
return Ok(none());
}
}
// The sheet's z starts from the picked face when its plane faces away from that face.
let from_zero = up == (plane.normal().dot(n) < 0.0);
let mut work = sheet::FlatWork::new();
let (mut pockets, mut volume) = (Vec::new(), 0.0);
for (depth, regions) in groups {
let (z0, z1) = if from_zero { (0.0, depth) } else { (t - depth, t) };
for region in sheet::material_union(regions, &mut work)? {
volume += region.area().abs() * depth;
pockets.push((region, z0, z1));
// A floor is a recess's where (most of) it lies in an opening of the face it is cut into:
// inside that face's outline and in a hole of it, not on an island in the hole. (Its
// triangles are those at its level within `eps`: `tol` may exceed a recess's depth.)
let probe = FaceSlice { mesh, plane: self.plane, at, n, tol: eps };
let loops_at = |level: f64| -> Vec<Loop2> { probe.loops(level).into_iter().map(|l| Loop2::polygon(&l)).collect() };
let (top_loops, bottom_loops) = (loops_at(hi), loops_at(lo));
floors.retain(|(_, _, face)| {
let loops = if face.up { &top_loops } else { &bottom_loops };
let open = |p: Vec2| {
let k = loops.iter().filter(|l| l.contains(p)).count();
k >= 2 && k.is_multiple_of(2)
};
face.tris.iter().filter(|(c, _)| open(plane.to_local(*c))).map(|(_, a)| a).sum::<f64>() > face.area / 2.0
});
let Some(&(_, _, first)) = floors.first() else { return Ok(none()) };
// Filled, the recesses leave a plate: its outline as large at `lo` as at `hi` once their
// openings count, and its volume with theirs the outline times the thickness. Else (a bent
// part) they are none.
let depth_in = |d: f64, up: bool| if up { hi - d } else { d - lo };
let opened = |up: bool| floors.iter().filter(|f| f.2.up == up).map(|f| f.2.area).sum::<f64>();
let outline = bottom + opened(false);
let removed: f64 = floors.iter().map(|f| f.2.area * depth_in(f.1, f.2.up)).sum();
let volume = kernel::measure(body)?.volume;
if (outline - top - opened(true)).abs() > 1e-3 * outline || (outline * t - volume - removed).abs() > 1e-3 * volume.max(1.0) {
return Ok(none());
}
let pt = |p: Vec3| format!("({:.3}, {:.3}, {:.3})", p.x, p.y, p.z);
let up = first.up;
if let Some(other) = floors.iter().find(|f| f.2.up != up) {
return Err(DocError::Invalid(format!(
"not supported yet: converting a plate with recesses in both faces (at {} and {}); recesses in one face become pockets",
pt(first.at),
pt(other.2.at)
)));
}
let depth_of = |d: f64| depth_in(d, up);
if let Some(deep) = floors.iter().find(|f| depth_of(f.1) > t / 2.0 + eps) {
return Err(DocError::Invalid(format!(
"not supported yet: the recess at {} is {:.3} mm deep, more than half the plate's {:.3} mm; shallower recesses (an engraving, a label) become pockets",
pt(deep.2.at),
depth_of(deep.1),
t
)));
}
let face_area = if up { top } else { bottom };
if floors.iter().map(|f| f.2.area).sum::<f64>() > face_area {
return Err(DocError::Invalid(format!(
"not supported yet: converting a plate whose recesses are larger than the face they are in (a plate thinner than {t:.3} mm, raised in places)"
)));
}
// The floors' outlines, from a mesh fine enough to mark them by.
let fine = body.tessellate((t * 1e-2).min(tol).max(1e-4))?;
floors.sort_by(|a, b| depth_of(a.1).total_cmp(&depth_of(b.1)));
// Floors at one depth are one pocket where they meet.
let mut groups: Vec<(f64, Vec<Region2>)> = Vec::new();
for (f, d, ..) in &floors {
let on: Vec<[u32; 3]> = fine.triangles.iter().zip(&fine.tri_face).filter(|(_, g)| **g as usize == *f).map(|(tri, _)| *tri).collect();
let mut loops = boundary_loops(&fine, plane, &on);
loops.sort_by(|a, b| b.signed_area().abs().total_cmp(&a.signed_area().abs()));
let mut it = loops.into_iter();
let Some(outline) = it.next() else { continue };
let region = Region2 { outer: Loop2::polygon(&outline).ccw(), holes: it.map(|l| Loop2::polygon(&l).ccw().reversed()).collect() };
match groups.last_mut() {
Some((depth, regions)) if depth_of(*d) - *depth <= eps => regions.push(region),
_ => groups.push((depth_of(*d), vec![region])),
}
}
// The sheet's z starts from the picked face when its plane faces away from that face.
let from_zero = up == (plane.normal().dot(n) < 0.0);
let mut work = sheet::FlatWork::new();
let (mut pockets, mut volume) = (Vec::new(), 0.0);
for (depth, regions) in groups {
let (z0, z1) = if from_zero { (0.0, depth) } else { (t - depth, t) };
for region in sheet::material_union(regions, &mut work)? {
volume += region.area().abs() * depth;
pockets.push((region, z0, z1));
}
}
Ok(Recesses { level: if up { lo } else { hi }, pockets, volume })
}
Ok(Recesses { level: if up { lo } else { hi }, pockets, volume })
}
/// The body a placed plastic feature joins: by name, else the one under the point.
@@ -2033,7 +2077,8 @@ pub(super) fn plastic_eval(doc: &Document, vals: &BTreeMap<String, Value>, f: &F
let plane = Plane::from_normal(face.0, n).ok_or_else(|| DocError::Invalid("rim plane".into()))?;
let tol = (mb.body.size() * 1e-3).max(1e-3);
let mesh = mb.body.tessellate(tol)?;
let mut loops = face_loops(&mesh, &plane, face.0, n, 0.0, tol);
let slice = FaceSlice { mesh: &mesh, plane, at: face.0, n, tol };
let mut loops = slice.loops(0.0);
loops.sort_by(|a, b| b.signed_area().abs().total_cmp(&a.signed_area().abs()));
let ccw = |l: &Ring<Vec2>| if l.signed_area() < 0.0 { l.iter().rev().copied().collect::<Ring<_>>() } else { l.clone() };
// The inner edge is an opening (the cavity under a rim): not the foot of a boss or a
+96 -23
View File
@@ -161,6 +161,12 @@ pub const FUNCTIONS: &[(&str, &str)] = &[
("ceil", "ceil(x)"),
("round", "round(x)"),
("exp", "exp(x)"),
("sinh", "sinh(x)"),
("cosh", "cosh(x)"),
("tanh", "tanh(x)"),
("asinh", "asinh(x)"),
("acosh", "acosh(x), x ≥ 1"),
("atanh", "atanh(x), −1 < x < 1"),
("ln", "ln(x)"),
("log", "log(x) (base 10)"),
("log10", "log10(x)"),
@@ -344,8 +350,9 @@ fn lex_spans(s: &str) -> Result<Vec<(Tok, usize, usize)>, DocError> {
let at = |i: usize| cs.get(i).map(|x| x.0).unwrap_or(s.len());
let mut i = 0;
let mut out = Vec::new();
// Parentheses open at this point: a comma outside them can only be a decimal comma.
let mut depth = 0usize;
// Parentheses open at this point, innermost last, true for a function call's: a comma directly
// in a call separates its arguments, and anywhere else can only be a decimal comma (#9408).
let mut parens: Vec<bool> = Vec::new();
// A single leading `=` marks the text as a formula (`=d3`, #4681) and is not part of it.
if let Some(k) = cs.iter().position(|(_, c)| !c.is_whitespace())
&& cs.get(k).is_some_and(|(_, c)| *c == '=')
@@ -363,7 +370,7 @@ fn lex_spans(s: &str) -> Result<Vec<(Tok, usize, usize)>, DocError> {
while let Some(&(_, c)) = cs.get(i) {
if c.is_whitespace() {
i += 1;
} else if c.is_ascii_digit() || c == '.' || leading_decimal_comma(&cs, i, depth, out.last()) {
} else if c.is_ascii_digit() || c == '.' || leading_decimal_comma(&cs, i, in_call(&parens), out.last()) {
let st = i;
// A leading decimal comma (`,5` for 0,5, #2966) starts the number as `.5` would.
let leading_comma = c == ',';
@@ -374,11 +381,17 @@ fn lex_spans(s: &str) -> Result<Vec<(Tok, usize, usize)>, DocError> {
i += 1;
}
// A decimal comma (`2,5 mm`, as typed with a numeric keypad in many locales, #1347):
// a comma between digits, in a number with no point, outside any parentheses (inside
// them a comma separates a function's arguments: `max(1,2)`).
// a comma between digits, in a number with no point, not directly in a function call
// (there a comma separates arguments: `max(1,2)`).
let digit = |k: usize| cs.get(k).is_some_and(|(_, c)| c.is_ascii_digit());
let has_point = cs.get(st..i).is_some_and(|ds| ds.iter().any(|(_, c)| *c == '.'));
if depth == 0 && !leading_comma && !has_point && digit(i.wrapping_sub(1)) && cs.get(i).is_some_and(|(_, c)| *c == ',') && digit(i + 1) {
if !in_call(&parens)
&& !leading_comma
&& !has_point
&& digit(i.wrapping_sub(1))
&& cs.get(i).is_some_and(|(_, c)| *c == ',')
&& digit(i + 1)
{
i += 1;
while digit(i) {
i += 1;
@@ -400,7 +413,7 @@ fn lex_spans(s: &str) -> Result<Vec<(Tok, usize, usize)>, DocError> {
// A mixed number, as imperial sizes are written (`2 1/8"` is 2.125 in, #1802): a whole
// number, then a proper fraction of whole numbers, is one value, not `2 × 1/8`.
if t.chars().all(|c| c.is_ascii_digit())
&& let Some((fraction, end)) = mixed_fraction(&cs, i, depth)
&& let Some((fraction, end)) = mixed_fraction(&cs, i, in_call(&parens))
{
out.push((Tok::Num(v + fraction), at(st), at(end)));
i = end;
@@ -438,8 +451,10 @@ fn lex_spans(s: &str) -> Result<Vec<(Tok, usize, usize)>, DocError> {
i += 1;
} else if "+-*/^(),%".contains(c) {
match c {
'(' => depth += 1,
')' => depth = depth.saturating_sub(1),
'(' => parens.push(matches!(out.last(), Some((Tok::Id(_), _, _)))),
')' => {
parens.pop();
}
_ => {}
}
out.push((Tok::Op(c), at(i), at(i + 1)));
@@ -451,27 +466,32 @@ fn lex_spans(s: &str) -> Result<Vec<(Tok, usize, usize)>, DocError> {
Ok(out)
}
/// Whether the innermost open parenthesis is a function call's.
fn in_call(parens: &[bool]) -> bool {
parens.last() == Some(&true)
}
/// Whether the comma at `i` starts a number, as a leading decimal comma (`,5` for 0,5, #2966).
/// It must be outside parentheses (inside them a comma separates arguments, as for any decimal
/// comma), be followed by a digit, and stand where an operand is expected: at the start or right
/// after `+ - * / ^`. A comma after a number, name, `)` or `%` keeps its meaning (`2 ,5` and
/// `1,5,3` stay errors).
fn leading_decimal_comma(cs: &[(usize, char)], i: usize, depth: usize, prev: Option<&(Tok, usize, usize)>) -> bool {
depth == 0
/// It must not be directly in a function call (`in_call`: there a comma separates arguments, as
/// for any decimal comma), be followed by a digit, and stand where an operand is expected: at the
/// start or right after `( + - * / ^`. A comma after a number, name, `)` or `%` keeps its meaning
/// (`2 ,5` and `1,5,3` stay errors).
fn leading_decimal_comma(cs: &[(usize, char)], i: usize, in_call: bool, prev: Option<&(Tok, usize, usize)>) -> bool {
!in_call
&& cs.get(i).is_some_and(|(_, c)| *c == ',')
&& cs.get(i + 1).is_some_and(|(_, c)| c.is_ascii_digit())
&& match prev {
None => true,
Some((Tok::Op(op), _, _)) => "+-*/^".contains(*op),
Some((Tok::Op(op), _, _)) => "(+-*/^".contains(*op),
Some(_) => false,
}
}
/// The proper fraction of a mixed number whose whole part ends at `i`: spaces, digits, `/`,
/// digits, with nothing after them that would continue the number (`2 1/8.5`, `2 1/8e3`, a
/// decimal comma outside parentheses: `2 1/8,5`). Its value and where it ends. `depth`: the
/// parentheses open there (inside them a comma separates arguments: `max(2 1/8,1)`).
fn mixed_fraction(cs: &[(usize, char)], mut i: usize, depth: usize) -> Option<(f64, usize)> {
/// decimal comma: `2 1/8,5`). Its value and where it ends. `in_call`: directly in a function call
/// there (a comma separates arguments: `max(2 1/8,1)`).
fn mixed_fraction(cs: &[(usize, char)], mut i: usize, in_call: bool) -> Option<(f64, usize)> {
let digits = |from: usize| cs.get(from..).map_or(0, |rest| rest.iter().take_while(|(_, c)| c.is_ascii_digit()).count());
let space = i;
while cs.get(i).is_some_and(|(_, c)| *c == ' ' || *c == '\t') {
@@ -485,7 +505,7 @@ fn mixed_fraction(cs: &[(usize, char)], mut i: usize, depth: usize) -> Option<(f
let end = i + numerator + 1 + denominator;
let next = |k: usize| cs.get(end + k).map(|(_, c)| *c);
let continues = matches!(next(0), Some('.'))
|| (depth == 0 && matches!(next(0), Some(',')) && next(1).is_some_and(|c| c.is_ascii_digit()))
|| (!in_call && matches!(next(0), Some(',')) && next(1).is_some_and(|c| c.is_ascii_digit()))
|| (matches!(next(0), Some('e' | 'E')) && next(1).is_some_and(|c| c.is_ascii_digit() || c == '-' || c == '+'));
if denominator == 0 || continues {
return None;
@@ -589,9 +609,11 @@ pub fn is_literal(s: &str) -> bool {
}
}
/// Is the expression a bare number without a unit, like `20` or `-1.5`?
/// Is the expression a bare number without a unit, like `20` or `-1.5`? A leading `=` only marks
/// a formula (#4681), so `=20` is the same bare number.
pub fn is_bare_number(s: &str) -> bool {
is_literal(s) && s.trim().trim_start_matches(['-', '+']).trim().parse::<f64>().is_ok()
let number = s.trim().strip_prefix('=').unwrap_or(s);
is_literal(s) && number.trim().trim_start_matches(['-', '+']).trim().parse::<f64>().is_ok()
}
/// Is `s` shaped like a parameter name: a letter or `_`, then letters, digits and `_`? The shape
@@ -943,6 +965,24 @@ fn call(f: &str, args: &[Value], d: Defaults) -> Result<Value, DocError> {
unit_fn(r * if scale != 0.0 { scale } else { 1.0 }, a)
}
"exp" => Value::num(num(one()?)?.exp()),
"sinh" => Value::num(num(one()?)?.sinh()),
"cosh" => Value::num(num(one()?)?.cosh()),
"tanh" => Value::num(num(one()?)?.tanh()),
"asinh" => Value::num(num(one()?)?.asinh()),
"acosh" => {
let x = num(one()?)?;
if !(x >= 1.0) {
return Err(DocError::Expr("`acosh` needs a number of at least 1".into()));
}
Value::num(x.acosh())
}
"atanh" => {
let x = num(one()?)?;
if !(x > -1.0 && x < 1.0) {
return Err(DocError::Expr("`atanh` needs a number between -1 and 1, both excluded".into()));
}
Value::num(x.atanh())
}
"ln" | "log" | "log10" => {
let x = num(one()?)?;
if x <= 0.0 {
@@ -1214,7 +1254,13 @@ mod tests {
// Inside parentheses a comma still separates a function's arguments.
assert_eq!(ev("max(1,2)", Kind::Unitless).unwrap(), 2.0);
assert_eq!(ev("max(1 mm, 3, 2)", Kind::Length).unwrap(), 3.0);
assert_eq!(ev("(2,5)", Kind::Unitless).ok(), None, "a comma inside parentheses is not a decimal comma");
// Plain parentheses have no arguments to separate (#9408), also inside a call.
assert_eq!(ev("(2,5)", Kind::Unitless).unwrap(), 2.5);
assert_eq!(ev("-(width-0,5)/2", Kind::Length).unwrap(), -19.75);
assert_eq!(ev("(,5)", Kind::Unitless).unwrap(), 0.5);
assert_eq!(ev("(2 1/8,5)", Kind::Unitless).unwrap(), 2.0 / 8.5);
assert_eq!(ev("max((1,5), 1)", Kind::Unitless).unwrap(), 1.5);
assert_eq!(ev("(max(1,2))", Kind::Unitless).unwrap(), 2.0);
// Not between two digits, or a second comma: still an error.
for bad in ["2,", "2 ,5", "2, 5", "1,5,3", "1.5,3", ",5,3", ",5.3", "width ,5", "(1) ,5"] {
assert!(ev(bad, Kind::Unitless).is_err(), "{bad}");
@@ -1328,6 +1374,15 @@ mod tests {
assert!((ev("atan2(1; 1)", Kind::Angle).unwrap() - std::f64::consts::FRAC_PI_4).abs() < 1e-12);
assert!((ev("exp(ln(5))", Kind::Unitless).unwrap() - 5.0).abs() < 1e-12);
assert!((ev("log(1000)", Kind::Unitless).unwrap() - 3.0).abs() < 1e-12);
// Hyperbolic functions (#9332): their definitions in exp, identities and inverses.
assert!((ev("cosh(1.5) - (exp(1.5) + exp(-1.5)) / 2", Kind::Unitless).unwrap()).abs() < 1e-12);
assert!((ev("sinh(1.5) - (exp(1.5) - exp(-1.5)) / 2", Kind::Unitless).unwrap()).abs() < 1e-12);
assert!((ev("tanh(0.7) - sinh(0.7) / cosh(0.7)", Kind::Unitless).unwrap()).abs() < 1e-12);
assert!((ev("cosh(2) ^ 2 - sinh(2) ^ 2", Kind::Unitless).unwrap() - 1.0).abs() < 1e-12);
assert!((ev("asinh(sinh(1.25))", Kind::Unitless).unwrap() - 1.25).abs() < 1e-12);
assert!((ev("acosh(cosh(1.25))", Kind::Unitless).unwrap() - 1.25).abs() < 1e-12);
assert!((ev("atanh(tanh(0.5))", Kind::Unitless).unwrap() - 0.5).abs() < 1e-12);
assert_eq!(ev("cosh(0) + sinh(0) + tanh(0) + asinh(0) + acosh(1) + atanh(0)", Kind::Unitless).unwrap(), 1.0);
assert_eq!(ev("floor(2.7) + ceil(0.2) + round(1.5) + abs(-1)", Kind::Unitless).unwrap(), 6.0);
assert!((ev("1 rad", Kind::Angle).unwrap() - 1.0).abs() < 1e-12);
assert!((ev("acos(0)", Kind::Angle).unwrap() - std::f64::consts::FRAC_PI_2).abs() < 1e-12);
@@ -1337,6 +1392,22 @@ mod tests {
assert_eq!(ev("width^2 / width", Kind::Length).unwrap(), 40.0);
}
/// The hyperbolic functions (#9332) take a unit-less number, and the inverses refuse what lies
/// outside their domain, as `asin` and `ln` do.
#[test]
fn hyperbolic_functions_refuse_units_and_numbers_outside_their_domain() {
for (e, says) in [
("cosh(2 mm)", "`cosh` needs a unit-less number"),
("tanh(30 deg)", "`tanh` needs a unit-less number"),
("acosh(0.5)", "`acosh` needs a number of at least 1"),
("atanh(1)", "`atanh` needs a number between -1 and 1"),
("atanh(-1.5)", "`atanh` needs a number between -1 and 1"),
] {
let err = ev(e, Kind::Unitless).map(|v| v.to_string()).unwrap_or_else(|e| e.to_string());
assert!(err.contains(says), "{e}: {err}");
}
}
/// A count from a length (`(L - 20) / 210`, the 210 read as unit-less) names the fix (#5901).
#[test]
fn a_length_where_a_count_is_expected_says_to_divide_by_a_length() {
@@ -1449,6 +1520,8 @@ mod tests {
assert!(is_literal("20") && is_literal("-1.5 in") && is_literal("3 deg"));
assert!(!is_literal("d1") && !is_literal("2 * 3") && !is_literal("2 width"));
assert!(is_bare_number(" -1.5 ") && is_bare_number("+2") && !is_bare_number("20 mm") && !is_bare_number("(2)"));
// A leading `=` only marks a formula (#4681): `=5` is the bare number `5`, not `==5`.
assert!(is_bare_number("=5") && is_bare_number(" = -1.5") && !is_bare_number("=5 mm") && !is_bare_number("==5") && !is_bare_number("=d3"));
assert_eq!((length_unit_or_mm(" in "), length_unit_or_mm("deg"), length_unit_or_mm("")), ("in", "mm", "mm"));
}
+122 -36
View File
@@ -13,12 +13,30 @@ pub struct FaceAnchor {
pub component: u64,
pub path: Vec<u64>,
pub author_path: Vec<u64>,
/// Source component to author component at capture, for an independently placed part.
/// Body offsets and source geometry remain live; later assembly moves do not reshape it.
/// Older attachments without this field retain their live placement relationship.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub placement: Option<crate::Mat>,
/// Origin and x direction in the exact canonical face plane's coordinates.
pub coordinates: [f64; 2],
pub x_axis: [f64; 2],
}
impl FaceAnchor {
/// Re-express a captured context when definitions (not their occurrences) change frames.
pub fn reframe_placement(&mut self, author: &crate::Mat, source: &crate::Mat) -> Result<()> {
if let Some(placement) = self.placement {
let inverse = crate::mat_inverse(source).ok_or_else(|| DocError::Invalid("attached source frame is invalid".into()))?;
let placement = crate::mat_mul(&crate::mat_mul(author, &placement), &inverse);
if !crate::valid_transfer_matrix(&placement) {
return Err(DocError::Invalid("invalid captured face placement".into()));
}
self.placement = Some(placement);
}
Ok(())
}
pub fn remap_target(
&mut self,
features: &std::collections::BTreeMap<u64, u64>,
@@ -47,6 +65,7 @@ impl FaceAnchor {
|| self.path.iter().chain(&self.author_path).any(|id| *id == 0)
|| (self.component == 0 && !self.path.is_empty())
|| (self.component != 0 && self.path.is_empty())
|| self.placement.as_ref().is_some_and(|m| !crate::valid_transfer_matrix(m))
|| self.coordinates.iter().any(|value| !value.is_finite() || value.abs() > 1e9)
|| self.x_axis.iter().any(|value| !value.is_finite())
|| (self.x_axis[0].hypot(self.x_axis[1]) - 1.).abs() > 1e-6
@@ -70,13 +89,11 @@ impl FaceAnchor {
}
let inverse = crate::mat_inverse(&self.author_frame(doc, author)?)
.ok_or_else(|| DocError::Invalid("attached sketch author frame is invalid".into()))?;
let source = EmbossFace {
body: self.target.body.clone().into(),
at: crate::FacePick(self.target.point),
path: self.path.clone(),
author_path: self.author_path.clone(),
};
Ok(crate::mat_mul(&inverse, &source.body_frame(doc, body)?))
// Resolve both paths even with a captured placement: a missing or reparented source
// must still fail explicitly rather than silently reusing an unrelated definition.
let source = EmbossFace::component_frame(doc, self.component, &self.path)?;
let relative = self.placement.unwrap_or_else(|| crate::mat_mul(&inverse, &source));
Ok(doc.model_body_offset(body).map_or(relative, |offset| crate::mat_mul(&relative, offset)))
}
}
@@ -172,7 +189,43 @@ impl Document {
author: u64,
author_path: &[u64],
) -> Result<FaceAnchor> {
// A construction certificate that names this face alone, else its exact history name.
let target = self.flat_face_target(body, index)?;
let source = self
.anchor_face_plane(body, index, target.certificate.as_ref())
.ok_or_else(|| DocError::Invalid("this face has no exact planar source; choose a fixed plane instead".into()))?;
let mut anchor = FaceAnchor {
target,
component: self.model_body_component(body),
path: target_path.to_vec(),
author_path: author_path.to_vec(),
placement: None,
coordinates: [0., 0.],
x_axis: [1., 0.],
};
let canonical = map_plane(&anchor.source_to_author(self, author, body)?, &source)?;
if picked.normal().dot(canonical.normal()) < 1. - 1e-7 || (picked.origin - canonical.origin).dot(canonical.normal()).abs() > 1e-7 {
return Err(DocError::Invalid("picked plane does not match its exact source face".into()));
}
let delta = picked.origin - canonical.origin;
anchor.coordinates = [delta.dot(canonical.x), delta.dot(canonical.y)];
anchor.x_axis = [picked.x.dot(canonical.x), picked.x.dot(canonical.y)];
// A part built against another component uses that assembly context to define its
// own shape. Moving either occurrence later must not move the sketch inside the part.
// Root sketches and references inside the same component keep their live placements.
if author != 0 && author != anchor.component {
let inverse = crate::mat_inverse(&anchor.author_frame(self, author)?)
.ok_or_else(|| DocError::Invalid("attached sketch author frame is invalid".into()))?;
let source = EmbossFace::component_frame(self, anchor.component, &anchor.path)?;
anchor.placement = Some(crate::mat_mul(&inverse, &source));
}
anchor.validate()?;
Ok(anchor)
}
/// A target for flat face `index` of `body` that a rebuild finds again: a construction
/// certificate that names this face alone, else its exact history name. What a sketch on a
/// face and a print face hold.
pub(crate) fn flat_face_target(&self, body: &ModelBody, index: usize) -> Result<ConfigFaceTarget> {
let certified = body
.body
.face_plane(index)
@@ -185,39 +238,24 @@ impl Document {
let indices = self.configuration_face_indices(body, &target)?;
// A copy a pattern or mirror made on the same body carries its seed's certificate,
// which finds the seed's face: the copy is attached by its own history name below.
// A face that is no copy, on the plane of the pieces the certificate finds, is
// another piece of that face (a piece a later join left bordering another body,
// and named after it): the certificate stands for it too (#9465).
if !indices.contains(&index) {
return Err(DocError::Invalid("this face has no supported construction certificate; choose a fixed plane instead".into()));
let names = crate::naming::names(body);
let copy = names.faces.get(index).is_none_or(|name| crate::persistent_name::is_copy(name));
let all: Vec<usize> = indices.iter().copied().chain([index]).collect();
if copy || self.coplanar_pieces(body, &all, |_| true).is_err() {
return Err(DocError::Invalid("this face has no supported construction certificate; choose a fixed plane instead".into()));
}
}
self.coplanar_pieces(body, &indices, |_| true)?;
Ok(target)
});
let target = match certified {
Ok(target) => target,
Err(error) => match body.body.planar_face(index).and_then(|plane| self.lineage_face_target(body, index, plane.origin)) {
Some(target) => target,
None => return Err(error),
},
};
let source = self
.anchor_face_plane(body, index, target.certificate.as_ref())
.ok_or_else(|| DocError::Invalid("this face has no exact planar source; choose a fixed plane instead".into()))?;
let mut anchor = FaceAnchor {
target,
component: self.model_body_component(body),
path: target_path.to_vec(),
author_path: author_path.to_vec(),
coordinates: [0., 0.],
x_axis: [1., 0.],
};
let canonical = map_plane(&anchor.source_to_author(self, author, body)?, &source)?;
if picked.normal().dot(canonical.normal()) < 1. - 1e-7 || (picked.origin - canonical.origin).dot(canonical.normal()).abs() > 1e-7 {
return Err(DocError::Invalid("picked plane does not match its exact source face".into()));
match certified {
Ok(target) => Ok(target),
Err(error) => body.body.planar_face(index).and_then(|plane| self.lineage_face_target(body, index, plane.origin)).ok_or(error),
}
let delta = picked.origin - canonical.origin;
anchor.coordinates = [delta.dot(canonical.x), delta.dot(canonical.y)];
anchor.x_axis = [picked.x.dot(canonical.x), picked.x.dot(canonical.y)];
anchor.validate()?;
Ok(anchor)
}
/// The faces an attachment stands for, and a note when they were found by fallback.
@@ -378,7 +416,8 @@ impl Document {
pub fn validate_face_anchor_json(value: &Value) -> Result<()> {
let fields = value.as_object().ok_or_else(|| DocError::Invalid("face anchor must be an object".into()))?;
if fields.len() != 6 || fields.keys().any(|key| !["target", "component", "path", "author_path", "coordinates", "x_axis"].contains(&key.as_str()))
if !(6..=7).contains(&fields.len())
|| fields.keys().any(|key| !["target", "component", "path", "author_path", "placement", "coordinates", "x_axis"].contains(&key.as_str()))
{
return Err(DocError::Invalid("unknown or missing face anchor fields".into()));
}
@@ -412,6 +451,15 @@ pub fn validate_face_anchor_json(value: &Value) -> Result<()> {
return Err(DocError::Invalid("face anchor basis must be normalized".into()));
}
}
if let Some(placement) = fields.get("placement").filter(|v| !v.is_null()) {
if placement.as_array().is_none_or(|rows| rows.len() != 4 || rows.iter().any(|row| row.as_array().is_none_or(|row| row.len() != 4))) {
return Err(DocError::Invalid("face anchor placement requires a 4x4 matrix".into()));
}
let matrix: crate::Mat = serde_json::from_value(placement.clone()).map_err(|_| DocError::Invalid("invalid face anchor placement".into()))?;
if !crate::valid_transfer_matrix(&matrix) {
return Err(DocError::Invalid("face anchor placement must be a finite rigid transform".into()));
}
}
Ok(())
}
@@ -520,6 +568,44 @@ mod tests {
.unwrap();
assert!(doc.resolve_face_anchor(&anchor, 0, &state).is_err(), "reused name cannot replace the producer");
}
#[test]
fn captured_component_placement_is_rigid_and_legacy_anchors_stay_live() {
let (mut doc, body, index, picked) = fixture();
let author = doc.add_component(Some("Part"), 0).unwrap();
let path = doc.first_path(author);
let anchor = doc.capture_face_anchor(&body, index, &picked, &[], author, &path).unwrap();
assert_eq!(anchor.placement, Some(crate::IDENTITY));
let raw = serde_json::to_value(&anchor).unwrap();
assert!(validate_face_anchor_json(&raw).is_ok());
let restored: FaceAnchor = serde_json::from_value(raw.clone()).unwrap();
assert_eq!(restored, anchor);
for placement in [
serde_json::json!([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0]]),
serde_json::json!([[2, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]),
serde_json::json!([[-1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]),
serde_json::json!([[1, 0, 0, 1], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]),
serde_json::json!([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [1e10, 0, 0, 1]]),
] {
let mut invalid = raw.clone();
invalid["placement"] = placement;
assert!(validate_face_anchor_json(&invalid).is_err(), "{invalid}");
if let Ok(invalid) = serde_json::from_value::<FaceAnchor>(invalid) {
assert!(invalid.validate().is_err());
}
}
let mut legacy = raw;
legacy.as_object_mut().unwrap().remove("placement");
assert!(validate_face_anchor_json(&legacy).is_ok());
let legacy: FaceAnchor = serde_json::from_value(legacy).unwrap();
doc.occurrences.iter_mut().find(|o| o.component == author).unwrap().transform[3][0] = 40.;
let mut state = ModelState::default();
state.bodies.push(body);
assert!(doc.resolve_face_anchor(&anchor, author, &state).unwrap().origin.dist(picked.origin) < 1e-9);
assert!(doc.resolve_face_anchor(&legacy, author, &state).unwrap().origin.dist(picked.origin - Vec3::X * 40.) < 1e-9);
doc.occurrences.clear();
assert!(doc.resolve_face_anchor(&anchor, author, &state).is_err(), "a captured context still validates its paths");
}
#[test]
fn nested_anchor_offset_tracks_source_and_raw_budgets_precede_decode() {
let (doc, body, index, picked) = fixture();
+1
View File
@@ -202,6 +202,7 @@ fn construction_names_follow_renames_in_every_definition() {
let planes = [
json!({"type": "midplane", "a": plane, "b": plane}),
json!({"type": "two_edges", "a": axis, "b": axis}),
json!({"type": "axis_point", "axis": axis, "point": point}),
json!({"type": "three_points", "a": point, "b": point, "c": point}),
json!({"type": "tangent", "face": plane, "at": [0, 0, 0]}),
json!({"type": "along_path", "path": axis, "t": "0.5"}),
@@ -0,0 +1,6 @@
//! Browser groups can nest and be ordered. A group saves its `parent` group (omitted at the top
//! level); a group's items and a folder's `browser_order` list may name groups as numbers beside
//! item keys as strings; and `browser_order` has a `"<component>/components"` list ordering a
//! component's sub-components by placement id. Older designs read unchanged: they have no
//! parents and no group entries. The last release refuses the newer format and asks for an
//! update instead of dropping the nesting and the order.
@@ -0,0 +1,7 @@
//! A point cloud keeps the other properties its file gives its points (#8816): named numbers per
//! point in `complex` (`columns`, each whole-numbered or not, and the `names` a whole-numbered one's
//! values carry), and it can be coloured by one of them (`color_by: "property"`, with
//! `color_property`, the ramp over `height_range`) and shown only where `filters` keep it (ranges,
//! or sets of named values). Older designs need no transformation: their clouds have no other
//! properties and no filters. The last release refuses a design saved with this (the newer format
//! number) instead of opening its clouds without their properties, colouring and filters.
+5
View File
@@ -0,0 +1,5 @@
//! A design saves the print face of its bodies (`print_faces`, by body name): the flat face a
//! slicer export lays on the print bed, held by the same face target a sketch on a face holds.
//! An older design has none, and every body is exported as it lies, as before. The last
//! release refuses a design that has print faces and asks for an update, instead of opening it
//! and losing them on the next save.
@@ -0,0 +1,5 @@
//! A point-to-point Align can save `axes`: the directions it moves along, as the chosen world
//! X/Y/Z axes in the frame of the bodies being moved (if it is absent, all three axes are used and
//! the offset is applied in full). Older designs need no transformation: they align on all three
//! axes as before. The last release refuses a design that has this (it refuses the newer format
//! number) rather than moving the bodies on all three axes.
@@ -0,0 +1,5 @@
//! An equation curve can save `variable_unit: "range"`: its variable is a length, as its range is,
//! instead of a plain number (#9333). An older design has none, and its variable stays a plain
//! number, as before; a curve with a plain variable saves nothing new. The last release refuses a
//! design with this change and asks for an update, instead of opening it and losing the key on the
//! next save.
@@ -0,0 +1,5 @@
//! A linked component's link saves `file_sha256`, the SHA-256 of the linked design file's bytes
//! as the assembly last read them, so an assembly opened again knows which linked designs changed
//! while it was closed (#9739). Older designs read unchanged: their links have no digest and are
//! taken as up to date until Update Links reads them. The last release refuses the newer format
//! and asks for an update instead of dropping the digests.
@@ -0,0 +1,5 @@
//! A component marked out of the History bar saves `history_hidden: true` on its component
//! entry, so its features (and its children's) stay out of the History bar while still
//! rebuilding. Older designs carry no such flag and every component shows its features, which
//! is exactly the flag's default; the last release refuses this newer format and asks for an
//! update instead of silently dropping the flag on the next save.
@@ -0,0 +1,5 @@
//! Cross-component face anchors in a part save the source-to-author component placement at
//! creation, so assembly moves do not reshape the part. Source geometry and body offsets stay
//! associative. Older anchors without `placement` retain their live placement relationship;
//! redefining their sketch plane captures a new context. The last release refuses this newer
//! format and asks for an update instead of dropping the captured placement.
@@ -0,0 +1,3 @@
//! Construction planes can store an associative axis and off-axis point reference.
//! Older designs keep their existing plane definitions unchanged. The last release
//! asks for an update rather than opening a design with this new plane definition.
+1 -1
View File
@@ -50,7 +50,7 @@ fn edge_index(b: &ModelBody, name: Option<&str>, pick: Vec3) -> Option<usize> {
fn face_of(b: &ModelBody, i: usize, name: Option<&str>, pick: Vec3) -> Result<(usize, Vec3, Vec3)> {
let m = b.mesh();
let beside: Vec<usize> = m.edge_faces.get(i).map(|fs| fs.iter().map(|f| *f as usize).collect()).unwrap_or_default();
let infos = b.body.faces(tol(b))?;
let infos = b.joint_faces()?;
let planar = |f: usize| infos.iter().find(|x| x.index == f).and_then(|x| x.plane_normal.map(|n| (x.index, n, x.centroid, x.area)));
let chosen = match name {
Some(n) => {

Some files were not shown because too many files have changed in this diff Show More