Message 1 of 4
End view of pipe

Not applicable
03-24-2000
03:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
try this one
(defun C:PIPEND ()
(setvar "cmdecho" 0)
(graphscr)
(setq e1 (car (entsel "\nPick circle for pipe end: ")))
(if e1
(progn
(setq e1 (entget e1))
(if (= (cdr (assoc 0 e1)) "CIRCLE")
(progn
(setq p1 (cdr (assoc 10 e1)))
(setq r (cdr (assoc 40 e1)))
(setq hPI (/ PI 2.0))
(setq qPI (/ PI 4.0))
(setq hr (/ r 2.0))
(setq p2 (polar p1 hPI r))
(setq p3 (polar p1 hPI hr))
(setq p3 (polar p3 PI hr))
(setq p4 (polar p1 (+ PI hPI) r))
(setq p5 (polar p1 (+ PI hPI) hr))
(setq p5 (polar p5 0.0 hr))
(setvar "blipmode" 0)
(command "pline" p2 "ARC" "S" p3 p1 "S" p5 p4 "")
(setq ans nil)
(setq ans
(strcase
(getstring "\nShade in half the symbol? ")
)
)
(if (= ans "Y")
(progn
(command "pline" p2 "arc" "CE" p1 p4 "S"
p5 p1 "S" p3 p2 "")
(command "hatch" "U" 45 (/ r 12.0) "N" "L" "")
(command "erase" "P" "")
(redraw)
)
)
(setvar "cmdecho" 1)
);end prog
(prompt "\nEntity not a circle.")
);end if
);end prog
(prompt "\nNothing selected.")
);end if
(princ)
);end
Mick wrote:
> Hi, does anyone know where i can get a lisp routine that will draw a ying
> yang symbol to represent the end elevation of a pipe
>
> thanks in advance
>
> MICK
(defun C:PIPEND ()
(setvar "cmdecho" 0)
(graphscr)
(setq e1 (car (entsel "\nPick circle for pipe end: ")))
(if e1
(progn
(setq e1 (entget e1))
(if (= (cdr (assoc 0 e1)) "CIRCLE")
(progn
(setq p1 (cdr (assoc 10 e1)))
(setq r (cdr (assoc 40 e1)))
(setq hPI (/ PI 2.0))
(setq qPI (/ PI 4.0))
(setq hr (/ r 2.0))
(setq p2 (polar p1 hPI r))
(setq p3 (polar p1 hPI hr))
(setq p3 (polar p3 PI hr))
(setq p4 (polar p1 (+ PI hPI) r))
(setq p5 (polar p1 (+ PI hPI) hr))
(setq p5 (polar p5 0.0 hr))
(setvar "blipmode" 0)
(command "pline" p2 "ARC" "S" p3 p1 "S" p5 p4 "")
(setq ans nil)
(setq ans
(strcase
(getstring "\nShade in half the symbol
)
)
(if (= ans "Y")
(progn
(command "pline" p2 "arc" "CE" p1 p4 "S"
p5 p1 "S" p3 p2 "")
(command "hatch" "U" 45 (/ r 12.0) "N" "L" "")
(command "erase" "P" "")
(redraw)
)
)
(setvar "cmdecho" 1)
);end prog
(prompt "\nEntity not a circle.")
);end if
);end prog
(prompt "\nNothing selected.")
);end if
(princ)
);end
Mick wrote:
> Hi, does anyone know where i can get a lisp routine that will draw a ying
> yang symbol to represent the end elevation of a pipe
>
> thanks in advance
>
> MICK