diff --git a/DOCS/DEV_LOG.md b/DOCS/DEV_LOG.md
index 5db934d..69f3b36 100644
--- a/DOCS/DEV_LOG.md
+++ b/DOCS/DEV_LOG.md
@@ -1,5 +1,31 @@
# DEV LOG
+### April 10, 2024
+
+Changes to make
+
+- change net list structure
+- draw rats nest
+- change layer object to layer list
+- make components and wire directly manipulable
+ - maybe should verify structure of data in specific spot (new PCB({...}))
+- no ids when not passed
+- remove wire list
+- make layer order match code and ui
+
+- update examples
+- update footprint structure
+ - { pads: {...} }
+ - maybe should be list of pads so they don't need names/ids
+
+- convert board into a footprint
+ - how to determine what is a pad and what is just a shape
+
+
+### April 4, 2024
+
+updated examples to use id instead of label
+
### Aug 21, 2023
layer menu gives options from all layers in board
diff --git a/examples/USB-FT230XS-UPDI.js b/examples/USB-FT230XS-UPDI.js
index ce64bb4..2769f04 100644
--- a/examples/USB-FT230XS-UPDI.js
+++ b/examples/USB-FT230XS-UPDI.js
@@ -30,25 +30,25 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(FT230XS, {translate: pt(x+width/2.0, y+.7), label: 'IC1\nFT230XS'});
-let C1 = board.add(C_1206, {translate: pt(IC1.padX("CB3")+.1, IC1.posY), rotate: 90, label: 'C1\n1uF'});
-let J1 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+.29), rotate: -90, label: 'J1 USB\n'});
-let R1 = board.add(R_1206, {translate: pt(IC1.posX+.05, IC1.posY-.22), rotate: 90, label: 'R1\n49'});
-let R2 = board.add(R_1206, {translate: pt(IC1.posX-.05, R1.posY), rotate: 90, label: 'R2\n49'});
-let C2 = board.add(C_1206, {translate: pt(J1.padX("5V")+.065, R1.posY), label: 'C2\n10pF'});
-let C3 = board.add(C_1206, {translate: pt(J1.padX("GND")-.065, R1.posY), label: 'C3\n10pF'});
-let J2 = board.add(header_UPDI_reverse, {translate: pt(IC1.posX, y+height-.23), rotate: -90, label: 'J2\nUPDI'});
-let R3 = board.add(R_1206, {translate: pt(IC1.padX("TXD")-.1, IC1.padY("TXD")+.05), rotate: 90, label: 'R3\n4.99k'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(FT230XS, {translate: pt(x+width/2.0, y+.7), id: 'IC1\nFT230XS'});
+let C1 = board.add(C_1206, {translate: pt(IC1.padX("CB3")+.1, IC1.posY), rotate: 90, id: 'C1\n1uF'});
+let J1 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+.29), rotate: -90, id: 'J1 USB\n'});
+let R1 = board.add(R_1206, {translate: pt(IC1.posX+.05, IC1.posY-.22), rotate: 90, id: 'R1\n49'});
+let R2 = board.add(R_1206, {translate: pt(IC1.posX-.05, R1.posY), rotate: 90, id: 'R2\n49'});
+let C2 = board.add(C_1206, {translate: pt(J1.padX("5V")+.065, R1.posY), id: 'C2\n10pF'});
+let C3 = board.add(C_1206, {translate: pt(J1.padX("GND")-.065, R1.posY), id: 'C3\n10pF'});
+let J2 = board.add(header_UPDI_reverse, {translate: pt(IC1.posX, y+height-.23), rotate: -90, id: 'J2\nUPDI'});
+let R3 = board.add(R_1206, {translate: pt(IC1.padX("TXD")-.1, IC1.padY("TXD")+.05), rotate: 90, id: 'R3\n4.99k'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J1.posX, 5.12+J1.posY]), -90.00000001, J1.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J1.posX, -5.12+J1.posY]), -90.00000001, J1.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J1.posX, 5.12+J1.posY]), -90.00000001, J1.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J1.posX, -5.12+J1.posY]), -90.00000001, J1.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -174,7 +174,7 @@ board.wire(path([C3.posX, IC1.padY("GND1")-.003],
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -186,5 +186,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/USB-FT230XS-serial.js b/examples/USB-FT230XS-serial.js
index 49f3b89..89e4a99 100644
--- a/examples/USB-FT230XS-serial.js
+++ b/examples/USB-FT230XS-serial.js
@@ -30,24 +30,24 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(FT230XS, {translate: pt(x+width/2.0, y+.7), label: 'IC1\nFT230XS'});
-let C1 = board.add(C_1206, {translate: pt(IC1.padX("CB3")+.1, IC1.posY), rotate: 90, label: 'C1\n1uF'});
-let J1 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+.29), rotate: -90, label: 'J1 USB\n'});
-let R1 = board.add(R_1206, {translate: pt(IC1.posX+.05, IC1.posY-.22), rotate: 90, label: 'R1\n49'});
-let R2 = board.add(R_1206, {translate: pt(IC1.posX-.05, R1.posY), rotate: 90, label: 'R2\n49'});
-let C2 = board.add(C_1206, {translate: pt(J1.padX("5V")+.065, R1.posY), label: 'C2\n10pF'});
-let C3 = board.add(C_1206, {translate: pt(J1.padX("GND")-.065, R1.posY), label: 'C3\n10pF'});
-let J2 = board.add(header_serial_reverse, {translate: pt(IC1.posX, y+height-.23), rotate: 90, label: 'J2\nserial'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(FT230XS, {translate: pt(x+width/2.0, y+.7), id: 'IC1\nFT230XS'});
+let C1 = board.add(C_1206, {translate: pt(IC1.padX("CB3")+.1, IC1.posY), rotate: 90, id: 'C1\n1uF'});
+let J1 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+.29), rotate: -90, id: 'J1 USB\n'});
+let R1 = board.add(R_1206, {translate: pt(IC1.posX+.05, IC1.posY-.22), rotate: 90, id: 'R1\n49'});
+let R2 = board.add(R_1206, {translate: pt(IC1.posX-.05, R1.posY), rotate: 90, id: 'R2\n49'});
+let C2 = board.add(C_1206, {translate: pt(J1.padX("5V")+.065, R1.posY), id: 'C2\n10pF'});
+let C3 = board.add(C_1206, {translate: pt(J1.padX("GND")-.065, R1.posY), id: 'C3\n10pF'});
+let J2 = board.add(header_serial_reverse, {translate: pt(IC1.posX, y+height-.23), rotate: 90, id: 'J2\nserial'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J1.posX, 5.12+J1.posY]), -90.00000001, J1.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J1.posX, -5.12+J1.posY]), -90.00000001, J1.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J1.posX, 5.12+J1.posY]), -90.00000001, J1.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J1.posX, -5.12+J1.posY]), -90.00000001, J1.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -178,7 +178,7 @@ board.wire(path(J2.pad("Rx"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -190,5 +190,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/crown.js b/examples/crown.js
index f487b9c..a7d596d 100644
--- a/examples/crown.js
+++ b/examples/crown.js
@@ -102,7 +102,7 @@ if (do_holes) {
}
}
-board.addShape("interior", crown);
+board.addShape("outline", crown);
let copper = structuredClone(crown);
@@ -124,25 +124,25 @@ geo.difference(copper, middle_band);
board.addShape("F.Cu", copper);
/* -- ADD_COMPONENTS -- */
-let R10 = board.add(R_1206, { translate: pt(-0.023, 0.521), rotate: -90, name: "R10" })
-let LED4 = board.add(LED_1206, { translate: pt(-0.337, 0.218), rotate: 0, name: "LED4" })
-let LED5 = board.add(LED_1206, { translate: pt(0.279, 0.224), rotate: 0, name: "LED5" })
-let R7 = board.add(R_1206, { translate: pt(0.068, 0.523), rotate: -90, name: "R7" })
-let R9 = board.add(R_1206, { translate: pt(0.154, 0.524), rotate: -90, name: "R9" })
-
-let R8 = board.add(R_1206, { translate: pt(0.333, 0.723), rotate: 0, name: "R8" })
-let PT = board.add(phototransistor_1206, { translate: pt(-0.396, 0.892), rotate: 180, name: "photo" })
-let J2 = board.add(USB_A_plug, { translate: pt(0, 2.45), rotate: 90, name: "USB" })
-let IC1 = board.add(SAMD21E, { translate: pt(-0.01, 0.879), rotate: 0, name: "D21E", padLabelSize: 0.0109 })
-let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("DIO")+.34), rotate: -90, name: 'J1 SWD'});
-let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND2"), IC1.padY("A27")+0.15), name: 'C1 1uF'});
-let C2 = board.add(C_1206, {translate: pt(IC1.padX("A07")-0.015, IC1.padY("VAN")-0.116), rotate: 90, name: 'C2\n1uF'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(C2.posX-0.157, C2.posY), rotate: -90, name: 'IC2\n3.3V'});
-let LED1 = board.add(LED_1206, { translate: pt(-3.252, 0.452), rotate: -90, name: "LED1" })
-let LED2 = board.add(LED_1206, { translate: pt(0.257, 1.947), rotate: 90, name: "LED2" })
-let R2 = board.add(R_1206, { translate: pt(0.337, 0.894), rotate: 0, name: "R2" })
-let LED3 = board.add(LED_1206, { translate: pt(3.27, 0.44), rotate: 270, name: "LED3" })
-let R5 = board.add(R_1206, { translate: pt(-0.339, 1.04), rotate: 270, name: "R5" })
+let R10 = board.add(R_1206, { translate: pt(-0.023, 0.521), rotate: -90, id: "R10" })
+let LED4 = board.add(LED_1206, { translate: pt(-0.337, 0.218), rotate: 0, id: "LED4" })
+let LED5 = board.add(LED_1206, { translate: pt(0.279, 0.224), rotate: 0, id: "LED5" })
+let R7 = board.add(R_1206, { translate: pt(0.068, 0.523), rotate: -90, id: "R7" })
+let R9 = board.add(R_1206, { translate: pt(0.154, 0.524), rotate: -90, id: "R9" })
+
+let R8 = board.add(R_1206, { translate: pt(0.333, 0.723), rotate: 0, id: "R8" })
+let PT = board.add(phototransistor_1206, { translate: pt(-0.396, 0.892), rotate: 180, id: "photo" })
+let J2 = board.add(USB_A_plug, { translate: pt(0, 2.45), rotate: 90, id: "USB" })
+let IC1 = board.add(SAMD21E, { translate: pt(-0.01, 0.879), rotate: 0, id: "D21E", padLabelSize: 0.0109 })
+let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("DIO")+.34), rotate: -90, id: 'J1 SWD'});
+let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND2"), IC1.padY("A27")+0.15), id: 'C1 1uF'});
+let C2 = board.add(C_1206, {translate: pt(IC1.padX("A07")-0.015, IC1.padY("VAN")-0.116), rotate: 90, id: 'C2\n1uF'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(C2.posX-0.157, C2.posY), rotate: -90, id: 'IC2\n3.3V'});
+let LED1 = board.add(LED_1206, { translate: pt(-3.252, 0.452), rotate: -90, id: "LED1" })
+let LED2 = board.add(LED_1206, { translate: pt(0.257, 1.947), rotate: 90, id: "LED2" })
+let R2 = board.add(R_1206, { translate: pt(0.337, 0.894), rotate: 0, id: "R2" })
+let LED3 = board.add(LED_1206, { translate: pt(3.27, 0.44), rotate: 270, id: "LED3" })
+let R5 = board.add(R_1206, { translate: pt(-0.339, 1.04), rotate: 270, id: "R5" })
@@ -155,7 +155,7 @@ let USB_rect = geo.path([[-w_USB/2, -0.2],
geo.translate(USB_rect, J2.pos);
-board.addShape("interior", USB_rect);
+board.addShape("outline", USB_rect);
/* -- ADD_WIRES -- */
board.wire(path(
@@ -454,7 +454,7 @@ renderPCB({
//"F.Cu": "#ffffffff",
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#ff8c00cc",
"drill": "#ffffffff",
@@ -465,5 +465,5 @@ renderPCB({
x: [-width/2, width/2],
y: [-lip, height]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
});
diff --git a/examples/fablab_bezier.js b/examples/fablab_bezier.js
index 6b55866..2e514e8 100644
--- a/examples/fablab_bezier.js
+++ b/examples/fablab_bezier.js
@@ -50,19 +50,19 @@ const border = 0 // rendering border
let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let R1 = board.add(R_1206, { translate: pt(-0.02482028, -0.8121274), rotate: 24, name: "R1" })
-let LED1 = board.add(LED_1206, { translate: pt(-0.19264138, -0.81919355), rotate: 295, name: "LED1" })
+let R1 = board.add(R_1206, { translate: pt(-0.02482028, -0.8121274), rotate: 24, id: "R1" })
+let LED1 = board.add(LED_1206, { translate: pt(-0.19264138, -0.81919355), rotate: 295, id: "LED1" })
let fab = board.add(test_fablab, { translate: pt(-0.81171559, -0.57349695)});
-let IC1 = board.add(SAMD11C, {translate: pt(-0.04403899, -0.31184937), name: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+0, IC1.padY("CLK")-0.15), name: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(-0.05916114, 0.01358479), rotate: 90, name: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.15, IC1.padY("A08")-.005), rotate: 90, name: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-0.2), rotate: 90, name: 'C1\n1uF'});
+let IC1 = board.add(SAMD11C, {translate: pt(-0.04403899, -0.31184937), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+0, IC1.padY("CLK")-0.15), id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(-0.05916114, 0.01358479), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.15, IC1.padY("A08")-.005), rotate: 90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-0.2), rotate: 90, id: 'C1\n1uF'});
-let interior = geo.translate(geo.rectangle(0.48, 0.58), [J2.posX, J2.posY]);
+let outline = geo.translate(geo.rectangle(0.48, 0.58), [J2.posX, J2.posY]);
-let interior2 = path([-0.2, -0.04],
+let outline2 = path([-0.2, -0.04],
["bezier", [-2.6, -0.04],
[0.47, 0.17],
[-4.86, -3.23],
@@ -72,8 +72,8 @@ let interior2 = path([-0.2, -0.04],
[0.2, -0.04]],
[0.2, -0.04]);
-board.addShape("interior", interior);
-board.addShape("interior", interior2);
+board.addShape("outline", outline);
+board.addShape("outline", outline2);
/* -- ADD_WIRES -- */
board.wire(path(J1.pad("CLK"),
@@ -175,7 +175,7 @@ board.wire(path(J2.pad("5V"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#ff8c00cc",
"drill": "#ff3300e5",
@@ -186,5 +186,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.128DB32.echo.js b/examples/hello.128DB32.echo.js
index 8bb48ea..3e7a134 100644
--- a/examples/hello.128DB32.echo.js
+++ b/examples/hello.128DB32.echo.js
@@ -28,19 +28,19 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(AVRDB32, {translate: pt(x+.56, y+.38), label: 'IC1\n128DB32'});
-let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.03), rotate: 180, label: 'J1\nserial\n5V'});
-let J2 = board.add(header_UPDI, {translate: pt(x+width-.23, IC1.posY+.23), rotate: 180, label: 'J2\nUPDI'});
-let C1 = board.add(C_1206, {translate: pt(IC1.padX("VIO2"), IC1.posY-.28), label: 'C1 1uF'});
-let C2 = board.add(C_1206, {translate: pt(IC1.posX+.32, IC1.padY("AVDD")), rotate: 90, label: 'C2\n1uF'});
-let C3 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY+.35), label: 'C3 1uF'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(AVRDB32, {translate: pt(x+.56, y+.38), id: 'IC1\n128DB32'});
+let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.03), rotate: 180, id: 'J1\nserial\n5V'});
+let J2 = board.add(header_UPDI, {translate: pt(x+width-.23, IC1.posY+.23), rotate: 180, id: 'J2\nUPDI'});
+let C1 = board.add(C_1206, {translate: pt(IC1.padX("VIO2"), IC1.posY-.28), id: 'C1 1uF'});
+let C2 = board.add(C_1206, {translate: pt(IC1.posX+.32, IC1.padY("AVDD")), rotate: 90, id: 'C2\n1uF'});
+let C3 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY+.35), id: 'C3 1uF'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -122,7 +122,7 @@ board.wire(path(C3.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -134,5 +134,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.CMM-4030D-261-I2S-TR.t1614.js b/examples/hello.CMM-4030D-261-I2S-TR.t1614.js
index d397ee8..0b77607 100644
--- a/examples/hello.CMM-4030D-261-I2S-TR.t1614.js
+++ b/examples/hello.CMM-4030D-261-I2S-TR.t1614.js
@@ -31,22 +31,22 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny1614, {translate: pt(x+.57, y+.55), label: 'IC1\nt1614'});
-let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY), rotate: 180, label: 'J1\nFTDI'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(J1.posX, J1.padY("GND")-.13), rotate: -90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX+.15, IC2.posY), rotate: 90, label: 'C1\n1uF'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2\nUPDI'});
-let IC3 = board.add(CMM4030D261I2STR, {translate: pt(IC1.posX+.26, IC1.posY-.014), label: 'I2S'});
-let C2 = board.add(C_1206, {translate: pt(IC3.posX+.04, IC3.posY-.15), label: 'C2 .1u'});
-let C3 = board.add(C_1206, {translate: pt(C2.posX, C2.posY-.1), label: 'C3 10u'});
-let R1 = board.add(R_1206, {translate: pt(J2.posX+.145, J2.posY+.02), rotate: 90, label: 'R1\n100k'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny1614, {translate: pt(x+.57, y+.55), id: 'IC1\nt1614'});
+let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY), rotate: 180, id: 'J1\nFTDI'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(J1.posX, J1.padY("GND")-.13), rotate: -90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX+.15, IC2.posY), rotate: 90, id: 'C1\n1uF'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2\nUPDI'});
+let IC3 = board.add(CMM4030D261I2STR, {translate: pt(IC1.posX+.26, IC1.posY-.014), id: 'I2S'});
+let C2 = board.add(C_1206, {translate: pt(IC3.posX+.04, IC3.posY-.15), id: 'C2 .1u'});
+let C3 = board.add(C_1206, {translate: pt(C2.posX, C2.posY-.1), id: 'C3 10u'});
+let R1 = board.add(R_1206, {translate: pt(J2.posX+.145, J2.posY+.02), rotate: 90, id: 'R1\n100k'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -163,7 +163,7 @@ board.wire(path(IC3.pad("SD"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -175,5 +175,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.CMSIS-DAP.10.D11C.js b/examples/hello.CMSIS-DAP.10.D11C.js
index 203c1a3..48fbb05 100644
--- a/examples/hello.CMSIS-DAP.10.D11C.js
+++ b/examples/hello.CMSIS-DAP.10.D11C.js
@@ -30,23 +30,23 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.58, y+.55), label: 'IC1\nD11'});
-let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("CLK")-.2), rotate: 90, label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.39, IC1.padY("CLK")-.06), rotate: -90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, label: 'C1\n1uF'});
-let R1 = board.add(R_1206, {translate: pt(J1.padX("VCC")+.07, J1.posY), rotate: 90, label: 'R1\n0'});
-let J3 = board.add(header_SWD, {translate: pt(IC1.posX-.33, IC1.padY("A09")), rotate: 180, label: 'J3\ntarget'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.58, y+.55), id: 'IC1\nD11'});
+let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("CLK")-.2), rotate: 90, id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.39, IC1.padY("CLK")-.06), rotate: -90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, id: 'C1\n1uF'});
+let R1 = board.add(R_1206, {translate: pt(J1.padX("VCC")+.07, J1.posY), rotate: 90, id: 'R1\n0'});
+let J3 = board.add(header_SWD, {translate: pt(IC1.posX-.33, IC1.padY("A09")), rotate: 180, id: 'J3\ntarget'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -162,7 +162,7 @@ board.wire(path(J3.pad("RST"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -174,5 +174,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.CMSIS-DAP.4.D11C.js b/examples/hello.CMSIS-DAP.4.D11C.js
index c6630bf..10f0d19 100644
--- a/examples/hello.CMSIS-DAP.4.D11C.js
+++ b/examples/hello.CMSIS-DAP.4.D11C.js
@@ -32,24 +32,24 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.57, y+.44), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_05, {translate: pt(IC1.posX, IC1.padY("CLK")-.11), label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.39, IC1.padY("CLK")-.05), rotate: -90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX+.04, IC2.posY-.15), rotate: 0, label: 'C1 1uF'});
-let J3 = board.add(header_SWD, {translate: pt(IC1.posX-.37, IC1.padY("A09")-.01), rotate: 180, label: 'J3\ntarget'});
-let R1 = board.add(R_1206, {translate: pt(IC2.posX+.115, IC2.posY), rotate: 90, label: 'R1\n1k'});
-let LED1 = board.add(LED_1206, {translate: pt(R1.posX+.1, R1.posY), rotate: -90, label: 'LED1'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.57, y+.44), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_05, {translate: pt(IC1.posX, IC1.padY("CLK")-.11), id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.39, IC1.padY("CLK")-.05), rotate: -90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX+.04, IC2.posY-.15), rotate: 0, id: 'C1 1uF'});
+let J3 = board.add(header_SWD, {translate: pt(IC1.posX-.37, IC1.padY("A09")-.01), rotate: 180, id: 'J3\ntarget'});
+let R1 = board.add(R_1206, {translate: pt(IC2.posX+.115, IC2.posY), rotate: 90, id: 'R1\n1k'});
+let LED1 = board.add(LED_1206, {translate: pt(R1.posX+.1, R1.posY), rotate: -90, id: 'LED1'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -157,7 +157,7 @@ board.wire(path(LED1.pad("C"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -169,5 +169,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11C.blink.js b/examples/hello.D11C.blink.js
index 99f4884..c21be20 100644
--- a/examples/hello.D11C.blink.js
+++ b/examples/hello.D11C.blink.js
@@ -31,24 +31,24 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.47, y+.55), label: 'IC1\nD11'});
-let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("CLK")-.2), rotate: 90, label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.27, IC1.padY("CLK")-.06), rotate: -90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, label: 'C1\n1uF'});
-let R1 = board.add(R_1206, {translate: pt(J1.padX("VCC")+.07, J1.posY), rotate: 90, label: 'R1\n0'});
-let R2 = board.add(R_1206, {translate: pt(IC1.padX("A08")-.1, IC1.padY("A08")-.03), rotate: 90, label: 'R2\n1k'});
-let LED1 = board.add(LED_1206, {translate: pt(R2.posX-.1, R2.posY), rotate: 90, label: 'LED1'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.47, y+.55), id: 'IC1\nD11'});
+let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("CLK")-.2), rotate: 90, id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.27, IC1.padY("CLK")-.06), rotate: -90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, id: 'C1\n1uF'});
+let R1 = board.add(R_1206, {translate: pt(J1.padX("VCC")+.07, J1.posY), rotate: 90, id: 'R1\n0'});
+let R2 = board.add(R_1206, {translate: pt(IC1.padX("A08")-.1, IC1.padY("A08")-.03), rotate: 90, id: 'R2\n1k'});
+let LED1 = board.add(LED_1206, {translate: pt(R2.posX-.1, R2.posY), rotate: 90, id: 'LED1'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -152,7 +152,7 @@ board.wire(path(LED1.pad("C"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -164,5 +164,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11C.blink.reset.clock.js b/examples/hello.D11C.blink.reset.clock.js
index b45f87a..6851e3e 100644
--- a/examples/hello.D11C.blink.reset.clock.js
+++ b/examples/hello.D11C.blink.reset.clock.js
@@ -31,27 +31,27 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.62, y+.55), label: 'IC1\nD11'});
-let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("CLK")-.2), rotate: 90, label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.42, IC1.padY("CLK")), rotate: -90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, label: 'C1\n1uF'});
-let R1 = board.add(R_1206, {translate: pt(J1.padX("VCC")+.07, J1.posY), rotate: 90, label: 'R1\n0'});
-let R2 = board.add(R_1206, {translate: pt(IC1.padX("A08")-.15, IC1.padY("A08")-.03), rotate: 90, label: 'R2\n1k'});
-let LED1 = board.add(LED_1206, {translate: pt(R2.posX-.1, R2.posY), rotate: 90, label: 'LED1'});
-let R3 = board.add(R_1206, {translate: pt(J1.posX-.23, J1.posY), label: 'R3 10k'});
-let R4 = board.add(R_1206, {translate: pt(R3.padX("1"), R3.posY+.15), rotate: 90, label: 'R4\n10k'});
-let C2 = board.add(C_1206, {translate: pt(R4.posX-.12, R4.posY), rotate: 90, label: 'C2\n.1uF'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.62, y+.55), id: 'IC1\nD11'});
+let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("CLK")-.2), rotate: 90, id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.42, IC1.padY("CLK")), rotate: -90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, id: 'C1\n1uF'});
+let R1 = board.add(R_1206, {translate: pt(J1.padX("VCC")+.07, J1.posY), rotate: 90, id: 'R1\n0'});
+let R2 = board.add(R_1206, {translate: pt(IC1.padX("A08")-.15, IC1.padY("A08")-.03), rotate: 90, id: 'R2\n1k'});
+let LED1 = board.add(LED_1206, {translate: pt(R2.posX-.1, R2.posY), rotate: 90, id: 'LED1'});
+let R3 = board.add(R_1206, {translate: pt(J1.posX-.23, J1.posY), id: 'R3 10k'});
+let R4 = board.add(R_1206, {translate: pt(R3.padX("1"), R3.posY+.15), rotate: 90, id: 'R4\n10k'});
+let C2 = board.add(C_1206, {translate: pt(R4.posX-.12, R4.posY), rotate: 90, id: 'C2\n.1uF'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -173,7 +173,7 @@ board.wire(path(R4.pad("1"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -185,5 +185,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11C.blink.reset.js b/examples/hello.D11C.blink.reset.js
index 5372e6d..1dba695 100644
--- a/examples/hello.D11C.blink.reset.js
+++ b/examples/hello.D11C.blink.reset.js
@@ -31,25 +31,25 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.58, y+.39), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_05, {translate: pt(IC1.posX, IC1.padY("CLK")-.11), label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.38, IC1.padY("A14")), rotate: -90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, label: 'C1\n1uF'});
-let C2 = board.add(C_1206, {translate: pt(C1.posX+.12, C1.posY), rotate: 90, label: 'C2\n.1uF'});
-let R1 = board.add(R_1206, {translate: pt(C2.posX+.12, C2.posY), rotate: 90, label: 'R1\n10k'});
-let R2 = board.add(R_1206, {translate: pt(R1.posX-.01, IC1.padY("A08")-.025), rotate: 90, label: 'R2\n1k'});
-let LED1 = board.add(LED_1206, {translate: pt(C2.posX+.01, R2.posY), rotate: 90, label: 'LED1'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.58, y+.39), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_05, {translate: pt(IC1.posX, IC1.padY("CLK")-.11), id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.38, IC1.padY("A14")), rotate: -90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, id: 'C1\n1uF'});
+let C2 = board.add(C_1206, {translate: pt(C1.posX+.12, C1.posY), rotate: 90, id: 'C2\n.1uF'});
+let R1 = board.add(R_1206, {translate: pt(C2.posX+.12, C2.posY), rotate: 90, id: 'R1\n10k'});
+let R2 = board.add(R_1206, {translate: pt(R1.posX-.01, IC1.padY("A08")-.025), rotate: 90, id: 'R2\n1k'});
+let LED1 = board.add(LED_1206, {translate: pt(C2.posX+.01, R2.posY), rotate: 90, id: 'LED1'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -149,7 +149,7 @@ board.wire(path(LED1.pad("C"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -161,5 +161,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11C.echo.1.js b/examples/hello.D11C.echo.1.js
index 57ccf4e..09915d5 100644
--- a/examples/hello.D11C.echo.1.js
+++ b/examples/hello.D11C.echo.1.js
@@ -31,21 +31,21 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.33, y+height-.63), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(x+width/2, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.15, IC1.padY("A08")-.005), rotate: 90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, label: 'C1\n1uF'});
+let IC1 = board.add(SAMD11C, {translate: pt(x+.33, y+height-.63), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(x+width/2, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.15, IC1.padY("A08")-.005), rotate: 90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, id: 'C1\n1uF'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -116,7 +116,7 @@ board.wire(path(J2.pad("5V"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -128,5 +128,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11C.echo.js b/examples/hello.D11C.echo.js
index 5c5e8f4..3c58579 100644
--- a/examples/hello.D11C.echo.js
+++ b/examples/hello.D11C.echo.js
@@ -30,22 +30,22 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C_SOIC, {translate: pt(x+.39, y+.55), label: 'IC1\nD11'});
-let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("CLK")-.2), rotate: 90, label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.17, J2.posY-.11), rotate: 180, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.12), label: 'C1 1uF'});
-let R1 = board.add(R_1206, {translate: pt(J1.padX("VCC")+.07, J1.posY), rotate: 90, label: '0'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C_SOIC, {translate: pt(x+.39, y+.55), id: 'IC1\nD11'});
+let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("CLK")-.2), rotate: 90, id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.17, J2.posY-.11), rotate: 180, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.12), id: 'C1 1uF'});
+let R1 = board.add(R_1206, {translate: pt(J1.padX("VCC")+.07, J1.posY), rotate: 90, id: '0'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -134,7 +134,7 @@ board.wire(path(C1.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -146,5 +146,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11C.echo.micro.js b/examples/hello.D11C.echo.micro.js
index 4818d3c..434960a 100644
--- a/examples/hello.D11C.echo.micro.js
+++ b/examples/hello.D11C.echo.micro.js
@@ -32,18 +32,18 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.24, y+height-.44), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), label: 'J1 SWD'});
-let J2 = board.add(USB_micro_Elektronik, {translate: pt(IC1.posX-.028, y+height-.05), rotate: 180, label: 'J2 USB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.18, IC1.padY("A08")-.005), rotate: 90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, label: 'C1\n1uF'});
+let IC1 = board.add(SAMD11C, {translate: pt(x+.24, y+height-.44), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), id: 'J1 SWD'});
+let J2 = board.add(USB_micro_Elektronik, {translate: pt(IC1.posX-.028, y+height-.05), rotate: 180, id: 'J2 USB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.18, IC1.padY("A08")-.005), rotate: 90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, id: 'C1\n1uF'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -137,7 +137,7 @@ board.wire(path([IC1.posX-.03, IC1.padY("A04")+.05],
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -149,5 +149,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11C.echo.mini.js b/examples/hello.D11C.echo.mini.js
index 9bd311f..2c74351 100644
--- a/examples/hello.D11C.echo.mini.js
+++ b/examples/hello.D11C.echo.mini.js
@@ -31,18 +31,18 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.26, y+height-0.58), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), label: 'J1 SWD'});
-let J2 = board.add(USB_mini_CUI, {translate: pt(IC1.posX-.028, y+height-.05), rotate: 180, label: 'J2 USB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.18, IC1.padY("A08")-.005), rotate: 90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, label: 'C1\n1uF'});
+let IC1 = board.add(SAMD11C, {translate: pt(x+.26, y+height-0.58), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), id: 'J1 SWD'});
+let J2 = board.add(USB_mini_CUI, {translate: pt(IC1.posX-.028, y+height-.05), rotate: 180, id: 'J2 USB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.18, IC1.padY("A08")-.005), rotate: 90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, id: 'C1\n1uF'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -119,7 +119,7 @@ board.wire(path(IC1.pad("25+"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -131,5 +131,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11C.serial.5V.1.1.js b/examples/hello.D11C.serial.5V.1.1.js
index 5a67467..b8c5521 100644
--- a/examples/hello.D11C.serial.5V.1.1.js
+++ b/examples/hello.D11C.serial.5V.1.1.js
@@ -33,25 +33,25 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.45, y+height-.59), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(x+width/2, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let J3 = board.add(header_serial_reverse, {translate: pt(IC1.posX, y+.23), rotate: -90, label: 'J3 serial'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.21, IC1.padY("A09")), rotate: -90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.24), rotate: 90, label: 'C1\n1uF'});
-let R1 = board.add(R_1206, {translate: pt(J3.padX("Rx")-.02, J1.posY-.2), label: 'R1\n0'});
-let R2 = board.add(R_1206, {translate: pt(C1.posX-.03, J3.posY+.18), rotate: 90, label: 'R2\n0'});
-let R3 = board.add(R_1206, {translate: pt(R1.posX-.22, R1.posY), label: 'R3\n4.99k'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.45, y+height-.59), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(x+width/2, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let J3 = board.add(header_serial_reverse, {translate: pt(IC1.posX, y+.23), rotate: -90, id: 'J3 serial'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.21, IC1.padY("A09")), rotate: -90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.24), rotate: 90, id: 'C1\n1uF'});
+let R1 = board.add(R_1206, {translate: pt(J3.padX("Rx")-.02, J1.posY-.2), id: 'R1\n0'});
+let R2 = board.add(R_1206, {translate: pt(C1.posX-.03, J3.posY+.18), rotate: 90, id: 'R2\n0'});
+let R3 = board.add(R_1206, {translate: pt(R1.posX-.22, R1.posY), id: 'R3\n4.99k'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -191,7 +191,7 @@ board.wire(path(R3.pad("1"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -203,5 +203,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11C.serial.5V.2.large.js b/examples/hello.D11C.serial.5V.2.large.js
index 1b6b59f..ce1dac9 100644
--- a/examples/hello.D11C.serial.5V.2.large.js
+++ b/examples/hello.D11C.serial.5V.2.large.js
@@ -33,27 +33,27 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.37, y+height-.63), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(x+width/2, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.17, IC1.padY("A08")-.04), rotate: 90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, label: 'C1\n1uF'});
-let J3 = board.add(header_serial_reverse, {translate: pt(IC1.posX+.02, y+.23), rotate: -90, label: 'J3 serial'});
-let R1 = board.add(R_1206, {translate: pt(J1.posX-.29, J1.posY), rotate: 90, label: 'R1\n4.99k'});
-let V1 = board.add(via(2*rv, 2*rp), {translate: pt(IC1.padX("A14")-.1, IC1.padY("A14")), label: 'V1'});
-let V2 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("CTS")-.025, J3.padY("CTS")-.11), label: 'V2'});
-let V3 = board.add(via(2*rv, 2*rp), {translate: pt(IC1.padX("A04")+.1, IC1.padY("A04")), label: 'V3'});
-let V4 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("Tx")+.025, J3.padY("Tx")-.11), label: 'V4'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.37, y+height-.63), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(x+width/2, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.17, IC1.padY("A08")-.04), rotate: 90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, id: 'C1\n1uF'});
+let J3 = board.add(header_serial_reverse, {translate: pt(IC1.posX+.02, y+.23), rotate: -90, id: 'J3 serial'});
+let R1 = board.add(R_1206, {translate: pt(J1.posX-.29, J1.posY), rotate: 90, id: 'R1\n4.99k'});
+let V1 = board.add(via(2*rv, 2*rp), {translate: pt(IC1.padX("A14")-.1, IC1.padY("A14")), id: 'V1'});
+let V2 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("CTS")-.025, J3.padY("CTS")-.11), id: 'V2'});
+let V3 = board.add(via(2*rv, 2*rp), {translate: pt(IC1.padX("A04")+.1, IC1.padY("A04")), id: 'V3'});
+let V4 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("Tx")+.025, J3.padY("Tx")-.11), id: 'V4'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -174,7 +174,7 @@ board.wire(path(V3.pad("via"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -186,5 +186,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11C.serial.5V.2.small.js b/examples/hello.D11C.serial.5V.2.small.js
index 522d612..8d877ad 100644
--- a/examples/hello.D11C.serial.5V.2.small.js
+++ b/examples/hello.D11C.serial.5V.2.small.js
@@ -33,27 +33,27 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.37, y+height-.63), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(x+width/2, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.17, IC1.padY("A08")-.04), rotate: 90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, label: 'C1\n1uF'});
-let J3 = board.add(header_serial_reverse, {translate: pt(IC1.posX+.02, y+.23), rotate: -90, label: 'J3 serial'});
-let R1 = board.add(R_1206, {translate: pt(J1.posX-.29, J1.posY), rotate: 90, label: 'R1\n4.99k'});
-let V1 = board.add(via(2*rv, 2*rp), {translate: pt(IC1.padX("A14")-.1, IC1.padY("A14")), label: 'V1'});
-let V2 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("CTS")-.025, J3.padY("CTS")-.11), label: 'V2'});
-let V3 = board.add(via(2*rv, 2*rp), {translate: pt(IC1.padX("A04")+.1, IC1.padY("A04")), label: 'V3'});
-let V4 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("Tx")+.025, J3.padY("Tx")-.11), label: 'V4'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.37, y+height-.63), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX+.015, IC1.padY("CLK")-.14), id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(x+width/2, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.17, IC1.padY("A08")-.04), rotate: 90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, id: 'C1\n1uF'});
+let J3 = board.add(header_serial_reverse, {translate: pt(IC1.posX+.02, y+.23), rotate: -90, id: 'J3 serial'});
+let R1 = board.add(R_1206, {translate: pt(J1.posX-.29, J1.posY), rotate: 90, id: 'R1\n4.99k'});
+let V1 = board.add(via(2*rv, 2*rp), {translate: pt(IC1.padX("A14")-.1, IC1.padY("A14")), id: 'V1'});
+let V2 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("CTS")-.025, J3.padY("CTS")-.11), id: 'V2'});
+let V3 = board.add(via(2*rv, 2*rp), {translate: pt(IC1.padX("A04")+.1, IC1.padY("A04")), id: 'V3'});
+let V4 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("Tx")+.025, J3.padY("Tx")-.11), id: 'V4'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -174,7 +174,7 @@ board.wire(path(V3.pad("via"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -186,5 +186,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11C.serial.micro.4.js b/examples/hello.D11C.serial.micro.4.js
index 0aaa5b3..3b15416 100644
--- a/examples/hello.D11C.serial.micro.4.js
+++ b/examples/hello.D11C.serial.micro.4.js
@@ -34,21 +34,21 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.36, y+height-.43), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX, IC1.padY("CLK")-.14), label: 'J1 SWD'});
-let J2 = board.add(USB_micro_Elektronik, {translate: pt(IC1.posX, y+height-.05), rotate: 180, label: 'J2\nmicro USB'});
-let J3 = board.add(header_serial_Frev, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J3\nserial F'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.2, IC1.padY("GND")-.01), rotate: -90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.24), rotate: 90, label: 'C1\n1uF'});
-let R3 = board.add(R_1206, {translate: pt(IC2.padX("in"), IC2.padY("in")+.1), label: 'R3 0'});
-let R4 = board.add(R_1206, {translate: pt(J3.padX("G")-.11, J3.posY+.11), rotate: 90, label: 'R4\n4.99k'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.36, y+height-.43), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.posX, IC1.padY("CLK")-.14), id: 'J1 SWD'});
+let J2 = board.add(USB_micro_Elektronik, {translate: pt(IC1.posX, y+height-.05), rotate: 180, id: 'J2\nmicro USB'});
+let J3 = board.add(header_serial_Frev, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J3\nserial F'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.2, IC1.padY("GND")-.01), rotate: -90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.24), rotate: 90, id: 'C1\n1uF'});
+let R3 = board.add(R_1206, {translate: pt(IC2.padX("in"), IC2.padY("in")+.1), id: 'R3 0'});
+let R4 = board.add(R_1206, {translate: pt(J3.padX("G")-.11, J3.posY+.11), rotate: 90, id: 'R4\n4.99k'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -164,7 +164,7 @@ board.wire(path(J3.pad("G"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -176,5 +176,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D11D.echo.js b/examples/hello.D11D.echo.js
index b33094d..aedf553 100644
--- a/examples/hello.D11D.echo.js
+++ b/examples/hello.D11D.echo.js
@@ -29,21 +29,21 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11D, {translate: pt(x+.43, y+.73), label: 'IC1\nD11D'});
-let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("A23")-.24), rotate: 90, label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.14, IC1.padY("A06")), rotate: -90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, label: 'C1\n1uF'});
+let IC1 = board.add(SAMD11D, {translate: pt(x+.43, y+.73), id: 'IC1\nD11D'});
+let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("A23")-.24), rotate: 90, id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.14, IC1.padY("A06")), rotate: -90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.2), rotate: 90, id: 'C1\n1uF'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -136,7 +136,7 @@ board.wire(path(C1.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -148,5 +148,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.D21E.echo.js b/examples/hello.D21E.echo.js
index 3bb87b0..bce954e 100644
--- a/examples/hello.D21E.echo.js
+++ b/examples/hello.D21E.echo.js
@@ -29,22 +29,22 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD21E, {translate: pt(x+.37, y+.36), label: 'IC1\nD21E'});
-let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("DIO")+.34), rotate: -90, label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, IC1.padY("25+")+.04), label: 'J2 USB'});
-let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND2"), IC1.padY("A27")+.15), label: 'C1 1uF'});
-let C2 = board.add(C_1206, {translate: pt(IC1.padX("A07")-.02, IC1.padY("VAN")-.07), rotate: 90, label: 'C2\n1uF'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(C2.posX-.11, C2.posY), rotate: -90, label: 'IC2\n3.3V'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD21E, {translate: pt(x+.37, y+.36), id: 'IC1\nD21E'});
+let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("DIO")+.34), rotate: -90, id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, IC1.padY("25+")+.04), id: 'J2 USB'});
+let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND2"), IC1.padY("A27")+.15), id: 'C1 1uF'});
+let C2 = board.add(C_1206, {translate: pt(IC1.padX("A07")-.02, IC1.padY("VAN")-.07), rotate: 90, id: 'C2\n1uF'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(C2.posX-.11, C2.posY), rotate: -90, id: 'IC2\n3.3V'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]));
-geo.difference(interior, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]));
+geo.difference(outline, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]));
+geo.difference(outline, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -142,7 +142,7 @@ board.wire(path(IC2.pad("gnd"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -154,5 +154,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.DRV8428-D11C-NEMA17.js b/examples/hello.DRV8428-D11C-NEMA17.js
index f04df5e..961ba86 100644
--- a/examples/hello.DRV8428-D11C-NEMA17.js
+++ b/examples/hello.DRV8428-D11C-NEMA17.js
@@ -39,32 +39,32 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(DRV8428_HTSSOP, {translate: pt(x+.56, y+height/2+.25), label: 'IC1\nDRV8428'});
-let J2 = board.add(header_4H, {translate: pt(x+.23, y+height/2), rotate: 180, label: 'J2\nstepper'});
-let R1 = board.add(ST4EB, {translate: pt(IC1.posX-.05, IC1.posY-.35), label: 'R1\n10k'});
-let C1 = board.add(C_1206, {translate: pt(J2.posX, J2.padY("1")-.16), rotate: 90, label: 'C1\n1uF'});
-let R2 = board.add(R_1206, {translate: pt(R1.padX("1")-.02, R1.posY-.24), rotate: 0, label: 'R2\n10k'});
-let C2 = board.add(C_FND, {translate: pt(IC1.posX+.08, IC1.posY+.27), rotate: 90, label: 'C2\n100uF'});
-let J4 = board.add(header_2H, {translate: pt(x+.23, IC1.padY("VM")+.05), rotate: 180, label: 'J4\npower'});
-let C3 = board.add(C_1206, {translate: pt(C2.posX+.31, C2.posY), label: 'C3\n.01uF'});
-let IC2 = board.add(SAMD11C, {translate: pt(x+width-.62, y+height/2), rotate: -90, label: 'IC2\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC2.padX("CLK")-.14, IC2.posY), rotate: -90, label: 'J1 SWD'});
-let J3 = board.add(USB_A_plug, {translate: pt(x+width-.29, IC2.posY+.025), rotate: 0, label: 'J3\nUSB'});
-let IC3 = board.add(regulator_SOT23, {translate: pt(IC2.padX("DIO")-.1, IC2.padY("24-")-.21), rotate: 0, label: 'IC3\n3.3V'});
-let C4 = board.add(C_1206, {translate: pt(IC3.posX-.22, IC3.posY), label: 'C4\n1uF'});
-let R3 = board.add(R_1206, {translate: pt(C3.posX+.22, C3.posY), label: 'R3\n0'});
-let R4 = board.add(R_1206, {translate: pt(IC2.padX("GND")+.01, IC3.posY+.03), rotate: 0, label: 'R4\n1k'});
-let LED = board.add(LED_1206, {translate: pt(R4.posX, R4.posY-.09), rotate: 180, label: 'LED'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(DRV8428_HTSSOP, {translate: pt(x+.56, y+height/2+.25), id: 'IC1\nDRV8428'});
+let J2 = board.add(header_4H, {translate: pt(x+.23, y+height/2), rotate: 180, id: 'J2\nstepper'});
+let R1 = board.add(ST4EB, {translate: pt(IC1.posX-.05, IC1.posY-.35), id: 'R1\n10k'});
+let C1 = board.add(C_1206, {translate: pt(J2.posX, J2.padY("1")-.16), rotate: 90, id: 'C1\n1uF'});
+let R2 = board.add(R_1206, {translate: pt(R1.padX("1")-.02, R1.posY-.24), rotate: 0, id: 'R2\n10k'});
+let C2 = board.add(C_FND, {translate: pt(IC1.posX+.08, IC1.posY+.27), rotate: 90, id: 'C2\n100uF'});
+let J4 = board.add(header_2H, {translate: pt(x+.23, IC1.padY("VM")+.05), rotate: 180, id: 'J4\npower'});
+let C3 = board.add(C_1206, {translate: pt(C2.posX+.31, C2.posY), id: 'C3\n.01uF'});
+let IC2 = board.add(SAMD11C, {translate: pt(x+width-.62, y+height/2), rotate: -90, id: 'IC2\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC2.padX("CLK")-.14, IC2.posY), rotate: -90, id: 'J1 SWD'});
+let J3 = board.add(USB_A_plug, {translate: pt(x+width-.29, IC2.posY+.025), rotate: 0, id: 'J3\nUSB'});
+let IC3 = board.add(regulator_SOT23, {translate: pt(IC2.padX("DIO")-.1, IC2.padY("24-")-.21), rotate: 0, id: 'IC3\n3.3V'});
+let C4 = board.add(C_1206, {translate: pt(IC3.posX-.22, IC3.posY), id: 'C4\n1uF'});
+let R3 = board.add(R_1206, {translate: pt(C3.posX+.22, C3.posY), id: 'R3\n0'});
+let R4 = board.add(R_1206, {translate: pt(IC2.padX("GND")+.01, IC3.posY+.03), rotate: 0, id: 'R4\n1k'});
+let LED = board.add(LED_1206, {translate: pt(R4.posX, R4.posY-.09), rotate: 180, id: 'LED'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J3.posX, 5.12+J3.posY]), 0.00000001, J3.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J3.posX, -5.12+J3.posY]), 0.00000001, J3.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J3.posX, 5.12+J3.posY]), 0.00000001, J3.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J3.posX, -5.12+J3.posY]), 0.00000001, J3.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -299,7 +299,7 @@ board.wire(path(LED.pad("C"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -311,5 +311,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.DRV8428-D11C.js b/examples/hello.DRV8428-D11C.js
index 4badd4a..6da32ef 100644
--- a/examples/hello.DRV8428-D11C.js
+++ b/examples/hello.DRV8428-D11C.js
@@ -39,32 +39,32 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(DRV8428_HTSSOP, {translate: pt(x+.6, y+.62), label: 'IC1\nDRV8428'});
-let J2 = board.add(header_4H, {translate: pt(x+.23, IC1.posY-.24), rotate: 180, label: 'J2\nstepper'});
-let R1 = board.add(ST4EB, {translate: pt(IC1.posX+.12, IC1.posY-.35), label: 'R1\n10k'});
-let C1 = board.add(C_1206, {translate: pt(R1.posX-.32, J2.padY("1")-.07), rotate: 90, label: 'C1\n1uF'});
-let R2 = board.add(R_1206, {translate: pt(R1.posX-.2, R1.posY+.05), rotate: 90, label: 'R2\n10k'});
-let C2 = board.add(C_FND, {translate: pt(IC1.posX+.04, IC1.posY+.27), rotate: 90, label: 'C2\n100uF'});
-let J4 = board.add(header_2H, {translate: pt(x+.23, IC1.padY("VM")+.05), rotate: 180, label: 'J4\npower'});
-let C3 = board.add(C_1206, {translate: pt(C2.posX+.31, C2.posY), label: 'C3\n.01uF'});
-let IC2 = board.add(SAMD11C, {translate: pt(x+width-.68, y+.45), rotate: -90, label: 'IC2\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC2.padX("CLK")-.14, IC2.posY), rotate: -90, label: 'J1 SWD'});
-let J3 = board.add(USB_A_plug, {translate: pt(x+width-.29, IC2.posY+.025), rotate: 0, label: 'J3\nUSB'});
-let IC3 = board.add(regulator_SOT23, {translate: pt(IC2.padX("A15"), IC2.padY("24-")-.18), rotate: 0, label: 'IC3\n3.3V'});
-let C4 = board.add(C_1206, {translate: pt(IC3.posX-.22, IC3.posY), label: 'C4\n1uF'});
-let R3 = board.add(R_1206, {translate: pt(C3.posX+.22, C3.posY), label: 'R3\n0'});
-let R4 = board.add(R_1206, {translate: pt(IC2.padX("A04")-.04, IC3.posY), rotate: 90, label: 'R4\n1k'});
-let LED = board.add(LED_1206, {translate: pt(R4.posX+.1, R4.posY), rotate: -90, label: 'LED'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(DRV8428_HTSSOP, {translate: pt(x+.6, y+.62), id: 'IC1\nDRV8428'});
+let J2 = board.add(header_4H, {translate: pt(x+.23, IC1.posY-.24), rotate: 180, id: 'J2\nstepper'});
+let R1 = board.add(ST4EB, {translate: pt(IC1.posX+.12, IC1.posY-.35), id: 'R1\n10k'});
+let C1 = board.add(C_1206, {translate: pt(R1.posX-.32, J2.padY("1")-.07), rotate: 90, id: 'C1\n1uF'});
+let R2 = board.add(R_1206, {translate: pt(R1.posX-.2, R1.posY+.05), rotate: 90, id: 'R2\n10k'});
+let C2 = board.add(C_FND, {translate: pt(IC1.posX+.04, IC1.posY+.27), rotate: 90, id: 'C2\n100uF'});
+let J4 = board.add(header_2H, {translate: pt(x+.23, IC1.padY("VM")+.05), rotate: 180, id: 'J4\npower'});
+let C3 = board.add(C_1206, {translate: pt(C2.posX+.31, C2.posY), id: 'C3\n.01uF'});
+let IC2 = board.add(SAMD11C, {translate: pt(x+width-.68, y+.45), rotate: -90, id: 'IC2\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC2.padX("CLK")-.14, IC2.posY), rotate: -90, id: 'J1 SWD'});
+let J3 = board.add(USB_A_plug, {translate: pt(x+width-.29, IC2.posY+.025), rotate: 0, id: 'J3\nUSB'});
+let IC3 = board.add(regulator_SOT23, {translate: pt(IC2.padX("A15"), IC2.padY("24-")-.18), rotate: 0, id: 'IC3\n3.3V'});
+let C4 = board.add(C_1206, {translate: pt(IC3.posX-.22, IC3.posY), id: 'C4\n1uF'});
+let R3 = board.add(R_1206, {translate: pt(C3.posX+.22, C3.posY), id: 'R3\n0'});
+let R4 = board.add(R_1206, {translate: pt(IC2.padX("A04")-.04, IC3.posY), rotate: 90, id: 'R4\n1k'});
+let LED = board.add(LED_1206, {translate: pt(R4.posX+.1, R4.posY), rotate: -90, id: 'LED'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J3.posX, 5.12+J3.posY]), 0.00000001, J3.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J3.posX, -5.12+J3.posY]), 0.00000001, J3.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J3.posX, 5.12+J3.posY]), 0.00000001, J3.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J3.posX, -5.12+J3.posY]), 0.00000001, J3.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -290,7 +290,7 @@ board.wire(path(LED.pad("C"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -302,5 +302,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.ESC.44.js b/examples/hello.ESC.44.js
index 5518789..74229d8 100644
--- a/examples/hello.ESC.44.js
+++ b/examples/hello.ESC.44.js
@@ -30,20 +30,20 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.49, y+.59), label: 'IC1\nt44'});
-let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.22), rotate: 90, label: 'J1\nISP'});
-let J2 = board.add(header_FTDI, {translate: pt(x+width-.22, IC1.posY-.0), rotate: 0, label: 'J2 FTDI'});
-let XTAL1 = board.add(XTAL_EFOBM, {translate: pt(IC1.padX("PB3")-.2, IC1.padY("PA0")+.003), rotate: -90, label: 'XTAL1\n20 MHz'});
-let R1 = board.add(R_1206, {translate: pt(IC1.padX("VCC"), IC1.padY("VCC")+.1), label: 'R1\n10k'});
-let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND"), R1.posY), label: 'C1\n1uF'});
-let J3 = board.add(ESC, {translate: pt(XTAL1.posX-.02, J1.posY+.025), rotate: 90, label: 'J3 ESC'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.49, y+.59), id: 'IC1\nt44'});
+let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.22), rotate: 90, id: 'J1\nISP'});
+let J2 = board.add(header_FTDI, {translate: pt(x+width-.22, IC1.posY-.0), rotate: 0, id: 'J2 FTDI'});
+let XTAL1 = board.add(XTAL_EFOBM, {translate: pt(IC1.padX("PB3")-.2, IC1.padY("PA0")+.003), rotate: -90, id: 'XTAL1\n20 MHz'});
+let R1 = board.add(R_1206, {translate: pt(IC1.padX("VCC"), IC1.padY("VCC")+.1), id: 'R1\n10k'});
+let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND"), R1.posY), id: 'C1\n1uF'});
+let J3 = board.add(ESC, {translate: pt(XTAL1.posX-.02, J1.posY+.025), rotate: 90, id: 'J3 ESC'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -136,7 +136,7 @@ board.wire(path(J1.pad("GND"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -148,5 +148,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.ESP-01.js b/examples/hello.ESP-01.js
index cce7736..1f261d2 100644
--- a/examples/hello.ESP-01.js
+++ b/examples/hello.ESP-01.js
@@ -31,22 +31,22 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+.48), rotate: 0, label: 'J1 serial\n5V power\n3.3V logic'});
-let IC1 = board.add(regulator_SOT223, {translate: pt(J1.posX-.25, J1.posY), label: 'IC1\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY-.25), label: 'C1 10uF'});
-let C2 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY+.25), label: 'C2 1uF'});
-let J2 = board.add(ESP_01, {translate: pt(IC1.posX-.49, IC1.posY), rotate: 180, label: 'J2\nESP-01'});
-let R1 = board.add(R_1206, {translate: pt(J2.padX("EN")+.11, J2.padY("IO0")), rotate: 90, label: 'R1\n10k'});
-let S1 = board.add(button_6mm, {translate: pt(J2.padX("GND")+.12, J2.padY("GND")-.2), label: 'S1\nreset'});
-let S2 = board.add(slide_switch, {translate: pt(S1.posX, J2.padY("VCC")+.21), rotate: 180, label: 'S2\nprog run'});
-let R2 = board.add(R_1206, {translate: pt(J2.padX("IO0")-.11, J2.padY("IO0")), rotate: 90, label: 'R2\n10k'});
-
-let interior = geo.path(path([x, y+height],
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+.48), rotate: 0, id: 'J1 serial\n5V power\n3.3V logic'});
+let IC1 = board.add(regulator_SOT223, {translate: pt(J1.posX-.25, J1.posY), id: 'IC1\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY-.25), id: 'C1 10uF'});
+let C2 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY+.25), id: 'C2 1uF'});
+let J2 = board.add(ESP_01, {translate: pt(IC1.posX-.49, IC1.posY), rotate: 180, id: 'J2\nESP-01'});
+let R1 = board.add(R_1206, {translate: pt(J2.padX("EN")+.11, J2.padY("IO0")), rotate: 90, id: 'R1\n10k'});
+let S1 = board.add(button_6mm, {translate: pt(J2.padX("GND")+.12, J2.padY("GND")-.2), id: 'S1\nreset'});
+let S2 = board.add(slide_switch, {translate: pt(S1.posX, J2.padY("VCC")+.21), rotate: 180, id: 'S2\nprog run'});
+let R2 = board.add(R_1206, {translate: pt(J2.padX("IO0")-.11, J2.padY("IO0")), rotate: 90, id: 'R2\n10k'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -152,7 +152,7 @@ board.wire(path(S1.pad("R1"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -164,5 +164,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.ESP-WROOM-02D.js b/examples/hello.ESP-WROOM-02D.js
index cbf5d05..149fac7 100644
--- a/examples/hello.ESP-WROOM-02D.js
+++ b/examples/hello.ESP-WROOM-02D.js
@@ -31,22 +31,22 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+.39), rotate: 0, label: 'J1 serial\n5V power\n3.3V data'});
-let IC1 = board.add(regulator_SOT223, {translate: pt(J1.posX-.2, J1.posY-.05), label: '\nIC1\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY-.25), label: 'C1\n10uF'});
-let C2 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY+.25), label: 'C2\n1uF'});
-let IC2 = board.add(ESP_WROOM_02D, {translate: pt(x+.28, J1.posY+.23), rotate: 90, label: "IC2\n \nESP-WROOM-02D"});
-let S1 = board.add(slide_switch, {translate: pt(IC2.padX("GND1")-.06, y+.06), rotate: 0, label: 'prog run\nS1'});
-let R1 = board.add(R_1206, {translate: pt(IC2.padX("IO12")-.05, IC2.padY("EN")-.15), label: 'R1 10k'});
-let S2 = board.add(button_6mm, {translate: pt(IC2.padX("IO4")+.26, IC2.padY("IO4")-.05), rotate: 0, label: 'S2\nreset'});
-let R2 = board.add(R_1206, {translate: pt(S2.posX+.25, S2.posY-.06), rotate: 90, label: 'R2\n10k'});
-
-let interior = geo.path(path([x, y+height],
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+.39), rotate: 0, id: 'J1 serial\n5V power\n3.3V data'});
+let IC1 = board.add(regulator_SOT223, {translate: pt(J1.posX-.2, J1.posY-.05), id: '\nIC1\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY-.25), id: 'C1\n10uF'});
+let C2 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY+.25), id: 'C2\n1uF'});
+let IC2 = board.add(ESP_WROOM_02D, {translate: pt(x+.28, J1.posY+.23), rotate: 90, id: "IC2\n \nESP-WROOM-02D"});
+let S1 = board.add(slide_switch, {translate: pt(IC2.padX("GND1")-.06, y+.06), rotate: 0, id: 'prog run\nS1'});
+let R1 = board.add(R_1206, {translate: pt(IC2.padX("IO12")-.05, IC2.padY("EN")-.15), id: 'R1 10k'});
+let S2 = board.add(button_6mm, {translate: pt(IC2.padX("IO4")+.26, IC2.padY("IO4")-.05), rotate: 0, id: 'S2\nreset'});
+let R2 = board.add(R_1206, {translate: pt(S2.posX+.25, S2.posY-.06), rotate: 90, id: 'R2\n10k'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -162,7 +162,7 @@ board.wire(path(R2.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -174,5 +174,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.ESP32-CAM.js b/examples/hello.ESP32-CAM.js
index 0bc59f1..36b8902 100644
--- a/examples/hello.ESP32-CAM.js
+++ b/examples/hello.ESP32-CAM.js
@@ -27,16 +27,16 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+height/2), rotate: 0, label: 'J1 FTDI\n3.3V'});
-let ESP = board.add(ESP32_CAM, {translate: pt(x+.4, y+.74), rotate: -90, label: 'ESP32-CAM'});
-let S1 = board.add(slide_switch, {translate: pt(ESP.padX("IO0"), ESP.padY("IO0")-.19), label: 'prog run'});
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+height/2), rotate: 0, id: 'J1 FTDI\n3.3V'});
+let ESP = board.add(ESP32_CAM, {translate: pt(x+.4, y+.74), rotate: -90, id: 'ESP32-CAM'});
+let S1 = board.add(slide_switch, {translate: pt(ESP.padX("IO0"), ESP.padY("IO0")-.19), id: 'prog run'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -79,7 +79,7 @@ board.wire(path(S1.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -91,5 +91,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.ESP32-WROOM.js b/examples/hello.ESP32-WROOM.js
index d0d5a6a..174a169 100644
--- a/examples/hello.ESP32-WROOM.js
+++ b/examples/hello.ESP32-WROOM.js
@@ -31,22 +31,22 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+.5), rotate: 0, label: 'J1 FTDI\n3.3V'});
-let IC1 = board.add(regulator_SOT223, {translate: pt(J1.posX-.25, J1.posY), label: 'IC1\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY-.25), label: 'C1 10uF'});
-let C2 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY+.25), label: 'C2 1uF'});
-let IC2 = board.add(ESP32_WROOM, {translate: pt(x+.35, y+.69), rotate: 90, label: 'IC2\nESP32-WROOM'});
-let S1 = board.add(slide_switch, {translate: pt(IC1.posX, IC1.padY("out")+.4), rotate: 180, label: 'prog run'});
-let S2 = board.add(button_6mm, {translate: pt(IC2.posX, IC2.padY("EN")-.2), label: 'reset'});
-let R1 = board.add(R_1206, {translate: pt(S2.padX("L2")+.15, S2.posY), rotate: 90, label: 'R1\n10k'});
-let C3 = board.add(C_1206, {translate: pt(R1.posX+.12, R1.posY), rotate: 90, label: 'C3\n.1uF'});
-
-let interior = geo.path(path([x, y+height],
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+.5), rotate: 0, id: 'J1 FTDI\n3.3V'});
+let IC1 = board.add(regulator_SOT223, {translate: pt(J1.posX-.25, J1.posY), id: 'IC1\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY-.25), id: 'C1 10uF'});
+let C2 = board.add(C_1206, {translate: pt(IC1.posX, IC1.posY+.25), id: 'C2 1uF'});
+let IC2 = board.add(ESP32_WROOM, {translate: pt(x+.35, y+.69), rotate: 90, id: 'IC2\nESP32-WROOM'});
+let S1 = board.add(slide_switch, {translate: pt(IC1.posX, IC1.padY("out")+.4), rotate: 180, id: 'prog run'});
+let S2 = board.add(button_6mm, {translate: pt(IC2.posX, IC2.padY("EN")-.2), id: 'reset'});
+let R1 = board.add(R_1206, {translate: pt(S2.padX("L2")+.15, S2.posY), rotate: 90, id: 'R1\n10k'});
+let C3 = board.add(C_1206, {translate: pt(R1.posX+.12, R1.posY), rotate: 90, id: 'C3\n.1uF'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -148,7 +148,7 @@ board.wire(path(C3.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -160,5 +160,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.GPS.t1614.js b/examples/hello.GPS.t1614.js
index 2522ea7..30e7f4d 100644
--- a/examples/hello.GPS.t1614.js
+++ b/examples/hello.GPS.t1614.js
@@ -29,18 +29,18 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny1614, {translate: pt(x+.53, y+.54), label: 'IC1\nt1614'});
-let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.07), rotate: 180, label: 'J1\nserial\n5V'});
-let C1 = board.add(C_1206, {translate: pt(J1.posX+.15, J1.padY("GND")), rotate: -90, label: 'C1\n1uF'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2\nUPDI'});
-let J3 = board.add(header_GPS, {translate: pt(x+width-.15, y+height/2), label: 'J3\nGPS'});
+let IC1 = board.add(ATtiny1614, {translate: pt(x+.53, y+.54), id: 'IC1\nt1614'});
+let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.07), rotate: 180, id: 'J1\nserial\n5V'});
+let C1 = board.add(C_1206, {translate: pt(J1.posX+.15, J1.padY("GND")), rotate: -90, id: 'C1\n1uF'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2\nUPDI'});
+let J3 = board.add(header_GPS, {translate: pt(x+width-.15, y+height/2), id: 'J3\nGPS'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -112,7 +112,7 @@ board.wire(path(C1.pad("1"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -124,5 +124,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.H-bridge.D11C.js b/examples/hello.H-bridge.D11C.js
index d340c06..95a9925 100644
--- a/examples/hello.H-bridge.D11C.js
+++ b/examples/hello.H-bridge.D11C.js
@@ -32,25 +32,25 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+width-.87, y+.3), rotate: -90, label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.padX("CLK")-.14, IC1.posY), rotate: -90, label: 'J1\nSWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, y+height/2), rotate: 0, label: 'J2\nUSB'});
-let IC2 = board.add(A4953_SOICN, {translate: pt(IC1.posX-.1, IC1.posY+.4), rotate: 90, label: 'IC2\nTB67H451FNG'});
-let J3 = board.add(header_4, {translate: pt(IC2.posX-.29, IC2.posY+.15), rotate: 0, label: 'J3\nload'});
-let IC3 = board.add(regulator_SOT23, {translate: pt(IC2.posX+.47, IC2.posY-.08), rotate: 90, label: 'IC3\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC3.posX-.11, IC3.posY), rotate: 90, label: 'C1\n1uF'});
-let C2 = board.add(C_1206, {translate: pt(IC2.posX+.16, IC2.posY+.06), rotate: 90, label: 'C2\n.1'});
-let C3 = board.add(C_1206, {translate: pt(IC2.posX+.26, IC2.posY+.06), rotate: 90, label: 'C3\n10uF'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+width-.87, y+.3), rotate: -90, id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.padX("CLK")-.14, IC1.posY), rotate: -90, id: 'J1\nSWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, y+height/2), rotate: 0, id: 'J2\nUSB'});
+let IC2 = board.add(A4953_SOICN, {translate: pt(IC1.posX-.1, IC1.posY+.4), rotate: 90, id: 'IC2\nTB67H451FNG'});
+let J3 = board.add(header_4, {translate: pt(IC2.posX-.29, IC2.posY+.15), rotate: 0, id: 'J3\nload'});
+let IC3 = board.add(regulator_SOT23, {translate: pt(IC2.posX+.47, IC2.posY-.08), rotate: 90, id: 'IC3\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC3.posX-.11, IC3.posY), rotate: 90, id: 'C1\n1uF'});
+let C2 = board.add(C_1206, {translate: pt(IC2.posX+.16, IC2.posY+.06), rotate: 90, id: 'C2\n.1'});
+let C3 = board.add(C_1206, {translate: pt(IC2.posX+.26, IC2.posY+.06), rotate: 90, id: 'C3\n10uF'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 0.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 0.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 0.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 0.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -183,7 +183,7 @@ board.wire(path(C3.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -195,5 +195,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.HM-11.ftdi.js b/examples/hello.HM-11.ftdi.js
index f774b01..29102b9 100644
--- a/examples/hello.HM-11.ftdi.js
+++ b/examples/hello.HM-11.ftdi.js
@@ -28,17 +28,17 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+height/2), rotate: 0, label: 'J1 FTDI\n3.3V'});
-let IC1 = board.add(regulator_SOT23, {translate: pt(J1.posX-.18, J1.padY("CTS")), rotate: 90, label: 'IC1\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX-.14, IC1.posY), rotate: 90, label: 'C1\n1uF'});
-let HM = board.add(HM11, {translate: pt(x+.15, J1.posY), rotate: 90, label: 'HM-11'});
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+height/2), rotate: 0, id: 'J1 FTDI\n3.3V'});
+let IC1 = board.add(regulator_SOT23, {translate: pt(J1.posX-.18, J1.padY("CTS")), rotate: 90, id: 'IC1\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX-.14, IC1.posY), rotate: 90, id: 'C1\n1uF'});
+let HM = board.add(HM11, {translate: pt(x+.15, J1.posY), rotate: 90, id: 'HM-11'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -82,7 +82,7 @@ board.wire(path(HM.pad("GND"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -94,5 +94,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.ILI9341.HW.D21E.js b/examples/hello.ILI9341.HW.D21E.js
index 868384f..77df6ae 100644
--- a/examples/hello.ILI9341.HW.D21E.js
+++ b/examples/hello.ILI9341.HW.D21E.js
@@ -33,28 +33,28 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD21E, {translate: pt(x+.65, y+.36), label: 'IC1\nD21E'});
-let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("DIO")+.34), rotate: -90, label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, IC1.padY("25+")+.04), label: 'J2 USB'});
-let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND2"), IC1.padY("A27")+.15), label: 'C1 1uF'});
-let C2 = board.add(C_1206, {translate: pt(IC1.padX("A07")-.275, IC1.padY("VAN")-.08), rotate: 90, label: 'C2\n1uF'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(C2.posX-.135, C2.posY), rotate: -90, label: 'IC2\n3.3V'});
-let J3 = board.add(TFT8x1v, {translate: pt(IC1.posX-.41, IC1.posY+.28), rotate: 0, label: 'J3 TFT'});
-let R1 = board.add(R_1206, {translate: pt(J3.padX("SCK")+.025, C2.padY("2")), rotate: 90, label: 'R1\n(0)'});
-let V1 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("MOSI")-.02, J3.padY("SCK")), label: 'V1'});
-let V2 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("SCK")+.02, J3.padY("SCK")-.075), label: 'V2'});
-let V3 = board.add(via(2*rv, 2*rp), {translate: pt(IC1.padX("A16"), IC1.padY("A15")), label: 'V3'});
-let V4 = board.add(via(2*rv, 2*rp), {translate: pt(V3.posX, V3.posY-.09), label: 'V4'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD21E, {translate: pt(x+.65, y+.36), id: 'IC1\nD21E'});
+let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("DIO")+.34), rotate: -90, id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, IC1.padY("25+")+.04), id: 'J2 USB'});
+let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND2"), IC1.padY("A27")+.15), id: 'C1 1uF'});
+let C2 = board.add(C_1206, {translate: pt(IC1.padX("A07")-.275, IC1.padY("VAN")-.08), rotate: 90, id: 'C2\n1uF'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(C2.posX-.135, C2.posY), rotate: -90, id: 'IC2\n3.3V'});
+let J3 = board.add(TFT8x1v, {translate: pt(IC1.posX-.41, IC1.posY+.28), rotate: 0, id: 'J3 TFT'});
+let R1 = board.add(R_1206, {translate: pt(J3.padX("SCK")+.025, C2.padY("2")), rotate: 90, id: 'R1\n(0)'});
+let V1 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("MOSI")-.02, J3.padY("SCK")), id: 'V1'});
+let V2 = board.add(via(2*rv, 2*rp), {translate: pt(J3.padX("SCK")+.02, J3.padY("SCK")-.075), id: 'V2'});
+let V3 = board.add(via(2*rv, 2*rp), {translate: pt(IC1.padX("A16"), IC1.padY("A15")), id: 'V3'});
+let V4 = board.add(via(2*rv, 2*rp), {translate: pt(V3.posX, V3.posY-.09), id: 'V4'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]));
-geo.difference(interior, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]));
+geo.difference(outline, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]));
+geo.difference(outline, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -217,7 +217,7 @@ board.wire(path(V4.pad("via"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -229,5 +229,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.ILI9341.SW.D21E.js b/examples/hello.ILI9341.SW.D21E.js
index e453b6e..88e0570 100644
--- a/examples/hello.ILI9341.SW.D21E.js
+++ b/examples/hello.ILI9341.SW.D21E.js
@@ -31,24 +31,24 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD21E, {translate: pt(x+.62, y+.36), label: 'IC1\nD21E'});
-let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("DIO")+.34), rotate: -90, label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, IC1.padY("25+")+.04), label: 'J2 USB'});
-let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND2"), IC1.padY("A27")+.15), label: 'C1 1uF'});
-let C2 = board.add(C_1206, {translate: pt(IC1.padX("A07")-.255, IC1.padY("VAN")-.08), rotate: 90, label: 'C2\n1uF'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(C2.posX-.125, C2.posY), rotate: -90, label: 'IC2\n3.3V'});
-let J3 = board.add(TFT8x1v, {translate: pt(IC1.posX-.39, IC1.posY+.25), rotate: 0, label: 'J3 TFT'});
-let R1 = board.add(R_1206, {translate: pt(J3.padX("SCK")+.025, C2.padY("2")), rotate: 90, label: 'R1\n(0)'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD21E, {translate: pt(x+.62, y+.36), id: 'IC1\nD21E'});
+let J1 = board.add(header_SWD, {translate: pt(IC1.posX, IC1.padY("DIO")+.34), rotate: -90, id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, IC1.padY("25+")+.04), id: 'J2 USB'});
+let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND2"), IC1.padY("A27")+.15), id: 'C1 1uF'});
+let C2 = board.add(C_1206, {translate: pt(IC1.padX("A07")-.255, IC1.padY("VAN")-.08), rotate: 90, id: 'C2\n1uF'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(C2.posX-.125, C2.posY), rotate: -90, id: 'IC2\n3.3V'});
+let J3 = board.add(TFT8x1v, {translate: pt(IC1.posX-.39, IC1.posY+.25), rotate: 0, id: 'J3 TFT'});
+let R1 = board.add(R_1206, {translate: pt(J3.padX("SCK")+.025, C2.padY("2")), rotate: 90, id: 'R1\n(0)'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]));
-geo.difference(interior, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]));
+geo.difference(outline, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]));
+geo.difference(outline, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -196,7 +196,7 @@ board.wire(path(R1.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -208,5 +208,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.ISP.44.js b/examples/hello.ISP.44.js
index 5258a0c..84ef257 100644
--- a/examples/hello.ISP.44.js
+++ b/examples/hello.ISP.44.js
@@ -31,29 +31,29 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.51, y+.67), label: 'IC1\nt44'});
-let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.24), rotate: 90, label: 'J1\nISP'});
-let SJ1 = board.add(SJ, {translate: pt(IC1.padX("PA6")-.07, J1.padY("RST")), rotate: 90, label: 'SJ1'});
-let J2 = board.add(USB_mini_B, {translate: pt(IC1.posX-.02, y+height+.08), rotate: 180, label: "\n\nJ2 USB"});
-let R1 = board.add(R_1206, {translate: pt(J2.padX("V")+.09, J2.padY("V")-.1), label: 'R1 1k'});
-let R2 = board.add(R_1206, {translate: pt(R1.padX("2"), R1.posY-.143), rotate: 90, label: 'R2\n499'});
-let SJ2 = board.add(R_1206, {translate: pt(R2.posX-.015, R2.posY-.2), rotate: 90, label: 'SJ2'});
-let D1 = board.add(D_SOD_123, {translate: pt(J2.padX("+"), R2.padY("2")), label: 'D1\n3.3V'});
-let D2 = board.add(D_SOD_123, {translate: pt(D1.padX("A"), D1.posY-.07), label: '\nD2 3.3V'});
-let R3 = board.add(R_1206, {translate: pt(D2.posX+.04, D2.posY-.15), rotate: 90, label: 'R3\n100'});
-let R4 = board.add(R_1206, {translate: pt(D1.padX("C")-.01, R3.posY), rotate: 90, label: 'R4\n100'});
-let R5 = board.add(R_1206, {translate: pt(SJ1.posX-.07, J1.padY("GND")), rotate: 90, label: 'R5\n10k'});
-let XTAL1 = board.add(XTAL_NX5032GA, {translate: pt(IC1.posX-.27, IC1.padY("PB0")-.025), rotate: 90, label: '20\nMHz'});
-let C1 = board.add(C_1206, {translate: pt(R5.posX-.1, R5.posY), rotate: 90, label: 'C1\n1uF'});
-let C2 = board.add(C_1206, {translate: pt(XTAL1.posX-.12, XTAL1.posY+.12), rotate: 90, label: 'C2\n10pF'});
-let C3 = board.add(C_1206, {translate: pt(C2.posX, XTAL1.posY-.12), rotate: 90, label: 'C3\n10pF'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.51, y+.67), id: 'IC1\nt44'});
+let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.24), rotate: 90, id: 'J1\nISP'});
+let SJ1 = board.add(SJ, {translate: pt(IC1.padX("PA6")-.07, J1.padY("RST")), rotate: 90, id: 'SJ1'});
+let J2 = board.add(USB_mini_B, {translate: pt(IC1.posX-.02, y+height+.08), rotate: 180, id: "\n\nJ2 USB"});
+let R1 = board.add(R_1206, {translate: pt(J2.padX("V")+.09, J2.padY("V")-.1), id: 'R1 1k'});
+let R2 = board.add(R_1206, {translate: pt(R1.padX("2"), R1.posY-.143), rotate: 90, id: 'R2\n499'});
+let SJ2 = board.add(R_1206, {translate: pt(R2.posX-.015, R2.posY-.2), rotate: 90, id: 'SJ2'});
+let D1 = board.add(D_SOD_123, {translate: pt(J2.padX("+"), R2.padY("2")), id: 'D1\n3.3V'});
+let D2 = board.add(D_SOD_123, {translate: pt(D1.padX("A"), D1.posY-.07), id: '\nD2 3.3V'});
+let R3 = board.add(R_1206, {translate: pt(D2.posX+.04, D2.posY-.15), rotate: 90, id: 'R3\n100'});
+let R4 = board.add(R_1206, {translate: pt(D1.padX("C")-.01, R3.posY), rotate: 90, id: 'R4\n100'});
+let R5 = board.add(R_1206, {translate: pt(SJ1.posX-.07, J1.padY("GND")), rotate: 90, id: 'R5\n10k'});
+let XTAL1 = board.add(XTAL_NX5032GA, {translate: pt(IC1.posX-.27, IC1.padY("PB0")-.025), rotate: 90, id: '20\nMHz'});
+let C1 = board.add(C_1206, {translate: pt(R5.posX-.1, R5.posY), rotate: 90, id: 'C1\n1uF'});
+let C2 = board.add(C_1206, {translate: pt(XTAL1.posX-.12, XTAL1.posY+.12), rotate: 90, id: 'C2\n10pF'});
+let C3 = board.add(C_1206, {translate: pt(C2.posX, XTAL1.posY-.12), rotate: 90, id: 'C3\n10pF'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -212,7 +212,7 @@ board.wire(path([C1.posX, C1.padY("1")-.085],
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -224,5 +224,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.LEDs.t412.js b/examples/hello.LEDs.t412.js
index 6f8f9f4..5fc4ed9 100644
--- a/examples/hello.LEDs.t412.js
+++ b/examples/hello.LEDs.t412.js
@@ -33,29 +33,29 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny412, {translate: pt(x+.44, y+.44), label: 'IC1\nt412'});
-let J1 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J1\nUPDI'});
-let J2 = board.add(header_power, {translate: pt(J1.posX+.28, J1.posY-.04), rotate: 90, label: 'J2\n9V'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(J2.posX, J2.posY+.25), label: 'IC2\n5V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY+.12), label: 'C1 1uF'});
-let T1 = board.add(NMOSFET_SOT23, {translate: pt(IC1.posX-.35, IC1.padY("VCC")+.01), rotate: 90, label: 'T1 N'});
-let R1 = board.add(R_1206, {translate: pt(T1.posX+.12, T1.posY+.03), rotate: 90, label: 'R1\n10k'});
-let D1 = board.add(LED_3014_1100, {translate: pt(T1.posX-.035, T1.posY-.15), rotate: 90, label: 'D1'});
-let D2 = board.add(LED_3014_1100, {translate: pt(D1.posX+.075, D1.posY), rotate: 90, label: 'D2'});
-let D3 = board.add(LED_3014_1100, {translate: pt(D1.posX+.15, D1.posY), rotate: 90, label: 'D3'});
-let D4 = board.add(LED_3014_1100, {translate: pt(D1.posX, D1.posY-.14), rotate: 90, label: 'D4'});
-let D5 = board.add(LED_3014_1100, {translate: pt(D4.posX+.075, D4.posY), rotate: 90, label: 'D5'});
-let D6 = board.add(LED_3014_1100, {translate: pt(D4.posX+.15, D4.posY), rotate: 90, label: 'D6'});
-let D7 = board.add(LED_3014_1100, {translate: pt(D4.posX, D4.posY-.14), rotate: 90, label: 'D7'});
-let D8 = board.add(LED_3014_1100, {translate: pt(D7.posX+.075, D7.posY), rotate: 90, label: 'D8'});
-let D9 = board.add(LED_3014_1100, {translate: pt(D7.posX+.15, D7.posY), rotate: 90, label: 'D9'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny412, {translate: pt(x+.44, y+.44), id: 'IC1\nt412'});
+let J1 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J1\nUPDI'});
+let J2 = board.add(header_power, {translate: pt(J1.posX+.28, J1.posY-.04), rotate: 90, id: 'J2\n9V'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(J2.posX, J2.posY+.25), id: 'IC2\n5V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY+.12), id: 'C1 1uF'});
+let T1 = board.add(NMOSFET_SOT23, {translate: pt(IC1.posX-.35, IC1.padY("VCC")+.01), rotate: 90, id: 'T1 N'});
+let R1 = board.add(R_1206, {translate: pt(T1.posX+.12, T1.posY+.03), rotate: 90, id: 'R1\n10k'});
+let D1 = board.add(LED_3014_1100, {translate: pt(T1.posX-.035, T1.posY-.15), rotate: 90, id: 'D1'});
+let D2 = board.add(LED_3014_1100, {translate: pt(D1.posX+.075, D1.posY), rotate: 90, id: 'D2'});
+let D3 = board.add(LED_3014_1100, {translate: pt(D1.posX+.15, D1.posY), rotate: 90, id: 'D3'});
+let D4 = board.add(LED_3014_1100, {translate: pt(D1.posX, D1.posY-.14), rotate: 90, id: 'D4'});
+let D5 = board.add(LED_3014_1100, {translate: pt(D4.posX+.075, D4.posY), rotate: 90, id: 'D5'});
+let D6 = board.add(LED_3014_1100, {translate: pt(D4.posX+.15, D4.posY), rotate: 90, id: 'D6'});
+let D7 = board.add(LED_3014_1100, {translate: pt(D4.posX, D4.posY-.14), rotate: 90, id: 'D7'});
+let D8 = board.add(LED_3014_1100, {translate: pt(D7.posX+.075, D7.posY), rotate: 90, id: 'D8'});
+let D9 = board.add(LED_3014_1100, {translate: pt(D7.posX+.15, D7.posY), rotate: 90, id: 'D9'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -157,7 +157,7 @@ board.wire(path(D9.pad("C"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -169,5 +169,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.LSM6DS33.t1614.js b/examples/hello.LSM6DS33.t1614.js
index b382e87..cda5928 100644
--- a/examples/hello.LSM6DS33.t1614.js
+++ b/examples/hello.LSM6DS33.t1614.js
@@ -29,18 +29,18 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny1614, {translate: pt(x+.53, y+.54), label: 'IC1\nt1614'});
-let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.07), rotate: 180, label: 'J1\nserial\n5V'});
-let C1 = board.add(C_1206, {translate: pt(J1.posX, J1.padY("GND")-.1), label: 'C1 1uF'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2\nUPDI'});
-let J3 = board.add(header_LSM6DS33_2736, {translate: pt(x+width-.23, IC1.posY-.25), label: "J3\nLSM6DS33\n2736"});
+let IC1 = board.add(ATtiny1614, {translate: pt(x+.53, y+.54), id: 'IC1\nt1614'});
+let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.07), rotate: 180, id: 'J1\nserial\n5V'});
+let C1 = board.add(C_1206, {translate: pt(J1.posX, J1.padY("GND")-.1), id: 'C1 1uF'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2\nUPDI'});
+let J3 = board.add(header_LSM6DS33_2736, {translate: pt(x+width-.23, IC1.posY-.25), id: "J3\nLSM6DS33\n2736"});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -111,7 +111,7 @@ board.wire(path(J3.pad("SCL"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -123,5 +123,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.MFRC522.t1614.js b/examples/hello.MFRC522.t1614.js
index 1835ddb..daaee58 100644
--- a/examples/hello.MFRC522.t1614.js
+++ b/examples/hello.MFRC522.t1614.js
@@ -31,20 +31,20 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny1614, {translate: pt(x+.63, y+.55), label: 'IC1\nt1614'});
-let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY), rotate: 180, label: 'J1\nFTDI'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(J1.posX, J1.padY("GND")-.13), rotate: -90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX+.15, IC2.posY), rotate: 90, label: 'C1\n1uF'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2\nUPDI'});
-let J3 = board.add(header_MFRC522, {translate: pt(x+width-.23, IC1.posY-.1), label: 'J3\nMFRC522'});
-let R1 = board.add(R_1206, {translate: pt(J3.posX-.14, J3.padY("CIPO")), rotate: 90, label: 'R1\n0'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny1614, {translate: pt(x+.63, y+.55), id: 'IC1\nt1614'});
+let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY), rotate: 180, id: 'J1\nFTDI'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(J1.posX, J1.padY("GND")-.13), rotate: -90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX+.15, IC2.posY), rotate: 90, id: 'C1\n1uF'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2\nUPDI'});
+let J3 = board.add(header_MFRC522, {translate: pt(x+width-.23, IC1.posY-.1), id: 'J3\nMFRC522'});
+let R1 = board.add(R_1206, {translate: pt(J3.posX-.14, J3.padY("CIPO")), rotate: 90, id: 'R1\n0'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -148,7 +148,7 @@ board.wire(path(IC1.pad("PA2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -160,5 +160,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.MinIMU9v5.t1614.js b/examples/hello.MinIMU9v5.t1614.js
index cbfa158..a39f803 100644
--- a/examples/hello.MinIMU9v5.t1614.js
+++ b/examples/hello.MinIMU9v5.t1614.js
@@ -29,18 +29,18 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny1614, {translate: pt(x+.53, y+.52), label: 'IC1\nt1614'});
-let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.07), rotate: 180, label: 'J1\nserial\n5V'});
-let C1 = board.add(C_1206, {translate: pt(J1.posX, J1.padY("GND")-.1), label: 'C1 1uF'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2\nUPDI'});
-let J3 = board.add(header_IMU_2738, {translate: pt(x+width-.23, y+height/2), label: "J3\nMinIMU9v5"});
+let IC1 = board.add(ATtiny1614, {translate: pt(x+.53, y+.52), id: 'IC1\nt1614'});
+let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.07), rotate: 180, id: 'J1\nserial\n5V'});
+let C1 = board.add(C_1206, {translate: pt(J1.posX, J1.padY("GND")-.1), id: 'C1 1uF'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2\nUPDI'});
+let J3 = board.add(header_IMU_2738, {translate: pt(x+width-.23, y+height/2), id: "J3\nMinIMU9v5"});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -112,7 +112,7 @@ board.wire(path(C1.pad("1"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -124,5 +124,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.RN4871.ftdi.js b/examples/hello.RN4871.ftdi.js
index 0a7134f..741a9b9 100644
--- a/examples/hello.RN4871.ftdi.js
+++ b/examples/hello.RN4871.ftdi.js
@@ -29,18 +29,18 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+height/2+.01), rotate: 0, label: 'J1 FTDI\n3.3V'});
-let IC1 = board.add(regulator_SOT23, {translate: pt(J1.posX-.18, J1.padY("CTS")), rotate: 90, label: 'IC1\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX-.14, IC1.posY), rotate: 90, label: 'C1\n1uF'});
-let RN = board.add(RN4871, {translate: pt(x, J1.posY), rotate: 90, label: ' RN4871'});
-let R1 = board.add(R_1206, {translate: pt(C1.posX-.15, C1.padY("1")), label: 'R1\n10k'});
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.22, y+height/2+.01), rotate: 0, id: 'J1 FTDI\n3.3V'});
+let IC1 = board.add(regulator_SOT23, {translate: pt(J1.posX-.18, J1.padY("CTS")), rotate: 90, id: 'IC1\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX-.14, IC1.posY), rotate: 90, id: 'C1\n1uF'});
+let RN = board.add(RN4871, {translate: pt(x, J1.posY), rotate: 90, id: ' RN4871'});
+let R1 = board.add(R_1206, {translate: pt(C1.posX-.15, C1.padY("1")), id: 'R1\n10k'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -103,7 +103,7 @@ board.wire(path(R1.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -115,5 +115,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.SSD1306.45.js b/examples/hello.SSD1306.45.js
index 26131c7..b98997d 100644
--- a/examples/hello.SSD1306.45.js
+++ b/examples/hello.SSD1306.45.js
@@ -29,21 +29,21 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny45_SOIC, {translate: pt(x+.53, y+.26), rotate: -90, label: 'IC1\nt45'});
-let J1 = board.add(header_ISP, {translate: pt(IC1.posX-.31, IC1.posY-.02), rotate: 0, label: 'J1\nISP'});
-let R1 = board.add(R_1206, {translate: pt(IC1.padX("RST")+.09, IC1.posY), rotate: 90, label: 'R1\n10k'});
-let C1 = board.add(C_1206, {translate: pt(R1.posX+.12, R1.posY), rotate: 90, label: 'C1\n1uF'});
-let J2 = board.add(header_FTDI, {translate: pt(x+width-.23, C1.posY+.05), label: 'J2 FTDI\n5V'});
-let oled = board.add(I2C4x1, {translate: pt(IC1.padX("PB3"), J2.padY("GND")+.05), rotate: 90, label: 'SSD1306'});
-let R2 = board.add(R_1206, {translate: pt(J1.posX+.06, oled.padY("SCL")), rotate: 90, label: 'R2\n10k'});
-let R3 = board.add(R_1206, {translate: pt(J1.posX-.06, oled.padY("SCL")), rotate: 90, label: 'R3\n10k'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny45_SOIC, {translate: pt(x+.53, y+.26), rotate: -90, id: 'IC1\nt45'});
+let J1 = board.add(header_ISP, {translate: pt(IC1.posX-.31, IC1.posY-.02), rotate: 0, id: 'J1\nISP'});
+let R1 = board.add(R_1206, {translate: pt(IC1.padX("RST")+.09, IC1.posY), rotate: 90, id: 'R1\n10k'});
+let C1 = board.add(C_1206, {translate: pt(R1.posX+.12, R1.posY), rotate: 90, id: 'C1\n1uF'});
+let J2 = board.add(header_FTDI, {translate: pt(x+width-.23, C1.posY+.05), id: 'J2 FTDI\n5V'});
+let oled = board.add(I2C4x1, {translate: pt(IC1.padX("PB3"), J2.padY("GND")+.05), rotate: 90, id: 'SSD1306'});
+let R2 = board.add(R_1206, {translate: pt(J1.posX+.06, oled.padY("SCL")), rotate: 90, id: 'R2\n10k'});
+let R3 = board.add(R_1206, {translate: pt(J1.posX-.06, oled.padY("SCL")), rotate: 90, id: 'R3\n10k'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -147,7 +147,7 @@ board.wire(path(oled.pad("GND"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -159,5 +159,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.SWD.10-4.1.js b/examples/hello.SWD.10-4.1.js
index b4fc898..861cb88 100644
--- a/examples/hello.SWD.10-4.1.js
+++ b/examples/hello.SWD.10-4.1.js
@@ -25,15 +25,15 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let J1 = board.add(header_SWD_4_1, {translate: pt(x+width/2+.005, y+.1), rotate: 180, label: 'J1 SWD'});
-let J3 = board.add(header_SWD, {translate: pt(J1.posX, y+height-.19), rotate: -90, label: 'J3\ntarget'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(x+width/2+.005, y+.1), rotate: 180, id: 'J1 SWD'});
+let J3 = board.add(header_SWD, {translate: pt(J1.posX, y+height-.19), rotate: -90, id: 'J3\ntarget'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -74,7 +74,7 @@ board.wire(path(J3.pad("RST"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -86,5 +86,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.SWD.10-4.js b/examples/hello.SWD.10-4.js
index 73dd86a..ee825ec 100644
--- a/examples/hello.SWD.10-4.js
+++ b/examples/hello.SWD.10-4.js
@@ -26,15 +26,15 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let J1 = board.add(header_SWD_4_05, {translate: pt(x+width/2+.005, y+.07), rotate: 180, label: 'J1 SWD'});
-let J3 = board.add(header_SWD, {translate: pt(J1.posX, y+height-.19), rotate: -90, label: 'J3\ntarget'});
+let J1 = board.add(header_SWD_4_05, {translate: pt(x+width/2+.005, y+.07), rotate: 180, id: 'J1 SWD'});
+let J3 = board.add(header_SWD, {translate: pt(J1.posX, y+height-.19), rotate: -90, id: 'J3\ntarget'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -75,7 +75,7 @@ board.wire(path(J3.pad("RST"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -87,5 +87,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.TLE493D.t412.js b/examples/hello.TLE493D.t412.js
index 6a520e2..e0c6249 100644
--- a/examples/hello.TLE493D.t412.js
+++ b/examples/hello.TLE493D.t412.js
@@ -32,22 +32,22 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny412, {translate: pt(x+.49, y+.41), label: 'IC1\nt412'});
-let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.075), rotate: 180, label: 'J1\nserial'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX+.07, IC1.padY("VCC")+.14), rotate: 90, label: 'C1\n1uF'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.posX-.07, C1.posY), rotate: -90, label: 'IC2\n3.3V'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2\nUPDI'});
-let IC3 = board.add(TLE493D, {translate: pt(IC1.posX+.26, IC1.posY-.02), label: 'IC3\nTLE493D'});
-let R1 = board.add(R_1206, {translate: pt(IC3.posX, IC3.posY-.18), label: 'R1 1k'});
-let R2 = board.add(R_1206, {translate: pt(R1.posX, R1.posY-.1), label: 'R2 1k'});
-let C2 = board.add(C_1206, {translate: pt(IC3.padX("GND1"), C1.padY("1")), label: 'C2\n0.1uF'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny412, {translate: pt(x+.49, y+.41), id: 'IC1\nt412'});
+let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.075), rotate: 180, id: 'J1\nserial'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX+.07, IC1.padY("VCC")+.14), rotate: 90, id: 'C1\n1uF'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.posX-.07, C1.posY), rotate: -90, id: 'IC2\n3.3V'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2\nUPDI'});
+let IC3 = board.add(TLE493D, {translate: pt(IC1.posX+.26, IC1.posY-.02), id: 'IC3\nTLE493D'});
+let R1 = board.add(R_1206, {translate: pt(IC3.posX, IC3.posY-.18), id: 'R1 1k'});
+let R2 = board.add(R_1206, {translate: pt(R1.posX, R1.posY-.1), id: 'R2 1k'});
+let C2 = board.add(C_1206, {translate: pt(IC3.padX("GND1"), C1.padY("1")), id: 'C2\n0.1uF'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -169,7 +169,7 @@ board.wire(path(C1.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -181,5 +181,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.VEML6040.t412.js b/examples/hello.VEML6040.t412.js
index fe17454..dd44d24 100644
--- a/examples/hello.VEML6040.t412.js
+++ b/examples/hello.VEML6040.t412.js
@@ -32,22 +32,22 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny412, {translate: pt(x+.6, y+.47), label: 'IC1\nt412'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), label: 'C1 1uF'});
-let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.1), rotate: 180, label: 'J1 serial\n5V power\n3.3V logic'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.posX-.23, C1.posY-.02), rotate: -90, label: 'IC2\n3.3V'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2\nUPDI'});
-let IC3 = board.add(VEML6040, {translate: pt(x+width-.05, J2.posY+.03), rotate: 90, label: 'IC3'});
-let R1 = board.add(R_1206, {translate: pt(IC3.posX-.12, IC3.posY-.15), label: 'R1 0'});
-let R2 = board.add(R_1206, {translate: pt(J2.padX("GND")-.115, J2.posY), rotate: 90, label: 'R2\n4.99k'});
-let R3 = board.add(R_1206, {translate: pt(J2.posX+.15, J2.posY+.03), rotate: 90, label: 'R3\n4.99k'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny412, {translate: pt(x+.6, y+.47), id: 'IC1\nt412'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), id: 'C1 1uF'});
+let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.1), rotate: 180, id: 'J1 serial\n5V power\n3.3V logic'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.posX-.23, C1.posY-.02), rotate: -90, id: 'IC2\n3.3V'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2\nUPDI'});
+let IC3 = board.add(VEML6040, {translate: pt(x+width-.05, J2.posY+.03), rotate: 90, id: 'IC3'});
+let R1 = board.add(R_1206, {translate: pt(IC3.posX-.12, IC3.posY-.15), id: 'R1 0'});
+let R2 = board.add(R_1206, {translate: pt(J2.padX("GND")-.115, J2.posY), rotate: 90, id: 'R2\n4.99k'});
+let R3 = board.add(R_1206, {translate: pt(J2.posX+.15, J2.posY+.03), rotate: 90, id: 'R3\n4.99k'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -151,7 +151,7 @@ board.wire(path([R1.posX, R3.padY("1")],
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -163,5 +163,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.VL53L1X.t1614.js b/examples/hello.VL53L1X.t1614.js
index e84e9f3..f13a1ad 100644
--- a/examples/hello.VL53L1X.t1614.js
+++ b/examples/hello.VL53L1X.t1614.js
@@ -29,18 +29,18 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny1614, {translate: pt(x+.53, y+.54), label: 'IC1\nt1614'});
-let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.07), rotate: 180, label: 'J1\nserial\n5V'});
-let C1 = board.add(C_1206, {translate: pt(J1.posX, J1.padY("GND")-.1), label: 'C1 1uF'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2\nUPDI'});
-let J3 = board.add(header_VL53L1X_3415, {translate: pt(x+width-.23, IC1.posY-.15), label: "J3\nVL53L1X\n3415"});
+let IC1 = board.add(ATtiny1614, {translate: pt(x+.53, y+.54), id: 'IC1\nt1614'});
+let J1 = board.add(header_FTDI, {translate: pt(x+.23, IC1.posY-.07), rotate: 180, id: 'J1\nserial\n5V'});
+let C1 = board.add(C_1206, {translate: pt(J1.posX, J1.padY("GND")-.1), id: 'C1 1uF'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2\nUPDI'});
+let J3 = board.add(header_VL53L1X_3415, {translate: pt(x+width-.23, IC1.posY-.15), id: "J3\nVL53L1X\n3415"});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -111,7 +111,7 @@ board.wire(path(J3.pad("SCL"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -123,5 +123,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.button.D11C.js b/examples/hello.button.D11C.js
index b724ba5..c300c1f 100644
--- a/examples/hello.button.D11C.js
+++ b/examples/hello.button.D11C.js
@@ -30,22 +30,22 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.36, y+.41), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_05, {translate: pt(IC1.posX, IC1.padY("CLK")-.11), label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.18, IC1.padY("A08")), rotate: -90, label: 'IC2\n3.3'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX+.025, IC2.posY-.22), rotate: 90, label: 'C1\n1uF'});
-let S1 = board.add(button_6mm, {translate: pt(IC1.posX+.32, IC1.posY-.15), rotate: 90, label: 'S1'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.36, y+.41), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_05, {translate: pt(IC1.posX, IC1.padY("CLK")-.11), id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.18, IC1.padY("A08")), rotate: -90, id: 'IC2\n3.3'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX+.025, IC2.posY-.22), rotate: 90, id: 'C1\n1uF'});
+let S1 = board.add(button_6mm, {translate: pt(IC1.posX+.32, IC1.posY-.15), rotate: 90, id: 'S1'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -128,7 +128,7 @@ board.wire(path(IC2.pad("gnd"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -140,5 +140,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.button.t412.js b/examples/hello.button.t412.js
index 3184bfc..f498afd 100644
--- a/examples/hello.button.t412.js
+++ b/examples/hello.button.t412.js
@@ -29,18 +29,18 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny412, {translate: pt(x+.45, y+.44), label: 'IC1\nt412'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), label: 'C1 1uF'});
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.1), label: 'J1\nserial\n5V'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2\nUPDI'});
-let S1 = board.add(button_6mm, {translate: pt(J2.posX-.27, y+.2), rotate: 0, label: 'S1'});
+let IC1 = board.add(ATtiny412, {translate: pt(x+.45, y+.44), id: 'IC1\nt412'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), id: 'C1 1uF'});
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.1), id: 'J1\nserial\n5V'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2\nUPDI'});
+let S1 = board.add(button_6mm, {translate: pt(J2.posX-.27, y+.2), rotate: 0, id: 'S1'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -99,7 +99,7 @@ board.wire(path(S1.pad("L2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -111,5 +111,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.ftdi.44.2.js b/examples/hello.ftdi.44.2.js
index f106c42..fcfe0ed 100644
--- a/examples/hello.ftdi.44.2.js
+++ b/examples/hello.ftdi.44.2.js
@@ -32,26 +32,26 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.49, y+.56), label: 'IC1\nt44'});
+let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.49, y+.56), id: 'IC1\nt44'});
let VIC1 = board.add(via(2*rv, 2*rp), {translate: pt(IC1.padX("GND")+.08, IC1.padY("GND")+.02)});
-let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.22), rotate: 90, label: 'J1\nISP'});
+let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.22), rotate: 90, id: 'J1\nISP'});
let VJ12 = board.add(via(2*rv, 2*rp), {translate: pt(J1.padX("V")+.075, J1.padY("V"))});
let VJ16 = board.add(via(2*rv, 2*rp), {translate: pt(J1.padX("GND")-.075, J1.padY("GND"))});
-let J2 = board.add(header_FTDI, {translate: pt(x+width-.22, IC1.posY-.0), rotate: 0, label: 'J2 FTDI'});
+let J2 = board.add(header_FTDI, {translate: pt(x+width-.22, IC1.posY-.0), rotate: 0, id: 'J2 FTDI'});
let VJ2 = board.add(via(2*rv, 2*rp), {translate: pt(J2.padX("VCC")+.1, J2.padY("VCC"))});
-let XTAL1 = board.add(XTAL_EFOBM, {translate: pt(IC1.padX("PB3")-.2, IC1.padY("PA0")+.003), rotate: -90, label: 'XTAL1\n20 MHz'});
+let XTAL1 = board.add(XTAL_EFOBM, {translate: pt(IC1.padX("PB3")-.2, IC1.padY("PA0")+.003), rotate: -90, id: 'XTAL1\n20 MHz'});
let VXTAL = board.add(via(2*rv, 2*rp), {translate: pt(XTAL1.posX-.12, XTAL1.posY)});
-let R1 = board.add(R_1206, {translate: pt(IC1.padX("VCC"), IC1.padY("VCC")+.1), label: 'R1\n10k'});
+let R1 = board.add(R_1206, {translate: pt(IC1.padX("VCC"), IC1.padY("VCC")+.1), id: 'R1\n10k'});
let VR1 = board.add(via(2*rv, 2*rp), {translate: pt(R1.padX("1")-.08, R1.posY)});
-let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND"), R1.posY), label: 'C1\n1uF'});
+let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND"), R1.posY), id: 'C1\n1uF'});
let VC1 = board.add(via(2*rv, 2*rp), {translate: pt(C1.padX("1")-.025, C1.posY-.06)});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -148,7 +148,7 @@ board.wire(path(VR1.pad("via"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -160,5 +160,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.ftdi.44.js b/examples/hello.ftdi.44.js
index 411bf92..8d3afde 100644
--- a/examples/hello.ftdi.44.js
+++ b/examples/hello.ftdi.44.js
@@ -32,19 +32,19 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.47, y+.59), label: 'IC1\nt44'});
-let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.22), rotate: 90, label: 'J1\nISP'});
-let J2 = board.add(header_FTDI, {translate: pt(x+width-.22, IC1.posY-.0), rotate: 0, label: 'J2 FTDI'});
-let XTAL1 = board.add(XTAL_EFOBM, {translate: pt(IC1.padX("PB3")-.2, IC1.padY("PA0")+.003), rotate: -90, label: 'XTAL1\n20 MHz'});
-let R1 = board.add(R_1206, {translate: pt(IC1.padX("VCC"), IC1.padY("VCC")+.1), label: 'R1\n10k'});
-let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND"), R1.posY), label: 'C1\n1uF'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.47, y+.59), id: 'IC1\nt44'});
+let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.22), rotate: 90, id: 'J1\nISP'});
+let J2 = board.add(header_FTDI, {translate: pt(x+width-.22, IC1.posY-.0), rotate: 0, id: 'J2 FTDI'});
+let XTAL1 = board.add(XTAL_EFOBM, {translate: pt(IC1.padX("PB3")-.2, IC1.padY("PA0")+.003), rotate: -90, id: 'XTAL1\n20 MHz'});
+let R1 = board.add(R_1206, {translate: pt(IC1.padX("VCC"), IC1.padY("VCC")+.1), id: 'R1\n10k'});
+let C1 = board.add(C_1206, {translate: pt(IC1.padX("GND"), R1.posY), id: 'C1\n1uF'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -134,7 +134,7 @@ board.wire(path(J2.pad("GND"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -146,5 +146,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.ftdi.45.js b/examples/hello.ftdi.45.js
index 2c45863..23f842f 100644
--- a/examples/hello.ftdi.45.js
+++ b/examples/hello.ftdi.45.js
@@ -28,19 +28,19 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny45_SOIC, {translate: pt(x+.53, y+.3), rotate: -90, label: 'IC1\nt45'});
-let J1 = board.add(header_ISP, {translate: pt(IC1.posX-.31, IC1.posY-.02), rotate: 0, label: 'J1\nISP'});
-let R1 = board.add(R_1206, {translate: pt(IC1.padX("RST")+.09, IC1.posY), rotate: 90, label: 'R1\n10k'});
-let C1 = board.add(C_1206, {translate: pt(R1.posX+.1, R1.posY), rotate: 90, label: 'C1\n1uF'});
-let R2 = board.add(R_1206, {translate: pt((R1.posX+C1.posX)/2, R1.padY("1")-.1), label: 'R2 1k'});
-let J2 = board.add(header_FTDI, {translate: pt(x+width-.23, C1.posY+.05), label: 'J2 FTDI\n5V'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny45_SOIC, {translate: pt(x+.53, y+.3), rotate: -90, id: 'IC1\nt45'});
+let J1 = board.add(header_ISP, {translate: pt(IC1.posX-.31, IC1.posY-.02), rotate: 0, id: 'J1\nISP'});
+let R1 = board.add(R_1206, {translate: pt(IC1.padX("RST")+.09, IC1.posY), rotate: 90, id: 'R1\n10k'});
+let C1 = board.add(C_1206, {translate: pt(R1.posX+.1, R1.posY), rotate: 90, id: 'C1\n1uF'});
+let R2 = board.add(R_1206, {translate: pt((R1.posX+C1.posX)/2, R1.padY("1")-.1), id: 'R2 1k'});
+let J2 = board.add(header_FTDI, {translate: pt(x+width-.23, C1.posY+.05), id: 'J2 FTDI\n5V'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -119,7 +119,7 @@ board.wire(path(J2.pad("Rx"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -131,5 +131,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.mag.D11C.js b/examples/hello.mag.D11C.js
index d7e56f5..33b06a6 100644
--- a/examples/hello.mag.D11C.js
+++ b/examples/hello.mag.D11C.js
@@ -31,24 +31,24 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.5, y+.41), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_05, {translate: pt(IC1.posX, IC1.padY("CLK")-.11), label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.18, IC1.padY("A08")), rotate: -90, label: 'IC2\n3.3'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX-.04, IC2.posY-.15), label: 'C1 1uF'});
-let IC3 = board.add(Hall_SOT23, {translate: pt(IC2.posX-.13, IC2.posY), rotate: -90, label: 'IC3\n1324'});
-let R1 = board.add(R_1206, {translate: pt(C1.posX, C1.posY-.1), label: 'R1 4.99k'});
-let R2 = board.add(R_1206, {translate: pt(R1.posX, R1.posY-.1), label: 'R2 10k'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.5, y+.41), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_05, {translate: pt(IC1.posX, IC1.padY("CLK")-.11), id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.18, IC1.padY("A08")), rotate: -90, id: 'IC2\n3.3'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX-.04, IC2.posY-.15), id: 'C1 1uF'});
+let IC3 = board.add(Hall_SOT23, {translate: pt(IC2.posX-.13, IC2.posY), rotate: -90, id: 'IC3\n1324'});
+let R1 = board.add(R_1206, {translate: pt(C1.posX, C1.posY-.1), id: 'R1 4.99k'});
+let R2 = board.add(R_1206, {translate: pt(R1.posX, R1.posY-.1), id: 'R2 10k'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -146,7 +146,7 @@ board.wire(path(R2.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -158,5 +158,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.mag.t412.js b/examples/hello.mag.t412.js
index 7e95387..d2c51aa 100644
--- a/examples/hello.mag.t412.js
+++ b/examples/hello.mag.t412.js
@@ -29,18 +29,18 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny412, {translate: pt(x+.32, y+.44), label: 'IC1\nt412'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), label: 'C1 1uF'});
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.1), label: 'J1\nserial\n5V'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2\nUPDI'});
-let IC2 = board.add(Hall_SOT23, {translate: pt(J2.padX("GND")-.11, J2.posY), rotate: -90, label: "IC2\nA1324"});
+let IC1 = board.add(ATtiny412, {translate: pt(x+.32, y+.44), id: 'IC1\nt412'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), id: 'C1 1uF'});
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.1), id: 'J1\nserial\n5V'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2\nUPDI'});
+let IC2 = board.add(Hall_SOT23, {translate: pt(J2.padX("GND")-.11, J2.posY), rotate: -90, id: "IC2\nA1324"});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -105,7 +105,7 @@ board.wire(path(IC2.pad("gnd"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -117,5 +117,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.nRF24L01P.44.js b/examples/hello.nRF24L01P.44.js
index 31bfa6a..ddac628 100644
--- a/examples/hello.nRF24L01P.44.js
+++ b/examples/hello.nRF24L01P.44.js
@@ -31,22 +31,22 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.68, y+.63), label: 'IC1\nt44'});
-let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.22), rotate: 90, label: 'J1\nISP'});
-let J2 = board.add(header_FTDI, {translate: pt(x+width-.22, IC1.posY-.0), rotate: 0, label: 'J2 FTDI\n3.3V'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(J2.posX, J1.posY-.015), rotate: 180, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.12), label: 'C1 1uF'});
-let R1 = board.add(R_1206, {translate: pt(IC1.padX("VCC"), IC1.padY("VCC")+.1), label: 'R1\n10k'});
-let J3 = board.add(header_nRF24L01, {translate: pt(x+.22, IC1.posY+.05), label: 'J3\nnRF24L01'});
-let C2 = board.add(C_1206, {translate: pt(J3.posX, J3.padY("GND")-.1), label: 'C2 0.1uF'});
-let C3 = board.add(C_1206, {translate: pt(J3.posX, C2.posY-.1), label: 'C3 10uF'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.68, y+.63), id: 'IC1\nt44'});
+let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.22), rotate: 90, id: 'J1\nISP'});
+let J2 = board.add(header_FTDI, {translate: pt(x+width-.22, IC1.posY-.0), rotate: 0, id: 'J2 FTDI\n3.3V'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(J2.posX, J1.posY-.015), rotate: 180, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-.12), id: 'C1 1uF'});
+let R1 = board.add(R_1206, {translate: pt(IC1.padX("VCC"), IC1.padY("VCC")+.1), id: 'R1\n10k'});
+let J3 = board.add(header_nRF24L01, {translate: pt(x+.22, IC1.posY+.05), id: 'J3\nnRF24L01'});
+let C2 = board.add(C_1206, {translate: pt(J3.posX, J3.padY("GND")-.1), id: 'C2 0.1uF'});
+let C3 = board.add(C_1206, {translate: pt(J3.posX, C2.posY-.1), id: 'C3 10uF'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -196,7 +196,7 @@ board.wire(path(C3.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -208,5 +208,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.serial-UPDI.3.js b/examples/hello.serial-UPDI.3.js
index 0541a68..90518ce 100644
--- a/examples/hello.serial-UPDI.3.js
+++ b/examples/hello.serial-UPDI.3.js
@@ -27,16 +27,16 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, y+height/2), label: 'J1\nserial'});
-let J2 = board.add(header_UPDI_3_reverse, {translate: pt(x+.23, J1.padY("Rx")), label: 'J2\nUPDI'});
-let R1 = board.add(R_1206, {translate: pt(J2.posX, J1.padY("CTS")-.03), rotate: 90, label: 'R1\n4.99k'});
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, y+height/2), id: 'J1\nserial'});
+let J2 = board.add(header_UPDI_3_reverse, {translate: pt(x+.23, J1.padY("Rx")), id: 'J2\nUPDI'});
+let R1 = board.add(R_1206, {translate: pt(J2.posX, J1.padY("CTS")-.03), rotate: 90, id: 'R1\n4.99k'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -72,7 +72,7 @@ board.wire(path(J1.pad("Rx"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -84,5 +84,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.serial-UPDI.js b/examples/hello.serial-UPDI.js
index c017c1a..a36b6e7 100644
--- a/examples/hello.serial-UPDI.js
+++ b/examples/hello.serial-UPDI.js
@@ -27,16 +27,16 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, y+height/2), label: 'J1\nFTDI'});
-let J2 = board.add(header_UPDI_reverse, {translate: pt(x+.23, y+height/2), label: 'J2\nUPDI'});
-let R1 = board.add(R_1206, {translate: pt(J2.posX, J1.padY("GND")-.05), label: 'R1 4.99k'});
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, y+height/2), id: 'J1\nFTDI'});
+let J2 = board.add(header_UPDI_reverse, {translate: pt(x+.23, y+height/2), id: 'J2\nUPDI'});
+let R1 = board.add(R_1206, {translate: pt(J2.posX, J1.padY("GND")-.05), id: 'R1 4.99k'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -65,7 +65,7 @@ board.wire(path(R1.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -77,5 +77,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.servo-D11C.js b/examples/hello.servo-D11C.js
index 275e633..39d2094 100644
--- a/examples/hello.servo-D11C.js
+++ b/examples/hello.servo-D11C.js
@@ -33,24 +33,24 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+width-.68, y+.45), rotate: -90, label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.padX("CLK")-.14, IC1.posY), rotate: -90, label: 'J1\nSWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, y+height/2), rotate: 0, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A15"), IC1.padY("24-")-.18), rotate: 0, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX-.22, IC2.posY), label: 'C1\n1uF'});
-let R1 = board.add(R_1206, {translate: pt(IC1.padX("A04")-.04, IC2.posY), rotate: 90, label: 'R1\n1k'});
-let LED = board.add(LED_1206, {translate: pt(R1.posX+.1, R1.posY), rotate: -90, label: 'LED'});
-let J3 = board.add(header_servo_1H, {translate: pt(x+.23, y+height/2), label: 'J3\nservo'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+width-.68, y+.45), rotate: -90, id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.padX("CLK")-.14, IC1.posY), rotate: -90, id: 'J1\nSWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, y+height/2), rotate: 0, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A15"), IC1.padY("24-")-.18), rotate: 0, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX-.22, IC2.posY), id: 'C1\n1uF'});
+let R1 = board.add(R_1206, {translate: pt(IC1.padX("A04")-.04, IC2.posY), rotate: 90, id: 'R1\n1k'});
+let LED = board.add(LED_1206, {translate: pt(R1.posX+.1, R1.posY), rotate: -90, id: 'LED'});
+let J3 = board.add(header_servo_1H, {translate: pt(x+.23, y+height/2), id: 'J3\nservo'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 0.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 0.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 0.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 0.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -146,7 +146,7 @@ board.wire(path(J2.pad("GND"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -158,5 +158,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.servo.44.1.js b/examples/hello.servo.44.1.js
index a21b591..8f0f061 100644
--- a/examples/hello.servo.44.1.js
+++ b/examples/hello.servo.44.1.js
@@ -31,21 +31,21 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.56, y+.6), label: 'IC1\nt44'});
-let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.24), rotate: 90, label: 'J1\nISP'});
-let XTAL1 = board.add(XTAL_EFOBM, {translate: pt(IC1.padX("PB0")-.19, IC1.padY("PB0")), rotate: -90, label: 'XTAL1\n20MHz'});
-let R1 = board.add(R_1206, {translate: pt(XTAL1.posX-.14, XTAL1.posY), rotate: -90, label: 'R1\n10k'});
-let J2 = board.add(header_power, {translate: pt(x+.18, y+height-.1), label: 'J2\npower'});
-let IC2 = board.add(regulator_SOT223_1, {translate: pt(J2.posX+.37, J2.posY-.04), rotate: -90, label: 'IC2\n5V'});
-let C1 = board.add(C_1206, {translate: pt(J2.posX, J2.posY-.14), rotate: 0, label: 'C1\n22uF'});
-let J3 = board.add(header_servo, {translate: pt(J2.posX+.03, J1.posY+.05), label: 'J3\nservo'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.56, y+.6), id: 'IC1\nt44'});
+let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.24), rotate: 90, id: 'J1\nISP'});
+let XTAL1 = board.add(XTAL_EFOBM, {translate: pt(IC1.padX("PB0")-.19, IC1.padY("PB0")), rotate: -90, id: 'XTAL1\n20MHz'});
+let R1 = board.add(R_1206, {translate: pt(XTAL1.posX-.14, XTAL1.posY), rotate: -90, id: 'R1\n10k'});
+let J2 = board.add(header_power, {translate: pt(x+.18, y+height-.1), id: 'J2\npower'});
+let IC2 = board.add(regulator_SOT223_1, {translate: pt(J2.posX+.37, J2.posY-.04), rotate: -90, id: 'IC2\n5V'});
+let C1 = board.add(C_1206, {translate: pt(J2.posX, J2.posY-.14), rotate: 0, id: 'C1\n22uF'});
+let J3 = board.add(header_servo, {translate: pt(J2.posX+.03, J1.posY+.05), id: 'J3\nservo'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -157,7 +157,7 @@ board.wire(path(IC1.pad("PA6"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -169,5 +169,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.servo.44.js b/examples/hello.servo.44.js
index 63baec6..25d7a65 100644
--- a/examples/hello.servo.44.js
+++ b/examples/hello.servo.44.js
@@ -31,21 +31,21 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.56, y+.6), label: 'IC1\nt44'});
-let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.24), rotate: 90, label: 'J1\nISP'});
-let XTAL1 = board.add(XTAL_EFOBM, {translate: pt(IC1.padX("PB0")-.19, IC1.padY("PB0")), rotate: -90, label: 'XTAL1\n20MHz'});
-let R1 = board.add(R_1206, {translate: pt(XTAL1.posX-.14, XTAL1.posY), rotate: -90, label: 'R1\n10k'});
-let J2 = board.add(header_power, {translate: pt(x+.18, y+height-.14), label: 'J2\npower'});
-let IC2 = board.add(regulator_SOT223, {translate: pt(J2.posX+.37, J2.posY-.07), rotate: 180, label: 'IC2\n5V'});
-let C1 = board.add(C_1206, {translate: pt(J2.posX, J2.posY-.14), rotate: 0, label: 'C1\n10uF'});
-let J3 = board.add(header_servo, {translate: pt(J2.posX+.03, J1.posY+.05), label: 'J3\nservo'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.56, y+.6), id: 'IC1\nt44'});
+let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.24), rotate: 90, id: 'J1\nISP'});
+let XTAL1 = board.add(XTAL_EFOBM, {translate: pt(IC1.padX("PB0")-.19, IC1.padY("PB0")), rotate: -90, id: 'XTAL1\n20MHz'});
+let R1 = board.add(R_1206, {translate: pt(XTAL1.posX-.14, XTAL1.posY), rotate: -90, id: 'R1\n10k'});
+let J2 = board.add(header_power, {translate: pt(x+.18, y+height-.14), id: 'J2\npower'});
+let IC2 = board.add(regulator_SOT223, {translate: pt(J2.posX+.37, J2.posY-.07), rotate: 180, id: 'IC2\n5V'});
+let C1 = board.add(C_1206, {translate: pt(J2.posX, J2.posY-.14), rotate: 0, id: 'C1\n10uF'});
+let J3 = board.add(header_servo, {translate: pt(J2.posX+.03, J1.posY+.05), id: 'J3\nservo'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -160,7 +160,7 @@ board.wire(path(IC1.pad("PA6"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -172,5 +172,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.servo.t412.js b/examples/hello.servo.t412.js
index 851b193..46f1a27 100644
--- a/examples/hello.servo.t412.js
+++ b/examples/hello.servo.t412.js
@@ -28,17 +28,17 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny412, {translate: pt(x+.47, y+.43), label: 'IC1\nt412'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), label: 'C1 1uF'});
-let J1 = board.add(header_UPDI_5V, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J1\nUPDI'});
-let J2 = board.add(header_servo, {translate: pt(IC1.posX-.32, J1.posY), rotate: -90, label: 'J2\nservos'});
+let IC1 = board.add(ATtiny412, {translate: pt(x+.47, y+.43), id: 'IC1\nt412'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), id: 'C1 1uF'});
+let J1 = board.add(header_UPDI_5V, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J1\nUPDI'});
+let J2 = board.add(header_servo, {translate: pt(IC1.posX-.32, J1.posY), rotate: -90, id: 'J2\nservos'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -98,7 +98,7 @@ board.wire(path(IC1.pad("PA1"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -110,5 +110,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.speaker.D11C.js b/examples/hello.speaker.D11C.js
index 7b4bcc2..96609d8 100644
--- a/examples/hello.speaker.D11C.js
+++ b/examples/hello.speaker.D11C.js
@@ -33,24 +33,24 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+width-.68, y+.45), rotate: -90, label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.padX("CLK")-.14, IC1.posY), rotate: -90, label: 'J1\nSWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, y+height/2), rotate: 0, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05"), IC1.padY("24-")-.18), rotate: 0, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX-.22, IC2.posY), label: 'C1\n1uF'});
-let J3 = board.add(header_4, {translate: pt(J1.posX-.21, J1.posY), rotate: -90, label: 'J3\nspeaker'});
-let R1 = board.add(R_1206, {translate: pt(C1.posX-.21, C1.posY), label: 'R1\n0'});
-let T1 = board.add(NMOSFET_SOT23, {translate: pt(J3.posX, J3.posY-.3), rotate: 90, label: 'T1\nN'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+width-.68, y+.45), rotate: -90, id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.padX("CLK")-.14, IC1.posY), rotate: -90, id: 'J1\nSWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, y+height/2), rotate: 0, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05"), IC1.padY("24-")-.18), rotate: 0, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX-.22, IC2.posY), id: 'C1\n1uF'});
+let J3 = board.add(header_4, {translate: pt(J1.posX-.21, J1.posY), rotate: -90, id: 'J3\nspeaker'});
+let R1 = board.add(R_1206, {translate: pt(C1.posX-.21, C1.posY), id: 'R1\n0'});
+let T1 = board.add(NMOSFET_SOT23, {translate: pt(J3.posX, J3.posY-.3), rotate: 90, id: 'T1\nN'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 0.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 0.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 0.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 0.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -157,7 +157,7 @@ board.wire(path([T1.padX("S")-.02, y+.03],
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -169,5 +169,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.stepper.bipolar.D11C.js b/examples/hello.stepper.bipolar.D11C.js
index e6221d5..6fdec6b 100644
--- a/examples/hello.stepper.bipolar.D11C.js
+++ b/examples/hello.stepper.bipolar.D11C.js
@@ -34,30 +34,30 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+width-.95, y+.3), rotate: -90, label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.padX("CLK")-.14, IC1.posY), rotate: -90, label: 'J1\nSWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, y+height/2), rotate: 0, label: 'J2\nUSB'});
-let IC2 = board.add(A4953_SOICN, {translate: pt(IC1.posX+.17, IC1.posY+.49), rotate: 90, label: 'IC2\nTB67H451FNG'});
-let IC3 = board.add(regulator_SOT23, {translate: pt(IC1.posX+.37, IC1.posY+.15), rotate: 90, label: 'IC3\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC3.posX-.11, IC3.posY), rotate: 90, label: 'C1\n1uF'});
-let C2 = board.add(C_1206, {translate: pt(IC2.posX+.16, IC2.posY+.06), rotate: 90, label: 'C2\n.1'});
-let C3 = board.add(C_1206, {translate: pt(IC2.posX+.26, IC2.posY+.06), rotate: 90, label: 'C3\n10uF'});
-let IC4 = board.add(A4953_SOICN, {translate: pt(IC2.posX-.42, IC2.posY), rotate: 90, label: 'IC4\nTB67H451FNG'});
-let C4 = board.add(C_1206, {translate: pt(IC4.posX+.16, IC4.posY+.02), rotate: 90, label: '.1'});
-let C5 = board.add(C_1206, {translate: pt(IC4.posX+.26, C4.posY), rotate: 90, label: '10uF'});
-let J3 = board.add(header_4H, {translate: pt(x+.23, y+height/2), rotate: 180, label: 'J3\nstepper'});
-let V1 = board.add(via(2*rv, 2*rp), {translate: pt(C4.posX, C4.padY("2")+.09), label: 'V1'});
-let V2 = board.add(via(2*rv, 2*rp), {translate: pt(C2.posX, C4.padY("2")+.18), label: 'V2'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+width-.95, y+.3), rotate: -90, id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4_1, {translate: pt(IC1.padX("CLK")-.14, IC1.posY), rotate: -90, id: 'J1\nSWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(x+width-.29, y+height/2), rotate: 0, id: 'J2\nUSB'});
+let IC2 = board.add(A4953_SOICN, {translate: pt(IC1.posX+.17, IC1.posY+.49), rotate: 90, id: 'IC2\nTB67H451FNG'});
+let IC3 = board.add(regulator_SOT23, {translate: pt(IC1.posX+.37, IC1.posY+.15), rotate: 90, id: 'IC3\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC3.posX-.11, IC3.posY), rotate: 90, id: 'C1\n1uF'});
+let C2 = board.add(C_1206, {translate: pt(IC2.posX+.16, IC2.posY+.06), rotate: 90, id: 'C2\n.1'});
+let C3 = board.add(C_1206, {translate: pt(IC2.posX+.26, IC2.posY+.06), rotate: 90, id: 'C3\n10uF'});
+let IC4 = board.add(A4953_SOICN, {translate: pt(IC2.posX-.42, IC2.posY), rotate: 90, id: 'IC4\nTB67H451FNG'});
+let C4 = board.add(C_1206, {translate: pt(IC4.posX+.16, IC4.posY+.02), rotate: 90, id: '.1'});
+let C5 = board.add(C_1206, {translate: pt(IC4.posX+.26, C4.posY), rotate: 90, id: '10uF'});
+let J3 = board.add(header_4H, {translate: pt(x+.23, y+height/2), rotate: 180, id: 'J3\nstepper'});
+let V1 = board.add(via(2*rv, 2*rp), {translate: pt(C4.posX, C4.padY("2")+.09), id: 'V1'});
+let V2 = board.add(via(2*rv, 2*rp), {translate: pt(C2.posX, C4.padY("2")+.18), id: 'V2'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 0.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 0.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 0.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 0.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -246,7 +246,7 @@ board.wire(path(V1.pad("via"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -258,5 +258,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.t1614.echo.js b/examples/hello.t1614.echo.js
index 5fef9da..0e590f2 100644
--- a/examples/hello.t1614.echo.js
+++ b/examples/hello.t1614.echo.js
@@ -28,17 +28,17 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny1614, {translate: pt(x+.21, y+.5), label: 'IC1\nt1614'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), label: 'C1 1uF'});
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.05), label: 'J1\nFTDI'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2 UPDI'});
+let IC1 = board.add(ATtiny1614, {translate: pt(x+.21, y+.5), id: 'IC1\nt1614'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), id: 'C1 1uF'});
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.05), id: 'J1\nFTDI'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2 UPDI'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -89,7 +89,7 @@ board.wire(path(IC1.pad("RB3"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -101,5 +101,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.t3216.echo.js b/examples/hello.t3216.echo.js
index 179329b..579d9d3 100644
--- a/examples/hello.t3216.echo.js
+++ b/examples/hello.t3216.echo.js
@@ -28,17 +28,17 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny3216, {translate: pt(x+.3, y+.58), label: 'IC1\nt3216'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.09), label: 'C1 1uF'});
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.05), label: 'J1\nFTDI'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2 UPDI'});
+let IC1 = board.add(ATtiny3216, {translate: pt(x+.3, y+.58), id: 'IC1\nt3216'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.09), id: 'C1 1uF'});
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.05), id: 'J1\nFTDI'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2 UPDI'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -87,7 +87,7 @@ board.wire(path(IC1.pad("TB2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -99,5 +99,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.t412.3.blink.js b/examples/hello.t412.3.blink.js
index 2824ee3..2d02b35 100644
--- a/examples/hello.t412.3.blink.js
+++ b/examples/hello.t412.3.blink.js
@@ -29,18 +29,18 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny412, {translate: pt(x+.18, y+.43), label: 'IC1\nt412'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), label: 'C1 1uF'});
-let J1 = board.add(header_UPDI_3, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J1\nUPDI'});
-let R1 = board.add(R_1206, {translate: pt(IC1.posX+.23, IC1.posY-.01), rotate: 90, label: 'R1\n1k'});
-let LED1 = board.add(LED_1206, {translate: pt(R1.posX, R1.posY-.23), rotate: -90, label: 'LED1'});
+let IC1 = board.add(ATtiny412, {translate: pt(x+.18, y+.43), id: 'IC1\nt412'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), id: 'C1 1uF'});
+let J1 = board.add(header_UPDI_3, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J1\nUPDI'});
+let R1 = board.add(R_1206, {translate: pt(IC1.posX+.23, IC1.posY-.01), rotate: 90, id: 'R1\n1k'});
+let LED1 = board.add(LED_1206, {translate: pt(R1.posX, R1.posY-.23), rotate: -90, id: 'LED1'});
-let interior = geo.path(path([x, y+height],
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -84,7 +84,7 @@ board.wire(path(LED1.pad("A"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -96,5 +96,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.t412.blink.js b/examples/hello.t412.blink.js
index 5a969a4..a86cfd8 100644
--- a/examples/hello.t412.blink.js
+++ b/examples/hello.t412.blink.js
@@ -29,19 +29,19 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny412, {translate: pt(x+.19, y+.36), label: 'IC1\nt412'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), label: 'C1 1uF'});
-let R1 = board.add(R_1206, {translate: pt(IC1.posX, IC1.padY("PA1")-.08), label: 'R1 1k'});
-let LED1 = board.add(LED_1206, {translate: pt(R1.posX, R1.posY-.1), label: 'LED1'});
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.05), label: 'J1\nFTDI'});
-let R2 = board.add(R_1206, {translate: pt(J1.posX-.12, J1.padY("Tx")-.05), rotate: 90, label: 'R2\n4.99k'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny412, {translate: pt(x+.19, y+.36), id: 'IC1\nt412'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), id: 'C1 1uF'});
+let R1 = board.add(R_1206, {translate: pt(IC1.posX, IC1.padY("PA1")-.08), id: 'R1 1k'});
+let LED1 = board.add(LED_1206, {translate: pt(R1.posX, R1.posY-.1), id: 'LED1'});
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.05), id: 'J1\nFTDI'});
+let R2 = board.add(R_1206, {translate: pt(J1.posX-.12, J1.padY("Tx")-.05), rotate: 90, id: 'R2\n4.99k'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -95,7 +95,7 @@ board.wire(path(R2.pad("2"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -107,5 +107,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.txrx.t1624.js b/examples/hello.txrx.t1624.js
index 936c157..d6b4624 100644
--- a/examples/hello.txrx.t1624.js
+++ b/examples/hello.txrx.t1624.js
@@ -30,20 +30,20 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny1614, {translate: pt(x+width-.5, y+.51), label: 'IC1\nt1624'});
-let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), label: 'C1 1uF'});
-let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.1), label: 'J1\nserial'});
-let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, label: 'J2\nUPDI'});
-let J3 = board.add(header_txrx, {translate: pt(x+.13, y+.41), rotate: 90, label: 'J3\nTxRx'});
-let R1 = board.add(R_1206, {translate: pt(J3.posX, J3.posY+.22), label: 'R1 1M'});
-let R2 = board.add(R_1206, {translate: pt(R1.posX, R1.posY+.1), label: 'R2 1M'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny1614, {translate: pt(x+width-.5, y+.51), id: 'IC1\nt1624'});
+let C1 = board.add(C_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.08), id: 'C1 1uF'});
+let J1 = board.add(header_FTDI, {translate: pt(x+width-.23, IC1.posY-.1), id: 'J1\nserial'});
+let J2 = board.add(header_UPDI, {translate: pt(IC1.posX, y+.23), rotate: 90, id: 'J2\nUPDI'});
+let J3 = board.add(header_txrx, {translate: pt(x+.13, y+.41), rotate: 90, id: 'J3\nTxRx'});
+let R1 = board.add(R_1206, {translate: pt(J3.posX, J3.posY+.22), id: 'R1 1M'});
+let R2 = board.add(R_1206, {translate: pt(R1.posX, R1.posY+.1), id: 'R2 1M'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -136,7 +136,7 @@ board.wire(path(C1.pad("1"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -148,5 +148,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.uSD.44.js b/examples/hello.uSD.44.js
index 6706bb5..07782f0 100644
--- a/examples/hello.uSD.44.js
+++ b/examples/hello.uSD.44.js
@@ -31,20 +31,20 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.86, y+.59), label: 'IC1\nt44'});
-let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.22), rotate: 90, label: 'J1\nISP'});
-let J2 = board.add(header_FTDI, {translate: pt(x+width-.22, IC1.posY-.0), rotate: 0, label: 'J2 FTDI'});
-let R1 = board.add(R_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.1), label: 'R1\n10k'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(J2.posX-.16, J2.padY("CTS")), rotate: 90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX-.12, IC2.posY), rotate: 90, label: 'C1\n1uF'});
-let J3 = board.add(microSD, {translate: pt(IC1.posX-.42, IC1.posY-.1), rotate: -90, label: 'J3\nmicroSD'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(ATtiny44_SOICN, {translate: pt(x+.86, y+.59), id: 'IC1\nt44'});
+let J1 = board.add(header_ISP, {translate: pt(IC1.posX+.05, IC1.padY("PA6")-.22), rotate: 90, id: 'J1\nISP'});
+let J2 = board.add(header_FTDI, {translate: pt(x+width-.22, IC1.posY-.0), rotate: 0, id: 'J2 FTDI'});
+let R1 = board.add(R_1206, {translate: pt(IC1.posX, IC1.padY("VCC")+.1), id: 'R1\n10k'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(J2.posX-.16, J2.padY("CTS")), rotate: 90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX-.12, IC2.posY), rotate: 90, id: 'C1\n1uF'});
+let J3 = board.add(microSD, {translate: pt(IC1.posX-.42, IC1.posY-.1), rotate: -90, id: 'J3\nmicroSD'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -174,7 +174,7 @@ board.wire(path(J3.pad("MISO"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -186,5 +186,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/hello.uSD.D11C.js b/examples/hello.uSD.D11C.js
index 09b301a..184c481 100644
--- a/examples/hello.uSD.D11C.js
+++ b/examples/hello.uSD.D11C.js
@@ -31,24 +31,24 @@ let board = new PCB();
/* -- ADD_COMPONENTS -- */
-let IC1 = board.add(SAMD11C, {translate: pt(x+.95, y+.56), label: 'IC1\nD11C'});
-let J1 = board.add(header_SWD_4, {translate: pt(IC1.posX, IC1.padY("CLK")-.13), label: 'J1 SWD'});
-let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, label: 'J2\nUSB'});
-let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.77, IC1.padY("CLK")-.17), rotate: -90, label: 'IC2\n3.3V'});
-let C1 = board.add(C_1206, {translate: pt(IC2.posX+.04, IC2.posY-.15), rotate: 0, label: 'C1 1uF'});
-let J3 = board.add(microSD, {translate: pt(IC1.posX-.4, IC1.posY-.13), rotate: -90, label: 'J3 uSD'});
-let R1 = board.add(R_1206, {translate: pt(J3.padX("GND")-.11, J3.padY("GND")+.03), rotate: 90, label: 'R1\n0'});
-let R2 = board.add(R_1206, {translate: pt(IC1.padX("VDD")+.1, IC1.padY("VDD")), rotate: 90, label: 'R2\n0'});
-
-let interior = geo.path(path([x, y+height],
+let IC1 = board.add(SAMD11C, {translate: pt(x+.95, y+.56), id: 'IC1\nD11C'});
+let J1 = board.add(header_SWD_4, {translate: pt(IC1.posX, IC1.padY("CLK")-.13), id: 'J1 SWD'});
+let J2 = board.add(USB_A_plug, {translate: pt(IC1.posX, y+height-.29), rotate: 90, id: 'J2\nUSB'});
+let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A05")-.77, IC1.padY("CLK")-.17), rotate: -90, id: 'IC2\n3.3V'});
+let C1 = board.add(C_1206, {translate: pt(IC2.posX+.04, IC2.posY-.15), rotate: 0, id: 'C1 1uF'});
+let J3 = board.add(microSD, {translate: pt(IC1.posX-.4, IC1.posY-.13), rotate: -90, id: 'J3 uSD'});
+let R1 = board.add(R_1206, {translate: pt(J3.padX("GND")-.11, J3.padY("GND")+.03), rotate: 90, id: 'R1\n0'});
+let R2 = board.add(R_1206, {translate: pt(IC1.padX("VDD")+.1, IC1.padY("VDD")), rotate: 90, id: 'R2\n0'});
+
+let outline = geo.path(path([x, y+height],
[x+width, y+height],
[x+width, y],
[x, y]));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
-geo.difference(interior, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]), 90.00000001, J2.pos));
+geo.difference(outline, geo.rotate(geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]), 90.00000001, J2.pos));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -155,7 +155,7 @@ board.wire(path(IC1.pad("A04"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#be7a27cc",
"B.Mask": "#ff814bff",
@@ -167,5 +167,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/qr-quine.js b/examples/qr-quine.js
index 5f681e5..63cf12b 100644
--- a/examples/qr-quine.js
+++ b/examples/qr-quine.js
@@ -39,7 +39,7 @@ const border = 0.05 // rendering border
/* -- DECLARE_PCB -- */
let board = new PCB();
-let interior = geo.translate(geo.rectangle(width, height), [x+width/2, y+height/2]);
+let outline = geo.translate(geo.rectangle(width, height), [x+width/2, y+height/2]);
/* -- ADD_COMPONENTS -- */
@@ -51,11 +51,11 @@ let C2 = board.add(C_1206, {translate: pt(IC1.padX("A07")-.02, IC1.padY("VAN")-.
let IC2 = board.add(regulator_SOT23, {translate: pt(C2.posX-.11, C2.posY), rotate: -90, name: 'IC2\n3.3V'});
board.add(qr_code, { translate: pt(0.8, 1.5), rotate: 0, name: "qr_code" })
-geo.difference(interior, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]));
-geo.difference(interior, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]));
-geo.union(interior, geo.translate(geo.rectangle(0.5, 1.05), pt(0.833, 1.525)));
+geo.difference(outline, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, 5.12+J2.posY]));
+geo.difference(outline, geo.translate(geo.rectangle(1.05, 9.76), [0.475+J2.posX, -5.12+J2.posY]));
+geo.union(outline, geo.translate(geo.rectangle(0.5, 1.05), pt(0.833, 1.525)));
-board.addShape("interior", interior);
+board.addShape("outline", outline);
/* -- ADD_WIRES -- */
@@ -153,7 +153,7 @@ board.wire(path(IC2.pad("gnd"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#ff8c00cc",
"drill": "#ff3300e5",
@@ -164,5 +164,5 @@ renderPCB({
x: [x-border - 0.43, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/scf-qr-spline.js b/examples/scf-qr-spline.js
index bf104c9..fc4ca6b 100644
--- a/examples/scf-qr-spline.js
+++ b/examples/scf-qr-spline.js
@@ -76,10 +76,10 @@ let J2 = board.add(USB_A_plug, {translate: pt(-0.05916114, 0.01358479), rotate:
let IC2 = board.add(regulator_SOT23, {translate: pt(IC1.padX("A04")+.15, IC1.padY("A08")-.005), rotate: 90, name: 'IC2\n3.3V'});
let C1 = board.add(C_1206, {translate: pt(IC2.posX, IC2.posY-0.2), rotate: 90, name: 'C1\n1uF'});
-let interior = geo.translate(geo.rectangle(0.48, 0.58), [J2.posX, J2.posY]);
+let outline = geo.translate(geo.rectangle(0.48, 0.58), [J2.posX, J2.posY]);
-let interior2 = path([-0.2, -0.04],
+let outline2 = path([-0.2, -0.04],
["bezier", [-3.7, -0.10],
[0.42, 0.17],
[-4.89, -4.05],
@@ -89,8 +89,8 @@ let interior2 = path([-0.2, -0.04],
[0.0, -0.04]],
[0.2, -0.04]);
-board.addShape("interior", interior);
-board.addShape("interior", interior2);
+board.addShape("outline", outline);
+board.addShape("outline", outline2);
/* -- ADD_WIRES -- */
board.wire(path(J1.pad("CLK"),
@@ -192,7 +192,7 @@ board.wire(path(J2.pad("5V"),
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#ff8c00cc",
"drill": "#ff3300e5",
@@ -203,5 +203,5 @@ renderPCB({
x: [x-border, x+width+border],
y: [y-border, y+height+border]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/test_footprint.js b/examples/test_footprint.js
index 58877d8..9ad6d5a 100644
--- a/examples/test_footprint.js
+++ b/examples/test_footprint.js
@@ -40,7 +40,7 @@ test_comp1 = board.add(test_footprint, {translate: pt(0.35, 0.65), name: "COMP1"
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#ff8c00cc",
"drill": "#ff3300e5",
@@ -51,5 +51,5 @@ renderPCB({
x: [0, 1],
y: [0, 1]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/examples/test_wires.js b/examples/test_wires.js
index 905248e..6f5c440 100644
--- a/examples/test_wires.js
+++ b/examples/test_wires.js
@@ -86,7 +86,7 @@ board.wire(path(
renderPCB({
pcb: board,
layerColors: {
- "interior": "#002d00ff",
+ "outline": "#002d00ff",
"B.Cu": "#ff4c007f",
"F.Cu": "#ff8c00cc",
//"padLabels": "#ffff99e5",
@@ -96,5 +96,5 @@ renderPCB({
x: [0, 1],
y: [0, 1]
},
- mm_per_unit: 25.4
+ mmPerUnit: 25.4
})
diff --git a/geogram/fillet.js b/geogram/fillet.js
index 96d0768..c628701 100644
--- a/geogram/fillet.js
+++ b/geogram/fillet.js
@@ -1,106 +1,137 @@
-const overlap = (p1, p2) => length(p1, p2) < 0.000001;
-const length = ([x1, y1], [x2, y2]) => Math.sqrt((x2-x1)**2 + (y2-y1)**2);
-const magDiff = (p0, p1) => Math.sqrt(
- (p1[0] - p0[0])**2 +
- (p1[1] - p0[1])**2
-)
-const normDiff = (p0, p1) => {
- const m = magDiff(p0, p1);
+export function fillet(shape, index, radius) {
- return [ (p1[0] - p0[0])/m, (p1[1] - p0[1])/m ];
-}
+ if (typeof index === "number") index = [index];
-const norm = vec => {
- const mag = Math.sqrt(vec[0]**2 + vec[1]**2);
+ let cornerIndex = 0;
- return [ vec[0]/mag, vec[1]/mag ];
-}
+ let final = [];
-const slerp = (t, p0, p1, angle) => {
- const factor1 = Math.sin(angle*(1-t))/Math.sin(angle);
- const factor2 = Math.sin(angle*t)/Math.sin(angle);
- return [p0[0]*factor1 + p1[0]*factor2, p0[1]*factor1 + p1[1]*factor2]
-}
+ for (const path of shape) {
-export function fillet(shape, index, radius) {
+ final.push([]);
+
+ for (let i = 1; i < path.length - 1; i++) {
+
+ let prevPt = path[i - 1];
+ let pt = path[i];
+ let nextPt = path[i + 1];
+
+ if (i === 1) final.at(-1).push(prevPt);
+
+ if (!index.includes(cornerIndex)) {
+ final.at(-1).push(pt);
+ if (i === path.length - 2) final.at(-1).push(nextPt);
+
+ cornerIndex++;
+
+ continue;
+ }
- let [ _, radius, pt ] = cmd;
+ cornerIndex++;
- if (radius < 0) radius = 0.00000001;
+ if (radius < 0) radius = 0.00000001;
+ if (overlap(pt, prevPt) || overlap(pt, nextPt)) continue;
- if (prevPt && nextPt) return;
- if (overlap(pt, prevPt) || overlap(pt, nextPt)) return;
+ const prevNorm = normDiff(pt, prevPt);
+ const nextNorm = normDiff(pt, nextPt);
- const prevNorm = normDiff(pt, prevPt);
- const nextNorm = normDiff(pt, nextPt);
+ const angle = Math.acos(
+ (prevNorm[0] * nextNorm[0]) +
+ (prevNorm[1] * nextNorm[1])
+ )
- const angle = Math.acos(
- (prevNorm[0] * nextNorm[0]) +
- (prevNorm[1] * nextNorm[1])
- )
+ let dist = radius/Math.tan(angle/2);
- let dist = radius/Math.tan(angle/2);
+ const maxStartDist = length(prevPt, pt);
+ const maxEndDist = length(nextPt, pt);
- const maxStartDist = length(prevPt, pt);
- const maxEndDist = length(nextPt, pt);
+ dist = Math.min(maxStartDist, maxEndDist, dist);
+ radius = Math.min(dist*Math.tan(angle/2), radius);
- dist = Math.min(maxStartDist, maxEndDist, dist);
- radius = Math.min(dist*Math.tan(angle/2), radius);
+ const start = [
+ pt[0] + prevNorm[0]*dist,
+ pt[1] + prevNorm[1]*dist
+ ]
- const start = [
- pt[0] + prevNorm[0]*dist,
- pt[1] + prevNorm[1]*dist
- ]
+ const end = [
+ pt[0] + nextNorm[0]*dist,
+ pt[1] + nextNorm[1]*dist,
+ ]
- const end = [
- pt[0] + nextNorm[0]*dist,
- pt[1] + nextNorm[1]*dist,
- ]
+ const newPts = [];
- const newPts = [];
- // newPts.push(start);
+ const midNorm = norm([
+ (prevNorm[0] + nextNorm[0]),
+ (prevNorm[1] + nextNorm[1])
+ ]);
- const midNorm = norm([
- (prevNorm[0] + nextNorm[0]),
- (prevNorm[1] + nextNorm[1])
- ]);
+ const midDist = Math.sqrt(dist**2 + radius**2);
- const midDist = Math.sqrt(dist**2 + radius**2);
+ const midPt = [
+ pt[0] + midNorm[0]*midDist,
+ pt[1] + midNorm[1]*midDist
+ ];
- const midPt = [
- pt[0] + midNorm[0]*midDist,
- pt[1] + midNorm[1]*midDist
- ];
+ const aStart = Math.atan2(
+ start[0] - midPt[0],
+ start[1] - midPt[1],
+ )
- const aStart = Math.atan2(
- start[0] - midPt[0],
- start[1] - midPt[1],
- )
+ const arcAngle = Math.PI - angle;
- const arcAngle = Math.PI - angle;
+ const startMid = [
+ start[0] - midPt[0],
+ start[1] - midPt[1]
+ ]
- const startMid = [
- start[0] - midPt[0],
- start[1] - midPt[1]
- ]
+ const endMid = [
+ end[0] - midPt[0],
+ end[1] - midPt[1]
+ ]
- const endMid = [
- end[0] - midPt[0],
- end[1] - midPt[1]
- ]
+ for (let i = 1/20; i < 1; i += 1/20) {
+ const [ x, y ] = slerp(i, startMid, endMid, arcAngle)
- for (let i = 1/20; i < 1; i += 1/20) {
- const [ x, y ] = slerp(i, startMid, endMid, arcAngle)
+ let pt = [
+ midPt[0] + x,
+ midPt[1] + y
+ ]
- let pt = [
- midPt[0] + x,
- midPt[1] + y
- ]
+ newPts.push(pt);
+ }
- newPts.push(pt);
+ final.at(-1).push(...newPts);
+
+ if (i === path.length - 2) final.at(-1).push(nextPt);
+ }
}
+ while (shape.length) shape.pop();
+ final.forEach(el => shape.push(el));
+
+ return shape;
+}
- // newPts.push(end);
- pts.push(...newPts);
+const overlap = (p1, p2) => length(p1, p2) < 0.000001;
+const length = ([x1, y1], [x2, y2]) => Math.sqrt((x2-x1)**2 + (y2-y1)**2);
+const magDiff = (p0, p1) => Math.sqrt(
+ (p1[0] - p0[0])**2 +
+ (p1[1] - p0[1])**2
+)
+const normDiff = (p0, p1) => {
+ const m = magDiff(p0, p1);
+
+ return [ (p1[0] - p0[0])/m, (p1[1] - p0[1])/m ];
+}
+
+const norm = vec => {
+ const mag = Math.sqrt(vec[0]**2 + vec[1]**2);
+
+ return [ vec[0]/mag, vec[1]/mag ];
+}
+
+const slerp = (t, p0, p1, angle) => {
+ const factor1 = Math.sin(angle*(1-t))/Math.sin(angle);
+ const factor2 = Math.sin(angle*t)/Math.sin(angle);
+ return [p0[0]*factor1 + p1[0]*factor2, p0[1]*factor1 + p1[1]*factor2]
}
diff --git a/geogram/index.js b/geogram/index.js
index 4ce49b0..5056b71 100644
--- a/geogram/index.js
+++ b/geogram/index.js
@@ -13,6 +13,8 @@ import { extrema } from "./extrema.js";
import { turnForward } from "./turnForward.js";
import { path } from "./path.js";
import { path as path2 } from "./path2.js";
+import { fillet } from "./fillet.js";
+
const overlap = (p0, p1) => 0.00000001 > Math.abs(p0[0] - p1[0]) + Math.abs(p0[1] - p1[1]);
const isClosed = shape => {
@@ -217,8 +219,8 @@ export {
reverse,
thicken,
copyPaste,
- offset,
- offset2,
+ offset, // TODO: how do these differ? one has issues flattening
+ offset2, // TODO: how do these differ? one has issues flattening
outline,
expand,
intersect,
@@ -240,5 +242,8 @@ export {
path,
path2,
boolean,
- convertPtType
+ convertPtType,
+ transform,
+ copy,
+ fillet
}
diff --git a/geogram/roundCorners.js b/geogram/roundCorners.js
index 844a4b3..6533e26 100644
--- a/geogram/roundCorners.js
+++ b/geogram/roundCorners.js
@@ -1,4 +1,4 @@
-export function roundCorners(shape) {
+export function roundCorners(shape, cornerIndexs, radius) {
-}
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/geogram/transform.js b/geogram/transform.js
index dc0af53..3283d1c 100644
--- a/geogram/transform.js
+++ b/geogram/transform.js
@@ -2,13 +2,20 @@ const mapPtFromRule = rule => ([ x, y ]) => {
const [ a, b, c, d, tx, ty ] = getMatrixRule(rule);
- return {
- x: x * a + y * c + tx,
- y: x * b + y * d + ty
- };
+ return [
+ x * a + y * c + tx,
+ x * b + y * d + ty
+ ];
}
function getMatrixRule({ dx, dy, sx, sy, rotate, skew }) {
+ dx ??= 0
+ dy ??= 0
+ sx ??= 1
+ sy ??= 1
+ rotate ??= 0
+ skew ??= 0
+
rotate = rotate/180*Math.PI;
return getMatrix(dx, dy, sx, sy, rotate, skew);
}
@@ -60,7 +67,6 @@ function getMatrix(dx, dy, sx, sy, angle, skewness) {
export function transform(shape, transformations) {
const fn = mapPtFromRule(transformations);
shape.forEach((pl, i) => {
- console.log(pl.map(fn));
shape[i] = pl.map(fn);
})
diff --git a/js/astAnalysis.js b/js/astAnalysis.js
index 8906fe1..d9ee433 100644
--- a/js/astAnalysis.js
+++ b/js/astAnalysis.js
@@ -1,5 +1,3 @@
-// import * as esprima from 'esprima';
-
const FUNCTIONS_STATIC_INFO = [
"pt",
"path",
diff --git a/js/checkConnectivity.js b/js/checkConnectivity.js
index c48ff97..8fb5cae 100644
--- a/js/checkConnectivity.js
+++ b/js/checkConnectivity.js
@@ -32,7 +32,7 @@ export function checkConnectivity(pcb) {
}
})
- // compare islands to board.netList
+ // compare islands to board.netlist
console.log(islands);
}
diff --git a/js/components/footprint-editor/footprint-editor-v0.js b/js/components/footprint-editor/footprint-editor-v0.js
new file mode 100644
index 0000000..b1d22a4
--- /dev/null
+++ b/js/components/footprint-editor/footprint-editor-v0.js
@@ -0,0 +1,966 @@
+import { createListener } from "../../events.js";
+import { html, render, svg } from "lit-html";
+import * as icons from "./icons.js";
+import { copy, pathD, getPathData, extrema, transform } from "../../../geogram/index.js";
+import { testFootprint } from "./testFootprint.js";
+
+class FootprintEditor extends HTMLElement {
+ static get observedAttributes() {
+ return ["footprint"];
+ }
+
+ attributeChangedCallback(name, oldValue, newValue) {
+ if (name === "footprint") {
+ this.footprint = newValue;
+ this.render();
+ }
+ }
+
+ set footprint(newVal) {
+ this._footprint = JSON.parse(newVal);
+
+ for (const pad in this.footprint) {
+ const data = this.footprint[pad];
+ this.transformations[pad] = {
+ _path: pathD([], data.shape),
+ translateX: 0,
+ translateY: 0,
+ scaleX: 1,
+ scaleY: 1,
+ rotate: 0
+ }
+ }
+
+ }
+
+ get footprint() {
+ return this._footprint;
+ }
+
+ constructor() {
+ super();
+
+ this.initialized = false;
+ this._footprint = this.getAttribute("footprint") ?? "";
+ this.selectedPad = null;
+
+ this.transformations = {};
+ this.selectedGeometry = new Set();
+
+ this.render();
+
+ this.panZoomFns = addPanZoom(
+ this.querySelector("svg"),
+ ({ scale, pointX, pointY }) => {
+ const els = this.querySelectorAll("[data-circle-handle]");
+
+ for (const el of els) {
+ el.setAttribute("r", 6 / scale);
+ }
+
+ const fixedScales = this.querySelectorAll("[data-fixed-scale]");
+ for (const el of fixedScales) {
+ el.style.transformOrigin = `${0}px ${0}px`;
+ el.style.transform = `translate(${pointX}px, ${pointY}px)`;
+ }
+
+ // this.render();
+ const transformHandle = this.querySelector("#transform-handle");
+ if (transformHandle) {
+ const centerX = Number(transformHandle.dataset.centerX);
+ const centerY = Number(transformHandle.dataset.centerY);
+ transformHandle.style=`transform:
+ translate(
+ ${centerX*scale + pointX}px,
+ ${centerY*scale + pointY}px
+ )`;
+ }
+
+ }
+ );
+
+ addPtDragging(this, this.panZoomFns);
+
+ const listener = createListener(this);
+
+ listener("click", "[data-trigger-click-layer]", (e) => {
+ const pad = e.target.closest("[data-parent-pad]");
+ const { padname } = pad.dataset;
+
+ const newLayersStr = prompt(
+ "Please input new layers",
+ this.footprint[padname].layers.join(" "),
+ );
+
+ // check that layers are a list and strings
+
+ if (newLayersStr === null) return;
+
+ let newLayers = newLayersStr.split(" ");
+ this.footprint[padname].layers = newLayers;
+
+ this.render();
+ });
+
+ listener("click", "[data-trigger-click-padName]", (e) => {
+ const pad = e.target.closest("[data-parent-pad]");
+ const { padname } = pad.dataset;
+
+ const newName = prompt(
+ "Please input a new pad name",
+ e.target.innerText,
+ );
+
+ if (newName === null) return;
+ if (Object.keys(this.footprint).includes(newName)) return;
+
+ const invalidCharsRegex = /[^a-zA-Z_$\d]|(?<=^[^a-zA-Z_$])[\d]/g;
+ const invalid = newName.match(invalidCharsRegex) !== null;
+ if (invalid) return;
+
+ const temp = this.footprint[padname];
+ this.footprint[newName] = temp;
+
+ const tempTrans = this.transformations[padname];
+ this.transformations[newName] = tempTrans;
+
+ delete this.footprint[padname];
+ delete this.transformations[padname];
+
+ this.render();
+ });
+
+ listener("click", "[data-trigger-click-close]", (e) => {
+ this.classList.add("hidden");
+ });
+
+ listener("click", "[data-trigger-click-delete]", (e) => {
+ const pad = e.target.closest("[data-parent-pad]");
+ const { padname } = pad.dataset;
+
+ delete this.footprint[padname];
+ delete this.transformations[padname];
+
+ this.selectedGeometry.delete(padname);
+
+ this.render();
+ });
+
+ // let startX = 0;
+ // let startY = 0;
+ // listener("mousedown", "", e => {
+ // startX = e.clientX;
+ // startY = e.clientY;
+ // })
+
+ // listener("mouseup", ":not([data-trigger-click-geometry])", (e) => {
+ // const dx = e.clientX - startX;
+ // const dy = e.clientY - startY;
+ // if (dx > 2 || dy > 2) return;
+ // if (e.shiftKey) return
+ // this.selectedGeometry.clear();
+ // this.render();
+ // });
+
+ window.addEventListener("keydown", e => {
+ const { code } = e;
+ if (code === "Escape") {
+ this.selectedGeometry.clear();
+ this.render();
+ }
+ })
+
+ listener("mousedown", "[data-trigger-click-geometry]", (e) => {
+ const pad = e.target.closest("[data-parent-pad]");
+ const { padname } = pad.dataset;
+
+ this.selectedPad = padname;
+ if (e.shiftKey && this.selectedGeometry.has(padname)) {
+ this.selectedGeometry.delete(padname);
+ } else if (e.shiftKey && !this.selectedGeometry.has(padname)) {
+ this.selectedGeometry.add(padname);
+ } else {
+ this.selectedGeometry.clear();
+ this.selectedGeometry.add(padname);
+ }
+
+ this.render();
+ });
+
+ listener("mousedown", "[data-trigger-click-pad]", (e) => {
+ const pad = e.target.closest("[data-parent-pad]");
+ const { padname } = pad.dataset;
+
+ this.selectedPad = padname;
+
+ this.render();
+ });
+
+ listener("mousedown", "[data-trigger-add-pad]", (e) => {
+ let maxIndex = 0;
+ for (const [ padName, data ] of Object.entries(this.footprint)) {
+ maxIndex = Math.max(maxIndex, data.index ?? 0);
+ }
+
+ maxIndex++;
+
+ const padName = `_${maxIndex}`;
+ this.footprint[padName] = {
+ index: maxIndex,
+ shape: "M -0.03,0.015L 0.03,0.015L 0.03,-0.015L -0.03,-0.015L -0.03,0.015",
+ pos: [0, 0.05],
+ layers: ["F.Cu"]
+ }
+
+ this.transformations[padName] = {
+ _path: pathD([], this.footprint[padName].shape),
+ translateX: 0,
+ translateY: 0,
+ scaleX: 1,
+ scaleY: 1,
+ rotate: 45
+ }
+
+ this.selectedPad = padName;
+
+ this.render();
+
+ this.panZoomFns.applyTransformation();
+
+ });
+ }
+
+ connectedCallback() {
+ this.setAttribute("footprint", testFootprint);
+
+ this.initialized = true;
+
+ this.panZoomFns.setScaleXY({
+ x: [-0.2, 0.2],
+ y: [-0.2, 0.2],
+ });
+
+ if (this.hasAttribute("footprint")) {
+
+ }
+ }
+
+ id = null;
+
+ render() {
+
+ let xMin = Infinity;
+ let xMax = -Infinity;
+ let yMin = Infinity;
+ let yMax = -Infinity;
+
+ Array.from(this.selectedGeometry).forEach(pad => {
+ const data = this.footprint[pad];
+ const geo = this.transformations[pad];
+ const path = copy(geo._path);
+
+ transform(path, {
+ dx: data.pos[0] + geo.translateX,
+ dy: data.pos[1] + geo.translateY,
+ sx: geo.scaleX,
+ sy: geo.scaleY,
+ rotate: geo.rotate
+ })
+
+ const e = extrema(path);
+
+ xMin = Math.min(xMin, e.xMin);
+ xMax = Math.max(xMax, e.xMax);
+ yMin = Math.min(yMin, e.yMin);
+ yMax = Math.max(yMax, e.yMax);
+ })
+
+ const centerX = (xMax+xMin)/2;
+ const centerY = (yMax+yMin)/2;
+
+ const transformHandle = () => {
+
+ if (this.selectedGeometry.size === 0) return "";
+ if (this.panZoomFns === null) return;
+
+ return svg`
+