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

ValueError("polyline requires three or more pts") #486

Closed
MatthiasJ1 opened this issue Jan 18, 2024 · 5 comments
Closed

ValueError("polyline requires three or more pts") #486

MatthiasJ1 opened this issue Jan 18, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@MatthiasJ1
Copy link
Contributor

Seems like an unnecessary restriction.

@jdegenstein
Copy link
Collaborator

I agree. I think this should be changed.

@gumyr
Copy link
Owner

gumyr commented Jan 19, 2024

Polyline with two points is just a Line which probably means that someone has made a mistake which is why the check is there. Why do you see it as "unnecessary"?

@jdegenstein
Copy link
Collaborator

I see it as unnecessary because Polyline could be used in e.g. a programmatic setting (such as a python function) where the number of points is variable. Having to switch between Line and Polyline based on the number of points when the latter could generate a perfectly valid output seems like an arbitrary choice.

We haven't mentioned FilletPolyline which will fillet all "middle" points. Should FilletPolyline also change to a minimum of 2 points? I don't have a strong opinion either way.

@MatthiasJ1
Copy link
Contributor Author

@jdegenstein exactly. Also from a purely from a semantics point of view, a 2 point polyline is valid. It's the same for FilletPolyline.

@jdegenstein
Copy link
Collaborator

Incorporated suggestions into the merged PR here #516

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants