Feature windows choose Join, New Body or Cut from what the material touches (#6901) (#6903)

* claim: #6901

* Feature windows choose Join, New Body or Cut from what the material touches (#6901)

Extrude, Revolve, Loft, Sweep, Coil and the Box, Cylinder, Sphere and Torus choose
their operation by running the Join on a copy of the design off the window thread
and counting the pieces: Join when the material makes one body with what it
touches, New Body when it would be a separate piece, Cut when it lies inside a
body (Revolve and the four primitives; Extrude keeps its own Cut). The choice
changes only when a check is in, a pick in the Operation row (the shown option
included) stops it for good, and OK waits for a running check. Hidden bodies take
no part: with some hidden, the shown ones become the feature's targets.

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

* Operation row: a pick in Extrude stops its own choice at once; ja/zh strings, gallery entry

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

* Operation check: contact test first, mesh volumes for Cut, OK takes the evaluated Join

Material touching no body is a New Body without running the Join (the contact
test costs 0-240 ms where the Join costs seconds on a large body). Inside is told
from display-mesh volumes instead of exact ones (8 s on a 400-hole plate). The
check evaluates the Join through Session::ahead, and OK of the same commands
takes it (Session::prime) rather than computing it again.

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

* Preference: Choose the operation automatically (on by default)

Preferences > Design gets "Choose the operation automatically" (auto_operation,
on by default). Off, feature windows don't choose Join, New Body or Cut from
what their material touches: each keeps the operation it opens with (Extrude
its own Join or Cut), no check runs and OK doesn't wait for one, as before

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

* Arabic, Hebrew, Vietnamese and Turkish strings for the operation choice and its preference

Arabic, Hebrew and Vietnamese are complete catalogs now, and Turkish has a full
catalog, so this change's three strings get them too.

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

* Operation check: a closed window's check stops; the icon audit doesn't choose

A window's operation check kept running after the window closed, a Join on
the design for nothing, and the test harness waited for it after every step:
the icon audit, which opens every window, took ~30 min instead of ~1. The
check now runs under a Progress, and closing the window (or one that doesn't
choose) abandons it: its evaluation stops at the next feature and nothing
waits for it. The icon audit turns auto_operation off, as it only looks at
icons (75 s again).

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

* Box placement test: the window keeps its New Body

The test #6248 added places a box that overlaps Base and expects a second body;
with #6901 the window would join or cut it. The test is about where the box
goes, so it turns auto_operation off.

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

* Join pieces: read the target lists leniently after the rebase

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
This commit is contained in:
froglemonade2
2026-10-28 19:57:27 +00:00
committed by GitHub
parent 261d00fbb2
commit 02ac56d12f
23 changed files with 1061 additions and 62 deletions
+17 -8
View File
@@ -15,14 +15,23 @@ it.
| Construct | offset plane (at a distance or through a point), plane at angle, plane along path |
| Inspect | measure, section analysis, interference, compare bodies, curvature comb and map, zebra, draft, minimum radius, isocurves, centre of mass |
Extrude automatically selects **Join** for additions when the active component already has a
solid, including sideways elbow connections and screw bosses that meet only part of a face.
Extruding into existing material selects **Cut**. In an empty component it selects **New Body**;
choose **New Body** explicitly to keep an addition separate. Changing the default does not alter
operations already saved in a design. A Join (of an extrude, revolve, sweep, loft, primitive…)
whose material touches none of its target bodies still joins it, to the first one as a separate
piece, and the feature's warning says so: "`Body1` is now in 2 separate pieces". Combine joins
the bodies it is given without that warning.
Extrude, Revolve, Sweep, Loft, Coil and the Box, Cylinder, Sphere and Torus choose their
operation from what their material does, until you pick one: **Join** when it makes one body with
a body it touches (a block against a wall, a ring round a hole, a boss meeting only part of a
face), **New Body** when it would be a separate piece, and **Cut** when it goes into a body
(Extrude) or lies inside one (Revolve and the Box, Cylinder, Sphere and Torus). The window finds
out by running the Join on a copy of the design in the background, so its choice is what OK
makes; it changes only when that check is in, and OK waits for it. An operation you pick stays,
and a feature you edit keeps its own. Pipe, Thicken and Boundary Fill start as a New Body. Only
shown bodies take part: with some bodies hidden, the feature names the shown ones as its targets,
so a hidden body is never joined or cut, and showing it again later changes nothing.
**Choose the operation automatically** (Preferences › Design, on by default) turns this choice
off: each window then keeps the operation it opens with, Extrude its own Join or Cut, as before.
A Join you pick whose material touches none of its target bodies still joins it, to the first
one as a separate piece, and the feature's warning says so: "`Body1` is now in 2 separate
pieces". Combine joins the bodies it is given without that warning. Changing the default does not
alter operations already saved in a design.
**Extrude to a picked target** (Preferences › Design, off by default) lets a pick choose the
extent. With it on and a profile selected in the solid Extrude dialog, picking a face away from
+1
View File
@@ -322,6 +322,7 @@ labels; `prefs:measure_axis_distances` identifies the checkbox.
One setting per line, sorted by name. A change that adds a setting adds its own line in order, so two such changes only meet when their settings are neighbours.
- `angle_decimals`
- `auto_operation` (default true: feature windows choose Join, New Body or Cut from what their material touches until one is picked; false: each keeps the operation it opens with, Extrude its own Join or Cut)
- `browser_bodies_folders` (`several` (default): a component with one body and no groups lists it straight under the component in the browser, without a Bodies folder; `always`; `never`: components list their bodies and groups straight under them, and the folder's menu items are on the component's menu; the design's own Bodies folder, and one hidden with its eye, always show; #4217)
- `check_updates` (default true; [updates](book/src/guide/updates.md))
- `color_vision` (`off` (default), `protan`, `deutan`, `tritan`: colour vision modes, #778)