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

Implement proper conversions between primitives #77

Open
bschwind opened this issue Jul 12, 2023 · 0 comments
Open

Implement proper conversions between primitives #77

bschwind opened this issue Jul 12, 2023 · 0 comments
Assignees

Comments

@bschwind
Copy link
Owner

When I say "proper", I mean implementing Into, From, TryInto, and TryFrom for things. Every primitive can be converted to a Shape, and if you know the shape type it can also be converted back.

There are also sometimes operations where we want to convert to the base class Shape, do some operation, then convert back to the more specific class we were (such as a Face or Wire). Maybe having a function like self.perform_as_shape(|shape| { }) would be good here, where it converts the inner type to a shape, runs the closure, and then converts back.

@bschwind bschwind self-assigned this Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant