import math import cadquery as Cq def torsion_spring(radius=12, height=20, thickness=2, omega=90, tail_length=25, right_handed: bool = False): """ Produces a torsion spring with abridged geometry since sweep is very slow in cq-editor. """ if right_handed: omega = -omega base = ( Cq.Workplane('XY') .cylinder(height=height, radius=radius, centered=(True, True, False)) ) base.faces(">Z").tag("top") base.faces("