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

tighten CCW #508

Merged
merged 1 commit into from
Jul 30, 2023
Merged

tighten CCW #508

merged 1 commit into from
Jul 30, 2023

Conversation

elalish
Copy link
Owner

@elalish elalish commented Jul 29, 2023

Partially solves #502

Alternative to #507. I found a problem with CCW, where it was not properly conservative because the base could be up to twice as long as calculated if the v0 is near the midpoint between v1 and v2.

@elalish elalish self-assigned this Jul 29, 2023
@elalish elalish requested a review from pca006132 July 29, 2023 23:42
@codecov
Copy link

codecov bot commented Jul 30, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (7facd0e) 90.36% compared to head (4482ec7) 90.36%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #508   +/-   ##
=======================================
  Coverage   90.36%   90.36%           
=======================================
  Files          35       35           
  Lines        4431     4431           
=======================================
  Hits         4004     4004           
  Misses        427      427           
Files Changed Coverage Δ
src/utilities/include/public.h 67.05% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pca006132
Copy link
Collaborator

pca006132 commented Jul 30, 2023

Wow it is amazing that the cause of issue is so simple!

However, I found that although this fixes the simplified repro in #502, there is still triangulation error for the original mesh in openscad/openscad#4679, which you can reproduce by extracting the woodgrain.stl to test/models, and then run

#ifdef MANIFOLD_EXPORT
TEST(Samples, SvgBreak) {
  Manifold m1 = ImportMesh("../../test/models/woodgrain.stl");
  Manifold output = Manifold::Cube({145, 100, 1}, true) - m1;
  ExportMesh("SvgBreak.glb", output.GetMesh(), {});
}
#endif

And this no longer triggers any geometryErr.

@elalish
Copy link
Owner Author

elalish commented Jul 30, 2023

Thanks, yeah I just noticed that your other simple polygon test is still failing - it's actually an unrelated issue. As part of debug I just realized intermediateChecks is not actually running during our tests like I thought it was. I am fundamentally misunderstanding something about how our ExecutionParameters are getting compiled.

@elalish
Copy link
Owner Author

elalish commented Jul 30, 2023

Okay, I'm going to go ahead and merge this one and deal with the other triangulation issues on a separate branch.

@elalish elalish merged commit 7c454dc into master Jul 30, 2023
@elalish elalish deleted the monotones branch July 30, 2023 05:37
@pca006132 pca006132 mentioned this pull request Aug 3, 2023
@elalish elalish mentioned this pull request Nov 3, 2023
cartesian-theatrics pushed a commit to SovereignShop/manifold that referenced this pull request Mar 11, 2024
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

Successfully merging this pull request may close these issues.

2 participants