PDA

View Full Version : Convert spline to polyline



tom.scott
2009-03-13, 02:24 PM
I was wondering how I can turn a spline into a polyline. I have this code I downloaded off the internet that will convert the spline into a polyline but it seems to round the corners. I can’t seem to figure it out. Is there some setting in AutoCAD 2007 that would solve this problem? I included spline2polyline.lsp which is the code I downloaded from the internet to convert the spline to a polyline. Also included is spline.dxf and polyline1.dxf and polyline2.dxf which is the original spline, the polyline created with original desired sharp corners and the current rounded corners polyline respectively. The first time I used this conversion software I obtained polyline1.dxf but since then it rounds all corners creating polyline2.dxf. One last note, for my equipment to use this file it has to be a polyline not a 2D polyline. Hopefully someone can help me and I appreciate your time.

rkmcswain
2009-03-13, 02:28 PM
We use the free tool SPL2PL.VLX from Dotsoft (http://www.dotsoft.com)

If you have AutoCAD 2009 with Bonus Pack 1 or later, this is built into the PEDIT command.

More options here: http://cadpanacea.com/node/70

tom.scott
2009-03-13, 03:31 PM
This is the software that I am using. I enter the following at the command prompt (load "c:\\spline2polyline"), hit enter, type spl2pol at command prompt, and select my spline. What it gives me back is a 2D polyline. What I really need is just a polyline not 2D or 3D polyline. The first time I used it my corners remained square but since then the corners are rounded. I use the polyline to program laser marking systems.

rkmcswain
2009-03-13, 04:08 PM
This is the software that I am using. I enter the following at the command prompt (load "c:\\spline2polyline"), hit enter, type spl2pol at command prompt, and select my spline. What it gives me back is a 2D polyline. What I really need is just a polyline not 2D or 3D polyline. The first time I used it my corners remained square but since then the corners are rounded. I use the polyline to program laser marking systems.


Sorry Tom, I can't spend time debugging lisp files from unknown origin, I was just giving you some alternatives that DO work.

If you are intent on getting this particular lisp file to function like you want it, you might consider getting one of the moderators to move this thread to the LISP forum where more people who might help can be found.

tom.scott
2009-03-13, 06:31 PM
Thanks McSwain, your suggestions did work along with using the pedit / fit command.

tqknet
2013-12-17, 01:13 AM
I was wondering how I can turn a spline into a polyline. I have this code I downloaded off the internet that will convert the spline into a polyline but it seems to round the corners. I can’t seem to figure it out. Is there some setting in AutoCAD 2007 that would solve this problem? I included spline2polyline.lsp which is the code I downloaded from the internet to convert the spline to a polyline. Also included is spline.dxf and polyline1.dxf and polyline2.dxf which is the original spline, the polyline created with original desired sharp corners and the current rounded corners polyline respectively. The first time I used this conversion software I obtained polyline1.dxf but since then it rounds all corners creating polyline2.dxf. One last note, for my equipment to use this file it has to be a polyline not a 2D polyline. Hopefully someone can help me and I appreciate your time.
Thanks !!!
Cảm ơn nhiều.