Importing DXF (padding, padding, title must be at least 15 characters)

Nor mine. Thank you. I understand your desired way of working. I am just explaining the way LightBurn currently works. We like suggestions and ideas / room for improvement, we are listening, so this has been informative and helpful. :slight_smile:

Thank you for taking the time to provide a illustration of the process, however, it relies on assigning colours in the original CAD software, which is what I wanted to avoid, and which, IMHO is, or should be, unnecessary.

Upon further reading it seems that other laser software does the same thing (e.g. Trotec). It is equally as brain dead, and was obviously implemented by someone who thought it was a good idea at the time and didn’t understand layers. I suppose LightBurn could keep that functionality for people coming from other software, but I still think that importing layers as named layers into LB is a better solution. Then, as I suggested earlier, the layers could also have coded information in the name for the properties of the cut, further reducing the amount of effort required to actually run a job. This is a feature found in dxf2gcode, a Python program for converting DXF to G-code for CNC.

Unfortunately I suspect that organising layers by colour is deeply embedded in the software and unravelling it would be a huge effort, although a compromise could be, as I suggested, when importing a DXF, create a new layer for each defined layer, and assign the next available colour from a list. The workflow would be: draw stuff in CAD, assign elements to named layers, apply colours if you like, but they will be ignored by LB → import DXF to LB, layers appear in the cuts window, with a colour assigned by LB, each named layer has a different colour (for compatibility with the way LB works) → turn off the layers you don’t want, assign cutting parameters for layers that you do.

Even better would be the possibility to assign the same colour to different named layers, to attach the same cutting parameters. For example, I might have a layer called ‘outline’ and a layer called ‘holes’. I want both of them cut through with the laser, so I assign the same colour to each, let’s say ‘red’, and then configure ‘red’ to be high power with 3 passes (say) to cut through.

Either way, the fact that LightBurn does not support named layers in existing (or native) files is disappointing. I’d really like to discuss this as a genuine feature, even if it requires massive change.

The problem for me is that a great deal of artistic software defines a layer as a way of organizing related things, but there will be some filled, some outlined, etc., and LightBurn doesn’t have a mechanism for having multiple operations represented on a single “layer”.

We started using the color-map approach because that was already pretty much industry standard, and how existing users are accustomed to working. I’m not suggesting there’s no room for alternatives, but thousands of people are working with existing systems and files that expect thing to be this way, so we do it that way.

I do extract the layer information from a DXF, and could probably add a switch to make the system import layers instead of colors, but it’ll take some time to implement, and as of this moment very few people have requested this.

Use our suggestion site to post your suggestion and if it gets votes, it will be implemented. If it doesn’t, we’ll spend the effort on the things currently on the roadmap that people have voted for.

If you’re a software engineer and volunteering your time to do this, we can discuss via email.

1 Like

I just thought about this a little more, and I seriously think a hybrid solution would work well. In a nutshell, layers are named, and operations are coloured.

So, for your laser you define cutting/engraving/whatever operations by colour, and layers by name. Thus, when importing a job (or creating a new job) elements are grouped by layer. Colours are assigned to the layer to specify what operation should be done. At the moment, in LightBurn, the colour specifies the operation and the layer. (And yes, you could have two colours with the same operation, but that is confusing).

Since I am in full control of my copy of LightBurn and I know the capabilities of my laser I can predefine common operations on common materials by colour in LB and assign them in advance in my CAD software. At the time of import I can choose to retain the colours (because I made the CAD file and I assigned colours to the layers in CAD knowing what operation I wanted), or ignore the colours (or I left them all as black), because I want to assign operations to each layer in LB later. In terms of underlying software it means that layer names are unique, but colours are not, i.e. several layers could have the same colour, because the elements on those layers should be cut in the same way.

I have already put the suggestion on your suggestions site. I might add this little refinement. I’ll let it percolate some more, but I think this encapsulates what I was thinking.

Sorry, this did not pop out the first time I read it. I think we’re probably talking about two sides of the same coin. In the case where someone has created a layer, and on that layer they have included two or more different types of operation (cut, engrave, fill) then I agree, it’s a problem. The original designer will have to add more layers and group elements of the same type of operation on their own layer. Since layer names are free-form the designer could describe related layers with related names.

For example, I have a current job in QCAD which I will use to make two pieces, with a common outline. I don’t want to define two files, one for each piece. Instead I have one file with several layers, and for one piece I will turn on some layers, and for the other I will turn on different layers, however there is only one outline layer, which is turned on for both. When both pieces are cut I will glue them together.

With a little more detail, here are the key layers:

  • construction (used for aligning elements)
  • outline
  • decal_lines
  • decal_text
  • decal_vector_text
  • bore
  • counterbore

There are three operations I want to perform: cut through 3mm MDF, engrave MDF surface with a line, and engrave MDF surface with a raster fill.

In my CAD all of the lines are the same colour. That’s fine. If the drawing is too cluttered I can turn layers on and off to see what I want to see. If they are different colours it probably wouldn’t help.

I want to be able to import that file into LB and make my two pieces.

For piece 1 I want the following:

  • construction - Off
  • outline - Cut
  • decal_lines - Off
  • decal_text - Off
  • decal_vector_text - Off
  • bore - Off
  • counterbore - Cut

So, piece 1 is a panel with an outline (outline) and some holes (counterbore) cut through.

For piece 2 I want the following:

  • construction - Off
  • outline - Cut
  • decal_lines - Engrave
  • decal_text - Off
  • decal_vector_text - Fill
  • bore - Cut
  • counterbore - Off

Piece 2 is a panel with the same outline (outline) and some holes (bore) cut through, with some lines (decal_lines) and text (decal_vector_text) etched on the surface.

I also want to be able to specify the cutting order, so that Outline is last.

decal_text is used only within the CAD program because LB does not have the same fonts installed, and doesn’t correctly handle different text alignments. So I have decal_vector_text which is text in the original font with the original alignment converted to vectors.

construction is also a helper layer in CAD which I use for aligning various elements, but it would never be cut.

And a pony. I’d really like a pony. Thanks.

Put “everyone gets a pony” on the Feature Suggestions list. I’d vote for that one.

Done! (padding, padding, post must be at least 10 characters)

Andrew,

From a cursory read, I think an answer to your issue is to write a small script that changes the files to what you wants.

I will acknowledge that I’m not too familiar with the inner workings of the DXF format, as Oz wrote that importer, but the base is an ASCII text file, and if you can simply add a color to each layer definition, that would solve the problem. You wouldn’t need to worry about all the complexities with NURBS and splines and all that head-bashing stuff.

file7 → file7_modified, then open the latter in LB and it all works without having to modify LB.

I imagine a larger solution could like like: https://www.bulkrenameutility.co.uk/ which I am a fan of, and you can process your trove of existing files as such.

Thank you for replying. I understand your suggestion, but I want to reduce the number of intermediate steps, which this does not do.

I could just colour my layers in CAD, but I don’t want to. My layers already have names, but because they are all the same colour (black) they end up all together on the same layer in LB.

Thanks.

I’ve seen several messages now where people are trying to use layers in other software and LightBurn literally throws away the layer information.

Generally the explanations for this are mealy-mouthed and feeble. Sometimes it even seems that the person is apologising for this dismal state of affairs, as if things are this bad because of reasons, and there’s literally nothing that can be done to change it.

It’s pathetic.

I tried re-doing a couple of my files so that elements requiring different operations were different colours. Not only did it look garish, but my layer names have meanings (which is why I use them). Sometimes I want to run the same job but with different layers turned on or off. Unfortunately, when the layer names are lost then the information about what the elements are is also lost. I need a cheat-sheet with colours and what layer they used to be, but this is pointless and really should not be necessary.

Does nobody care about doing it properly?

Thank you for your lovely message. It’s not pathetic - it’s the reality of software development. Decisions were made relatively early on about how the internals of LightBurn would work, and we followed the lead of most existing laser software so that people transitioning from those to LightBurn would not have to learn a completely new way of working.

Color is irrelevant to a laser, so it’s used to visually denote different types of operation. In software like Vectric Aspire, they have a “selection set” for each operation, and no colors are displayed at all. In LightBurn, the operation has a color, and each shape is assigned a single operation, and is displayed in the color assigned that operation. There are many, many things coded into the software knowing this is how it works, and we have about 80000 users who are used to it. Changing it to match the arbitrary whims of one user is unlikely.

What you consider “doing it properly” is your opinion. What you see as garish I see as a very quick way to determine what’s going to happen to any vector on my screen. The more negatively you present yourself here, the more likely you are to be ignored.

As I previously said, I could add an option to the software to make it ignore the colors and use the layers instead. The layers would still be colored when in LightBurn, but your layer names and groupings would be preserved.

1 Like

Please do. That would be awesome. Thanks.

1 Like

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

About two months ago I asked why LightBurn does not handle imported DXF layers properly.

At the end of the thread it was suggested that a method of doing it properly could be implemented. I am wondering if this is present in v1.0?

We heard you the first 30 or so times you called LightBurn appalling bad.

Are you familiar with the phrase, “You catch more flies with honey”?