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

regular_shapes: Avoid the circle trick #43

Merged
merged 1 commit into from
Oct 3, 2018

Conversation

rockstorm101
Copy link

As is stated in the very own manual of OpenSCAD [1], generating polygons
using the circle function is a trick that should be avoided.

[1] https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_Primitives#regular_polygon

As is stated in the very own manual of OpenSCAD [1], generating polygons
using the circle function is a trick that should be avoided.

 [1]
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_Primitives#regular_polygon
@rockstorm101
Copy link
Author

Also, would you accept renaming from "reg_polygon" to "regular_polygon"? Since standard two-word functions such as "rotate_extrude" or "linear_extrude" are not abbreviated.

@GilesBathgate
Copy link

When I originally wrote it I was intending to abstract away 'the trick', so that it could be avoided. Thinking about it, it may well have been me that wrote the paragraph on the wiki too.

As for renaming it regular_polygon, it's fine to create a wrapper function, but deleting it will break anyone's existing files.

@rockstorm101
Copy link
Author

When I originally wrote it I was intending to abstract away 'the trick', so that it could be avoided. Thinking about it, it may well have been me that wrote the paragraph on the wiki too.

Haha, cool.

As for renaming it regular_polygon, it's fine to create a wrapper function, but deleting it will break anyone's existing files.

Of course, yeah, the idea was to make the old one a wrapper to the new and add a deprecation warning.

@hyperair
Copy link

hyperair commented Oct 3, 2018

Yeah, trying to preserve backward compatibility is the reason the dev branch hasn't been merged after so long.

@hyperair hyperair merged commit cd13445 into openscad:master Oct 3, 2018
@rockstorm101 rockstorm101 deleted the fix-reg-polygon branch October 4, 2018 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants