嗨,伙计们
如何将“圆角”更改为“倒角”
- ;; CAB 08.01.07
- (defun c:efillet (/ e1 e2 el1 el2 rad)
- (defun set_radius (/ NewRad)
- (if
- (and
- (not (initget 6))
- (setq NewRad (getdist (strcat "\nSpecify fillet radius < "
- (rtos (getvar "filletrad"))
- " > : ")))
- )
- (setvar "filletrad" NewRad)
- )
- )
- ;; Get user pick of object to fillet
- (defun linepick (order / mode ent)
- (while ; exit loop if entity is selected or Enter is pressed
- (progn
- (if (and (zerop (getvar "filletrad")) (not (zerop *FilletMode*)))
- (set_radius)
- )
- (setq mode (cdr (assoc *FilletMode* '((0 . "B") (1 . "F") (2 . "S")))))
- (initget "Radius Both First Second")
- (setq ent (entsel (strcat "\nSelect " order
- " line or [(R)adius, (B)oth, (F)irst, (S)econd]: <"
- Mode ">")))
- (cond
- ((and (null ent)(= 52 (getvar "ErrNo"))) ; <Enter> only was hit
- (setq ent nil))
- ((= ent "Radius") (set_radius))
- ((= ent "Both") (setq *FilletMode* 0))
- ((= ent "First") (setq *FilletMode* 1))
- ((= ent "Second") (setq *FilletMode* 2))
- )
- (and (/= (type ent) 'list) (not(null ent)))
- )
- )
- ent
- )
- (command "._UNDO" "_Begin")
- (or *FilletMode* (setq *FilletMode* 0))
- ;; Fillet Mode Options
- ;; 0 = (B)oth
- ;; 1 = (F)irst
- ;; 2 = (S)econd
- (if (and
- (setq e1 (linepick "first"))
- (setq e2 (linepick "second"))
- (setq el1 (entget (car e1)))
- (setq el2 (entget (car e2)))
- )
- (progn
- (command "._fillet" e1 e2)
- (if (> (getvar "CMDACTIVE") 0)
- (progn
- (command)
- (princ "\nCannot fillet between these two entities.")
- )
- (if (equal (assoc 0 (entget (entlast))) '(0 . "ARC"))
- (progn
- (if (= *FilletMode* 1) (entmod el2))
- (if (= *FilletMode* 2) (entmod el1))
- )
- )
- )
- )
- )
- (command "._UNDO" "_End")
- (princ)
- )
- (princ)
- (prompt "\nEnhanced Fillet Loaded, Enter eFillet to run.")
|