Remove trig functions from prelude and change their unit handling (BREAKING) (#6565)

Remove trig functions from prelude and change their unit handling

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-04-30 12:40:11 +12:00
committed by GitHub
parent fa51b4bbbc
commit 844f229b5a
94 changed files with 5880 additions and 13152 deletions

View File

@ -11,8 +11,8 @@ fn cycloidalGear(gearPitch, gearHeight, holeDiameter, helixAngle: number(deg)) {
helixAngleP = helixAngle * gHeight / gearHeight
gearProfile = startSketchOn(offsetPlane(XY, offset = gHeight))
|> startProfile(at = [
gearPitch * 1.55 * cos(helixAngleP) + gearPitch * sin(-helixAngleP),
gearPitch * 1.55 * sin(helixAngleP) + gearPitch * cos(-helixAngleP)
gearPitch * 1.55 * math::cos(helixAngleP) + gearPitch * math::sin(-helixAngleP),
gearPitch * 1.55 * math::sin(helixAngleP) + gearPitch * math::cos(-helixAngleP)
])
|> arc(angleStart = 90 + helixAngleP, angleEnd = -90 + helixAngleP, radius = gearPitch)
|> tangentialArc(radius = gearPitch * 1.67, angle = 60)