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

Closed path is not recognized as face #239

Open
pasbi opened this issue Apr 2, 2022 · 2 comments
Open

Closed path is not recognized as face #239

pasbi opened this issue Apr 2, 2022 · 2 comments
Labels
bug Something isn't working geometry related to geometry, graphs, faces, points, edges, etc.

Comments

@pasbi
Copy link
Owner

pasbi commented Apr 2, 2022

Describe the bug
Sometimes faces (closed paths) are not recognized correctly.

To Reproduce
Create a path like on this image:
Problematic Geometry

Expected behavior
The closed area should be recognized as a face and filed with the blue brush.
a

Additional context
It seems like the problem is caused by the two consecutive 3-joints.
If the 3-joint is separated by another 2-joint (or ordinary path point), the face recognition works.

@pasbi pasbi added bug Something isn't working geometry related to geometry, graphs, faces, points, edges, etc. labels Apr 2, 2022
@pasbi
Copy link
Owner Author

pasbi commented Apr 2, 2022

The problem also occurs/disappears if a point gets only moved:

a
b

@pasbi
Copy link
Owner Author

pasbi commented Apr 3, 2022

It seems like the zero-length tangent is a problem:
When the path intersects itself (and the intersection is not a point), there is no guarantee to detect all faces correctly.
With tangents, one can make the path intersect itself.
Every point has tangents, they might just have zero length, but they still have an orientation.
The orientation is, however, not (or barely, if the tangent is very short) visible, but still might make the path overlap itself and hence break the face detection algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working geometry related to geometry, graphs, faces, points, edges, etc.
Projects
None yet
Development

No branches or pull requests

1 participant