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

collinear line priority in svg to fold #107

Open
mayakraft opened this issue May 11, 2024 · 1 comment
Open

collinear line priority in svg to fold #107

mayakraft opened this issue May 11, 2024 · 1 comment
Labels
bug / fix something is not right, or, improve an existing feature

Comments

@mayakraft
Copy link
Collaborator

the conversion of an SVG to FOLD includes the processing of collinear line segments that lie on top of each other, but the priority is fixed based on the type of assignment and nothing else. It would be nice if it worked this way:

example: there is one long blue line that spans the entire crease pattern, with smaller red lines that lie on top of the blue that "switch" the assignment at certain intervals, but the blue line remains uninterrupted underneath the red lines. The red lines should have a higher priority for being on top of the single blue line.

This would mean giving edges some kind of priority attribute and carrying that info into the planarize() method, or maybe giving that functionality to planarizeCollinearEdges() (a subroutine of planarize) and calling that directly, or maybe creating a custom implementation of planarizeCollinearEdges reserved for the svg-to-fold conversion method specifically.

@mayakraft mayakraft added request ideas, brainstorm, feature request bug / fix something is not right, or, improve an existing feature and removed request ideas, brainstorm, feature request labels May 11, 2024
@mayakraft
Copy link
Collaborator Author

Another potential solution might be to simply order the edges in edges_vertices such that the edges "on top" appear earlier in the list of edges_vertices. Then, some alternative sorting can be done in the planarize, or potentially inside the svgToFold method specifically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix something is not right, or, improve an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant