Add math functions back to the prelude (#6595)

* Add math functions back to the prelude

* Update output

* Update docs
This commit is contained in:
Jonathan Tran
2025-04-30 11:07:05 -04:00
committed by GitHub
parent f1fdf48834
commit ccd5b0272d
111 changed files with 4002 additions and 4335 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 * math::cos(helixAngleP) + gearPitch * math::sin(-helixAngleP),
gearPitch * 1.55 * math::sin(helixAngleP) + gearPitch * math::cos(-helixAngleP)
gearPitch * 1.55 * cos(helixAngleP) + gearPitch * sin(-helixAngleP),
gearPitch * 1.55 * sin(helixAngleP) + gearPitch * cos(-helixAngleP)
])
|> arc(angleStart = 90 + helixAngleP, angleEnd = -90 + helixAngleP, radius = gearPitch)
|> tangentialArc(radius = gearPitch * 1.67, angle = 60)