Convert Lines to curves on Rhino 7

I am told by my Laser cutting service to try to convert my DXF file to curves before I give it to the Laser cutting service.
Attached is an example of what I give for the laser cutting. If you zoom in the blue circle, you’ll see that the curve is made out of sections of straight lines. The laser guy can cut it but would prefer if I convert the file to curves.
Can you help please?How to convert these to curves.3dm (2.6 MB)How to convert these to curves.3dm (2.6 MB)

What you could do is feed the points of the lines into Grasshopper and use the ‘Interpolate curve’ component to create curves through the points. Admittedly, I haven’t checked your files.

First type SimplifyCrv.

Then explode the curve and deselect the straight segments that you want to keep as straight segments. Rebuild the freeform curve into a interpolated curve with RebuildCrvNonUniform

The circlular curve can be rebuilt with a three point arc.

I only did that for the upper inner curve of 25.

Join what needs to be joined

How to convert these to curves.3dm (88.3 KB)

I am afraid I am not using grasshopper, mainly because I am terrible at it.

You don’t need Grasshopper to do this.

I guess the other question to ask is - how did these curves get that way? I’m pretty sure they were not designed that way originally, they look like they were originally made from lines and arcs that have later had a bad polyline conversion done on them downstream. Do you have access to the originals? What program were they drawn with?

1 Like

I don’t beleive the file was badly design, attached is the whole fileI sent to the laser cutting, I make sculptures as a hobby, I slice them with “Contour command”, the laser guy did cut the whole thing, but asked me to convert to arcs, but he has no problem cutting the file as is, he just wants do avoid having to do it himself if I can convert for him. The attachment is part of a much bigger file but I tried to attach the whole file without success so this one is part of it already nested for cutting.Part of file for McNeel.3dm (9.5 MB)

Hi Martin,
I tried your way and it’s ok, thanks for that.
But it seems I have to do that for every slice as I build the curves.

I thought I could have a command that would convert the whole file in one go!, see attachement.Part of file for McNeel.3dm (9.5 MB)

Ah, OK, that explains it, you sliced a mesh… a relatively coarse one at that. Here’s what the foot really looks like when the display smoothing is removed:

There’s probably not much you can do there - the result of slicing a mesh is always polylines, and they are never any smoother than the mesh that is being sliced…

For an ‘automatic’, fix, you could try FitCrv on them, set some tolerance like 0.1, and most importantly an angle tolerance you will need to play with - so that sharp corners above a certain angle are preserved. I will post an example in a minute.

OK, unfortunately, this is not a panacea at all - it can cause more problems than it can solve - also because FitCrv never works really well with polylines. In the attached I used Degree=2, Tolerance 0.1, and AngleTolerance=25.

FitCrvTry.3dm (2.0 MB)

Yes, if you can get a smooth object to contour, the slices will be smooth as well.

1 Like

what if in the future, I convert a mesh into a subd, and slice the Subd, would that give me curves?

Generally yes, but you need to merge all mesh parts and that can be tricky too.

Hi Martin
I did what you advise me to do and it works, (see screenshot) but the moment I save it in DXF or DWG for the laser cutting, the points are many many more!Screenshot 2021-03-31 090957
Sample for Curves.dxf (282.1 KB)
looking forward to your input.

I forgot to mention to tap F10 on the DXF file to see how many more points it creates.

What Export Scheme are you using to export the curves as DXF?

I am embarrassed to ask but what is an export scheme?
I select what I want cut with “Export Selected” , and save it as a DXF.
Is this what you mean?

Before you click save there’s a popup window where you can choose the Export Scheme. If not, maybe you have to click options in the save as window

Lines and arcs for example turns the curve into many small pieces:

whereas Default keeps splines as splines…

Thank you so much, I did export in “R12 Natural”. waiting for the laser guy to tell me if it’s better.
Thanks again for being so very helpful

You definitely solved my problem. Thank you very much.

Many times importing the exported geometry yourself before sending out helps to avoid such problems…

Thanks for clicking the solution button