DXF layers (reprise)

Well, I own my own laser now, which came with a license for LightBurn. Hooray!

However, I am still frustrated by the fact that LightBurn still throws away layer information contained in DXF files. No, I don’t want to assign colours in my CAD software, I want to assign parts of the drawing to layers in CAD and assign laser operations to layers in LightBurn. I’m doubly frustrated after discovering that LightBurn layer names are editable, therefore LightBurn can create layers based on the layer names in the DXF.

I’ve also noticed several questions on this forum lamenting the same issue. Yes, there are workarounds, but that’s not really the solution. I’m guessing, but I haven’t confirmed, that LightBurn throws away layer information in SVG and other CAD formats. I use CAD to design parts that work together. Some parts are laser cut, some are CNC cut, and some are 3D-printed, but they all share the same CAD file so that I can see that they all align, and work together. I’d like to be able to import the file into LightBurn and ignore the layers that are not relevant, which I can’t if they’re all on C00.

Based on how I use CAD and LightBurn, and in an attempt to accommodate how other people use it I suggest the following algorithm. There are basically four combinations of layers and colours to handle: 1 layer, more than one layer, and 1 colour, more than one colour.

  1. If a DXF has only one layer and only one colour, import the layer into a layer named after the source layer, and set its colour (laser operation) to that colour.
  2. If a DXF has several layers and only one colour (i.e. all objects are the same colour), import each layer into a named layer, and set each layer’s colour (laser operation) to that (same) colour.

After examining the file and determining that there are several colors the user could be asked in a dialog whether to “Ignore layers” or “Ignore colours” (with one exception, see below). We basically have to handle one layer, many colours, and many layers, many colours.

Ignore layers (I think this is basically how LightBurn behaves currently):

  1. If a DXF has only one layer and many colours, ignore the layer name and import each coloured object into a layer named after the colour (C00, C01, C02, etc.)
  2. If a DXF has several layers and many colours, ignore the layer names and import each coloured object into a layer named after the colour (C00, C01, C02, etc.)

Ignore colours:

  1. If a DXF has only one layer and many colours, import the layer into a layer named after the single layer, and set its colour to a default (e.g. 00).
  2. If a DXF has several layers and several colours, import each layer into a layer named after the source layer, and set its colour to a default (e.g. 00).

Possible exception:

  1. If a DXF has several layers and several colours, but objects in each layer are the same colour, import each layer into a layer named after the source layer, and set its colour (laser operation) to the colour found on that layer. This could be detected and handled without popping up the “Ignore layers”/'Ignore colours" dialog. To be honest I can see this being the most useful: it retains layer names, but the designer can assign colours in CAD which are preserved into LightBurn, removing the need to assign colours/operations in LightBurn after importing.

The behaviour described in point 2 or point 7 would be ideal for me. I’d like to discuss any errors, omissions, or nuances in my suggestion, but fundamentally I’d really like if it LightBurn did not discard layer information.

Thank you.

The easiest way to get what you want in the LB DXF import is to design layers in CAD with unique RGB colors that map correctly to the colors in LB. Do not create layers with entities that contain a mix of different colors. The easiest way to do so is creating entities that are colored by layer in CAD. You can also edit the layer names in LB to correspond to your layer names in CAD. The next time you import a DXF file into LB, LB will map the colors from CAD to the corresponding layer names you previously created.

Thank you for replying. I don’t think you understand, though. I’m not interested in doing the work twice, and really, LightBurn should not throw away information. I also don’t have the same layer names in each of my CAD files, so I can’t create them in advance in LightBurn, and there’s no point creating a named layer in CAD and then creating a layer of the same name in LightBurn. That’s just doubling the work as the information is already in the DXF file.

There’s also an issue in specifying the colour in CAD, knowing in advance what operation that colour is for. I often cut the same shape in different materials, so I need to click on a layer and assign different cutting parameters. It’s useful, but colour is colour and only has meaning in the appropriate context.

I don’t want to use LightBurn for CAD, plus I might get DXF files from elsewhere. All I really want LightBurn for is to drive the laser. So, I’d like to design stuff in my CAD software, with as many layers as I need, save as DXF, open DXF in LightBurn, see all the layers I created, choose a couple of layers to output, assign cutting parameters, done! Right now, all my layers are imported into C00.

I don’t want to assign colours in CAD in advance, because not all of my layers are going to be lasered, and the operation for each colour will probably change depending on what other jobs I happen to do. In fact, most of my layers are the same colour in CAD. I can turn layers on and off so they don’t get distracting, similarly, if they were imported properly into LightBurn I can turn Output and Show on and off to focus only on the layers and objects I am interested in.

There are lots of things that I’d like to do with layers that I can’t when LightBurn throws the information away. Fundamentally it shouldn’t, so I’d like to talk about how it could be improved to not do that, not how to change my way of working to work around a deficiency in LightBurn.

I know I’ve mentioned this before, but it still irks me, and it’s still an issue. Rather than just complain I have proposed an algorithm that ought to work. Actually, option 2 and 7 still look attractive, but having thought about it some more the “Ignore Layers” and “Ignore Colours” dialog I suggested could probably be removed, and all layers imported into named layers in LightBurn. If all objects on a layer are the same colour, assign that colour to that layer. If some objects on a layer are different colours assign a default colour to the layer and all objects on that layer. If this is an issue the designer can go back to the original DXF and break out the different coloured objects on a given layer to new named layers then re-import it.

Once the objects are in LightBurn it’s a new file and a new project. We can use LightBurn’s tools to tweak the design for lasering (or just push the button to start cutting), but the changes don’t have to go back to the DXF. It’s the starting point that’s at issue. My files exist in DXF, with layers. I might want to cut just one of them, but if everything is dumped into C00 it’s hard.

Thank you.

I do all of my designs in a CAD program and export to DXF. I layer everything, but I assign a color to each layer. The layers get separated in LB. I don’t run a Chinese laser. I use LB only for a DXF to SVG translator. All non Chinese lasers that I am familiar with use unique colors for different operations. If you want LB to import DXF the way you work, send them a enhancement request.

Thanks for your reply. You are basically working around LightBurn’s limitations. Yes, the colours get imported, but the layer names are lost, so you have to remember which layer is which.

I have sent an enhancement request, but people are happy to work around this it would seem.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.