Skip to content

Modeling Algorithms - Parallelize RemoveFeatures across disjoint solids - #1454

Open
bwross wants to merge 1 commit into
Open-Cascade-SAS:masterfrom
bwross:defeature-parallel-components
Open

Modeling Algorithms - Parallelize RemoveFeatures across disjoint solids#1454
bwross wants to merge 1 commit into
Open-Cascade-SAS:masterfrom
bwross:defeature-parallel-components

Conversation

@bwross

@bwross bwross commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Features whose affected solids don't overlap with any other features
are grouped via Union-Find and processed independently (each with its
own private local shape/history), enabling BOPTools_Parallel to run
disjoint groups concurrently while features sharing a solid stay
sequential within their group. Fixes poor multi-core utilization on
shapes with many independent features.

Adds DRAW test boolean/removefeatures/G5: two disjoint solids, each
with its own feature, removed together in one call, covering the new
multi-group path.

Benchmarked on a 16-core machine with a synthetic stress shape (N
disjoint solids, one drilled-hole feature each, all removed in a
single call):

Disjoint groups Serial Parallel Speedup
20 215ms 66ms 3.3x
40 448ms 122ms 3.7x
80 899ms 239ms 3.8x
160 1868ms 542ms 3.4x

Serial and parallel runs produce identical area, volume, and full
shape-type counts (vertex/edge/wire/face/shell/solid), both reporting
as valid shapes. Also verified end-to-end through FreeCAD's
Part.Shape.defeaturing() on a compound of disjoint holed solids, and
confirmed with Valgrind memcheck (0 errors) on the parallel path.

Features whose affected solids don't overlap with any other feature's
are grouped via Union-Find and processed independently (each with its
own private local shape/history), enabling BOPTools_Parallel to run
disjoint groups concurrently while features sharing a solid stay
sequential within their group. Fixes poor multi-core utilization on
shapes with many independent features.

Adds DRAW test boolean/removefeatures/G5: two disjoint solids, each
with its own feature, removed together in one call, covering the new
multi-group path.

Matches analytical volume/area exactly across repeated runs, and
confirmed end-to-end through FreeCAD's Part.Shape.defeaturing() on a
compound of disjoint holed solids.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant