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

Conditional is always false in MeshData.approximateConvexHull(...) #783

Open
demianmnave-pti opened this issue Feb 18, 2022 · 3 comments
Open

Comments

@demianmnave-pti
Copy link

Happened to be exploring MeshData.py and found a conditional that is always false due to unit_size = 0.0125 and max_unit_size = 0.01 on the previous two lines:

while len(vertex_data) > input_max and unit_size <= max_unit_size:

@fieldOfView
Copy link
Contributor

unit_size was apparently changed from 0.125 to 0.0125 to fix "floating models" 4 years ago:
e617dd8

@nallath
Copy link
Member

nallath commented Feb 21, 2022

I've checked in our tracker and it was apparently to fix Ultimaker/Cura#2792 (and the large amount of duplicates)

But feel free to make a PR to remove the unneeded check :)

@demianmnave-pti
Copy link
Author

Without the checks, it's just a call to createConvexHull() by a different name. It would appear the function should just be removed and calls to it replaced by createConvexHull() directly.

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