• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

lisp to draw armored braces of reinforced concrete

gigio_2020

Guest
Good morning to all,
I am preparing a lisp to draw the armor needles for a schooner in c.a. for zwcad or autocad.
in practice the user are asked two points and the lisp should return a pline (green in the file that attach) of the length equal to the difference of the x of the two points and placed in half or to (y1+y2)/2, with a quota that represents the extension and a writing that represents the brand of the bar. I have problems when I run the commands (pline etc.) starting from the coordinates extracted from the points. does not always place objects correctly and sometimes tilts the bar when it should always be horizontal. It is as if the definition of variables was wrong (as if reals were considered strings and vice versa).
I attach the dwg file and lisp. Can someone help me?
Thank you.
 

Attachments

I have not checked the list, but for my habit I go back to the beginning of the operations (before all calculations and functions) these instructions
Code:
(setq oldosmode)
(set "smode" 0)
and when you finish all operations this other (before closing the dead)
Code:
(set "smode" oldosmode)
This allows you to delete the osnap before switching points to the headlights functions, as if you have active osnap often are intercepted, distorting the points you passed to the function through the calculations.
first of all the list saves the setup of the osnap.
then put the osnap to zero (equival to turn them off)
Do all your things...
The last string restores the osnap you had before deactivation.

try to see if with these additions it is better
 
draw and quotations irons for c.a. is one of the most useful programs that you can do with lisp.
We have devoted a discussion on the subject and made available the programmes.
g.p. has even written a code that automatically updates the sizing according to the ironing.
the list of gigio_2020, which however does not continue with the programming, is limited to drawing a line.
Actually, the need to draw the needles like polyline, extract and quote the individual traits and then write n, diameter and total length.
Hello, everyone.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top