- (defun ffr (rad / newrad ss pts i ee)
- ;; (setq newrad (getreal "\n请输入新的半径:"))
- (setvar "FilletRad" rad)
- (setq ss (ssget '(( 0 . "LINE,ARC,LWPOLYLINE"))))
- (setq pts (acet-geom-ss-extents ss nil)) ; ET func
- (SetVar "PeditAccept" 1)
- (command "Pedit" "M" ss "" "J" "" "")
- (setq ss (ssget "C" (car pts) (cadr pts) '(( 0 . "LWPOLYLINE")))
- i 0
- )
- (while (setq ee (ssname ss i))
- (command "Fillet" "P" ee)
- (setq i (1+ i))
- )
- )
- 以 (defun c:F25()(command "FILLET" "R" "0.25" "FILLET") (PRINC)) 为例
- (defun c:F25() (ffr 0.25))
- ;;; 单一 LwPolyline 适用
- ;;; 炸开
- (defun c:F25()(ffr 0.25) (command "explode" (entlast)))
- ;;; 多重时函式修订
- (while (setq ee (ssname ss i))
- (command "Fillet" "P" ee)
- (setq i (1+ i))
- (command "explode" (entlast))
- )
|