;;; Konvertiert PL in SPline. (defun C:PL2SPL ( / ss i) (vl-load-com) (if (setq ss (ssget '((0 . "*POLYLINE")))) (repeat (setq i (sslength ss)) (make_spline (pl_list (ssname ss (setq i (1- i)))) ) ) ) (princ) ) (defun pl_list (e / r i j lg) (setq lg (* 0.05 (vlax-curve-getdistatparam e (vlax-curve-getendparam e)))) ; Originaldatei ; (setq lg (* 1 (vlax-curve-getdistatparam e (vlax-curve-getendparam e)))) ; kein Segment wird geteilt (repeat (setq i (1+ (fix (vlax-curve-getEndParam e)))) (setq r (cons (cons 11 (vlax-curve-GetPointAtParam e (setq i (1- i)))) r)) (if (and (> i 0) (> (- (vlax-curve-getdistatparam e i) (vlax-curve-getdistatparam e (1- i))) lg) ) (repeat (setq j 3) (setq r (cons (cons 11 (vlax-curve-GetPointAtParam e (+ (1- i) (* 0.25 j)))) r) j (1- j) ) ) ) ) r ) (defun make_spline (l) (entmake (append (list '(0 . "SPLINE") '(100 . "AcDbEntity") '(100 . "AcDbSpline") '(70 . 1) '(71 . 3) (cons 74 (length l)) '(44 . 1.0e-005) ) l ) ) )