
- (defun cy_lwpl-pb1( e / en pl openmod enp p p0 enp a i lst)
- ;;;取得带圆弧的 LWPOLYLINE 线上顶点表,((p a)(p a)...)
- (setq en (entget e) pl nil openmod (dxf 70 en))
- (if (= (dxf 0 en) "LWPOLYLINE") (progn
- (setq lst (assoc 10 en) lst (member lst en) p0 nil i 0)
- (while (= (car (nth i lst)) 10)
- (setq p (cdr (nth i lst))
- a (cdr (nth (+ i 3) lst)))
- (setq i (+ i 4))
- (if (or (and p0 (> (distance p p0) 0.01))
- (not p0))
- (setq pl (cons (list p a) pl))
- )
- );while
- ) )
- (if (= openmod 1)
- (setq pl (cons (nth (- (length pl) 1) pl) pl)))
- (reverse pl)
- )
- (defun cy_pl-pb(e / en pl openmod enp p enp);;;取得POLYLINE线顶点表
- (setq en(entget e) pl nil openmod (dxf 70 en) ep e)
- (if (= (dxf 0 en) "POLYLINE") (progn
- (setq ep (ENTNEXT ep))
- (while (= (dxf 0 (setq en (entGET ep))) "VERTEX")
- (setq p (dxf 10 e) pl (cons p pl))
- (setq ep (ENTNEXT ep))
- );while
- ) )
- (if (= openmod 1)
- (setq pl (cons (nth (- (length pl) 1) pl) pl)))
- (reverse pl)
- )
|