maker.js icon indicating copy to clipboard operation
maker.js copied to clipboard

Empty layers export to DXF

Open icodk opened this issue 6 years ago • 3 comments

Hi I need to prepare some empty layers that will be exported to DXF together with the rest of the model. Is there a way to create empty layers with names that will just be there when imported to ex. LibraCAD ,eventually with more settings like font size etc. ?

icodk avatar Oct 28 '18 11:10 icodk

I've marked this as an enhancement, so I won't get around to it until after some other work. Meanwhile, I wonder if you can get by with this workaround: using a degenerate path, meaning either:

  • a circle with radius 0
  • a line with both ends on the same point

Currently, the dxf export code will create the layer table from the paths in the drawing. Then my question is if in your process, will LibraCAD ignore these "invisible" entities?

danmarshall avatar Oct 30 '18 05:10 danmarshall

I will try and let you know thanks

icodk avatar Oct 30 '18 12:10 icodk

it works by using Rectangle

var l1 = new makerjs.models.Rectangle(0,0);
l1.layer='layer1';

And then in the

var model={
    models: {
        objects: otherobjects,
          l1:l1,
         }
     }

icodk avatar Oct 31 '18 20:10 icodk