Message 1 of 3

Not applicable
10-19-2019
08:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello always thank you all. I searched internet and got this lsp
I have a fix and I get some help. attached jpg file
thank you
;;;Copyright 1990, PENNEX GROUP, Inc.
;;;This routine will draw a radius elbow on a square cornered duct.
;;;At this time it is still a little slow because the object snap
;;;is set to 'near' to be sure points were picked on the duct lines.
;;;At this time it is still a little slow because the object snap
;;;is set to 'near' to be sure points were picked on the duct lines.
;;;edited by R. Wilson Avatech Solutions 10/23/01
(defun endpt1 (ent1) ;finds first endpt of a line
(cdr (assoc 10 (entget ent1)))
)
(cdr (assoc 10 (entget ent1)))
)
(defun endpt2 (ent1) ;finds second endpt of a line
(cdr (assoc 11 (entget ent1)))
)
(cdr (assoc 11 (entget ent1)))
)
(defun c:test (/ INA OUTA INB OUTB END1A END2A WIDA RADIN RADOUT)
;(modes '("cmdecho" "osmode"))
;(setvar "cmdecho" 0)
;(setq olderr *error*) ; save old *error* handler
;(setq *error* newerr) ; set new *error* handler
(setvar "OSMODE" 512)
(setq INA (getpoint "\nPick inside of duct A: "))
(setq OUTA (getpoint "\nPick outside of duct A: "))
(setq INB (getpoint "\nPick inside of duct B: "))
(setq OUTB (getpoint "\nPick outside of duct B: "))
(command "LINE" INA "PERPEND" OUTA "") ;draws perpendicular line
(setq END1A (ENDPT1 (entlast)))
(setq END2A (ENDPT2 (entlast)))
(setq WIDA (distance END1A END2A)) ;gets width of duct
(setq RADIN (* 0.5 WIDA))
(setq RADOUT (* 1.5 WIDA))
(command "ERASE" "L" "")
;(command "_.fillet" "")
(command "_.fillet" "R" RADIN) ;sets "_.fillet" radius
(command "_.fillet" (osnap INA "nea") (osnap INB "nea")) ;draws inner "_.fillet"
(command "_.fillet" "R" RADOUT) ;sets "_.fillet" radius
(command "_.fillet" (osnap OUTA "nea") (osnap OUTB "nea"));draws outer "_.fillet"
(command "LINE" "ENDPOINT" INA "ENDPOINT" OUTA "") ;draws cap line
(command "LINE" "ENDPOINT" INB "ENDPOINT" OUTB "") ;draws cap line
(COMMAND "OSMODE" 0)
; (moder)
;(setq *error* olderr) ; Restore old *error* handler
(princ)
)
;|≪Visual LISPⓒ Format Options≫
(78 2 40 2 nil "end of " 75 9 0 0 0 T T nil T)
;*** DO NOT add text below the comment! ***|;
;(modes '("cmdecho" "osmode"))
;(setvar "cmdecho" 0)
;(setq olderr *error*) ; save old *error* handler
;(setq *error* newerr) ; set new *error* handler
(setvar "OSMODE" 512)
(setq INA (getpoint "\nPick inside of duct A: "))
(setq OUTA (getpoint "\nPick outside of duct A: "))
(setq INB (getpoint "\nPick inside of duct B: "))
(setq OUTB (getpoint "\nPick outside of duct B: "))
(command "LINE" INA "PERPEND" OUTA "") ;draws perpendicular line
(setq END1A (ENDPT1 (entlast)))
(setq END2A (ENDPT2 (entlast)))
(setq WIDA (distance END1A END2A)) ;gets width of duct
(setq RADIN (* 0.5 WIDA))
(setq RADOUT (* 1.5 WIDA))
(command "ERASE" "L" "")
;(command "_.fillet" "")
(command "_.fillet" "R" RADIN) ;sets "_.fillet" radius
(command "_.fillet" (osnap INA "nea") (osnap INB "nea")) ;draws inner "_.fillet"
(command "_.fillet" "R" RADOUT) ;sets "_.fillet" radius
(command "_.fillet" (osnap OUTA "nea") (osnap OUTB "nea"));draws outer "_.fillet"
(command "LINE" "ENDPOINT" INA "ENDPOINT" OUTA "") ;draws cap line
(command "LINE" "ENDPOINT" INB "ENDPOINT" OUTB "") ;draws cap line
(COMMAND "OSMODE" 0)
; (moder)
;(setq *error* olderr) ; Restore old *error* handler
(princ)
)
;|≪Visual LISPⓒ Format Options≫
(78 2 40 2 nil "end of " 75 9 0 0 0 T T nil T)
;*** DO NOT add text below the comment! ***|;
; an example of fillet 2 lines
Solved! Go to Solution.