Hello,
my standalone cam system (Sheetcam) uses the layers to map the individual milling operations. For this I have to export a DXF file. When I import this file into my CAM program, the order of the layers is messed up. So far I have ignored the problem but now I have a complicated milling file with 40 different layers. The problem definitely comes from Rhino export. As far as I can see in the DXF with a file editor, the layers are no longer in the desired order. Even if I import the DXF file back into rhino, the order is messed up.
What could cause this problem?
Yes, this doesn’t surprise me. Layers in Rhino are stored in a table in their order of creation. You can re-order them in Rhino’s window, but that is only a display thing, it doesn’t change their order in the layer table.
Looks like that on export, they are exported in the order they are found in the layer table - i.e. chronological according to the layer’s creation. It looks like this order is even reversed - so last in, first out. So no matter what you actually do in the Rhino layer window, it seems like it’s not going to change the export output layer order for now…
I don’t know if this might be addressable via scripting, I’ll have a look, but I’m not optimistic…
Unfortunately, either the export or the re-import in this case is not the same as the original… So I don’t know what is going on here… @lowell, @dale can you shed some light here?
The plugins used are Human and Elefront. I don’t have a quick way to get the layer table in the right order in Elefront. Hence the Human Component.
I used worksessions to link the original file into a blank Rhino file.
Do note: once you activate the bake component it assigns a bake name, which will delete previously baked objects with the same name. I also right clicked the Ref by Layer and set it to only referenced objects, to eliminate the possibility of it doubling up once you baked – since it would find the referenced and new layers once baked.