PDA

View Full Version : 3d spiral lisp



Orbit
9th Feb 2004, 09:29 pm
I have a lisp of a 3d spiral and it behaves weird.
http://picserver.student.utwente.nl/view_image.php/JC0K3V1C5PO/picserver.jpeg

Anyone with an idea of what is happening?

A good, friendly 3dspiral lisp would be welcomed at this point. Thank you in advance.

fuccaro
10th Feb 2004, 06:46 am
Orbit
Just my guess: try to deactivate the OSNAP before you start the routine...

Orbit
10th Feb 2004, 09:09 pm
:lol:
of course, just type in capitals no osnap when displaying a lisp.

That was it. Thank you.

fuccaro
11th Feb 2004, 07:32 am
It is not a rule to deactivate the osnap when running a lisp.
Let me explain with an example.
Imagine a drawing containing a line from origin to any other point and the OSNAP is set to END. Now a lisp routine tries to draw a line from the point A (0.002,0) to the point B (10,10). When the routine starts the line from A, due to the proximity of the other lines end point, the start point will "jump" in the origin. Exactly like when you put the mouse cursor in a point very close to an other point watched by the osnap.
This accidental snap depends on the actual zoom, on the view direction and on the osnap settings. So running several times the routine you get different results.
A good lisp routine will deactivate the osnap before to draw anything. A better routine will save your osnap settings before and restore them at the end. An elegant routine will not use AutoCAD commands.
After years of lisp sometimes I still forget to deactivate the osnap in my routines.