Skip to content

Conversation

@parrangoiz
Copy link
Contributor

Description of changes:
Added an unfold function to the Polygons module. This can be used to make it easier to construct polygons that have a mirror symmetry. I have found this utility quite useful in my work so I figure I'd add it to the package.

Issue #, if available:
N/A

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute
this contribution, under the terms of your choice.

@gpeairs
Copy link
Member

gpeairs commented Jul 21, 2025

Looks useful. Can I suggest some modifications so that the interface follows the same pattern as reflect_across_line? In other words:

  • Don't restrict the type of dir, so that it can be a Point or an angle (the Reflection constructor accepts either)
  • Add a keyword argument through_pt=nothing that also gets passed to the Reflection constructor, so that the line across which points are reflected can be defined with a direction and a point other than the origin
  • Add a method that accepts two points defining a line across which the points are reflected (there's a Reflection constructor for this too, or this can call the method above)

@parrangoiz
Copy link
Contributor Author

@gpeairs I like the suggestion, done.

@parrangoiz
Copy link
Contributor Author

Do I need to add it explicitly to the docs or do we have autodocs for certain modules?

@gpeairs
Copy link
Member

gpeairs commented Jul 21, 2025

No autodocs, everything has to be added explicitly for now.

@parrangoiz
Copy link
Contributor Author

Ok added it to the polygon API section but let me know if you think there's a better place for it.

@codecov
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Member

@gpeairs gpeairs left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@gpeairs gpeairs merged commit 1afc876 into aws-cqc:main Jul 22, 2025
9 of 10 checks passed
@parrangoiz parrangoiz deleted the unfold branch July 22, 2025 14:51
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