2 sided Eagle Support mostly works now.

2 sided Eagle Support mostly works now. There were (and still are) some quirks, but at the moment, the widget will successfully parse an eagle brd with up to the max of 16 layers (as long as there is at least a single trace on each layer you want), populate a dropdown with all the available layers with Top as the default, and allow the user to select the layer they are interested in for rendering and toolpath generation.

One of the quirks right now is that any pads on the bottom layer only are not getting rotated, which means that if you’re like me and designed something with surface mount on both sides, you’re just out of luck, for now.
Also I haven’t dealt with board rotation/ mirroring yet, again, in regard to allowing the user to specify this for the bottom layer, but John and I like the setup wizard that Sebastian suggested and I have added a “Multilayer” tab for this functionality in the future.

Please test and let me know of any other feedback: comments, suggestions, bugs, etc. you all may come up with.

http://jsfiddle.net/raykholo/oxkcvrn3/31/
http://jsfiddle.net/raykholo/oxkcvrn3/31

@sszafran What do you think?
@Frank_Herrmann I could use some more eyes on this code if you’ve got some time, and I’m building a pick and place so we should chat. I sent you an invite on hangouts.
@jlauer - Awesome code.

When will this be added to the tinyg and grbl workspace?

@raykholo I haven’t been able to try it earlier :frowning: I must say: great job so far.
I used as a test Eagle Arduino brd file (top and bottom layers on this board) from this link: https://www.arduino.cc/en/uploads/Main/arduino_Uno_Rev3-02-TH.zip. Switching between layers works OK and rendering is quite fast. But I see that traces width is not exactly the same as Eagle and there are visible ‘overlaps’ between traces and pads. I am unable to add screenshots to the comment showing PCB both in native Eagle and the PCB v3 widget windows on one screen.
I did not try the gcode with CNC yet, probably it would be better to test with a pen first.

@sszafran you can adjust the width of the traces in the eagle import menu on the left. This way you can make sure there is not too much overlap, but the traces are as wide as possible.

Some traces do not connect to the pads but are milled through the pads

Send me pictures please, you can make a new post, and please comment here when you do.
There is a known bug with vias and the cut tool path around them (called the clipper path) coming out too small. There is a post about it here from a week or two ago.

hello ray, i checked your code and i have to say you found a simple solution:
if (selectedLayerInDropdown != oldActiveLayer) {
this.activeLayer=selectedLayerInDropdown;
console.log(“r6: layer active now”, this.activeLayer);
this.clearEagleBrd();
this.draw3d();
}

If this correct? That’s all? Ok, you set the active layer and then you render this again. But where are the Mirror code? Can you send me the row number?