Anda di halaman 1dari 1

Enter wall thickness and length, to create Object [Archive] - AUGI

9/11/2013

AUGI > English Forums > Programming > AutoLISP > Enter wall thickness and length, to create Object

View Full Version : Enter wall thickness and length, to create Object
Robert.Hall This could be a useful lisp however, I am not good with programming. I have made some simple routines but nothing quite like this one. What I need here is a lisp where the O.D., wall thickness, and length are entered, the results end up like the supplied picture. The dimensions and weld line can be left off the drawing, of course. This could be a useful routine for anybody creating similar geometry. C an somebody help me out on this one? lance.81922

PDA

2005-03-18, 06:45 PM

2005-03-18, 08:29 PM

Here's a little something that does much of what you want. It draws the hidden lines but doesn't make any provision for what layer they go on and what linetype they get (that's up to you). I just made a command decision to make the rectangle one diameter away from the circle. Try this out: ;;; PIPEVIEW (defun c:pipeview (/ osmode od wall len ci pt1 pt2 pt3 pt4 pt5 pt6 pt7) (setq osmode(getvar "OSMODE")) (setvar "OSMODE" 0) (setq od (getreal "\nPipe Outside Diameter: ") wall (getreal "\tWall thickness: ") len (getreal "\nPipe overall length: ") ) (if (and (numberp od) (numberp wall) (numberp len) ) (progn (setq pt1 (getpoint "\nPipe C enter Point: ")) (command "_C IRC LE" pt1 "Diameter" od) (setq ci(entlast)) (command "_OFFSET" wall ci pt1 "") (setq pt2 (list (+ (car pt1) od) (- (cadr pt1) (/ od 2)) (caddr pt1) ) pt3 (list (+ (car pt2) len) (+ (cadr pt2) od) (caddr pt2) ) ) (command "_REC TANG" pt2 pt3) (setq pt4 (list (car pt2) (+ (cadr pt2) wall) (caddr pt2) ) pt5 (list (car pt3) (- (cadr pt3) wall) (caddr pt3) ) ) (setq pt6 (list(+ (car pt4) len) (cadr pt4) (caddr pt4) ) pt7 (list (- (car pt5) len) (cadr pt5) (caddr pt5) ) ) (command "_LINE" pt4 pt6 "" ) (command "_LINE" pt5 pt7 "" ) ) ) (setvar "OSMODE" osmode) (princ) ) paulmcz .....or this one. Robert.Hall 2005-03-21, 12:39 PM 2005-03-19, 02:19 AM

Thanks a bunch, both these routines work great........Ive got 2 versions now, one that just draws the deatail. The second routine adds the hidden lines and center marks. This will save alot of time and I hope some other people can benefit from these as well. Kudos to both of you! Powered by vBulletin Version 4.1.11 C opyright 2013 vBulletin Solutions, Inc. All rights reserved.

http://forums.augi.com/archive/index.php/t-16386.html

1/1

Anda mungkin juga menyukai