importing non-manifold meshes #471
Replies: 4 comments 7 replies
-
There's more detailed discussion in our wiki, but the short answer is no. A Boolean op is not defined for non-manifold meshes, because the winding number (inside vs. outside) is not defined for non-manifold meshes. Consider a mobius strip intersected with another mobius strip. What would that even mean? Generally when we're hoping to do Boolean ops on non-manifold meshes, they are meshes that "look" manifold - appear to represent a solid. In order for that Boolean op to be well defined and reliable, we need complete topological manifoldness. Any algorithm that doesn't require that is making guesses. Here we require you to do the guesswork ahead of time. Our |
Beta Was this translation helpful? Give feedback.
-
What libraries or algorithms are you aware of that can fix non-manifold
meshes and make them manifold? You said some are quite good, I'd love to
learn more.
…On Mon, Jun 26, 2023 at 2:43 PM Emmett Lalish ***@***.***> wrote:
There's more detailed discussion in our wiki
<https://github.com/elalish/manifold/wiki/Manifold-Library#manifoldness>,
but the short answer is no. A Boolean op is not defined for non-manifold
meshes, because the winding number (inside vs. outside) is not defined for
non-manifold meshes. Consider a mobius strip intersected with another
mobius strip. What would that even mean?
Generally when we're hoping to do Boolean ops on non-manifold meshes, they
are meshes that "look" manifold - appear to represent a solid. In order for
that Boolean op to be well defined and reliable, we need complete
topological manifoldness. Any algorithm that doesn't require that is making
guesses. Here we require you to do the guesswork ahead of time. Our Merge
function is a simple version of this, but if your meshes are more broken
than it can handle, you'll need to employ other manifold fixing algorithms,
some of which are quite good (mostly for 3D printing), but are
fundamentally heuristic.
—
Reply to this email directly, view it on GitHub
<#471 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPYQ2NHKXLUI2J5KBV5FXTXNHJ6PANCNFSM6AAAAAAZT2W52Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thank you. Do you know of any open source libraries or algorithms that can
do this?
…On Mon, Jun 26, 2023, 5:59 PM Emmett Lalish ***@***.***> wrote:
I used to work with Netfabb, before they were acquired by Autodesk; they
did an excellent job: https://www.autodesk.com/products/netfabb/free-trial
There's also MeshMixer (another defunct, but still free now-Autodesk
product). I helped ship 3D Builder
<https://apps.microsoft.com/store/detail/3d-builder/9WZDNCRFJ3T6?hl=en-us&gl=us>
long ago, and it has great manifold fixing built-in (also powered by
Netfabb), if you happen to have a Windows machine.
I would like to add support for proper manifold cleanup in this library
eventually, but it'll be a bunch of work, and I'm not sure I want to deal
with the volume of bugs, since there will always be cases it doesn't work
well for.
—
Reply to this email directly, view it on GitHub
<#471 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPYQ2I65SMRHJX6YIVJDQ3XNIA25ANCNFSM6AAAAAAZT2W52Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I looked at CGAL, it seems that they implement the algorithm in "Cutting and Stitching: Converting Sets of Polygons to Manifold Surfaces", and it seems to work well. See openscad/openscad#4832 |
Beta Was this translation helpful? Give feedback.
-
Let's say that I would like to import an STL file in my app (could be triangle soup, and could also have some issues like non-manifoldness), and then I would like to do 3D boolean operations on them. It would be really nice to be able to use manifold for those operations, as it's really fast.
I gave this a try, and it works for most 'OK' STL files. However, when trying to construct the
Manifold
object from the meshdata, it sometimes complains about being unable to construct aManifold
type from the mesh because the result is non-manifold. Obviously, some of the STL files that I tried have problems.The question: would it (hypothetically) be possible for manifold to handle incorrect meshdata, just to be able to do 3D booleans on them? I.e. we'd be able to do boolean operations, but the output would/could be non-manifold too, which would be OK in my use case.
Beta Was this translation helpful? Give feedback.
All reactions