Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Degenerate case that fails #21

Open
Narusaki opened this issue Jul 12, 2015 · 6 comments
Open

Degenerate case that fails #21

Narusaki opened this issue Jul 12, 2015 · 6 comments

Comments

@Narusaki
Copy link

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

@gilbo
Copy link
Owner

gilbo commented Aug 3, 2015

Is this constructed via multiple Boolean operations?

@Narusaki
Copy link
Author

Narusaki commented Aug 3, 2015

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.

@gilbo
Copy link
Owner

gilbo commented Aug 3, 2015

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. =(

@Narusaki
Copy link
Author

Narusaki commented Aug 3, 2015

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

@ofloveandhate
Copy link

is there a way to adjust numerical tolerances in cork?

@gilbo
Copy link
Owner

gilbo commented Sep 21, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants