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