;; | ---------------------------------------------------------------------------- ;; | PL_Spl2Pl_Int ;; | ---------------------------------------------------------------------------- ;; | Function : Convert a SPLINE or ELLISPE object to a normal polyline using the ;; | interpolate method ;; | Arguments: ;; | 'ename' - Name of SPLINE or ELLIPSE object ;; | 'MeasD' - Vertex Interval to measure along the spline ;; | (measured in slope) ;; | '3d' - If T, create polyline as 3d else 2d ;; | Action : Uses the AutoCAD Measure command to determine interpolated points ;; | along a spline and creates a polyline along those points. ;; | Updated : June 2, 2004 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun PL_Spl2Pl_Int ( ename MeasD 3d / vlist ename1 flag PtLst ss ) (setq vlist (PL_plist ename) ename1 nil ) (command "._Measure" (list ename (car vlist)) MeasD) (setq ss (ssget "_P")) (if ss (progn (setq flag (PL_Open? ename)) (if flag (setq flag 0) (setq flag 1) ) (if 3d (setq flag (+ flag 8)) ) (setq PtLst (SS_ss2pt ss) PtLst (cons (car vlist) PtLst) PtLst (append PtLst (list (last vlist))) ) (if (not 3d) (setq PtLst (GE_plist3d2d PtLst "Zero")) ) (setq ename1 (PL_mk_pl PtLst flag 0.0)) (command "._Erase" ss "") )) ename1 )