本帖最后由 llsheng_73 于 2025-1-4 20:07 编辑
- (defun plxyz(e fuz / 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))))
- pt)))
|