Jump to content

Broken geometry after a boolean intersection


AntoineSfx

Recommended Posts

So it's pretty simple. I have this geometry that I want to send to the slicer (a pre processor for 3d printing)

I don't want to send the whole thing for printing, so I need to intersect the geo with a box.

I don't really care about the topology after this point if this can help; there is this error: 
Warning Nonmanifold edges in solid A: p1-2 p4-6 p2-3 p5-6 p2-0 

Is there a way to fix this upstream or downstream from this boolean op ? I'm pretty sure that the incoming main geometry is clean.

 

brokenBoolean.hipnc

Link to comment
Share on other sites

nah...look carefully near the top, one of the grille holes is incorrectly filled up.

the orig geo is NOT clean IMO, (don't think I'm rude but I would say it's a complete mess).

here's what a clean result should look like, on the left boolean, everywhere is solid, where grille holes are are STILL holes, while the right boolean has "holes" where the cut is...and yet some grille holes are incorrectly filled in.

test_brokenBoolean.hipnc

Edited by Noobini
Link to comment
Share on other sites

30 minutes ago, Noobini said:

nah...look carefully near the top, one of the grille holes is incorrectly filled up.

the orig geo is NOT clean IMO, (don't think I'm rude but I would say it's a complete mess).

here's what a clean result should look like, on the left boolean, everywhere is solid, where grille holes are are STILL holes, while the right boolean has "holes" where the cut is...and yet some grille holes are incorrectly filled in.

test_brokenBoolean.hipnc

3D printing was just a pretense.. What I needed to know was how to spot a bad geometry beforehand, or how to fix it if it's problematic. I will upload the full geometry later.

Link to comment
Share on other sites

ok, so I think I found the root cause.

Considering the large amount of points sharing two coordinates, because the boxes are copied on a grid, this setup creates shapes that are hard on the triangulation algorithm that happens in the boolean SOP and elsewhere ( possibly just in display )

What I think happens is this: at some point the algorithm has to decide whether a point is left or right from a line to decide which triangles to build. In this case, as a lot of points share the same coordinates, this point in the code has a lot of opportunities to fail. 

See this on page 4: https://members.loria.fr/MTeillaud/CGAL/robustness.pdf each square represents a bit of a float number, you can see that some fail the orientation test because of IEEE754

How I solved it: I added a slight jitter to the grid so that everything is distributed randomly enough, so that the triangulation algorithm doesn't have to deal with lots of points that are too closely aligned.

crate2.png

Link to comment
Share on other sites

interesting...so what you thought was clean...didn't work...to make it work...you had to dirty it up a bit...:wacko:

does it leave holes where the  cuts are ? or its solid ALL over, ie. go to side or front view a bit.

Link to comment
Share on other sites

9 hours ago, Noobini said:

interesting...so what you thought was clean...didn't work...to make it work...you had to dirty it up a bit...:wacko:

does it leave holes where the  cuts are ? or its solid ALL over, ie. go to side or front view a bit.

this is actually solid all over, and flawless. Funny thing is, if you snap the points to a nice 1e-4 grid, the problem pops up instantly after the fuse.

Also, it is really data dependent. For example even at  a given jitter scale, which seemingly moves the points around so that they're not too aligned: changing the jitter seed, you can often find one specific value that will trick the triangulation into failing. Making this solution unsuitable for a dynamic setup or something.

Also, I found that often the problematic polygon is often so dirty that you can't even Hole SOP / un-bridge it properly if you blast it apart for examination. I'm not sure if it's related to this problem though

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...