-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Ellipse mode radius changes behavior of radius labelled argument #352
Comments
|
I found the line responsible for drawing triangles when the radius is negative. https://github.com/abey79/vpype/blob/15ae8110eac724226d1050ea88f4f9301a39cbec/vpype/primitives.py#L131 if radius ( |
I think it's not immediately obvious what
|
I think the clean way would be to draw with the absolute value and invert the circle rotation direction. This latter point would be completely pointless in the current situation IMO, so I'd drop it. I'm actually thinking of the future of vpype/vsketch data model, with first class support for arcs, bezier, etc. When/if that happens, it'll be easy (and more meaningful) to do the "right thing". |
I would expect that these two lines of code would produce the same output
vsk.circle(0,0,radius=5) vsk.circle(0,0,radius=5, mode="radius")
but was suprised to find that
vsk.circle(0,0,radius=5, mode="radius")
draws a circle with radius 10!
I created a repo to write a test and explore this outside the context of the complex code where I had come across it: https://github.com/R4chel/vsketch-circle-mode-debugging
And here is an output image from that showing the problem. The lines are drawn from the center of the circle to a point distance radius away.
The text was updated successfully, but these errors were encountered: