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

Rotation of Deltas and math #11

Open
bc0n opened this issue Jul 14, 2023 · 1 comment
Open

Rotation of Deltas and math #11

bc0n opened this issue Jul 14, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@bc0n
Copy link
Member

bc0n commented Jul 14, 2023

There needs to be a way to do this, and it should be obvious.

center = Point(0u"m", 0u"m")
an = 1u"rad"
topLeft = Point(-1u"m", 0.1u"m")
tlr = Rz(topLeft, an) + center

I've disallowed Point+Point for conceptual integrity, but this leads to rough edges. And at least right now Rz only operates on Points, not on Deltas, while Delta+Point is the only addition allowed.

@bc0n bc0n added the bug Something isn't working label Jul 14, 2023
@bc0n bc0n self-assigned this Jul 14, 2023
@bc0n
Copy link
Member Author

bc0n commented Jul 14, 2023

Workaround is to define as needed

  Base.:+(a::Geometry2D.Point, b::Geometry2D.Point) = Point(a.x + b.x, a.y+b.y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant