is there a routine which one can use to convert a spline to a polyline? thanks Colin
Colin, What do you hope to accomplish? Would you want the translated version to be a spline curve fit pline or one that uses straight or arc curved segments to most closely approximate the spline curve? Regards, Doug
If you just want a facsimile of your spline: Use the measure command at desired distance and use the points to draw you pline. This can be done programically. Untested: (defun dup_spline (/ ent d1) (setq ent (car (entsel "\nselect spline"))) (setq d1 (getdist "\nDistance between points.")) (command ".measure" ent d1) (setq ptlist (ssget "P")) (setq cnt 0) (command ".pline") (repeat (sslength ptlist) (setq pt (cdr (assoc 10 (entget (ssname ptlist cnt)))) cnt (1+ cnt)) (command pt) ) (command "cl") ;(entdel ent) ;remove semi colin to del spline ) Bill
Oh yeah, If you want the points removed add (command ".erase" ptlist "") (defun dup_spline (/ ent d1) (setq ent (car (entsel "\nselect spline"))) (setq d1 (getdist "\nDistance between points.")) (command ".measure" ent d1) (setq ptlist (ssget "P")) (setq cnt 0) (command ".pline") (repeat (sslength ptlist) (setq pt (cdr (assoc 10 (entget (ssname ptlist cnt)))) cnt (1+ cnt)) (command pt) ) (command "cl") ;(entdel ent) ;remove semi colin to del spline (command ".erase" ptlist "") ) Bill
I want the polyline to match the spline line such that after conversion i can change the width of the polyline easily to suit the purposes of the drawing.
http://www.dotsoft.com/freestuff.htm download spl2pl.vlx spl2pl converts a selection set of splines to polylines inside the drawing.
Hi Colin Code: (command "_.DXFOUT" "Temp.dxf" "_OBJ" MySplinesSelectionSet "" "_VER" "_R12" "_BIN" "_.DXFIN" "Temp.dxf" ) Cheers