cork icon indicating copy to clipboard operation
cork copied to clipboard

Degenerate case that fails

Open Narusaki opened this issue 10 years ago • 6 comments

Hi, I'm using the code to merge some simple geometries under VS 2012, MS Windows 7 x64. I've compiled the code and successfully run the program with the two example ball models. But when I try to operate a union on the following cylinders, an error is triggered by the code as "Ran out of tries to perturb the mesh". I think this might be a degenerate case but I'm not quite sure. Is there any way to deal with this issue? Thanks.

primitives

Narusaki avatar Jul 12 '15 12:07 Narusaki

Is this constructed via multiple Boolean operations?

gilbo avatar Aug 03 '15 00:08 gilbo

Yes, there are more than ten cylinders to execute the "union" and "different" operations. I can send you the mesh files of these cylinders (in .obj or .off format) if you want.

Narusaki avatar Aug 03 '15 01:08 Narusaki

So, there's a known issue with Cork, which is that it doesn't do anything to remove small geometry (small edges and triangles) from the model after performing the Boolean operation. Those features are likely causing problems in later Boolean operations. Unfortunately, I don't have a fool-proof way to address this problem, so I usually just recommend applying some kind of remeshing operation to remove these tiny bits of geometry in-between Boolean operations.

If you're sure that this is a different issue, then please let me know, and I can look into it in more detail.

Also, sorry I don't have a better fix for you, but I don't have the time to do the research that would be needed to prevent these problems. =(

gilbo avatar Aug 03 '15 01:08 gilbo

Well thank you, I think it probably is the issue you mentioned above. Thanks for your reply :)

Narusaki avatar Aug 03 '15 02:08 Narusaki

is there a way to adjust numerical tolerances in cork?

ofloveandhate avatar Aug 25 '15 16:08 ofloveandhate

Cork doesn't use epsilon tolerances on it's expression testing. It uses exact arithmetic, and floating-point filters to accelerate it.

gilbo avatar Sep 21 '15 23:09 gilbo