- (defun plxyz(e fun / pt p n);多段线节点坐标(适用于所有类型的多段线,返回结果为三维坐标点表),连续重合点只取一个,根据fuz阀值过滤接近点
- (or(=(type e)'vla-object)(setq e(vlax-ename->vla-object e)))
- (cond((=(setq n(vlax-get-property e'objectname))"AcDbLine")
- (list(vlax-curve-getstartpoint e)(vlax-curve-getendpoint e)))
- ((WCMATCH n"*Polyline")
- (repeat(setq n(fix(+(vlax-curve-getendparam e)(if(=(vlax-get-property e'Closed):vlax-true)0 1))))
- (or(equal(setq n(1- n)p(vlax-curve-getpointatparam e n))(car pt)fun)
- (setq pt(cons p pt))))
- (if(equal(car pt)(last pt)fun)
- (reverse(cdr(reverse pt)))pt))))
|