本帖最后由 xyp1964 于 2017-11-20 21:46 编辑  
dianbotang 发表于 2015-10-24 23:37   
请问院长,能否提供一下画多段线函数(xyp-pline dl nil)? 
  - ;; xyp-Pline 建立多段线 (xyp-Pline 点集 闭合参数)
 
 - ;; 闭合参数tn: t闭合,nil打开
 
 - (defun xyp-Pline (ptlst Close-tnil / a s1)  
 
 -   (entmake (append (list '(0 . "LWPOLYLINE")
 
 -                          '(100 . "AcDbEntity")
 
 -                          '(100 . "AcDbPolyline")
 
 -                          (cons 90 (length ptlst))
 
 -                          (cons 70 (if Close-tnil 1 0))
 
 -                          (cons 38
 
 -                                (if (nth 2 (car ptlst))
 
 -                                  (nth 2 (car ptlst))
 
 -                                  0
 
 -                                )
 
 -                          )
 
 -                    )
 
 -                    (mapcar '(lambda (a) (cons 10 a)) ptlst)
 
 -            )
 
 -   )
 
 -   (entlast)
 
 - )
 
  |