|
自己写的隔一定距离打断PL线。但是打断完变的不成样子,不是一体的了,求大神帮忙啊。
(defun c:dib (/ obj piece plen ptlst dis npt)
(setq obj (vlax-ename->vla-object (setq en (car (entsel "\n选择多义线: "))))
piece (getint "\n间隔距离(米): ")
plen
(vlax-curve-getdistatpoint obj (vlax-curve-getendpoint obj))
;ptlss
;(list (vlax-curve-getstartpoint obj))
dis
0
)
(repeat (1- (fix(/ plen piece)))
(setq dis (+ dis piece)
npt (vlax-curve-getpointAtdist obj dis)
ptlst (cons npt ptlst)
)
)
;(setq ptlst (reverse (cons (vlax-curve-getendpoint obj) ptlst)))
(foreach pt ptlst
(vl-cmdf "break" (list en pt) pt)
)
;;; ptlst
(princ)
)
|
-
打断前PL线
-
断后不是连着了
|