Open tylerflex opened 1 month ago
I had the same idea. @e-g-melo mentioned it would be better for gui integration if we made it its own class. At the same time, we don't want to clutter the geometry primitives so I'm not sure
The classmethod approach would also be easier for the backend, as in, no changes needed, vs. needing to implement an Ellipse there too otherwise. But at the end of the day maybe we should do whatever makes the GUI experience best.
What would be nice is a way for GuI to offer ways to enter fields using class method constructors. But then the original data is lost when we load the model back
A native Ellipse would be ideal for GUI, but that is not super urgent. Two academic users have asked for that, so if you decide to implement it, we could have this as a lower-priority task.
maybe we can offer a classmethod for now? should be a super simple task and potentially good one for new people to implement to get familiar with the code.
I think so. It will certainly add. It would be nice if we could make it so that users easily understand they are getting a transformed object.
It will be in the type annotation shown in the docs
def elliptical(...) -> Transformed:
...
however, it might be a circular import if Transformed ever imports Cylinder, so perhaps we can't technically do this. It might rather need to be a class method of Transformed.
I think maybe instead of a separate Geometry class this could be a Cylinder classmethod that creates a transformed cylinder?