-
Notifications
You must be signed in to change notification settings - Fork 137
misc changes #1190
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
misc changes #1190
Conversation
- Removed the use of acos and fma in boolean code. Our boolean should hopefully be deterministic across machines now, please let us know if this is not.
- Made mesh dump function public. This will write an OBJ file in a custom format to an ostream in full precision, which can be imported via the ImportMesh64 function. This is for debug purposes only because the format is subject to changes, and the ImportMesh64 cannot read OBJ files exported by other programs (and not intended to be used that way, user should just use meshio).
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1190 +/- ##
==========================================
- Coverage 92.21% 92.10% -0.11%
==========================================
Files 31 31
Lines 5959 5966 +7
==========================================
Hits 5495 5495
- Misses 464 471 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -561,7 +568,7 @@ void Manifold::Impl::CalculateNormals() { | |||
// should just exclude it from the normal calculation... | |||
if (!la::isfinite(currEdge[0]) || !la::isfinite(prevEdge[0])) return; | |||
double dot = -la::dot(prevEdge, currEdge); | |||
double phi = dot >= 1 ? 0 : (dot <= -1 ? kPi : std::acos(dot)); | |||
double phi = dot >= 1 ? 0 : (dot <= -1 ? kPi : acos(dot)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should call these floats, since our acos function isn't giving us double precision?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at it, no, because our face normal is double, so we will have to downcast that as well if we want to use float.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess what I mean is, our normals aren't really as precise as doubles anymore right? It's probably fine to leave it as is, but I was just thinking maybe it would be good to remind ourselves that these have more error than e.g. our positions.