CAD->bisect node. Fix fill holes on complex objects (ex. torus). #4803
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Windows 11, Blender 3.3.1, Sverchok-master
ex. #4799 if replay with Bisect then result is unexpected too:
But Blender do bisect well:
What the problem? The part of problem is in operator bmesh.ops.bisect_plane. The Bisect Operator does not fill holes! (Unexpected!).
See:
https://github.com/blender/blender/blob/3780a402651aeac0caa86767f823a8517a6f8bae/source/blender/editors/mesh/editmesh_bisect.c#L322-L333
But how Blender do fill? It do fill later with triangle_fill operator (https://docs.blender.org/api/current/bmesh.ops.html#bmesh.ops.triangle_fill)!
https://github.com/blender/blender/blob/3780a402651aeac0caa86767f823a8517a6f8bae/source/blender/editors/mesh/editmesh_bisect.c#L346-L355
But how Sverchok do fill on bisect [see line 49]?
sverchok/nodes/modifier_make/bisect.py
Lines 44 to 49 in 9ff8f36
I think this is a problem. So I try replace bmesh.ops.edgeloop_fill to bmesh.ops.triangle_fill. And I got next result that look good:
With joined mesh:
Suzanne tomography:
Suzanna has non-manifold geometry so glitches are expected.
for test this pull request: https://gist.github.com/78671a6264b9255acbb3883779fefc73