你好萬里独行 欢迎来到论坛
请理解,我们是志愿者,所以不要期望过高
1.如果闭合多段线,则效果不佳。(提示:dxf 70)
2.偏移过大时出错
3.仅应用标准圆角和半径
所以你可以学习,修改等等。。
希望总比什么都没有好
- ;fop.lsp :fillet open polyline
- (defun c:fop (/ *error* r e d)
- ;hanhphuc 2014
- (defun *error* (msg) (if msg
- (princ "\n*cancel*")))
- (if (and (not (initget 5))
- (setq r (getdist "\nRadius : "))
- (not (initget 7))
- (setq d (getdist "\nWidth : "))
- (setq e (entsel "\nSelect Polyline.. "))
- (setq e (car e))
- (=(cdr(assoc 0 (entget e)))"LWPOLYLINE")
- (vl-cmdf "_fillet" "P" e)
- (setq e (vlax-ename->vla-object e))
-
- ) ;_ end of and
- (foreach x '("StartPoint" "EndPoint")
- (entmakex
- (vl-list* '(0 . "LINE")
- (cons 8 (vla-get-layer e))
- (mapcar 'cons
- '(10 11)
- (mapcar '(lambda (o) ((eval (read (strcat "vlax-curve-get" x))) o))
- (apply 'append (mapcar ''((x) (vlax-invoke e 'Offset (x (* d 0.5)))) (list + -)))
- ) ;_ end of mapcar
- ) ;_ end of mapcar
- ) ;_ end of vl-list*
- ) ;_ end of entmakex
- ) ;_ end of foreach
- (princ "\nsorry..")
- ) ;_ end of if
- (princ)
- )
|