You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
When I say "proper", I mean implementing
Into
,From
,TryInto
, andTryFrom
for things. Every primitive can be converted to aShape
, 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 aFace
orWire
). Maybe having a function likeself.perform_as_shape(|shape| { })
would be good here, where it converts the inner type to a shape, runs the closure, and then converts back.The text was updated successfully, but these errors were encountered: