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

Adding straight skeleton with holes #30

Merged
merged 3 commits into from
May 14, 2024

Conversation

romanarust
Copy link
Member

Added skeleton from polygon with holes

@romanarust romanarust requested a review from tomvanmele May 14, 2024 09:48
Copy link
Member

@tomvanmele tomvanmele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a small question/comment

Comment on lines +29 to +30
lines = create_interior_straight_skeleton_with_holes(polygon, holes)
graph = Graph.from_lines(lines)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the return value is a list polylines (not lines), it will not always be possible to directly convert this into a graph. perhaps it would be helpful to have a helper for making the conversion...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The skeleton function is implemented to always return lines, so it should work to always convert them to a graph.

But I agree that the conversion is not proper yet. Ideally the return value should not be PolylinesNumpy, but a compas.datastructures.mesh, as it could represent CGAL's data type for the StraightSkeleton_2:
https://doc.cgal.org/Manual/4.1/doc_html/cgal_manual/Straight_skeleton_2_ref/Concept_StraightSkeleton_2.html#Cross_link_anchor_1072

I anyway plan to add some other functions like the create_interior_weighted_straight_skeleton_2. So maybe I will tackle this in the next PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok so current one can be merged?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@tomvanmele tomvanmele merged commit fc60f46 into main May 14, 2024
10 checks passed
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.

3 participants