circuit-json-to-lbrn 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +259 -2
- package/lib/element-handlers/addPcbHole/addCirclePcbHole.ts +51 -0
- package/lib/element-handlers/addPcbHole/addOvalPcbHole.ts +59 -0
- package/lib/element-handlers/addPcbHole/addPillPcbHole.ts +59 -0
- package/lib/element-handlers/addPcbHole/addRectPcbHole.ts +61 -0
- package/lib/element-handlers/addPcbHole/addRotatedPillPcbHole.ts +62 -0
- package/lib/element-handlers/addPcbHole/index.ts +36 -0
- package/lib/index.ts +5 -0
- package/package.json +1 -1
- package/tests/examples/addPcbHole/__snapshots__/pcb-hole-circle.snap.svg +8 -0
- package/tests/examples/addPcbHole/__snapshots__/pcb-hole-oval.snap.svg +8 -0
- package/tests/examples/addPcbHole/__snapshots__/pcb-hole-pill.snap.svg +8 -0
- package/tests/examples/addPcbHole/__snapshots__/pcb-hole-rect.snap.svg +8 -0
- package/tests/examples/addPcbHole/__snapshots__/pcb-hole-rotated-pill.snap.svg +8 -0
- package/tests/examples/addPcbHole/__snapshots__/pcb-hole-with-soldermask.snap.svg +8 -0
- package/tests/examples/addPcbHole/pcb-hole-circle.test.ts +47 -0
- package/tests/examples/addPcbHole/pcb-hole-oval.test.ts +49 -0
- package/tests/examples/addPcbHole/pcb-hole-pill.test.ts +49 -0
- package/tests/examples/addPcbHole/pcb-hole-rect.test.ts +49 -0
- package/tests/examples/addPcbHole/pcb-hole-rotated-pill.test.ts +61 -0
- package/tests/examples/addPcbHole/pcb-hole-with-soldermask.test.ts +60 -0
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// lib/index.ts
|
|
2
|
-
import { LightBurnProject, CutSetting, ShapePath as
|
|
2
|
+
import { LightBurnProject, CutSetting, ShapePath as ShapePath21 } from "lbrnts";
|
|
3
3
|
import { cju as cju2 } from "@tscircuit/circuit-json-util";
|
|
4
4
|
|
|
5
5
|
// lib/element-handlers/addPlatedHole/addCirclePlatedHole.ts
|
|
@@ -1436,6 +1436,260 @@ var addPcbVia = (via, ctx) => {
|
|
|
1436
1436
|
}
|
|
1437
1437
|
};
|
|
1438
1438
|
|
|
1439
|
+
// lib/element-handlers/addPcbHole/addCirclePcbHole.ts
|
|
1440
|
+
import { ShapePath as ShapePath16 } from "lbrnts";
|
|
1441
|
+
var addCirclePcbHole = (hole, ctx) => {
|
|
1442
|
+
const {
|
|
1443
|
+
project,
|
|
1444
|
+
throughBoardCutSetting,
|
|
1445
|
+
soldermaskCutSetting,
|
|
1446
|
+
origin,
|
|
1447
|
+
includeSoldermask,
|
|
1448
|
+
soldermaskMargin
|
|
1449
|
+
} = ctx;
|
|
1450
|
+
const centerX = hole.x + origin.x;
|
|
1451
|
+
const centerY = hole.y + origin.y;
|
|
1452
|
+
if (hole.hole_diameter > 0 && includeSoldermask) {
|
|
1453
|
+
const smRadius = hole.hole_diameter / 2 + soldermaskMargin;
|
|
1454
|
+
const soldermaskPath = createCirclePath(centerX, centerY, smRadius);
|
|
1455
|
+
project.children.push(
|
|
1456
|
+
new ShapePath16({
|
|
1457
|
+
cutIndex: soldermaskCutSetting.index,
|
|
1458
|
+
verts: soldermaskPath.verts,
|
|
1459
|
+
prims: soldermaskPath.prims,
|
|
1460
|
+
isClosed: true
|
|
1461
|
+
})
|
|
1462
|
+
);
|
|
1463
|
+
}
|
|
1464
|
+
if (hole.hole_diameter > 0) {
|
|
1465
|
+
const radius = hole.hole_diameter / 2;
|
|
1466
|
+
const circlePath = createCirclePath(centerX, centerY, radius);
|
|
1467
|
+
project.children.push(
|
|
1468
|
+
new ShapePath16({
|
|
1469
|
+
cutIndex: throughBoardCutSetting.index,
|
|
1470
|
+
verts: circlePath.verts,
|
|
1471
|
+
prims: circlePath.prims,
|
|
1472
|
+
isClosed: true
|
|
1473
|
+
})
|
|
1474
|
+
);
|
|
1475
|
+
}
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1478
|
+
// lib/element-handlers/addPcbHole/addRectPcbHole.ts
|
|
1479
|
+
import { ShapePath as ShapePath17 } from "lbrnts";
|
|
1480
|
+
var addRectPcbHole = (hole, ctx) => {
|
|
1481
|
+
const {
|
|
1482
|
+
project,
|
|
1483
|
+
throughBoardCutSetting,
|
|
1484
|
+
soldermaskCutSetting,
|
|
1485
|
+
origin,
|
|
1486
|
+
includeSoldermask,
|
|
1487
|
+
soldermaskMargin
|
|
1488
|
+
} = ctx;
|
|
1489
|
+
const centerX = hole.x + origin.x;
|
|
1490
|
+
const centerY = hole.y + origin.y;
|
|
1491
|
+
if (hole.hole_width > 0 && hole.hole_height > 0 && includeSoldermask) {
|
|
1492
|
+
const soldermaskPath = createRoundedRectPath(
|
|
1493
|
+
centerX,
|
|
1494
|
+
centerY,
|
|
1495
|
+
hole.hole_width + soldermaskMargin * 2,
|
|
1496
|
+
hole.hole_height + soldermaskMargin * 2,
|
|
1497
|
+
0
|
|
1498
|
+
// no border radius for rect holes
|
|
1499
|
+
);
|
|
1500
|
+
project.children.push(
|
|
1501
|
+
new ShapePath17({
|
|
1502
|
+
cutIndex: soldermaskCutSetting.index,
|
|
1503
|
+
verts: soldermaskPath.verts,
|
|
1504
|
+
prims: soldermaskPath.prims,
|
|
1505
|
+
isClosed: true
|
|
1506
|
+
})
|
|
1507
|
+
);
|
|
1508
|
+
}
|
|
1509
|
+
if (hole.hole_width > 0 && hole.hole_height > 0) {
|
|
1510
|
+
const rectPath = createRoundedRectPath(
|
|
1511
|
+
centerX,
|
|
1512
|
+
centerY,
|
|
1513
|
+
hole.hole_width,
|
|
1514
|
+
hole.hole_height,
|
|
1515
|
+
0
|
|
1516
|
+
// no border radius for rect holes
|
|
1517
|
+
);
|
|
1518
|
+
project.children.push(
|
|
1519
|
+
new ShapePath17({
|
|
1520
|
+
cutIndex: throughBoardCutSetting.index,
|
|
1521
|
+
verts: rectPath.verts,
|
|
1522
|
+
prims: rectPath.prims,
|
|
1523
|
+
isClosed: true
|
|
1524
|
+
})
|
|
1525
|
+
);
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
|
|
1529
|
+
// lib/element-handlers/addPcbHole/addOvalPcbHole.ts
|
|
1530
|
+
import { ShapePath as ShapePath18 } from "lbrnts";
|
|
1531
|
+
var addOvalPcbHole = (hole, ctx) => {
|
|
1532
|
+
const {
|
|
1533
|
+
project,
|
|
1534
|
+
throughBoardCutSetting,
|
|
1535
|
+
soldermaskCutSetting,
|
|
1536
|
+
origin,
|
|
1537
|
+
includeSoldermask,
|
|
1538
|
+
soldermaskMargin
|
|
1539
|
+
} = ctx;
|
|
1540
|
+
const centerX = hole.x + origin.x;
|
|
1541
|
+
const centerY = hole.y + origin.y;
|
|
1542
|
+
if (hole.hole_width > 0 && hole.hole_height > 0 && includeSoldermask) {
|
|
1543
|
+
const soldermaskPath = createOvalPath(
|
|
1544
|
+
centerX,
|
|
1545
|
+
centerY,
|
|
1546
|
+
hole.hole_width + soldermaskMargin * 2,
|
|
1547
|
+
hole.hole_height + soldermaskMargin * 2
|
|
1548
|
+
);
|
|
1549
|
+
project.children.push(
|
|
1550
|
+
new ShapePath18({
|
|
1551
|
+
cutIndex: soldermaskCutSetting.index,
|
|
1552
|
+
verts: soldermaskPath.verts,
|
|
1553
|
+
prims: soldermaskPath.prims,
|
|
1554
|
+
isClosed: true
|
|
1555
|
+
})
|
|
1556
|
+
);
|
|
1557
|
+
}
|
|
1558
|
+
if (hole.hole_width > 0 && hole.hole_height > 0) {
|
|
1559
|
+
const ovalPath = createOvalPath(
|
|
1560
|
+
centerX,
|
|
1561
|
+
centerY,
|
|
1562
|
+
hole.hole_width,
|
|
1563
|
+
hole.hole_height
|
|
1564
|
+
);
|
|
1565
|
+
project.children.push(
|
|
1566
|
+
new ShapePath18({
|
|
1567
|
+
cutIndex: throughBoardCutSetting.index,
|
|
1568
|
+
verts: ovalPath.verts,
|
|
1569
|
+
prims: ovalPath.prims,
|
|
1570
|
+
isClosed: true
|
|
1571
|
+
})
|
|
1572
|
+
);
|
|
1573
|
+
}
|
|
1574
|
+
};
|
|
1575
|
+
|
|
1576
|
+
// lib/element-handlers/addPcbHole/addPillPcbHole.ts
|
|
1577
|
+
import { ShapePath as ShapePath19 } from "lbrnts";
|
|
1578
|
+
var addPillPcbHole = (hole, ctx) => {
|
|
1579
|
+
const {
|
|
1580
|
+
project,
|
|
1581
|
+
throughBoardCutSetting,
|
|
1582
|
+
soldermaskCutSetting,
|
|
1583
|
+
origin,
|
|
1584
|
+
includeSoldermask,
|
|
1585
|
+
soldermaskMargin
|
|
1586
|
+
} = ctx;
|
|
1587
|
+
const centerX = hole.x + origin.x;
|
|
1588
|
+
const centerY = hole.y + origin.y;
|
|
1589
|
+
if (hole.hole_width > 0 && hole.hole_height > 0 && includeSoldermask) {
|
|
1590
|
+
const soldermaskPath = createPillPath(
|
|
1591
|
+
centerX,
|
|
1592
|
+
centerY,
|
|
1593
|
+
hole.hole_width + soldermaskMargin * 2,
|
|
1594
|
+
hole.hole_height + soldermaskMargin * 2
|
|
1595
|
+
);
|
|
1596
|
+
project.children.push(
|
|
1597
|
+
new ShapePath19({
|
|
1598
|
+
cutIndex: soldermaskCutSetting.index,
|
|
1599
|
+
verts: soldermaskPath.verts,
|
|
1600
|
+
prims: soldermaskPath.prims,
|
|
1601
|
+
isClosed: true
|
|
1602
|
+
})
|
|
1603
|
+
);
|
|
1604
|
+
}
|
|
1605
|
+
if (hole.hole_width > 0 && hole.hole_height > 0) {
|
|
1606
|
+
const pillPath = createPillPath(
|
|
1607
|
+
centerX,
|
|
1608
|
+
centerY,
|
|
1609
|
+
hole.hole_width,
|
|
1610
|
+
hole.hole_height
|
|
1611
|
+
);
|
|
1612
|
+
project.children.push(
|
|
1613
|
+
new ShapePath19({
|
|
1614
|
+
cutIndex: throughBoardCutSetting.index,
|
|
1615
|
+
verts: pillPath.verts,
|
|
1616
|
+
prims: pillPath.prims,
|
|
1617
|
+
isClosed: true
|
|
1618
|
+
})
|
|
1619
|
+
);
|
|
1620
|
+
}
|
|
1621
|
+
};
|
|
1622
|
+
|
|
1623
|
+
// lib/element-handlers/addPcbHole/addRotatedPillPcbHole.ts
|
|
1624
|
+
import { ShapePath as ShapePath20 } from "lbrnts";
|
|
1625
|
+
var addRotatedPillPcbHole = (hole, ctx) => {
|
|
1626
|
+
const {
|
|
1627
|
+
project,
|
|
1628
|
+
throughBoardCutSetting,
|
|
1629
|
+
soldermaskCutSetting,
|
|
1630
|
+
origin,
|
|
1631
|
+
includeSoldermask,
|
|
1632
|
+
soldermaskMargin
|
|
1633
|
+
} = ctx;
|
|
1634
|
+
const centerX = hole.x + origin.x;
|
|
1635
|
+
const centerY = hole.y + origin.y;
|
|
1636
|
+
const rotation = (hole.ccw_rotation || 0) * (Math.PI / 180);
|
|
1637
|
+
if (hole.hole_width > 0 && hole.hole_height > 0 && includeSoldermask) {
|
|
1638
|
+
const soldermaskPath = createPillPath(
|
|
1639
|
+
centerX,
|
|
1640
|
+
centerY,
|
|
1641
|
+
hole.hole_width + soldermaskMargin * 2,
|
|
1642
|
+
hole.hole_height + soldermaskMargin * 2,
|
|
1643
|
+
rotation
|
|
1644
|
+
);
|
|
1645
|
+
project.children.push(
|
|
1646
|
+
new ShapePath20({
|
|
1647
|
+
cutIndex: soldermaskCutSetting.index,
|
|
1648
|
+
verts: soldermaskPath.verts,
|
|
1649
|
+
prims: soldermaskPath.prims,
|
|
1650
|
+
isClosed: true
|
|
1651
|
+
})
|
|
1652
|
+
);
|
|
1653
|
+
}
|
|
1654
|
+
if (hole.hole_width > 0 && hole.hole_height > 0) {
|
|
1655
|
+
const pillPath = createPillPath(
|
|
1656
|
+
centerX,
|
|
1657
|
+
centerY,
|
|
1658
|
+
hole.hole_width,
|
|
1659
|
+
hole.hole_height,
|
|
1660
|
+
rotation
|
|
1661
|
+
);
|
|
1662
|
+
project.children.push(
|
|
1663
|
+
new ShapePath20({
|
|
1664
|
+
cutIndex: throughBoardCutSetting.index,
|
|
1665
|
+
verts: pillPath.verts,
|
|
1666
|
+
prims: pillPath.prims,
|
|
1667
|
+
isClosed: true
|
|
1668
|
+
})
|
|
1669
|
+
);
|
|
1670
|
+
}
|
|
1671
|
+
};
|
|
1672
|
+
|
|
1673
|
+
// lib/element-handlers/addPcbHole/index.ts
|
|
1674
|
+
var addPcbHole = (hole, ctx) => {
|
|
1675
|
+
switch (hole.hole_shape) {
|
|
1676
|
+
case "circle":
|
|
1677
|
+
case "square":
|
|
1678
|
+
return addCirclePcbHole(hole, ctx);
|
|
1679
|
+
case "rect":
|
|
1680
|
+
return addRectPcbHole(hole, ctx);
|
|
1681
|
+
case "oval":
|
|
1682
|
+
return addOvalPcbHole(hole, ctx);
|
|
1683
|
+
case "pill":
|
|
1684
|
+
return addPillPcbHole(hole, ctx);
|
|
1685
|
+
case "rotated_pill":
|
|
1686
|
+
return addRotatedPillPcbHole(hole, ctx);
|
|
1687
|
+
default:
|
|
1688
|
+
const _exhaustive = hole;
|
|
1689
|
+
console.warn(`Unknown hole shape: ${hole.hole_shape}`);
|
|
1690
|
+
}
|
|
1691
|
+
};
|
|
1692
|
+
|
|
1439
1693
|
// lib/index.ts
|
|
1440
1694
|
var convertCircuitJsonToLbrn = (circuitJson, options = {}) => {
|
|
1441
1695
|
const db = cju2(circuitJson);
|
|
@@ -1510,6 +1764,9 @@ var convertCircuitJsonToLbrn = (circuitJson, options = {}) => {
|
|
|
1510
1764
|
for (const via of db.pcb_via.list()) {
|
|
1511
1765
|
addPcbVia(via, ctx);
|
|
1512
1766
|
}
|
|
1767
|
+
for (const hole of db.pcb_hole.list()) {
|
|
1768
|
+
addPcbHole(hole, ctx);
|
|
1769
|
+
}
|
|
1513
1770
|
if (ctx.includeCopper) {
|
|
1514
1771
|
for (const net of Object.keys(connMap.netMap)) {
|
|
1515
1772
|
const netGeoms = ctx.netGeoms.get(net);
|
|
@@ -1530,7 +1787,7 @@ var convertCircuitJsonToLbrn = (circuitJson, options = {}) => {
|
|
|
1530
1787
|
for (const island of union.splitToIslands()) {
|
|
1531
1788
|
const { verts, prims } = polygonToShapePathData(island);
|
|
1532
1789
|
project.children.push(
|
|
1533
|
-
new
|
|
1790
|
+
new ShapePath21({
|
|
1534
1791
|
cutIndex: copperCutSetting.index,
|
|
1535
1792
|
verts,
|
|
1536
1793
|
prims,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { PcbHoleCircle, PcbHoleCircleOrSquare } from "circuit-json"
|
|
2
|
+
import type { ConvertContext } from "../../ConvertContext"
|
|
3
|
+
import { ShapePath } from "lbrnts"
|
|
4
|
+
import { createCirclePath } from "../../helpers/circleShape"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Adds a circular PCB hole (non-plated) to the project
|
|
8
|
+
*/
|
|
9
|
+
export const addCirclePcbHole = (
|
|
10
|
+
hole: PcbHoleCircle | PcbHoleCircleOrSquare,
|
|
11
|
+
ctx: ConvertContext,
|
|
12
|
+
): void => {
|
|
13
|
+
const {
|
|
14
|
+
project,
|
|
15
|
+
throughBoardCutSetting,
|
|
16
|
+
soldermaskCutSetting,
|
|
17
|
+
origin,
|
|
18
|
+
includeSoldermask,
|
|
19
|
+
soldermaskMargin,
|
|
20
|
+
} = ctx
|
|
21
|
+
const centerX = hole.x + origin.x
|
|
22
|
+
const centerY = hole.y + origin.y
|
|
23
|
+
|
|
24
|
+
// Add soldermask opening if drawing soldermask
|
|
25
|
+
if (hole.hole_diameter > 0 && includeSoldermask) {
|
|
26
|
+
const smRadius = hole.hole_diameter / 2 + soldermaskMargin
|
|
27
|
+
const soldermaskPath = createCirclePath(centerX, centerY, smRadius)
|
|
28
|
+
project.children.push(
|
|
29
|
+
new ShapePath({
|
|
30
|
+
cutIndex: soldermaskCutSetting.index,
|
|
31
|
+
verts: soldermaskPath.verts,
|
|
32
|
+
prims: soldermaskPath.prims,
|
|
33
|
+
isClosed: true,
|
|
34
|
+
}),
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Add the hole - cut through the board
|
|
39
|
+
if (hole.hole_diameter > 0) {
|
|
40
|
+
const radius = hole.hole_diameter / 2
|
|
41
|
+
const circlePath = createCirclePath(centerX, centerY, radius)
|
|
42
|
+
project.children.push(
|
|
43
|
+
new ShapePath({
|
|
44
|
+
cutIndex: throughBoardCutSetting.index,
|
|
45
|
+
verts: circlePath.verts,
|
|
46
|
+
prims: circlePath.prims,
|
|
47
|
+
isClosed: true,
|
|
48
|
+
}),
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { PcbHoleOval } from "circuit-json"
|
|
2
|
+
import type { ConvertContext } from "../../ConvertContext"
|
|
3
|
+
import { ShapePath } from "lbrnts"
|
|
4
|
+
import { createOvalPath } from "../../helpers/ovalShape"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Adds an oval PCB hole (non-plated) to the project
|
|
8
|
+
*/
|
|
9
|
+
export const addOvalPcbHole = (
|
|
10
|
+
hole: PcbHoleOval,
|
|
11
|
+
ctx: ConvertContext,
|
|
12
|
+
): void => {
|
|
13
|
+
const {
|
|
14
|
+
project,
|
|
15
|
+
throughBoardCutSetting,
|
|
16
|
+
soldermaskCutSetting,
|
|
17
|
+
origin,
|
|
18
|
+
includeSoldermask,
|
|
19
|
+
soldermaskMargin,
|
|
20
|
+
} = ctx
|
|
21
|
+
const centerX = hole.x + origin.x
|
|
22
|
+
const centerY = hole.y + origin.y
|
|
23
|
+
|
|
24
|
+
// Add soldermask opening if drawing soldermask
|
|
25
|
+
if (hole.hole_width > 0 && hole.hole_height > 0 && includeSoldermask) {
|
|
26
|
+
const soldermaskPath = createOvalPath(
|
|
27
|
+
centerX,
|
|
28
|
+
centerY,
|
|
29
|
+
hole.hole_width + soldermaskMargin * 2,
|
|
30
|
+
hole.hole_height + soldermaskMargin * 2,
|
|
31
|
+
)
|
|
32
|
+
project.children.push(
|
|
33
|
+
new ShapePath({
|
|
34
|
+
cutIndex: soldermaskCutSetting.index,
|
|
35
|
+
verts: soldermaskPath.verts,
|
|
36
|
+
prims: soldermaskPath.prims,
|
|
37
|
+
isClosed: true,
|
|
38
|
+
}),
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Add the hole - cut through the board
|
|
43
|
+
if (hole.hole_width > 0 && hole.hole_height > 0) {
|
|
44
|
+
const ovalPath = createOvalPath(
|
|
45
|
+
centerX,
|
|
46
|
+
centerY,
|
|
47
|
+
hole.hole_width,
|
|
48
|
+
hole.hole_height,
|
|
49
|
+
)
|
|
50
|
+
project.children.push(
|
|
51
|
+
new ShapePath({
|
|
52
|
+
cutIndex: throughBoardCutSetting.index,
|
|
53
|
+
verts: ovalPath.verts,
|
|
54
|
+
prims: ovalPath.prims,
|
|
55
|
+
isClosed: true,
|
|
56
|
+
}),
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { PcbHolePill } from "circuit-json"
|
|
2
|
+
import type { ConvertContext } from "../../ConvertContext"
|
|
3
|
+
import { ShapePath } from "lbrnts"
|
|
4
|
+
import { createPillPath } from "../../helpers/pillShape"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Adds a pill-shaped PCB hole (non-plated) to the project
|
|
8
|
+
*/
|
|
9
|
+
export const addPillPcbHole = (
|
|
10
|
+
hole: PcbHolePill,
|
|
11
|
+
ctx: ConvertContext,
|
|
12
|
+
): void => {
|
|
13
|
+
const {
|
|
14
|
+
project,
|
|
15
|
+
throughBoardCutSetting,
|
|
16
|
+
soldermaskCutSetting,
|
|
17
|
+
origin,
|
|
18
|
+
includeSoldermask,
|
|
19
|
+
soldermaskMargin,
|
|
20
|
+
} = ctx
|
|
21
|
+
const centerX = hole.x + origin.x
|
|
22
|
+
const centerY = hole.y + origin.y
|
|
23
|
+
|
|
24
|
+
// Add soldermask opening if drawing soldermask
|
|
25
|
+
if (hole.hole_width > 0 && hole.hole_height > 0 && includeSoldermask) {
|
|
26
|
+
const soldermaskPath = createPillPath(
|
|
27
|
+
centerX,
|
|
28
|
+
centerY,
|
|
29
|
+
hole.hole_width + soldermaskMargin * 2,
|
|
30
|
+
hole.hole_height + soldermaskMargin * 2,
|
|
31
|
+
)
|
|
32
|
+
project.children.push(
|
|
33
|
+
new ShapePath({
|
|
34
|
+
cutIndex: soldermaskCutSetting.index,
|
|
35
|
+
verts: soldermaskPath.verts,
|
|
36
|
+
prims: soldermaskPath.prims,
|
|
37
|
+
isClosed: true,
|
|
38
|
+
}),
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Add the hole - cut through the board
|
|
43
|
+
if (hole.hole_width > 0 && hole.hole_height > 0) {
|
|
44
|
+
const pillPath = createPillPath(
|
|
45
|
+
centerX,
|
|
46
|
+
centerY,
|
|
47
|
+
hole.hole_width,
|
|
48
|
+
hole.hole_height,
|
|
49
|
+
)
|
|
50
|
+
project.children.push(
|
|
51
|
+
new ShapePath({
|
|
52
|
+
cutIndex: throughBoardCutSetting.index,
|
|
53
|
+
verts: pillPath.verts,
|
|
54
|
+
prims: pillPath.prims,
|
|
55
|
+
isClosed: true,
|
|
56
|
+
}),
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { PcbHoleRect } from "circuit-json"
|
|
2
|
+
import type { ConvertContext } from "../../ConvertContext"
|
|
3
|
+
import { ShapePath } from "lbrnts"
|
|
4
|
+
import { createRoundedRectPath } from "../../helpers/roundedRectShape"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Adds a rectangular PCB hole (non-plated) to the project
|
|
8
|
+
*/
|
|
9
|
+
export const addRectPcbHole = (
|
|
10
|
+
hole: PcbHoleRect,
|
|
11
|
+
ctx: ConvertContext,
|
|
12
|
+
): void => {
|
|
13
|
+
const {
|
|
14
|
+
project,
|
|
15
|
+
throughBoardCutSetting,
|
|
16
|
+
soldermaskCutSetting,
|
|
17
|
+
origin,
|
|
18
|
+
includeSoldermask,
|
|
19
|
+
soldermaskMargin,
|
|
20
|
+
} = ctx
|
|
21
|
+
const centerX = hole.x + origin.x
|
|
22
|
+
const centerY = hole.y + origin.y
|
|
23
|
+
|
|
24
|
+
// Add soldermask opening if drawing soldermask
|
|
25
|
+
if (hole.hole_width > 0 && hole.hole_height > 0 && includeSoldermask) {
|
|
26
|
+
const soldermaskPath = createRoundedRectPath(
|
|
27
|
+
centerX,
|
|
28
|
+
centerY,
|
|
29
|
+
hole.hole_width + soldermaskMargin * 2,
|
|
30
|
+
hole.hole_height + soldermaskMargin * 2,
|
|
31
|
+
0, // no border radius for rect holes
|
|
32
|
+
)
|
|
33
|
+
project.children.push(
|
|
34
|
+
new ShapePath({
|
|
35
|
+
cutIndex: soldermaskCutSetting.index,
|
|
36
|
+
verts: soldermaskPath.verts,
|
|
37
|
+
prims: soldermaskPath.prims,
|
|
38
|
+
isClosed: true,
|
|
39
|
+
}),
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Add the hole - cut through the board
|
|
44
|
+
if (hole.hole_width > 0 && hole.hole_height > 0) {
|
|
45
|
+
const rectPath = createRoundedRectPath(
|
|
46
|
+
centerX,
|
|
47
|
+
centerY,
|
|
48
|
+
hole.hole_width,
|
|
49
|
+
hole.hole_height,
|
|
50
|
+
0, // no border radius for rect holes
|
|
51
|
+
)
|
|
52
|
+
project.children.push(
|
|
53
|
+
new ShapePath({
|
|
54
|
+
cutIndex: throughBoardCutSetting.index,
|
|
55
|
+
verts: rectPath.verts,
|
|
56
|
+
prims: rectPath.prims,
|
|
57
|
+
isClosed: true,
|
|
58
|
+
}),
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { PcbHoleRotatedPill } from "circuit-json"
|
|
2
|
+
import type { ConvertContext } from "../../ConvertContext"
|
|
3
|
+
import { ShapePath } from "lbrnts"
|
|
4
|
+
import { createPillPath } from "../../helpers/pillShape"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Adds a rotated pill-shaped PCB hole (non-plated) to the project
|
|
8
|
+
*/
|
|
9
|
+
export const addRotatedPillPcbHole = (
|
|
10
|
+
hole: PcbHoleRotatedPill,
|
|
11
|
+
ctx: ConvertContext,
|
|
12
|
+
): void => {
|
|
13
|
+
const {
|
|
14
|
+
project,
|
|
15
|
+
throughBoardCutSetting,
|
|
16
|
+
soldermaskCutSetting,
|
|
17
|
+
origin,
|
|
18
|
+
includeSoldermask,
|
|
19
|
+
soldermaskMargin,
|
|
20
|
+
} = ctx
|
|
21
|
+
const centerX = hole.x + origin.x
|
|
22
|
+
const centerY = hole.y + origin.y
|
|
23
|
+
const rotation = (hole.ccw_rotation || 0) * (Math.PI / 180) // Convert degrees to radians
|
|
24
|
+
|
|
25
|
+
// Add soldermask opening if drawing soldermask
|
|
26
|
+
if (hole.hole_width > 0 && hole.hole_height > 0 && includeSoldermask) {
|
|
27
|
+
const soldermaskPath = createPillPath(
|
|
28
|
+
centerX,
|
|
29
|
+
centerY,
|
|
30
|
+
hole.hole_width + soldermaskMargin * 2,
|
|
31
|
+
hole.hole_height + soldermaskMargin * 2,
|
|
32
|
+
rotation,
|
|
33
|
+
)
|
|
34
|
+
project.children.push(
|
|
35
|
+
new ShapePath({
|
|
36
|
+
cutIndex: soldermaskCutSetting.index,
|
|
37
|
+
verts: soldermaskPath.verts,
|
|
38
|
+
prims: soldermaskPath.prims,
|
|
39
|
+
isClosed: true,
|
|
40
|
+
}),
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Add the hole - cut through the board
|
|
45
|
+
if (hole.hole_width > 0 && hole.hole_height > 0) {
|
|
46
|
+
const pillPath = createPillPath(
|
|
47
|
+
centerX,
|
|
48
|
+
centerY,
|
|
49
|
+
hole.hole_width,
|
|
50
|
+
hole.hole_height,
|
|
51
|
+
rotation,
|
|
52
|
+
)
|
|
53
|
+
project.children.push(
|
|
54
|
+
new ShapePath({
|
|
55
|
+
cutIndex: throughBoardCutSetting.index,
|
|
56
|
+
verts: pillPath.verts,
|
|
57
|
+
prims: pillPath.prims,
|
|
58
|
+
isClosed: true,
|
|
59
|
+
}),
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { PcbHole } from "circuit-json"
|
|
2
|
+
import type { ConvertContext } from "../../ConvertContext"
|
|
3
|
+
import { addCirclePcbHole } from "./addCirclePcbHole"
|
|
4
|
+
import { addRectPcbHole } from "./addRectPcbHole"
|
|
5
|
+
import { addOvalPcbHole } from "./addOvalPcbHole"
|
|
6
|
+
import { addPillPcbHole } from "./addPillPcbHole"
|
|
7
|
+
import { addRotatedPillPcbHole } from "./addRotatedPillPcbHole"
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Main dispatcher function that routes PCB holes to the appropriate handler
|
|
11
|
+
* based on their hole_shape property
|
|
12
|
+
*/
|
|
13
|
+
export const addPcbHole = (hole: PcbHole, ctx: ConvertContext): void => {
|
|
14
|
+
switch (hole.hole_shape) {
|
|
15
|
+
case "circle":
|
|
16
|
+
case "square":
|
|
17
|
+
return addCirclePcbHole(hole, ctx)
|
|
18
|
+
|
|
19
|
+
case "rect":
|
|
20
|
+
return addRectPcbHole(hole, ctx)
|
|
21
|
+
|
|
22
|
+
case "oval":
|
|
23
|
+
return addOvalPcbHole(hole, ctx)
|
|
24
|
+
|
|
25
|
+
case "pill":
|
|
26
|
+
return addPillPcbHole(hole, ctx)
|
|
27
|
+
|
|
28
|
+
case "rotated_pill":
|
|
29
|
+
return addRotatedPillPcbHole(hole, ctx)
|
|
30
|
+
|
|
31
|
+
default:
|
|
32
|
+
// Type guard to ensure we handle all cases
|
|
33
|
+
const _exhaustive: never = hole
|
|
34
|
+
console.warn(`Unknown hole shape: ${(hole as any).hole_shape}`)
|
|
35
|
+
}
|
|
36
|
+
}
|
package/lib/index.ts
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
calculateOriginFromBounds,
|
|
15
15
|
} from "./calculateBounds"
|
|
16
16
|
import { addPcbVia } from "./element-handlers/addPcbVia"
|
|
17
|
+
import { addPcbHole } from "./element-handlers/addPcbHole"
|
|
17
18
|
// import { writeDebugSvg } from "./writeDebugSvg"
|
|
18
19
|
|
|
19
20
|
export const convertCircuitJsonToLbrn = (
|
|
@@ -109,6 +110,10 @@ export const convertCircuitJsonToLbrn = (
|
|
|
109
110
|
addPcbVia(via, ctx)
|
|
110
111
|
}
|
|
111
112
|
|
|
113
|
+
for (const hole of db.pcb_hole.list()) {
|
|
114
|
+
addPcbHole(hole, ctx)
|
|
115
|
+
}
|
|
116
|
+
|
|
112
117
|
// Draw each individual shape geometry as a ShapePath
|
|
113
118
|
// FOR DEBUGGING!!!
|
|
114
119
|
// for (const net of Object.keys(connMap.netMap)) {
|
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="800" height="1400" viewBox="0 0 800 1400" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g transform="translate(0, 0)">
|
|
3
|
+
<style></style><rect class="boundary" x="0" y="0" fill="#000" width="800" height="600" data-type="pcb_background" data-pcb-layer="global"/><rect class="pcb-boundary" fill="none" stroke="#fff" stroke-width="0.3" x="150" y="50" width="500" height="500" data-type="pcb_boundary" data-pcb-layer="global"/><path class="pcb-board" d="M 150 550 L 650 550 L 650 50 L 150 50 Z" fill="none" stroke="rgba(255, 255, 255, 0.5)" stroke-width="5" data-type="pcb_board" data-pcb-layer="board"/><circle class="pcb-hole" cx="350" cy="200" r="37.5" fill="#FF26E2" data-type="pcb_hole" data-pcb-layer="drill"/><circle class="pcb-hole" cx="450" cy="350" r="50" fill="#FF26E2" data-type="pcb_hole" data-pcb-layer="drill"/>
|
|
4
|
+
</g>
|
|
5
|
+
<g transform="translate(0, 600) scale(26.666666666666668, 26.666666666666668) translate(14.9, 14.9)">
|
|
6
|
+
<rect x="-14.9" y="-14.9" width="30" height="30" fill="white"/><g transform="matrix(1 0 0 -1 0 0.1999999999999993)"><g transform="matrix(1,0,0,1,0,0)"><path d="M -4.9 -4.9 L 5.1 -4.9 L 5.1 5.1 L -4.9 5.1 L -4.9 -4.9 L -4.9 -4.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -0.15000000000000002 2.1 L -0.15361145499585238 2.1735128552471705 L -0.1644110396975772 2.2463177415120965 L -0.18229474820084335 2.317713507940847 L -0.20709035061653502 2.3870125742738173 L -0.2385590517387337 2.453547552619498 L -0.2763977907730911 2.5166776747647015 L -0.32024215997794725 2.575794963122734 L -0.3696699141100893 2.6303300858899106 L -0.4242050368772659 2.6797578400220528 L -0.4833223252352983 2.723602209226909 L -0.5464524473805017 2.7614409482612663 L -0.6129874257261827 2.792909649383465 L -0.6822864920591533 2.8177052517991568 L -0.7536822584879037 2.835588960302423 L -0.8264871447528295 2.8463885450041477 L -0.9 2.85 L -0.9735128552471705 2.8463885450041477 L -1.0463177415120961 2.835588960302423 L -1.1177135079408467 2.8177052517991568 L -1.1870125742738173 2.792909649383465 L -1.2535475526194984 2.7614409482612663 L -1.3166776747647015 2.723602209226909 L -1.375794963122734 2.679757840022053 L -1.4303300858899106 2.630330085889911 L -1.4797578400220528 2.575794963122734 L -1.523602209226909 2.5166776747647015 L -1.5614409482612661 2.4535475526194985 L -1.592909649383465 2.3870125742738173 L -1.6177052517991566 2.317713507940847 L -1.6355889603024227 2.2463177415120965 L -1.6463885450041476 2.1735128552471705 L -1.65 2.1 L -1.6463885450041476 2.0264871447528296 L -1.6355889603024227 1.9536822584879039 L -1.6177052517991566 1.8822864920591535 L -1.5929096493834651 1.8129874257261829 L -1.5614409482612663 1.7464524473805019 L -1.523602209226909 1.6833223252352987 L -1.479757840022053 1.624205036877266 L -1.4303300858899108 1.5696699141100896 L -1.3757949631227344 1.5202421599779476 L -1.3166776747647018 1.4763977907730912 L -1.2535475526194984 1.4385590517387339 L -1.1870125742738178 1.407090350616535 L -1.117713507940847 1.3822947482008434 L -1.0463177415120966 1.3644110396975773 L -0.9735128552471704 1.3536114549958524 L -0.9000000000000001 1.35 L -0.8264871447528299 1.3536114549958524 L -0.7536822584879038 1.3644110396975773 L -0.6822864920591535 1.3822947482008434 L -0.6129874257261825 1.407090350616535 L -0.5464524473805018 1.4385590517387339 L -0.4833223252352986 1.476397790773091 L -0.42420503687726585 1.5202421599779474 L -0.36966991411008954 1.5696699141100894 L -0.3202421599779476 1.6242050368772656 L -0.2763977907730911 1.6833223252352985 L -0.23855905173873393 1.7464524473805016 L -0.20709035061653513 1.8129874257261824 L -0.18229474820084335 1.882286492059153 L -0.1644110396975773 1.9536822584879037 L -0.15361145499585238 2.0264871447528296 L -0.15000000000000002 2.1 L -0.15000000000000002 2.1 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 2.1 -0.9 L 2.095184726672197 -0.8019828596704395 L 2.0807852804032305 -0.7049096779838717 L 2.056940335732209 -0.6097153227455376 L 2.0238795325112866 -0.5173165676349103 L 1.981921264348355 -0.4286032631740024 L 1.9314696123025454 -0.34442976698039784 L 1.873010453362737 -0.26560671583635453 L 1.8071067811865476 -0.19289321881345256 L 1.7343932841636456 -0.12698954663726303 L 1.6555702330196023 -0.06853038769745479 L 1.571396736825998 -0.018078735651645084 L 1.48268343236509 0.023879532511286716 L 1.3902846772544624 0.0569403357322088 L 1.2950903220161285 0.08078528040323041 L 1.198017140329561 0.0951847266721968 L 1.1 0.09999999999999998 L 1.0019828596704394 0.0951847266721969 L 0.9049096779838719 0.08078528040323041 L 0.8097153227455379 0.05694033573220891 L 0.7173165676349104 0.023879532511286716 L 0.6286032631740024 -0.018078735651644973 L 0.5444297669803981 -0.06853038769745468 L 0.4656067158363547 -0.12698954663726292 L 0.3928932188134526 -0.19289321881345245 L 0.3269895466372631 -0.26560671583635453 L 0.26853038769745474 -0.34442976698039784 L 0.21807873565164515 -0.42860326317400216 L 0.17612046748871335 -0.5173165676349101 L 0.14305966426779126 -0.6097153227455376 L 0.11921471959676966 -0.7049096779838714 L 0.10481527332780327 -0.8019828596704393 L 0.10000000000000009 -0.8999999999999999 L 0.10481527332780316 -0.9980171403295606 L 0.11921471959676966 -1.0950903220161283 L 0.14305966426779115 -1.1902846772544622 L 0.17612046748871324 -1.2826834323650897 L 0.21807873565164504 -1.3713967368259976 L 0.26853038769745463 -1.455570233019602 L 0.326989546637263 -1.5343932841636452 L 0.3928932188134524 -1.6071067811865474 L 0.46560671583635427 -1.6730104533627368 L 0.5444297669803979 -1.7314696123025453 L 0.6286032631740022 -1.7819212643483548 L 0.7173165676349098 -1.8238795325112864 L 0.8097153227455376 -1.856940335732209 L 0.9049096779838715 -1.8807852804032303 L 1.0019828596704397 -1.895184726672197 L 1.0999999999999999 -1.9 L 1.19801714032956 -1.895184726672197 L 1.2950903220161285 -1.8807852804032303 L 1.3902846772544621 -1.856940335732209 L 1.4826834323650901 -1.8238795325112866 L 1.5713967368259976 -1.781921264348355 L 1.6555702330196018 -1.7314696123025455 L 1.7343932841636458 -1.6730104533627368 L 1.8071067811865476 -1.6071067811865478 L 1.8730104533627367 -1.534393284163646 L 1.9314696123025454 -1.455570233019602 L 1.981921264348355 -1.371396736825998 L 2.0238795325112866 -1.2826834323650904 L 2.056940335732209 -1.1902846772544624 L 2.0807852804032305 -1.0950903220161288 L 2.095184726672197 -0.9980171403295606 L 2.1 -0.9 L 2.1 -0.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g></g>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="800" height="1400" viewBox="0 0 800 1400" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g transform="translate(0, 0)">
|
|
3
|
+
<style></style><rect class="boundary" x="0" y="0" fill="#000" width="800" height="600" data-type="pcb_background" data-pcb-layer="global"/><rect class="pcb-boundary" fill="none" stroke="#fff" stroke-width="0.3" x="150" y="50" width="500" height="500" data-type="pcb_boundary" data-pcb-layer="global"/><path class="pcb-board" d="M 150 550 L 650 550 L 650 50 L 150 50 Z" fill="none" stroke="rgba(255, 255, 255, 0.5)" stroke-width="5" data-type="pcb_board" data-pcb-layer="board"/><ellipse class="pcb-hole" cx="350" cy="200" rx="62.5" ry="37.5" fill="#FF26E2" data-type="pcb_hole" data-pcb-layer="drill"/><ellipse class="pcb-hole" cx="450" cy="350" rx="37.5" ry="62.5" fill="#FF26E2" data-type="pcb_hole" data-pcb-layer="drill"/>
|
|
4
|
+
</g>
|
|
5
|
+
<g transform="translate(0, 600) scale(26.666666666666668, 26.666666666666668) translate(14.9, 14.9)">
|
|
6
|
+
<rect x="-14.9" y="-14.9" width="30" height="30" fill="white"/><g transform="matrix(1 0 0 -1 0 0.1999999999999993)"><g transform="matrix(1,0,0,1,0,0)"><path d="M -4.9 -4.9 L 5.1 -4.9 L 5.1 5.1 L -4.9 5.1 L -4.9 -4.9 L -4.9 -4.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 0.35 2.1 L 0.3439809083402462 2.1735128552471705 L 0.325981600504038 2.2463177415120965 L 0.29617541966526095 2.317713507940847 L 0.25484941563910846 2.3870125742738173 L 0.20240158043544387 2.453547552619498 L 0.13933701537818155 2.5166776747647015 L 0.06626306670342119 2.575794963122734 L -0.016116523516815584 2.6303300858899106 L -0.10700839479544311 2.6797578400220528 L -0.2055372087254972 2.723602209226909 L -0.31075407896750273 2.7614409482612663 L -0.4216457095436377 2.792909649383465 L -0.5371441534319221 2.8177052517991568 L -0.6561370974798396 2.835588960302423 L -0.777478574588049 2.8463885450041477 L -0.8999999999999999 2.85 L -1.0225214254119508 2.8463885450041477 L -1.1438629025201603 2.835588960302423 L -1.2628558465680777 2.8177052517991568 L -1.3783542904563622 2.792909649383465 L -1.4892459210324973 2.7614409482612663 L -1.5944627912745024 2.723602209226909 L -1.6929916052045568 2.679757840022053 L -1.7838834764831843 2.630330085889911 L -1.8662630667034212 2.575794963122734 L -1.9393370153781815 2.5166776747647015 L -2.0024015804354436 2.4535475526194985 L -2.0548494156391084 2.3870125742738173 L -2.096175419665261 2.317713507940847 L -2.125981600504038 2.2463177415120965 L -2.143980908340246 2.1735128552471705 L -2.15 2.1 L -2.143980908340246 2.0264871447528296 L -2.125981600504038 1.9536822584879039 L -2.0961754196652613 1.8822864920591535 L -2.0548494156391084 1.8129874257261829 L -2.002401580435444 1.7464524473805019 L -1.939337015378182 1.6833223252352987 L -1.8662630667034215 1.624205036877266 L -1.7838834764831848 1.5696699141100896 L -1.6929916052045573 1.5202421599779476 L -1.5944627912745029 1.4763977907730912 L -1.4892459210324973 1.4385590517387339 L -1.3783542904563628 1.407090350616535 L -1.2628558465680781 1.3822947482008434 L -1.1438629025201608 1.3644110396975773 L -1.0225214254119506 1.3536114549958524 L -0.9000000000000002 1.35 L -0.7774785745880499 1.3536114549958524 L -0.6561370974798396 1.3644110396975773 L -0.5371441534319225 1.3822947482008434 L -0.4216457095436375 1.407090350616535 L -0.31075407896750307 1.4385590517387339 L -0.20553720872549774 1.476397790773091 L -0.107008394795443 1.5202421599779474 L -0.016116523516815806 1.5696699141100894 L 0.06626306670342086 1.6242050368772656 L 0.13933701537818155 1.6833223252352985 L 0.20240158043544343 1.7464524473805016 L 0.254849415639108 1.8129874257261824 L 0.29617541966526095 1.882286492059153 L 0.3259816005040378 1.9536822584879037 L 0.3439809083402462 2.0264871447528296 L 0.35 2.1 L 0.35 2.1 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 1.85 -0.9 L 1.8463885450041477 -0.7774785745880493 L 1.835588960302423 -0.6561370974798397 L 1.8177052517991568 -0.5371441534319221 L 1.792909649383465 -0.4216457095436378 L 1.7614409482612663 -0.31075407896750296 L 1.723602209226909 -0.2055372087254973 L 1.6797578400220528 -0.10700839479544311 L 1.6303300858899108 -0.016116523516815695 L 1.5757949631227341 0.06626306670342119 L 1.516677674764702 0.13933701537818155 L 1.4535475526194985 0.20240158043544365 L 1.3870125742738175 0.25484941563910846 L 1.3177135079408469 0.29617541966526095 L 1.2463177415120963 0.325981600504038 L 1.1735128552471707 0.34398090834024597 L 1.1 0.35 L 1.0264871447528296 0.3439809083402462 L 0.9536822584879039 0.325981600504038 L 0.8822864920591534 0.2961754196652612 L 0.8129874257261828 0.25484941563910846 L 0.7464524473805019 0.20240158043544387 L 0.6833223252352987 0.13933701537818155 L 0.624205036877266 0.0662630667034213 L 0.5696699141100895 -0.016116523516815584 L 0.5202421599779473 -0.10700839479544311 L 0.4763977907730911 -0.2055372087254973 L 0.4385590517387339 -0.31075407896750273 L 0.4070903506165351 -0.42164570954363767 L 0.3822947482008434 -0.537144153431922 L 0.36441103969757727 -0.6561370974798393 L 0.35361145499585245 -0.777478574588049 L 0.3500000000000001 -0.8999999999999999 L 0.35361145499585245 -1.0225214254119508 L 0.36441103969757727 -1.1438629025201605 L 0.3822947482008434 -1.2628558465680777 L 0.407090350616535 -1.3783542904563622 L 0.4385590517387338 -1.489245921032497 L 0.47639779077309097 -1.5944627912745024 L 0.5202421599779472 -1.6929916052045566 L 0.5696699141100894 -1.7838834764831843 L 0.6242050368772657 -1.866263066703421 L 0.6833223252352985 -1.9393370153781815 L 0.7464524473805016 -2.0024015804354436 L 0.8129874257261823 -2.054849415639108 L 0.8822864920591533 -2.096175419665261 L 0.9536822584879036 -2.125981600504038 L 1.0264871447528296 -2.143980908340246 L 1.0999999999999999 -2.15 L 1.17351285524717 -2.143980908340246 L 1.2463177415120963 -2.125981600504038 L 1.3177135079408466 -2.0961754196652613 L 1.3870125742738175 -2.0548494156391084 L 1.4535475526194983 -2.002401580435444 L 1.5166776747647015 -1.939337015378182 L 1.5757949631227341 -1.866263066703421 L 1.6303300858899106 -1.7838834764831848 L 1.6797578400220525 -1.6929916052045573 L 1.723602209226909 -1.5944627912745029 L 1.7614409482612663 -1.4892459210324975 L 1.792909649383465 -1.378354290456363 L 1.8177052517991568 -1.2628558465680781 L 1.835588960302423 -1.143862902520161 L 1.8463885450041477 -1.0225214254119506 L 1.85 -0.9 L 1.85 -0.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g></g>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="800" height="1400" viewBox="0 0 800 1400" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g transform="translate(0, 0)">
|
|
3
|
+
<style></style><rect class="boundary" x="0" y="0" fill="#000" width="800" height="600" data-type="pcb_background" data-pcb-layer="global"/><rect class="pcb-boundary" fill="none" stroke="#fff" stroke-width="0.3" x="150" y="50" width="500" height="500" data-type="pcb_boundary" data-pcb-layer="global"/><path class="pcb-board" d="M 150 550 L 650 550 L 650 50 L 150 50 Z" fill="none" stroke="rgba(255, 255, 255, 0.5)" stroke-width="5" data-type="pcb_board" data-pcb-layer="board"/><path class="pcb-hole" fill="#FF26E2" d="M312.5,162.5 h75 a37.5,37.5 0 0 1 0,75 h-75 a37.5,37.5 0 0 1 0,-75 z" data-type="pcb_hole" data-pcb-layer="drill"/><path class="pcb-hole" fill="#FF26E2" d="M412.5,312.5 v75 a37.5,37.5 0 0 0 75,0 v-75 a37.5,37.5 0 0 0 -75,0 z" data-type="pcb_hole" data-pcb-layer="drill"/>
|
|
4
|
+
</g>
|
|
5
|
+
<g transform="translate(0, 600) scale(26.666666666666668, 26.666666666666668) translate(14.9, 14.9)">
|
|
6
|
+
<rect x="-14.9" y="-14.9" width="30" height="30" fill="white"/><g transform="matrix(1 0 0 -1 0 0.1999999999999993)"><g transform="matrix(1,0,0,1,0,0)"><path d="M -4.9 -4.9 L 5.1 -4.9 L 5.1 5.1 L -4.9 5.1 L -4.9 -4.9 L -4.9 -4.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -0.14999999999999997 1.35 L -0.07648714475282944 1.3536114549958524 L -0.0036822584879037668 1.3644110396975773 L 0.06771350794084674 1.3822947482008434 L 0.13701257427381736 1.407090350616535 L 0.2035475526194983 1.4385590517387339 L 0.2666776747647017 1.4763977907730912 L 0.3257949631227341 1.5202421599779474 L 0.3803300858899107 1.5696699141100896 L 0.42975784002205275 1.624205036877266 L 0.4736022092269089 1.6833223252352985 L 0.5114409482612662 1.7464524473805016 L 0.542909649383465 1.8129874257261829 L 0.5677052517991567 1.8822864920591533 L 0.5855889603024228 1.9536822584879039 L 0.5963885450041476 2.0264871447528296 L 0.6 2.1 L 0.5963885450041476 2.1735128552471705 L 0.5855889603024228 2.2463177415120965 L 0.5677052517991567 2.3177135079408466 L 0.542909649383465 2.3870125742738173 L 0.5114409482612662 2.4535475526194985 L 0.473602209226909 2.5166776747647015 L 0.42975784002205275 2.575794963122734 L 0.3803300858899107 2.6303300858899106 L 0.3257949631227341 2.6797578400220528 L 0.2666776747647015 2.723602209226909 L 0.2035475526194983 2.7614409482612663 L 0.13701257427381736 2.792909649383465 L 0.06771350794084674 2.8177052517991568 L -0.003682258487903628 2.835588960302423 L -0.07648714475282944 2.8463885450041477 L -0.14999999999999997 2.85 L -1.65 2.85 L -1.65 2.85 L -1.7235128552471704 2.8463885450041477 L -1.7963177415120961 2.835588960302423 L -1.8677135079408465 2.8177052517991568 L -1.9370125742738171 2.792909649383465 L -2.0035475526194984 2.7614409482612663 L -2.0666776747647013 2.723602209226909 L -2.125794963122734 2.679757840022053 L -2.1803300858899104 2.630330085889911 L -2.2297578400220526 2.575794963122734 L -2.273602209226909 2.5166776747647015 L -2.311440948261266 2.4535475526194985 L -2.342909649383465 2.3870125742738173 L -2.3677052517991566 2.317713507940847 L -2.3855889603024227 2.2463177415120965 L -2.3963885450041476 2.1735128552471705 L -2.4 2.1 L -2.3963885450041476 2.0264871447528296 L -2.3855889603024227 1.9536822584879039 L -2.3677052517991566 1.8822864920591535 L -2.342909649383465 1.8129874257261829 L -2.311440948261266 1.7464524473805019 L -2.273602209226909 1.6833223252352987 L -2.229757840022053 1.624205036877266 L -2.180330085889911 1.5696699141100896 L -2.1257949631227335 1.5202421599779472 L -2.0666776747647013 1.4763977907730912 L -2.0035475526194984 1.4385590517387339 L -1.9370125742738176 1.407090350616535 L -1.8677135079408467 1.3822947482008434 L -1.7963177415120963 1.3644110396975773 L -1.7235128552471704 1.3536114549958524 L -1.6500000000000001 1.35 L -0.15000000000000002 1.35 L -0.14999999999999997 1.35 L -0.14999999999999997 1.35 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 0.3500000000000001 -1.65 L 0.35361145499585245 -1.7235128552471704 L 0.36441103969757727 -1.7963177415120961 L 0.3822947482008434 -1.8677135079408465 L 0.407090350616535 -1.9370125742738171 L 0.4385590517387338 -2.003547552619498 L 0.47639779077309097 -2.0666776747647013 L 0.5202421599779472 -2.125794963122734 L 0.5696699141100894 -2.1803300858899104 L 0.6242050368772657 -2.229757840022052 L 0.6833223252352985 -2.273602209226909 L 0.7464524473805016 -2.311440948261266 L 0.8129874257261823 -2.342909649383465 L 0.8822864920591533 -2.3677052517991566 L 0.9536822584879036 -2.3855889603024227 L 1.0264871447528296 -2.3963885450041476 L 1.0999999999999999 -2.4 L 1.17351285524717 -2.3963885450041476 L 1.2463177415120963 -2.3855889603024227 L 1.3177135079408466 -2.3677052517991566 L 1.3870125742738175 -2.342909649383465 L 1.4535475526194983 -2.311440948261266 L 1.5166776747647015 -2.273602209226909 L 1.5757949631227337 -2.229757840022053 L 1.6303300858899106 -2.180330085889911 L 1.679757840022053 -2.125794963122734 L 1.723602209226909 -2.0666776747647013 L 1.7614409482612663 -2.0035475526194984 L 1.792909649383465 -1.9370125742738176 L 1.8177052517991568 -1.867713507940847 L 1.835588960302423 -1.7963177415120963 L 1.8463885450041477 -1.7235128552471704 L 1.85 -1.6500000000000001 L 1.85 -0.15000000000000002 L 1.85 -0.15000000000000002 L 1.8463885450041477 -0.07648714475282957 L 1.835588960302423 -0.0036822584879038223 L 1.8177052517991568 0.06771350794084674 L 1.792909649383465 0.1370125742738173 L 1.7614409482612663 0.2035475526194982 L 1.723602209226909 0.2666776747647016 L 1.6797578400220528 0.3257949631227341 L 1.6303300858899108 0.3803300858899106 L 1.5757949631227341 0.42975784002205275 L 1.516677674764702 0.4736022092269089 L 1.4535475526194985 0.5114409482612662 L 1.3870125742738175 0.542909649383465 L 1.3177135079408469 0.5677052517991567 L 1.2463177415120963 0.5855889603024228 L 1.1735128552471707 0.5963885450041476 L 1.1 0.6 L 1.0264871447528296 0.5963885450041476 L 0.9536822584879039 0.5855889603024228 L 0.8822864920591534 0.5677052517991567 L 0.8129874257261828 0.542909649383465 L 0.7464524473805019 0.5114409482612663 L 0.6833223252352987 0.473602209226909 L 0.624205036877266 0.42975784002205286 L 0.5696699141100895 0.3803300858899107 L 0.5202421599779473 0.3257949631227341 L 0.4763977907730911 0.2666776747647016 L 0.4385590517387339 0.20354755261949836 L 0.4070903506165351 0.1370125742738174 L 0.3822947482008434 0.06771350794084677 L 0.36441103969757727 -0.0036822584879035725 L 0.35361145499585245 -0.0764871447528294 L 0.3500000000000001 -0.14999999999999994 L 0.3500000000000001 -1.65 L 0.3500000000000001 -1.65 L 0.3500000000000001 -1.65 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g></g>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="800" height="1400" viewBox="0 0 800 1400" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g transform="translate(0, 0)">
|
|
3
|
+
<style></style><rect class="boundary" x="0" y="0" fill="#000" width="800" height="600" data-type="pcb_background" data-pcb-layer="global"/><rect class="pcb-boundary" fill="none" stroke="#fff" stroke-width="0.3" x="150" y="50" width="500" height="500" data-type="pcb_boundary" data-pcb-layer="global"/><path class="pcb-board" d="M 150 550 L 650 550 L 650 50 L 150 50 Z" fill="none" stroke="rgba(255, 255, 255, 0.5)" stroke-width="5" data-type="pcb_board" data-pcb-layer="board"/><rect class="pcb-hole" x="300" y="162.5" width="100" height="75" fill="#FF26E2" data-type="pcb_hole" data-pcb-layer="drill"/><rect class="pcb-hole" x="412.5" y="300" width="75" height="100" fill="#FF26E2" data-type="pcb_hole" data-pcb-layer="drill"/>
|
|
4
|
+
</g>
|
|
5
|
+
<g transform="translate(0, 600) scale(26.666666666666668, 26.666666666666668) translate(14.9, 14.9)">
|
|
6
|
+
<rect x="-14.9" y="-14.9" width="30" height="30" fill="white"/><g transform="matrix(1 0 0 -1 0 0.1999999999999993)"><g transform="matrix(1,0,0,1,0,0)"><path d="M -4.9 -4.9 L 5.1 -4.9 L 5.1 5.1 L -4.9 5.1 L -4.9 -4.9 L -4.9 -4.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -1.9 1.35 L 0.09999999999999998 1.35 L 0.09999999999999998 1.35 L 0.09999999999999998 1.35 L 0.09999999999999998 2.85 L 0.09999999999999998 2.85 L 0.09999999999999998 2.85 L -1.9 2.85 L -1.9 2.85 L -1.9 2.85 L -1.9 1.35 L -1.9 1.35 L -1.9 1.35 L -1.9 1.35 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 0.3500000000000001 -1.9 L 1.85 -1.9 L 1.85 -1.9 L 1.85 -1.9 L 1.85 0.09999999999999998 L 1.85 0.09999999999999998 L 1.85 0.09999999999999998 L 0.3500000000000001 0.09999999999999998 L 0.3500000000000001 0.09999999999999998 L 0.3500000000000001 0.09999999999999998 L 0.3500000000000001 -1.9 L 0.3500000000000001 -1.9 L 0.3500000000000001 -1.9 L 0.3500000000000001 -1.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g></g>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="800" height="1400" viewBox="0 0 800 1400" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g transform="translate(0, 0)">
|
|
3
|
+
<style></style><rect class="boundary" x="0" y="0" fill="#000" width="800" height="600" data-type="pcb_background" data-pcb-layer="global"/><rect class="pcb-boundary" fill="none" stroke="#fff" stroke-width="0.3" x="150" y="50" width="500" height="500" data-type="pcb_boundary" data-pcb-layer="global"/><path class="pcb-board" d="M 150 550 L 650 550 L 650 50 L 150 50 Z" fill="none" stroke="rgba(255, 255, 255, 0.5)" stroke-width="5" data-type="pcb_board" data-pcb-layer="board"/><path class="pcb-hole" fill="#FF26E2" d="M-37.5,-37.5 h75 a37.5,37.5 0 0 1 0,75 h-75 a37.5,37.5 0 0 1 0,-75 z" transform="translate(350 200) rotate(-45)" data-type="pcb_hole" data-pcb-layer="drill"/><path class="pcb-hole" fill="#FF26E2" d="M-37.5,-37.5 v75 a37.5,37.5 0 0 0 75,0 v-75 a37.5,37.5 0 0 0 -75,0 z" transform="translate(450 350) rotate(-90)" data-type="pcb_hole" data-pcb-layer="drill"/>
|
|
4
|
+
</g>
|
|
5
|
+
<g transform="translate(0, 600) scale(26.666666666666668, 26.666666666666668) translate(14.9, 14.9)">
|
|
6
|
+
<rect x="-14.9" y="-14.9" width="30" height="30" fill="white"/><g transform="matrix(1 0 0 -1 0 0.1999999999999993)"><g transform="matrix(1,0,0,1,0,0)"><path d="M -4.9 -4.9 L 5.1 -4.9 L 5.1 5.1 L -4.9 5.1 L -4.9 -4.9 L -4.9 -4.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 0.16066017177982128 2.0999999999999996 L 0.21008792591196335 2.154535122767177 L 0.2539322951168196 2.213652411125209 L 0.2917710341511769 2.2767825332704126 L 0.3232397352733757 2.3433175116160934 L 0.34803533768906736 2.412616577949064 L 0.36591904619233356 2.4840123443778146 L 0.37671863089405827 2.55681723064274 L 0.3803300858899105 2.6303300858899106 L 0.37671863089405827 2.703842941137081 L 0.36591904619233345 2.776647827402007 L 0.34803533768906747 2.848043593830757 L 0.3232397352733756 2.917342660163728 L 0.291771034151177 2.9838776385094086 L 0.2539322951168196 3.047007760654612 L 0.21008792591196335 3.1061250490126446 L 0.1606601717798214 3.1606601717798215 L 0.10612504901264476 3.2100879259119632 L 0.04700776065461218 3.2539322951168197 L -0.01612236149059082 3.2917710341511763 L -0.08265733983627196 3.3232397352733756 L -0.15195640616924266 3.3480353376890677 L -0.22335217259799278 3.3659190461923334 L -0.2961570588629188 3.376718630894058 L -0.36966991411008915 3.3803300858899106 L -0.4431827693572597 3.376718630894058 L -0.5159876556221858 3.3659190461923334 L -0.5873834220509359 3.3480353376890677 L -0.6566824883839065 3.3232397352733756 L -0.7232174667295875 3.291771034151177 L -0.7863475888747908 3.2539322951168197 L -0.8454648772328234 3.2100879259119637 L -0.8999999999999999 3.1606601717798215 L -1.9606601717798213 2.1000000000000005 L -1.9606601717798213 2.1000000000000005 L -2.0100879259119635 2.0454648772328237 L -2.0539322951168195 1.9863475888747915 L -2.0917710341511766 1.923217466729588 L -2.1232397352733754 1.8566824883839068 L -2.148035337689067 1.7873834220509361 L -2.165919046192333 1.715987655622186 L -2.176718630894059 1.6431827693572605 L -2.180330085889911 1.5696699141100898 L -2.1767186308940585 1.4961570588629192 L -2.1659190461923337 1.4233521725979932 L -2.1480353376890675 1.3519564061692428 L -2.123239735273376 1.2826573398362722 L -2.091771034151177 1.2161223614905914 L -2.05393229511682 1.1529922393453882 L -2.0100879259119635 1.0938749509873555 L -1.9606601717798213 1.039339828220179 L -1.906125049012645 0.9899120740880369 L -1.8470077606546125 0.9460677048831807 L -1.783877638509409 0.9082289658488234 L -1.7173426601637283 0.8767602647266245 L -1.6480435938307576 0.8519646623109328 L -1.5766478274020073 0.8340809538076668 L -1.5038429411370815 0.8232813691059415 L -1.430330085889911 0.8196699141100893 L -1.35681723064274 0.823281369105942 L -1.2840123443778144 0.8340809538076669 L -1.212616577949064 0.8519646623109326 L -1.1433175116160936 0.8767602647266242 L -1.0767825332704124 0.9082289658488232 L -1.013652411125209 0.9460677048831804 L -0.9545351227671766 0.9899120740880368 L -0.9000000000000002 1.0393398282201787 L 0.16066017177982128 2.0999999999999996 L 0.16066017177982128 2.0999999999999996 L 0.16066017177982128 2.0999999999999996 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 1.85 -1.65 L 1.9235128552471705 -1.6463885450041476 L 1.996317741512096 -1.6355889603024227 L 2.0677135079408466 -1.6177052517991566 L 2.1370125742738173 -1.5929096493834651 L 2.203547552619498 -1.5614409482612663 L 2.2666776747647015 -1.523602209226909 L 2.325794963122734 -1.479757840022053 L 2.3803300858899106 -1.4303300858899108 L 2.4297578400220523 -1.3757949631227344 L 2.473602209226909 -1.3166776747647018 L 2.5114409482612663 -1.2535475526194984 L 2.542909649383465 -1.1870125742738178 L 2.5677052517991568 -1.117713507940847 L 2.585588960302423 -1.0463177415120966 L 2.5963885450041477 -0.9735128552471706 L 2.6 -0.9000000000000004 L 2.5963885450041477 -0.8264871447528301 L 2.585588960302423 -0.7536822584879039 L 2.5677052517991568 -0.6822864920591536 L 2.542909649383465 -0.6129874257261827 L 2.5114409482612663 -0.5464524473805019 L 2.473602209226909 -0.4833223252352987 L 2.429757840022053 -0.42420503687726646 L 2.380330085889911 -0.3696699141100896 L 2.325794963122734 -0.3202421599779472 L 2.2666776747647015 -0.2763977907730912 L 2.2035475526194985 -0.23855905173873387 L 2.1370125742738177 -0.20709035061653508 L 2.067713507940847 -0.1822947482008434 L 1.9963177415120965 -0.16441103969757725 L 1.9235128552471705 -0.15361145499585244 L 1.85 -0.15000000000000008 L 0.3500000000000001 -0.14999999999999997 L 0.3500000000000001 -0.14999999999999997 L 0.27648714475282965 -0.15361145499585233 L 0.2036822584879039 -0.16441103969757714 L 0.13228649205915333 -0.1822947482008433 L 0.06298742572618288 -0.20709035061653497 L -0.003547552619498129 -0.23855905173873376 L -0.06667767476470154 -0.27639779077309107 L -0.12579496312273397 -0.3202421599779473 L -0.1803300858899104 -0.36966991411008926 L -0.22975784002205257 -0.4242050368772659 L -0.2736022092269088 -0.48332232523529806 L -0.3114409482612661 -0.5464524473805015 L -0.3429096493834649 -0.6129874257261825 L -0.3677052517991566 -0.6822864920591531 L -0.38558896030242273 -0.7536822584879037 L -0.39638854500414755 -0.8264871447528293 L -0.3999999999999999 -0.8999999999999999 L -0.39638854500414755 -0.9735128552471704 L -0.38558896030242273 -1.0463177415120963 L -0.3677052517991566 -1.1177135079408467 L -0.3429096493834649 -1.1870125742738173 L -0.3114409482612661 -1.2535475526194984 L -0.27360220922690903 -1.3166776747647013 L -0.2297578400220528 -1.375794963122734 L -0.18033008588991062 -1.4303300858899106 L -0.12579496312273397 -1.4797578400220528 L -0.06667767476470154 -1.523602209226909 L -0.003547552619498351 -1.5614409482612661 L 0.06298742572618266 -1.592909649383465 L 0.13228649205915333 -1.6177052517991566 L 0.20368225848790367 -1.6355889603024227 L 0.27648714475282943 -1.6463885450041476 L 0.35 -1.65 L 1.85 -1.65 L 1.85 -1.65 L 1.85 -1.65 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g></g>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="800" height="1400" viewBox="0 0 800 1400" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g transform="translate(0, 0)">
|
|
3
|
+
<style></style><rect class="boundary" x="0" y="0" fill="#000" width="800" height="600" data-type="pcb_background" data-pcb-layer="global"/><rect class="pcb-boundary" fill="none" stroke="#fff" stroke-width="0.3" x="150" y="50" width="500" height="500" data-type="pcb_boundary" data-pcb-layer="global"/><path class="pcb-board" d="M 150 550 L 650 550 L 650 50 L 150 50 Z" fill="none" stroke="rgba(255, 255, 255, 0.5)" stroke-width="5" data-type="pcb_board" data-pcb-layer="board"/><circle class="pcb-hole" cx="300" cy="200" r="37.5" fill="#FF26E2" data-type="pcb_hole" data-pcb-layer="drill"/><rect class="pcb-hole" x="450" y="162.5" width="100" height="75" fill="#FF26E2" data-type="pcb_hole" data-pcb-layer="drill"/><path class="pcb-hole" fill="#FF26E2" d="M362.5,362.5 h75 a37.5,37.5 0 0 1 0,75 h-75 a37.5,37.5 0 0 1 0,-75 z" data-type="pcb_hole" data-pcb-layer="drill"/>
|
|
4
|
+
</g>
|
|
5
|
+
<g transform="translate(0, 600) scale(26.666666666666668, 26.666666666666668) translate(14.9, 14.9)">
|
|
6
|
+
<rect x="-14.9" y="-14.9" width="30" height="30" fill="white"/><g transform="matrix(1 0 0 -1 0 0.1999999999999993)"><g transform="matrix(1,0,0,1,0,0)"><path d="M -4.9 -4.9 L 5.1 -4.9 L 5.1 5.1 L -4.9 5.1 L -4.9 -4.9 L -4.9 -4.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -4.9 -4.9 L 5.1 -4.9 L 5.1 5.1 L -4.9 5.1 L -4.9 -4.9 L -4.9 -4.9" fill="none" stroke="#FF0000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><clipPath id="clip-1764625709272-5ticjmtpx__stack1"><path d="M -0.95 2.1 L -0.9545745096614129 2.1931162833130826 L -0.968253983616931 2.285335805915322 L -0.9909066810544016 2.3757704433917395 L -1.0223144441142775 2.4635492607468352 L -1.0621747988690626 2.547826899984698 L -1.110103868312582 2.627791721368622 L -1.1656400693053999 2.7026736199554633 L -1.2282485578727798 2.7717514421272202 L -1.2973263800445367 2.8343599306946 L -1.3722082786313776 2.889896131687418 L -1.452173100015302 2.9378252011309374 L -1.5364507392531646 2.9776855558857225 L -1.6242295566082607 3.0090933189455984 L -1.714664194084678 3.031746016383069 L -1.8068837166869172 3.045425490338587 L -1.9 3.05 L -1.9931162833130824 3.0454254903385873 L -2.0853358059153217 3.031746016383069 L -2.175770443391739 3.0090933189455984 L -2.263549260746835 2.9776855558857225 L -2.347826899984698 2.9378252011309374 L -2.4277917213686218 2.889896131687418 L -2.502673619955463 2.8343599306946006 L -2.57175144212722 2.7717514421272202 L -2.6343599306946 2.7026736199554633 L -2.689896131687418 2.627791721368622 L -2.737825201130937 2.547826899984698 L -2.7776855558857223 2.4635492607468352 L -2.809093318945598 2.3757704433917395 L -2.831746016383069 2.2853358059153224 L -2.8454254903385867 2.193116283313083 L -2.8499999999999996 2.1 L -2.845425490338587 2.0068837166869176 L -2.831746016383069 1.9146641940846783 L -2.809093318945598 1.8242295566082611 L -2.7776855558857223 1.736450739253165 L -2.737825201130937 1.6521731000153024 L -2.689896131687418 1.5722082786313782 L -2.6343599306946004 1.497326380044537 L -2.57175144212722 1.42824855787278 L -2.5026736199554636 1.3656400693054003 L -2.4277917213686218 1.310103868312582 L -2.347826899984698 1.2621747988690628 L -2.263549260746836 1.222314444114278 L -2.1757704433917393 1.1909066810544018 L -2.085335805915322 1.1682539836169314 L -1.9931162833130824 1.154574509661413 L -1.9000000000000001 1.1500000000000001 L -1.8068837166869178 1.154574509661413 L -1.714664194084678 1.1682539836169312 L -1.624229556608261 1.1909066810544018 L -1.5364507392531643 1.2223144441142777 L -1.4521731000153022 1.2621747988690628 L -1.372208278631378 1.310103868312582 L -1.2973263800445367 1.3656400693054 L -1.22824855787278 1.42824855787278 L -1.1656400693054 1.4973263800445364 L -1.110103868312582 1.572208278631378 L -1.0621747988690629 1.6521731000153022 L -1.0223144441142777 1.7364507392531643 L -0.9909066810544016 1.8242295566082607 L -0.9682539836169312 1.9146641940846778 L -0.9545745096614129 2.0068837166869176 L -0.95 2.1 L -0.95 2.1 Z"/></clipPath><g clip-path="url(#clip-1764625709272-5ticjmtpx__stack1)"><line x1="-1.1953701320234789" y1="1.1500000000000001" x2="-0.95" y2="1.395370132023479" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.4499285732506362" y1="1.1500000000000001" x2="-0.95" y2="1.6499285732506361" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.704487014477793" y1="1.1500000000000001" x2="-0.95" y2="1.9044870144777928" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.9590454557049504" y1="1.1500000000000001" x2="-0.95" y2="2.15904545570495" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.2136038969321072" y1="1.1500000000000001" x2="-0.95" y2="2.4136038969321074" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.4681623381592646" y1="1.1500000000000001" x2="-0.95" y2="2.6681623381592643" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.7227207793864214" y1="1.1500000000000001" x2="-0.95" y2="2.922720779386421" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.8499999999999996" y1="1.2772792206135792" x2="-1.0772792206135786" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.8499999999999996" y1="1.5318376618407363" x2="-1.3318376618407357" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.8499999999999996" y1="1.7863961030678932" x2="-1.5863961030678926" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.8499999999999996" y1="2.0409545442950505" x2="-1.84095454429505" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.8499999999999996" y1="2.2955129855222074" x2="-2.095512985522207" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.8499999999999996" y1="2.5500714267493647" x2="-2.3500714267493645" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.8499999999999996" y1="2.804629867976521" x2="-2.604629867976521" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.95" y1="2.804629867976521" x2="-1.1953701320234784" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.95" y1="2.550071426749364" x2="-1.4499285732506357" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.95" y1="2.2955129855222065" x2="-1.704487014477793" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.95" y1="2.0409545442950496" x2="-1.95904545570495" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.95" y1="1.7863961030678925" x2="-2.2136038969321072" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.95" y1="1.5318376618407357" x2="-2.4681623381592637" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.95" y1="1.2772792206135786" x2="-2.722720779386421" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.0772792206135788" y1="1.1500000000000001" x2="-2.8499999999999996" y2="2.922720779386421" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.331837661840736" y1="1.1500000000000001" x2="-2.8499999999999996" y2="2.668162338159264" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.5863961030678926" y1="1.1500000000000001" x2="-2.8499999999999996" y2="2.4136038969321074" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.84095454429505" y1="1.1500000000000001" x2="-2.8499999999999996" y2="2.15904545570495" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.095512985522207" y1="1.1500000000000001" x2="-2.8499999999999996" y2="1.9044870144777928" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.3500714267493645" y1="1.1500000000000001" x2="-2.8499999999999996" y2="1.6499285732506355" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-2.6046298679765214" y1="1.1500000000000001" x2="-2.8499999999999996" y2="1.3953701320234784" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/></g><path d="M -0.95 2.1 L -0.9545745096614129 2.1931162833130826 L -0.968253983616931 2.285335805915322 L -0.9909066810544016 2.3757704433917395 L -1.0223144441142775 2.4635492607468352 L -1.0621747988690626 2.547826899984698 L -1.110103868312582 2.627791721368622 L -1.1656400693053999 2.7026736199554633 L -1.2282485578727798 2.7717514421272202 L -1.2973263800445367 2.8343599306946 L -1.3722082786313776 2.889896131687418 L -1.452173100015302 2.9378252011309374 L -1.5364507392531646 2.9776855558857225 L -1.6242295566082607 3.0090933189455984 L -1.714664194084678 3.031746016383069 L -1.8068837166869172 3.045425490338587 L -1.9 3.05 L -1.9931162833130824 3.0454254903385873 L -2.0853358059153217 3.031746016383069 L -2.175770443391739 3.0090933189455984 L -2.263549260746835 2.9776855558857225 L -2.347826899984698 2.9378252011309374 L -2.4277917213686218 2.889896131687418 L -2.502673619955463 2.8343599306946006 L -2.57175144212722 2.7717514421272202 L -2.6343599306946 2.7026736199554633 L -2.689896131687418 2.627791721368622 L -2.737825201130937 2.547826899984698 L -2.7776855558857223 2.4635492607468352 L -2.809093318945598 2.3757704433917395 L -2.831746016383069 2.2853358059153224 L -2.8454254903385867 2.193116283313083 L -2.8499999999999996 2.1 L -2.845425490338587 2.0068837166869176 L -2.831746016383069 1.9146641940846783 L -2.809093318945598 1.8242295566082611 L -2.7776855558857223 1.736450739253165 L -2.737825201130937 1.6521731000153024 L -2.689896131687418 1.5722082786313782 L -2.6343599306946004 1.497326380044537 L -2.57175144212722 1.42824855787278 L -2.5026736199554636 1.3656400693054003 L -2.4277917213686218 1.310103868312582 L -2.347826899984698 1.2621747988690628 L -2.263549260746836 1.222314444114278 L -2.1757704433917393 1.1909066810544018 L -2.085335805915322 1.1682539836169314 L -1.9931162833130824 1.154574509661413 L -1.9000000000000001 1.1500000000000001 L -1.8068837166869178 1.154574509661413 L -1.714664194084678 1.1682539836169312 L -1.624229556608261 1.1909066810544018 L -1.5364507392531643 1.2223144441142777 L -1.4521731000153022 1.2621747988690628 L -1.372208278631378 1.310103868312582 L -1.2973263800445367 1.3656400693054 L -1.22824855787278 1.42824855787278 L -1.1656400693054 1.4973263800445364 L -1.110103868312582 1.572208278631378 L -1.0621747988690629 1.6521731000153022 L -1.0223144441142777 1.7364507392531643 L -0.9909066810544016 1.8242295566082607 L -0.9682539836169312 1.9146641940846778 L -0.9545745096614129 2.0068837166869176 L -0.95 2.1 L -0.95 2.1 Z" fill="none" stroke="#FF0000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -1.15 2.1 L -1.1536114549958523 2.1735128552471705 L -1.164411039697577 2.2463177415120965 L -1.1822947482008432 2.317713507940847 L -1.207090350616535 2.3870125742738173 L -1.2385590517387337 2.453547552619498 L -1.276397790773091 2.5166776747647015 L -1.3202421599779472 2.575794963122734 L -1.3696699141100892 2.6303300858899106 L -1.4242050368772659 2.6797578400220528 L -1.483322325235298 2.723602209226909 L -1.5464524473805015 2.7614409482612663 L -1.6129874257261825 2.792909649383465 L -1.6822864920591531 2.8177052517991568 L -1.7536822584879037 2.835588960302423 L -1.8264871447528293 2.8463885450041477 L -1.9 2.85 L -1.9735128552471704 2.8463885450041477 L -2.046317741512096 2.835588960302423 L -2.1177135079408465 2.8177052517991568 L -2.187012574273817 2.792909649383465 L -2.2535475526194984 2.7614409482612663 L -2.3166776747647013 2.723602209226909 L -2.375794963122734 2.679757840022053 L -2.4303300858899104 2.630330085889911 L -2.4797578400220526 2.575794963122734 L -2.523602209226909 2.5166776747647015 L -2.561440948261266 2.4535475526194985 L -2.592909649383465 2.3870125742738173 L -2.6177052517991566 2.317713507940847 L -2.6355889603024227 2.2463177415120965 L -2.6463885450041476 2.1735128552471705 L -2.65 2.1 L -2.6463885450041476 2.0264871447528296 L -2.6355889603024227 1.9536822584879039 L -2.6177052517991566 1.8822864920591535 L -2.592909649383465 1.8129874257261829 L -2.561440948261266 1.7464524473805019 L -2.523602209226909 1.6833223252352987 L -2.479757840022053 1.624205036877266 L -2.430330085889911 1.5696699141100896 L -2.3757949631227344 1.5202421599779476 L -2.3166776747647013 1.4763977907730912 L -2.2535475526194984 1.4385590517387339 L -2.1870125742738176 1.407090350616535 L -2.117713507940847 1.3822947482008434 L -2.0463177415120963 1.3644110396975773 L -1.9735128552471704 1.3536114549958524 L -1.9000000000000001 1.35 L -1.82648714475283 1.3536114549958524 L -1.7536822584879037 1.3644110396975773 L -1.6822864920591534 1.3822947482008434 L -1.6129874257261825 1.407090350616535 L -1.5464524473805017 1.4385590517387339 L -1.4833223252352985 1.476397790773091 L -1.4242050368772659 1.5202421599779474 L -1.3696699141100894 1.5696699141100894 L -1.3202421599779475 1.6242050368772656 L -1.276397790773091 1.6833223252352985 L -1.2385590517387337 1.7464524473805016 L -1.207090350616535 1.8129874257261824 L -1.1822947482008432 1.882286492059153 L -1.164411039697577 1.9536822584879037 L -1.1536114549958523 2.0264871447528296 L -1.15 2.1 L -1.15 2.1 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><clipPath id="clip-1764625709272-hcqbw77pr__stack1"><path d="M 0.9000000000000001 1.1500000000000001 L 3.3 1.1500000000000001 L 3.3 1.1500000000000001 L 3.3 1.1500000000000001 L 3.3 3.05 L 3.3 3.05 L 3.3 3.05 L 0.9000000000000001 3.05 L 0.9000000000000001 3.05 L 0.9000000000000001 3.05 L 0.9000000000000001 1.1500000000000001 L 0.9000000000000001 1.1500000000000001 L 0.9000000000000001 1.1500000000000001 L 0.9000000000000001 1.1500000000000001 Z"/></clipPath><g clip-path="url(#clip-1764625709272-hcqbw77pr__stack1)"><line x1="3.1864675298172567" y1="1.1500000000000001" x2="3.3" y2="1.2635324701827433" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="2.9319090885901" y1="1.1500000000000001" x2="3.3" y2="1.5180909114099" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="2.6773506473629434" y1="1.1500000000000001" x2="3.3" y2="1.7726493526370564" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="2.422792206135786" y1="1.1500000000000001" x2="3.3" y2="2.0272077938642137" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="2.1682337649086287" y1="1.1500000000000001" x2="3.3" y2="2.2817662350913706" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.9136753236814716" y1="1.1500000000000001" x2="3.3" y2="2.536324676318528" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.6591168824543143" y1="1.1500000000000001" x2="3.3" y2="2.790883117545685" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.4045584412271572" y1="1.1500000000000001" x2="3.3" y2="3.0454415587728425" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.15" y1="1.1500000000000001" x2="3.05" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.9000000000000001" y1="1.1545584412271577" x2="2.7954415587728425" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.9000000000000001" y1="1.4091168824543143" x2="2.5408831175456856" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.9000000000000001" y1="1.6636753236814714" x2="2.2863246763185288" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.9000000000000001" y1="1.9182337649086285" x2="2.031766235091372" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.9000000000000001" y1="2.172792206135785" x2="1.7772077938642148" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.9000000000000001" y1="2.4273506473629425" x2="1.5226493526370575" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.9000000000000001" y1="2.6819090885901" x2="1.2680909114099002" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.9000000000000001" y1="2.9364675298172562" x2="1.0135324701827437" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="3.3" y1="2.9364675298172562" x2="3.1864675298172562" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="3.3" y1="2.6819090885901" x2="2.9319090885901" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="3.3" y1="2.4273506473629434" x2="2.6773506473629434" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="3.3" y1="2.172792206135786" x2="2.4227922061357865" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="3.3" y1="1.9182337649086287" x2="2.168233764908629" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="3.3" y1="1.6636753236814714" x2="1.9136753236814719" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="3.3" y1="1.4091168824543139" x2="1.6591168824543143" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="3.3" y1="1.154558441227158" x2="1.4045584412271581" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="3.0500000000000003" y1="1.1500000000000001" x2="1.1500000000000004" y2="3.05" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="2.795441558772843" y1="1.1500000000000001" x2="0.9000000000000001" y2="3.0454415587728425" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="2.540883117545686" y1="1.1500000000000001" x2="0.9000000000000001" y2="2.790883117545686" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="2.2863246763185288" y1="1.1500000000000001" x2="0.9000000000000001" y2="2.536324676318529" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="2.0317662350913714" y1="1.1500000000000001" x2="0.9000000000000001" y2="2.2817662350913714" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.7772077938642146" y1="1.1500000000000001" x2="0.9000000000000001" y2="2.0272077938642146" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.5226493526370573" y1="1.1500000000000001" x2="0.9000000000000001" y2="1.7726493526370573" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.2680909114099" y1="1.1500000000000001" x2="0.9000000000000001" y2="1.5180909114099002" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.013532470182743" y1="1.1500000000000001" x2="0.9000000000000001" y2="1.263532470182743" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/></g><path d="M 0.9000000000000001 1.1500000000000001 L 3.3 1.1500000000000001 L 3.3 1.1500000000000001 L 3.3 1.1500000000000001 L 3.3 3.05 L 3.3 3.05 L 3.3 3.05 L 0.9000000000000001 3.05 L 0.9000000000000001 3.05 L 0.9000000000000001 3.05 L 0.9000000000000001 1.1500000000000001 L 0.9000000000000001 1.1500000000000001 L 0.9000000000000001 1.1500000000000001 L 0.9000000000000001 1.1500000000000001 Z" fill="none" stroke="#FF0000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 1.1 1.35 L 3.1 1.35 L 3.1 1.35 L 3.1 1.35 L 3.1 2.85 L 3.1 2.85 L 3.1 2.85 L 1.1 2.85 L 1.1 2.85 L 1.1 2.85 L 1.1 1.35 L 1.1 1.35 L 1.1 1.35 L 1.1 1.35 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><clipPath id="clip-1764625709272-tlzebyejb__stack1"><path d="M 0.8500000000000001 -2.8499999999999996 L 0.9431162833130827 -2.8454254903385867 L 1.035335805915322 -2.831746016383069 L 1.1257704433917393 -2.809093318945598 L 1.2135492607468352 -2.7776855558857223 L 1.2978268999846978 -2.737825201130937 L 1.3777917213686222 -2.689896131687418 L 1.4526736199554633 -2.6343599306946 L 1.5217514421272202 -2.57175144212722 L 1.5843599306946001 -2.502673619955463 L 1.6398961316874179 -2.4277917213686218 L 1.6878252011309371 -2.347826899984698 L 1.7276855558857225 -2.263549260746835 L 1.7590933189455984 -2.1757704433917393 L 1.7817460163830687 -2.0853358059153217 L 1.795425490338587 -1.9931162833130827 L 1.7999999999999998 -1.9 L 1.795425490338587 -1.8068837166869172 L 1.7817460163830687 -1.714664194084678 L 1.7590933189455984 -1.6242295566082607 L 1.7276855558857225 -1.5364507392531646 L 1.6878252011309371 -1.452173100015302 L 1.639896131687418 -1.372208278631378 L 1.5843599306946001 -1.2973263800445367 L 1.5217514421272202 -1.2282485578727798 L 1.4526736199554633 -1.1656400693053999 L 1.377791721368622 -1.110103868312582 L 1.2978268999846978 -1.0621747988690626 L 1.2135492607468352 -1.0223144441142775 L 1.1257704433917393 -0.9909066810544016 L 1.0353358059153221 -0.968253983616931 L 0.9431162833130827 -0.954574509661413 L 0.8500000000000001 -0.95 L -0.65 -0.95 L -0.6499999999999999 -0.95 L -0.7431162833130827 -0.9545745096614129 L -0.8353358059153217 -0.968253983616931 L -0.9257704433917391 -0.9909066810544015 L -1.0135492607468353 -1.0223144441142775 L -1.0978268999846978 -1.0621747988690626 L -1.1777917213686218 -1.110103868312582 L -1.2526736199554631 -1.1656400693053997 L -1.32175144212722 -1.2282485578727798 L -1.3843599306946002 -1.2973263800445367 L -1.439896131687418 -1.3722082786313778 L -1.4878252011309372 -1.452173100015302 L -1.5276855558857223 -1.5364507392531646 L -1.5590933189455982 -1.6242295566082607 L -1.581746016383069 -1.7146641940846776 L -1.595425490338587 -1.8068837166869172 L -1.6 -1.8999999999999997 L -1.5954254903385872 -1.9931162833130824 L -1.581746016383069 -2.0853358059153217 L -1.5590933189455984 -2.175770443391739 L -1.5276855558857225 -2.263549260746835 L -1.4878252011309372 -2.347826899984698 L -1.4398961316874181 -2.4277917213686218 L -1.3843599306946004 -2.5026736199554627 L -1.3217514421272203 -2.57175144212722 L -1.252673619955463 -2.6343599306946004 L -1.1777917213686222 -2.689896131687418 L -1.097826899984698 -2.737825201130937 L -1.013549260746836 -2.7776855558857223 L -0.9257704433917393 -2.809093318945598 L -0.8353358059153222 -2.8317460163830686 L -0.7431162833130824 -2.845425490338587 L -0.6500000000000002 -2.8499999999999996 L 0.85 -2.8499999999999996 L 0.8500000000000001 -2.8499999999999996 L 0.8500000000000001 -2.8499999999999996 Z"/></clipPath><g clip-path="url(#clip-1764625709272-tlzebyejb__stack1)"><line x1="1.6955844122715706" y1="-2.8499999999999996" x2="1.7999999999999998" y2="-2.7455844122715707" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.4410259710444144" y1="-2.8499999999999996" x2="1.7999999999999998" y2="-2.4910259710444143" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.186467529817257" y1="-2.8499999999999996" x2="1.7999999999999998" y2="-2.236467529817257" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.9319090885901002" y1="-2.8499999999999996" x2="1.7999999999999998" y2="-1.9819090885901" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.6773506473629429" y1="-2.8499999999999996" x2="1.7999999999999998" y2="-1.727350647362943" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.4227922061357856" y1="-2.8499999999999996" x2="1.7999999999999998" y2="-1.4727922061357857" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.16823376490862874" y1="-2.8499999999999996" x2="1.7999999999999998" y2="-1.2182337649086292" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.08632467631852858" y1="-2.8499999999999996" x2="1.7999999999999998" y2="-0.9636753236814717" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.3408831175456859" y1="-2.8499999999999996" x2="1.5591168824543142" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.5954415587728428" y1="-2.8499999999999996" x2="1.3045584412271574" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.8500000000000001" y1="-2.8499999999999996" x2="1.05" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.104558441227157" y1="-2.8499999999999996" x2="0.7954415587728432" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.3591168824543147" y1="-2.8499999999999996" x2="0.5408831175456854" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.6" y1="-2.836324676318528" x2="0.28632467631852854" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.6" y1="-2.5817662350913713" x2="0.03176623509137144" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.6" y1="-2.327207793864214" x2="-0.22279220613578565" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.6" y1="-2.072649352637057" x2="-0.47735064736294297" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.6" y1="-1.8180909114099" x2="-0.7319090885901001" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.6" y1="-1.5635324701827427" x2="-0.9864675298172573" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.6" y1="-1.3089740289555858" x2="-1.2410259710444143" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.6" y1="-1.054415587728429" x2="-1.4955844122715711" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.7999999999999998" y1="-1.0544155877284294" x2="1.6955844122715704" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.7999999999999998" y1="-1.3089740289555862" x2="1.4410259710444135" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.7999999999999998" y1="-1.5635324701827433" x2="1.1864675298172567" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.7999999999999998" y1="-1.8180909114099006" x2="0.9319090885900994" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.7999999999999998" y1="-2.0726493526370575" x2="0.6773506473629425" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.7999999999999998" y1="-2.327207793864215" x2="0.42279220613578516" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.7999999999999998" y1="-2.581766235091372" x2="0.16823376490862807" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.7999999999999998" y1="-2.8363246763185286" x2="-0.0863246763185288" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.5591168824543136" y1="-2.8499999999999996" x2="-0.3408831175456859" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.304558441227157" y1="-2.8499999999999996" x2="-0.5954415587728425" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="1.05" y1="-2.8499999999999996" x2="-0.8499999999999994" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.7954415587728427" y1="-2.8499999999999996" x2="-1.1045584412271567" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.5408831175456856" y1="-2.8499999999999996" x2="-1.3591168824543138" y2="-0.95" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.2863246763185283" y1="-2.8499999999999996" x2="-1.6" y2="-0.963675323681471" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="0.031766235091371" y1="-2.8499999999999996" x2="-1.6" y2="-1.2182337649086283" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.22279220613578588" y1="-2.8499999999999996" x2="-1.6" y2="-1.4727922061357852" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.4773506473629432" y1="-2.8499999999999996" x2="-1.6" y2="-1.7273506473629427" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.7319090885901005" y1="-2.8499999999999996" x2="-1.6" y2="-1.9819090885900996" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-0.9864675298172576" y1="-2.8499999999999996" x2="-1.6" y2="-2.236467529817257" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.241025971044414" y1="-2.8499999999999996" x2="-1.6" y2="-2.4910259710444134" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/><line x1="-1.4955844122715707" y1="-2.8499999999999996" x2="-1.6" y2="-2.7455844122715702" stroke="#FF0000" stroke-width="0.1" stroke-opacity="0.8"/></g><path d="M 0.8500000000000001 -2.8499999999999996 L 0.9431162833130827 -2.8454254903385867 L 1.035335805915322 -2.831746016383069 L 1.1257704433917393 -2.809093318945598 L 1.2135492607468352 -2.7776855558857223 L 1.2978268999846978 -2.737825201130937 L 1.3777917213686222 -2.689896131687418 L 1.4526736199554633 -2.6343599306946 L 1.5217514421272202 -2.57175144212722 L 1.5843599306946001 -2.502673619955463 L 1.6398961316874179 -2.4277917213686218 L 1.6878252011309371 -2.347826899984698 L 1.7276855558857225 -2.263549260746835 L 1.7590933189455984 -2.1757704433917393 L 1.7817460163830687 -2.0853358059153217 L 1.795425490338587 -1.9931162833130827 L 1.7999999999999998 -1.9 L 1.795425490338587 -1.8068837166869172 L 1.7817460163830687 -1.714664194084678 L 1.7590933189455984 -1.6242295566082607 L 1.7276855558857225 -1.5364507392531646 L 1.6878252011309371 -1.452173100015302 L 1.639896131687418 -1.372208278631378 L 1.5843599306946001 -1.2973263800445367 L 1.5217514421272202 -1.2282485578727798 L 1.4526736199554633 -1.1656400693053999 L 1.377791721368622 -1.110103868312582 L 1.2978268999846978 -1.0621747988690626 L 1.2135492607468352 -1.0223144441142775 L 1.1257704433917393 -0.9909066810544016 L 1.0353358059153221 -0.968253983616931 L 0.9431162833130827 -0.954574509661413 L 0.8500000000000001 -0.95 L -0.65 -0.95 L -0.6499999999999999 -0.95 L -0.7431162833130827 -0.9545745096614129 L -0.8353358059153217 -0.968253983616931 L -0.9257704433917391 -0.9909066810544015 L -1.0135492607468353 -1.0223144441142775 L -1.0978268999846978 -1.0621747988690626 L -1.1777917213686218 -1.110103868312582 L -1.2526736199554631 -1.1656400693053997 L -1.32175144212722 -1.2282485578727798 L -1.3843599306946002 -1.2973263800445367 L -1.439896131687418 -1.3722082786313778 L -1.4878252011309372 -1.452173100015302 L -1.5276855558857223 -1.5364507392531646 L -1.5590933189455982 -1.6242295566082607 L -1.581746016383069 -1.7146641940846776 L -1.595425490338587 -1.8068837166869172 L -1.6 -1.8999999999999997 L -1.5954254903385872 -1.9931162833130824 L -1.581746016383069 -2.0853358059153217 L -1.5590933189455984 -2.175770443391739 L -1.5276855558857225 -2.263549260746835 L -1.4878252011309372 -2.347826899984698 L -1.4398961316874181 -2.4277917213686218 L -1.3843599306946004 -2.5026736199554627 L -1.3217514421272203 -2.57175144212722 L -1.252673619955463 -2.6343599306946004 L -1.1777917213686222 -2.689896131687418 L -1.097826899984698 -2.737825201130937 L -1.013549260746836 -2.7776855558857223 L -0.9257704433917393 -2.809093318945598 L -0.8353358059153222 -2.8317460163830686 L -0.7431162833130824 -2.845425490338587 L -0.6500000000000002 -2.8499999999999996 L 0.85 -2.8499999999999996 L 0.8500000000000001 -2.8499999999999996 L 0.8500000000000001 -2.8499999999999996 Z" fill="none" stroke="#FF0000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 0.85 -2.65 L 0.9235128552471705 -2.6463885450041476 L 0.9963177415120963 -2.6355889603024227 L 1.0677135079408466 -2.6177052517991566 L 1.1370125742738173 -2.592909649383465 L 1.2035475526194983 -2.561440948261266 L 1.2666776747647017 -2.523602209226909 L 1.3257949631227341 -2.4797578400220526 L 1.3803300858899106 -2.4303300858899104 L 1.4297578400220528 -2.375794963122734 L 1.4736022092269088 -2.3166776747647013 L 1.5114409482612663 -2.2535475526194984 L 1.542909649383465 -2.187012574273817 L 1.5677052517991568 -2.1177135079408465 L 1.585588960302423 -2.0463177415120963 L 1.5963885450041477 -1.9735128552471704 L 1.6 -1.9 L 1.5963885450041477 -1.8264871447528295 L 1.585588960302423 -1.7536822584879037 L 1.5677052517991568 -1.6822864920591531 L 1.542909649383465 -1.6129874257261827 L 1.5114409482612663 -1.5464524473805015 L 1.473602209226909 -1.4833223252352985 L 1.4297578400220528 -1.4242050368772659 L 1.3803300858899106 -1.3696699141100894 L 1.3257949631227341 -1.3202421599779472 L 1.2666776747647015 -1.2763977907730908 L 1.2035475526194983 -1.2385590517387337 L 1.1370125742738173 -1.207090350616535 L 1.0677135079408466 -1.1822947482008432 L 0.9963177415120964 -1.164411039697577 L 0.9235128552471705 -1.1536114549958523 L 0.85 -1.15 L -0.65 -1.15 L -0.65 -1.15 L -0.7235128552471705 -1.1536114549958523 L -0.7963177415120961 -1.164411039697577 L -0.8677135079408467 -1.1822947482008432 L -0.9370125742738173 -1.207090350616535 L -1.0035475526194984 -1.2385590517387337 L -1.0666776747647015 -1.2763977907730908 L -1.125794963122734 -1.320242159977947 L -1.1803300858899106 -1.3696699141100892 L -1.2297578400220528 -1.4242050368772659 L -1.273602209226909 -1.4833223252352983 L -1.3114409482612661 -1.5464524473805015 L -1.342909649383465 -1.6129874257261825 L -1.3677052517991566 -1.6822864920591531 L -1.3855889603024227 -1.7536822584879035 L -1.3963885450041476 -1.8264871447528293 L -1.4 -1.9 L -1.3963885450041476 -1.9735128552471704 L -1.3855889603024227 -2.0463177415120963 L -1.3677052517991566 -2.1177135079408465 L -1.3429096493834651 -2.187012574273817 L -1.3114409482612663 -2.253547552619498 L -1.273602209226909 -2.3166776747647013 L -1.229757840022053 -2.375794963122734 L -1.1803300858899108 -2.4303300858899104 L -1.125794963122734 -2.479757840022053 L -1.0666776747647018 -2.523602209226909 L -1.0035475526194984 -2.561440948261266 L -0.9370125742738178 -2.592909649383465 L -0.8677135079408469 -2.6177052517991566 L -0.7963177415120966 -2.6355889603024227 L -0.7235128552471704 -2.6463885450041476 L -0.6500000000000001 -2.65 L 0.85 -2.65 L 0.85 -2.65 L 0.85 -2.65 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g></g>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { test, expect } from "bun:test"
|
|
2
|
+
import { convertCircuitJsonToPcbSvg } from "circuit-to-svg"
|
|
3
|
+
import { generateLightBurnSvg } from "lbrnts"
|
|
4
|
+
import { convertCircuitJsonToLbrn } from "../../../lib"
|
|
5
|
+
import { stackSvgsVertically } from "stack-svgs"
|
|
6
|
+
import type { CircuitJson } from "circuit-json"
|
|
7
|
+
|
|
8
|
+
const circuitJson: CircuitJson = [
|
|
9
|
+
{
|
|
10
|
+
type: "pcb_board",
|
|
11
|
+
pcb_board_id: "board_circle",
|
|
12
|
+
width: 10,
|
|
13
|
+
height: 10,
|
|
14
|
+
center: { x: 0, y: 0 },
|
|
15
|
+
thickness: 1.6,
|
|
16
|
+
num_layers: 2,
|
|
17
|
+
material: "fr4",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "pcb_hole",
|
|
21
|
+
pcb_hole_id: "pcb_hole_1",
|
|
22
|
+
hole_shape: "circle",
|
|
23
|
+
hole_diameter: 1.5,
|
|
24
|
+
x: -1,
|
|
25
|
+
y: 2,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "pcb_hole",
|
|
29
|
+
pcb_hole_id: "pcb_hole_2",
|
|
30
|
+
hole_shape: "circle",
|
|
31
|
+
hole_diameter: 2,
|
|
32
|
+
x: 1,
|
|
33
|
+
y: -1,
|
|
34
|
+
},
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
test("renders circle pcb holes with through-board cuts", async () => {
|
|
38
|
+
const pcbSvg = await convertCircuitJsonToPcbSvg(circuitJson)
|
|
39
|
+
|
|
40
|
+
const project = convertCircuitJsonToLbrn(circuitJson)
|
|
41
|
+
|
|
42
|
+
const lbrnSvg = await generateLightBurnSvg(project)
|
|
43
|
+
|
|
44
|
+
expect(stackSvgsVertically([pcbSvg, lbrnSvg])).toMatchSvgSnapshot(
|
|
45
|
+
import.meta.filename,
|
|
46
|
+
)
|
|
47
|
+
})
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { test, expect } from "bun:test"
|
|
2
|
+
import { convertCircuitJsonToPcbSvg } from "circuit-to-svg"
|
|
3
|
+
import { generateLightBurnSvg } from "lbrnts"
|
|
4
|
+
import { convertCircuitJsonToLbrn } from "../../../lib"
|
|
5
|
+
import { stackSvgsVertically } from "stack-svgs"
|
|
6
|
+
import type { CircuitJson } from "circuit-json"
|
|
7
|
+
|
|
8
|
+
const circuitJson: CircuitJson = [
|
|
9
|
+
{
|
|
10
|
+
type: "pcb_board",
|
|
11
|
+
pcb_board_id: "board_oval",
|
|
12
|
+
width: 10,
|
|
13
|
+
height: 10,
|
|
14
|
+
center: { x: 0, y: 0 },
|
|
15
|
+
thickness: 1.6,
|
|
16
|
+
num_layers: 2,
|
|
17
|
+
material: "fr4",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "pcb_hole",
|
|
21
|
+
pcb_hole_id: "pcb_hole_1",
|
|
22
|
+
hole_shape: "oval",
|
|
23
|
+
hole_width: 2.5,
|
|
24
|
+
hole_height: 1.5,
|
|
25
|
+
x: -1,
|
|
26
|
+
y: 2,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: "pcb_hole",
|
|
30
|
+
pcb_hole_id: "pcb_hole_2",
|
|
31
|
+
hole_shape: "oval",
|
|
32
|
+
hole_width: 1.5,
|
|
33
|
+
hole_height: 2.5,
|
|
34
|
+
x: 1,
|
|
35
|
+
y: -1,
|
|
36
|
+
},
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
test("renders oval pcb holes with through-board cuts", async () => {
|
|
40
|
+
const pcbSvg = await convertCircuitJsonToPcbSvg(circuitJson)
|
|
41
|
+
|
|
42
|
+
const project = convertCircuitJsonToLbrn(circuitJson)
|
|
43
|
+
|
|
44
|
+
const lbrnSvg = await generateLightBurnSvg(project)
|
|
45
|
+
|
|
46
|
+
expect(stackSvgsVertically([pcbSvg, lbrnSvg])).toMatchSvgSnapshot(
|
|
47
|
+
import.meta.filename,
|
|
48
|
+
)
|
|
49
|
+
})
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { test, expect } from "bun:test"
|
|
2
|
+
import { convertCircuitJsonToPcbSvg } from "circuit-to-svg"
|
|
3
|
+
import { generateLightBurnSvg } from "lbrnts"
|
|
4
|
+
import { convertCircuitJsonToLbrn } from "../../../lib"
|
|
5
|
+
import { stackSvgsVertically } from "stack-svgs"
|
|
6
|
+
import type { CircuitJson } from "circuit-json"
|
|
7
|
+
|
|
8
|
+
const circuitJson: CircuitJson = [
|
|
9
|
+
{
|
|
10
|
+
type: "pcb_board",
|
|
11
|
+
pcb_board_id: "board_pill",
|
|
12
|
+
width: 10,
|
|
13
|
+
height: 10,
|
|
14
|
+
center: { x: 0, y: 0 },
|
|
15
|
+
thickness: 1.6,
|
|
16
|
+
num_layers: 2,
|
|
17
|
+
material: "fr4",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "pcb_hole",
|
|
21
|
+
pcb_hole_id: "pcb_hole_1",
|
|
22
|
+
hole_shape: "pill",
|
|
23
|
+
hole_width: 3,
|
|
24
|
+
hole_height: 1.5,
|
|
25
|
+
x: -1,
|
|
26
|
+
y: 2,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: "pcb_hole",
|
|
30
|
+
pcb_hole_id: "pcb_hole_2",
|
|
31
|
+
hole_shape: "pill",
|
|
32
|
+
hole_width: 1.5,
|
|
33
|
+
hole_height: 3,
|
|
34
|
+
x: 1,
|
|
35
|
+
y: -1,
|
|
36
|
+
},
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
test("renders pill-shaped pcb holes with through-board cuts", async () => {
|
|
40
|
+
const pcbSvg = await convertCircuitJsonToPcbSvg(circuitJson)
|
|
41
|
+
|
|
42
|
+
const project = convertCircuitJsonToLbrn(circuitJson)
|
|
43
|
+
|
|
44
|
+
const lbrnSvg = await generateLightBurnSvg(project)
|
|
45
|
+
|
|
46
|
+
expect(stackSvgsVertically([pcbSvg, lbrnSvg])).toMatchSvgSnapshot(
|
|
47
|
+
import.meta.filename,
|
|
48
|
+
)
|
|
49
|
+
})
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { test, expect } from "bun:test"
|
|
2
|
+
import { convertCircuitJsonToPcbSvg } from "circuit-to-svg"
|
|
3
|
+
import { generateLightBurnSvg } from "lbrnts"
|
|
4
|
+
import { convertCircuitJsonToLbrn } from "../../../lib"
|
|
5
|
+
import { stackSvgsVertically } from "stack-svgs"
|
|
6
|
+
import type { CircuitJson } from "circuit-json"
|
|
7
|
+
|
|
8
|
+
const circuitJson: CircuitJson = [
|
|
9
|
+
{
|
|
10
|
+
type: "pcb_board",
|
|
11
|
+
pcb_board_id: "board_rect",
|
|
12
|
+
width: 10,
|
|
13
|
+
height: 10,
|
|
14
|
+
center: { x: 0, y: 0 },
|
|
15
|
+
thickness: 1.6,
|
|
16
|
+
num_layers: 2,
|
|
17
|
+
material: "fr4",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "pcb_hole",
|
|
21
|
+
pcb_hole_id: "pcb_hole_1",
|
|
22
|
+
hole_shape: "rect",
|
|
23
|
+
hole_width: 2,
|
|
24
|
+
hole_height: 1.5,
|
|
25
|
+
x: -1,
|
|
26
|
+
y: 2,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: "pcb_hole",
|
|
30
|
+
pcb_hole_id: "pcb_hole_2",
|
|
31
|
+
hole_shape: "rect",
|
|
32
|
+
hole_width: 1.5,
|
|
33
|
+
hole_height: 2,
|
|
34
|
+
x: 1,
|
|
35
|
+
y: -1,
|
|
36
|
+
},
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
test("renders rectangular pcb holes with through-board cuts", async () => {
|
|
40
|
+
const pcbSvg = await convertCircuitJsonToPcbSvg(circuitJson)
|
|
41
|
+
|
|
42
|
+
const project = convertCircuitJsonToLbrn(circuitJson)
|
|
43
|
+
|
|
44
|
+
const lbrnSvg = await generateLightBurnSvg(project)
|
|
45
|
+
|
|
46
|
+
expect(stackSvgsVertically([pcbSvg, lbrnSvg])).toMatchSvgSnapshot(
|
|
47
|
+
import.meta.filename,
|
|
48
|
+
)
|
|
49
|
+
})
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { test, expect } from "bun:test"
|
|
2
|
+
import { convertCircuitJsonToPcbSvg } from "circuit-to-svg"
|
|
3
|
+
import { generateLightBurnSvg } from "lbrnts"
|
|
4
|
+
import { convertCircuitJsonToLbrn } from "../../../lib"
|
|
5
|
+
import { stackSvgsVertically } from "stack-svgs"
|
|
6
|
+
import type { CircuitJson } from "circuit-json"
|
|
7
|
+
|
|
8
|
+
const circuitJson: CircuitJson = [
|
|
9
|
+
{
|
|
10
|
+
type: "pcb_board",
|
|
11
|
+
pcb_board_id: "board_rotated_pill",
|
|
12
|
+
width: 10,
|
|
13
|
+
height: 10,
|
|
14
|
+
center: { x: 0, y: 0 },
|
|
15
|
+
thickness: 1.6,
|
|
16
|
+
num_layers: 2,
|
|
17
|
+
material: "fr4",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "pcb_hole",
|
|
21
|
+
pcb_hole_id: "pcb_hole_1",
|
|
22
|
+
hole_shape: "rotated_pill",
|
|
23
|
+
hole_width: 3,
|
|
24
|
+
hole_height: 1.5,
|
|
25
|
+
ccw_rotation: 45, // 45 degrees
|
|
26
|
+
x: -1,
|
|
27
|
+
y: 2,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
type: "pcb_hole",
|
|
31
|
+
pcb_hole_id: "pcb_hole_2",
|
|
32
|
+
hole_shape: "rotated_pill",
|
|
33
|
+
hole_width: 1.5,
|
|
34
|
+
hole_height: 3,
|
|
35
|
+
ccw_rotation: 90,
|
|
36
|
+
x: 1,
|
|
37
|
+
y: -1,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: "pcb_hole",
|
|
41
|
+
pcb_hole_id: "pcb_hole_2",
|
|
42
|
+
hole_shape: "rotated_pill",
|
|
43
|
+
hole_width: 1.5,
|
|
44
|
+
hole_height: 3,
|
|
45
|
+
ccw_rotation: 90,
|
|
46
|
+
x: 1,
|
|
47
|
+
y: -1,
|
|
48
|
+
},
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
test("renders rotated pill-shaped pcb holes with through-board cuts", async () => {
|
|
52
|
+
const pcbSvg = await convertCircuitJsonToPcbSvg(circuitJson)
|
|
53
|
+
|
|
54
|
+
const project = convertCircuitJsonToLbrn(circuitJson)
|
|
55
|
+
|
|
56
|
+
const lbrnSvg = await generateLightBurnSvg(project)
|
|
57
|
+
|
|
58
|
+
expect(stackSvgsVertically([pcbSvg, lbrnSvg])).toMatchSvgSnapshot(
|
|
59
|
+
import.meta.filename,
|
|
60
|
+
)
|
|
61
|
+
})
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { test, expect } from "bun:test"
|
|
2
|
+
import { convertCircuitJsonToPcbSvg } from "circuit-to-svg"
|
|
3
|
+
import { generateLightBurnSvg } from "lbrnts"
|
|
4
|
+
import { convertCircuitJsonToLbrn } from "../../../lib"
|
|
5
|
+
import { stackSvgsVertically } from "stack-svgs"
|
|
6
|
+
import type { CircuitJson } from "circuit-json"
|
|
7
|
+
|
|
8
|
+
const circuitJson: CircuitJson = [
|
|
9
|
+
{
|
|
10
|
+
type: "pcb_board",
|
|
11
|
+
pcb_board_id: "board_soldermask",
|
|
12
|
+
width: 10,
|
|
13
|
+
height: 10,
|
|
14
|
+
center: { x: 0, y: 0 },
|
|
15
|
+
thickness: 1.6,
|
|
16
|
+
num_layers: 2,
|
|
17
|
+
material: "fr4",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "pcb_hole",
|
|
21
|
+
pcb_hole_id: "pcb_hole_1",
|
|
22
|
+
hole_shape: "circle",
|
|
23
|
+
hole_diameter: 1.5,
|
|
24
|
+
x: -2,
|
|
25
|
+
y: 2,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "pcb_hole",
|
|
29
|
+
pcb_hole_id: "pcb_hole_2",
|
|
30
|
+
hole_shape: "rect",
|
|
31
|
+
hole_width: 2,
|
|
32
|
+
hole_height: 1.5,
|
|
33
|
+
x: 2,
|
|
34
|
+
y: 2,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: "pcb_hole",
|
|
38
|
+
pcb_hole_id: "pcb_hole_3",
|
|
39
|
+
hole_shape: "pill",
|
|
40
|
+
hole_width: 3,
|
|
41
|
+
hole_height: 1.5,
|
|
42
|
+
x: 0,
|
|
43
|
+
y: -2,
|
|
44
|
+
},
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
test("renders pcb holes with soldermask openings", async () => {
|
|
48
|
+
const pcbSvg = await convertCircuitJsonToPcbSvg(circuitJson)
|
|
49
|
+
|
|
50
|
+
const project = convertCircuitJsonToLbrn(circuitJson, {
|
|
51
|
+
includeSoldermask: true,
|
|
52
|
+
soldermaskMargin: 0.2,
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const lbrnSvg = await generateLightBurnSvg(project)
|
|
56
|
+
|
|
57
|
+
expect(stackSvgsVertically([pcbSvg, lbrnSvg])).toMatchSvgSnapshot(
|
|
58
|
+
import.meta.filename,
|
|
59
|
+
)
|
|
60
|
+
})
|