Part One - SpiralBy Scott Hull Getting Started - Spiral ProgramLook at the downloadable spiral-0.lsp or view on screen the spiral-0.txt program. This is a stripped down functional program that we will start with. It will draw a 3D spiral, similar to a coil spring. You can use the AutoCAD APPLOAD command or lisp load function to load the program inside AutoCAD:
Command: (load "spiral-0") Use the AutoCAD View pull-down menu to switch to the SE isometric view. This way we can see the spiral in three dimensions. You must turn off any object snap settings to run this first version of the program. Run the spiral program: Command: spiral The diameter is the diameter of the coils. The pitch is the spacing between each coil. The pitch x the number of coils = the overall height. You should get something like this: As it is, the spiral program has no error checking so if you enter something wrong, it won't run. It has no default values so you must enter each value. It is not optimized. It also has a problem with the start and end tangency points of the first and last coil. During this series, we will try to remedy all of these problems. And for those so inclined, analyze the workings of the code
|