d5bd3b94fca9517bc22a3a453d97cc90eaba91fe
1950
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d5bd3b94fc | Drawing: reuse polygon and slot tools on paper sketches (#7082) | ||
|
|
03234e382c | Drawing: extend sheet geometry through shared tools (#7082) | ||
|
|
791d55f16c |
Drawing: publish sheet edits through the session boundary (#7082)
Address CamWight review 5669052056: explicit paper frame, staged Drawing edits, uniform save validation and preserved cumulative bounds. Keep the existing store and Session as the publication/history owner. Full workspace and GUI acceptance remain pending. |
||
|
|
375d750096 |
Drawing: edit sheet sketches through shared commands (#7082)
Add an explicitly owned sheet entry, typed create/edit/inspect/cancel commands, and reuse the existing rectangle/line/point implementations through the W38.0 store and R2 atomic solver boundary. Preserve source parameters and model active state; restore the sheet entry through drawing undo/redo and checkpoints. Eight new command tests pass. Across the selected original and new engine groups: 479 unique passed, zero failed, two pre-existing ignored. Native engine check, strict Clippy and wasm pass. Source-hashed CI-profile artifact reused for all runtime checks. Full repository and native/browser UI acceptance remain pending; this is a command subset, not all sketch tools or complete W38a. No kernel, format, dependency, shared catalog or CI changes. The pending locale delta needs main's existing #6448 loader on the drawings receiver. Original Cam store tests and commits retained; no competing store or parent claim. |
||
|
|
c86f2790fe |
WIP: compose the shared sketch store on Drawing's K receiver (#7082)
Adapt the existing W38.0 routing from CamWight/solidcraft #6336 at 079846530c24191c8f59d14ba6bdc9f5d144e01c, without importing newer main features absent from this receiver. The complete original sketch_store.rs module is byte-identical under LF normalization, including its three tests. The original routing work is Cameron Wight's; this commit adapts its callers, adds two receiver-isolation tests and records the exact scope. Original source commits: 2310b511, c806f606, 2307757a. The later fb99e735 and 07984653 callers do not exist on this K receiver. Preserve the receiver's run_links semantics, design-only access and all original test expectations. No active drawing sketch or UI is enabled. Static source/format checks pass. Native build was not admitted below 4 GiB free RAM. One metadata-only check was stopped at the unchanged 2 GiB safety floor before reaching engine; no Rust test or full CI pass is claimed. Explicit user-requested WIP preservation; stays draft and needs validation. Co-authored-by: Cameron Wight <camfrawig@hotmail.co.uk> |
||
|
|
5b064e8e26 |
feat(drawing): resolve and apply sheet-sketch edits atomically (#7082)
Reuse the existing parameter evaluator and sketch solver with read-only source values and exact drawing ownership. Ten original cases; complete doc library 330/0/1 existing ignore, strict scoped Clippy and wasm pass. Full workspace gate remains unqualified on this drawings receiver. No commands, lifecycle, kernel, schema or CI changes. |
||
|
|
bc51e0f80a |
test(drawing): verify sheet sketches through design containers (#7082)
Three original real-file acceptance cases in the existing IO drawing tests. Production/schema unchanged. Full affected IO suite, strict scoped Clippy and wasm pass; earlier incomplete full-workspace gate stays explicit in draft #7608. No editor/lifecycle completion claimed. |
||
|
|
2deda2276d |
feat(drawing): store bounded sheet-sketch records (#7082)
First data-only W38a increment on the existing embedded drawing receiver. Native doc library, strict scoped Clippy and wasm pass; the actual full-repository gate result remains explicit in draft PR #7608. No editor, kernel or CI changes. |
||
|
|
e0cd0c982b | claim: #7082 | ||
|
|
36cf48a3f6 |
Unknown-command tests: the closest id first (#3890)
drawing.open now joins doc.open in the suggestion for `file.open`, as the rule says: both end in the same word. The engine's and the CLI's tests check that doc.open comes first and let other close ids follow, as the `solid.extrud` line beside them already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
e0cb46c1ef |
Drawing commands on the design's own drawings, each drawing its own undo (#3890)
K4' of the drawing storage plan, on K3b (a drawing lives in its design's file): make, list, open, close and delete a design's drawings, and read and change the open one's settings and properties. It replaces #3891's drawing sessions, which held a drawing as a file of its own. - `drawing.create {name?, language?, units?}` adds a drawing of the design (one ISO A3 landscape sheet with the ISO border, the design its one source) and opens it; refused on an empty design. `drawing.list`, `drawing.open {drawing}`, `drawing.close`, `drawing.delete {drawing}`. `drawing.inspect`, `drawing.set`, `drawing.properties`, `.properties.set`, `.properties.remove` work on the open drawing. Labels in en, ja and zh. - The open drawing is the session's (`Session::open_drawing`, kept in checkpoints), and the part gate keeps the parts apart: a command says the part it works on, the model unless it says otherwise (`.in_drawing()`, `.any_part()`). While a drawing is open the model's commands wait ("a drawing is open: close it to change the model"); the drawing's run only while one is. Files, recovery, undo and redo, checkpoints, selection, diagnostics, the command list and choosing a drawing work either way. `CommandSpec::allowed` is the one check running a command, running it inside another and listing it make. - `Session::drawing` and `Session::edit_drawing` are the open drawing's one way in: an edit is kept when it changed something and still keeps the record's rules, in a new design whose other drawings are shared. - A change that only touches drawings evaluates nothing: `Document::differs_only_in_drawings` joins the render-only path, as render settings and part properties do. A model edit shares every drawing, so it pays nothing for the check. - Undo per part: a step records the part it changed (`Snapshot::part`: a drawing, or the model and its list of drawings). Undo and redo go through the open part's steps only. A drawing's step puts back only that drawing; the model's step puts back the design as it was, keeping each drawing it had as it is now. Making and deleting a drawing are the model's steps. A new step ends what could be redone in its own part only. `Snapshot::of` is the one place a step is taken. - An agent's message that changed several parts keeps their steps apart, rather than merging them into one step that would undo only one part. - `cmd::metadata`'s rules for reading, setting and removing properties are written once (`reading`, `setting`, `removing`) and used by the design's and the drawing's commands. - `drawing::sort` is the one place the drawings' order (by name, then id) is kept; `Document::put_drawing` adds or replaces one in that order. Tests: making, listing, opening, closing and deleting; what making one refuses, at the cap too; the gate both ways, inside another command and in the command list; drawing edits as undo steps that evaluate nothing over 100 rounds; undo and redo per part with model and drawing steps interleaved; redo ended per part; the order by name, then id, after renames; delete and its undo; refused changes; checkpoints; save and open in both forms; properties; hostile values for every command that runs with a drawing open, from the registry; a fuzz of the steps in any order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
472a330691 |
Drawings saved inside the design's file, in both forms (#3890)
K3b of the drawing storage plan, after #7098: a drawing lives in the file of the design it draws (bherbruck's proposal, Cameron's choice), so the separate drawing file goes. - `Document.drawings`: the design's drawings, each its own record of the drawing family (`solidcraft-drawing/N`), each behind its own `Arc`. Every reader and writer of a design now carries them: save, Save As, autosave and recovery, crash copies, the CLI. - A design container keeps each drawing in its own entry, `drawings/<id>.json` (Deflate), beside `document.json`, which holds nothing of them: its bytes, and the model cache keyed to them, are the same with drawings or without. A plain JSON design keeps them inline under `drawings`. - Each drawing is read by its own family's rules, taken out of the design's JSON before the design's own checks. One a build can't read (a newer number, a change it doesn't know, damage) refuses the whole design, never dropped. So does an entry under `drawings/` that isn't a drawing's, one whose record has another id, drawings inline in a container's `document.json`, two drawings with one id, or more than 1,000 (counted before any is read). A design is never saved with two drawings of one id. - Drawings are listed by name, then id: no stored order, nothing to merge when two people add drawings. - A drawing has an `id`, unique among its design's drawings (`Drawing::new` takes the ids already taken). Its source is the design it is in: at most one, an id and no path. - One pending design change, `drawings`: the last release refuses a design saved with it, so it never opens one and saves it without its drawings. One pending drawing change, `in-design`, for the record's new shape. - Gone: `read_drawing`, `read_drawing_file`, `write_drawing_container`, `file_kind`, `FileKind`, `DRAWING_EXT` and `is_drawing_path`. `read_document`, `read_design` and the container writer are as they were before #7098, with the drawings added. Tests: a design's drawings round-trip through both forms byte for byte, with `document.json` and `container.json` the same with drawings or without; their order; every refusal above; a drawing's properties kept as other tools wrote them while a sheet's number out of range is refused; the drawing's id among its objects', a new drawing's id none of the design's; a design with two drawings of one id not saved; mutation fuzz of a design with drawings in both forms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ebafe07487 |
Drawing W06a: exact orthographic hidden lines for the analytic subset (#2455) (#2457)
* Drawing W06a: exact orthographic hidden lines for the analytic subset (#2455) crates/geom/src/hlr (L0): prepare once per body, then hidden_lines for a scene of placed bodies. Edges and face silhouettes are projected from their exact curves, split where projections cross, and each piece is classified by rays toward the viewer against the trimmed faces: visible, hidden or explicitly uncertain, never guessed. Planes, cylinders, cones, spheres and tori are supported whether stored as analytic records, revolutions or spline patches; freeform faces are reported and make what they could hide uncertain. Screen geometry is Seg2 with the W01a accuracy vocabulary: exact lines and conic arcs where the projection is exact, bounded chords otherwise. docs/drawing-hlr.md holds the contract and its limits. * geom/hlr: handle the brep records main gained in #3093 Main's exact model storage (#3093) added Curve::SurfaceIntersection, Surface::PlaneThrough and Surface::PlacedRevolution, and the HLR matches on the records no longer compiled. A plane through three points is a plane: it is trimmed and intersected as one, and a box stored that way draws the same bits as one with axis-stored planes. The procedural intersection curve and the placed revolution (whose affine placement may scale it unevenly) are refused by prepare as not supported yet, until the kernel adapter handles them. The records' positions move with the body's centre like the others. * geom/hlr: pad plane faces' boxes, so a plane record off by rounding still hides Plane faces took the box of their boundary chords unpadded, flat along the normal. When the plane record and its edges disagree by rounding (a unit cube's top plane one ulp above its edges, a 100 mm cube's 1e-11), the ray toward the viewer reached the plane just outside that box, the slab test culled the hit, and the back edges came out Visible with no doubt. Every face's box is now padded by 1e-6 of its size, as curved faces' boxes already were. Reported by DevonHope on #2457. * geom/hlr: limits from review: trim samples, scene extent, crossing pairs, surface groups From DevonHope's review of #2457: - Options::trim_samples must be 1 to MAX_TRIM_SAMPLES (4096). - Placed bodies must stay within MAX_COORDINATE (1e12 mm, as section and brep bound stored numbers). Placements 1e200 apart made the scene's size infinite and every tolerance taken from it with it, so everything came out Visible. - The crossing search counts its candidate pairs before it starts and meets each pair only in the first grid cell the two segments share, instead of keeping a set of the pairs met, which could outgrow wasm's 4 GB before the 500 million pair budget tripped. The same pairs in the same order. - prepare groups faces on one quadric or torus by comparing each face with the faces of its kind whose size agrees to the tolerance (sorted), not with every face; at most 50 million comparisons. prepare_cancellable polls a cancel callback between edges, faces and comparisons. * geom/hlr: boundary chords on a grid, and no fine pass over coincident curved chords The cost items of DevonHope's review of #2457: - Every ray hit asked how far it lies from its face's boundary by scanning all of the face's chords (4096 per circle; a plate's face with 256 holes has about a million). The chords are now bucketed on a uniform grid over the boundary's box, cells at least as long as the longest chord, and the test looks only at the cells around the point. It finds exactly the chords the scan finds. - Chords of two curved curves that lie on each other end to end (aligned holes seen along their axes) were cut into 16 by 16 pieces and intersected, to find crossings that are only noise within the curves' tolerance. They are now skipped; visibility changes where a coincident run starts or ends, and chords that only partly overlap still find those. - Fixtures: a plate with holes, coaxial cylinders seen along their axis, and 300 placements. * geom/hlr: pad boxes by the body's coordinates too; coincident chords only to rounding Review of the previous commits found two holes: - The padding grew with the face's size, but rounding grows with where the body was modelled: a 0.001 mm cube 1e7 mm out, its top plane one step (1.9e-9 mm) above its edges, still had its hit culled. The pad now adds 1e-12 of the body's offset. - Two chords were taken for coincident when their ends lay within each other's sag, which in a coarse scene can hide real crossings: an arc can bulge across a line 1 mm off its chord twice. Only chords that coincide to rounding are skipped now; identical projections, the costly case, still are. * geom/hlr: coincident curves meeting at shared sample points do not cross Timing the review's scenes showed that skipping coincident chords was not enough: chords of two coincident curves also touch end to end at every sample point they share, and each touch was a crossing to refine and split at. 64 coaxial cylinders seen along their axis gave 8.3 million crossings (19 s), 64 cylinders one behind another along the line of sight 4.2 million (214 s; before these commits the crossing budget refused it). A touch at a shared sample point is now dropped when the two curves also coincide, to rounding, on both sides of it. Where a coincident run starts or ends one side differs, and the touch is kept. * geom/hlr: the own-face margin allows for rounding where a body was modelled The far 0.001 mm cube of the previous commit showed a second effect of records rounded at large coordinates: its top plane, one ulp (1.9e-9 mm) above its edges, hid the top edges themselves, because a ray leaving an edge met its own face 3.2e-9 mm along, past the own-face margin of 1e-6 of the face (1.4e-9). The margin now also covers 1e-14 of the body's offset (about 45 ulps of its coordinates), which only matters for parts far smaller than their distance from the origin. * geom/hlr: no parity test for a hit on the boundary, where it is uncertain anyway * docs/drawing-hlr: the fixtures of the review's second round --------- Co-authored-by: MateuszSychXpl <151755914+MateuszSychXpl@users.noreply.github.com> |
||
|
|
3575c99750 |
Drawing W18 S2: title blocks as data (#3875) (#3877)
* Title blocks: what a cell shows and where its text goes (#3875) geom::cell holds a title-block cell's content: parts of text and fields (component, drawing, sheet, revision or prompt, by key, with an optional unit and decimals kept as written for the resolver to check), at most 64 parts and 4096 bytes of text, with no control character but a line break. Beside it are a resolved value (live, overridden and drifted, or missing, with "-" for each part that couldn't be read and why), an override with the value it replaced, and the projection a drawing's views use (first or third angle), which the title block's symbol will read. A fit warns and never cuts: a count of characters, not bytes, with its own count for text in Chinese, Japanese, Korean or Yi characters. The cell text rule places a label and a value: the label's baseline 1 mm plus its cap height below the cell's top, the value box under it inset by 1 mm, one line centred in the box, and wrapped or several lines down from its top at the font's pitch, with a warning when the last falls below the box. Wrapping by width, width warnings and glyphs a font lacks need the text measured, so they wait for the paper scene's text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Title blocks: definitions and their place on a sheet (#3875) geom::title_block holds a title block's definition: its size (1 to 1000 mm a side), its outline and cell line widths, and up to 64 cells. Each cell has a snake-case name of its own, a rectangle measured from the block's lower-right corner, an optional one-line label with its cap height, and a value: text from cell content, with its cap height, alignment and fit, or the projection symbol, which reads the drawing's projection and is never fixed in the block. validate() checks a definition on its own, as when one is read: cells inside the block and not overlapping (touching is fine), label and value cap heights that fit, and the content's own limits. layout() puts the block on the drawing border's lower-right corner of a sheet, refusing one that doesn't fit, and gives each cell's rectangle, its label's place and its value box by the cell text rule. On A3 landscape a 180 x 54 mm block runs from (230, 10) to (410, 64); it fits A5 landscape and every larger sheet, but not A5 upright. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Cell text: a value box lies within the paper's coordinates (#3875) place_lines took any finite, ordered value box, but centring one far out (min x 1e308, max x 1.1e308) overflows: the anchor came back infinite, with no warning. 0xlillith found it in review of #3877. The paper scene already bounds every coordinate it holds by MAX_COORDINATE_MM (twenty times the longest sheet side). That limit is now public, and place_lines keeps its box inside it, so its anchor is always finite: one rule for what a paper coordinate may be. Tests: the hostile-box test refuses both overflow cases from the review and a box just past the limit on each side, and places lines in a box the size of the whole paper limit. The fuzz test's numbers now include values past the limit (1.1e5, ±1e308). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Title blocks: padding from the lines' inner edges, one label rule, nothing unread (#3875) A cell's text is padded from the inner edge of its lines: each side of a cell moves in by half the line drawn on it (the outline's on the block's edges, a cell line's inside), so a wide outline never covers the text. Before, the padding ran from the line's centre. The label's one-line rule lives with the cell text rules (`cell::check_label`), where parts lists will find it. The cell types nothing read yet (`Override`, `Resolved`, `State`, `Problem`, `Reason` and `MISSING`) wait for the resolver that will read them. The tests check the exact thresholds inside the lines (a label that leaves no room, a value that just fits), pick each of the lines, alignment and wrapping on their own so every combination comes up, and lay fuzzed blocks out on every standard sheet, either way, with and without the filing margin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Title blocks: the drawing border's line, descenders, room where the block sits (#3875) From DevonHope's review of #3877: - Each cell's lines are clamped to the inner edge of the drawing border's line. That line runs along the block's right and bottom edges, and along any other edge it reaches, as when the block fills the border. Aabb2::intersection, the 2D twin of Aabb3's, does the clamping. - layout checks each cell's room again where the block sits (place_cells, which validate runs at the origin), so rounding at the real corner can't turn a cell inside out. - The cell text rule counts descenders, at 3/10 of the cap height (ISO 3098's lettering B). They may reach into the padding under a value box, never past it to a line. place_lines warns Height when they would, and validate asks it whether one line fits. - The module doc no longer links to a private function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
de7bf4fc4d |
Drawing W17a: view definitions as data (#4816) (#4817)
* claim: #4816 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing views as data: named views, scales and the map onto paper (#4816, W17a P1) What a drawing view is, before anything draws it (geom::drawing_view): - NamedView: the six principal views and the isometric views from the four upper corners, each an exact basis (a Plane whose normal points back at the viewer), never taken from a camera, whose pitch clamp would tilt a top view, with no -0 to write out; `iso` reads as the front-right one. - basis_looking: any other view from its direction, an up and an origin (paper x = direction x up, paper y = x x direction), refusing a zero direction, an up along it, or an origin that isn't finite or within 1e12 mm. W07's {direction, up, origin} view reads through it. - Scale: paper : model as two positive numbers, read and written as "1:2", from 1:100000 to 1000:1; Scale::fit picks the largest ISO 5455 preset (50:1 to 1:10000) at which a view fits a space (W07's "fits the page" default), compared as size x paper <= room x model so an exact fit at a reduction isn't lost to rounding. - ViewFrame: a view's basis, scale and place on paper, the point of its plane at `centre` landing at `position_mm`. Its paper map moves the view's curves and their accuracy onto paper (paper error = scale x model error); `boundary` maps a box of its plane onto paper from its four corners. In geom, where Seg2 lives: - Similarity2 and Seg2::similar (new): scale, turn and shift a segment exactly, an arc staying an arc. Similarity2::new refuses a scale that isn't above 0 and works the turn out once, not per point; - Seg2::map_controls: a segment's control points mapped by any function. It was doc's sheet::map_controls; its four callers in doc use the method now, unchanged. CurveAccuracy::scaled gives a curve's accuracy at another scale. Tests: each named view's basis and viewer side, and the same bases from a direction and up; a 50 mm cube in every principal view at 1:1 and 1:2, and in isometric (edges 50 x sqrt(2/3), outline 50 x sqrt(2)); the view's centre on its position (W07's 100 x 20 front view on A3 at 2:1); scales read, written and refused; the fitted scale, an exact fit at 1:5 and ISO's smallest; no -0 in any named view's axes; an origin refused by its own message; hostile bases, centres and positions; every segment kind moved by a similarity, and the similarities refused; scaled accuracy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing views: the bottom view pinned, square near parallel, bounded scales and boxes (#4816) From DevonHope's review of #4817: - The tests pin all six principal views exactly. The direction-and-up test uses literal ups, so a bottom view turned half round now fails it. - basis_looking squares x to the direction before normalising. Near the 1e-9 threshold the normal was up to 8.8e-9 rad off; now it is about 1e-16. - Scale::fit fits nothing for a size or room that is negative or not finite. A size of 0 still sets no limit that way. - Each side of a scale is 1e-6 to 1e6, so a scale writes at most 49 characters. - ViewFrame::boundary returns a Result. It refuses a box that is inside out or not finite on paper, instead of dropping a corner. - paper_map, boundary and seg_to_paper say which coordinates they take. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f18616e19c |
Paper scene: SVG of a sheet, its lines, arcs, cubics and fills (#4890 A3a) (#7032)
The first export of a paper scene, as SVG first (jyviko and 0xlillith on #4890), from the research in the plan's §16. A3b adds ellipses, hyperbolas and Béziers above degree 3, which this refuses as "not supported yet". - `geom::paper::Prepared`: writers read a scene through `Scene::prepare`, which checks it first, so none reads one unchecked. Clipping goes there too, once (A8). - `geom::paper::arc_pieces`: an arc's ends in pieces of at most a quarter turn, the last its own end. A half turn drawn from its ends is ill-conditioned: rounded to the nanometre (six decimals of a millimetre) its centre moves up to 1e-2 mm, where a quarter turn's stays under 1e-6 mm. - `io::paper::paper_svg`: one user unit a millimetre, the size in mm on the root; y flipped by writing the height less y, so the file's numbers are page coordinates and an anticlockwise arc has sweep flag 0; lines `L`, arcs `A` (never large-arc), cubics `C`, parabolas `Q`; fills black and even-odd; one path per item; groups as `data-object` and `data-kind` (object ids can't be XML ids). No background, so cutters see only the marks. - Numbers are whole nanometres (six decimals of a millimetre): no exponent, no "-0", the same bytes every time. They are the writer's own state too, so a joint is written once and a closed path ends exactly on its first point. Numbers are written straight onto the document, with no text made per number. A width under half a nanometre is written as one, and a piece too short for the grid is merged into the next, both counted in the report; a path's last piece has no next, so it is kept however short (unless it has no length). Output over 64 MiB is refused. Tests: the A3 drawing border's whole document; quarter, 270°, clockwise and whole-turn arcs, and a circle of two halves giving the same four quarters; the quarter-turn boundary both sides; cubics and parabolas, and the conics refused; the number format; a closed path whose start and end round apart; a sliver merged; an open path's short last line and arc kept, and one of no length dropped; read back through our own SVG reader (lines exactly, the arc as an arc); the scene's JSON mutated into the writer (never a panic). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
657c733166 |
Drawing files: a drawing saved as a container or as plain JSON, never read as a design (#3890) (#7098)
* File format families: drawings share the design format's versioning (#3890) The format code works for a family of files: its own tag, its own numbers and its own folder of change files, with one reading of a file's format, one refusal of a file a newer build saved and one upgrade for every family. Designs (solidcraft/N) are one family and keep everything they had: FORMAT and FORMATS are as they were, and pending_names, format_string, version_of and read mean what they did. Drawings (solidcraft-drawing/N) are the other, with format 1 as their first record and each later change one file in crates/doc/src/drawing/format/pending/, as design changes are. Nothing saved changes. A design tag never reads as a drawing's or the other way round, and a file that names no format is a design from before format strings, never a drawing. Every refusal names its family; a design's read word for word as before. A design listing a pending change this build doesn't have is now refused as a newer build's before its content is checked, as a newer number already was, so a newer build's fields never read as damage. The list reader is take_names(v, key, noun), the shape #4811 uses for its own list. For the maintainer, the release step changes: scripts/fold-format-pending.sh now folds every family that crates/doc/build.rs lists (FAMILIES), each into its own next number: designs into crates/doc/src/format/v<N>/ as before, drawings into crates/doc/src/drawing/format/v<N>/ from 2. With nothing pending in a family it says so and moves nothing. Its test folds a drawing change into v2 beside the design changes. docs/releasing.md, CONTRIBUTING.md and AGENTS.md say so. build.rs lists each family's changes from its own folder, each folder's versions contiguous from its own base. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing record: format 1 of the drawing family (#3890) A drawing is now a record of its own (crates/doc/src/drawing.rs): its name, the designs it draws (sources: an id and the design file's path, relative to the drawing's folder as a linked design's is), its properties under the design metadata's rules, its units (each design's own, or one length unit of the expression unit table), its content language (a BCP 47 tag) and its sheets. A sheet holds its paper, a copy of its drawing border's profile, the resolution its pictures are rendered at (300 dpi unless it says, 25 to 2400), the component it documents and whether it is left out of the sheet count or of printing. This is format 1 of the drawing family; each later kind of record adds one file in crates/doc/src/drawing/format/pending/. The rules: one id counter for every object, raised above the largest id when a file is read and never rewound; every reference is an id that must resolve, or the file is damaged and refused, never patched; 1 to 1,000 sheets, at most 64 sources, names of 1 to 256 bytes, paths of 1 to 4,096 bytes without NUL. The same drawing always saves as the same bytes. Drawing::from_json reads at most 16 MiB of text, then runs the family's format check, the number check, the upgrade, the typed record (unknown fields refused everywhere) and Drawing::validate. The number check is now one function every family calls, Family::check_numbers, told which field holds other tools' data; a design's refusals read as before. Nothing saves or opens a drawing yet: the container is the next step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing ids: random and collision-free from format 1 (#3890) A drawing's objects now take random ids, the form jyviko chose on #3890 from #1017: no counter, so objects added on two branches never share an id and never edit one line. The allocator is one module for drawings now and designs later (#626 Phase 3), crates/doc/src/ids.rs: an IdSource gives nonzero u64s by splitmix64 from a seed, each checked against the ids in use and drawn again when it is one, or when it is 0. A run never draws a number twice, so at most one draw per id in use comes before a free one, and a seeded run over a file the same seed made still gets a new id. IdSource::seeded gives the same ids for tests and replays; IdSource::from_entropy seeds a session from the standard library's hash keys, the time and a count, with no new dependency. In a file an id is 13 characters of Crockford base32, lowercase (0000000000001 to fzzzzzzzzzzzz): ids::encode writes it and ids::decode reads only that spelling, case-sensitive, so an id has one form to search for. Anything else, 0 included, makes the drawing damaged. The drawing loses next_id (a file that holds one is refused), and Drawing::new and allocate_id take the IdSource. Messages name ids as the file writes them. The component a sheet documents stays its design's own number until designs move over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing record: a drawing too large to reopen isn't saved (#3890) from_json reads at most MAX_DRAWING_BYTES (16 MiB), but to_json had no limit. Other tools' properties are kept as they came, and indenting them can grow a drawing read in at about 4 MB past 16 MiB (two million zeros in one array), so the next read refused what the save had just written. 0xlillith found it in review of #3891. to_json now returns a Result and refuses JSON longer than a read takes ("drawing too large to save (at most 16 MiB)"), so every drawing saved opens again. Nothing writes drawing files yet, so the error reaches the future file writer before it publishes anything. Test: that case is refused, and a smaller compact drawing saves and reopens unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing files: a drawing saved as a container or as plain JSON, never read as a design (#3890) K3 of the drawing storage plan (W11.2): the file a drawing is saved in. Nothing writes one from a command yet; opening and saving come with K5. - A drawing container is a design container holding `drawing.json` (Deflate, as `document.json`) in place of `document.json`, and `container.json` says so: {"content": "drawing", "format": "solidcraft-container/1"}. A design's `container.json` is as it was, with no `content`. The plain JSON form is the drawing's own text. Both give the same bytes every save, so a drawing can live in version control as text. - `io::file_kind` tells a design from a drawing by `container.json` or by the JSON's format. The design reader refuses a drawing ("this file is a SolidCraft drawing, not a design: open it as a drawing") and the drawing reader a design; plain JSON only asks when it isn't a design, so reading a design costs nothing more. A container's content this build doesn't know, or a drawing container that also holds a design's `document.json`, is refused. - `read_drawing` (bytes, either form), `read_drawing_file` (one seekable handle, the design reader's checks) and `write_drawing_container`; `DRAWING_EXT` (`scdwg`) and `is_drawing_path` beside the design's. - The container writer's set-up and finish, the file opening and the container sniffing move into one function each, which designs and drawings both use. The container's own checks (budgets, entries, the ZIP directory) are the design container's, word for word. Tests: a drawing round-trips through both forms byte for byte, and the container holds exactly `container.json` and `drawing.json`; `file_kind` on both forms of both kinds; each reader refuses the other's file; unknown content, a stray `document.json`, a missing drawing, an unknown container version and a damaged drawing refused; both forms from disk, and a directory refused; mutation fuzz of both forms (an error or a drawing, never a panic). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
4c4f25115b |
Bill of materials types: phantom, reference, purchased and inseparable (#3874) (#5107)
* Bill of materials types: phantom, reference, purchased and inseparable (#3874) A component's bill of materials type is a part property (`bom_type` in its metadata, set with component.metadata.set and read by component.metadata, as part_number is), so older releases keep it and no format change is needed. It isn't a design property: the Design Properties dialog doesn't list it and document.metadata.set refuses it. A word this build doesn't know reads as normal and is kept. assembly.bom counts by type: a phantom has no row and what it holds counts where it is placed, in the same rows as the same parts there; a reference counts nowhere, and nothing inside it does; purchased and inseparable components are one row, and in parts only an inseparable component's purchased parts are listed too. Rows of one part number but different types are different rows. Rows and children carry bom_type. With no types set the rows are as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Glossary: bill of materials and bill of materials type (#3874) The bill of materials types are a new idea, so the glossary gets their term, with the five types, and "normal" gets its fourth meaning in the table of words with more than one meaning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Bill of materials types: a plain line for each (#3874) The guide's table and the glossary entry say what each type is for in plain words: something you make, something just to group, something to use as a reference, something you buy, something made as one piece. The names stay the five standard ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Bill of materials: kits fold together only when their contents' types match (#3874) With group_children, two kits with one part number share a row when what they hold reads the same. That reading (kit_key) compared each child by part number and count, but not by its bill of materials type, though rows themselves are told apart by type. So a kit holding a made bolt and a kit holding a bought one, both KIT, folded into one KIT x2 row listing the first kit's bolt twice: the other type was lost, and which one depended on creation order. 0xlillith found it in review of #5107. kit_key now includes each child's type. Equal part number, type and contents still fold. Test: two KIT kits each holding a BOLT fold into one row of two; once one bolt is purchased they are two rows, each listing its own bolt. Planted fault (the type left out of the key): caught. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
672ef13eb8 |
Drawing sheets: no centring or trimming mark longer than the largest sheet's side (#3875) (#6410)
A border profile capped every length at 5000 mm (the largest sheet's side) but two: a centring mark's reach inside the drawing border and a trimming mark's length. A file could give either a huge whole number, such as 18446744073709551615. The read's number check passes whole numbers, so the profile took it as 1.8e19 mm, and saving wrote it as a decimal the next read refused: a drawing that saved but didn't open again. K2's fuzz test of drawing files (#3890) found it. Both now take the cap the margins have, `MAX_SIDE_MM`, in `validate`, so the file is refused when it's read. Layout's own checks against the sheet are unchanged, so a 5000 mm mark still validates and is refused only on a sheet too small for it. Tests: the hostile-profile test refuses 5000.000001 mm and 1.8e19 mm for each mark, and takes 5000 mm on its own; 4 planted faults (each cap removed or made one short) are all caught. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
4c63a88fc3 |
Drawing sheets: centring marks across the whole margin (#3875) (#5554)
The built-in sheet's centring marks now run from the trimmed sheet's edge to the drawing border. From the grid reference border, as before, a mark was the same length as a grid field mark, and on A3 it sat on one (the sheet's centre falls on a field edge), so it no longer read as a mark once the grid reference border's outline is left out (Cameron, after the prototype on #3875). - DrawingBorderProfile.centring_mark_start: sheet_edge (the built-in's, and when not given) or grid_border (ISO 5457's figure 5); ISO's full border in the tests asks for grid_border. - A mark still needs a length: one that stops on the drawing border needs room outside it on the side it starts from, every margin for sheet_edge, the grid reference border for grid_border. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
5e23f58f62 |
Paper scene: plain records of what is drawn on a sheet (#4890 A1) (#5513)
geom::paper holds what a sheet shows as plain data: groups of strokes and fills, each group tagged with the object that drew it (an opaque id) and its kind, with one validation pass over a bounded record count. Seg2's checks and the coordinate rule move into profile.rs so section and paper share them, and drawing_sheet takes its side and line limits from paper, so each limit is written once. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
01a542d6e8 |
Drawing W23a workshop plate oracle fixtures (#4950) (#4962)
* test(oracle): reviewer-aligned parameterized workshop plate fixtures (#4950) Independent analytic W23 expected values and seven verified models, including four R10 corners and the 2 mm tangent top chamfer. Document accepted Drawing states and commit regenerated docs/oracle.md from successful workflow run #29 (90/90 pass). * fix(oracle): correct W23 chamfer centroid and clarify drawing session ownership |
||
|
|
f0cc73eb83 |
Drawing sheets: sizes, the ISO 5457 border and its marks (#3875) (#5108)
* Drawing sheets: sizes and the ISO 5457 border (#3875) A sheet is a paper size and an orientation: ISO A0 to A5, Letter, Legal, ANSI A to F, architectural A to E1, or a custom size (finite, above 0 and at most 5,000 mm a side), landscape by default and either way for every size. A border profile is the rule for its border, and layout() works it out for a sheet: the frame inside the margins, and the reference fields with their labels. The ISO profile has a 20 mm filing margin on the left and 10 mm elsewhere, a 0.7 mm frame, fields of 50 mm out from the centre lines with the corner fields taking what's left, rows lettered from the top without I and O (AA, AB and on past Z), columns numbered from the left, and an A4 sheet labelled on its top and right only. A profile can divide the frame equally instead, or have no grid. The records sit in geom, next to the section records, so saving, rendering and export can all use them. Nothing is saved or drawn yet: there is no command and no format change. Margins that leave no drawing space, values that aren't finite, fields outside 1 to 1000 mm, more than 200 equal fields and unknown JSON fields are refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing sheets: ISO 5457's centring and trimming marks (#3875) A drawing border profile now also holds the grid reference border and the centring and trimming marks, either of which can be left out. The ISO profile follows ISO 5457:1999 (read in its identical adoption, IS 10711:2001): - the grid reference border 5 mm outside the drawing border on every side, with the field labels between the two; - four centring marks on the sheet's centre lines, from the grid reference border to 10 mm inside the drawing border; - at each corner a trimming mark of two overlapping 10 x 5 mm rectangles, in the margin outside the grid reference border. The labelled sides are now a rule worked out for each sheet: ISO 5457's (the top and right of A4, all four sides of the others) or fixed sides. So one profile labels every size correctly. validate() checks what doesn't depend on the sheet, for when a profile is read; layout() calls it, then checks the rest against the sheet. Refused: - a grid reference border that isn't finite, is negative or is wider than a margin; - a centring mark that isn't above 0, would reach past the sheet's centre lines, or is on a drawing border those lines miss; - a trimming mark that isn't above 0, is wider than it is long, is wider than the margin left outside the grid reference border, or is longer than half the sheet's shorter side. The grid rule's JSON is now externally tagged ("none", {"from_centre": {"field_mm": 50}}), as the sheet size is, so an unknown field is refused in every form; the internally tagged "none" ignored one. Nothing is saved yet, so the shape change costs nothing. The names follow the glossary, and ISO 5457's "drawing sheets": the module is drawing_sheet (was sheet, which means sheet metal elsewhere here), DrawingBorderProfile and SheetLayout (were BorderProfile and BorderLayout), sheet_border and drawing_border (were paper and frame), and Sheet::size_mm (was paper_mm). The first part of S1 is still a draft, so the renames are made here rather than in a commit of their own. The extra centring marks ISO 5457 asks for on sheets larger than A0 aren't here yet. Still nothing is saved or drawn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing sheets: a lighter built-in border, the filing margin a choice (#3875) Cameron's decisions after seeing the sheet in the app, 2026-10-23: - No trimming marks in the built-in profile: the filled corner blocks take a lot of ink. trimming_mark_mm stays, so a profile can still ask for them. - Centring marks stop at the drawing border: from the grid reference border to the drawing border, never into the drawing area (on A4 they crossed the tables). centring_mark_mm keeps its meaning, how far a mark reaches inside the drawing border, and now takes 0, the built-in value, as grid_border_mm already takes 0 for "on the drawing border". A mark of no length (a reach of 0 with no grid reference border) is refused. - Margins of 10 mm all round. ISO 5457's 20 mm filing margin on the left, for drawings that get bound, is a named choice: filing_margin, off when not given. On, it stands in for margins.left_mm, which is kept, and still checked, for when it's off again. The 20 mm is FILING_MARGIN_MM, and validate() and layout() both take the margins from one helper, laid_out_margins(). A3 landscape is now 400 x 277 at (10, 10), with eight 50 mm columns. With the filing margin it is 390 x 277 at (20, 10) again, the same as a 20 mm left margin set by hand. A profile with all three choices on (ISO 5457's full border) lays out exactly as the built-in profile did before, and the tests keep the old hand values for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3b982ca371 |
Prevent deleted item IDs from being reused (#1016) (#3641)
* claim: #1016 * Prevent deleted design item IDs from being reused |
||
|
|
aaa110218b |
Edit Offset Plane: keep a face base, refuse a plane on itself (#3567) (#3889)
* claim: #3567 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Yz6dHZiXcgTgrxjVNC6hx * Edit Offset Plane: keep a face base, refuse a plane on itself (#3567) Reopening an Offset Plane built on a face looked the face up at the plane's origin, which can lie off the face, so the Plane input came up empty. Look it up at the point picked on the face. A redefine that builds a feature on itself is refused with a plain message instead of failing with "plane offsets nested too deeply". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Yz6dHZiXcgTgrxjVNC6hx --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
46f80b769f |
Sketch fillet and chamfer refuse an offset's corners instead of leaving circles (#2874) (#3860)
* claim: #2874 * Sketch fillet and chamfer refuse an offset's corners (#2874) An analytic offset's output ends are recomputed from its source curves on every solve and held fixed there. Filleting an output corner moved those ends to the tangent points, the next refresh pulled them back to the sharp corner, and the new arcs closed into full circles with the sketch left unsolved. Fillet and chamfer now refuse a corner on an offset output before anything changes (a batch fillet applies all of its corners or none) and say how to get the rounded result: round the source corners before offsetting, or break the offset association first, after which the same corners round normally. |
||
|
|
26ca82735b |
Circular Pattern and Revolve: a construction axis can be the axis (#2885, #4506) (#3796)
* claim: #2885 * Circular Pattern and Revolve: a construction axis can be the axis (#2885) The dialogs send a picked axis by its name, but solid.pattern.circular only knew X, Y and Z, and solid.revolve / surface.revolve read any other name as a sketch line id. Picking a construction axis therefore failed. - solid.pattern.circular takes a construction axis name, saves it as `axis_feature` and turns about the axis as evaluated, so the copies follow it when it is edited. - AxisRef::Construction { name } for revolve and surface revolve, resolved at evaluation and checked to lie in the sketch plane. - construct.plane.at_angle accepts a construction axis name (its fixed axis line is taken from the axis as it is now). - Reopening these features shows the construction axis as the pick. - Design format: pending/construction-axis-refs.rs. * Construction axis references follow the axis in the feature's component frame (#4506) - Revolve, Surface Revolve and Circular Pattern resolve a construction axis where it is evaluated, mapped into the feature's component frame. - A line of the revolved sketch with the same id as a construction axis still wins, so existing scripts keep their meaning. - Tests: the revolve keeps the reference through save and reopen and follows an edited axis (60π to 80π mm³); perpendicular, offset and profile-crossing axes are refused without changing the design. |
||
|
|
408d30ea56 |
Joint drive moves parts without evaluating them (#3391) (#3397)
* Joint drive moves parts without evaluating them A joint drive (also the Drive dialog and motion steps) changes only occurrence transforms, yet it re-evaluated nearly the whole timeline: every feature that might read another component's geometry (a sketch with any link, even to its own axis) hashed every occurrence's transform into its fingerprint, so any motion invalidated it and everything after it, and no new pose was ever in the cache. - Placement digest: a feature now hashes only where the geometry it actually reads lies relative to its own frame (link sources, anchors, profiles and paths from other components, mirror placements; To Object and face/edge-picked planes read every component, relatively). Moving parts that keep those relative placements leaves every result in place: nothing is evaluated or re-meshed. In-context features whose referenced part really moved still rebuild. - Evaluated ahead, applied once: `Ahead::evaluate` returns what it evaluated and `Session::prime` lets the window-thread pass take it (history commands and dialog OK), so an off-thread command no longer costs twice on designs past the cache's budget. - Contact meshes are kept per body geometry across drives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Joint drive: booleans read only their input bodies' placements A join, cut or intersect with named targets, and a Combine, read every placement, so a joined part transferred to a component re-ran its boolean at each new joint pose. Each now hashes only the placements of the bodies it actually takes as inputs, resolved in its timeline input state (before any later BodyTransfer), relative to the frame that evaluates it; Combine reads its tools relative to its target. Unresolved and legacy component or path reads keep the conservative dependency. 24 new joint_pose_ tests cover new angles, transfers, targets, save/reopen, undo and real relative motion (900 -> 800 mm3). Supplement offered on #3397 by takuto-NA. Co-Authored-By: takuto-NA <183465875+takuto-NA@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Creating a component recomputes nothing A new, empty component changes nothing a feature reads, yet it changed the placement fingerprint of every targeted boolean, Combine and To Object feature, so `component.create` evaluated the timeline again: - the first component of a design: `placement_digest` returned 0 while the design had no placements and a nonzero value once it had one; - To / From Object and legacy face- or edge-picked planes hashed every component, not just those holding the bodies, sketches and construction geometry the feature can reach. Co-Authored-By: Tyler Chiriboga <18270301+Tyler-Chiriboga@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test: creating a component after a legacy face sketch recomputes nothing A face extruded after its construction certificate is gone (a patterned cut, a pad joined flush with it, then one more cut) is sketched on a legacy face plane, which reads every placed body. A new, empty component must not change what it reads either (reported by Tyler Chiriboga). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: takuto-NA <183465875+takuto-NA@users.noreply.github.com> Co-authored-by: Tyler Chiriboga <18270301+Tyler-Chiriboga@users.noreply.github.com> |
||
|
|
75261cd797 |
Viewport: order-independent transparency for see-through surfaces (#4734) (#4903)
* Viewport: levels of detail for large meshes (#4724) A large instanced mesh (20 k triangles or more) gets coarser copies, made once on a worker (`mesh_lod`): a quarter, a sixteenth and a sixty-fourth of its triangles, by quadric edge collapse (`geom::simplify`, after Garland and Heckbert 1997; no fold-overs, no sheets joined, open boundaries kept), each with its measured deviation from the full mesh. Each frame, as placements are culled, each is drawn from the coarsest copy whose deviation stays under 0.75 px where it stands (`placement_scale`, `level_for`). Until the copies are made the mesh is drawn in full; the scene is built again when they are. Display only: picking, measuring and exports keep the reference mesh. Outside the kernel. 25 placements of a 2 M-triangle STL, 3600 x 2190 px, 4x MSAA, M2 Max (`instanced_scene_gpu_benchmark`): 20.2 -> 1.2 ms a frame with all in view, 21.9 -> 2.9 ms close up. The copies take 10 s to make, on a worker. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Viewport: see-through and faded parts drawn as instances (#4888) See-through (an appearance's opacity) and faded (context around an active component) bodies in one colour are drawn as instances like opaque ones, their alpha in each placement's colour: one copy of the triangles, levels of detail and culling, no per-placement copies built on the window thread. Their placements are ordered back to front each frame (not their triangles one by one) for devices that sort see-through surfaces. The GPU benchmark gains `SOLIDCRAFT_BENCH_OPACITY` and the CPU share of each frame, and its pictures each placement's own triangles too. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Viewport: order-independent transparency for see-through surfaces (#4734) The model's see-through surfaces (glass, faded context; instanced or not) were sorted back to front triangle by triangle on the window thread whenever the view turned. They are now drawn with weighted blended order- independent transparency (McGuire and Bavoil 2013): when there are any, the frame is drawn into the renderer's own textures (as supersampling does), the see-through surfaces gathered into a weighted colour and a revealage target against the frame's depth, laid over the frame in one full-screen pass, then the overlays drawn over them. Nothing is sorted. A device that cannot blend into float targets keeps the sorted way. 25 placements of a 2 M-triangle STL at opacity 0.5, M2 Max, 3600 x 2190 px: about 10 s a frame sorted, 21.6 ms (17.2 ms instanced, 2.8 ms with levels of detail). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
6f5d0038ab |
3D mouse: find devices on Windows without asking every HID device for its strings (#2614) (#3653)
* claim: #2614 (3D mouse: find devices on Windows without asking every HID device for its strings) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 3D mouse: find devices on Windows without asking every HID device for its strings (#2614) On Windows the 3D mouse reader rescanned every two seconds while no 3D mouse was plugged in, with hidapi's refresh_devices(). hidapi's Windows enumeration opens every HID interface and reads its serial number, manufacturer and product strings: on USB, three control requests to every keyboard, mouse and touchscreen, forever, on a machine without a 3D mouse. That fits the report of an idle machine whose USB keyboard drops off and returns and whose cursor jumps. Windows now asks Plug and Play which present HID interfaces are multi-axis controllers (hardware ID HID_DEVICE_UP:0001_U:0008), which sends nothing to any device, and opens only those with open_path(). hidapi's own discovery is turned off before the reader makes its one context, so making it touches no device either. macOS keeps hidapi's enumeration (IOKit's registry); Linux is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * AGENTS.md: list the Plug and Play scan among the files allowed unsafe code (#2614) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Tyler Chiriboga <18270301+Tyler-Chiriboga@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: bherbruck <brennen.herbruck@gmail.com> |
||
|
|
1814adb06a |
Leaving a sketch keeps the camera where it is (#4909)
Finish Sketch, double Esc (including a blank sketch discarded), and Cancel no longer restore the pre-sketch view. Entering a sketch still turns the view to face the plane. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
971b28c982 | claim: preferences redesign (#4608) | ||
|
|
f79cbc216c |
Redesign the home page as the File view (#2027) (#3822)
* claim: #2027 * Redesign the home page as the File view (#2027) * Match the File view with the accepted component design (#2027) * Restore the Start subtitle and simplify the recovery icon (#2027) * Integrate File view with main's shared UI containers |
||
|
|
4dc1828138 |
Imported meshes: share their triangles between document copies (#4673) (#4675)
Every edit clones the document for undo, and `MeshData`'s positions and triangles (plain `Vec`s) were copied with it: ~165 MB a command for a 2 M- triangle STL. They are now `Arc<[f64]>` and `Arc<[u32]>`, shared by clones; the few places that rewrite them build new arrays. Saved designs are unchanged (an `Arc<[T]>` serializes as the array). Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
f843a3f83c |
Picking: remove the GPU pick buffer, the per-body BVHs answer alone (#4665) (#4666)
The pick buffer drew the model's surfaces and edge ids for every still view to narrow which edges a pick tests. Measured against the BVHs alone (release, M2 Max, 1400 x 900 view, 600 cursor positions), a pick costs 2-51 us through the BVHs and the tile saved 0-4 us of it, while each pass cost 0.7-12.5 ms of GPU time per still view, plus gathering its scene on the window thread, read-backs a frame or two late and repaints to wait for them (and, before, a copy of every triangle, which made it refuse models past 6 M triangles). Picks are unchanged: the BVHs give the same answers. `pick_timing_on_curved_models` gains eight layers of bodies seen from above (the pick buffer's best case) and `SOLIDCRAFT_BENCH_MESH` placements. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
f0fd5c10b7 |
Viewport: keep a face's hover highlight while the pointer moves across it (#4668) (#4669)
The highlight's key hashed the hovered item with its point under the pointer, so every move across a face built and uploaded its highlight again: for an imported mesh (one face) all its triangles, every frame. The key now leaves out a face's and a plane's point, which the highlight does not draw; an edge's middle stays in (it picks the part lit). Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
981d23d1d2 |
Viewport: weld a large mesh's shared vertices quicker, and ahead of its first frame (#4679) (#4680)
`SharedTris::new` used the standard SipHash hasher and collected each triangle's corners into a Vec: 451 ms for a 2 M-triangle STL on the window thread. A quick hasher for the coordinates' bits and a fixed array make it 278 ms, and the background mesher that meshes an opened or inserted file's bodies now welds their large meshes too (`warm_shared_tris`), so the first scene that shows them takes the shared vertices ready-made. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
01648da72d |
Ribbon: work out each tab's panel lists once (#4658) (#4659)
`toolbar_custom::panel_lists` is asked for every frame and matched every registered command against every section by string each time (~337 us a call for MODEL, several calls a frame). The registry and the ribbon layout never change while the app runs, so each tab's lists are kept: 0.2 us a call. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
3d3dd27439 |
Viewport: leave out placements of an instanced mesh that are out of view (#4646) (#4647)
* claim: #4616 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Viewport: draw a part placed many times from one copy of its triangles (#4616) A part placed by many occurrences was drawn, framed and picked from a moved copy of its mesh per placement: on the CPU (the moved mesh and its scene bytes) and on the GPU (its vertices uploaded once per placement). - The model scene draws bodies that share a mesh as GPU instances: the shared triangles once, a rigid move and colour per placement (`InstancedMesh`, `vs_tri_inst`), in the solid, section and AO passes. `GpuScene::merged` expands them, so scene tests see world triangles. - `ModelBody::mesh_in_place`, `plan_mesh_in_place_at`, `mesh_bounds` and `display_identity` give the shared mesh, its placement, the exact box and an identity without making the moved copy. - Display refinement's body ids, Fit/Home bounds, the viewport's body boxes, the background mesher and picking use them (picking moves the ray into the part's frame and shares one pick index). 25 placements of a 2 M-triangle STL on an M2 Max: orbit 45 -> 37 ms a frame, footprint 41 -> 16 GB, 24 copies 39 -> 18 s. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Viewport: draw large meshes from shared, indexed vertices (#4637) An instanced mesh's vertices are shared between its triangles and drawn indexed (`SharedTris`). A flat-faceted mesh (an STL's facets) shares them by position alone and lights each fragment with its triangle's own plane (`vs_tri_inst_flat`, `fs_*_flat`), taken from the fragment's position relative to the eye so it stays exact at any zoom; its vertex outputs are kept few, since a tiled GPU stores every vertex's outputs. A body alone is drawn this way from 50 k triangles. A mesh too large for one buffer falls back to unshared vertices. `instanced_scene_gpu_benchmark` (manual, ignored): 25 placements of a 2 M- triangle STL at 3600 x 2190 px, 4x MSAA, M2 Max: 21.3 ms a frame for the placements' own triangles, 16.1 ms shared and indexed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Viewport: leave out placements of an instanced mesh that are out of view (#4646) Each frame `Batches::cull` keeps the placements whose box may be seen (`placed_box_in_view`: all eight corners past one side of the view in clip space, so it holds behind the eye too) and writes them again only when that set changes. The manual benchmark gains `SOLIDCRAFT_BENCH_CLOSE=1`: close up on the middle of 25 placements of a 2 M-triangle STL (13 in view), 3600 x 2190 px, 4x MSAA, M2 Max: 28.2 ms a frame for the placements' own triangles, 17.2 ms instanced and culled. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>v0.19.0-nightly.20261022.67.1 |
||
|
|
6c60f1a9ed |
web-offline-test: hold responses until the test lets them go (#4620)
The slow steps waited on the clock (6 s sleeps, a 1 s timer, a 30 s cap), so on a busy runner a launch could outlast them and time out at 240 s. The server now holds a response until the test releases it, and the test waits on events: - overlapping downloads: build v5's own files are held; files both builds share (index.html, names no build changes) are served, since the browser queues a request behind an in-flight one for the same URL. The held files are released once v6 has started. - fail-fast step: the other files wait until the test has seen them asked for. - update in another tab: the other tab updates once the launch is waiting for build.json, and the browser's own sw.js check waits for the same moment. - hung requests no longer give up after 20 s. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
5899e5b6c5 |
Release 0.19.0 (#4603)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
e23a5bf243 |
Ship 14 more official themes: SolidCraft 95, Platinum 9, Cupertino, phosphor pair, Blueprint, One Dark and a pack of open-source palettes (#4602)
Registers them after the Gruvbox set in the Theme list, adds attribution rows, and keeps the heading-band ordering check passing by nudging heading/subheading (and, for High Contrast, dialog) backgrounds. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
4b23bb3a03 |
Implement compact workspace layout (#2029) (#4533)
* Vertical history strip: left of the browser, compact rows, hollow-circle marker, collapsed rail hover * Vertical history strip: seam handle to expand and collapse names, drag to resize with snap * Vertical history strip: no empty gap below the transport * Show the history seam arrow only on hover (#2028) * claim: #2021 * Redesign the Assistant chat panel with shared UI components * Show Assistant in the shared floating panel shell * Extend floating Assistant to viewport height and shift navigation * Dock Assistant before history and match docking preview bounds * Align Assistant top margin with floating shell cards * Extract a shared panel drag grip * Rebuild responsive history sizing and three-way docking * Share browser and History collapse hover styling * Show the History title as soon as its text fits * Animate stacked browser and History expansion and collapse * Make panel folding responsive and independent of frame delays * Let folding panel contents shrink continuously to header height * Use four explicit History transport actions in every layout * Resize the shared Browser and History column from either card * claim: shared compact-mode containers (#2029) * Centralize layout-aware UI containers and enforce their use * Keep docked Assistant at the outer edge beside tool sheets * Use shared surface policy for Assistant tool space * Let tool sheets drag over shell panels while avoiding Assistant * Update Parameters drag bounds assertion for shell overlap * Keep dragged tool sheets below ribbon and workspace selector * Enforce universal UI containers in mandatory repository checks * Remove legacy report windows and require shared window composition * Remove retired UI styling and require shared controls * claim: compact layout preference (#2029) --------- Co-authored-by: bherbruck <brennen.herbruck@gmail.com> |
||
|
|
920398ac53 |
Bring back the view-change glide; orbit, pan and zoom stay instant (#4596)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
688124937d |
Chamfer: a cutter that would reach into a nearby wall is not used (#4539)
* Chamfer: a cutter that would reach into a nearby wall is not used A straight chamfer's cutter reaches several times the chamfer's size out from its edge, and further on a larger part. On a pin standing in a socket, that far side lands inside the socket's walls, and the cut took bites out of them. A cutter whose far side is inside the part is now refused, as one whose ends are, and the chamfer is built locally instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Robustness goldens: seed 9 re-recorded for the chamfer cutter check A chamfer in seed 9 was refused because its result changed more of the part than a chamfer can. With its cutter refused, it now builds locally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
b49557c294 | Regenerate THIRD-PARTY-LICENSES.txt and docs/features.md [skip ci] | ||
|
|
dfd58293a6 |
Navigation: opt-in free orbit and shared Normal to Selection (#1912)
* Navigation: opt-in free orbit and shared Normal to Selection Preserve the complete reviewed feature, shared camera setting propagation, rigid pivot behavior and focus/drag regressions from PR #1912. Consolidate the prior main-integration commits before rebasing, so their merge-resolution fixes remain in the linear feature history. * docs: move free orbit help beside viewport controls * Merge main into fix/solidworks-free-orbit Camera animation is gone on main, and with it the orbit snap spring: the Shift snap keeps its unsnapped orbit in orbit_free, which the free-orbit checks now read. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: bherbruck <brennen.herbruck@gmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
ba4f7864ff |
Export Current View as DXF includes shown sketches (#3708) (#3780)
* claim: #3708 * Export Current View as DXF includes shown sketches (#3708) The view export refused a design with only a sketch and left shown sketches out when bodies were present. It now draws the sketches the viewport shows (profile curves only: no construction geometry, points, dimensions or constraints) on a SKETCH layer, one entity per curve. Finished sketches are hidden behind bodies through the body-edge occlusion; the active sketch is drawn on top, as in the viewport. Sketch points use the same projection, budgets and cancellation. The export is refused only when there is neither a visible body nor a shown sketch curve; the dialog and the command share that check (cmd::view_dxf_exportable). --------- Co-authored-by: bherbruck <brennen.herbruck@gmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
b289dc2421 |
Sketch Dimension: name = value defines a user parameter (#2916) (#3638)
* Sketch Dimension: `name = value` defines a user parameter (#2916) In a dimension's value (the D tool's box, and `sketch.dimension`'s `value` from scripts, the CLI, MCP and the control channel), `name = expression` adds the user parameter `name` with that expression and dimensions with `name`: typing `width = 40` on a line gives a 40 mm user parameter `width` and a dimension whose expression is `width`. A bare number is read in the design's unit, as a bare dimension value is; an angle's parameter is in degrees. The expression may be anything the parameter editor takes. It is one command: one undo removes the parameter and the dimension together, and a dimension the sketch refuses leaves no parameter behind. A taken name is refused with a hint (type the name to use it, or change it in Parameters), a reserved name with the parameter editor's message, and a left side that is not a name (`2 = 3`) still fails to parse as before. A driven dimension defines nothing. The reply carries `defined`, and the status line names the parameter. The splitter lives in the doc crate (`expr::definition`) so other value inputs can take the same form later; editing an existing dimension, the inline shape boxes and feature dialogs are follow-ups. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Sketch Dimension: say why a name is refused, in the command's own words (#2916) The dimension editor showed a refused definition raw, in the box and the status line: "invalid parameters for `sketch.dimension`: value: `mm` is a unit, constant or function name". It now reads "Sketch Dimension: `mm` is a unit name, so it cannot be a parameter name": the editor passes the command's errors through `friendly_error` like every other command, and drops the `value:` field tag, since the box is the value. The taken-name hint reads the same way: "Sketch Dimension: there is already a parameter `w`: type `w` to use it, or change it in Parameters". A reserved name says what kind of word it is and what that means (`param_name_problem`, shared with the Parameters dialog): a unit name, a function name, or a constant, "so it cannot be a parameter name"; `expr::reserved_kind` tells them apart. `friendly_error` translates the command label with the interface language (the engine's sentence stays English), so the prefix reads "Wymiar szkicu:" in Polish. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Sketch Dimension test: keep the third line off the ribbon (#2916) On current `main` the ribbon floats over the top of the canvas, and the test's third line at sketch y = 50 projected under it: the click opened Parameters instead of picking the line. The line now goes below the first one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: bherbruck <brennen.herbruck@gmail.com> |
||
|
|
2daf22923c |
Extrude preview: a cut from an empty root is no longer refused (#3085) (#3363)
* claim: #3085 * Extrude preview: a cut from an empty root is not refused (#3085) A cut or intersect sketched where the active component has no body of its own (the root of an assembly, or of a design whose part was imported into a component) takes part in every body (#1234): the command makes the cut. The Extrude preview checked the targets itself, looked only in the active component, and showed "there is no body to cut or intersect" beside a tool going through the part. Pressing OK still cut, so the dialog said one thing and the model another. The rule now lives in one place, Session::cut_takes_every_body, which both the command and the preview ask, so they cannot disagree again. --------- Co-authored-by: bherbruck <brennen.herbruck@gmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |