mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-22 08:30:58 +00:00
4bd7b40227
* Drawing dimensions: the chain's line rule in one function (#13052) drawing_measure::line_of says which way a set of dimensions from a first point to a last one measures: horizontal, vertical, along a direction or aligned, turned to run the way the first point to the last goes. The chain uses it as before; baseline and ordinate sets will use the same rule. No reading changes; the aligned refusal names "the line's" first and last points instead of "the chain's". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing dimensions: a line inside a longer one along it is drawn once (#13052) A dimension's group drew a line only when it wasn't the same as one already drawn, which is how a chain's neighbours share an extension line. A straight line that lies along a longer one, within its ends, is now covered too, and the longer one is kept: the extension lines of dimensions measured from one origin all start there. Only one dimension's own lines are weighed, so no other dimension changes; every kind's paper tests pass unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawings: baseline dimension sets, one dimension from an origin to each target A baseline set measures from one origin to 2 to 64 targets along one line, as the view shows them, and is one dimension in the drawing. On paper each member is a dimension from the origin, stacked 7 mm apart from the outermost point on the offset's side, nearest first; the origin's extension line is drawn once. drawing.dimension.edit takes `targets: {remove, add}` (removals first, by number as the list is now, then additions appended), keeping the id, in one undo step. Repair names `origin` or a target by number. A target before its origin, or in line with it, is unmeasurable, with its reason. The line runs toward the target farthest from the origin along it (an aligned set's toward its last target), so the targets' order doesn't change what a set reads (@dudedagger42's review). Part of #13052. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing dimensions: one collector for a layout's lines and texts (#13052) paper_group gathered each piece's lines, arrowheads, texts, fonts and font answers in six locals. They move into one private collector, with the covered-line rule as its method, so a layout that doesn't go through dimension frames can use the same bookkeeping. No output changes: every paper test is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawings: ordinate dimension sets, each number at the end of a leader An ordinate set measures from one origin to 1 to 64 targets along one line, as the view shows them, and is one dimension in the drawing. On paper it has no dimension lines or arrows: each place, the origin shown as 0 and then each target, gets a leader out to one line past the outermost point, and its number past the leader's end, reading along it. Numbers that would overlap move apart by the least total movement (pool-adjacent-violators), each pooled block centred on its members' places, and a moved number's leader jogs to it. A target in line with its origin reads 0; one before it is unmeasurable. The targets edit, repair slots and default side are a baseline set's. Part of #13052. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing dimensions: a set's targets are checked by number and count before any is looked up (#13052) An edit of a baseline or ordinate set's targets named every added corner, each a model lookup, before it refused targets on a dimension that isn't a set, checked the numbers to take out, or counted the result. One more target on a full set with a bad pick gave the lookup's error, not the count's. The edit now checks the kind, the numbers (in range, each once) and the count first, and names the added corners only then. Too many added targets are refused by the set's count rule ("a baseline set has 2 to 64 targets"), as the add command words it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing dimensions: one rule for editing a list by number, and one count rule for both sets (#13052) doc drawing::kept_by_number judges an edit of a list by number before anything it adds is looked up: no number past the list's end, none twice, and the record's own count rule over what is kept and added; it gives the kept items in order, or why not, in words the caller chooses. A set's edit uses it, so `change` takes the whole new list, and retarget and change's second set and count checks go. The baseline and ordinate count rules are one check_set_targets(SetKind, n), with the same words; DimensionKind::set says which kind of set a dimension is. The messages are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drawing dimensions: a set's targets edit on a posed or exploded view checks the set where the view draws it (#13052) - The edit of a baseline or ordinate set's targets read its changed copy as the design places its parts. On a posed, exploded or other-configuration view, a target could be refused, or accepted, for positions the view doesn't draw. - It now reads the copy on the session its view draws from, through ViewSessions::read_on, as repair checks its copy and as add and inspect read a dimension. - The added targets are still named as add and repair name them: their picks are in the design's frame. - New test: on an exploded view, the bolt's bottom corner is in line with the set's origin as the design places it, but 50 mm higher where the view draws it. The edit refuses it on the assembled view and adds it on the exploded one, where it reads 50. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>