Repository navigation
Drawings: press-in hardware appears on a sheet-metal drawing as a callout and a parts-list row - #22250
Drawings: press-in hardware appears on a sheet-metal drawing as a callout and a parts-list row#22250KazW wants to merge 48 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WIP: HoleRef resolves to resolved, suppressed, failed or lost; the callout's count, diameter or thread, through or blind depth from the start face, counterbore and countersink come from the feature record and the hole's own named faces. drawing.hole_callout returns it and its text. Acceptance tests in progress. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lled hole is blind (tangency-labs#7605) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…abs#7605) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One pass over a body's triangles for all its faces (face_spots), and only for bodies that have a face of the hole, not one pass per bore face. - A bore face is told wall or floor by its surface (a cylinder on the axis is the wall, a plane across it or a cone on it a floor); where a face has no known surface, by where its spot is, as before. - An id of a component, folder, canvas, joint, contact set, study or exploded view is an error, not lost. - A Single hole drills only at its first point; another point's callout is lost, never moved to that hole. - A hole a later feature cut away reads failed with that reason, not "cuts no material". - Messages: "hole callouts of X features", an unknown unit echoes at most 32 characters; the params doc says inches show at least 3 decimals. - Tests: a Single hole at a point; a hole drilled from a sketch on the top plane over the pocket starts on the floor; a To object depth; a later cut fails the callout; the p2 callout pinned to today's failed; each hostile case checks its own message; a component's id; the 1e999 mm diameter reads failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-labs#7605) Review on tangency-labs#7618: a callout takes its default decimals from where a dimension takes them, the length-decimals preference (2 by default), so the two read alike on one sheet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…angency-labs#7605) tangency-labs#4486 gave counterbored and countersunk holes an optional tip angle; the callout keeps its text as before and ignores it for now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…angency-labs#7605) `drawing::dimension::DEFAULT_DECIMALS` now holds the default (2) next to `MAX_DECIMALS`. `drawing.dimension.add` uses it in place of its own private constant, and `hole_callout::DEFAULT_DECIMALS` re-exports it, so `drawing.hole_callout` takes the same one. No behaviour change: both were 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed holes (tangency-labs#7605) Review on tangency-labs#7618, items 2, 3, 4, 6 and 9: - A tapped hole with its own thread depth, shorter than the hole, gets a drill line of its own and the thread line that depth (`Ø6.75 ↧ 15.00` / `M8 ↧ 10.00`). Without one, or as deep as the hole, the text stays one line. - The thread is read with the Hole feature's own parse (`parse_tapped_thread`): ISO metric as written, catalogued UNC/UNF, G and Rp by their designation. - A later `solid.move` of the hole's body is followed: the hole is looked for where the move put it, and `start` and `direction` are in the model as it is now (and in the hole's own component). A body moved some other way reads as failed, saying it may have been moved. - Any length unit of the expression unit table, as a drawing may fix (one check, `drawing::is_length_unit`, for both). - A hole in sheet metal reads as failed, not supported yet: the sheet is rebuilt with no face named after the hole. - The doc comment notes that `count` is the feature's and the extent this hole's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mas (tangency-labs#7605) Review on tangency-labs#7618, items 1, 5 (schemas), 6, 8 and 9: - `drawing.hole_callout` is `.any_part()`: it works with a drawing open or with none. With one open, the drawing's fixed unit and its content language are the defaults; with none, the design's unit and `en`, as before. - Input and output schemas (`schema/hole_callout.rs`): the handler reads its parameters through the contract, so a wrong-typed value or an unknown key (`decimal`) is refused instead of ignored, and the reply is built from `CalloutResult`. - The default unit is `expr::length_unit_or_mm` of the design's. - Tests: a drawing open and its defaults, thread depth, G/Rp/UNC threads, a moved and turned body and a moved copy, one feature drilling through and blind, a hole in sheet metal (not supported yet) and a part placed twice; the schema's keys, strict errors and replies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cy-labs#7605) Review on tangency-labs#7618, item 5: `cmd.drawing_hole_callout` moves out of the four catalogs into `assets/locales/pending/drawing-hole-callout.json`, so no other PR conflicts with it. It gains ar, he and vi, which are complete catalogs on `drawings` now (the i18n test requires them). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fail (tangency-labs#7605) Review of 15ade12 (FIXLIST_W29A_1101 items 1, 2, 4, 5 and nits 12, 13): - The feature counts its thread depth from below any counterbore or countersink; the callout adds that recess, so the thread and drill depths read from the same face. A thread at least as deep as a blind hole is one line. - A bore whose wall radius or flat floor no longer matches the feature (offset face, scale) reads failed instead of showing stale numbers. - "removed or moved" only when a bore face of the feature lies off all of its holes' axes, so a removed hole with siblings still in place reads "removed". - start_face is looked up at the unmoved point; no shadowed at/dir. - MAX_DECIMALS is re-exported from drawing::dimension; a metric thread gets a capital M. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tangency-labs#7605) Review of 15ade12 (FIXLIST_W29A_1101 items 1-4, 7 and nits 8-11): - Tests: a later offset of a blind floor reads failed; one hole of a pair filled in reads "removed" while its sibling resolves; tapped holes under a counterbore and a countersink; a misspelt `decimal` is refused; the part placed twice is its own test, asserts the plate and hole are in the part, and moves the first placement off the origin. - CalloutValues is built from a destructured HoleCallout; every schema field has a description; the status and params prose name every failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ui-text skill asks a new label for ko too (review of 15ade12, nit 6). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two lines @Gleinkaa's merge of drawings (6f94406) changed in the callout: `Vec3` comes from `solidcore_record` with the geom prelude, and a point inside a sheet is `classify_point` = `Inside`, as `Body::contains` is gone. The replay onto drawings 4bd7b40 keeps them as a commit, in the merge's place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per ASME Y14.5 and ISO 6410 a tapped hole whose thread has its own depth reads thread first:
'2× M8 ↧ 14.00', then 'Ø6.75 DURCH', then the counterbore or countersink. The count goes on the
first line. A thread that runs the hole's length stays one line, '{count}{thread}{extent}'.
…cy-labs#7605) Merging drawings brought the hole table's M8 tap drill at 6.80, not the 6.75 the tests carried. The countersink case follows: its cone reaches (12.75 - 6.80) / 2 = 2.975 below the top, so the thread is 12.975 deep.
…ency-labs#7605) other_item listed every other id kind but these two, so an occurrence's id fell through to the below-the-counter branch and read as lost instead of the error the module promises. Add both, and an occurrence id to the hostile-input test next to the component case.
…after a point is deleted (tangency-labs#7605) hole_spots takes the design (tangency-labs#12919), and a counterbore names its bridge (tangency-labs#11103), which a callout leaves out. Since tangency-labs#8111 a Hole drills only the points still in its sketch, so a callout's hole is its point's place among those; before, a callout after a deleted point read the next hole's place. A Move turns about its origin since tangency-labs#12659: the callout now reads a Move through eval::move_motion, the one reading the Move feature itself uses, so a hole in a body turned about a pivot is where the model puts it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#7605) A Move turned about a picked edge turns about that edge where it is in the model before the Move (tangency-labs#17974). The callout turned the hole about the line saved when the edge was picked, so it lost a hole whose edge an earlier step had moved. move_motion now reads the whole Move, the edge step included, from the Move feature and the model before it. The Move feature and the callout both call it. Each doc comment near it now sits on its own function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t.planned (tangency-labs#7605) The callout command now has the id drawing.hole_callout, so the planned placeholder that held the ribbon slot takes the .planned suffix, as drawing.dimension.from_model.planned does, and the registry has each id once (registry_is_consistent). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cameron Wight <camfrawig@hotmail.co.uk> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: truePre-merge checks:
|
…tangency-labs#20112) The parts-list panel is still a planned placeholder; this one box works now. The panel only reads the app, so it returns drawing.table.edit and the drawing workspace runs it.
…ominal millimetres (tangency-labs#20112)
…rd, on a view and on a flat pattern view (tangency-labs#20112) drawing.hardware_callout.add puts a note on a view whose text is the hardware record's now ("2× FLUSH NUT M5"), in the hole callout's style. On a flat pattern view its leader ends on the hole in the flat; a hole that is gone makes it lost, keeping its last text. The flat pattern view's options list the holes to call out.
… itself, and its panel lists the hardware holes (tangency-labs#20112)
…the hole's folded edge (tangency-labs#20112)
stray_bore and bore_floor measure along the hole axis with services::affine::distance_along instead of Vec3::dot; same maths. Co-authored-by: CamWight <91156642+CamWight@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Vec3 Co-authored-by: CamWight <91156642+CamWight@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # crates/doc/src/sheet_hardware.rs
…e, as main's kernel interface has it
# Conflicts: # crates/engine/src/cmd/drawing_note.rs
# Conflicts: # crates/doc/src/eval.rs
# Conflicts: # crates/engine/src/cmd/drawing_note.rs
# Conflicts: # crates/ui-egui/src/drawing_workspace/panels.rs
This draft claims #20112. Work in progress: the parts-list rows and the callout on a view are pushed; screenshots and a check of the drawn result come next.
It builds on #18382 (press-in hardware) and #17009 (hole callouts by @CamWight), whose branches are merged in, so its diff and CI include theirs until they land.
So far
drawing.hardware_callout.add {view, feature, copy?, at}puts a note with a leader on the hole that reads its record ("2× FLUSH NUT M5", "2× STUD M4 × 10", with Drawings: hole callouts on views (#7605) #17009's units, decimals and language) and follows it when the hardware changes; a hole that goes away leaves the note lost, never on another hole. On a flat-pattern view the leader ends on the hole in the flat; on a view of the folded part it ends on the hole's circular edge, which the command finds from the record. A view's options panel lists its hardware holes, one button each, to add the callout.press_in_hardwareon the list, a drawing-format change), so old drawings keep their rows.drawing.table.addanddrawing.table.edittakeset.list.press_in_hardware, and the parts-list panel's Press-in hardware box changes it for a drawn list.Closes #20112.
Changes a default: no
Test change: the parts-list records built in
table_tests,balloon_testsanddrawing_table_paper_testsname the newhardware: falsefield, as a parts list saved before this change reads; what each test checks is unchanged.