Drag_Chamf and Fillet
;| ............................................................................................
µå·¡±×·Î ¸ðµû±â(ÇÊ·¿R) Çϱâ. ¿¬¼ÓÀÛ¾÷ÀÌ °¡´ÉÇϸç,
ÀÛ¾÷ ¹æ¹ýÀº ¸ðµû±â(ÇÊ·¿R)ÇÒ ºÎºÐÀÇ ¾ÈÂÊ¿¡¼ ¹Ù±ùÀ¸·Î µå·¡±×ÇÏ¸é µÊ.
¦¡¦¡¦¡¦¤¿©±â·Î
¢Ö ¦¢
¿©±â¼¦¢
...............................................................................................|;
;;Chamfer(C)........................................................
(defun c:DCF(/ chdis1 pnt1 pnt2 ss k)
(prompt "nµå·¡±×·Î ¸ðµû±â(C) Çϱâ..(¿¬¼Ó °¡´É)")
(setq os (getvar "osmode"))
(if (not chdis) (setq chdis 1.0))
(setq chdis1 (getreal (strcat "n¸ðµû±â°Å¸®(C)<" (rtos chdis 2 2) ">:")))
(if chdis1 (setq chdis chdis1))
(command "chamfer" "d" chdis chdis)
(command "undo" "be")
(setvar "osmode" 0)
(setq pnt1 (getpoint "nFirst point[@ Inside]:"))
(while pnt1
(setq pnt2 (getcorner pnt1 "nSecond point[to Outside]:"))
(setq ss (ssget "c" pnt1 pnt2 (list (cons 0 "line,arc,pline,*polyline,circle"))))
(command "chamfer")
(setq k 0)
(repeat 2
(command (list (ssname ss k) pnt1))
(setq k (1+ k))
)
(setq pnt1 (getpoint "nFirst point:"))
)
(setvar "osmode" os)
(command "undo" "e")
(princ)
)
;;Fillet(R)............................................................
(defun c:DFL(/ radis1 pnt1 pnt2 ss k)
(prompt "nµå·¡±×·Î ÇÊ·¿(R) Çϱâ..(¿¬¼Ó°¡´É)")
(setq os (getvar "osmode"))
(if (not radis) (setq radis 1.0))
(setq radis1 (getreal (strcat "nÇÊ·¿¹Ý°æ(R)<" (rtos radis 2 2) ">:?")))
(if radis1 (setq radis radis1))
(command "fillet" "r" radis)
(command "undo" "be" "")
(setvar "osmode" 0)
(setq pnt1 (getpoint "nFirst point[@ Inside]:"))
(while pnt1
(setq pnt2 (getcorner pnt1 "nSecond point[Outside]:"))
(setq ss (ssget "c" pnt1 pnt2 (list (cons 0 "line,arc,pline,*polyline,circle"))))
(command "fillet")
(setq k 0)
(repeat 2
(command (list (ssname ss k) pnt1))
(setq k (1+ k))
)
(setq pnt1 (getpoint "nFirst point[Inside]:"))
)
(setvar "osmode" os)
(command "undo" "e")
(princ)
)
|