What's new
What's new

Splines to arcs and lines

matt_d77

Aluminum
Joined
Jul 23, 2009
Location
Midwest usa
Our art department uses Adobe Illustrator to generate our prints and graphics, but when the files are exported to DXF of DWG they come in as splines, which creates a lot of issues for our tool room. I know in AutoCAD I can convert the splines to P-Lines but then the periphery consists of thousands of tiny line segments that are also not good for programing our CNC equipment(CNC mills and Wire EDM). Our tool room uses Esprit to program our CNC equipment, and to the best of their knowledge, there's not a good solution to the problem with that software. My question is, how do I get useable, machinable, geometry using A.I., AutoCAD, or Esprit that consists of arcs and lines? I understand that splines are approximations and some variance in geometry will likely be needed but it's got to be better than tracing the splines one segment at a time in AutoCAD. Thanks for any help or suggestions.
 
OneCNC has a function to optimize lines, which might work. The chains have to have good enough trim to select as chains, although the minimum chain gap that it will straddle is also adjustable.

OneCNC may just import the DXF and autotrim it, too. It would have to be tried, because OneCNC doesn't permit actual splines to be displayed, they are always converted to arcs within a specified tolerance.
 
I deal with this frequently. In AutoCAD, use quickselect.

Right-click in your drawing area, quickselect.

From Object type drop-down, pick spline.

For properties, pick what best suites your file. Color and By Layer (or white) usually works fine for me.

Hit OK and you've selected all splines. Now either move to a different layer, or move off to the side.

Now convert them all at once.

PE or PEDIT
then use the multiple option, or M, then <enter>
box select all your splines, <enter>
Yes you want to turn into polyline <enter>
Precision usually 0 is fine for me. <enter> (higher number here makes smaller segments)
and one more enter or space to exit the command

Polylines usually work fine in the different CAM systems I'm working in, so normally I don't need to explode them. If you need arcs and lines I'd explode those polylines at this point.

If you get all line segments when converting, change PLINECONVERTMODE to 1. Then you'll get a nice set of arcs.
 
Our art department uses Adobe Illustrator to generate our prints and graphics, but when the files are exported to DXF of DWG they come in as splines, which creates a lot of issues for our tool room.

That's because they are splines to begin with. AI is a NURBS based system, when you draw a circle you are actually drawing a circular spline. Makes it easy to freehand edit curves in AI; sucks to try to do anything useful with the drawing.

I'm not aware of any automatic way to turn the splines to something more useful, but the one time it was a problem for me (taking a scanned image of a guitar pick guard and trying to make a file a laser cutting service could use) I just arrayed a grid of lines across the image in AutoCAD, then constructed arcs using each three intersection points of the grid and the original spline. I know, not what you want, but saved my ass on that job.

Dennis
 
This is _one_ of the reasons that most places cannot WEDM a proper ( much less very highly accurate ) Gear Tooth Profile ( or space ). We do it frequently. I have always relied on my math to properly generate Involute Profiles. It is the only way to guarantee Master quality Involutes. Of course, one still needs a proper application of the tool, too.

Over the years, I have developed my own macros and plug-ins for accomplishing this. If you wish to get serious about quality Involutes, you will most likely have to as well.

It is probably not what you wanted to hear, but there you have it.

ADDED - "Converting" and all the other approximations will result in loss of quality at some level. Period. Been there. Done that. Made a mint from the rights to the t-shirt.
 
Rhino3D (Rhinoceros) is supposed to have among the best conversion capabilities around. I haven't had an active seat in a long time, but am planning on getting one again. You might try downloading a trial copy and see if it works for you as an intermediary step to convert from AI to usable CAM standard formats. It may have settings within individual convert utilities that could help.

Can't guarantee anything, just going by what I remember.
 
Esprit does have a "curve approximation" tool to convert splines or NURBS to arcs but you will lose some accuracy of the profile and you may have to trim those new arcs to the surrounding geometry. You just have to decide if it's close enough for your desired results.

It seems like all .dwg or .dxf that I get nowadays that are generated from solidworks are filled with NURB curves and the version of Esprit (2011) that I have won't allow me to trim to any of them. It can get frustrating when trying to create chains for tool paths.
 
Our art department uses Adobe Illustrator to generate our prints and graphics, but when the files are exported to DXF of DWG they come in as splines, which creates a lot of issues for our tool room. I know in AutoCAD I can convert the splines to P-Lines but then the periphery consists of thousands of tiny line segments that are also not good for programing our CNC equipment(CNC mills and Wire EDM). Our tool room uses Esprit to program our CNC equipment, and to the best of their knowledge, there's not a good solution to the problem with that software. My question is, how do I get useable, machinable, geometry using A.I., AutoCAD, or Esprit that consists of arcs and lines? I understand that splines are approximations and some variance in geometry will likely be needed but it's got to be better than tracing the splines one segment at a time in AutoCAD. Thanks for any help or suggestions.

I cut files from AI and CorelDraw all the time from dxf\dwg that have splines, as well as solids where most of the edges are splines, I machine with surfcam and HSMWorks, never convert to lines and arcs, just crank up the tolerance to .00004.

sure they are small line segments and the code is huge never bogs me down even on our old VF0 spoon feeding at 115,000 baud rate, parts come out sweet.

Now this might not be for all because of software or machine type and age, just have to play with the settings in each.

been doing this since 92 on HAAS, Hurcos, Bridgeports and even DOS bases Servo retro fitted Bridgeport knee mill (talk about fun).

if you want to try something new download Fusion 360 for free, CAM is the same as HSMWorks or if you have SolidWorks you can get HSMExpress 2.5D for free and try that, just open the dxf\dwg in a part and start cutting.

 
I cut files from AI and CorelDraw all the time from dxf\dwg that have splines, as well as solids where most of the edges are splines, I machine with surfcam and HSMWorks, never convert to lines and arcs, just crank up the tolerance to .00004.

sure they are small line segments and the code is huge never bogs me down even on our old VF0 spoon feeding at 115,000 baud rate, parts come out sweet.

Now this might not be for all because of software or machine type and age, just have to play with the settings in each.

been doing this since 92 on HAAS, Hurcos, Bridgeports and even DOS bases Servo retro fitted Bridgeport knee mill (talk about fun).

if you want to try something new download Fusion 360 for free, CAM is the same as HSMWorks or if you have SolidWorks you can get HSMExpress 2.5D for free and try that, just open the dxf\dwg in a part and start cutting.


Well, lines are lines, even if they are short, they're not splines. :D
 
Write you own convertor. Handle deviations from true, get how your cnc handles tangent differences.
Just do it.
This is a fairly easy one with maybe some outside math help where I toss by budding new hot shot out the door and tell him to come back with a best guess solution.
Bob
 
I cut files from AI and CorelDraw all the time from dxf\dwg that have splines, as well as solids where most of the edges are splines, I machine with surfcam and HSMWorks, never convert to lines and arcs, just crank up the tolerance to .00004.

sure they are small line segments and the code is huge never bogs me down even on our old VF0 spoon feeding at 115,000 baud rate, parts come out sweet.

Now this might not be for all because of software or machine type and age, just have to play with the settings in each.

been doing this since 92 on HAAS, Hurcos, Bridgeports and even DOS bases Servo retro fitted Bridgeport knee mill (talk about fun).

if you want to try something new download Fusion 360 for free, CAM is the same as HSMWorks or if you have SolidWorks you can get HSMExpress 2.5D for free and try that, just open the dxf\dwg in a part and start cutting.


This, but then also enable smoothing. Smoothing will fit lines and arcs where possible within the smoothing tolerance in place of line segments.

Most all reputable CAM systems have a similar system in place, so there's really no need to reinvent the wheel here..
 
This, but then also enable smoothing. Smoothing will fit lines and arcs where possible within the smoothing tolerance in place of line segments.

Most all reputable CAM systems have a similar system in place, so there's really no need to reinvent the wheel here..

yeah forgot to add that :dunce:
 








 
Back
Top