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

Radians vs degrees for SCAD trigonometric functions #415

Open
sorki opened this issue Apr 23, 2022 · 1 comment
Open

Radians vs degrees for SCAD trigonometric functions #415

sorki opened this issue Apr 23, 2022 · 1 comment

Comments

@sorki
Copy link
Contributor

sorki commented Apr 23, 2022

Currently, our trig. functions work with radians but the reference implementation uses degrees. This can cause surprises as the SCAD file is interpreted incorrectly.

We can

  • Introduce a breaking change and switch SCAD engine to work with degrees (rotation function already uses deg)
  • Hide this behind a compatibility flag (problematic because we don't know when to enable OpenSCAD compat mode which is disabled by default)
  • Introduce something like language pragma, that would allow setting this per-project but seems tricky in presence of use/imports (per-file).

Related to this, @julialongtin proposed exposing ImplicitCAD (or Implicits SCAD engine) version as SCAD variable which could potentially be used to guard breaking changes.

@sorki
Copy link
Contributor Author

sorki commented May 5, 2022

Gets even more confusing because e.g. rotate already uses degrees.

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

No branches or pull requests

1 participant