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

Euler Rotation Order as Parameter for Rotation #248

Closed
ZacharyKF opened this issue Jun 5, 2023 · 3 comments
Closed

Euler Rotation Order as Parameter for Rotation #248

ZacharyKF opened this issue Jun 5, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ZacharyKF
Copy link

Right now rotations are limited to the XYZ rotation order through the constructor. While a workaround exists where the user can explicitly apply rotations separately in the desired order, a more succinct solution would be to add an "ordering" parameter to the Rotation constructor. This would allow for various domain specific design paradigms. Something like:
Rotation((a, b, c), ordering=ZYZ)
Going further, having the ability to specify the default ordering would make build123d more friendly to disciplines like robotics.

@gumyr gumyr added the enhancement New feature or request label Jun 6, 2023
@gumyr gumyr added this to the Release 1.0.0 milestone Aug 20, 2023
@jdegenstein
Copy link
Collaborator

should Rotation((a, b, c), ordering=ZYZ) use an enum instead, e.g. Rotation((a, b, c), ordering=RotationOrder.ZYZ) ?

naming it AxisOrder.ZYZ instead might be a bit more general for future re-use.

Do we plan to support only intrinsic rotations, or all at this page including extrinsic?: https://dev.opencascade.org/doc/refman/html/gp___euler_sequence_8hxx.html

There are 12 intrinsic rotation orders available at the link above (and 12 extrinsic).

@ZacharyKF
Copy link
Author

An enum definitely seems like the best solution. Having access to all possible rotations seems like a smart idea to improve accessibility, not sure about the effort required to support this though.

@jdegenstein
Copy link
Collaborator

The effort is quite small to support extrinsic too. Also, it appears that OpenSCAD uses extrinsic rotations, so I think having extrinsic available here is a good idea for newcomers from that community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants