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

CPP Error after processing several examples #23

Closed
SarthakJShetty-path opened this issue Aug 24, 2023 · 5 comments
Closed

CPP Error after processing several examples #23

SarthakJShetty-path opened this issue Aug 24, 2023 · 5 comments

Comments

@SarthakJShetty-path
Copy link

Thank you for open-sourcing this tool. It has been very helpful to run CD on some meshes that I have.

I was trying to decompose some meshes that I have, from an open-source dataset. After processing about ~200-300 meshes in a python for loop, I received this error:

python: /workspace/coacd/src/process.cpp:112: double coacd::MergeConvexHulls(coacd::Model&, std::vector<coacd::Model>&, std::vector<coacd::Model>&, coacd::Params&, double, double): Assertion `p1 < costSize' failed

I've seen this error about 2-3 times at this point. For context, I'm trying to decompose the mesh with these parameters:

coacd.run_coacd(
            mesh=mesh,
            threshold=0.05,
            max_convex_hull=10,
            merge=True,
        )

Please let me know if some of these parameters are incompatible or if this is a known bug for certain meshes.

Thank you!

@SarthakJShetty-path
Copy link
Author

One additional point:

The constraints that I've placed on threshold and max_convex_hull are not hard constraints, and there is room to change these to more suitable values if that might help mitigate this problem.

Thank you!

@SarahWeiii
Copy link
Owner

Hi can you give me an example for reproducing the error?

@SarthakJShetty-path
Copy link
Author

Sure! I'm using the code directly from here.

I'm running it on some obj files taken from the popular ABC dataset here.

Here is one example obj file from ABC where I run into this error.

Thank you for your time!

@SarahWeiii
Copy link
Owner

Hi I tried to run the code on your obj, and I couldn't reproduce the error.
When i use t = 0.05 it just output 1 component, and i use t = 0.01 to produce a quite good result as follows:
image

@SarthakJShetty-path
Copy link
Author

@SarahWeiii apologies for not getting back. I guess the issue was I was running the file with the default parameters, which might have been causing some issue?

I will take another look at this to confirm.

Thank you for your time.

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

2 participants