pts
pts copied to clipboard
Group methods on a Circle may lead to confusion
Hi,
I noticed that an object of the Circle class is implemented as a Group of two points, the center (x, y) and a pair of the radius (r, r). This works fine, but Group methods like rotate2D
, shear2D
, moveTo
etc. don't do anymore what their name suggests (except scaling from the center). The same holds for the Curve and Line classes I think. This could lead to confusion when trying to for example shear a circle.
The best solution that I can think of is to move those transformation methods to the Polygon class, since that's the context in which they do work as intended. Perhaps some methods that also work easily on circles like moveTo
and scale
could then be added to the Circle class.
Hi @Yvee1 , sorry about the late reply. I totally missed this.
You are right that functions like shear2D don't work on Circle as expected. We can make it work in Circle class. moveTo
should work though -- I'll double check.
Not sure if we should move these to Polygon. I'm thinking these functions should work on all groups, though there're special cases like Circle which we need to improve upon.
Thanks for the feedbacks. Let's keep this open as a feature enhancement.