Manifold constructor/union gives wrong results #487
Replies: 7 comments 1 reply
-
What happens if you scale up everything first? |
Beta Was this translation helpful? Give feedback.
-
You keep talking about passing an array of objects to the Manifold constructor, but I don't think we have a constructor that takes an array of geometries. Are you doing Boolean operations to combine these? Or And yes, |
Beta Was this translation helpful? Give feedback.
-
Sorry, I should have been clear that I'm using the Python bindings :) And the Python code is just a I will try to find some time to reproduce it in C++. |
Beta Was this translation helpful? Give feedback.
-
Ah, so it's not a constructor at all, but sequential Union operations. Do the artifacts have any volume, or only surface area? Anything you can do to minimize the repro would be much appreciated. It looks like the upper surface has a lot of nearly coplanar geometry - is that important? You might consider running |
Beta Was this translation helpful? Give feedback.
-
@elalish They all have non-zero volume. I will try to see what happens if I scale things up as @geoffder suggested. And after that, when I get the time, I will try to reproduce in C++. |
Beta Was this translation helpful? Give feedback.
-
Scaling up made the matter worse. I tried scaling all values down to abs(value) < 1.0 and it worked like a charm! Huge thanks for the work-around! |
Beta Was this translation helpful? Give feedback.
-
Glad it's working, but I'm still interested in getting a repro of this. What about the co-planar surfaces is important? I should have been more specific - we will avoid merging those triangles together into a larger face because we keep the identities of the meshes they came from separate. If you aren't re-applying mesh properties, then |
Beta Was this translation helpful? Give feedback.
-
Hi!
I'm using the Manifold constructor to union a lot of slightly overlapping geometries. Over time, I have noticed that I often get strange results in the form of "antennas" (thin wedges) inside of the solid, and now I finally got some time to open a discussion about it here :)
In the example I provide below, I have a list of 200+ geometries that I pass to the Manifold constructor. By binary searching, I found that strange things happened when I added the 183:rd geometry (that is, having 182 geometries in the list and running the constructor was fine, while adding the 183:rd to the list and running the constructor resulted in strange artifacts in the mesh). So obviously, I suspected there was something wrong with the 183:rd, but it looks fine and is very similar to all other shapes.
Interestingly, the strange artifacts that appear in the mesh are nowhere near the bounding box of shape 183! Furthermore, if I remove some of the other geometries (before 183), adding 183 produces no artifacts. So the issue is complex and it's very hard to produce a minimal example that reproduces the problem. If I remove 183 from the list, artifacts are still created from other geometries.
Before adding geometry 183 (which is shown in red) to the list that is passed to the Manifold constructor:
After adding geometry 183 (red) to the list that is passed to the Manifold constructor. The artifacts (red arrows) now appear, and they are nowhere near 183.
Geometry 183 is the extrude of the following CrossSection shape. It's counter-clockwise and simple.
My question is: How do I best help you reproduce the problem? Do you have an OFF importer in C++? If so, I could provide you with a C++ example reproducing the problem.
Beta Was this translation helpful? Give feedback.
All reactions