Function Reference: solid.helix

drafting: S = solid.helix (R, PITCH, TURNS)

A coil, swept by a region turning about its own axis as it rises.

S = solid.helix (R, PITCH, TURNS) returns a solid.Shape traced by the geom.Region R as it turns TURNS times about the y axis of its plane, through the plane’s origin, rising PITCH millimetres along that axis on every turn. As for solid.revolve, the region’s x coordinate is the radius and its y coordinate the position along the axis, and the region stays in the plane through the axis all the way round, as the profile of a thread does. This is how a coil spring, a thread or a worm is modelled. A hole in the region makes the coil a tube.

A region in the default xy plane coils about the model’s y axis; draw it in the xz plane for a coil along z. The coil turns anticlockwise seen from the tip of its axis, which is a right-hand helix; mirror it with solid.Shape.mirror for a left-hand one. TURNS need not be a whole number.

The region must lie clear of the axis, every point of it at a positive x, and must be shorter along its y axis than PITCH, or one turn would run into the next.

A coil’s volume is its region’s area times the distance the region’s centroid travels round the axis, 2 \pi r on every turn; the rise adds nothing. The surfaces are splines fitted to the exact helix, so a volume or extent agrees with that to a few parts in a million.

 
 ## A compression spring along z: wire of diameter 2 on a mean diameter of
 ## 20, five turns at a pitch of 4
 R = geom.Region ([9, 1, 1; 11, 1, 1]);
 R.UCS = geom.UCS ([0, -1, 0], [0, 0, 0]);   # the xz plane: y is world z
 S = solid.helix (R, 4, 5);

See also: geom.Region, solid.revolve, solid.sweep

Source Code: solid.helix