Skip to content

Extrude Join/Cut changes hidden bodies too, and the dialog can't pick its target bodies #2464

Open

Description

@kaievns

Behavior

Hiding a body doesn't keep an extrude's Join (or Cut, Intersect) away from it. Without targets, the extrude changes every body of the active component that it meets, shown or hidden. A hidden body is joined in and disappears from the browser, or the operation fails on it. The Extrude dialog has no way to pick the bodies to change, so an extrude that ends on a reference body (To Object) can't leave that body out.

This comes up when a component holds two bodies and you want to extrude different sizes onto each, one at a time: hide one and extrude onto the other.

Reproduction

SolidCraft 0.15.0, macOS arm64; or as a script:

{"commands": [
 {"command": "solid.box", "params": {"length": 40, "width": 40, "height": 5, "body_name": "Plate"}},
 {"command": "solid.move", "params": {"bodies": ["Plate"], "copy": true}},
 {"command": "browser.visibility", "params": {"items": ["Plate (2)"], "visible": false}},
 {"command": "sketch.create", "params": {"plane": "XY", "offset": 5, "name": "Rim"}},
 {"command": "sketch.rectangle.two_point", "params": {"p0": [2, 2], "p1": [38, 38]}},
 {"command": "sketch.rectangle.two_point", "params": {"p0": [4, 4], "p1": [36, 36]}},
 {"command": "sketch.finish", "params": {}},
 {"command": "solid.extrude", "params": {"sketch": "Rim", "profiles": [0], "distance": 3, "operation": "join"}}
]}

The extrude reports removed_bodies: ["Plate (2)"], and the design ends with one body, Plate: the hidden copy is joined in. In the app: hide one of two bodies that the extrusion meets and extrude with Join onto the other; both become one body.

Expected

  • With no targets picked, the dialog's Join, Cut and Intersect change the visible bodies of the active component. The visible set is saved with the feature, so showing or hiding bodies later doesn't change the model.
  • The Extrude dialog has a Targets input (bodies) to pick exactly which bodies the operation changes, for example to end on a reference body without joining it.
  • Editing an extrude shows its saved targets.

Activity

  1. added
    in progress
    on Oct 18, 2026
  2. github-actions commented on Oct 18, 2026

    @github-actions
    Contributor

    Claimed by @kaievns through #2465. The claim lapses after 14 days without pushes.

  3. added
    area:kernel
    bug
    needs-triage
    on Oct 18, 2026
  4. added a commit that references this issue on Oct 21, 2026
  5. 101 remaining items

  6. nullifyr commented on Dec 4, 2026

    @nullifyr
    Contributor

    Checked both halves on main 41d4326ba3 (solidcraft-cli 0.54.0).

    Hidden bodies. I ran the script in the description through solidcraft-cli run (macOS arm64, headless). The Join leaves the hidden copy alone: removed_bodies: [], changed_bodies: ["Plate"].

    • Plate is 8816.0000 mm³: the 8000 mm³ plate plus the rim, (36² − 32²) × 3 = 816 mm³.
    • Plate (2) is still 8000.0000 mm³.
    • The saved feature records the bodies it changes, "participants": ["Plate"], so showing the copy later doesn't pull it in.

    Picking target bodies. The Extrude dialog now has a Target Bodies input for Join, Cut and Intersect (#17323). These tests on main cover what the issue asks for:

    • extrude_cut_only_cuts_the_target_bodies_picked_in_the_dialog: a picked target, or a hidden body left out, keeps the other body intact, and the targets are saved.
    • extrude_join_joins_the_target_bodies_picked_in_the_dialog.
    • editing_extrude_cut_restores_targets_and_clearing_them_keeps_the_original_scope: editing an extrude shows its saved targets.
    • extrude_target_picks_survive_join_cut_switches_but_not_new_body.

    cargo test --profile ci -p solidcraft-ui-egui --lib extrude_edit_tests:: on Linux x86_64 (z790): 79 passed, 0 failed, including the five target-body tests (the four above and a_target_body_pick_stops_the_automatic_operation_at_once). Both halves of this issue look fixed on main. The earlier claim PR, #2465, is closed, so the in progress label is stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:kernelbugin progressneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions