Skip to content

Add enclose bool op#2059

Open
adam-urbanczyk wants to merge 2 commits into
masterfrom
adam-enclose
Open

Add enclose bool op#2059
adam-urbanczyk wants to merge 2 commits into
masterfrom
adam-enclose

Conversation

@adam-urbanczyk

@adam-urbanczyk adam-urbanczyk commented Jul 5, 2026

Copy link
Copy Markdown
Member

This allows to construct solids from overlapping faces using enclose op. Does the name make sense to you BTW?
image
image

@adam-urbanczyk adam-urbanczyk marked this pull request as draft July 5, 2026 12:51
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.69%. Comparing base (f69500e) to head (9b1e7b4).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2059      +/-   ##
==========================================
- Coverage   95.78%   95.69%   -0.10%     
==========================================
  Files          30       30              
  Lines        9427     9438      +11     
  Branches     1404     1405       +1     
==========================================
+ Hits         9030     9032       +2     
- Misses        242      252      +10     
+ Partials      155      154       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adam-urbanczyk adam-urbanczyk marked this pull request as ready for review July 8, 2026 06:33
for s in shapes:
builder.AddArgument(s.wrapped)

builder.Perform()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, if the faces are non-intersecting and non-overlapping (i.e. two separate parallel faces or two crossing planes), you get a Compound of 0 solids and 0 faces back. Should the code raise an error instead of returning an empty result?


_update_history(history, name, shapes, builder)

return Shape.cast(builder.Shape())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the form of this return deviate from the other free function method returns (fuse, cut, split, etc)?

return _compound_or_shape(builder.Shape())


builder = BRepAlgoAPI_Splitter()
_bool_op(s1, s2, builder, tol)
builder = BOPAlgo_Splitter()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not really understand the implications of dropping from BRepAlgoAPI_Splitter to BOPAlgo_Splitter, but I did notice that there does not seem to be a test for split() to catch an issue that this might introduce.

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.

2 participants