1
AutoLISP (Vanilla / Visual) / Re: [request] Radiant Pipe Layout
« Last post by ribarm on Today at 10:21:09 AM »And here is single pattern... When one segment is drawn, you just have to copy it - 2 times input distance - upward...
For me it's totally not important which one is better... Maybe the best is to choose in real life situation and then decide...
For me it's totally not important which one is better... Maybe the best is to choose in real life situation and then decide...
Code - Auto/Visual Lisp: [Select]
- (or (not (vl-catch-all-error-p (vl-catch-all-apply (function vlax-get-acad-object) nil))) (vl-load-com))
- (if cmd
- )
- (if osm
- )
- (if m
- )
- )
- (if (setq par (rem (- (fix (vlax-curve-getparamatpoint pl (trans p 1 0))) 0.5) (vlax-curve-getendparam pl)))
- (list
- )
- )
- )
- (setq pt
- (rem (float (fix (+ 0.5 (vlax-curve-getparamatpoint pl (setq p1 (vlax-curve-getclosestpointto pl (trans pt 1 0))))))) (vlax-curve-getendparam pl))
- )
- 0 1
- )
- )
- (setq bulge (vla-getbulge (vlax-ename->vla-object pl) (fix (vlax-curve-getparamatpoint pl (trans (car p) 1 0)))))
- )
- )
- (command-s "_.TRIM" pl "" "_non" (trans (vlax-curve-getpointatparam pl 0.1) 0 1) "_non" (trans (vlax-curve-getpointatparam pl (- (vlax-curve-getendparam pl) 0.1)) 0 1) "")
- (vl-cmdf "_.TRIM" pl "" "_non" (trans (vlax-curve-getpointatparam pl 0.1) 0 1) "_non" (trans (vlax-curve-getpointatparam pl (- (vlax-curve-getendparam pl) 0.1)) 0 1) "")
- )
- (command-s "_.PEDIT" pl "" "_R")
- )
- )
- )
- )
- )
- )
- )
- )
- )
- )
- (if (< (distance p (vlax-curve-getclosestpointto lwi p)) (distance p (vlax-curve-getclosestpointto lw p)))
- )
- r
- )
- (chiv lw pt)
- )
- (setq d2 (distance pt (trans (vlax-curve-getpointatparam lw (float (fix (1- (+ (vlax-curve-getendparam lw) 0.1))))) 0 1)))
- (command-s "_.PEDIT" lw "" "_R")
- )
- )
- )
- )
- (setq vx (inters (car vl) (polar (car vl) (angle pt (trans (vlax-curve-getpointatparam lw 1.0) 0 1)) 1.0) (trans (vlax-curve-getpointatparam lw 1.0) 0 1) (trans (vlax-curve-getpointatparam lw 2.0) 0 1) nil))
- (setq vx (inters (car vl) (polar (car vl) (angle pt (trans (vlax-curve-getpointatparam lw 1.0) 0 1)) -1.0) (trans (vlax-curve-getpointatparam lw (vlax-curve-getendparam lw)) 0 1) (trans (vlax-curve-getpointatparam lw (1- (vlax-curve-getendparam lw))) 0 1) nil))
- (setq pl
- (list
- )
- )
- )
- )
- (command-s "_.MIRROR" (ssadd pl (ssadd (entlast))) "" pt (trans (vlax-curve-getpointatparam lw 1.0) 0 1) "_Y")
- )
- )
- )
- )
- (*error* nil)
- )