How to slice an object into layers and export them to DXF files for laser cutting

Hello everyone,

We have a client that has a laser machine that accepts DXF files and then cuts them in layers one after another following their sequential number ordering.

How could he slice a 3D object and have the slices exported to DXF files automatically?

For this purpose, I was thinking it could be nice if something like how the export to SLC command works if it was available to export the contour lines to multiple DXF files.

Thank you,


TT Toolbox plugin can do this.

Hi Roy - I had a script for AI, changed here to write dxf files - it sorts the files in World Z, I don’t know if that is what you need. Run Contour first to get the curves. (1.3 KB)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"


Thanks a lot @mahanmotamedi1991 it seems like it’s only for Rhino 4 and 5 and not updated for Rhino 6, I’ll try to see if it could still work.

and Thank you Pascal, It works and looks great but it has an “issue” if there is more than one object sliced (at least for my client’s use):

There are 20 curves here and they would become 20 DXF files as Rhino is exporting each curve as a single DXF file as opposed to 10 files if all curves in a “layer” of height would export as a single DXF file. is there away to fix it or it requires more developing?

Thanks again to you both,


Using my plugin. (it should work for Rhino 5. But not for R4) (12.3 KB)

I’m using it with Rhino 6. Nevertheless this is what you have asked for (To export the layers in separate dxf files).



@mahanmotamedi1991 Thank you, I wasn’t sure it would work I was about to try but tried @gankeyu solution before, which has worked for me, but thank you again! :slight_smile:

@gankeyu Thank you very much, It works great, thanks for the plug-in and for the GH file! by the way, your plug-in has worked for me in Rhino 6.

@pascal Thank you Pascal too, I managed to get it working with Keyu Gan’s solution.

Again, Thank you all :slight_smile:


It’s designed for Rhino 6 but it should also work on Rhino 5. If you are using Rhino WIP, there would be more options regarding export.

1 Like

If your divding distance is smaller than 1, remember to divide the Z coordinate by the distance because I converted decimal number to integers in the example script.

For mine, you probably need to Join the curves before export.


I think he’s having two disjoint sets of curves and they’re exported separately.