diff --git a/examples/BasicKeyboard/BasicKeyboard.svgpcb.js b/examples/BasicKeyboard/BasicKeyboard.svgpcb.js index 1dc93e8a5..1e6cf4278 100644 --- a/examples/BasicKeyboard/BasicKeyboard.svgpcb.js +++ b/examples/BasicKeyboard/BasicKeyboard.svgpcb.js @@ -23,19 +23,19 @@ function SwitchMatrix_2_3_sw(xy, colSpacing=1, rowSpacing=1, diodeOffset=[0.25, index = yIndex * ncols + xIndex + 1 buttonPos = [xy[0] + colSpacing * xIndex, xy[1] + rowSpacing * yIndex] - obj.footprints[`sw[${xIndex}][${yIndex}]`] = button = board.add( + obj.footprints[`sw[${xIndex},${yIndex}]`] = button = board.add( SW_Hotswap_Kailh_MX, { translate: buttonPos, rotate: 0, - id: `sw_sw[${xIndex}][${yIndex}]` + id: `sw_sw_${xIndex}_${yIndex}_` }) diodePos = [buttonPos[0] + diodeOffset[0], buttonPos[1] + diodeOffset[1]] - obj[`d[${xIndex}][${yIndex}]`] = diode = board.add( + obj[`d[${xIndex},${yIndex}]`] = diode = board.add( D_SMA, { translate: diodePos, rotate: 90, - id: `sw_d[${xIndex}][${yIndex}]` + id: `sw_d_${xIndex}_${yIndex}_` }) // create stub wire for button -> column common line diff --git a/examples/IotKnob/IotKnob.svgpcb.js b/examples/IotKnob/IotKnob.svgpcb.js index ef5553736..5cfa0f00c 100644 --- a/examples/IotKnob/IotKnob.svgpcb.js +++ b/examples/IotKnob/IotKnob.svgpcb.js @@ -70,7 +70,7 @@ function NeopixelArrayCircular_4_rgb_knob(xy, rot=90, radius=1, startAngle=0, en obj.footprints[`led[${i}]`] = led = board.add(LED_SK6812_EC15_1_5x1_5mm, { translate: origin, rotate: angle + rot, - id: `rgb_knob_led[${i}]` + id: `rgb_knob_led_${i}_` }) const gndOrigin = pAdd(xy, vRotate([radius - powerRadiusOffset, 0], angle)) @@ -181,7 +181,7 @@ function NeopixelArrayCircular_24_rgb_ring(xy, rot=90, radius=1, startAngle=0, e obj.footprints[`led[${i}]`] = led = board.add(LED_SK6812_EC15_1_5x1_5mm, { translate: origin, rotate: angle + rot, - id: `rgb_ring_led[${i}]` + id: `rgb_ring_led_${i}_` }) const gndOrigin = pAdd(xy, vRotate([radius - powerRadiusOffset, 0], angle)) @@ -292,7 +292,7 @@ function NeopixelArrayCircular_6_rgb_sw(xy, rot=90, radius=1, startAngle=0, endA obj.footprints[`led[${i}]`] = led = board.add(LED_SK6812_EC15_1_5x1_5mm, { translate: origin, rotate: angle + rot, - id: `rgb_sw_led[${i}]` + id: `rgb_sw_led_${i}_` }) const gndOrigin = pAdd(xy, vRotate([radius - powerRadiusOffset, 0], angle)) diff --git a/examples/Keyboard/Keyboard.svgpcb.js b/examples/Keyboard/Keyboard.svgpcb.js index 29768ad24..797d39af5 100644 --- a/examples/Keyboard/Keyboard.svgpcb.js +++ b/examples/Keyboard/Keyboard.svgpcb.js @@ -23,19 +23,19 @@ function SwitchMatrix_2_3_sw(xy, colSpacing=1, rowSpacing=1, diodeOffset=[0.25, index = yIndex * ncols + xIndex + 1 buttonPos = [xy[0] + colSpacing * xIndex, xy[1] + rowSpacing * yIndex] - obj.footprints[`sw[${xIndex}][${yIndex}]`] = button = board.add( + obj.footprints[`sw[${xIndex},${yIndex}]`] = button = board.add( SW_Hotswap_Kailh_MX, { translate: buttonPos, rotate: 0, - id: `sw_sw[${xIndex}][${yIndex}]` + id: `sw_sw_${xIndex}_${yIndex}_` }) diodePos = [buttonPos[0] + diodeOffset[0], buttonPos[1] + diodeOffset[1]] - obj[`d[${xIndex}][${yIndex}]`] = diode = board.add( + obj[`d[${xIndex},${yIndex}]`] = diode = board.add( D_SMA, { translate: diodePos, rotate: 90, - id: `sw_d[${xIndex}][${yIndex}]` + id: `sw_d_${xIndex}_${yIndex}_` }) // create stub wire for button -> column common line diff --git a/examples/LedMatrix/LedMatrix.svgpcb.js b/examples/LedMatrix/LedMatrix.svgpcb.js index db63f69c6..eeb5977d5 100644 --- a/examples/LedMatrix/LedMatrix.svgpcb.js +++ b/examples/LedMatrix/LedMatrix.svgpcb.js @@ -24,9 +24,9 @@ function CharlieplexedLedMatrix_5_6_matrix(xy, colSpacing=1, rowSpacing=1) { for (let xIndex=0; xIndex < kXCount; xIndex++) { ledPos = [xy[0] + colSpacing * xIndex, xy[1] + rowSpacing * yIndex] - obj.footprints[`d[${yIndex}_${xIndex}]`] = led = board.add(LED_0603_1608Metric, { + obj.footprints[`led[${yIndex}_${xIndex}]`] = led = board.add(LED_0603_1608Metric, { translate: ledPos, - id: `matrix_d[${yIndex}_${xIndex}]` + id: `matrix_led_${yIndex}_${xIndex}_` }) rowLeds.push(led) @@ -71,9 +71,9 @@ function CharlieplexedLedMatrix_5_6_matrix(xy, colSpacing=1, rowSpacing=1) { allResistors = [] for (let xIndex=0; xIndex < kXCount; xIndex++) { const resPos = [xy[0] + colSpacing * xIndex, xy[1] + rowSpacing * kYCount] - obj.footprints[`r[${xIndex + 1}]`] = res = board.add(R_0603_1608Metric, { + obj.footprints[`res[${xIndex + 1}]`] = res = board.add(R_0603_1608Metric, { translate: resPos, - id: `matrix_r[${xIndex + 1}]` + id: `matrix_res_${xIndex + 1}_` }) allResistors.push(res)