Draftsite - Convert splines to polylines?

General software related questions should be posted here.
Post Reply
User avatar
djreiswig
4.5 Star Elite Contributing Member
4.5 Star Elite Contributing Member
Posts: 1929
Joined: Thu Nov 19, 2015 10:02 pm
Location: SE Nebraska

Draftsite - Convert splines to polylines?

Post by djreiswig »

Some of the files on here consist of splines. For example:
http://plasmaspider.com/viewtopic.php?f=6&t=24713

When I try to work with these files in DraftSight, they are uncooperative. If I try and scale them or basically modify them in any way, the lines get all choppy and the design in unusable.

I've tried bringing them into Inkscape and resaving, but it didn't help.

How can I get rid of these annoying splines?
2014 Bulltear (StarLab) 4x8
C&CNC EtherCut
Mach3, SheetCam, Draftsight
Hypertherm PM65
Oxy/Acetylene Flame Torch
Pneumatic Plate Marker, Ohmic, 10 inch Rotary Chuck (in progress)
hemichargersrt8
2.5 Star Member
2.5 Star Member
Posts: 224
Joined: Sun Dec 09, 2012 6:31 am

Re: How do I convert splines to polylines?

Post by hemichargersrt8 »

To create a 2D polyline approximation of the original spline:
Save the drawing in R12 DXF format.
Reopen the DXF file. ...
Use the EXPLODE command on the 3D polyline, which will turn it into line objects.
Use the PEDIT command, and select one of the lines.
At the prompt to convert this to a polyline, select Yes.
User avatar
djreiswig
4.5 Star Elite Contributing Member
4.5 Star Elite Contributing Member
Posts: 1929
Joined: Thu Nov 19, 2015 10:02 pm
Location: SE Nebraska

Re: How do I convert splines to polylines?

Post by djreiswig »

Okay, I got the first 3 steps and got rid of the splines. A little unclear on the PEDIT. Not in the help file for DraftSight.
Select one of the lines?? One segment, one outline?
If I click one line segment and then say Yes I get a prompt to Specify option
Close, Decurve, Edit vertex, Fit, Join, Linegen, Spline, Undo, Width, eXit.

Tried several of the options and nothing seems to happen. The drawing now has lots of nodes.
(With PEDIT it appears to only allow selecting a single entity)
I assume I'm supposed to end up with less nodes when I get done.
What am I missing?

I'm using DS V1R5.1 if that matters.
2014 Bulltear (StarLab) 4x8
C&CNC EtherCut
Mach3, SheetCam, Draftsight
Hypertherm PM65
Oxy/Acetylene Flame Torch
Pneumatic Plate Marker, Ohmic, 10 inch Rotary Chuck (in progress)
scn64
1/2 Star Member
1/2 Star Member
Posts: 8
Joined: Sun Nov 12, 2017 8:06 pm

Re: How do I convert splines to polylines?

Post by scn64 »

I use this function all the time to clean up items and validate closed geometry. (see the attached screen shot of a typical list of commands)

When you perform the poly line edit you should first get the option to select multiple
Capture.JPG
Capture.JPG (26.91 KiB) Viewed 2222 times
Type the letter M and then select the geometry you wish to turn in to a poly line (or window the entire drawing)

Once you have selected the desired geometry you must Join it to make a continuous poly line. (you can change the gap values but I use 0 to ensure that I do not have open or intersecting nodes
User avatar
djreiswig
4.5 Star Elite Contributing Member
4.5 Star Elite Contributing Member
Posts: 1929
Joined: Thu Nov 19, 2015 10:02 pm
Location: SE Nebraska

Re: How do I convert splines to polylines?

Post by djreiswig »

Thanks for the clarification. Can I select the whole drawing even if the lines aren't connected?
2014 Bulltear (StarLab) 4x8
C&CNC EtherCut
Mach3, SheetCam, Draftsight
Hypertherm PM65
Oxy/Acetylene Flame Torch
Pneumatic Plate Marker, Ohmic, 10 inch Rotary Chuck (in progress)
scn64
1/2 Star Member
1/2 Star Member
Posts: 8
Joined: Sun Nov 12, 2017 8:06 pm

Re: How do I convert splines to polylines?

Post by scn64 »

You can select the entire drawing but the poly line will only join along common nodes. Thus if your geometry is not closed or has intersections you will create multiple poly line segments. When this occurs I usually will change the color of the "segments to get a clear picture of where the problems are and then zoom in on the broken areas to make repairs. (trim, extend, add fillets, drag nodes, etc.) to the geometry
FYI - converted text can be a real B***

Once you feel the geometry has been properly closed, repeat the poly line edit using the multiple joining process but do not window the whole drawing. Pick each segmented poly line and try joining again.

Also, when you explode your splines try playing with the precision value to reduce the number of nodes to an acceptable level. (the bigger the number the fewer nodes)
spline explode Capture.JPG
spline explode Capture.JPG (12.3 KiB) Viewed 2215 times
It takes a little practice but I'm sure you can develop a few techniques to get the desired results. When all else fails I use the create poly line functions on a separate layer and trace the existing geometry to clean up my file and produce acceptable results for the laser or plasma machines I program
User avatar
djreiswig
4.5 Star Elite Contributing Member
4.5 Star Elite Contributing Member
Posts: 1929
Joined: Thu Nov 19, 2015 10:02 pm
Location: SE Nebraska

Re: How do I convert splines to polylines?

Post by djreiswig »

Took a while to join, but following your excellent instructions seemed to be the trick. Thanks.
2014 Bulltear (StarLab) 4x8
C&CNC EtherCut
Mach3, SheetCam, Draftsight
Hypertherm PM65
Oxy/Acetylene Flame Torch
Pneumatic Plate Marker, Ohmic, 10 inch Rotary Chuck (in progress)
User avatar
djreiswig
4.5 Star Elite Contributing Member
4.5 Star Elite Contributing Member
Posts: 1929
Joined: Thu Nov 19, 2015 10:02 pm
Location: SE Nebraska

Re: How do I convert splines to polylines?

Post by djreiswig »

Thanks hemichargersrt8 for your help as well. You guys are great.
2014 Bulltear (StarLab) 4x8
C&CNC EtherCut
Mach3, SheetCam, Draftsight
Hypertherm PM65
Oxy/Acetylene Flame Torch
Pneumatic Plate Marker, Ohmic, 10 inch Rotary Chuck (in progress)
scn64
1/2 Star Member
1/2 Star Member
Posts: 8
Joined: Sun Nov 12, 2017 8:06 pm

Re: How do I convert splines to polylines?

Post by scn64 »

Glad it worked out for you!! :)

Splines and ellipses are not fun to deal with for most machines but if you take the time to work around them you can come up with some good results and add to your skills set to be more productive.

Have a good one!!
User avatar
SegoMan DeSigns
3.5 Star Elite Contributing Member
3.5 Star Elite Contributing Member
Posts: 822
Joined: Sat Jan 06, 2018 4:45 pm

Re: How do I convert splines to polylines?

Post by SegoMan DeSigns »

For you non DraftSight users this works pretty good too:

http://www.cadkas.com/dxf-splines-to-arcs.php
Post Reply

Return to “General Discussion”