This month's request came from Ralph Ragan of Atlanta, Georgia. Ralph wants to draw a sinusoidal curve as a spline or polyline. This type of curve occurs in many situations, including a two-dimensional helix and screw threads. Normally this is quite time-consuming because it requires tracing a curve through many points that must be calculated or constructed.
The AutoLISP Solution is SINECURVE.LSP, and the corresponding dialog box file SINECURVE.DCL. The routine allows the user to select the periodic time (equivalent to the pitch of a thread), the amplitude (half the height for a thread), the number of cycles to display and the resolution or display accuracy of the curve.
Get the Code Download the SINECURVE.LSP and SINECURVE.DCL files from our Get the Code! area and save them in AutoCAD's Support directory. Use the Appload facility by selecting Tools / Load Application. Then select the SINECURVE.LSP program from where you stored the downloaded files.
|