bf32aa1fdc2eeb2ede2e4d8e4ec87d007b2913a0
1426
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bf32aa1fdc |
Drawing export: an SVG's text is under svg in the reply again (#12152)
#10681 renamed the reply's `svg` key to `text`, and that broke the commands' existing readers: three tests on drawings read `svg` and failed. The SVG goes back under `svg`; a PNG's base64 stays under `data`. The output schema and the params doc follow, and #10681's own export tests read `svg` again. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
30942265a8 |
A new dimension goes on the side away from what it measures (#4896) (#11932)
drawing.dimension.add, with no offset_mm, puts a linear, length or chain dimension 10 mm on paper to the side of its line away from the material beside it: it looks half a paper millimetre either way across the line, in the view's plane, at the depth of what it measures, and asks each shown body's B-rep exactly (Body::classify_point; inside or on its boundary is material). With material on both sides or neither, it goes away from the middle of the view's model box; on that middle, the fixed rule is above or to the left (+10). Radial, angle, cylinder and silhouette dimensions keep +10, and an offset given keeps its sign. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f7a24278bb |
Drawing export: a sheet can be exported on Blueprint or Prussian Blue paper (#10679) (#10681)
* Drawing export: a sheet as PNG at a chosen dpi and colour, and one reply shape (#4890 EX1) drawing.export {format: png, dpi?, colour?} writes the sheet's scene through the sheet PNG writer: 25 to 2400 dpi (300 when not given), grey, black and white, RGB or transparent (grey when not given). dpi and colour are refused on an SVG. A path must end in the format's extension, which ExportFormat::extension gives for every format. One reply shape for every format: text (SVG) or data (base64 PNG) when no path is given, in place of svg; report.pixels gives a PNG's size. A PNG held for the reply stops at 64 MiB, as an SVG does, and the refusal says to give a path; a file may be as large as the sheet needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing export: a sheet on blue paper, in SVG and PNG (#10679) One rule for the two papers and their ink, used by both writers. White stays the default, byte for byte. A blue paper's PNG is rgb; the other colours are refused by name. A picture keeps its own colours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
da576824b2 |
Drawing views: a view's look is its visual_style, the viewport's name for it (#5307) (#11579)
A drawing view's setting for how it is drawn (visible lines, with hidden lines, shaded) was display_style while the viewport calls the same idea its visual style. The field, its command parameters, its schemas and its replies are now visual_style, on a view's settings and on its own overrides. display_style is refused as an unknown field, as drawings haven't shipped and no saved design holds it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f2b0b39393 |
A parts list's ballooned column, for its editor only (#3874) (#11964)
A table's column can be left off paper (printed: false, saved only then): the layout places the printed columns only, while filters and overrides still read every column. No printed column may read the ballooned row field, and a table prints at least one column. A new parts list gets a seventh column, ballooned, not printed. Drawing::balloons_by_list works out once which list each balloon reads, and balloons_by_row counts one list's balloons row by row, every row listed, 0 included; drawing.inspect gives parts_lists with each list's counts. Worked out on each read and never saved. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d0da5e5277 |
Mesh lines: a refusal says what happened, and each caller says what to do (#5866) (#11826)
The view lines' errors were the view DXF's, remedies included, so a drawing view could say "DXF export cancelled" or "increase tolerance". The module now answers a Refused (cancelled, over the work or memory limit, across the eye plane, invalid) that says only what happened. The view DXF adds what to do in a DXF's terms (hide bodies or sketches, increase tolerance, zoom out), and a drawing view in a drawing's (raise chord_mm, or choose a smaller scale). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
b3af8346cf |
Drawings: a part's drawing starts on A3 and an assembly's on A2, each with its tolerances note (#3875) (#12000)
* Drawing templates: the built-ins carry SolidCraft's title block again, so a new drawing starts with it (#3875) Every built-in template, ISO A4 to A0, is one sheet with the ISO border and the built-in title block, so drawing.create with no template (iso-a3) gives a drawing with the block. #7208 made them the border only; the decision since is that a drawing starts with SolidCraft's block, and a user replaces or changes the default template. - A drawing saved as a template is the user's own: a copy of the built-in with a company's name in the block and its tolerances typed in starts drawings that keep both (tested through drawing.template.save and drawing.create). - The built-in block by name stays, for a sheet without one. - The general tolerances stay empty, and the five names (iso-a4 to iso-a0) and the one drawing_template setting stay: the part and assembly versions would be the same. - The tests that gave a new drawing the block first no longer do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing templates by kind: a part starts on A3, an assembly on A2, each with its tolerances note (#3875) Ten built-ins, iso-a4-part and iso-a4-assembly up to iso-a0-part and iso-a0-assembly, each with its kind's general tolerances note typed over the title block cell. template::default_for(assembly) is the one rule for the default, and template::is_assembly says a design that places components is an assembly. drawing.create with no template uses it, and drawing.template.list marks the design's default and says whether each built-in is an assembly's. The older names iso-a4 to iso-a0 still read as that size's part template. Preferences gets one setting per kind in place of the one; a saved name of the other kind reads as the kind's default, and the old drawing_template key is ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
6be23a3e19 |
Hidden lines on paper: a view in visible_hidden draws them dashed (#5866 V7b) (#11839)
A saved view or a snapshot's scene in visible_hidden now draws its hidden lines, 0.25 mm wide in ISO 128's dashed line, under the visible ones; a reference part in visible_hidden draws its hidden lines the same way. Paint order from the bottom: hidden lines, reference parts' visible lines, the model's. The sheet no longer fails for that style, so it exports; only shaded styles with lines still refuse. The paper scene's output schema takes a stroke's dash pattern, so a reply with hidden lines still matches it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
96bb41c480 |
Drawings: notes on a drawing, the record and commands (#4896) (#11898)
* Issue a revision: drawing.revise (#3874 R1) drawing.revise appends a copy of a row to the issued history: an existing row as it reads, or a new revision with the texts given, in one undo step. A row is issued once. The copy keeps what it read through an edit, a hide or a delete, and nothing is filled in: no date, checker or approval. Issuing used to make a drawing unreadable, as a copy has its row's id and the drawing's check refused any id seen twice. Each id now counts once, and issued ids are unique among themselves. model_version becomes {path, change}, on issued copies only. One function on the session answers it, and answers nothing until version control exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing revisions: numbered 1, 2, 3 (#3874) A drawing's new revisions are numbered 1, 2, 3, never lettered (@CamWight, 3 Nov). drawing.set's revision_numbering is {start: 0 or 1}, the first number. A revision typed by hand is kept as typed; the next one follows the highest number, and drawing.inspect says where numbering starts. A record in letters is refused (drawings haven't shipped). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Revision tags on a sheet: add, edit and delete (#3874 R3) A tag gains the sheet it sits on and its place there. drawing.revision.tag.add, .edit and .delete keep them, inspect and every revision reply list them with what each shows, and a sheet's delete counts and takes the tags on it. A deleted row still leaves its tags showing the revision they had. Tags draw on paper once scene text lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Saved tables on a sheet: drawing.table.add, .edit and .delete (#3874) A drawing saves its parts lists and revision tables, each on a sheet with its definition and place. Rows are never saved. A parts list starts at the top right listing what its sheet documents, else the design; a revision table at the bottom left; headings on top, QTY, rows of 7 mm. Placing a list saves the numbers its view shows, once per view, so what is printed doesn't move. Numbers are the design's: undoing the placing puts back only the drawing, as every drawing step does, and the numbers stay. That one command changes both, and the proof that nothing needs evaluating now allows it. The tables are a ById list, as the balloons and images are, and keep its rules: at most 1000, listed by id. Revision tags take their own id type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * A balloon reads its row in a parts list (#3874 L1) A balloon can name the parts list it reads; else it reads its sheet's only list, else the drawing's only one, else none, with the choices listed. Its row's item is worked out on each read and never saved: drawing.balloon.inspect gives item and row_status (ok, no_list, reference, no_row or not_found). A lost row never removes the balloon. A list's delete reports the balloons that named it and clears their links. Bom::item_of cuts a path from the top of the design to start below the assembly listed, and row_of is no longer test-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Notes on a drawing: the record and commands (W19e, #4896) A note sits on a sheet, a view, or an edge or corner of a view's model, saved by name as a dimension's is, with the title block's text and fields, its place and its text height. drawing.note.add, .edit and .inspect, one undo step each, no model evaluated. Its one leader is worked out, never saved: a lost reference keeps the note and its text, with no leader. Anchor is one type so other symbols placed on a sheet can use it. A view's notes go with its copy and delete; a sheet's with the sheet. The plan left delete for later, but selection.delete now handles a drawing's objects, so notes join it. Balloons and notes share Lookup::middle. Drawing them waits for text in the paper scene (slice 12). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
b841eb939f |
Merge main into drawings (Nov 4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
49eedf122c |
Drawings: a reference to a suppressed or failed feature says so (#4892) (#11823)
* Labelled measurements on a view's snapshot (#5866) measure: linear, aligned, angle from model points, radius from an edge, with units and decimals for the labels. No new maths: drawing_measure's rules, and a dimension's radial rule through one Lookup::whole_arc. Labels go through one function, reading_label, which dimensions' text now uses too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pieces on one circle are that circle, and one piece is that edge (#4892) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * A dimension between two flat faces (#4892) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * A suppressed or failed feature's references say so, not lost (#4892) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
669aaa7744 |
Drawings: a dimension finds its circle again after the edge is split (#4892) (#11869)
* Labelled measurements on a view's snapshot (#5866) measure: linear, aligned, angle from model points, radius from an edge, with units and decimals for the labels. No new maths: drawing_measure's rules, and a dimension's radial rule through one Lookup::whole_arc. Labels go through one function, reading_label, which dimensions' text now uses too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pieces on one circle are that circle, and one piece is that edge (#4892) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a3375c58e3 |
Render: a triangle tests only the samples of each row it can touch (#5624, W17b) (#11042)
The raster walked a triangle's whole box, testing every sample, and the pixel budget counted that box. A plain plate's few long triangles have boxes that are mostly misses, so a view at 2:1 counted 18 tests a sample. Now each row of the box tests only the span the triangle can touch there, and the budget counts those spans (an empty row costs one unit, as the walk does). row_span works the span out from each edge's weight along the row, allowing for the test's own tolerance and the rounding of its arithmetic, so it is never short; sample_weights is the raster's test pulled out unchanged. Pictures are the same to the byte. A product image shares the raster and the count, so its 128 M admits more; the tests built on its old count hold more triangles. With the misses gone nearly every counted test paints, and a painted surface costs about 240 ns a test on one thread, so a picture's limit falls from 400 M to 250 M to stay near a minute at worst. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a301359652 |
Dimensions on the sheet: lines and arrowheads in paper millimetres (#4896) (#11867)
Each dimension of a view on the sheet is one group, ObjectKind::Dimension, after the views: extension and dimension lines and filled arrowheads (Terminator::place, #9466), laid out by dim_layout_sized in paper millimetres, so it is the same size at any view scale. All seven kinds draw; a chain is one line of frames at one offset with each extension line once, an angle sits where its lines meet on the view, and a cylinder's line runs across its silhouettes at the end on its offset's side. drawing.scene and drawing.export list each dimension: its status, whether it is drawn, and why not. A lost one, or one on a view that isn't drawn, has no lines and leaves the sheet and the file written. The provider keeps each dimension's group by its record, world state, view drawing and units: a moved view moves them unread, and an edit reads that dimension alone, in one short step after the views. Text joins with B1. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
1cbfb889d5 |
Agents and scripts: Compare Bodies describes its exact parameters and reply (#10994) (#10995)
* claim: #10994 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Compare Bodies: input and output schemas (#10994) inspect.compare gets a typed contract and reply types in schema/compare.rs and leaves unconverted.txt. Each key reads as the handler reads it, with its message; `color` checks each colour with the handler's own color_param, now pub(crate) and re-exported from cmd. The reply is built from Comparison and its parts, with the same JSON. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Compare: drop the json import the typed reply no longer uses Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Compare schema: colour strings carry the hex pattern 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> |
||
|
|
954232cef1 |
AI client setup: preserve configuration files when a write fails (#11363) (#11410)
* claim: #11363 * AI client setup: replace configuration files atomically (#11363) |
||
|
|
0fc4cd2747 |
Agents and scripts: the render stage commands (Ground, Backdrop, Clear) describe their exact parameters and reply (#11455) (#11456)
* claim: #11455 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Render stage: input and output schemas for Ground, Backdrop and Clear (#11455) The three handlers' strict parameter types move to schema/render_stage.rs as GroundParams, BackdropParams and ClearParams, with descriptions and JsonSchema, and become the contracts; the handlers read the same types. The handlers build the shared StageSaved reply instead of json! literals, and the saved setup is serialized with an error instead of json!'s panic path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
6d83f95fba |
Isolate a body: other components are hidden as components, in one step (#7896) (#7951)
* claim: #7896 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Isolate a body: other components are hidden as components, in one step (#7896) Isolating a body hid every other body one by one: browser.visibility with `items` writes only hidden_bodies, so every other component's Browser row kept an open eye and normal text, and its eye could not bring it back (the first click hid an already invisible component). browser.visibility takes `isolate: true` with `items` (bodies), as it does with `paths`. The picked bodies' own placements stay open, their other bodies (and the root's) are hidden one by one, and every other placement is hidden as a placement. Isolate in the Browser and the view runs that one command, so it is also one undo step instead of two. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Isolate a body: a hidden Bodies folder or group it is in shows again (#7896) Isolating a body inside a hidden Bodies folder or group left that folder or group hidden, so the picked body stayed hidden. Isolate now shows the folders and groups (with the groups they are in) that hold the picked bodies; their other bodies are hidden one by one as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Isolate a body: look for hidden folders only when some are hidden, and find body owners once (#7896) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ed3510a91f |
Typed schemas for the design properties commands (part of #2829) (#10920)
document.metadata, document.metadata.set and document.metadata.remove get input and output schemas: contracts in schema/metadata.rs, checked in front of the unchanged handlers, and reply types the handlers now build their replies from. Their lines leave unconverted.txt. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d25f8198fa |
Pieces of a cut keep their names when the design is evaluated again (#11658)
A cut that leaves a body in pieces names them after their faces (`order_lumps`): the piece whose least face name sorts first takes the first name, and so on. It moved the names but left the pieces where the kernel put them. The session then pinned the feature's body names in that state order, and the next full evaluation (opening the design, or editing a parameter upstream) handed them out again in a different order: two pieces swapped names, and a later feature that named one met the other. Found by a local model fuzzer. The pieces now also take the family's places in name order, so the names pinned are the order the next evaluation hands them out in. A design saved before keeps the names a fresh evaluation gave it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
03b5248dc1 |
Sketch: Line and Construction Line refuse a second point next to the first (#11595)
A through-point 0.0000001 mm from the start made an infinite line whose direction nothing held, and a Line that short had both ends connected to the origin, a line of length zero. Both now refuse points closer than the distance at which a new point is connected to an existing one. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f9dd77e383 |
Configurations: reject invalid suppression values when saving rows (#9088) (#11571)
* claim: #9088 * Configurations: reject invalid suppression values before saving rows (#9088) |
||
|
|
8a74336713 |
Tests: the autosave recovery test no longer fails at random on a busy machine (#11815)
* claim: Recovery: the save test waits for the autosave worker before it checks * Recovery: the save test waits for the autosave worker before it checks saving_drops_the_entry_and_a_clean_close_leaves_nothing marked the session saved right after the tick that started an autosave. Under load the worker was still writing, so the next tick found the write running, took nothing up and dropped nothing; the file landed afterwards and the check that it is gone failed (seen in CI on #9021). The test now ticks, bounded, until the autosave has caught up (Autosaver::caught_up), as the app's own frames would, before it marks the session saved. A small helper in the test module does this. The app's behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
5e4c52a7cb |
Sketch Transform: keep the applied rectangle at the previewed rotation and size (#11617) (#11620)
* claim: #11617 * Sketch Transform: preserve dimensioned geometry on apply |
||
|
|
3a23d21795 |
Lip: clearer guidance when the face is not a shelled rim (#10437) (#10871)
* claim: #10437 Co-authored-by: Cursor <cursoragent@cursor.com> * Lip: say Shell first when the face is not a rim (#10437) A solid box top left OK disabled with a vague shelled-body hint. Name Shell and the rim-around-an-opening requirement in the refusal, the dialog tip, and the command help. Co-authored-by: Cursor <cursoragent@cursor.com> * Lip: keep the dialog hint as it was, match the new refusal text in the test 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> |
||
|
|
e199f9aeff |
Agents and scripts: Match Surface describes its exact parameters and reply (#10981) (#10982)
* claim: #10981 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Match Surface: input and output schemas (#10981) surface.match gets a typed contract in schema/surface_match.rs and the shared FeatureResult as its output, and leaves unconverted.txt. Each key reads as the handler reads it, with its message; like solid.scale it declares `name` and `participants` itself, since a match makes no body. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Follow main's kernel merge: world_state and the shared continuity reader Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Surface match schema: Vec3 comes from solidcore_record now 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> |
||
|
|
e06d6e36d8 |
Agents and scripts: the material card checks describe their exact parameters and reply (#11036) (#11037)
* claim: #11036 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Physical material property commands: input and output schemas (#11036) material.properties.validate and material.properties.directional get typed contracts and reply types in schema/material_properties.rs and leave unconverted.txt. The card stays the handler's to check; the direction has the handler's messages. The replies mirror the document's Validation and DirectionalModulus, destructured in full. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
9d1ad9f0b9 |
Feature editor: OK accepts the joint placements a roll back re-solves (#11094) (#11095)
* Feature editor: a roll back's re-solved placements are not a changed design Rolling the marker solves the joints again and stores where that puts each occurrence, so the editor's pinned original differed from its source there and OK was refused with "the original editor model does not match its source design". The check now takes the placements as the roll leaves them. * Feature editor: also accept the ratio and lift of coupled joints that rolling the marker works out 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> |
||
|
|
d39a2d28db |
Agents and scripts: the clearance check describes its exact parameters and reply (#11051) (#11052)
* claim: #11051 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Clearance: input and output schemas (#11051) inspect.clearance gets a typed contract and reply types in schema/clearance.rs and leaves unconverted.txt. Each key reads as the handler reads it, with its message; MAX_CLEARANCE and MAX_NEAREST move to the schema module so both read one limit. The reply is built from Clearance and its item types, with the same JSON as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
23c2244307 |
Inspect: center of mass reports the same volume as measure (#6173) (#11262)
* claim: #6173 * Inspect: center of mass reports the same volume as measure (#6173) inspect.center_of_mass measured each body's display mesh, whose flat facets cut curved faces short, so its volume and centre differed from inspect.measure's (a sphere of radius 10: 4183.10 vs 4188.49 mm3). It now takes both from the same cached kernel measurement Measure uses, and like Measure it leaves out bodies that enclose no volume, counting them in open_bodies_skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Centre of mass tests: read the skipped list that main now returns 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> |
||
|
|
481687fff3 |
Modeled threads: the thread runs down to a flat face with no uncut block, so a nut can bottom out (#11782)
* Modeled threads: run down to a flat shoulder so a nut can bottom out An external thread running the whole face stopped with its groove clear of a shoulder, leaving up to a turn uncut above it. The groove now runs on past the plane of the face's end and is trimmed there, so its root reaches the shoulder at every angle and nothing past the plane is cut. A shoulder rising back along the face keeps the square stop, as do internal threads, tapers, runouts and lengths stopping short. Where the kernel refuses the trimmed cut, the groove also keeps the square stop and the feature warns. Closes #11610 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Kernel ladder: record the thread cases that now reach their shoulder Six cases gain the faces of the trimmed last turn; every other case is unchanged apart from its timing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Thread at a shoulder: review fixes, and a test of the fallback The shoulder check starts just off the face, as the free-end check does, so a slope rising from the face counts. A groove the trim leaves nothing of now falls back to the square stop too. A test forces the fallback and reads its warning. The ladder's order and report go back to main's, changed only for the cases this moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Thread at a shoulder: check all the radii the groove cuts The check for a shoulder rising along the face looked a fixed distance out, which falls short of the groove on an undersized shaft. It now covers the groove's reach. A test reads how each kind of shoulder is classified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Thread at a shoulder: test the trim that leaves nothing of the groove The test now reaches the path where the half-space keeps nothing, which is the one that must fall back to the square stop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Thread at a shoulder: say so when the shoulder can't be checked If the kernel can't make the rising-shoulder check, the groove keeps the square stop as before, and the feature now warns that its last turn is left uncut. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f74c6605c4 |
Fillet: Mitre or Swept corners where two rounds meet (#11498)
* SMLib wrapper: a swept or mitred turn for constant rounds (Turn) Brep::blend_dropping takes a Turn: Mitre (the default, as before) or Swept, which sets solidcore's FilletSession::set_swept_turns before the corners are made. A swept turn solidcore refuses at CreateFilletCorners comes back as Error::TurnRefused with its reason and place (NoRoom at a concave side edge, else CornerUnsupported). Swept is for Blend::Round only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * Kernel: fillet rounds turn in a mitre or swept (FilletTurn) fillet_removing, fillet_max, fillet_max_each and fillet_each take a FilletTurn and hand it to SMLib, through the reblend of earlier rounds at a later corner too. A swept corner solidcore does not build is refused as invalid input with its reason and place: no smaller radius builds it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * Design: a fillet saves its turn, mitre (default) or swept FeatureKind::Fillet gets `turn` (FilletTurn: mitre, the default and not saved, or swept), one pending format file. Evaluation hands it to the kernel, pattern copies included, and refuses a swept turn with a style, fit, corner or setbacks the kernel's swept corner does not take (SWEPT_TAKES). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * solid.fillet: the turn parameter, and the command's input and output schemas `turn: mitre|swept` on solid.fillet, refused when unknown or with options a swept corner does not take. solid.fillet now has its contract (FilletParams) and reply type (FilletResult), registered with checked!, and leaves schema/unconverted.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * Fillet dialog: a Turns choice, Mitre or Swept A Constant radius fillet's Turns row sends `turn: swept`; choosing a narrowed radius or a curvature corner puts it back to Mitre, and Swept puts those back. Its tooltip says what each does where two rounds turn round a corner edge. New strings in a pending locale file (en, de, ja, ko, zh); glossary entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * Fillet turn: the schema tests' fixes and the complete catalogs' strings The no-contract example in the schema tests is solid.chamfer now that solid.fillet has one; the reply test checks the mid-radii form against the contract (solidcore refuses that law's corner yet, #430) instead of building it; Arabic, Hebrew and Vietnamese, complete catalogs, get the new strings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * Fillet schema test: variable and spline forms checked against the contract solidcore fails a variable round on a box edge at this pin (status 1001, as variable_radius_on_a_box_edge), so the reply test checks those forms against the contract instead of building them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * Fillet turn: the swept rig cases pass; the MCP no-contract example is solid.chamfer cov-fillet-turn-swept-boss-base-r1 and cov-fillet-turn-swept-pocket-sharp-corner-refused-r1 pass now that solid.fillet takes `turn`: off the rig's known-failing list. The MCP bridge test's example of a command without a contract was solid.fillet, which has one now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ --------- Co-authored-by: jyviko <2501648+jyviko@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
e12afd11cc |
Ellipse and spline extrudes make one wall; coplanar faces never lose their names to a budget (#11687)
* Planar sources: decide coplanar faces by support group, no budgets that drop sources map_planar_sources kept two budgets, `metadata` (2 MB) and `identity_bytes` (16 MB), charged by each face's source descriptor and by every extra candidate on its plane. When one ran out, faces silently lost their source and with it their persistent name: a 300-hole plate whose top a comb of grooves cuts into 62 strips lost the cap source from strip ~47 on. The budgets bounded the real cost: each result face looked at every candidate on its plane, faces x candidates when many faces are coplanar. The candidates are now grouped by support once (`same_support` against each group's first plane, through the existing PlaneIndex), each group's chosen source, ambiguity and inner flag decided once, and the faces without a role together with the competing tool faces grouped the same way. Each result face then looks up its plane's few groups. The decision is the old one: blocked by an unknown or competing support, else the first candidate on the plane unless another candidate there has a different plane, source or role. Work: grouping looks at each candidate's index window once per group (each candidate is assigned on its group's first look), and each face looks at the group representatives near its plane, so the planes looked at grow with faces + candidates. A counter (`looked`) checks it: n pieces of one cap and n faces on its plane take exactly 2n looks (n*n before), 3n with n blocking supports. Tests: the holed plate keeps the cap source on all 62 strips and the bottom (fails on the old code: face 352 lost its source); the existing planar source tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * Extrude: an ellipse or a spline sketch curve sweeps one wall An extruded ellipse had four side faces (`F2:side:e1#1` to `#4`), one per conic quarter, and a spline one per span: the profile holds such a curve as several exact segments and SMLib got each as its own curve. The Extrude feature's builder (`extrude_whole_sides`) now takes a `one_curve` test from the caller. Each run of free-form segments of one degree that it says are one curve goes to SMLib as one B-spline: the Béziers' control points in a row, knots repeated the degree times at each joint, each span as long as keeps the speed through the joint the same (so the curve is C1 there and SMLib makes one face over it, as it would not over a C0 parametrisation), weights scaled to meet. Exact: the same curve, reparametrised. A loop starts at a run's start, so no run wraps round it. The wall's history lists every piece, and its construction source is its first piece's (as joined collinear lines). The document says which segments are one curve: ExactSketchCurves now also holds each free-form sketch curve's exact segments (`find_free_form`: a segment that is one of them, either way round), and the profile roles use it, so the wall is named `side:<curve>` from its history rather than by the curve nearest its mesh centre. Saved designs rebuild with these walls renamed (`F2:side:e1#k` -> `F2:side:e1`); accepted, no alias kept. Tests: kernel `pieces_of_one_curve_extrude_into_one_wall` (an ellipse in four conics is 3 faces, its volume pi a b h to 1e-6, the wall generated by all four pieces; a 3-span spline closed by lines is one wall; the same solid as a face per piece); doc `an_extruded_ellipse_or_spline_is_one_wall_named_by_its_curve` (one `F2:side:e1`, no piece names, the same names on a second build and after reopening). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * Tests: a tray's far rim name is checked on the exact B-rep face The tray test took the point `sheet:...:rim.far` finds as right when it lay within 1e-3 mm of the strip z = 30, 199 <= y <= 200: a slack sized to the mesh. It now asserts on the face the name finds, on exact geometry: the point's distance to that face's surface (FaceSurface::nearest) is within rounding at the part's scale (1e-12 x its size), and the point is inside the face's boundary, counted by crossings of its record edges (each asserted to be a line, the rim being planar). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * Tests: delete tests/naming/, the records no test reads since the naming corpus stopped comparing against them Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * Viewport test: smooth wall joins drawn from eight G2 spline walls The PR extrudes each spline or ellipse sketch curve as one wall, so the offset-ellipse ring the test built has no joins between faces any more. The test now extrudes a circle drawn as eight cubic splines: eight walls meeting with one curvature along eight upright edges (24 edges in all). It still checks that those joins are left out of the shaded view, drawn in the wireframe and selectable as edges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ * Kernel ladder: 009 and 012 record the one-wall extrude (an extruded spline or ellipse sweeps one wall) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ --------- Co-authored-by: jyviko <2501648+jyviko@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
fd4b7a7bc0 |
Seg2: one rule for an arc under a shape-keeping map (#4816) (#7316)
`Seg2::mapped(f, arc)` is a segment under a map of the plane that keeps shapes. Points go
through `f` itself (an arc's centre, every control point). `ArcMap { angle, mirrored, scale }`
says how the map moves an arc: it turns it by `angle`, after a mirror across the x axis when
`mirrored` (start `angle - start`, sweep reversed), and scales its radius by `scale`.
`ArcMap::turn(angle, mirrored)` keeps lengths; `ArcMap::rigid(f)` measures a map of points that
keeps lengths, from where it puts the origin and the unit axes, with a scale of exactly 1.
`Seg2::similar` and the three arc maps written out by hand use it:
- a sheet-metal region onto a panel's flat (`region_to_flat`, which measured its map by hand and
now asks `ArcMap::rigid`);
- the mirrored flat (`flip_x_loop`);
- a sketch region mirrored in its x axis (`mirror_y`).
The points go through the same functions as before, so every result is the same, bit for bit.
This comes from the architecture review of the drawing work (2026-10-25): four places wrote the
arc rule out, each its own way, and one measured its map by hand.
`map_controls` is private to geom now: on its own it hands an arc back unmapped, which is what the
three hand-written arms were there to avoid.
Tests: every kind of segment under a mirrored map with a turn, a scale and a shift, point by point,
its length scaled and an arc's sweep reversed; the three old formulas, bit for bit (the sketch
mirror keeps a +0.0 start's -0.0); a rigid map's turn and mirror measured whatever its shift, and
the identity; the sheet-metal and mirror tests unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
bcac191847 |
Typed schemas for Change Design Units (part of #2829) (#10934)
document.units gets input and output schemas: `units` (mm, cm, m, in or ft, with the handler's messages for a missing or unknown unit) and its reply, `units` and `kept`, which the handler now builds from the reply type. Its line leaves unconverted.txt. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
c019e2555c |
Threads: a 12 mm hole now takes an M12 thread, and a modelled M12 builds in it (#11651)
* Threads: a 12 mm hole takes M12, and a modelled thread narrows a bore that is too wide (#11609) Automatic sizing of a hole now takes the size whose nominal diameter the hole has (a 12 mm hole is M12, not M14, the size whose tap drill is 12 mm); a hole near no nominal diameter is still matched by tap drill. A modelled internal thread in a hole as wide as the thread or wider no longer refuses with "too wide": the bore is filled in to the thread's minor diameter over the threaded length and the groove cut there, and the feature's warning says so. A size that does not fit the hole names the size that does. A saved thread with no designation keeps the old rule through a pending format step, so an existing design rebuilds with the size it had. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Threads: keep an old automatic size through edits; kernel-rig cases expect the narrowed bore (#11609) Editing a saved automatic thread keeps `old_auto_size`, so it does not change size. The five kernel-rig cases that expected a modelled thread in a hole as wide as the thread to be refused now expect the narrowed bore, with the volume worked out analytically in each case. The thread dialog's reopen pattern names the new field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Thread dialog test: a 5 mm hole is suggested M5, its nominal size (#11609) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2741df3629 |
Typed schemas for Appearance, Appearance Library and List Appearances (part of #2829) (#10976)
* Typed schemas for Appearance, Appearance Library and List Appearances (part of #2829) appearance.assign, appearance.library and appearance.list get contracts that read what their handlers read, with the handlers' messages, and reply types the handlers build their replies from. Their lines leave unconverted.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Appearance library: the opacity is already a number Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
08cd8d6442 |
Drawings: title blocks on sheets, and a drawing can start from or be restyled by a template (#3875) (#7208)
* Drawing sheets: a copy of a title block on the drawing border, saved with the sheet (#3875) `Sheet.title_block` holds a copy of its definition, as `border` does. Each sheet's check lays it out on the drawing border, so a sheet without a border, a block wider or taller than the border, or a change of paper that leaves no room is refused. `drawing.sheet.add` and `drawing.sheet.set` take `title_block` (a definition, or null for none), a new sheet takes the block of the sheet it follows, and `drawing.inspect` lists it. A sheet without a block saves no `title_block`, so an older drawing reads as having none (pending format file `sheet-title-block.rs`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing sheets: the built-in title block, on every new drawing (#3875) `title_block::default_block()` is the 180 x 54 mm block of twelve cells approved on #3875, with the legal owner read from the drawing's `organization` and the general tolerances as text to change. `drawing.create` starts its sheet with it. The geometry tests read the built-in block instead of their own copy of it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing sheets: a title block's lines on paper, drawn after the views (#3875) `TitleBlockLayout::paper` draws the outline, then every cell edge inside it, each once: neighbours' shared edges, and edges that meet along one line, are one stroke. The sheet scene paints the block after the views, and counts its records with the border's, so no view takes its room. The view tests' drawing leaves the block off, so their scene is still the border and the views. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing sheets: the title block's projection symbol, in the drawing's projection (#3875) ISO 5456-2 (Annex A): a truncated cone and its end view, h across the cone's small end from table A.1's sizes (3.5 to 20 mm), the largest that fits the cell, lines h/10 wide. The end view is on the right in first angle and on the left in third. The block only says a cell holds the symbol; the angle comes from drawing.projection, and the sheet scene redraws when it changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing sheets: a title block's fields, and text typed over its cells (#3875) A title block cell reads its fields from the component the sheet documents (its name, part properties, material and mass from the bill of materials), the drawing, the sheet (number and count among the counted sheets) and the newest revision row; a field with no value shows "-". A key its source doesn't have is refused when a block is given or read. Sheets save text typed over their cells by cell name; drawing.inspect lists each text cell with its value beside an override. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing templates as data: a drawing with no model, and ISO built-ins (#3875) A template is a drawing with no sources, views, dimensions, balloons, revision rows or documented components, so it is saved and read as a drawing is. A new drawing is a copy with ids of its own. The built-ins, ISO A4 to A0 for parts and for assemblies, are made in code when asked for and differ only in their general tolerances. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing templates: drawing.create from a template, and the preferred ones (#3875) drawing.create takes template? (default ISO A3, for a part or, for a design with components, an assembly) and projection? over the template's. The new drawing.template.list lists the built-ins and marks the one a new drawing starts from. Preferences add a template for part drawings and one for assembly drawings; the app fills in the preferred template and projection before drawing.create runs, so a template named keeps its own projection, instead of changing the projection after the drawing is made. A saved template this version doesn't know reads as the default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing templates: apply one to the drawing open, moving nothing (#3875) drawing.template.apply {template, dry_run?} gives each sheet the paper, drawing border and title block of the template's sheet in its place (its last for the sheets past its own). Text typed over a cell stays while the new block has a text cell of that name; the cells whose text is dropped are listed. Nothing moves: the views a new paper leaves outside the drawing space are listed. A dry run answers the same and changes nothing; applying is one undo step, none when nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing sheets: views a title block covers are listed, never moved (#3875) A view lying over its sheet's title block is listed with the ones the drawing space leaves out, after a change of paper or block (drawing.sheet.set) and when a template restyles a sheet. Where a block sits is one rule, the one a sheet is checked by (Sheet::title_block_outline), and the overlap of two boxes is one rule in Aabb2::overlaps, which the title block's own cell check now uses too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing templates: save one as a file, and start or restyle drawings from it (#3875) drawing.template.save {path} writes the drawing open as a template: its format, and nothing it draws or documents. drawing.create and drawing.template.apply take a .json template file as well as a built-in's name. A file is read as a drawing is, then held to the template rules; files are read and written through the same file check and atomic write as the sheet export. A drawing made from a file keeps its own copy, so a later save changes no drawing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing sheets: the built-in title block is 180 x 49 mm (#3875) The top row is 15 mm, Sheet is 30 mm wide, lined up with Mass, and Date of issue is 32 mm. The top row now holds one line of the legal owner, two of the general tolerances and the 3.5 mm projection symbol. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing sheets: one operation sets a sheet's title block, and drawing.sheet.set names the typed text it drops (#3875) A sheet's block was set in two places: drawing.sheet.set kept the typed text of the text cells the new block still has, and drawing.template.apply did the same and listed what it dropped. Sheet::set_title_block is now the one rule both use. drawing.sheet.set's reply gains `lost`, the cells whose typed text a new block drops, as drawing.template.apply's reply has it, and its help says that a view over the title block is listed too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing templates: the built-ins and a new drawing start with the border only; the built-in title block is added by name (#3875) A template now holds only the ISO border by default. A title block, tables, references and text are added to a drawing, and a template saved from it keeps them. - The ten built-ins (iso-a4-part ... iso-a0-assembly) become five, iso-a4 to iso-a0: one sheet with the ISO border. Without the block, the part and assembly versions were the same. - drawing.create with no template starts from iso-a3. The two preferences for parts and assemblies become one, drawing_template, "Template for new drawings". - drawing.sheet.add and drawing.sheet.set take title_block: "built-in". The built-in block's general tolerances are a part's or, for a design with components, an assembly's, through Sheet::set_title_block. - An old name such as iso-a3-part is refused with the list of names; drawings haven't shipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing title blocks: a drawing with no number of its own is numbered by the component its sheet documents (#3875) The identification number cell read the drawing's part number property, and showed "-" for a drawing that has none, which is every new one. Now such a drawing shows the name of the component the sheet documents, so a new drawing of a part is numbered by the part until it is given a number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing templates: a template saved from a drawing keeps typed text only over plain text cells (#3875) A template saved from a drawing kept all the text typed over its title block's cells, including text over a cell that shows a field, such as the material or the title, which belongs to the design the drawing documents. Now it keeps the text typed over cells of plain text, such as the general tolerances, and leaves the rest behind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing title blocks and tables: a field without a value shows nothing (#3875) A title block cell or a table row whose field has no value (a property nobody gave, a row field its row doesn't have, an uncounted sheet's number) now shows nothing instead of "-". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing title blocks: the built-in block's general tolerances start empty (#3875) The general tolerances cell of the built-in title block now starts empty for parts and assemblies alike, rather than ISO 2768-m in the block and a part's or an assembly's text added by drawing.sheet.set. A shop types its own, or its template carries them, and an empty cell shows nothing. - template::PART_TOLERANCES, ASSEMBLY_TOLERANCES, for_assembly and built_in_block go: "built-in" is title_block::default_block. - drawing.template.list's help no longer speaks of part and assembly built-ins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
bfb32cd6e1 |
Align: move bodies by frames that follow sketch and model geometry (#6257) (#7123)
* claim: #6257 * Align: move bodies by frames that follow sketch and model geometry (#6257) solid.align takes from_frame and to_frame: a joint origin on the model (a face's or round end's centre, an edge's middle, a corner, found again by name) or a sketch point or a sketch circle's, arc's or ellipse's centre. Both are resolved on every evaluation, so the bodies follow their target when it changes. An optional angle turns the bodies about the target's direction after the move. The Align dialog takes sketch points and curves as From and To, offers the Joint Origin snap and an Angle row. * Align frames: box the joint origin (clippy large_enum_variant) * Align frames: every moved body on the frame's component, placed once * Align frames: a sketch id's length in characters * Align frames: the dialog test's sketch curve hit carries its point * Align frames: the dialog test takes Vec2 from solidcore-record --------- Co-authored-by: MateuszSychXpl <151755914+MateuszSychXpl@users.noreply.github.com> |
||
|
|
fbd30b0bd0 |
Panels: inspect and change layouts through commands (#11304) (#11454)
* claim: #11218 * Panels: add shared layout rules and retained content runtime * claim: #11304 * Panels: inspect and change layouts through shared commands (#11304) * Panels: account for layout commands in geometry coverage |
||
|
|
cca77b176f |
Drawings: a shaded view is drawn on the sheet as a picture under its lines (#5624) (#10926)
* A drawing's list of one kind of record: ById, with balloons first (#5426) Each kind on a sheet writes out the same add, find by halves, cap, order and check loop. ById holds those, so a kind's own file holds only its own rules, and the file's bytes don't change: it saves as the plain list. Views and dimensions stay on their own lists for now, since other work is on them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * A drawing keeps an image's file once, however many places it sits (#5426 W38e-1) images holds the files and sheet_images each place one sits, so a logo on every sheet costs what one does. drawing.image.add reads the file (bytes and pixels checked from its header before anything decodes it), reuses a file with the same bytes, and saves the bytes without the path. A file goes with the last thing that uses it, which Drawing::images_in_use alone says, and reading a drawing refuses a file nothing uses or a record its file disagrees with. A sheet's list and delete take the placements on it. Deleting one placement waits for selection.delete to take a drawing's objects. Its pixels on paper are W38e-2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Sheet images: an image file's pixels on any paper grid (#5425, W38e-2) A PNG or JPEG decoded once, then stretched over its paper rectangle onto the pixel grid a writer asks for: a box filter in linear light with alpha premultiplied, so a shrunk logo keeps its edges and gains no dark fringe. The size is read from the header and refused over 64 megapixels before anything is decoded. An EXIF orientation is applied; colour profiles are not read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Sheet images: a placement in the sheet's scene and its SVG (#5425, W38e-2) Each image placed on a sheet is a group of the new kind `sheet_image`, between the drawing border and the views, so a view's lines draw over a photo. `drawing_pictures` holds both that group and the provider a writer asks for its pixels, so the two read the same placement. The provider holds what one sheet uses, decodes a file when it is first asked, once however many placements show it, and refuses a sheet whose files hold more than 64 million pixels, from their headers, before anything decodes. `drawing.export` passes it to the SVG writer in place of `NoPictures`, and a file that won't decode refuses its sheet by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Render: pin the product image's output before it is drawn in tiles (#5624, W17b S1) The decoded rows of five product renders (orthographic on a transparent background, perspective on a solid one, a PBR surface, two glass layers sorted back to front, triangles crossing every edge of the picture), taken on this tree. The next change reshapes ImageTask into a prepare stage, tiles and a PNG sink; they must not move. The PNG bytes are not pinned: their compression depends on the deflate backend the build unifies (flate2's zlib-rs when the UI crate is built alongside, miniz_oxide without), not on this code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Render: pictures drawn tile by tile into any pixel window (#5624, W17b S1) The CPU product renderer, reshaped so drawings can use it: one rasteriser (`Raster`) prepares a scene once (appearances, projected triangles, glass sorted back to front), then draws each tile of the picture on a canvas of its own. A sample's position comes from its whole-picture index, so tiles put side by side are the picture drawn whole, to the byte. - `ImageTask` (render.image) is that rasteriser over one whole-picture tile from the product camera, then its PNG: the same output, pinned by the previous commit's rows. - `PictureTask` draws a `PictureRequest`: a `Projection` (the product camera, or an `OrthoFrame`, W17a's view frame as plain data: a `Plane` basis, a scale and a paper shift, on a `geom::pixel_grid::PixelGrid`), any list of `PixelWindow` tiles, `Supersample::One` (pixel centres) or `Two` (i + 1/4 and i + 3/4), a `BodyRole` per body (`DepthOnly` hides what lies behind it and draws nothing itself) and an optional background (none: transparent). Each tile comes back as straight-alpha sRGB RGBA rows, blended in linear light. - The orthographic map is the frame's paper map, onto the grid, so lines drawn from the same frame register with the pixels (to 1e-9 mm in the test). - Limits: 65,536 px a side, no total cap; each tile under the resolver's `RenderLimits`, as the product image is; at most 65,536 tiles; the prepared lists as a product image's; pixel tests up to 8 per sample of the picture (128 M for a product image, as before), counted at admission by the one projection the raster uses, as main counts a product image's. Not here: the drawing light, stored per-tile bins (S2, measured), the paper scene's picture item (S3), 4x sampling, and `raster::render`, the snapshot rasteriser, which stays as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Render: time the tile renderer (#5624, W17b S2) An ignored timing test, as `simplify_timing` is: a 65,548-triangle front view drawn as the product image, as one 300 dpi picture, and in 64-row strips at 300 and 1200 dpi, each the median of three runs. It is the measure S2's speed-ups are judged by. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Render: a tile passes over a triangle outside it before painting it (#5624, W17b S2) Each tile placed and painted every triangle of the picture, then dropped those outside it: the appearance lookup, the PBR normals and the colour decode ran for every triangle in every tile. A triangle's work is now three steps, `corners`, `look` and `place`. Preparation runs them in today's order, so its checks and errors are the same. A tile places a triangle first and paints only those inside it. What is drawn doesn't change: the pin and the tile tests stay as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Render: one light per picture (#5624, W17b S2) `raster::shade` normalised its key light and highlight directions again for every sample, although both depend only on the view. `raster::Light` works them out once per view and shades with them. The tile renderer and the snapshot rasteriser (`raster::render`) both use it, so the product light is written in one place. The arithmetic is the same, so every pixel is too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Render: sRGB codes from tables (#5624, W17b S2) Each shaded sample was stored as sRGB through a power (three per sample), and each output pixel was averaged from its samples through twelve more and written back through three: the powers were most of a sample's arithmetic. Decoding is now a 256-entry table of `geom::srgb`'s own values (#7162), which also ends this file's own copy of the formula. Encoding counts the code starts (the linear values halfway, in sRGB, between two codes) at or below the value. Within a billionth of a start, where the formula's rounding could fall either way, `srgb::encode8` decides, so every code is the one it gives. A test checks both against `geom::srgb` at every start, the numbers around it, the band's edges and a million values in and outside 0 to 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Render: a tile's passes run in loops (#5624, W17b S2) The raster went back through its step loop for every sample: the cancel check, the stage match, the tile's window and its canvas bounds, once per sample cleared, tested or averaged. Clearing, the opaque and glass passes and the downsample now each loop on their own up to the step's budget, counting a unit as before; preparation and the glass sort still take one unit a call. A step still checks for cancellation before each stage's run and still does at most 16384 units, so the host's slices and the progress counts are the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Render: tests for a picture's light, glass order and test budget (#5624, W17b S2) Three planted faults went through the image tests; each now has one that fails: - an orthographic picture lit from another direction than its eye: a face square-on to the view is the colour the product image gives it; - glass placed by a triangle's first corner, not its middle: a tilted square whose first corners lie in front of the near one, its middles behind; - a picture held to the product image's pixel-test budget: a face across most of an A0 sheet at 1200 dpi is prepared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing sheets: a shaded view's picture on paper (#5624, W17 V9b) A saved view in a shaded style draws on its sheet and in drawing.export: draw puts one picture per entry of the view's parts under its lines, and ViewPictures renders each on the writer's grid through the frame that placed the lines. SheetPictures answers for a sheet's images and views. The styles with lines stay refused until W06's exact lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Render: a picture's count of its tiles and its fixed limit, as #6483 has them (#5624) A triangle counts only where it meets the tiles asked for, and a picture has a fixed 400 M pixel tests, as #6483 at bf93e890e. V9b's stack holds an older copy of that slice; this drops away when drawings takes main. PictureTask says what admission counted, for the view's running sum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing views: a shaded view's pictures add up to one limit (#5624, W17 V9b) A writer asks for a picture a band at a time, and each request is limited on its own, so ViewPictures keeps what each view's requests have counted and refuses the next one past the limit, by name, before it paints. That makes 400 M a bound on a whole view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
dc38349cbf |
Layer split stage 1: the B-rep record, native body file and Vec/Plane come from solidcore-record (#11496)
* Kernel: the B-rep record and the native body file come from solidcore-record SolidCraft's portable B-rep record (`solidcraft_geom::brep`: brep.rs, topology, history, envelope, part, curve2) and the native body file (`solidcraft_kernel::native`: the tagged binary codec and the container) move to solidcore's `solidcore-record` crate: geometry as data, with structural validation and no maths (solidcore's docs/layers.md, stage 1). Every caller uses `solidcore_record::brep` and `solidcore_record::native`; the old copies are deleted. What computes from coordinates stays with the kernel, in geom's `brep`: - `brep::check`: the record's geometric checks (orthonormal frames, non-degenerate planes, unit revolution axes, non-singular placements). `check::validate` and `check::validate_built` are the record's validation and these together, and every caller of `Brep::validate` uses them, so what is accepted is unchanged; - `brep::label`: a surface's natural ranges (a cone's apex), `curve_interval`, `edge_curve_interval` and `form_turns`; - `brep::pcurve::eval`: a pcurve's point; - `geometry::check`, `placement::moved` and `split_edges` become functions on the record. The kernel's native module keeps the conversion between a body and its saved record (metadata.rs) and checks the decoded record's geometry. `native/analytic.rs`, which no module declared, is deleted. solidcore-record is pinned to its rev on solidcore's `layer-record` branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NvoxKMbMFSQU8tzRtoJhtT * Geometry: Vec2, Vec3, Plane and the profile types come from solidcore-record The plain data of vectors and points, sketch planes and planar profiles (`Seg2`, `Loop2`, `Region2`) moves to `solidcore-record`, with its constants and component-wise operators only (owner decision, solidcore layer split). Their geometry stays in geom as traits: `Vec2Geom`, `Vec3Geom`, `PlaneGeom`, `Seg2Geom`, `Loop2Geom`, `Region2Geom`, `Seg2ArcFit`, `Loop2ArcFit` and `Region2ArcFit`, in scope with `use solidcraft_geom::prelude::*`. Every caller names the types from `solidcore_record`; geom no longer defines or re-exports them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NvoxKMbMFSQU8tzRtoJhtT * Kernel: pin solidcore-record to solidcore main f5e8e9a29 solidcore-record is merged on solidcore main (tangency-labs/solidcore#2519); its crate there is identical to the rev pinned before but for its clippy configuration. The lock is regenerated against the merged rev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NvoxKMbMFSQU8tzRtoJhtT --------- Co-authored-by: jyviko <2501648+jyviko@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
49a3ba1c03 |
Paper scene: dashed lines, in SVG and PNG (#4890 A5) (#7430)
A stroke can carry a pattern, `Dashes { lengths_mm, phase_mm }`: dash and
gap lengths in turn, in paper millimetres, and how far into the pattern
the stroke starts. Without one a stroke is solid, and a solid stroke
reads and writes as before.
- Checks: 2 to 12 lengths, an even count, each above 0 and at most
1000 mm; the phase from 0 up to the pattern's length; at most a
million dashes along the stroke, counted from its pieces' own lengths.
- The walk puts the pattern on the writer's grid: a dash or gap under
half a step is one step, counted, as widths are.
- SVG: stroke-dasharray, and stroke-dashoffset when the phase isn't 0.
- PNG: tiny-skia's dashing on the flattened line; its points count
against the sheet's, a line in a gap draws nothing, and one tiny-skia
won't cut is refused rather than drawn solid.
- The paper fuzz cases carry a dashed arc.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
d78895de4d |
Where a drawing stands: drawing.status in one read (#4894 WE2) (#11352)
drawing.status says each view's status (current, out of date, placeholder or failed, with why) from what the sheet page last drew, and each dimension's in the words inspect uses, reading each body once for the call. Nothing is drawn. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ba69e5488c |
Drawings WE1: Inspect Drawing lists each sheet's views, with their names, dimensions and balloons (#4894) (#11350)
* Where a sheet's objects sit: bounds beside the scene (#4894 WE3) The sheet scene now says where its border and each view sit on paper: the box round what each draws, and a view's boundary, so one that can't be drawn can still be picked. It is worked out once per assembly, beside the scene rather than in it, so no writer sees it and the page needn't inspect each view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Selected drawing objects: a view, dimension or balloon in the selection (#4894 WE4) select.set takes {type: drawing, drawing, object} for the drawing open. It adds no undo step and changes nothing saved, and a selected object leaves the selection when an undo takes it or its drawing closes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Delete on a sheet: views, dimensions and balloons in one step (#4894 WE5) selection.delete now works with a drawing open: a view goes with its dimensions and balloons as one undo step, and one with views projected from it is refused, naming them, unless they are selected too or contents: delete takes them. A sheet's delete and this one share the record's one removal rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tests: a view's box holds what it draws, and what's chosen goes in any order (#4894 WE3, WE5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * What's on each sheet: drawing.inspect lists its views (#4894 WE1) Each sheet in drawing.inspect now lists its views: each base view by id, followed by those projected from it, with what it is called and its dimensions and balloons. It is one pass over the record with no model read, so the Browser can read it once per revision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
01abf8af17 |
Engine test: the later round at a mitred corner, as solidcore 8ddce9016 builds it
At solidcore 8ddce9016 (pinned) the r2, r2, r3 corner at (20, 0, 20) is one patch: 10 faces, 7928.743041456134 mm³, the r3 round and the patch the second fillet's. The test is pinned to that and leaves the known-failing list. The fork's setback corner (15 faces, 7928.142563938) waits for solidcore#2310; solidcore#2382, not merged, moves the case to 7927.724282512234. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ |
||
|
|
ac3e6e0105 |
A panic solidcore's guard catches reaches the engine as EngineError::Internal
smlib's run() catches a solidcore panic and replaces the kernel (kept: the app does not die natively), returning Error::Internal; the kernel turned it into KernelError::Failed and the engine into Other, so hostile_params_never_panic and the fuzzer no longer saw kernel panics. Now the kernel's wrapper errors go through KernelError::smlib, which keeps Internal; a body the wrapper could not take because of a panic is Internal too. A feature whose evaluation hit it records the result as internal (not cached: the kernel was replaced), and the command that made it, or any command whose kernel call returns it, fails with EngineError::Internal under its own id. Crash reports mark a panic inside a solidcore call recovered (kernel::guarded), and the crash test's kernel mode panics inside a solidcore call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ |
||
|
|
d9310b2389 |
Crash test: a panic inside the kernel is the command's internal error
The kernel crash test's command must fail with EngineError::Internal naming diagnostics.crash_test, as a panic in the command itself does: the panic detectors (hostile_params_never_panic, the fuzzer) look for Internal. Today it is EngineError::Other. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ |
||
|
|
440fdaed13 |
Kernel work runs on threads with solidcore's 8 MiB stack
solidcore's algorithms recurse (subdivision, intersection, filleting) and its README asks for 8 MiB, a native main thread's stack; Rust starts other threads with 2 MiB, and only the web build set more. kernel::KERNEL_STACK is 8 MiB and kernel::kernel_thread a thread builder with it. The kernel's parallel map runs on a pool of its own with that stack (on a worker of a pool already, as in map_with_local_pools, it stays on that pool as before), the one-thread mesh pools and map_on_threads' helpers have it, and so do the engine's interference worker and the evaluator's plan-mesh thread. A test recurses 5 MiB deep on each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ |
||
|
|
2f483a00c0 |
Drawing text F4: a character missing from the chosen font is drawn with another installed font (#4890) (#10515)
* Drawings: the font a drawing's text is set in, by family (#4890 F1) A drawing names the font family its text is set in (`font`, saved only when set; a pending drawing-format file). `drawing.create` and `drawing.set` take it, and `drawing.inspect` reports it, with `font_note` when this computer sets the text in the built-in font instead ("Futura isn't on this computer: set in Liberation Sans"). Drawings name fonts by family, so they travel: a font file is refused. Paper text finds the family among the installed fonts as sketch text does (`paper_text_in` for given folders), admits each face once a process, and sets a family that is missing or can't be set on paper in the built-in font. Bold takes the family's bold face; the serif flag comes from the face's OS/2 family class. The fixed list of drawing fonts is gone. New drawings made in the app take the interface font when it is a family. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Paper text: any face with outlines is set, and says how a PDF may carry it (#4890 F2) A face is admitted for paper whatever its tables lack: - a variable face is set at its default instance, which is what a PDF draws; - its cap height is the one sketch text scales it by (OS/2, else the top of its `H`, else 70 % of the em); - its PostScript name is what a PDF name can hold of its own, else of its family and style, else `Font-` and the start of its id; - without a `post` table it has no italic angle, and a fixed pitch when every glyph advances alike; - its stem width is measured across its `l`, else taken from its weight. A bitmap or colour-only face, with no outlines to fill, is refused by name. `Font.embed` says how a PDF may carry the face, from its embedding permissions: a subset, the whole face (no subsetting), or not at all (restricted, bitmap embedding only, or CFF2 outlines), when the PDF draws the runs' outlines with their text beside them. Which characters a PDF name may hold is now one rule, `is_postscript_char`, that the record's check and sketch share. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Paper text: a font's family, for readers that pick fonts by family (#4890 F2) `Font.family` is the face's own family name: its typographic family (name ID 16), else its family (ID 1), read from the face itself (in a collection, not the first face), without control characters and at most 255 characters; empty when it has neither. A DXF text style picks a font by it; `Font.id` stays the identity, so two faces of one family are still two fonts (@0xlillith on #4890). The name lookup PostScript names use is one function now, shared by both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fonts: one list of fallback fonts per script, in sketch (#4890 F3) The interface's lists of fonts to try for a script move down to `sketch::fonts::fallback`, so drawings can use the same ones. Each row is a family and the files it's known to be in. The interface reads the files in the order it always did, so what it finds is unchanged. - `CRAFT_FONTS_DIR` joins `font_dirs`, as the interface already has it: `SOLIDCRAFT_FONT_DIRS`, else the pack, then the system's folders. - `font_files` sorts the files within each folder, so a search doesn't depend on how the system lists a folder. - The Windows folder search takes its names from the Japanese list instead of its own copy of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Paper text: a character its font lacks falls back to a font that has it (#4890 F4) A text on paper was refused for any character its font lacks. Now each such character falls back to an installed font that has it: the script's list in `sketch::fonts::fallback` first, Han by the drawing's language, then the first face in sorted order with outlines and the character. - Runs split by direction, then by font. Every font takes the same em size, on the line's baseline and pitch. A space, a digit or punctuation stays with the run it follows when that font has it; a mark stays with its letter. A font fallen back to is shaped, with the drawing's language. Its nearest style is used: bold or italic isn't refused. - A line its own font has all of is set as it was. - A character no font has is still refused by name. - The last-resort search reads each file's character map alone, stays within `MAX_FONT_FILES`, and keeps its answers, misses too, for the process. - `paper_text_now` is for the window's thread: the search runs on a thread of its own (`font-search`) and it refuses with `FontPending` until the answers are in. `paper_text` searches where it's called. - `paper_fallback_notes` names what fell back, for a drawing's status, from the answers so far: it looks for no font. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |