by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Parametric Design
Introduced first in SolidGeometry 5.3, Creation date: 2023-02-28, Last change: 2025-09-15
[SG,SGC,SGL,CPLC,CPLX]=SGspringSpiral([r,w,d,h,k,"STL","ccw","CPLu"])
r: | Distance between center and 2nd axis; default is 30 | |
w: | number of windings as integer of pi; default is 10 * pi | |
d: | thickness; default is 1.2 mm | |
h: | height; default is 5 mm | |
k: | [wrench-size n-edges diameter n-edges] default is [6.4 4 5 0] | |
"STL": | if used a STL file is written | |
"ccw": | if used for Freewheel and Spring, torque is ccw and windup is cw | |
"CPLu": | if used an optional contour is cut out of the lid (for example shape of SGfreewheel) |
SG: | Solid Geometry of the Spring | |
SGC: | SG of a safety cage cover | |
SGL: | SG of a safety cage lid with opening for CPLu | |
CPLC: | Contour of the cage | |
CPLX: | Contour of the shaft bearing and the axis bearing |
SGspringSpiral(20,'',0.8,'',[6.4 6 5 0],'CPLu',PLcircle(10)) % With cage and lid & torque cw
SGspringSpiral(20,'',0.8,'',[6.4 6 5 0]) % without lid
SGspringSpiral(20,'',0.8,'',[6.4 6 5 0],'CPLu',PLcircle(10),'ccw') % With cage and lid & torque ccw
SGspringSpiral('simple'); A=ans; SGrotate(A,'z',pi);B=ans % 2 arm spring coil
SGspringSpiral('simple'); A=ans; SGrotate(A,'z',2*pi/3);B=ans; SGrotate(B,'z',2*pi/3); C=ans; SGplotalpha(A); % 3 arm coil