Skip to content

Remove faces left behind by full-thickness push/pull - #86

Open
furilo wants to merge 1 commit into
BenchUp3D:mainfrom
furilo:fix-issue-39-full-thickness-push-pull
Open

furilo wants to merge 1 commit into
BenchUp3D:mainfrom
furilo:fix-issue-39-full-thickness-push-pull

Conversation

@furilo

@furilo furilo commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Fixes #39.

Problem

When a push/pull goes through the full thickness of a board, the walls and cap of the extrusion land exactly on pieces of the body's existing faces. The extrusion first splits the side and bottom faces along its new edges, and then raw_face finds the split piece already there and keeps it as a single face. In the case from the issue, that leaves the triangle on the bottom and the two 10 × 18 mm strips on the sides, so the board is no longer a closed solid and Model::solid_volume rejects it.

Change

In extrude_face, push/pull now collects the walls and cap that coincide with an existing face. If the pushed face belonged to a closed two-manifold shell before the operation, and the coincident region lies inside one of that body's earlier surfaces, the face is erased together with the edges and vertices that only it used. The same reasoning covers a pull that meets another part of the same body, where the shared region becomes internal.

The cleanup is limited to closed shells, so loose surfaces such as a single floor face keep their current behaviour. Faces that the extrusion itself creates while connecting its edges, such as the diagonal wall in the issue, are not inside an earlier surface and are kept. Because the change is in extrude_face, it applies both to the core push_pull and to the app's Push/Pull tool, which goes through push_pull_along.

Tests

The new test full_thickness_push_pull_removes_faces_coincident_with_the_far_side covers the corner cut from the issue inside a group, an inset pushed through the board (the hole must stay open), and a half-depth cut that must keep its floor and leave the bottom untouched. The test suites for benchup-core, benchup-tools and benchup-cli pass locally, and so do the Push/Pull tests in benchup-app.

When a push/pull on a closed solid reaches its far side, the walls and
cap of the extrusion land exactly on pieces of the body's existing
faces. Those regions were merged into a single face and kept, so the
board stopped being a closed solid and solid tools rejected it.

Push/pull now erases these coincident faces, together with the edges
and vertices that only they used, whenever the pushed face belongs to
a closed shell. Loose surfaces such as a single floor face keep their
previous behaviour.

Fixes BenchUp3D#39

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Full-thickness push_pull leaves stray faces and edges (board stops being a closed solid)

1 participant