VisDak Posted July 19, 2009 Posted July 19, 2009 Hi to all, Good Day, I have some old Lisp route the will shade on round plan or symbol by a ramp up on plan, kindly see the image: (defun c:shd ()(setq old_error *error* *error* ai_error) (setq cecho (getvar "cmdecho")) (setvar "cmdecho" 0)(command "_.UNDO" "_GROUP") (initget (+ 1 2 )(setq fpt (getpoint "\nStarting Point of Shade ? ")) (initget (+ 1 2 )(setq spt (getpoint "\nEnd Point of Line Shade ? " fpt)) (initget (+ 1 2 )(setq opt (getpoint "\nDirection of Line Shade ? " fpt)) (setq dis (abs (distance fpt opt)))(setq hmany 1000) (command "line" fpt spt "")(setq flc (entlast)) (setq coeff (/ dis 1000))(repeat hmany (if (< (* coeff 1.25) dis)(progn (setq coeff (* coeff 1.25)) (command "offset" coeff flc opt "") (prompt (strcat "\rDRAWING IN PROGRESS, PLEASE WAIT... " (rtos (* (/ (float (* coeff 1.24))(float dis))100.000) 2 0)" %")) ))) (command "_.UNDO" "_E")(setvar "cmdecho" cecho)(princ)) the image "1" represent the route that i have, on image "2" is the one i need to be revised by it means, i like to be have this route "image 2" that i will use on circular to rectangular connection symbol it will be perfect on gredient deviding a line, please help me if you have some additional/revised to this route, thanks to all Quote
Lee Mac Posted July 19, 2009 Posted July 19, 2009 Like this: (defun c:shd (/ old_error *error* cecho fpt spt opt dis ang hmany flc) (setq old_error *error* *error* ai_error) (setq cecho (getvar "cmdecho")) (setvar "cmdecho" 0) (command "_.UNDO" "_GROUP") (initget (+ 1 2 ) (setq fpt (getpoint "\nStarting Point of Shade ? ")) (initget (+ 1 2 ) (setq spt (getpoint "\nEnd Point of Line Shade ? " fpt)) (initget (+ 1 2 ) (setq opt (getpoint "\nDirection of Line Shade ? " fpt)) (setq dis (abs (distance fpt opt))) (setq ang (angle fpt opt)) (setq hmany 1000) (command "line" fpt spt "") (setq flc (entlast)) (setq coeff (/ dis 1000.)) (repeat hmany (if (< (setq coeff (* coeff 1.25)) dis) (progn (command "_line" "_non" fpt "_non" (polar spt ang coeff) "") (princ (strcat "\rDRAWING IN PROGRESS, PLEASE WAIT... " (rtos (* (/ (* coeff 1.24) dis) 100.) 2 0) "%"))))) (command "_.UNDO" "_E") (setvar "cmdecho" cecho) (princ)) Quote
VisDak Posted July 19, 2009 Author Posted July 19, 2009 Wow, very fast, its perfect many thanks Lee Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.