-
Notifications
You must be signed in to change notification settings - Fork 12
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
points are not reusable between Shapes #751
Comments
I noticed that a while ago, and it was a tad annoying 😸 |
Another related problem is that if one wants to reuse the points in another shape then I think they will have been modified by the first shape and potentially unusable in the second shape shape1 = paramak.RotateStraightShape(
points= [
(100, 0),
(200, 0),
(250, 50),
(200, 100),
]
)
# shape1.points is now a list with connections not what the user originally input
shape1 = paramak.RotateSplineShape(
points= shape1.points
]
) |
One way to solve this would be to have two separate attributes One would only contain coordinates and the latter will only contain strings? |
Or perhaps another version of points called processed_points or something like that |
Do you mind if I keep it open a bit longer, I need to get that example I posted a few comments up working |
Points is passed by the user and changed internally by the class (perhaps this is poor program design).
One change adds the start point as the end point to make a closed wire. This is nice as it saves the user time and having to make that last point which the program can easily figure out.
It also checks that the input first and last points are not the same.
Anyway the points is pass as a list which is mutable.
Therefore the list values are changed and can't be reused. This simple example produces an error.
Perhaps we should not change the points that the user inputs by make a copy and change the copy?
The text was updated successfully, but these errors were encountered: