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

Triangulation issue: Zebra #831

Closed
kintel opened this issue Jun 5, 2024 · 7 comments · Fixed by #832
Closed

Triangulation issue: Zebra #831

kintel opened this issue Jun 5, 2024 · 7 comments · Fixed by #832

Comments

@kintel
Copy link
Contributor

kintel commented Jun 5, 2024

The following OpenSCAD script yields a bad Manifold triangulation:

$fn=24;
text(text="R",font="naturePro",size=5);

Note: This single font glyph consists of ~120 separate outlines with >62K vertices.

out

Saving as SVG and reading that back yields the same issue (SVG attached for convenience).
zebra

The output after enabling MANIFOLD_DEBUG and PolygonParams().processOverlaps = false:
zebra.cc.zip

@elalish
Copy link
Owner

elalish commented Jun 5, 2024

Still digging into what's wrong with this one, but I can see why it's a tough customer:
image
Amazingly this is not self-intersecting. However, this is also a great example of why the even-odd fill rule is such a disaster. Strictly positive fill rule would have made a much more sensible polygon.

@elalish
Copy link
Owner

elalish commented Jun 7, 2024

@pca006132 Unfortunately minimize_testcase fails for this polygon - it returns a single inverted triangle, but as far as I can tell there's nothing with incorrect winding in the whole thing. I'd guess it's getting confused by the touching vertices.

@pca006132
Copy link
Collaborator

Make sense, that code was assuming non-intersecting (touching) polygons. Should try to make it more general one day...

@elalish
Copy link
Owner

elalish commented Sep 19, 2024

Can we get a new polygon dump, since something must have changed compared to our existing tests?

@pca006132
Copy link
Collaborator

Yeah, I think it is probably related to precision.

@pca006132
Copy link
Collaborator

Trying to reproduce, so far I cannot get the result that @kintel got.

@pca006132
Copy link
Collaborator

cannot reproduce downstream anyway

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 a pull request may close this issue.

3 participants