你好
我试图得到一段代码,它能够以给定的半径圆角,无论它是直线的多段线。我得到了这个常规钢筋弯曲工作,但它只适用于线。我也想让它“多段线友好”。
这是一段代码。我陷入了决定t是直线还是多段线的部分。如有任何帮助或导致类似代码,我们将不胜感激。
- ; example for a fixed r=40 handling
- (defun c:fg16 (/ CMDECHO CMDDIA FRAD E1 E2)
- (princ "\fillet diam. 16, r = 40 ")
- (setq ERR *ERROR*
- *ERROR* LISP-ERR
- CMDECHO 0
- CMDDIA 0
- E1 NIL
- E2 NIL
- FRAD (getvar "filletrad")
- ) ;_ end of setq
- (setvar "filletrad" 40)
- (setq E1 (entsel "\nSelect first object: "))
- (while (/= E1 nil)
- (progn (setq tipoent (cdr (assoc 0 (entget (car (E1)))))) ; hmmm..
-
- (if (= tipoent "POLYLINE") ; if it is ONE polyline , handle it
- (command "_.fillet" "_polyline" "radius" "40" E1)
- ; end for polyline, but it fails (?)
- (progn (redraw (car E1) 3) ; start part for single LINES
- (setq E2 (entsel "\tsecond: ")) ; second line needed
- (redraw (car E2) 3)
- (command "fillet" E1 E2)
- (setq E1 (entsel "\nfirst: "))
- ) ; end part for single
- )
- )
- )
- (setvar "filletrad" FRAD)
- (princ)
- )
|