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

RotateExtrude should use radians not degrees #288

Closed
jackie-scholl opened this issue Nov 15, 2020 · 2 comments · Fixed by #299
Closed

RotateExtrude should use radians not degrees #288

jackie-scholl opened this issue Nov 15, 2020 · 2 comments · Fixed by #299

Comments

@jackie-scholl
Copy link
Contributor

jackie-scholl commented Nov 15, 2020

Most of ImplicitCAD uses Radians, but the RotateExtrude implementation uses degrees:
https://github.com/colah/ImplicitCAD/blob/5ddd75006cc8f1d6a0e184f56c3714a9097ce6b0/Graphics/Implicit/ObjectUtil/GetImplicit3.hs#L170-L176

This is a breaking change, but I think we should change the API to use radians not degrees. Fwiw, I use RotateExtrude to implement a screw, and I calculate a number of rotations anyways and then have to convert to degrees for this function.

This was prompted by #287 (comment). Note that I'm mostly thinking about the Haskell eDSL side, I have no familiarity with ExtOpenScad.

@julialongtin
Copy link
Member

The reason this uses degrees is that in the scad language, the call to this accepts degrees. in order to change this and maintain openscad compatibility, you would have to put a special case in place.

@sorki
Copy link
Contributor

sorki commented Nov 20, 2020

I've stumbled on this as well and think we should change the Haskell interface but keep the extopenscad one compatible not to break existing code/examples.

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 a pull request may close this issue.

3 participants