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

fix(modeling): geom2 mirroring transform #1302

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

platypii
Copy link
Contributor

@platypii platypii commented Oct 3, 2023

Fixes #1301 (thanks @gilboonet)

When a mirroring transform is applied to a geometry, we should reverse the point order so that orientation is preserved.

This was already done for geom3/poly3 geometries here, but was not applied to geom2.

This PR uses the 2D determinant in geom2.transform to check if a transform is a mirroring transform in 2D.

Added to V3 branch since this is technically a breaking change. Although I would argue this is a fix of bad behavior.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Does your submission pass tests?

Fixes jscad#1301

When a mirroring transform is applied to a geometry, we should
reverse the point order so that orientation is preserved.

This was already done for geom3/poly3 geometries, but was broken for geom2.

This PR adds a check for negative 2D determinant to check if a transform
is mirroring in 2D.
Copy link
Member

@z3dev z3dev left a comment

Choose a reason for hiding this comment

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

@platypii a few nits. but nice changes.

@platypii platypii requested a review from z3dev October 4, 2023 07:35
@z3dev z3dev merged commit 8a1f04b into jscad:V3 Oct 4, 2023
2 checks passed
@platypii platypii deleted the V3-transform-mirroring branch October 4, 2023 17:41
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.

None yet

2 participants