circuit-json-to-lbrn 0.0.8 → 0.0.9

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  // lib/index.ts
2
- import { LightBurnProject, CutSetting, ShapePath as ShapePath10 } from "lbrnts";
2
+ import { LightBurnProject, CutSetting, ShapePath as ShapePath15 } from "lbrnts";
3
3
  import { cju as cju2 } from "@tscircuit/circuit-json-util";
4
4
 
5
5
  // lib/element-handlers/addPlatedHole/addCirclePlatedHole.ts
@@ -591,16 +591,134 @@ var addRectSmtPad = (smtPad, ctx) => {
591
591
  );
592
592
  };
593
593
 
594
+ // lib/element-handlers/addSmtPad/addCircleSmtPad.ts
595
+ import { ShapePath as ShapePath9 } from "lbrnts";
596
+ var addCircleSmtPad = (smtPad, ctx) => {
597
+ const { project, copperCutSetting, origin } = ctx;
598
+ const centerX = smtPad.x + origin.x;
599
+ const centerY = smtPad.y + origin.y;
600
+ if (smtPad.radius > 0) {
601
+ const outerRadius = smtPad.radius;
602
+ const outer = createCirclePath(centerX, centerY, outerRadius);
603
+ project.children.push(
604
+ new ShapePath9({
605
+ cutIndex: copperCutSetting.index,
606
+ verts: outer.verts,
607
+ prims: outer.prims,
608
+ isClosed: true
609
+ })
610
+ );
611
+ }
612
+ };
613
+
614
+ // lib/element-handlers/addSmtPad/addPillSmtPad.ts
615
+ import { ShapePath as ShapePath10 } from "lbrnts";
616
+ var addPillSmtPad = (smtPad, ctx) => {
617
+ const { project, copperCutSetting, origin } = ctx;
618
+ const centerX = smtPad.x + origin.x;
619
+ const centerY = smtPad.y + origin.y;
620
+ if (smtPad.width > 0 && smtPad.height > 0) {
621
+ const outer = createPillPath(centerX, centerY, smtPad.width, smtPad.height);
622
+ project.children.push(
623
+ new ShapePath10({
624
+ cutIndex: copperCutSetting.index,
625
+ verts: outer.verts,
626
+ prims: outer.prims,
627
+ isClosed: true
628
+ })
629
+ );
630
+ }
631
+ };
632
+
633
+ // lib/element-handlers/addSmtPad/addRotatedPillSmtPad.ts
634
+ import { ShapePath as ShapePath11 } from "lbrnts";
635
+ var addRotatedPillSmtPad = (smtPad, ctx) => {
636
+ const { project, copperCutSetting, origin } = ctx;
637
+ const centerX = smtPad.x + origin.x;
638
+ const centerY = smtPad.y + origin.y;
639
+ const borderRadius = smtPad.radius ?? 0;
640
+ if (smtPad.width > 0 && smtPad.height > 0) {
641
+ const outer = createPillPath(
642
+ centerX,
643
+ centerY,
644
+ smtPad.width,
645
+ smtPad.height,
646
+ (smtPad.ccw_rotation ?? 0) * (Math.PI / 180)
647
+ );
648
+ project.children.push(
649
+ new ShapePath11({
650
+ cutIndex: copperCutSetting.index,
651
+ verts: outer.verts,
652
+ prims: outer.prims,
653
+ isClosed: true
654
+ })
655
+ );
656
+ }
657
+ };
658
+
659
+ // lib/element-handlers/addSmtPad/addPolygonSmtPad.ts
660
+ import { ShapePath as ShapePath12 } from "lbrnts";
661
+ var addPolygonSmtPad = (smtPad, ctx) => {
662
+ const { project, copperCutSetting, origin } = ctx;
663
+ if (smtPad.points.length >= 3) {
664
+ const pad = createPolygonPathFromOutline(smtPad.points, origin.x, origin.y);
665
+ project.children.push(
666
+ new ShapePath12({
667
+ cutIndex: copperCutSetting.index,
668
+ verts: pad.verts,
669
+ prims: pad.prims,
670
+ isClosed: true
671
+ })
672
+ );
673
+ }
674
+ };
675
+
676
+ // lib/element-handlers/addSmtPad/addRotatedRectSmtPad.ts
677
+ import { ShapePath as ShapePath13 } from "lbrnts";
678
+ var addRotatedRectSmtPad = (smtPad, ctx) => {
679
+ const { project, copperCutSetting, origin } = ctx;
680
+ const centerX = smtPad.x + origin.x;
681
+ const centerY = smtPad.y + origin.y;
682
+ const rotation = smtPad.ccw_rotation ?? 0;
683
+ const borderRadius = smtPad.rect_border_radius ?? 0;
684
+ if (smtPad.width > 0 && smtPad.height > 0) {
685
+ const outer = createRoundedRectPath(
686
+ centerX,
687
+ centerY,
688
+ smtPad.width,
689
+ smtPad.height,
690
+ borderRadius,
691
+ 4,
692
+ rotation
693
+ );
694
+ project.children.push(
695
+ new ShapePath13({
696
+ cutIndex: copperCutSetting.index,
697
+ verts: outer.verts,
698
+ prims: outer.prims,
699
+ isClosed: true
700
+ })
701
+ );
702
+ }
703
+ };
704
+
594
705
  // lib/element-handlers/addSmtPad/index.ts
595
706
  var addSmtPad = (smtPad, ctx) => {
596
707
  switch (smtPad.shape) {
597
- case "rect": {
598
- addRectSmtPad(smtPad, ctx);
599
- break;
600
- }
601
- default: {
708
+ case "rect":
709
+ return addRectSmtPad(smtPad, ctx);
710
+ case "circle":
711
+ return addCircleSmtPad(smtPad, ctx);
712
+ case "pill":
713
+ return addPillSmtPad(smtPad, ctx);
714
+ case "rotated_pill":
715
+ return addRotatedPillSmtPad(smtPad, ctx);
716
+ case "polygon":
717
+ return addPolygonSmtPad(smtPad, ctx);
718
+ case "rotated_rect":
719
+ return addRotatedRectSmtPad(smtPad, ctx);
720
+ default:
602
721
  throw new Error(`Unknown smt pad shape: ${smtPad.shape}`);
603
- }
604
722
  }
605
723
  };
606
724
 
@@ -685,7 +803,7 @@ var addPcbTrace = (trace, ctx) => {
685
803
 
686
804
  // lib/element-handlers/addPcbBoard/index.ts
687
805
  import { Polygon, point } from "@flatten-js/core";
688
- import { ShapePath as ShapePath9 } from "lbrnts";
806
+ import { ShapePath as ShapePath14 } from "lbrnts";
689
807
 
690
808
  // lib/polygon-to-shape-path.ts
691
809
  function polygonToShapePathData(polygon) {
@@ -741,7 +859,7 @@ var addPcbBoard = (board, ctx) => {
741
859
  if (!polygon) return;
742
860
  const { verts, prims } = polygonToShapePathData(polygon);
743
861
  project.children.push(
744
- new ShapePath9({
862
+ new ShapePath14({
745
863
  cutIndex: throughBoardCutSetting.index,
746
864
  verts,
747
865
  prims,
@@ -880,7 +998,7 @@ var convertCircuitJsonToLbrn = (circuitJson, options = {}) => {
880
998
  for (const island of union.splitToIslands()) {
881
999
  const { verts, prims } = polygonToShapePathData(island);
882
1000
  project.children.push(
883
- new ShapePath10({
1001
+ new ShapePath15({
884
1002
  cutIndex: copperCutSetting.index,
885
1003
  verts,
886
1004
  prims,
@@ -0,0 +1,26 @@
1
+ import type { PcbSmtPadCircle } from "circuit-json"
2
+ import type { ConvertContext } from "../../ConvertContext"
3
+ import { ShapePath } from "lbrnts"
4
+ import { createCirclePath } from "../../helpers/circleShape"
5
+
6
+ export const addCircleSmtPad = (
7
+ smtPad: PcbSmtPadCircle,
8
+ ctx: ConvertContext,
9
+ ): void => {
10
+ const { project, copperCutSetting, origin } = ctx
11
+ const centerX = smtPad.x + origin.x
12
+ const centerY = smtPad.y + origin.y
13
+
14
+ if (smtPad.radius > 0) {
15
+ const outerRadius = smtPad.radius
16
+ const outer = createCirclePath(centerX, centerY, outerRadius)
17
+ project.children.push(
18
+ new ShapePath({
19
+ cutIndex: copperCutSetting.index,
20
+ verts: outer.verts,
21
+ prims: outer.prims,
22
+ isClosed: true,
23
+ }),
24
+ )
25
+ }
26
+ }
@@ -0,0 +1,25 @@
1
+ import type { PcbSmtPadPill } from "circuit-json"
2
+ import type { ConvertContext } from "../../ConvertContext"
3
+ import { ShapePath } from "lbrnts"
4
+ import { createPillPath } from "../../helpers/pillShape"
5
+
6
+ export const addPillSmtPad = (
7
+ smtPad: PcbSmtPadPill,
8
+ ctx: ConvertContext,
9
+ ): void => {
10
+ const { project, copperCutSetting, origin } = ctx
11
+ const centerX = smtPad.x + origin.x
12
+ const centerY = smtPad.y + origin.y
13
+
14
+ if (smtPad.width > 0 && smtPad.height > 0) {
15
+ const outer = createPillPath(centerX, centerY, smtPad.width, smtPad.height)
16
+ project.children.push(
17
+ new ShapePath({
18
+ cutIndex: copperCutSetting.index,
19
+ verts: outer.verts,
20
+ prims: outer.prims,
21
+ isClosed: true,
22
+ }),
23
+ )
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ import type { PcbSmtPadPolygon } from "circuit-json"
2
+ import type { ConvertContext } from "../../ConvertContext"
3
+ import { ShapePath } from "lbrnts"
4
+ import { createPolygonPathFromOutline } from "../../helpers/polygonShape"
5
+
6
+ export const addPolygonSmtPad = (
7
+ smtPad: PcbSmtPadPolygon,
8
+ ctx: ConvertContext,
9
+ ): void => {
10
+ const { project, copperCutSetting, origin } = ctx
11
+
12
+ // Create the polygon pad
13
+ if (smtPad.points.length >= 3) {
14
+ const pad = createPolygonPathFromOutline(smtPad.points, origin.x, origin.y)
15
+
16
+ project.children.push(
17
+ new ShapePath({
18
+ cutIndex: copperCutSetting.index,
19
+ verts: pad.verts,
20
+ prims: pad.prims,
21
+ isClosed: true,
22
+ }),
23
+ )
24
+ }
25
+ }
@@ -0,0 +1,32 @@
1
+ import type { PcbSmtPadRotatedPill } from "circuit-json"
2
+ import type { ConvertContext } from "../../ConvertContext"
3
+ import { ShapePath } from "lbrnts"
4
+ import { createPillPath } from "../../helpers/pillShape"
5
+
6
+ export const addRotatedPillSmtPad = (
7
+ smtPad: PcbSmtPadRotatedPill,
8
+ ctx: ConvertContext,
9
+ ): void => {
10
+ const { project, copperCutSetting, origin } = ctx
11
+ const centerX = smtPad.x + origin.x
12
+ const centerY = smtPad.y + origin.y
13
+ const borderRadius = smtPad.radius ?? 0
14
+
15
+ if (smtPad.width > 0 && smtPad.height > 0) {
16
+ const outer = createPillPath(
17
+ centerX,
18
+ centerY,
19
+ smtPad.width,
20
+ smtPad.height,
21
+ (smtPad.ccw_rotation ?? 0) * (Math.PI / 180),
22
+ )
23
+ project.children.push(
24
+ new ShapePath({
25
+ cutIndex: copperCutSetting.index,
26
+ verts: outer.verts,
27
+ prims: outer.prims,
28
+ isClosed: true,
29
+ }),
30
+ )
31
+ }
32
+ }
@@ -0,0 +1,36 @@
1
+ import type { PcbSmtPadRotatedRect } from "circuit-json"
2
+ import type { ConvertContext } from "../../ConvertContext"
3
+ import { ShapePath } from "lbrnts"
4
+ import { createRoundedRectPath } from "../../helpers/roundedRectShape"
5
+
6
+ export const addRotatedRectSmtPad = (
7
+ smtPad: PcbSmtPadRotatedRect,
8
+ ctx: ConvertContext,
9
+ ): void => {
10
+ const { project, copperCutSetting, origin } = ctx
11
+ const centerX = smtPad.x + origin.x
12
+ const centerY = smtPad.y + origin.y
13
+ const rotation = smtPad.ccw_rotation ?? 0
14
+ const borderRadius = smtPad.rect_border_radius ?? 0
15
+
16
+ if (smtPad.width > 0 && smtPad.height > 0) {
17
+ const outer = createRoundedRectPath(
18
+ centerX,
19
+ centerY,
20
+ smtPad.width,
21
+ smtPad.height,
22
+ borderRadius,
23
+ 4,
24
+ rotation,
25
+ )
26
+
27
+ project.children.push(
28
+ new ShapePath({
29
+ cutIndex: copperCutSetting.index,
30
+ verts: outer.verts,
31
+ prims: outer.prims,
32
+ isClosed: true,
33
+ }),
34
+ )
35
+ }
36
+ }
@@ -1,15 +1,33 @@
1
1
  import type { PcbSmtPad } from "circuit-json"
2
2
  import type { ConvertContext } from "../../ConvertContext"
3
3
  import { addRectSmtPad } from "./addRectSmtPad"
4
+ import { addCircleSmtPad } from "./addCircleSmtPad"
5
+ import { addPillSmtPad } from "./addPillSmtPad"
6
+ import { addRotatedPillSmtPad } from "./addRotatedPillSmtPad"
7
+ import { addPolygonSmtPad } from "./addPolygonSmtPad"
8
+ import { addRotatedRectSmtPad } from "./addRotatedRectSmtPad"
4
9
 
5
10
  export const addSmtPad = (smtPad: PcbSmtPad, ctx: ConvertContext) => {
6
11
  switch (smtPad.shape) {
7
- case "rect": {
8
- addRectSmtPad(smtPad, ctx)
9
- break
10
- }
11
- default: {
12
- throw new Error(`Unknown smt pad shape: ${smtPad.shape}`)
13
- }
12
+ case "rect":
13
+ return addRectSmtPad(smtPad, ctx)
14
+
15
+ case "circle":
16
+ return addCircleSmtPad(smtPad, ctx)
17
+
18
+ case "pill":
19
+ return addPillSmtPad(smtPad, ctx)
20
+
21
+ case "rotated_pill":
22
+ return addRotatedPillSmtPad(smtPad, ctx)
23
+
24
+ case "polygon":
25
+ return addPolygonSmtPad(smtPad, ctx)
26
+
27
+ case "rotated_rect":
28
+ return addRotatedRectSmtPad(smtPad, ctx)
29
+
30
+ default:
31
+ throw new Error(`Unknown smt pad shape: ${(smtPad as any).shape}`)
14
32
  }
15
33
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "circuit-json-to-lbrn",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.8",
4
+ "version": "0.0.9",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "start": "bun run site/index.html",
@@ -19,7 +19,7 @@
19
19
  "bun-match-svg": "^0.0.14",
20
20
  "circuit-json": "^0.0.316",
21
21
  "circuit-json-to-connectivity-map": "^0.0.22",
22
- "circuit-to-svg": "^0.0.271",
22
+ "circuit-to-svg": "^0.0.281",
23
23
  "schematic-symbols": "^0.0.202",
24
24
  "stack-svgs": "^0.0.1",
25
25
  "tsup": "^8.5.1"
@@ -1,6 +1,6 @@
1
1
  <svg width="800" height="1400" viewBox="0 0 800 1400" xmlns="http://www.w3.org/2000/svg">
2
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="127.27272727272725" y="27.272727272727252" width="545.4545454545455" height="545.4545454545455" data-type="pcb_boundary" data-pcb-layer="global"/><path class="pcb-board" d="M 127.27272727272725 572.7272727272727 L 672.7272727272727 572.7272727272727 L 672.7272727272727 27.272727272727252 L 127.27272727272725 27.272727272727252 Z" fill="none" stroke="rgba(255, 255, 255, 0.5)" stroke-width="2.7272727272727275" data-type="pcb_board" data-pcb-layer="board"/>
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="127.27272727272725" y="27.272727272727252" width="545.4545454545455" height="545.4545454545455" data-type="pcb_boundary" data-pcb-layer="global"/><path class="pcb-board" d="M 127.27272727272725 572.7272727272727 L 672.7272727272727 572.7272727272727 L 672.7272727272727 27.272727272727252 L 127.27272727272725 27.272727272727252 Z" fill="none" stroke="rgba(255, 255, 255, 0.5)" stroke-width="2.7272727272727275" data-type="pcb_board" data-pcb-layer="board"/><g data-type="pcb_plated_hole" data-pcb-layer="through"><ellipse class="pcb-hole-outer" fill="rgb(200, 52, 52)" cx="0" cy="0" rx="109.0909090909091" ry="27.272727272727273" transform="translate(536.3636363636364 436.3636363636364)" data-type="pcb_plated_hole" data-pcb-layer="top"/><ellipse class="pcb-hole-inner" fill="#FF26E2" cx="0" cy="0" rx="81.81818181818181" ry="13.636363636363637" transform="translate(536.3636363636364 436.3636363636364)" data-type="pcb_plated_hole_drill" data-pcb-layer="drill"/></g><g data-type="pcb_plated_hole" data-pcb-layer="through"><ellipse class="pcb-hole-outer" fill="rgb(200, 52, 52)" cx="0" cy="0" rx="109.0909090909091" ry="27.272727272727273" transform="translate(536.3636363636364 163.63636363636363)" data-type="pcb_plated_hole" data-pcb-layer="top"/><ellipse class="pcb-hole-inner" fill="#FF26E2" cx="0" cy="0" rx="81.81818181818181" ry="13.636363636363637" transform="translate(536.3636363636364 163.63636363636363)" data-type="pcb_plated_hole_drill" data-pcb-layer="drill"/></g><g data-type="pcb_plated_hole" data-pcb-layer="through"><ellipse class="pcb-hole-outer" fill="rgb(200, 52, 52)" cx="0" cy="0" rx="109.0909090909091" ry="27.272727272727273" transform="translate(263.6363636363636 436.3636363636364) rotate(-45)" data-type="pcb_plated_hole" data-pcb-layer="top"/><ellipse class="pcb-hole-inner" fill="#FF26E2" cx="0" cy="0" rx="81.81818181818181" ry="13.636363636363637" transform="translate(263.6363636363636 436.3636363636364) rotate(-45)" data-type="pcb_plated_hole_drill" data-pcb-layer="drill"/></g><g data-type="pcb_plated_hole" data-pcb-layer="through"><ellipse class="pcb-hole-outer" fill="rgb(200, 52, 52)" cx="0" cy="0" rx="109.0909090909091" ry="27.272727272727273" transform="translate(263.6363636363636 163.63636363636363) rotate(-90)" data-type="pcb_plated_hole" data-pcb-layer="top"/><ellipse class="pcb-hole-inner" fill="#FF26E2" cx="0" cy="0" rx="81.81818181818181" ry="13.636363636363637" transform="translate(263.6363636363636 163.63636363636363) rotate(-90)" data-type="pcb_plated_hole_drill" data-pcb-layer="drill"/></g>
4
4
  </g>
5
5
  <g transform="translate(0, 600) scale(20, 20) translate(19.9, 19.9)">
6
6
  <rect x="-19.9" y="-19.9" width="40" height="40" fill="white"/><g transform="matrix(1 0 0 -1 0 0.20000000000000284)"><g transform="matrix(1,0,0,1,0,0)"><path d="M 9.1 -4.9 L 9.080738906688786 -4.8019828596704395 L 9.023141121612921 -4.704909677983872 L 8.927761342928836 -4.609715322745538 L 8.795518130045146 -4.517316567634911 L 8.62768505739342 -4.428603263174002 L 8.425878449210181 -4.344429766980398 L 8.192041813450947 -4.265606715836355 L 7.9284271247461895 -4.1928932188134524 L 7.637573136654582 -4.1269895466372635 L 7.322280932078408 -4.0685303876974555 L 6.985586947303991 -4.018078735651645 L 6.630733729460359 -3.9761204674887134 L 6.261138709017849 -3.9430596642677918 L 5.880361288064513 -3.91921471959677 L 5.492068561318243 -3.9048152733278036 L 5.1 -3.9000000000000004 L 4.707931438681757 -3.904815273327803 L 4.319638711935487 -3.91921471959677 L 3.938861290982151 -3.9430596642677913 L 3.5692662705396407 -3.9761204674887134 L 3.214413052696009 -4.018078735651645 L 2.877719067921592 -4.0685303876974555 L 2.562426863345418 -4.1269895466372635 L 2.27157287525381 -4.1928932188134524 L 2.0079581865490517 -4.265606715836355 L 1.7741215507898183 -4.344429766980398 L 1.57231494260658 -4.428603263174002 L 1.4044818699548527 -4.517316567634911 L 1.2722386570711643 -4.609715322745538 L 1.176858878387078 -4.7049096779838715 L 1.1192610933112124 -4.8019828596704395 L 1.0999999999999996 -4.9 L 1.119261093311212 -4.998017140329561 L 1.176858878387078 -5.095090322016128 L 1.272238657071164 -5.190284677254462 L 1.4044818699548522 -5.28268343236509 L 1.5723149426065794 -5.371396736825998 L 1.7741215507898178 -5.4555702330196025 L 2.0079581865490512 -5.534393284163645 L 2.271572875253809 -5.607106781186548 L 2.5624268633454164 -5.673010453362737 L 2.877719067921591 -5.731469612302545 L 3.214413052696008 -5.781921264348355 L 3.5692662705396385 -5.823879532511286 L 3.9388612909821497 -5.856940335732209 L 4.319638711935485 -5.880785280403231 L 4.707931438681758 -5.8951847266721975 L 5.099999999999999 -5.9 L 5.49206856131824 -5.8951847266721975 L 5.880361288064513 -5.880785280403231 L 6.261138709017848 -5.856940335732209 L 6.63073372946036 -5.823879532511287 L 6.9855869473039895 -5.781921264348355 L 7.322280932078407 -5.731469612302546 L 7.6375731366545825 -5.673010453362737 L 7.9284271247461895 -5.607106781186548 L 8.192041813450945 -5.534393284163646 L 8.425878449210181 -5.4555702330196025 L 8.62768505739342 -5.371396736825998 L 8.795518130045146 -5.282683432365091 L 8.927761342928836 -5.190284677254462 L 9.023141121612921 -5.095090322016129 L 9.080738906688786 -4.998017140329561 L 9.1 -4.9 L 9.1 -4.9 Z" fill="none" stroke="#000000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 8.1 -4.9 L 8.08555418001659 -4.85099142983522 L 8.042355841209691 -4.802454838991936 L 7.970821007196626 -4.754857661372769 L 7.87163859753386 -4.7086582838174555 L 7.7457637930450645 -4.664301631587001 L 7.594408836907635 -4.6222148834902 L 7.41903136008821 -4.582803357918178 L 7.2213203435596425 -4.546446609406726 L 7.003179852490936 -4.513494773318632 L 6.766710699058807 -4.484265193848728 L 6.514190210477993 -4.459039367825823 L 6.248050297095269 -4.438060233744357 L 5.970854031763387 -4.421529832133896 L 5.6852709660483844 -4.409607359798385 L 5.394051420988682 -4.402407636663902 L 5.1 -4.4 L 4.805948579011318 -4.402407636663902 L 4.514729033951615 -4.409607359798385 L 4.2291459682366135 -4.421529832133896 L 3.9519497029047304 -4.438060233744357 L 3.6858097895220068 -4.459039367825823 L 3.433289300941194 -4.484265193848728 L 3.1968201475090634 -4.513494773318632 L 2.9786796564403573 -4.546446609406726 L 2.7809686399117886 -4.582803357918178 L 2.6055911630923636 -4.6222148834902 L 2.454236206954935 -4.664301631587001 L 2.3283614024661397 -4.7086582838174555 L 2.229178992803373 -4.754857661372769 L 2.1576441587903084 -4.802454838991936 L 2.114445819983409 -4.85099142983522 L 2.0999999999999996 -4.9 L 2.114445819983409 -4.94900857016478 L 2.1576441587903084 -4.997545161008064 L 2.229178992803373 -5.045142338627231 L 2.328361402466139 -5.091341716182545 L 2.4542362069549344 -5.135698368412999 L 2.605591163092363 -5.177785116509801 L 2.780968639911788 -5.217196642081823 L 2.978679656440357 -5.253553390593274 L 3.196820147509062 -5.286505226681369 L 3.433289300941193 -5.315734806151273 L 3.685809789522006 -5.340960632174178 L 3.9519497029047286 -5.361939766255643 L 4.229145968236613 -5.378470167866105 L 4.514729033951614 -5.390392640201616 L 4.805948579011318 -5.3975923633360985 L 5.099999999999999 -5.4 L 5.39405142098868 -5.3975923633360985 L 5.6852709660483844 -5.390392640201616 L 5.970854031763386 -5.378470167866105 L 6.248050297095269 -5.361939766255643 L 6.5141902104779925 -5.340960632174178 L 6.766710699058805 -5.315734806151273 L 7.003179852490936 -5.286505226681369 L 7.221320343559642 -5.253553390593274 L 7.419031360088209 -5.217196642081824 L 7.594408836907635 -5.177785116509801 L 7.7457637930450645 -5.135698368412999 L 7.87163859753386 -5.091341716182545 L 7.970821007196626 -5.045142338627231 L 8.042355841209691 -4.997545161008064 L 8.08555418001659 -4.94900857016478 L 8.1 -4.9 L 8.1 -4.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 9.1 5.1 L 9.080738906688786 5.1980171403295605 L 9.023141121612921 5.295090322016128 L 8.927761342928836 5.390284677254462 L 8.795518130045146 5.482683432365089 L 8.62768505739342 5.571396736825998 L 8.425878449210181 5.655570233019602 L 8.192041813450947 5.734393284163645 L 7.9284271247461895 5.8071067811865476 L 7.637573136654582 5.8730104533627365 L 7.322280932078408 5.9314696123025445 L 6.985586947303991 5.981921264348355 L 6.630733729460359 6.023879532511287 L 6.261138709017849 6.056940335732208 L 5.880361288064513 6.08078528040323 L 5.492068561318243 6.095184726672197 L 5.1 6.1 L 4.707931438681757 6.095184726672197 L 4.319638711935487 6.08078528040323 L 3.938861290982151 6.056940335732208 L 3.5692662705396407 6.023879532511287 L 3.214413052696009 5.981921264348355 L 2.877719067921592 5.9314696123025445 L 2.562426863345418 5.8730104533627365 L 2.27157287525381 5.8071067811865476 L 2.0079581865490517 5.734393284163645 L 1.7741215507898183 5.655570233019602 L 1.57231494260658 5.571396736825998 L 1.4044818699548527 5.482683432365089 L 1.2722386570711643 5.390284677254462 L 1.176858878387078 5.2950903220161285 L 1.1192610933112124 5.1980171403295605 L 1.0999999999999996 5.1 L 1.119261093311212 5.001982859670439 L 1.176858878387078 4.904909677983872 L 1.272238657071164 4.809715322745538 L 1.4044818699548522 4.71731656763491 L 1.5723149426065794 4.628603263174002 L 1.7741215507898178 4.5444297669803975 L 2.0079581865490512 4.465606715836355 L 2.271572875253809 4.392893218813452 L 2.5624268633454164 4.326989546637263 L 2.877719067921591 4.268530387697455 L 3.214413052696008 4.218078735651645 L 3.5692662705396385 4.176120467488714 L 3.9388612909821497 4.143059664267791 L 4.319638711935485 4.119214719596769 L 4.707931438681758 4.1048152733278025 L 5.099999999999999 4.1 L 5.49206856131824 4.1048152733278025 L 5.880361288064513 4.119214719596769 L 6.261138709017848 4.143059664267791 L 6.63073372946036 4.176120467488713 L 6.9855869473039895 4.218078735651645 L 7.322280932078407 4.268530387697454 L 7.6375731366545825 4.326989546637263 L 7.9284271247461895 4.392893218813452 L 8.192041813450945 4.465606715836354 L 8.425878449210181 4.5444297669803975 L 8.62768505739342 4.628603263174002 L 8.795518130045146 4.717316567634909 L 8.927761342928836 4.809715322745538 L 9.023141121612921 4.904909677983871 L 9.080738906688786 5.001982859670439 L 9.1 5.1 L 9.1 5.1 Z" fill="none" stroke="#000000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 8.1 5.1 L 8.08555418001659 5.14900857016478 L 8.042355841209691 5.197545161008064 L 7.970821007196626 5.245142338627231 L 7.87163859753386 5.2913417161825445 L 7.7457637930450645 5.335698368412999 L 7.594408836907635 5.3777851165098 L 7.41903136008821 5.417196642081822 L 7.2213203435596425 5.453553390593274 L 7.003179852490936 5.486505226681368 L 6.766710699058807 5.515734806151272 L 6.514190210477993 5.540960632174177 L 6.248050297095269 5.561939766255643 L 5.970854031763387 5.578470167866104 L 5.6852709660483844 5.590392640201615 L 5.394051420988682 5.597592363336098 L 5.1 5.6 L 4.805948579011318 5.597592363336098 L 4.514729033951615 5.590392640201615 L 4.2291459682366135 5.578470167866104 L 3.9519497029047304 5.561939766255643 L 3.6858097895220068 5.540960632174177 L 3.433289300941194 5.515734806151272 L 3.1968201475090634 5.486505226681368 L 2.9786796564403573 5.453553390593274 L 2.7809686399117886 5.417196642081822 L 2.6055911630923636 5.3777851165098 L 2.454236206954935 5.335698368412999 L 2.3283614024661397 5.2913417161825445 L 2.229178992803373 5.245142338627231 L 2.1576441587903084 5.197545161008064 L 2.114445819983409 5.14900857016478 L 2.0999999999999996 5.1 L 2.114445819983409 5.05099142983522 L 2.1576441587903084 5.002454838991936 L 2.229178992803373 4.954857661372769 L 2.328361402466139 4.908658283817455 L 2.4542362069549344 4.864301631587001 L 2.605591163092363 4.822214883490199 L 2.780968639911788 4.782803357918177 L 2.978679656440357 4.746446609406726 L 3.196820147509062 4.713494773318631 L 3.433289300941193 4.684265193848727 L 3.685809789522006 4.659039367825822 L 3.9519497029047286 4.638060233744357 L 4.229145968236613 4.621529832133895 L 4.514729033951614 4.609607359798384 L 4.805948579011318 4.6024076366639015 L 5.099999999999999 4.6 L 5.39405142098868 4.6024076366639015 L 5.6852709660483844 4.609607359798384 L 5.970854031763386 4.621529832133895 L 6.248050297095269 4.638060233744357 L 6.5141902104779925 4.659039367825822 L 6.766710699058805 4.684265193848727 L 7.003179852490936 4.713494773318631 L 7.221320343559642 4.746446609406726 L 7.419031360088209 4.782803357918176 L 7.594408836907635 4.822214883490199 L 7.7457637930450645 4.864301631587001 L 7.87163859753386 4.908658283817455 L 7.970821007196626 4.954857661372769 L 8.042355841209691 5.002454838991936 L 8.08555418001659 5.05099142983522 L 8.1 5.1 L 8.1 5.1 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -2.07157287525381 -2.0715728752538105 L -2.1545011095467808 -2.01588394034769 L -2.2638699989971767 -1.9879706197142342 L -2.3986262614124736 -1.9881017338901168 L -2.5574721203203454 -2.016276020174149 L -2.738877803265531 -2.072222144787785 L -2.941096274354834 -2.155401315967732 L -3.1621800591678033 -2.2650124728251675 L -3.4 -2.4000000000000004 L -3.6522657608156064 -2.559063893813849 L -3.9165478844354746 -2.7406722820161162 L -4.190301189537842 -2.9430761765511715 L -4.470889282145794 -3.1643263172694183 L -4.755609945542462 -3.402291944368109 L -5.041721164095188 -3.65468131877304 L -5.326467530365008 -3.919063792838626 L -5.607106781186548 -4.1928932188134524 L -5.880936207161374 -4.473532469634993 L -6.14531868122696 -4.758278835904812 L -6.397708055631891 -5.044390054457538 L -6.635673682730582 -5.329110717854206 L -6.856923823448829 -5.609698810462158 L -7.059327717983884 -5.883452115564524 L -7.240936106186152 -6.147734239184394 L -7.4 -6.4 L -7.534987527174834 -6.6378199408321965 L -7.644598684032269 -6.858903725645167 L -7.727777855212216 -7.061122196734469 L -7.783723979825852 -7.242527879679655 L -7.811898266109885 -7.401373738587527 L -7.812029380285767 -7.536130001002823 L -7.784116059652312 -7.645498890453219 L -7.72842712474619 -7.72842712474619 L -7.6454988904532195 -7.784116059652312 L -7.536130001002824 -7.812029380285766 L -7.401373738587528 -7.811898266109885 L -7.242527879679655 -7.783723979825852 L -7.061122196734471 -7.727777855212215 L -6.858903725645168 -7.644598684032269 L -6.637819940832198 -7.534987527174834 L -6.4 -7.4 L -6.147734239184396 -7.240936106186153 L -5.883452115564525 -7.059327717983884 L -5.609698810462159 -6.856923823448829 L -5.329110717854208 -6.635673682730584 L -5.044390054457539 -6.397708055631892 L -4.7582788359048145 -6.145318681226962 L -4.473532469634992 -5.880936207161374 L -4.192893218813454 -5.607106781186549 L -3.9190637928386276 -5.32646753036501 L -3.6546813187730405 -5.041721164095188 L -3.40229194436811 -4.755609945542463 L -3.164326317269418 -4.4708892821457935 L -2.9430761765511715 -4.190301189537843 L -2.740672282016118 -3.916547884435477 L -2.559063893813849 -3.6522657608156064 L -2.400000000000001 -3.4000000000000012 L -2.2650124728251675 -3.162180059167805 L -2.1554013159677314 -2.9410962743548343 L -2.072222144787785 -2.738877803265532 L -2.016276020174149 -2.557472120320347 L -1.9881017338901164 -2.3986262614124745 L -1.987970619714234 -2.263869998997178 L -2.0158839403476896 -2.154501109546781 L -2.07157287525381 -2.0715728752538105 L -2.07157287525381 -2.0715728752538105 Z" fill="none" stroke="#000000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -2.7786796564403575 -2.778679656440358 L -2.8235486860101995 -2.754240101410654 L -2.8884150768375147 -2.7504653871960434 L -2.9726541301190603 -2.7673918663578823 L -3.075454577721985 -2.804856527648887 L -3.1958263951394295 -2.862498565900557 L -3.332610335967738 -2.939762856774187 L -3.4844890960830233 -3.035905302911705 L -3.6500000000000004 -3.1500000000000004 L -3.8275490872364855 -3.2809481537356064 L -4.015426463024187 -3.427488661814507 L -4.211822765530048 -3.5882102590367126 L -4.414846590999799 -3.7615651085616104 L -4.622542709010052 -3.9458837084228757 L -4.832910892406122 -4.139390969745049 L -5.043925180582959 -4.340223311819767 L -5.253553390593274 -4.546446609406726 L -5.459776688180233 -4.756074819417042 L -5.660609030254951 -4.967089107593878 L -5.854116291577124 -5.177457290989947 L -6.03843489143839 -5.385153409000202 L -6.2117897409632885 -5.588177234469952 L -6.372511338185493 -5.784573536975813 L -6.519051846264394 -5.972450912763516 L -6.65 -6.15 L -6.764094697088296 -6.3155109039169774 L -6.860237143225814 -6.467389664032264 L -6.9375014340994445 -6.60417360486057 L -6.995143472351114 -6.724545422278015 L -7.032608133642119 -6.827345869880939 L -7.049534612803957 -6.9115849231624855 L -7.045759898589346 -6.976451313989801 L -7.021320343559643 -7.021320343559642 L -6.976451313989801 -7.045759898589346 L -6.9115849231624855 -7.049534612803957 L -6.827345869880941 -7.032608133642118 L -6.724545422278016 -6.995143472351114 L -6.604173604860571 -6.9375014340994445 L -6.467389664032264 -6.860237143225814 L -6.315510903916978 -6.764094697088296 L -6.15 -6.65 L -5.972450912763517 -6.519051846264395 L -5.784573536975813 -6.372511338185493 L -5.588177234469953 -6.2117897409632885 L -5.3851534090002025 -6.038434891438391 L -5.177457290989949 -5.8541162915771245 L -4.967089107593879 -5.660609030254952 L -4.756074819417042 -5.459776688180233 L -4.546446609406726 -5.253553390593274 L -4.340223311819768 -5.04392518058296 L -4.139390969745049 -4.832910892406122 L -3.9458837084228766 -4.6225427090100535 L -3.761565108561611 -4.414846590999799 L -3.5882102590367126 -4.211822765530049 L -3.427488661814508 -4.015426463024188 L -3.2809481537356064 -3.8275490872364855 L -3.150000000000001 -3.6500000000000012 L -3.035905302911706 -3.484489096083024 L -2.9397628567741867 -3.3326103359677384 L -2.862498565900557 -3.195826395139431 L -2.8048565276488864 -3.0754545777219855 L -2.767391866357882 -2.9726541301190608 L -2.7504653871960434 -2.8884150768375156 L -2.7542401014106535 -2.8235486860102 L -2.7786796564403575 -2.778679656440358 L -2.7786796564403575 -2.778679656440358 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -4.9 9.1 L -4.998017140329561 9.080738906688786 L -5.095090322016128 9.023141121612921 L -5.190284677254462 8.927761342928836 L -5.28268343236509 8.795518130045146 L -5.371396736825998 8.62768505739342 L -5.4555702330196025 8.425878449210181 L -5.534393284163646 8.192041813450947 L -5.607106781186548 7.9284271247461895 L -5.673010453362737 7.637573136654582 L -5.731469612302545 7.322280932078408 L -5.781921264348355 6.985586947303991 L -5.823879532511287 6.630733729460359 L -5.856940335732209 6.261138709017849 L -5.880785280403231 5.880361288064513 L -5.8951847266721975 5.492068561318243 L -5.9 5.1 L -5.8951847266721975 4.707931438681757 L -5.880785280403231 4.319638711935487 L -5.856940335732209 3.938861290982151 L -5.823879532511287 3.5692662705396407 L -5.781921264348355 3.214413052696009 L -5.731469612302545 2.877719067921592 L -5.673010453362737 2.562426863345418 L -5.607106781186548 2.27157287525381 L -5.534393284163646 2.0079581865490517 L -5.4555702330196025 1.7741215507898183 L -5.371396736825998 1.57231494260658 L -5.28268343236509 1.4044818699548527 L -5.190284677254462 1.2722386570711643 L -5.095090322016129 1.176858878387078 L -4.998017140329561 1.1192610933112124 L -4.9 1.0999999999999996 L -4.8019828596704395 1.119261093311212 L -4.704909677983872 1.176858878387078 L -4.609715322745538 1.272238657071164 L -4.517316567634911 1.4044818699548522 L -4.428603263174002 1.5723149426065794 L -4.344429766980398 1.7741215507898178 L -4.2656067158363555 2.0079581865490512 L -4.1928932188134524 2.271572875253809 L -4.1269895466372635 2.5624268633454164 L -4.0685303876974555 2.877719067921591 L -4.018078735651645 3.214413052696008 L -3.976120467488714 3.5692662705396385 L -3.9430596642677918 3.9388612909821497 L -3.91921471959677 4.319638711935485 L -3.904815273327803 4.707931438681758 L -3.9000000000000004 5.099999999999999 L -3.904815273327803 5.49206856131824 L -3.91921471959677 5.880361288064513 L -3.9430596642677913 6.261138709017848 L -3.976120467488714 6.63073372946036 L -4.018078735651645 6.9855869473039895 L -4.068530387697455 7.322280932078407 L -4.1269895466372635 7.6375731366545825 L -4.1928932188134524 7.9284271247461895 L -4.265606715836355 8.192041813450945 L -4.344429766980398 8.425878449210181 L -4.428603263174002 8.62768505739342 L -4.51731656763491 8.795518130045146 L -4.609715322745538 8.927761342928836 L -4.7049096779838715 9.023141121612921 L -4.8019828596704395 9.080738906688786 L -4.9 9.1 L -4.9 9.1 Z" fill="none" stroke="#000000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -4.9 8.1 L -4.94900857016478 8.08555418001659 L -4.997545161008064 8.042355841209691 L -5.045142338627231 7.970821007196626 L -5.091341716182545 7.87163859753386 L -5.135698368412999 7.7457637930450645 L -5.177785116509801 7.594408836907635 L -5.217196642081823 7.41903136008821 L -5.253553390593274 7.2213203435596425 L -5.286505226681369 7.003179852490936 L -5.315734806151273 6.766710699058807 L -5.340960632174178 6.514190210477993 L -5.361939766255643 6.248050297095269 L -5.378470167866105 5.970854031763387 L -5.390392640201616 5.6852709660483844 L -5.3975923633360985 5.394051420988682 L -5.4 5.1 L -5.3975923633360985 4.805948579011318 L -5.390392640201616 4.514729033951615 L -5.378470167866105 4.2291459682366135 L -5.361939766255643 3.9519497029047304 L -5.340960632174178 3.6858097895220068 L -5.315734806151273 3.433289300941194 L -5.286505226681369 3.1968201475090634 L -5.253553390593274 2.9786796564403573 L -5.217196642081823 2.7809686399117886 L -5.177785116509801 2.6055911630923636 L -5.135698368412999 2.454236206954935 L -5.091341716182545 2.3283614024661397 L -5.045142338627231 2.229178992803373 L -4.997545161008064 2.1576441587903084 L -4.94900857016478 2.114445819983409 L -4.9 2.0999999999999996 L -4.85099142983522 2.114445819983409 L -4.802454838991936 2.1576441587903084 L -4.754857661372769 2.229178992803373 L -4.7086582838174555 2.328361402466139 L -4.664301631587001 2.4542362069549344 L -4.6222148834902 2.605591163092363 L -4.582803357918178 2.780968639911788 L -4.546446609406726 2.978679656440357 L -4.513494773318632 3.196820147509062 L -4.484265193848728 3.433289300941193 L -4.459039367825823 3.685809789522006 L -4.438060233744357 3.9519497029047286 L -4.421529832133896 4.229145968236613 L -4.409607359798385 4.514729033951614 L -4.402407636663902 4.805948579011318 L -4.4 5.099999999999999 L -4.402407636663902 5.39405142098868 L -4.409607359798385 5.6852709660483844 L -4.421529832133896 5.970854031763386 L -4.438060233744357 6.248050297095269 L -4.459039367825823 6.5141902104779925 L -4.484265193848728 6.766710699058805 L -4.513494773318632 7.003179852490936 L -4.546446609406726 7.221320343559642 L -4.582803357918177 7.419031360088209 L -4.6222148834902 7.594408836907635 L -4.664301631587001 7.7457637930450645 L -4.7086582838174555 7.87163859753386 L -4.754857661372769 7.970821007196626 L -4.802454838991936 8.042355841209691 L -4.85099142983522 8.08555418001659 L -4.9 8.1 L -4.9 8.1 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -9.9 -9.9 L 10.1 -9.9 L 10.1 10.1 L -9.9 10.1 L -9.9 -9.9 L -9.9 -9.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g></g>
@@ -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-pad" fill="rgb(200, 52, 52)" cx="400" cy="300" r="50" data-type="pcb_smtpad" data-pcb-layer="top"/>
4
+ </g>
5
+ <g transform="translate(0, 600) scale(26.666666666666668, 26.666666666666668) translate(13.9, 13.9)">
6
+ <rect x="-13.9" y="-13.9" width="30" height="30" fill="white"/><g transform="matrix(1 0 0 -1 0 2.200000000000001)"><g transform="matrix(1,0,0,1,0,0)"><path d="M 2.1 1.1 L 2.095184726672197 1.1980171403295607 L 2.0807852804032305 1.2950903220161283 L 2.056940335732209 1.3902846772544624 L 2.0238795325112866 1.48268343236509 L 1.981921264348355 1.5713967368259978 L 1.9314696123025454 1.6555702330196023 L 1.873010453362737 1.7343932841636456 L 1.8071067811865476 1.8071067811865476 L 1.7343932841636456 1.873010453362737 L 1.6555702330196023 1.9314696123025454 L 1.571396736825998 1.981921264348355 L 1.48268343236509 2.0238795325112866 L 1.3902846772544624 2.056940335732209 L 1.2950903220161285 2.0807852804032305 L 1.198017140329561 2.095184726672197 L 1.1 2.1 L 1.0019828596704394 2.095184726672197 L 0.9049096779838719 2.0807852804032305 L 0.8097153227455379 2.056940335732209 L 0.7173165676349104 2.0238795325112866 L 0.6286032631740024 1.981921264348355 L 0.5444297669803981 1.9314696123025454 L 0.4656067158363547 1.8730104533627372 L 0.3928932188134526 1.8071067811865476 L 0.3269895466372631 1.7343932841636456 L 0.26853038769745474 1.6555702330196023 L 0.21807873565164515 1.571396736825998 L 0.17612046748871335 1.48268343236509 L 0.14305966426779126 1.3902846772544626 L 0.11921471959676966 1.2950903220161287 L 0.10481527332780327 1.198017140329561 L 0.10000000000000009 1.1000000000000003 L 0.10481527332780316 1.0019828596704394 L 0.11921471959676966 0.9049096779838717 L 0.14305966426779115 0.809715322745538 L 0.17612046748871324 0.7173165676349105 L 0.21807873565164504 0.6286032631740024 L 0.26853038769745463 0.5444297669803981 L 0.326989546637263 0.4656067158363548 L 0.3928932188134524 0.3928932188134526 L 0.46560671583635427 0.32698954663726343 L 0.5444297669803979 0.26853038769745485 L 0.6286032631740022 0.21807873565164515 L 0.7173165676349098 0.17612046748871357 L 0.8097153227455376 0.14305966426779126 L 0.9049096779838715 0.11921471959676977 L 1.0019828596704397 0.10481527332780316 L 1.0999999999999999 0.10000000000000009 L 1.19801714032956 0.10481527332780316 L 1.2950903220161285 0.11921471959676966 L 1.3902846772544621 0.14305966426779115 L 1.4826834323650901 0.17612046748871346 L 1.5713967368259976 0.21807873565164504 L 1.6555702330196018 0.26853038769745463 L 1.7343932841636458 0.3269895466372632 L 1.8071067811865476 0.3928932188134524 L 1.8730104533627367 0.46560671583635416 L 1.9314696123025454 0.5444297669803979 L 1.981921264348355 0.6286032631740022 L 2.0238795325112866 0.7173165676349097 L 2.056940335732209 0.8097153227455376 L 2.0807852804032305 0.9049096779838713 L 2.095184726672197 1.0019828596704397 L 2.1 1.1 L 2.1 1.1 Z" fill="none" stroke="#000000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -3.9 -3.9 L 6.1 -3.9 L 6.1 6.1 L -3.9 6.1 L -3.9 -3.9 L -3.9 -3.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"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="350" y="275" width="100" height="50" rx="25" ry="25" data-type="pcb_smtpad" data-pcb-layer="top"/>
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 0.6 -0.4 L 0.6490085701647803 -0.3975923633360984 L 0.6975451610080642 -0.39039264020161524 L 0.7451423386272311 -0.37847016786610443 L 0.7913417161825449 -0.3619397662556434 L 0.8356983684129988 -0.3409606321741775 L 0.8777851165098012 -0.3157348061512726 L 0.9171966420818227 -0.28650522668136846 L 0.9535533905932738 -0.25355339059327375 L 0.9865052266813685 -0.21719664208182274 L 1.0157348061512725 -0.17778511650980108 L 1.0409606321741776 -0.13569836841299887 L 1.0619397662556433 -0.09134171618254489 L 1.0784701678661044 -0.04514233862723113 L 1.0903926402016153 0.0024548389919358815 L 1.0975923633360984 0.05099142983521965 L 1.1 0.1 L 1.0975923633360984 0.14900857016478036 L 1.0903926402016153 0.19754516100806413 L 1.0784701678661044 0.24514233862723114 L 1.0619397662556433 0.2913417161825449 L 1.0409606321741776 0.3356983684129989 L 1.0157348061512725 0.37778511650980107 L 0.9865052266813685 0.4171966420818227 L 0.9535533905932738 0.4535533905932737 L 0.9171966420818227 0.48650522668136853 L 0.877785116509801 0.5157348061512727 L 0.8356983684129988 0.5409606321741774 L 0.7913417161825449 0.5619397662556433 L 0.7451423386272311 0.5784701678661044 L 0.6975451610080643 0.5903926402016152 L 0.6490085701647803 0.5975923633360984 L 0.6 0.6 L -0.4 0.6 L -0.39999999999999997 0.6 L -0.44900857016478035 0.5975923633360984 L -0.4975451610080641 0.5903926402016152 L -0.5451423386272312 0.5784701678661045 L -0.5913417161825449 0.5619397662556433 L -0.6356983684129989 0.5409606321741776 L -0.677785116509801 0.5157348061512727 L -0.7171966420818228 0.48650522668136853 L -0.7535533905932738 0.4535533905932738 L -0.7865052266813686 0.4171966420818227 L -0.8157348061512727 0.37778511650980107 L -0.8409606321741775 0.33569836841299894 L -0.8619397662556434 0.29134171618254495 L -0.8784701678661044 0.2451423386272312 L -0.8903926402016152 0.1975451610080643 L -0.8975923633360985 0.14900857016478042 L -0.9 0.10000000000000006 L -0.8975923633360985 0.05099142983521971 L -0.8903926402016152 0.002454838991935826 L -0.8784701678661044 -0.04514233862723105 L -0.8619397662556434 -0.09134171618254483 L -0.8409606321741776 -0.13569836841299882 L -0.8157348061512728 -0.17778511650980097 L -0.7865052266813686 -0.21719664208182263 L -0.7535533905932739 -0.25355339059327375 L -0.7171966420818225 -0.2865052266813686 L -0.6777851165098011 -0.3157348061512726 L -0.635698368412999 -0.3409606321741775 L -0.5913417161825452 -0.3619397662556433 L -0.5451423386272313 -0.37847016786610443 L -0.49754516100806434 -0.3903926402016151 L -0.44900857016478024 -0.3975923633360985 L -0.40000000000000013 -0.4 L 0.6 -0.4 L 0.6 -0.4 L 0.6 -0.4 Z" fill="none" stroke="#000000" 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 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"/><polygon class="pcb-pad" fill="rgb(200, 52, 52)" points="400,300 500,300 500,250 450,250 450,200 400,200 400,250" data-type="pcb_smtpad" data-pcb-layer="top"/>
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 0.1 0.1 L 2.1 0.1 L 2.1 1.1 L 1.1 1.1 L 1.1 2.1 L 0.1 2.1 L 0.1 1.1 L 0.1 0.1 L 0.1 0.1 Z" fill="none" stroke="#000000" 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 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"/>
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 0.8071067811865476 0.09999999999999992 L 0.8400586172746423 0.13635674851145102 L 0.8692881967445465 0.17576827408347262 L 0.8945140227674512 0.21785502218027492 L 0.9154931568489171 0.2622116744107289 L 0.9320235584593782 0.30841105196604257 L 0.943946030794889 0.35600822958520967 L 0.9511457539293722 0.40454482042849343 L 0.9535533905932738 0.4535533905932737 L 0.9511457539293723 0.502561960758054 L 0.9439460307948889 0.5510985516013378 L 0.9320235584593782 0.5986957292205048 L 0.9154931568489172 0.6448951067758186 L 0.8945140227674513 0.6892517590062724 L 0.8692881967445465 0.7313385071030748 L 0.8400586172746424 0.7707500326750965 L 0.8071067811865476 0.8071067811865474 L 0.7707500326750966 0.8400586172746423 L 0.7313385071030749 0.8692881967445464 L 0.6892517590062726 0.8945140227674512 L 0.6448951067758187 0.9154931568489171 L 0.598695729220505 0.9320235584593781 L 0.5510985516013379 0.9439460307948888 L 0.5025619607580541 0.9511457539293722 L 0.4535533905932739 0.9535533905932737 L 0.4045448204284935 0.9511457539293722 L 0.3560082295852095 0.9439460307948888 L 0.3084110519660427 0.9320235584593781 L 0.26221167441072896 0.9154931568489172 L 0.21785502218027497 0.8945140227674513 L 0.1757682740834729 0.8692881967445465 L 0.13635674851145113 0.8400586172746423 L 0.10000000000000009 0.8071067811865476 L -0.6071067811865475 0.10000000000000003 L -0.6071067811865475 0.10000000000000003 L -0.6400586172746423 0.06364325148854899 L -0.6692881967445463 0.024231725916527447 L -0.6945140227674513 -0.017855022180274738 L -0.7154931568489171 -0.062211674410728834 L -0.7320235584593784 -0.1084110519660425 L -0.743946030794889 -0.15600822958520943 L -0.7511457539293723 -0.20454482042849337 L -0.7535533905932739 -0.2535533905932737 L -0.7511457539293723 -0.3025619607580541 L -0.7439460307948891 -0.35109855160133796 L -0.7320235584593784 -0.3986957292205048 L -0.7154931568489173 -0.44489510677581856 L -0.6945140227674513 -0.4892517590062725 L -0.6692881967445466 -0.5313385071030747 L -0.6400586172746424 -0.5707500326750965 L -0.6071067811865476 -0.6071067811865475 L -0.5707500326750966 -0.6400586172746423 L -0.531338507103075 -0.6692881967445464 L -0.4892517590062727 -0.6945140227674511 L -0.4448951067758188 -0.7154931568489171 L -0.398695729220505 -0.7320235584593782 L -0.3510985516013382 -0.7439460307948891 L -0.3025619607580543 -0.7511457539293722 L -0.2535533905932739 -0.7535533905932738 L -0.2045448204284933 -0.751145753929372 L -0.15600822958520977 -0.7439460307948889 L -0.10841105196604273 -0.7320235584593783 L -0.06221167441072917 -0.7154931568489171 L -0.017855022180275126 -0.6945140227674513 L 0.024231725916527114 -0.6692881967445465 L 0.06364325148854905 -0.6400586172746422 L 0.09999999999999987 -0.6071067811865476 L 0.8071067811865476 0.09999999999999992 L 0.8071067811865476 0.09999999999999992 L 0.8071067811865476 0.09999999999999992 Z" fill="none" stroke="#000000" 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 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-pad" fill="rgb(200, 52, 52)" x="-50" y="-50" width="100" height="100" transform="translate(300 300) rotate(-45)" data-type="pcb_smtpad" data-pcb-layer="top" rx="25" ry="25"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="450" y="250" width="100" height="100" data-type="pcb_smtpad" data-pcb-layer="top"/>
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 -1.3117574698747463 -0.8507737510847889 L -0.7864354810570167 0.00012977344932948998 L -0.7864354810570167 0.00012977344932937895 L -0.71830505720587 0.1829369918249171 L -0.7253180468575611 0.37790122372528856 L -0.8064067859105295 0.5553409321987758 L -0.9492262489152108 0.6882425301252535 L -0.949226248915211 0.6882425301252536 L -1.8001297734493293 1.2135645189429833 L -1.8001297734493293 1.2135645189429833 L -1.982936991824917 1.28169494279413 L -2.1779012237252884 1.2746819531424387 L -2.355340932198776 1.1935932140894705 L -2.4882425301252535 1.050773751084789 L -2.4882425301252535 1.050773751084789 L -3.0135645189429834 0.19987022655067052 L -3.0135645189429834 0.19987022655067058 L -3.0816949427941296 0.017063008175083022 L -3.0746819531424388 -0.17790122372528863 L -2.9935932140894703 -0.35534093219877605 L -2.8507737510847893 -0.48824253012525354 L -2.850773751084789 -0.48824253012525365 L -1.9998702265506705 -1.0135645189429832 L -1.9998702265506705 -1.0135645189429832 L -1.817063008175083 -1.0816949427941298 L -1.6220987762747114 -1.0746819531424388 L -1.444659067801224 -0.9935932140894704 L -1.3117574698747463 -0.8507737510847891 L -1.3117574698747463 -0.8507737510847889 L -1.3117574698747463 -0.8507737510847889 Z" fill="none" stroke="#000000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 1.1 -0.9 L 3.1 -0.9 L 3.1 -0.9 L 3.1 -0.9 L 3.1 1.1 L 3.1 1.1 L 3.1 1.1 L 1.1 1.1 L 1.1 1.1 L 1.1 1.1 L 1.1 -0.9 L 1.1 -0.9 L 1.1 -0.9 L 1.1 -0.9 Z" fill="none" stroke="#000000" 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 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g></g>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,45 @@
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: "source_port",
11
+ name: "via1",
12
+ source_port_id: "source_port_1",
13
+ },
14
+ {
15
+ type: "pcb_board",
16
+ pcb_board_id: "board",
17
+ width: 10,
18
+ height: 10,
19
+ center: { x: 0, y: 0 },
20
+ thickness: 1.6,
21
+ num_layers: 2,
22
+ material: "fr4",
23
+ },
24
+ {
25
+ type: "pcb_smtpad",
26
+ x: 0,
27
+ y: 0,
28
+ layer: "top",
29
+ shape: "circle",
30
+ pcb_smtpad_id: "pcb_smt_pad_1",
31
+ radius: 1,
32
+ },
33
+ ]
34
+
35
+ test("renders a circle smt pad", async () => {
36
+ const pcbSvg = await convertCircuitJsonToPcbSvg(circuitJson)
37
+
38
+ const project = convertCircuitJsonToLbrn(circuitJson)
39
+
40
+ const lbrnSvg = await generateLightBurnSvg(project)
41
+
42
+ expect(stackSvgsVertically([pcbSvg, lbrnSvg])).toMatchSvgSnapshot(
43
+ import.meta.filename,
44
+ )
45
+ })
@@ -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: "source_port",
11
+ name: "via1",
12
+ source_port_id: "source_port_1",
13
+ },
14
+ {
15
+ type: "pcb_board",
16
+ pcb_board_id: "board",
17
+ width: 10,
18
+ height: 10,
19
+ center: { x: 0, y: 0 },
20
+ thickness: 1.6,
21
+ num_layers: 2,
22
+ material: "fr4",
23
+ },
24
+ {
25
+ type: "pcb_smtpad",
26
+ x: 0,
27
+ y: 0,
28
+ layer: "top",
29
+ shape: "pill",
30
+ pcb_smtpad_id: "pcb_smt_pad_1",
31
+ width: 2,
32
+ height: 1,
33
+ radius: 0.5,
34
+ },
35
+ ]
36
+
37
+ test("renders a pill smt pad", 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,51 @@
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: "source_port",
11
+ name: "via1",
12
+ source_port_id: "source_port_1",
13
+ },
14
+ {
15
+ type: "pcb_board",
16
+ pcb_board_id: "board",
17
+ width: 10,
18
+ height: 10,
19
+ center: { x: 0, y: 0 },
20
+ thickness: 1.6,
21
+ num_layers: 2,
22
+ material: "fr4",
23
+ },
24
+ {
25
+ type: "pcb_smtpad",
26
+ layer: "top",
27
+ shape: "polygon",
28
+ pcb_smtpad_id: "pcb_smt_pad_1",
29
+ points: [
30
+ { x: 0, y: 0 },
31
+ { x: 2, y: 0 },
32
+ { x: 2, y: 1 },
33
+ { x: 1, y: 1 },
34
+ { x: 1, y: 2 },
35
+ { x: 0, y: 2 },
36
+ { x: 0, y: 1 },
37
+ ],
38
+ },
39
+ ]
40
+
41
+ test("renders a polygon smt pad", async () => {
42
+ const pcbSvg = await convertCircuitJsonToPcbSvg(circuitJson)
43
+
44
+ const project = convertCircuitJsonToLbrn(circuitJson)
45
+
46
+ const lbrnSvg = await generateLightBurnSvg(project)
47
+
48
+ expect(stackSvgsVertically([pcbSvg, lbrnSvg])).toMatchSvgSnapshot(
49
+ import.meta.filename,
50
+ )
51
+ })
@@ -0,0 +1,48 @@
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: "source_port",
11
+ name: "via1",
12
+ source_port_id: "source_port_1",
13
+ },
14
+ {
15
+ type: "pcb_board",
16
+ pcb_board_id: "board",
17
+ width: 10,
18
+ height: 10,
19
+ center: { x: 0, y: 0 },
20
+ thickness: 1.6,
21
+ num_layers: 2,
22
+ material: "fr4",
23
+ },
24
+ {
25
+ type: "pcb_smtpad",
26
+ x: 0,
27
+ y: 0,
28
+ layer: "top",
29
+ shape: "rotated_pill",
30
+ pcb_smtpad_id: "pcb_smt_pad_1",
31
+ width: 2,
32
+ height: 1,
33
+ radius: 0.5,
34
+ ccw_rotation: 45,
35
+ },
36
+ ]
37
+
38
+ test("renders a rotated pill smt pad", async () => {
39
+ const pcbSvg = await convertCircuitJsonToPcbSvg(circuitJson)
40
+
41
+ const project = convertCircuitJsonToLbrn(circuitJson)
42
+
43
+ const lbrnSvg = await generateLightBurnSvg(project)
44
+
45
+ expect(stackSvgsVertically([pcbSvg, lbrnSvg])).toMatchSvgSnapshot(
46
+ import.meta.filename,
47
+ )
48
+ })
@@ -0,0 +1,59 @@
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: "source_port",
11
+ name: "via1",
12
+ source_port_id: "source_port_1",
13
+ },
14
+ {
15
+ type: "pcb_board",
16
+ pcb_board_id: "board",
17
+ width: 10,
18
+ height: 10,
19
+ center: { x: 0, y: 0 },
20
+ thickness: 1.6,
21
+ num_layers: 2,
22
+ material: "fr4",
23
+ },
24
+ {
25
+ type: "pcb_smtpad",
26
+ x: -2,
27
+ y: 0,
28
+ layer: "top",
29
+ shape: "rotated_rect",
30
+ pcb_smtpad_id: "pcb_smt_pad_1",
31
+ width: 2,
32
+ height: 2,
33
+ ccw_rotation: 45,
34
+ rect_border_radius: 0.5,
35
+ },
36
+ {
37
+ type: "pcb_smtpad",
38
+ x: 2,
39
+ y: 0,
40
+ layer: "top",
41
+ shape: "rotated_rect",
42
+ pcb_smtpad_id: "pcb_smt_pad_1",
43
+ width: 2,
44
+ height: 2,
45
+ ccw_rotation: 0,
46
+ },
47
+ ]
48
+
49
+ test("renders a rotated rect smt pad", async () => {
50
+ const pcbSvg = await convertCircuitJsonToPcbSvg(circuitJson)
51
+
52
+ const project = convertCircuitJsonToLbrn(circuitJson)
53
+
54
+ const lbrnSvg = await generateLightBurnSvg(project)
55
+
56
+ expect(stackSvgsVertically([pcbSvg, lbrnSvg])).toMatchSvgSnapshot(
57
+ import.meta.filename,
58
+ )
59
+ })