-
Notifications
You must be signed in to change notification settings - Fork 8
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
Simplification is independent of reduction_factor #39
Comments
Thank you for the bug report! I'm currently on vacation but I'll take a look when I get a chance. |
I did a little investigation. It seems that there is an if statement that has some odd behavior.
If the heap value is 0, it will be below min_error and so the face target condition will be inoperative. I am trying to figure out why it was written this way. |
@zlateski would you have any insight into this? Sorry to bother you! |
The errors are always increasing, so this condition is something like
Naming might be unfortunate, but it was consistent with other naming we had at the time with the watershed etc... (as far as I remember) |
The rationale for adding min_error to the first condition was something like: We know the meshes will look good up to some error, so we can reduce even more than the target number of faces. Setting error to something close to 0 (or 0) and simplifying a cube with a lot of triangles should result in only 12 triangles and look more or less the same. |
This is not a bug, it's a feature. Make sure you pass The c++ code has some factor of 25*std::numeric_limits::epsilon() used as a default, which was probably appropriate for some meshes at some point in time - and is definitely not to be always used. |
This is really helpful info @zlateski! Really appreciate you taking the time. I'll expose |
Regardless of the reduction factor,
mesher.simplify
seems to simplify what seems like as much as possible:Actual reduction factor for order C: 24.636363636363637
Actual reduction factor for order F: 20.452830188679247
The actual reduction seems to be slightly affected by whether it is order
C
orF
.The text was updated successfully, but these errors were encountered: