circuit-json-to-lbrn 0.0.19 → 0.0.20
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
|
@@ -1116,7 +1116,7 @@ var addRotatedRectSmtPad = (smtPad, ctx) => {
|
|
|
1116
1116
|
} = ctx;
|
|
1117
1117
|
const centerX = smtPad.x + origin.x;
|
|
1118
1118
|
const centerY = smtPad.y + origin.y;
|
|
1119
|
-
const rotation = smtPad.ccw_rotation ?? 0;
|
|
1119
|
+
const rotation = (smtPad.ccw_rotation ?? 0) * (Math.PI / 180);
|
|
1120
1120
|
const borderRadius = smtPad.rect_border_radius ?? 0;
|
|
1121
1121
|
if (smtPad.width > 0 && smtPad.height > 0) {
|
|
1122
1122
|
const outer = createRoundedRectPath(
|
|
@@ -20,7 +20,7 @@ export const addRotatedRectSmtPad = (
|
|
|
20
20
|
} = ctx
|
|
21
21
|
const centerX = smtPad.x + origin.x
|
|
22
22
|
const centerY = smtPad.y + origin.y
|
|
23
|
-
const rotation = smtPad.ccw_rotation ?? 0
|
|
23
|
+
const rotation = (smtPad.ccw_rotation ?? 0) * (Math.PI / 180)
|
|
24
24
|
const borderRadius = smtPad.rect_border_radius ?? 0
|
|
25
25
|
|
|
26
26
|
if (smtPad.width > 0 && smtPad.height > 0) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<svg width="800" height="
|
|
1
|
+
<svg width="800" height="1350" viewBox="0 0 800 1350" 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="
|
|
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="100" y="50" width="600" height="500" data-type="pcb_boundary" data-pcb-layer="global"/><path class="pcb-board" d="M 100 550 L 700 550 L 700 50 L 100 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(200 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="-50" y="-50" width="100" height="100" transform="translate(400 300) rotate(-30)" data-type="pcb_smtpad" data-pcb-layer="top" rx="25" ry="25"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="550" y="250" width="100" height="100" data-type="pcb_smtpad" data-pcb-layer="top"/>
|
|
4
4
|
</g>
|
|
5
|
-
<g transform="translate(0, 600) scale(
|
|
6
|
-
<rect x="-
|
|
5
|
+
<g transform="translate(0, 600) scale(25, 25) translate(15.9, 14.9)">
|
|
6
|
+
<rect x="-15.9" y="-14.9" width="32" 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 -3.5464466094067264 -0.9606601717798214 L -2.8393398282201785 -0.25355339059327386 L -2.8393398282201785 -0.25355339059327386 L -2.730953452557809 -0.0913417161825448 L -2.6928932188134524 0.0999999999999999 L -2.7309534525578085 0.29134171618254445 L -2.8393398282201785 0.4535533905932736 L -2.8393398282201785 0.4535533905932737 L -3.546446609406726 1.1606601717798213 L -3.546446609406726 1.1606601717798213 L -3.708658283817455 1.269046547442191 L -3.9 1.3071067811865476 L -4.091341716182544 1.269046547442191 L -4.253553390593273 1.1606601717798215 L -4.253553390593273 1.1606601717798215 L -4.960660171779821 0.4535533905932738 L -4.960660171779821 0.45355339059327393 L -5.069046547442191 0.2913417161825451 L -5.107106781186547 0.1 L -5.069046547442191 -0.0913417161825448 L -4.960660171779821 -0.25355339059327364 L -4.960660171779821 -0.25355339059327364 L -4.253553390593273 -0.9606601717798212 L -4.253553390593273 -0.9606601717798212 L -4.091341716182545 -1.0690465474421909 L -3.9 -1.1071067811865474 L -3.7086582838174555 -1.0690465474421909 L -3.5464466094067264 -0.9606601717798214 L -3.5464466094067264 -0.9606601717798214 L -3.5464466094067264 -0.9606601717798214 Z" fill="none" stroke="#000000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 0.1669872981077806 -1.0160254037844385 L 1.0330127018922193 -0.5160254037844387 L 1.0330127018922193 -0.5160254037844388 L 1.179689372037837 -0.38739341639657954 L 1.2659756150367536 -0.21242222444347994 L 1.2787351325791247 -0.017749605782194006 L 1.216025403784439 0.16698729810778049 L 1.2160254037844387 0.1669872981077806 L 0.7160254037844387 1.0330127018922193 L 0.7160254037844387 1.0330127018922193 L 0.5873934163965797 1.179689372037837 L 0.41242222444347987 1.2659756150367536 L 0.21774960578219363 1.2787351325791247 L 0.033012701892219415 1.2160254037844387 L 0.033012701892219415 1.2160254037844387 L -0.8330127018922193 0.7160254037844387 L -0.8330127018922192 0.7160254037844388 L -0.9796893720378367 0.5873934163965798 L -1.0659756150367534 0.41242222444347987 L -1.0787351325791246 0.21774960578219363 L -1.0160254037844387 0.033012701892219526 L -1.0160254037844385 0.033012701892219415 L -0.5160254037844387 -0.8330127018922193 L -0.5160254037844388 -0.8330127018922192 L -0.38739341639657987 -0.9796893720378369 L -0.21242222444347994 -1.0659756150367534 L -0.017749605782193895 -1.0787351325791246 L 0.16698729810778049 -1.0160254037844387 L 0.1669872981077806 -1.0160254037844385 L 0.1669872981077806 -1.0160254037844385 Z" fill="none" stroke="#000000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M 3.0999999999999996 -0.9 L 5.1 -0.9 L 5.1 -0.9 L 5.1 -0.9 L 5.1 1.1 L 5.1 1.1 L 5.1 1.1 L 3.0999999999999996 1.1 L 3.0999999999999996 1.1 L 3.0999999999999996 1.1 L 3.0999999999999996 -0.9 L 3.0999999999999996 -0.9 L 3.0999999999999996 -0.9 L 3.0999999999999996 -0.9 Z" fill="none" stroke="#000000" stroke-width="0.1"/></g><g transform="matrix(1,0,0,1,0,0)"><path d="M -5.9 -4.9 L 6.1 -4.9 L 6.1 5.1 L -5.9 5.1 L -5.9 -4.9 L -5.9 -4.9 Z" fill="none" stroke="#0000FF" stroke-width="0.1"/></g></g>
|
|
7
7
|
</g>
|
|
8
8
|
</svg>
|
|
@@ -14,7 +14,7 @@ const circuitJson: CircuitJson = [
|
|
|
14
14
|
{
|
|
15
15
|
type: "pcb_board",
|
|
16
16
|
pcb_board_id: "board",
|
|
17
|
-
width:
|
|
17
|
+
width: 12,
|
|
18
18
|
height: 10,
|
|
19
19
|
center: { x: 0, y: 0 },
|
|
20
20
|
thickness: 1.6,
|
|
@@ -23,7 +23,7 @@ const circuitJson: CircuitJson = [
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
type: "pcb_smtpad",
|
|
26
|
-
x: -
|
|
26
|
+
x: -4,
|
|
27
27
|
y: 0,
|
|
28
28
|
layer: "top",
|
|
29
29
|
shape: "rotated_rect",
|
|
@@ -35,7 +35,19 @@ const circuitJson: CircuitJson = [
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
type: "pcb_smtpad",
|
|
38
|
-
x:
|
|
38
|
+
x: 0,
|
|
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: 30,
|
|
46
|
+
rect_border_radius: 0.5,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: "pcb_smtpad",
|
|
50
|
+
x: 4,
|
|
39
51
|
y: 0,
|
|
40
52
|
layer: "top",
|
|
41
53
|
shape: "rotated_rect",
|