@tscircuit/3d-viewer 0.0.576 → 0.0.577
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 +878 -597
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -638,13 +638,13 @@ var require_fromVec2 = __commonJS({
|
|
|
638
638
|
var require_length = __commonJS({
|
|
639
639
|
"node_modules/@jscad/modeling/src/maths/vec3/length.js"(exports, module) {
|
|
640
640
|
"use strict";
|
|
641
|
-
var
|
|
641
|
+
var length64 = (vector) => {
|
|
642
642
|
const x = vector[0];
|
|
643
643
|
const y = vector[1];
|
|
644
644
|
const z21 = vector[2];
|
|
645
645
|
return Math.sqrt(x * x + y * y + z21 * z21);
|
|
646
646
|
};
|
|
647
|
-
module.exports =
|
|
647
|
+
module.exports = length64;
|
|
648
648
|
}
|
|
649
649
|
});
|
|
650
650
|
|
|
@@ -1781,8 +1781,8 @@ var require_fromValues3 = __commonJS({
|
|
|
1781
1781
|
var require_length2 = __commonJS({
|
|
1782
1782
|
"node_modules/@jscad/modeling/src/maths/vec2/length.js"(exports, module) {
|
|
1783
1783
|
"use strict";
|
|
1784
|
-
var
|
|
1785
|
-
module.exports =
|
|
1784
|
+
var length64 = (vector) => Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]);
|
|
1785
|
+
module.exports = length64;
|
|
1786
1786
|
}
|
|
1787
1787
|
});
|
|
1788
1788
|
|
|
@@ -2042,14 +2042,14 @@ var require_fromPoints = __commonJS({
|
|
|
2042
2042
|
if (!Array.isArray(points)) {
|
|
2043
2043
|
throw new Error("the given points must be an array");
|
|
2044
2044
|
}
|
|
2045
|
-
let
|
|
2046
|
-
if (
|
|
2045
|
+
let length64 = points.length;
|
|
2046
|
+
if (length64 < 3) {
|
|
2047
2047
|
throw new Error("the given points must define a closed geometry with three or more points");
|
|
2048
2048
|
}
|
|
2049
|
-
if (vec2.equals(points[0], points[
|
|
2049
|
+
if (vec2.equals(points[0], points[length64 - 1])) --length64;
|
|
2050
2050
|
const sides2 = [];
|
|
2051
|
-
let prevpoint = points[
|
|
2052
|
-
for (let i = 0; i <
|
|
2051
|
+
let prevpoint = points[length64 - 1];
|
|
2052
|
+
for (let i = 0; i < length64; i++) {
|
|
2053
2053
|
const point = points[i];
|
|
2054
2054
|
sides2.push([vec2.clone(prevpoint), vec2.clone(point)]);
|
|
2055
2055
|
prevpoint = point;
|
|
@@ -2664,7 +2664,7 @@ var require_Face = __commonJS({
|
|
|
2664
2664
|
var copy = require_copy2();
|
|
2665
2665
|
var cross = require_cross();
|
|
2666
2666
|
var dot = require_dot();
|
|
2667
|
-
var
|
|
2667
|
+
var length64 = require_length();
|
|
2668
2668
|
var normalize = require_normalize();
|
|
2669
2669
|
var scale2 = require_scale();
|
|
2670
2670
|
var subtract4 = require_subtract();
|
|
@@ -2713,7 +2713,7 @@ var require_Face = __commonJS({
|
|
|
2713
2713
|
e2 = e2.next;
|
|
2714
2714
|
this.nVertices += 1;
|
|
2715
2715
|
}
|
|
2716
|
-
this.area =
|
|
2716
|
+
this.area = length64(this.normal);
|
|
2717
2717
|
this.normal = scale2(this.normal, this.normal, 1 / this.area);
|
|
2718
2718
|
}
|
|
2719
2719
|
computeNormalMinArea(minArea) {
|
|
@@ -4984,12 +4984,12 @@ var require_equals5 = __commonJS({
|
|
|
4984
4984
|
}
|
|
4985
4985
|
const apoints = toPoints(a);
|
|
4986
4986
|
const bpoints = toPoints(b);
|
|
4987
|
-
const
|
|
4987
|
+
const length64 = apoints.length;
|
|
4988
4988
|
let offset4 = 0;
|
|
4989
4989
|
do {
|
|
4990
4990
|
let unequal = false;
|
|
4991
|
-
for (let i = 0; i <
|
|
4992
|
-
if (!vec2.equals(apoints[i], bpoints[(i + offset4) %
|
|
4991
|
+
for (let i = 0; i < length64; i++) {
|
|
4992
|
+
if (!vec2.equals(apoints[i], bpoints[(i + offset4) % length64])) {
|
|
4993
4993
|
unequal = true;
|
|
4994
4994
|
break;
|
|
4995
4995
|
}
|
|
@@ -5000,7 +5000,7 @@ var require_equals5 = __commonJS({
|
|
|
5000
5000
|
if (!a.isClosed) {
|
|
5001
5001
|
return false;
|
|
5002
5002
|
}
|
|
5003
|
-
} while (++offset4 <
|
|
5003
|
+
} while (++offset4 < length64);
|
|
5004
5004
|
return false;
|
|
5005
5005
|
};
|
|
5006
5006
|
module.exports = equals;
|
|
@@ -5853,8 +5853,8 @@ var require_length3 = __commonJS({
|
|
|
5853
5853
|
"node_modules/@jscad/modeling/src/curves/bezier/length.js"(exports, module) {
|
|
5854
5854
|
"use strict";
|
|
5855
5855
|
var lengths = require_lengths();
|
|
5856
|
-
var
|
|
5857
|
-
module.exports =
|
|
5856
|
+
var length64 = (segments, bezier) => lengths(segments, bezier)[segments];
|
|
5857
|
+
module.exports = length64;
|
|
5858
5858
|
}
|
|
5859
5859
|
});
|
|
5860
5860
|
|
|
@@ -6515,12 +6515,12 @@ var require_fromPlanes = __commonJS({
|
|
|
6515
6515
|
var fromPointAndDirection = require_fromPointAndDirection();
|
|
6516
6516
|
var fromPlanes = (out, plane1, plane2) => {
|
|
6517
6517
|
let direction = vec3.cross(vec3.create(), plane1, plane2);
|
|
6518
|
-
let
|
|
6519
|
-
if (
|
|
6518
|
+
let length64 = vec3.length(direction);
|
|
6519
|
+
if (length64 < EPS) {
|
|
6520
6520
|
throw new Error("parallel planes do not intersect");
|
|
6521
6521
|
}
|
|
6522
|
-
|
|
6523
|
-
direction = vec3.scale(direction, direction,
|
|
6522
|
+
length64 = 1 / length64;
|
|
6523
|
+
direction = vec3.scale(direction, direction, length64);
|
|
6524
6524
|
const absx = Math.abs(direction[0]);
|
|
6525
6525
|
const absy = Math.abs(direction[1]);
|
|
6526
6526
|
const absz = Math.abs(direction[2]);
|
|
@@ -8105,8 +8105,8 @@ var require_roundedCylinder = __commonJS({
|
|
|
8105
8105
|
const start = [0, 0, -(height10 / 2)];
|
|
8106
8106
|
const end = [0, 0, height10 / 2];
|
|
8107
8107
|
const direction = vec3.subtract(vec3.create(), end, start);
|
|
8108
|
-
const
|
|
8109
|
-
if (2 * roundRadius >
|
|
8108
|
+
const length64 = vec3.length(direction);
|
|
8109
|
+
if (2 * roundRadius > length64 - EPS) throw new Error("height must be larger than twice roundRadius");
|
|
8110
8110
|
let defaultnormal;
|
|
8111
8111
|
if (Math.abs(direction[0]) > Math.abs(direction[1])) {
|
|
8112
8112
|
defaultnormal = vec3.fromValues(0, 1, 0);
|
|
@@ -14669,124 +14669,127 @@ import {
|
|
|
14669
14669
|
} from "circuit-json";
|
|
14670
14670
|
import { z as z25 } from "zod";
|
|
14671
14671
|
import { z as z26 } from "zod";
|
|
14672
|
-
import { length as
|
|
14672
|
+
import { length as length19 } from "circuit-json";
|
|
14673
14673
|
import {
|
|
14674
|
-
length as
|
|
14674
|
+
length as length18
|
|
14675
14675
|
} from "circuit-json";
|
|
14676
|
-
import { z as z27 } from "zod";
|
|
14677
14676
|
import {
|
|
14678
14677
|
length as length20
|
|
14679
14678
|
} from "circuit-json";
|
|
14680
|
-
import { z as
|
|
14679
|
+
import { z as z27 } from "zod";
|
|
14681
14680
|
import {
|
|
14682
14681
|
length as length21
|
|
14683
14682
|
} from "circuit-json";
|
|
14684
|
-
import { z as
|
|
14683
|
+
import { z as z28 } from "zod";
|
|
14685
14684
|
import {
|
|
14686
14685
|
length as length22
|
|
14687
14686
|
} from "circuit-json";
|
|
14688
|
-
import { z as
|
|
14687
|
+
import { z as z29 } from "zod";
|
|
14689
14688
|
import {
|
|
14690
14689
|
length as length23
|
|
14691
14690
|
} from "circuit-json";
|
|
14692
|
-
import { z as
|
|
14691
|
+
import { z as z30 } from "zod";
|
|
14693
14692
|
import {
|
|
14694
14693
|
length as length24
|
|
14695
14694
|
} from "circuit-json";
|
|
14696
|
-
import { z as
|
|
14695
|
+
import { z as z31 } from "zod";
|
|
14697
14696
|
import {
|
|
14698
14697
|
length as length25
|
|
14699
14698
|
} from "circuit-json";
|
|
14699
|
+
import { z as z32 } from "zod";
|
|
14700
|
+
import {
|
|
14701
|
+
length as length26
|
|
14702
|
+
} from "circuit-json";
|
|
14700
14703
|
import { z as z33 } from "zod";
|
|
14701
14704
|
import "zod";
|
|
14702
|
-
import { length as
|
|
14705
|
+
import { length as length27 } from "circuit-json";
|
|
14703
14706
|
import { z as z35 } from "zod";
|
|
14704
14707
|
import { z as z36 } from "zod";
|
|
14705
|
-
import { length as length27 } from "circuit-json";
|
|
14706
|
-
import { z as z37 } from "zod";
|
|
14707
14708
|
import { length as length28 } from "circuit-json";
|
|
14708
|
-
import { z as
|
|
14709
|
+
import { z as z37 } from "zod";
|
|
14709
14710
|
import { length as length29 } from "circuit-json";
|
|
14710
|
-
import { z as
|
|
14711
|
+
import { z as z38 } from "zod";
|
|
14711
14712
|
import { length as length30 } from "circuit-json";
|
|
14712
|
-
import { z as
|
|
14713
|
+
import { z as z39 } from "zod";
|
|
14713
14714
|
import { length as length31 } from "circuit-json";
|
|
14714
|
-
import { z as
|
|
14715
|
+
import { z as z40 } from "zod";
|
|
14715
14716
|
import { length as length32 } from "circuit-json";
|
|
14716
|
-
import { z as
|
|
14717
|
+
import { z as z41 } from "zod";
|
|
14717
14718
|
import { length as length33 } from "circuit-json";
|
|
14718
|
-
import { z as
|
|
14719
|
+
import { z as z42 } from "zod";
|
|
14719
14720
|
import { length as length34 } from "circuit-json";
|
|
14720
|
-
import { z as
|
|
14721
|
+
import { z as z43 } from "zod";
|
|
14721
14722
|
import { length as length35 } from "circuit-json";
|
|
14722
|
-
import { z as
|
|
14723
|
+
import { z as z44 } from "zod";
|
|
14723
14724
|
import { length as length36 } from "circuit-json";
|
|
14724
|
-
import { z as
|
|
14725
|
+
import { z as z45 } from "zod";
|
|
14725
14726
|
import { length as length37 } from "circuit-json";
|
|
14727
|
+
import { z as z46 } from "zod";
|
|
14728
|
+
import { length as length38 } from "circuit-json";
|
|
14726
14729
|
import { z as z47 } from "zod";
|
|
14727
14730
|
import {
|
|
14728
|
-
length as
|
|
14731
|
+
length as length39
|
|
14729
14732
|
} from "circuit-json";
|
|
14730
14733
|
import { z as z48 } from "zod";
|
|
14731
|
-
import { length as
|
|
14734
|
+
import { length as length40 } from "circuit-json";
|
|
14732
14735
|
import { z as z49 } from "zod";
|
|
14733
14736
|
import { z as z50 } from "zod";
|
|
14734
|
-
import { length as length40 } from "circuit-json";
|
|
14735
|
-
import { z as z51 } from "zod";
|
|
14736
14737
|
import { length as length41 } from "circuit-json";
|
|
14737
|
-
import { z as
|
|
14738
|
+
import { z as z51 } from "zod";
|
|
14738
14739
|
import { length as length42 } from "circuit-json";
|
|
14739
|
-
import { z as
|
|
14740
|
+
import { z as z52 } from "zod";
|
|
14740
14741
|
import { length as length43 } from "circuit-json";
|
|
14741
|
-
import { z as
|
|
14742
|
+
import { z as z53 } from "zod";
|
|
14742
14743
|
import { length as length44 } from "circuit-json";
|
|
14743
|
-
import { z as
|
|
14744
|
+
import { z as z54 } from "zod";
|
|
14744
14745
|
import { length as length45 } from "circuit-json";
|
|
14745
|
-
import { z as
|
|
14746
|
+
import { z as z55 } from "zod";
|
|
14746
14747
|
import { length as length46 } from "circuit-json";
|
|
14747
|
-
import { z as
|
|
14748
|
+
import { z as z56 } from "zod";
|
|
14748
14749
|
import { length as length47 } from "circuit-json";
|
|
14750
|
+
import { z as z57 } from "zod";
|
|
14751
|
+
import { length as length48 } from "circuit-json";
|
|
14749
14752
|
import { z as z58 } from "zod";
|
|
14750
14753
|
import { z as z59 } from "zod";
|
|
14751
14754
|
import { z as z60 } from "zod";
|
|
14752
14755
|
import {
|
|
14753
|
-
length as
|
|
14756
|
+
length as length49
|
|
14754
14757
|
} from "circuit-json";
|
|
14755
14758
|
import { z as z61 } from "zod";
|
|
14756
14759
|
import { z as z62 } from "zod";
|
|
14757
|
-
import { length as length49 } from "circuit-json";
|
|
14758
|
-
import { z as z63 } from "zod";
|
|
14759
14760
|
import { length as length50 } from "circuit-json";
|
|
14760
|
-
import { z as
|
|
14761
|
+
import { z as z63 } from "zod";
|
|
14761
14762
|
import { length as length51 } from "circuit-json";
|
|
14762
|
-
import { z as
|
|
14763
|
+
import { z as z64 } from "zod";
|
|
14763
14764
|
import { length as length52 } from "circuit-json";
|
|
14764
|
-
import { z as
|
|
14765
|
+
import { z as z65 } from "zod";
|
|
14765
14766
|
import { length as length53 } from "circuit-json";
|
|
14766
|
-
import { z as
|
|
14767
|
+
import { z as z66 } from "zod";
|
|
14767
14768
|
import { length as length54 } from "circuit-json";
|
|
14769
|
+
import { z as z67 } from "zod";
|
|
14770
|
+
import { length as length55 } from "circuit-json";
|
|
14768
14771
|
import { z as z68 } from "zod";
|
|
14769
|
-
import { length as
|
|
14770
|
-
import { length as
|
|
14772
|
+
import { length as length56, distance as distance3 } from "circuit-json";
|
|
14773
|
+
import { length as length57 } from "circuit-json";
|
|
14771
14774
|
import { z as z69 } from "zod";
|
|
14772
14775
|
import { z as z70 } from "zod";
|
|
14773
|
-
import { length as
|
|
14776
|
+
import { length as length58 } from "circuit-json";
|
|
14774
14777
|
import { z as z71 } from "zod";
|
|
14775
14778
|
import {
|
|
14776
|
-
length as
|
|
14779
|
+
length as length59
|
|
14777
14780
|
} from "circuit-json";
|
|
14778
14781
|
import { z as z72 } from "zod";
|
|
14779
14782
|
import { z as z73 } from "zod";
|
|
14780
|
-
import { length as
|
|
14783
|
+
import { length as length60 } from "circuit-json";
|
|
14781
14784
|
import { z as z74 } from "zod";
|
|
14782
14785
|
import { z as z75 } from "zod";
|
|
14783
|
-
import { length as length60 } from "circuit-json";
|
|
14784
|
-
import { z as z76 } from "zod";
|
|
14785
14786
|
import { length as length61 } from "circuit-json";
|
|
14787
|
+
import { z as z76 } from "zod";
|
|
14788
|
+
import { length as length62 } from "circuit-json";
|
|
14786
14789
|
import { z as z77 } from "zod";
|
|
14787
14790
|
import { z as z78 } from "zod";
|
|
14788
14791
|
import { z as z79 } from "zod";
|
|
14789
|
-
import { length as
|
|
14792
|
+
import { length as length63 } from "circuit-json";
|
|
14790
14793
|
import { z as z80 } from "zod";
|
|
14791
14794
|
import { z as z81 } from "zod";
|
|
14792
14795
|
var __defProp2 = Object.defineProperty;
|
|
@@ -15217,7 +15220,7 @@ var dip = (raw_params) => {
|
|
|
15217
15220
|
parameters
|
|
15218
15221
|
};
|
|
15219
15222
|
};
|
|
15220
|
-
var rectpad = (pn, x, y, w, h2) => {
|
|
15223
|
+
var rectpad = (pn, x, y, w, h2, cornerRadius) => {
|
|
15221
15224
|
return {
|
|
15222
15225
|
type: "pcb_smtpad",
|
|
15223
15226
|
x,
|
|
@@ -15226,6 +15229,9 @@ var rectpad = (pn, x, y, w, h2) => {
|
|
|
15226
15229
|
height: h2,
|
|
15227
15230
|
layer: "top",
|
|
15228
15231
|
shape: "rect",
|
|
15232
|
+
...cornerRadius !== void 0 && {
|
|
15233
|
+
corner_radius: cornerRadius
|
|
15234
|
+
},
|
|
15229
15235
|
pcb_smtpad_id: "",
|
|
15230
15236
|
port_hints: Array.isArray(pn) ? pn.map((item) => item.toString()) : [pn.toString()]
|
|
15231
15237
|
};
|
|
@@ -15260,7 +15266,12 @@ var footprintSizes = [
|
|
|
15260
15266
|
w_mm_min: 5.4,
|
|
15261
15267
|
h_mm_min: 3.4,
|
|
15262
15268
|
courtyard_width_mm: 5.9,
|
|
15263
|
-
courtyard_height_mm: 3.9
|
|
15269
|
+
courtyard_height_mm: 3.9,
|
|
15270
|
+
nonpolarizedSilkscreen: {
|
|
15271
|
+
line_half_length_mm: 1.386252,
|
|
15272
|
+
line_y_mm: 1.71,
|
|
15273
|
+
stroke_width_mm: 0.12
|
|
15274
|
+
}
|
|
15264
15275
|
},
|
|
15265
15276
|
{
|
|
15266
15277
|
imperial: "0201",
|
|
@@ -15282,7 +15293,12 @@ var footprintSizes = [
|
|
|
15282
15293
|
w_mm_min: 1.56,
|
|
15283
15294
|
h_mm_min: 0.64,
|
|
15284
15295
|
courtyard_width_mm: 1.86,
|
|
15285
|
-
courtyard_height_mm: 0.94
|
|
15296
|
+
courtyard_height_mm: 0.94,
|
|
15297
|
+
nonpolarizedSilkscreen: {
|
|
15298
|
+
line_half_length_mm: 0.153641,
|
|
15299
|
+
line_y_mm: 0.38,
|
|
15300
|
+
stroke_width_mm: 0.12
|
|
15301
|
+
}
|
|
15286
15302
|
},
|
|
15287
15303
|
{
|
|
15288
15304
|
imperial: "0603",
|
|
@@ -15293,7 +15309,12 @@ var footprintSizes = [
|
|
|
15293
15309
|
w_mm_min: 2.45,
|
|
15294
15310
|
h_mm_min: 0.95,
|
|
15295
15311
|
courtyard_width_mm: 2.96,
|
|
15296
|
-
courtyard_height_mm: 1.46
|
|
15312
|
+
courtyard_height_mm: 1.46,
|
|
15313
|
+
nonpolarizedSilkscreen: {
|
|
15314
|
+
line_half_length_mm: 0.237258,
|
|
15315
|
+
line_y_mm: 0.5225,
|
|
15316
|
+
stroke_width_mm: 0.12
|
|
15317
|
+
}
|
|
15297
15318
|
},
|
|
15298
15319
|
{
|
|
15299
15320
|
imperial: "0805",
|
|
@@ -15304,7 +15325,12 @@ var footprintSizes = [
|
|
|
15304
15325
|
w_mm_min: 2.8499999999999996,
|
|
15305
15326
|
h_mm_min: 1.4,
|
|
15306
15327
|
courtyard_width_mm: 3.36,
|
|
15307
|
-
courtyard_height_mm: 1.9
|
|
15328
|
+
courtyard_height_mm: 1.9,
|
|
15329
|
+
nonpolarizedSilkscreen: {
|
|
15330
|
+
line_half_length_mm: 0.227064,
|
|
15331
|
+
line_y_mm: 0.735,
|
|
15332
|
+
stroke_width_mm: 0.12
|
|
15333
|
+
}
|
|
15308
15334
|
},
|
|
15309
15335
|
{
|
|
15310
15336
|
imperial: "1206",
|
|
@@ -15315,7 +15341,12 @@ var footprintSizes = [
|
|
|
15315
15341
|
w_mm_min: 4.05,
|
|
15316
15342
|
h_mm_min: 1.75,
|
|
15317
15343
|
courtyard_width_mm: 4.56,
|
|
15318
|
-
courtyard_height_mm: 2.26
|
|
15344
|
+
courtyard_height_mm: 2.26,
|
|
15345
|
+
nonpolarizedSilkscreen: {
|
|
15346
|
+
line_half_length_mm: 0.727064,
|
|
15347
|
+
line_y_mm: 0.91,
|
|
15348
|
+
stroke_width_mm: 0.12
|
|
15349
|
+
}
|
|
15319
15350
|
},
|
|
15320
15351
|
{
|
|
15321
15352
|
imperial: "1210",
|
|
@@ -15326,7 +15357,12 @@ var footprintSizes = [
|
|
|
15326
15357
|
w_mm_min: 4.05,
|
|
15327
15358
|
h_mm_min: 2.65,
|
|
15328
15359
|
courtyard_width_mm: 4.56,
|
|
15329
|
-
courtyard_height_mm: 3.16
|
|
15360
|
+
courtyard_height_mm: 3.16,
|
|
15361
|
+
nonpolarizedSilkscreen: {
|
|
15362
|
+
line_half_length_mm: 0.723737,
|
|
15363
|
+
line_y_mm: 1.355,
|
|
15364
|
+
stroke_width_mm: 0.12
|
|
15365
|
+
}
|
|
15330
15366
|
},
|
|
15331
15367
|
{
|
|
15332
15368
|
imperial: "2010",
|
|
@@ -15337,7 +15373,12 @@ var footprintSizes = [
|
|
|
15337
15373
|
w_mm_min: 5.85,
|
|
15338
15374
|
h_mm_min: 2.65,
|
|
15339
15375
|
courtyard_width_mm: 6.36,
|
|
15340
|
-
courtyard_height_mm: 3.16
|
|
15376
|
+
courtyard_height_mm: 3.16,
|
|
15377
|
+
nonpolarizedSilkscreen: {
|
|
15378
|
+
line_half_length_mm: 1.527064,
|
|
15379
|
+
line_y_mm: 1.36,
|
|
15380
|
+
stroke_width_mm: 0.12
|
|
15381
|
+
}
|
|
15341
15382
|
},
|
|
15342
15383
|
{
|
|
15343
15384
|
imperial: "2512",
|
|
@@ -15348,7 +15389,12 @@ var footprintSizes = [
|
|
|
15348
15389
|
w_mm_min: 7.15,
|
|
15349
15390
|
h_mm_min: 3.35,
|
|
15350
15391
|
courtyard_width_mm: 7.66,
|
|
15351
|
-
courtyard_height_mm: 3.86
|
|
15392
|
+
courtyard_height_mm: 3.86,
|
|
15393
|
+
nonpolarizedSilkscreen: {
|
|
15394
|
+
line_half_length_mm: 2.177064,
|
|
15395
|
+
line_y_mm: 1.71,
|
|
15396
|
+
stroke_width_mm: 0.12
|
|
15397
|
+
}
|
|
15352
15398
|
}
|
|
15353
15399
|
];
|
|
15354
15400
|
var metricMap = Object.fromEntries(footprintSizes.map((s) => [s.metric, s]));
|
|
@@ -15365,6 +15411,8 @@ var createCourtyardRect = (width10, height10) => ({
|
|
|
15365
15411
|
layer: "top"
|
|
15366
15412
|
});
|
|
15367
15413
|
var passive_def = base_def.extend({
|
|
15414
|
+
fn: z3.string().optional(),
|
|
15415
|
+
string: z3.string().optional(),
|
|
15368
15416
|
tht: z3.boolean(),
|
|
15369
15417
|
p: length.optional(),
|
|
15370
15418
|
pw: length.optional(),
|
|
@@ -15373,10 +15421,26 @@ var passive_def = base_def.extend({
|
|
|
15373
15421
|
imperial: distance.optional(),
|
|
15374
15422
|
w: length.optional(),
|
|
15375
15423
|
h: length.optional(),
|
|
15376
|
-
|
|
15424
|
+
nonpolarized: z3.boolean().optional(),
|
|
15425
|
+
textbottom: z3.boolean().optional(),
|
|
15426
|
+
roundedPads: z3.boolean().optional()
|
|
15377
15427
|
});
|
|
15378
15428
|
var passive = (params) => {
|
|
15379
|
-
let {
|
|
15429
|
+
let {
|
|
15430
|
+
fn,
|
|
15431
|
+
tht,
|
|
15432
|
+
p,
|
|
15433
|
+
pw,
|
|
15434
|
+
ph,
|
|
15435
|
+
metric,
|
|
15436
|
+
imperial,
|
|
15437
|
+
w,
|
|
15438
|
+
h: h2,
|
|
15439
|
+
nonpolarized,
|
|
15440
|
+
textbottom,
|
|
15441
|
+
roundedPads,
|
|
15442
|
+
string: footprintString
|
|
15443
|
+
} = params;
|
|
15380
15444
|
if (typeof w === "string") w = mm_default(w);
|
|
15381
15445
|
if (typeof h2 === "string") h2 = mm_default(h2);
|
|
15382
15446
|
if (typeof p === "string") p = mm_default(p);
|
|
@@ -15400,47 +15464,94 @@ var passive = (params) => {
|
|
|
15400
15464
|
if (p === void 0 || pw === void 0 || ph === void 0) {
|
|
15401
15465
|
throw new Error("Could not determine required pad dimensions (p, pw, ph)");
|
|
15402
15466
|
}
|
|
15403
|
-
|
|
15404
|
-
|
|
15405
|
-
|
|
15406
|
-
|
|
15407
|
-
|
|
15408
|
-
|
|
15409
|
-
|
|
15410
|
-
|
|
15411
|
-
|
|
15412
|
-
|
|
15413
|
-
|
|
15414
|
-
|
|
15415
|
-
|
|
15467
|
+
let silkscreenLines = [];
|
|
15468
|
+
const nonpolarizedSilkscreen = fn === "res" && (nonpolarized === true || typeof footprintString !== "string" || /^res(?:\d{4}|\d{5})(?:_|$)/i.test(footprintString)) ? sz?.nonpolarizedSilkscreen : void 0;
|
|
15469
|
+
if (nonpolarizedSilkscreen?.stroke_width_mm) {
|
|
15470
|
+
const {
|
|
15471
|
+
line_half_length_mm = 0,
|
|
15472
|
+
line_y_mm = 0,
|
|
15473
|
+
stroke_width_mm
|
|
15474
|
+
} = nonpolarizedSilkscreen;
|
|
15475
|
+
silkscreenLines = [
|
|
15476
|
+
{
|
|
15477
|
+
type: "pcb_silkscreen_path",
|
|
15478
|
+
layer: "top",
|
|
15479
|
+
pcb_component_id: "",
|
|
15480
|
+
route: [
|
|
15481
|
+
{ x: -line_half_length_mm, y: line_y_mm },
|
|
15482
|
+
{ x: line_half_length_mm, y: line_y_mm }
|
|
15483
|
+
],
|
|
15484
|
+
stroke_width: stroke_width_mm,
|
|
15485
|
+
pcb_silkscreen_path_id: ""
|
|
15486
|
+
},
|
|
15487
|
+
{
|
|
15488
|
+
type: "pcb_silkscreen_path",
|
|
15489
|
+
layer: "top",
|
|
15490
|
+
pcb_component_id: "",
|
|
15491
|
+
route: [
|
|
15492
|
+
{ x: -line_half_length_mm, y: -line_y_mm },
|
|
15493
|
+
{ x: line_half_length_mm, y: -line_y_mm }
|
|
15494
|
+
],
|
|
15495
|
+
stroke_width: stroke_width_mm,
|
|
15496
|
+
pcb_silkscreen_path_id: ""
|
|
15497
|
+
}
|
|
15498
|
+
];
|
|
15499
|
+
} else {
|
|
15500
|
+
silkscreenLines = [
|
|
15501
|
+
{
|
|
15502
|
+
type: "pcb_silkscreen_path",
|
|
15503
|
+
layer: "top",
|
|
15504
|
+
pcb_component_id: "",
|
|
15505
|
+
route: [
|
|
15506
|
+
{ x: p / 2, y: ph / 2 + 0.4 },
|
|
15507
|
+
{ x: -p / 2 - pw / 2 - 0.2, y: ph / 2 + 0.4 },
|
|
15508
|
+
{ x: -p / 2 - pw / 2 - 0.2, y: -ph / 2 - 0.4 },
|
|
15509
|
+
{ x: p / 2, y: -ph / 2 - 0.4 }
|
|
15510
|
+
],
|
|
15511
|
+
stroke_width: 0.1,
|
|
15512
|
+
pcb_silkscreen_path_id: ""
|
|
15513
|
+
}
|
|
15514
|
+
];
|
|
15515
|
+
}
|
|
15416
15516
|
const textY = textbottom ? -ph / 2 - 0.9 : ph / 2 + 0.9;
|
|
15417
15517
|
const silkscreenRefText = silkscreenRef(0, textY, 0.2);
|
|
15418
15518
|
const courtyard = sz?.courtyard_width_mm && sz.courtyard_height_mm ? createCourtyardRect(sz.courtyard_width_mm, sz.courtyard_height_mm) : null;
|
|
15519
|
+
const cornerRadius = roundedPads ? Math.min(0.125, Math.min(pw, ph) / 8) : void 0;
|
|
15419
15520
|
if (tht) {
|
|
15420
15521
|
return [
|
|
15421
15522
|
platedhole(1, -p / 2, 0, pw, pw * 1 / 0.8),
|
|
15422
15523
|
platedhole(2, p / 2, 0, pw, pw * 1 / 0.8),
|
|
15423
|
-
|
|
15524
|
+
...silkscreenLines,
|
|
15424
15525
|
silkscreenRefText,
|
|
15425
15526
|
...courtyard ? [courtyard] : []
|
|
15426
15527
|
];
|
|
15427
15528
|
}
|
|
15428
15529
|
return [
|
|
15429
|
-
rectpad(["1", "left"], -p / 2, 0, pw, ph),
|
|
15430
|
-
rectpad(["2", "right"], p / 2, 0, pw, ph),
|
|
15431
|
-
|
|
15530
|
+
rectpad(["1", "left"], -p / 2, 0, pw, ph, cornerRadius),
|
|
15531
|
+
rectpad(["2", "right"], p / 2, 0, pw, ph, cornerRadius),
|
|
15532
|
+
...silkscreenLines,
|
|
15432
15533
|
silkscreenRefText,
|
|
15433
15534
|
...courtyard ? [courtyard] : []
|
|
15434
15535
|
];
|
|
15435
15536
|
};
|
|
15436
15537
|
var diode = (parameters) => {
|
|
15437
|
-
return {
|
|
15538
|
+
return {
|
|
15539
|
+
circuitJson: passive({ ...parameters, roundedPads: true }),
|
|
15540
|
+
parameters
|
|
15541
|
+
};
|
|
15438
15542
|
};
|
|
15439
15543
|
var cap = (parameters) => {
|
|
15440
15544
|
return { circuitJson: passive(parameters), parameters };
|
|
15441
15545
|
};
|
|
15442
15546
|
var led = (parameters) => {
|
|
15443
|
-
|
|
15547
|
+
const circuitJson = passive(parameters).map((element) => {
|
|
15548
|
+
if (element.type !== "pcb_silkscreen_path") return element;
|
|
15549
|
+
return {
|
|
15550
|
+
...element,
|
|
15551
|
+
route: element.route.map((point) => ({ ...point, x: -point.x }))
|
|
15552
|
+
};
|
|
15553
|
+
});
|
|
15554
|
+
return { circuitJson, parameters };
|
|
15444
15555
|
};
|
|
15445
15556
|
var chipArray = (params) => {
|
|
15446
15557
|
const {
|
|
@@ -17985,6 +18096,116 @@ var sot723WithoutParsing = (parameters) => {
|
|
|
17985
18096
|
}
|
|
17986
18097
|
return pads;
|
|
17987
18098
|
};
|
|
18099
|
+
var createFabricationNoteDiodeFromCopperPads = (parameters) => {
|
|
18100
|
+
const pitch = parameters.p ?? parameters.pad_spacing;
|
|
18101
|
+
if (pitch === void 0 || parameters.pl === void 0 || parameters.pw === void 0) {
|
|
18102
|
+
throw new Error(
|
|
18103
|
+
"Diode fabrication note requires p or pad_spacing, pl, and pw"
|
|
18104
|
+
);
|
|
18105
|
+
}
|
|
18106
|
+
const padPitch = length18.parse(pitch);
|
|
18107
|
+
const padLength = length18.parse(parameters.pl);
|
|
18108
|
+
const padWidth = length18.parse(parameters.pw);
|
|
18109
|
+
return createFabricationNoteDiode({
|
|
18110
|
+
minX: -padPitch / 2 - padLength / 2,
|
|
18111
|
+
maxX: padPitch / 2 + padLength / 2,
|
|
18112
|
+
minY: -padWidth / 2,
|
|
18113
|
+
maxY: padWidth / 2
|
|
18114
|
+
});
|
|
18115
|
+
};
|
|
18116
|
+
var createFabricationNoteDiode = (bounds) => {
|
|
18117
|
+
const elms = [];
|
|
18118
|
+
const width10 = bounds.maxX - bounds.minX;
|
|
18119
|
+
const height10 = bounds.maxY - bounds.minY;
|
|
18120
|
+
const centerX = (bounds.minX + bounds.maxX) / 2;
|
|
18121
|
+
const centerY = (bounds.minY + bounds.maxY) / 2;
|
|
18122
|
+
const symbolHalfHeight = height10 * 0.28;
|
|
18123
|
+
const symbolHeight = symbolHalfHeight * 2;
|
|
18124
|
+
const maxSymbolWidth = width10 * 0.2;
|
|
18125
|
+
const maxSymbolWidthToHeightRatio = 1.25;
|
|
18126
|
+
const symbolWidth = Math.min(
|
|
18127
|
+
maxSymbolWidth,
|
|
18128
|
+
symbolHeight * maxSymbolWidthToHeightRatio
|
|
18129
|
+
);
|
|
18130
|
+
const symbolMinX = centerX - symbolWidth / 2;
|
|
18131
|
+
const symbolMaxX = centerX + symbolWidth / 2;
|
|
18132
|
+
const legLength = symbolWidth * 0.18;
|
|
18133
|
+
const triangleBaseX = symbolMinX + legLength;
|
|
18134
|
+
const cathodeX = symbolMaxX - legLength;
|
|
18135
|
+
const strokeWidth = Math.max(Math.min(width10, height10) * 0.035, 0.01);
|
|
18136
|
+
const fontSize = Math.max(Math.min(width10, height10) * 0.25, 0.1);
|
|
18137
|
+
elms.push(
|
|
18138
|
+
{
|
|
18139
|
+
type: "pcb_fabrication_note_path",
|
|
18140
|
+
pcb_fabrication_note_path_id: "diode_fabrication_note_anode_leg",
|
|
18141
|
+
pcb_component_id: "",
|
|
18142
|
+
layer: "top",
|
|
18143
|
+
stroke_width: strokeWidth,
|
|
18144
|
+
route: [
|
|
18145
|
+
{ x: symbolMinX, y: centerY },
|
|
18146
|
+
{ x: triangleBaseX, y: centerY }
|
|
18147
|
+
]
|
|
18148
|
+
},
|
|
18149
|
+
{
|
|
18150
|
+
type: "pcb_fabrication_note_path",
|
|
18151
|
+
pcb_fabrication_note_path_id: "diode_fabrication_note_triangle",
|
|
18152
|
+
pcb_component_id: "",
|
|
18153
|
+
layer: "top",
|
|
18154
|
+
stroke_width: strokeWidth,
|
|
18155
|
+
route: [
|
|
18156
|
+
{ x: triangleBaseX, y: centerY + symbolHalfHeight },
|
|
18157
|
+
{ x: cathodeX, y: centerY },
|
|
18158
|
+
{ x: triangleBaseX, y: centerY - symbolHalfHeight },
|
|
18159
|
+
{ x: triangleBaseX, y: centerY + symbolHalfHeight }
|
|
18160
|
+
]
|
|
18161
|
+
},
|
|
18162
|
+
{
|
|
18163
|
+
type: "pcb_fabrication_note_path",
|
|
18164
|
+
pcb_fabrication_note_path_id: "diode_fabrication_note_cathode",
|
|
18165
|
+
pcb_component_id: "",
|
|
18166
|
+
layer: "top",
|
|
18167
|
+
stroke_width: strokeWidth,
|
|
18168
|
+
route: [
|
|
18169
|
+
{ x: cathodeX, y: centerY + symbolHalfHeight },
|
|
18170
|
+
{ x: cathodeX, y: centerY - symbolHalfHeight }
|
|
18171
|
+
]
|
|
18172
|
+
},
|
|
18173
|
+
{
|
|
18174
|
+
type: "pcb_fabrication_note_path",
|
|
18175
|
+
pcb_fabrication_note_path_id: "diode_fabrication_note_cathode_leg",
|
|
18176
|
+
pcb_component_id: "",
|
|
18177
|
+
layer: "top",
|
|
18178
|
+
stroke_width: strokeWidth,
|
|
18179
|
+
route: [
|
|
18180
|
+
{ x: cathodeX, y: centerY },
|
|
18181
|
+
{ x: symbolMaxX, y: centerY }
|
|
18182
|
+
]
|
|
18183
|
+
},
|
|
18184
|
+
{
|
|
18185
|
+
type: "pcb_fabrication_note_text",
|
|
18186
|
+
pcb_fabrication_note_text_id: "diode_fabrication_note_positive",
|
|
18187
|
+
pcb_component_id: "",
|
|
18188
|
+
layer: "top",
|
|
18189
|
+
font: "tscircuit2024",
|
|
18190
|
+
font_size: fontSize,
|
|
18191
|
+
text: "+",
|
|
18192
|
+
anchor_position: { x: bounds.minX + width10 * 0.125, y: centerY },
|
|
18193
|
+
anchor_alignment: "center"
|
|
18194
|
+
},
|
|
18195
|
+
{
|
|
18196
|
+
type: "pcb_fabrication_note_text",
|
|
18197
|
+
pcb_fabrication_note_text_id: "diode_fabrication_note_negative",
|
|
18198
|
+
pcb_component_id: "",
|
|
18199
|
+
layer: "top",
|
|
18200
|
+
font: "tscircuit2024",
|
|
18201
|
+
font_size: fontSize,
|
|
18202
|
+
text: "-",
|
|
18203
|
+
anchor_position: { x: bounds.maxX - width10 * 0.125, y: centerY },
|
|
18204
|
+
anchor_alignment: "center"
|
|
18205
|
+
}
|
|
18206
|
+
);
|
|
18207
|
+
return elms;
|
|
18208
|
+
};
|
|
17988
18209
|
var sod_def = base_def.extend({
|
|
17989
18210
|
fn: z26.string(),
|
|
17990
18211
|
num_pins: z26.literal(2).default(2),
|
|
@@ -17996,9 +18217,10 @@ var sod_def = base_def.extend({
|
|
|
17996
18217
|
});
|
|
17997
18218
|
var sod123 = (raw_params) => {
|
|
17998
18219
|
const parameters = sod_def.parse(raw_params);
|
|
18220
|
+
const bodyHeight = length19.parse(parameters.h);
|
|
17999
18221
|
const silkscreenRefText = silkscreenRef(
|
|
18000
18222
|
0,
|
|
18001
|
-
|
|
18223
|
+
bodyHeight / 4 + 0.4,
|
|
18002
18224
|
0.3
|
|
18003
18225
|
);
|
|
18004
18226
|
const courtyardWidthMm = 4.7;
|
|
@@ -18014,6 +18236,7 @@ var sod123 = (raw_params) => {
|
|
|
18014
18236
|
};
|
|
18015
18237
|
return {
|
|
18016
18238
|
circuitJson: sodWithoutParsing(parameters).concat(
|
|
18239
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
18017
18240
|
silkscreenRefText,
|
|
18018
18241
|
courtyard
|
|
18019
18242
|
),
|
|
@@ -18041,7 +18264,8 @@ var sodWithoutParsing = (parameters) => {
|
|
|
18041
18264
|
x,
|
|
18042
18265
|
y,
|
|
18043
18266
|
Number.parseFloat(parameters.pl),
|
|
18044
|
-
Number.parseFloat(parameters.pw)
|
|
18267
|
+
Number.parseFloat(parameters.pw),
|
|
18268
|
+
0.1125
|
|
18045
18269
|
)
|
|
18046
18270
|
);
|
|
18047
18271
|
}
|
|
@@ -18049,9 +18273,9 @@ var sodWithoutParsing = (parameters) => {
|
|
|
18049
18273
|
};
|
|
18050
18274
|
var axial_def = base_def.extend({
|
|
18051
18275
|
fn: z27.string(),
|
|
18052
|
-
p:
|
|
18053
|
-
id:
|
|
18054
|
-
od:
|
|
18276
|
+
p: length20.optional().default("2.54mm"),
|
|
18277
|
+
id: length20.optional().default("0.7mm"),
|
|
18278
|
+
od: length20.optional().default("1.4mm")
|
|
18055
18279
|
});
|
|
18056
18280
|
var axial = (raw_params) => {
|
|
18057
18281
|
const parameters = axial_def.parse(raw_params);
|
|
@@ -18139,9 +18363,9 @@ var generateCircleArcs = (centerX, centerY, radius, cut, cutHeight, segmentLengt
|
|
|
18139
18363
|
};
|
|
18140
18364
|
var radial_def = base_def.extend({
|
|
18141
18365
|
fn: z28.string(),
|
|
18142
|
-
p:
|
|
18143
|
-
id:
|
|
18144
|
-
od:
|
|
18366
|
+
p: length21.optional().default("5mm"),
|
|
18367
|
+
id: length21.optional().default("0.8mm"),
|
|
18368
|
+
od: length21.optional().default("1.6mm"),
|
|
18145
18369
|
ceramic: z28.boolean().optional(),
|
|
18146
18370
|
electrolytic: z28.boolean().optional(),
|
|
18147
18371
|
polarized: z28.boolean().optional()
|
|
@@ -18261,10 +18485,10 @@ var silkscreenpath = (route, options = {}) => {
|
|
|
18261
18485
|
};
|
|
18262
18486
|
var pushbutton_def = base_def.extend({
|
|
18263
18487
|
fn: z29.literal("pushbutton"),
|
|
18264
|
-
w:
|
|
18265
|
-
h:
|
|
18266
|
-
id:
|
|
18267
|
-
od:
|
|
18488
|
+
w: length22.default(4.5),
|
|
18489
|
+
h: length22.default(6.5),
|
|
18490
|
+
id: length22.default(1),
|
|
18491
|
+
od: length22.default(1.2)
|
|
18268
18492
|
});
|
|
18269
18493
|
var pushbutton = (raw_params) => {
|
|
18270
18494
|
const parameters = pushbutton_def.parse(raw_params);
|
|
@@ -18326,19 +18550,19 @@ var pushbutton = (raw_params) => {
|
|
|
18326
18550
|
};
|
|
18327
18551
|
var stampboard_def = base_def.extend({
|
|
18328
18552
|
fn: z30.string(),
|
|
18329
|
-
w:
|
|
18330
|
-
h:
|
|
18331
|
-
left:
|
|
18332
|
-
right:
|
|
18333
|
-
top:
|
|
18334
|
-
bottom:
|
|
18335
|
-
p:
|
|
18336
|
-
pw:
|
|
18337
|
-
pl:
|
|
18553
|
+
w: length23.default("22.58mm"),
|
|
18554
|
+
h: length23.optional(),
|
|
18555
|
+
left: length23.optional().default(20),
|
|
18556
|
+
right: length23.optional().default(20),
|
|
18557
|
+
top: length23.optional().default(2),
|
|
18558
|
+
bottom: length23.optional().default(2),
|
|
18559
|
+
p: length23.default(length23.parse("2.54mm")),
|
|
18560
|
+
pw: length23.default(length23.parse("1.6mm")),
|
|
18561
|
+
pl: length23.default(length23.parse("2.4mm")),
|
|
18338
18562
|
innerhole: z30.boolean().default(false),
|
|
18339
|
-
innerholeedgedistance:
|
|
18563
|
+
innerholeedgedistance: length23.default(length23.parse("1.61mm")),
|
|
18340
18564
|
silkscreenlabels: z30.boolean().default(false),
|
|
18341
|
-
silkscreenlabelmargin:
|
|
18565
|
+
silkscreenlabelmargin: length23.default(length23.parse("0.1mm"))
|
|
18342
18566
|
});
|
|
18343
18567
|
var getHeight = (parameters) => {
|
|
18344
18568
|
const params = stampboard_def.parse(parameters);
|
|
@@ -18746,17 +18970,17 @@ var stampboard = (raw_params) => {
|
|
|
18746
18970
|
};
|
|
18747
18971
|
var stampreceiver_def = base_def.extend({
|
|
18748
18972
|
fn: z31.string(),
|
|
18749
|
-
w:
|
|
18750
|
-
h:
|
|
18751
|
-
left:
|
|
18752
|
-
right:
|
|
18753
|
-
top:
|
|
18754
|
-
bottom:
|
|
18755
|
-
p:
|
|
18756
|
-
pw:
|
|
18757
|
-
pl:
|
|
18973
|
+
w: length24.default("22.58mm"),
|
|
18974
|
+
h: length24.optional(),
|
|
18975
|
+
left: length24.optional().default(20),
|
|
18976
|
+
right: length24.optional().default(20),
|
|
18977
|
+
top: length24.optional().default(2),
|
|
18978
|
+
bottom: length24.optional().default(2),
|
|
18979
|
+
p: length24.default(length24.parse("2.54mm")),
|
|
18980
|
+
pw: length24.default(length24.parse("1.6mm")),
|
|
18981
|
+
pl: length24.default(length24.parse("3.2mm")),
|
|
18758
18982
|
innerhole: z31.boolean().default(false),
|
|
18759
|
-
innerholeedgedistance:
|
|
18983
|
+
innerholeedgedistance: length24.default(length24.parse("1.61mm"))
|
|
18760
18984
|
});
|
|
18761
18985
|
var getHeight2 = (parameters) => {
|
|
18762
18986
|
const params = stampreceiver_def.parse(parameters);
|
|
@@ -19054,15 +19278,15 @@ var lqfp = (parameters) => {
|
|
|
19054
19278
|
};
|
|
19055
19279
|
var breakoutheaders_def = base_def.extend({
|
|
19056
19280
|
fn: z32.string(),
|
|
19057
|
-
w:
|
|
19058
|
-
h:
|
|
19059
|
-
left:
|
|
19060
|
-
right:
|
|
19061
|
-
top:
|
|
19062
|
-
bottom:
|
|
19063
|
-
p:
|
|
19064
|
-
id:
|
|
19065
|
-
od:
|
|
19281
|
+
w: length25.default("10mm"),
|
|
19282
|
+
h: length25.optional(),
|
|
19283
|
+
left: length25.optional().default(20),
|
|
19284
|
+
right: length25.optional().default(20),
|
|
19285
|
+
top: length25.optional().default(0),
|
|
19286
|
+
bottom: length25.optional().default(0),
|
|
19287
|
+
p: length25.default(length25.parse("2.54mm")),
|
|
19288
|
+
id: length25.optional().default(length25.parse("1mm")),
|
|
19289
|
+
od: length25.optional().default(length25.parse("1.5mm"))
|
|
19066
19290
|
});
|
|
19067
19291
|
var getHeight3 = (parameters) => {
|
|
19068
19292
|
const params = breakoutheaders_def.parse(parameters);
|
|
@@ -19331,11 +19555,11 @@ var generate_u_curve = (centerX, centerY, radius, direction) => {
|
|
|
19331
19555
|
};
|
|
19332
19556
|
var hc49_def = base_def.extend({
|
|
19333
19557
|
fn: z33.string(),
|
|
19334
|
-
p:
|
|
19335
|
-
id:
|
|
19336
|
-
od:
|
|
19337
|
-
w:
|
|
19338
|
-
h:
|
|
19558
|
+
p: length26.optional().default("4.88mm"),
|
|
19559
|
+
id: length26.optional().default("0.8mm"),
|
|
19560
|
+
od: length26.optional().default("1.5mm"),
|
|
19561
|
+
w: length26.optional().default("5.6mm"),
|
|
19562
|
+
h: length26.optional().default("3.5mm")
|
|
19339
19563
|
});
|
|
19340
19564
|
var hc49 = (raw_params) => {
|
|
19341
19565
|
const parameters = hc49_def.parse(raw_params);
|
|
@@ -19391,8 +19615,8 @@ var hc49 = (raw_params) => {
|
|
|
19391
19615
|
};
|
|
19392
19616
|
};
|
|
19393
19617
|
var pad_def = base_def.extend({
|
|
19394
|
-
w:
|
|
19395
|
-
h:
|
|
19618
|
+
w: length27,
|
|
19619
|
+
h: length27
|
|
19396
19620
|
});
|
|
19397
19621
|
var pad = (params) => {
|
|
19398
19622
|
const { w, h: h2 } = params;
|
|
@@ -19567,7 +19791,7 @@ var sod523 = (raw_params) => {
|
|
|
19567
19791
|
const parameters = sod_def2.parse(raw_params);
|
|
19568
19792
|
const silkscreenRefText = silkscreenRef(
|
|
19569
19793
|
0,
|
|
19570
|
-
|
|
19794
|
+
length28.parse(parameters.h),
|
|
19571
19795
|
0.3
|
|
19572
19796
|
);
|
|
19573
19797
|
const silkscreenLine = {
|
|
@@ -19576,20 +19800,20 @@ var sod523 = (raw_params) => {
|
|
|
19576
19800
|
pcb_component_id: "",
|
|
19577
19801
|
route: [
|
|
19578
19802
|
{
|
|
19579
|
-
x:
|
|
19580
|
-
y:
|
|
19803
|
+
x: length28.parse(parameters.p) / 2,
|
|
19804
|
+
y: length28.parse(parameters.h) / 2 + 0.2
|
|
19581
19805
|
},
|
|
19582
19806
|
{
|
|
19583
|
-
x: -
|
|
19584
|
-
y:
|
|
19807
|
+
x: -length28.parse(parameters.w) / 2 - 0.2,
|
|
19808
|
+
y: length28.parse(parameters.h) / 2 + 0.2
|
|
19585
19809
|
},
|
|
19586
19810
|
{
|
|
19587
|
-
x: -
|
|
19588
|
-
y: -
|
|
19811
|
+
x: -length28.parse(parameters.w) / 2 - 0.2,
|
|
19812
|
+
y: -length28.parse(parameters.h) / 2 - 0.2
|
|
19589
19813
|
},
|
|
19590
19814
|
{
|
|
19591
|
-
x:
|
|
19592
|
-
y: -
|
|
19815
|
+
x: length28.parse(parameters.p) / 2,
|
|
19816
|
+
y: -length28.parse(parameters.h) / 2 - 0.2
|
|
19593
19817
|
}
|
|
19594
19818
|
],
|
|
19595
19819
|
stroke_width: 0.1,
|
|
@@ -19608,6 +19832,7 @@ var sod523 = (raw_params) => {
|
|
|
19608
19832
|
};
|
|
19609
19833
|
return {
|
|
19610
19834
|
circuitJson: sodWithoutParsing2(parameters).concat(
|
|
19835
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
19611
19836
|
silkscreenLine,
|
|
19612
19837
|
silkscreenRefText,
|
|
19613
19838
|
courtyard
|
|
@@ -19625,20 +19850,16 @@ var getSodCoords2 = (parameters) => {
|
|
|
19625
19850
|
};
|
|
19626
19851
|
var sodWithoutParsing2 = (parameters) => {
|
|
19627
19852
|
const pads = [];
|
|
19853
|
+
const p = length28.parse(parameters.p);
|
|
19854
|
+
const pl = length28.parse(parameters.pl);
|
|
19855
|
+
const pw = length28.parse(parameters.pw);
|
|
19856
|
+
const cornerRadius = 0.075;
|
|
19628
19857
|
for (let i = 1; i <= parameters.num_pins; i++) {
|
|
19629
19858
|
const { x, y } = getSodCoords2({
|
|
19630
19859
|
pn: i,
|
|
19631
|
-
p
|
|
19860
|
+
p
|
|
19632
19861
|
});
|
|
19633
|
-
pads.push(
|
|
19634
|
-
rectpad(
|
|
19635
|
-
i,
|
|
19636
|
-
x,
|
|
19637
|
-
y,
|
|
19638
|
-
Number.parseFloat(parameters.pl),
|
|
19639
|
-
Number.parseFloat(parameters.pw)
|
|
19640
|
-
)
|
|
19641
|
-
);
|
|
19862
|
+
pads.push(rectpad(i, x, y, pl, pw, cornerRadius));
|
|
19642
19863
|
}
|
|
19643
19864
|
return pads;
|
|
19644
19865
|
};
|
|
@@ -19725,7 +19946,7 @@ var sod80 = (raw_params) => {
|
|
|
19725
19946
|
const parameters = sod80_def.parse(raw_params);
|
|
19726
19947
|
const silkscreenRefText = silkscreenRef(
|
|
19727
19948
|
0,
|
|
19728
|
-
|
|
19949
|
+
length29.parse(parameters.h) / 2 + 1,
|
|
19729
19950
|
0.3
|
|
19730
19951
|
);
|
|
19731
19952
|
const silkscreenLine = {
|
|
@@ -19734,20 +19955,20 @@ var sod80 = (raw_params) => {
|
|
|
19734
19955
|
pcb_component_id: "",
|
|
19735
19956
|
route: [
|
|
19736
19957
|
{
|
|
19737
|
-
x:
|
|
19738
|
-
y:
|
|
19958
|
+
x: length29.parse(parameters.p) / 2 + 0.5,
|
|
19959
|
+
y: length29.parse(parameters.h) / 2 + 0.5
|
|
19739
19960
|
},
|
|
19740
19961
|
{
|
|
19741
|
-
x: -
|
|
19742
|
-
y:
|
|
19962
|
+
x: -length29.parse(parameters.w) / 2 - 0.5,
|
|
19963
|
+
y: length29.parse(parameters.h) / 2 + 0.5
|
|
19743
19964
|
},
|
|
19744
19965
|
{
|
|
19745
|
-
x: -
|
|
19746
|
-
y: -
|
|
19966
|
+
x: -length29.parse(parameters.w) / 2 - 0.5,
|
|
19967
|
+
y: -length29.parse(parameters.h) / 2 - 0.5
|
|
19747
19968
|
},
|
|
19748
19969
|
{
|
|
19749
|
-
x:
|
|
19750
|
-
y: -
|
|
19970
|
+
x: length29.parse(parameters.p) / 2 + 0.5,
|
|
19971
|
+
y: -length29.parse(parameters.h) / 2 - 0.5
|
|
19751
19972
|
}
|
|
19752
19973
|
],
|
|
19753
19974
|
stroke_width: 0.1,
|
|
@@ -19766,6 +19987,7 @@ var sod80 = (raw_params) => {
|
|
|
19766
19987
|
};
|
|
19767
19988
|
return {
|
|
19768
19989
|
circuitJson: sod80WithoutParsing(parameters).concat(
|
|
19990
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
19769
19991
|
silkscreenLine,
|
|
19770
19992
|
silkscreenRefText,
|
|
19771
19993
|
courtyard
|
|
@@ -19809,7 +20031,7 @@ var sod123w = (raw_params) => {
|
|
|
19809
20031
|
const parameters = sod_def3.parse(raw_params);
|
|
19810
20032
|
const silkscreenRefText = silkscreenRef(
|
|
19811
20033
|
0,
|
|
19812
|
-
|
|
20034
|
+
length30.parse(parameters.h) - 0.5,
|
|
19813
20035
|
0.3
|
|
19814
20036
|
);
|
|
19815
20037
|
const silkscreenLine = {
|
|
@@ -19818,20 +20040,20 @@ var sod123w = (raw_params) => {
|
|
|
19818
20040
|
pcb_component_id: "",
|
|
19819
20041
|
route: [
|
|
19820
20042
|
{
|
|
19821
|
-
x:
|
|
19822
|
-
y:
|
|
20043
|
+
x: length30.parse(parameters.p) / 2,
|
|
20044
|
+
y: length30.parse(parameters.h) / 2
|
|
19823
20045
|
},
|
|
19824
20046
|
{
|
|
19825
|
-
x: -
|
|
19826
|
-
y:
|
|
20047
|
+
x: -length30.parse(parameters.w) / 2 - 0.2,
|
|
20048
|
+
y: length30.parse(parameters.h) / 2
|
|
19827
20049
|
},
|
|
19828
20050
|
{
|
|
19829
|
-
x: -
|
|
19830
|
-
y: -
|
|
20051
|
+
x: -length30.parse(parameters.w) / 2 - 0.2,
|
|
20052
|
+
y: -length30.parse(parameters.h) / 2
|
|
19831
20053
|
},
|
|
19832
20054
|
{
|
|
19833
|
-
x:
|
|
19834
|
-
y: -
|
|
20055
|
+
x: length30.parse(parameters.p) / 2,
|
|
20056
|
+
y: -length30.parse(parameters.h) / 2
|
|
19835
20057
|
}
|
|
19836
20058
|
],
|
|
19837
20059
|
stroke_width: 0.1,
|
|
@@ -19850,6 +20072,7 @@ var sod123w = (raw_params) => {
|
|
|
19850
20072
|
};
|
|
19851
20073
|
return {
|
|
19852
20074
|
circuitJson: sodWithoutParsing3(parameters).concat(
|
|
20075
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
19853
20076
|
silkscreenLine,
|
|
19854
20077
|
silkscreenRefText,
|
|
19855
20078
|
courtyard
|
|
@@ -19896,7 +20119,7 @@ var sod323 = (raw_params) => {
|
|
|
19896
20119
|
const parameters = sod_def4.parse(raw_params);
|
|
19897
20120
|
const silkscreenRefText = silkscreenRef(
|
|
19898
20121
|
0,
|
|
19899
|
-
|
|
20122
|
+
length31.parse(parameters.h) - 0.5,
|
|
19900
20123
|
0.3
|
|
19901
20124
|
);
|
|
19902
20125
|
const silkscreenLine = {
|
|
@@ -19905,20 +20128,20 @@ var sod323 = (raw_params) => {
|
|
|
19905
20128
|
pcb_component_id: "",
|
|
19906
20129
|
route: [
|
|
19907
20130
|
{
|
|
19908
|
-
x:
|
|
19909
|
-
y:
|
|
20131
|
+
x: length31.parse(parameters.p) / 2,
|
|
20132
|
+
y: length31.parse(parameters.h) / 2
|
|
19910
20133
|
},
|
|
19911
20134
|
{
|
|
19912
|
-
x: -
|
|
19913
|
-
y:
|
|
20135
|
+
x: -length31.parse(parameters.w) / 2,
|
|
20136
|
+
y: length31.parse(parameters.h) / 2
|
|
19914
20137
|
},
|
|
19915
20138
|
{
|
|
19916
|
-
x: -
|
|
19917
|
-
y: -
|
|
20139
|
+
x: -length31.parse(parameters.w) / 2,
|
|
20140
|
+
y: -length31.parse(parameters.h) / 2
|
|
19918
20141
|
},
|
|
19919
20142
|
{
|
|
19920
|
-
x:
|
|
19921
|
-
y: -
|
|
20143
|
+
x: length31.parse(parameters.p) / 2,
|
|
20144
|
+
y: -length31.parse(parameters.h) / 2
|
|
19922
20145
|
}
|
|
19923
20146
|
],
|
|
19924
20147
|
stroke_width: 0.1,
|
|
@@ -19937,6 +20160,7 @@ var sod323 = (raw_params) => {
|
|
|
19937
20160
|
};
|
|
19938
20161
|
return {
|
|
19939
20162
|
circuitJson: sodWithoutParsing4(parameters).concat(
|
|
20163
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
19940
20164
|
silkscreenLine,
|
|
19941
20165
|
silkscreenRefText,
|
|
19942
20166
|
courtyard
|
|
@@ -19953,20 +20177,16 @@ var getSodCoords4 = (parameters) => {
|
|
|
19953
20177
|
};
|
|
19954
20178
|
var sodWithoutParsing4 = (parameters) => {
|
|
19955
20179
|
const pads = [];
|
|
20180
|
+
const p = length31.parse(parameters.p);
|
|
20181
|
+
const pl = length31.parse(parameters.pl);
|
|
20182
|
+
const pw = length31.parse(parameters.pw);
|
|
20183
|
+
const cornerRadius = 0.05625;
|
|
19956
20184
|
for (let i = 1; i <= parameters.num_pins; i++) {
|
|
19957
20185
|
const { x, y } = getSodCoords4({
|
|
19958
20186
|
pn: i,
|
|
19959
|
-
p
|
|
20187
|
+
p
|
|
19960
20188
|
});
|
|
19961
|
-
pads.push(
|
|
19962
|
-
rectpad(
|
|
19963
|
-
i,
|
|
19964
|
-
x,
|
|
19965
|
-
y,
|
|
19966
|
-
Number.parseFloat(parameters.pl),
|
|
19967
|
-
Number.parseFloat(parameters.pw)
|
|
19968
|
-
)
|
|
19969
|
-
);
|
|
20189
|
+
pads.push(rectpad(i, x, y, pl, pw, cornerRadius));
|
|
19970
20190
|
}
|
|
19971
20191
|
return pads;
|
|
19972
20192
|
};
|
|
@@ -19981,11 +20201,11 @@ var sod_def5 = base_def.extend({
|
|
|
19981
20201
|
});
|
|
19982
20202
|
var sod923 = (raw_params) => {
|
|
19983
20203
|
const parameters = sod_def5.parse(raw_params);
|
|
19984
|
-
const w =
|
|
19985
|
-
const h2 =
|
|
19986
|
-
const pl =
|
|
19987
|
-
const pw =
|
|
19988
|
-
const p =
|
|
20204
|
+
const w = length32.parse(parameters.w);
|
|
20205
|
+
const h2 = length32.parse(parameters.h);
|
|
20206
|
+
const pl = length32.parse(parameters.pl);
|
|
20207
|
+
const pw = length32.parse(parameters.pw);
|
|
20208
|
+
const p = length32.parse(parameters.p);
|
|
19989
20209
|
const silkscreenRefText = silkscreenRef(0, h2, 0.3);
|
|
19990
20210
|
const silkscreenLine = {
|
|
19991
20211
|
type: "pcb_silkscreen_path",
|
|
@@ -20048,6 +20268,7 @@ var sod923 = (raw_params) => {
|
|
|
20048
20268
|
};
|
|
20049
20269
|
return {
|
|
20050
20270
|
circuitJson: sodWithoutParsing5(parameters).concat(
|
|
20271
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
20051
20272
|
silkscreenLine,
|
|
20052
20273
|
silkscreenRefText,
|
|
20053
20274
|
courtyard
|
|
@@ -20065,20 +20286,16 @@ var getSodCoords5 = (parameters) => {
|
|
|
20065
20286
|
};
|
|
20066
20287
|
var sodWithoutParsing5 = (parameters) => {
|
|
20067
20288
|
const pads = [];
|
|
20289
|
+
const p = length32.parse(parameters.p);
|
|
20290
|
+
const pl = length32.parse(parameters.pl);
|
|
20291
|
+
const pw = length32.parse(parameters.pw);
|
|
20292
|
+
const cornerRadius = 0.03125;
|
|
20068
20293
|
for (let i = 1; i <= parameters.num_pins; i++) {
|
|
20069
20294
|
const { x, y } = getSodCoords5({
|
|
20070
20295
|
pn: i,
|
|
20071
|
-
p
|
|
20296
|
+
p
|
|
20072
20297
|
});
|
|
20073
|
-
pads.push(
|
|
20074
|
-
rectpad(
|
|
20075
|
-
i,
|
|
20076
|
-
x,
|
|
20077
|
-
y,
|
|
20078
|
-
Number.parseFloat(parameters.pl),
|
|
20079
|
-
Number.parseFloat(parameters.pw)
|
|
20080
|
-
)
|
|
20081
|
-
);
|
|
20298
|
+
pads.push(rectpad(i, x, y, pl, pw, cornerRadius));
|
|
20082
20299
|
}
|
|
20083
20300
|
return pads;
|
|
20084
20301
|
};
|
|
@@ -20095,7 +20312,7 @@ var sod882 = (raw_params) => {
|
|
|
20095
20312
|
const parameters = sod_def6.parse(raw_params);
|
|
20096
20313
|
const silkscreenRefText = silkscreenRef(
|
|
20097
20314
|
0,
|
|
20098
|
-
|
|
20315
|
+
length33.parse(parameters.h) + 0.1,
|
|
20099
20316
|
0.3
|
|
20100
20317
|
);
|
|
20101
20318
|
const silkscreenLine = {
|
|
@@ -20104,20 +20321,20 @@ var sod882 = (raw_params) => {
|
|
|
20104
20321
|
pcb_component_id: "",
|
|
20105
20322
|
route: [
|
|
20106
20323
|
{
|
|
20107
|
-
x:
|
|
20108
|
-
y:
|
|
20324
|
+
x: length33.parse(parameters.p) / 2 + 0.2,
|
|
20325
|
+
y: length33.parse(parameters.h) / 2 + 0.2
|
|
20109
20326
|
},
|
|
20110
20327
|
{
|
|
20111
|
-
x: -
|
|
20112
|
-
y:
|
|
20328
|
+
x: -length33.parse(parameters.w) / 2 - 0.2,
|
|
20329
|
+
y: length33.parse(parameters.h) / 2 + 0.2
|
|
20113
20330
|
},
|
|
20114
20331
|
{
|
|
20115
|
-
x: -
|
|
20116
|
-
y: -
|
|
20332
|
+
x: -length33.parse(parameters.w) / 2 - 0.2,
|
|
20333
|
+
y: -length33.parse(parameters.h) / 2 - 0.2
|
|
20117
20334
|
},
|
|
20118
20335
|
{
|
|
20119
|
-
x:
|
|
20120
|
-
y: -
|
|
20336
|
+
x: length33.parse(parameters.p) / 2 + 0.2,
|
|
20337
|
+
y: -length33.parse(parameters.h) / 2 - 0.2
|
|
20121
20338
|
}
|
|
20122
20339
|
],
|
|
20123
20340
|
stroke_width: 0.1,
|
|
@@ -20136,6 +20353,7 @@ var sod882 = (raw_params) => {
|
|
|
20136
20353
|
};
|
|
20137
20354
|
return {
|
|
20138
20355
|
circuitJson: sodWithoutParsing6(parameters).concat(
|
|
20356
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
20139
20357
|
silkscreenLine,
|
|
20140
20358
|
silkscreenRefText,
|
|
20141
20359
|
courtyard
|
|
@@ -20164,7 +20382,8 @@ var sodWithoutParsing6 = (parameters) => {
|
|
|
20164
20382
|
x,
|
|
20165
20383
|
y,
|
|
20166
20384
|
Number.parseFloat(parameters.pl),
|
|
20167
|
-
Number.parseFloat(parameters.pw)
|
|
20385
|
+
Number.parseFloat(parameters.pw),
|
|
20386
|
+
0.025
|
|
20168
20387
|
)
|
|
20169
20388
|
);
|
|
20170
20389
|
}
|
|
@@ -20183,7 +20402,7 @@ var sod323f = (raw_params) => {
|
|
|
20183
20402
|
const parameters = sod_def7.parse(raw_params);
|
|
20184
20403
|
const silkscreenRefText = silkscreenRef(
|
|
20185
20404
|
0,
|
|
20186
|
-
|
|
20405
|
+
length34.parse(parameters.h),
|
|
20187
20406
|
0.3
|
|
20188
20407
|
);
|
|
20189
20408
|
const silkscreenLine = {
|
|
@@ -20192,20 +20411,20 @@ var sod323f = (raw_params) => {
|
|
|
20192
20411
|
pcb_component_id: "",
|
|
20193
20412
|
route: [
|
|
20194
20413
|
{
|
|
20195
|
-
x:
|
|
20196
|
-
y:
|
|
20414
|
+
x: length34.parse(parameters.pad_spacing) / 2,
|
|
20415
|
+
y: length34.parse(parameters.h) / 2
|
|
20197
20416
|
},
|
|
20198
20417
|
{
|
|
20199
|
-
x: -
|
|
20200
|
-
y:
|
|
20418
|
+
x: -length34.parse(parameters.w) / 2 - 0.2,
|
|
20419
|
+
y: length34.parse(parameters.h) / 2
|
|
20201
20420
|
},
|
|
20202
20421
|
{
|
|
20203
|
-
x: -
|
|
20204
|
-
y: -
|
|
20422
|
+
x: -length34.parse(parameters.w) / 2 - 0.2,
|
|
20423
|
+
y: -length34.parse(parameters.h) / 2
|
|
20205
20424
|
},
|
|
20206
20425
|
{
|
|
20207
|
-
x:
|
|
20208
|
-
y: -
|
|
20426
|
+
x: length34.parse(parameters.pad_spacing) / 2,
|
|
20427
|
+
y: -length34.parse(parameters.h) / 2
|
|
20209
20428
|
}
|
|
20210
20429
|
],
|
|
20211
20430
|
stroke_width: 0.1,
|
|
@@ -20224,6 +20443,7 @@ var sod323f = (raw_params) => {
|
|
|
20224
20443
|
};
|
|
20225
20444
|
return {
|
|
20226
20445
|
circuitJson: sodWithoutParsing7(parameters).concat(
|
|
20446
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
20227
20447
|
silkscreenLine,
|
|
20228
20448
|
silkscreenRefText,
|
|
20229
20449
|
courtyard
|
|
@@ -20252,7 +20472,8 @@ var sodWithoutParsing7 = (parameters) => {
|
|
|
20252
20472
|
x,
|
|
20253
20473
|
y,
|
|
20254
20474
|
Number.parseFloat(parameters.pl),
|
|
20255
|
-
Number.parseFloat(parameters.pw)
|
|
20475
|
+
Number.parseFloat(parameters.pw),
|
|
20476
|
+
0.0625
|
|
20256
20477
|
)
|
|
20257
20478
|
);
|
|
20258
20479
|
}
|
|
@@ -20271,7 +20492,7 @@ var sod123f = (raw_params) => {
|
|
|
20271
20492
|
const parameters = sod_def8.parse(raw_params);
|
|
20272
20493
|
const silkscreenRefText = silkscreenRef(
|
|
20273
20494
|
0,
|
|
20274
|
-
|
|
20495
|
+
length35.parse(parameters.h),
|
|
20275
20496
|
0.3
|
|
20276
20497
|
);
|
|
20277
20498
|
const silkscreenLine = {
|
|
@@ -20280,20 +20501,20 @@ var sod123f = (raw_params) => {
|
|
|
20280
20501
|
pcb_component_id: "",
|
|
20281
20502
|
route: [
|
|
20282
20503
|
{
|
|
20283
|
-
x:
|
|
20284
|
-
y:
|
|
20504
|
+
x: length35.parse(parameters.p) / 2,
|
|
20505
|
+
y: length35.parse(parameters.h) / 2
|
|
20285
20506
|
},
|
|
20286
20507
|
{
|
|
20287
|
-
x: -
|
|
20288
|
-
y:
|
|
20508
|
+
x: -length35.parse(parameters.w) / 2 - 0.2,
|
|
20509
|
+
y: length35.parse(parameters.h) / 2
|
|
20289
20510
|
},
|
|
20290
20511
|
{
|
|
20291
|
-
x: -
|
|
20292
|
-
y: -
|
|
20512
|
+
x: -length35.parse(parameters.w) / 2 - 0.2,
|
|
20513
|
+
y: -length35.parse(parameters.h) / 2
|
|
20293
20514
|
},
|
|
20294
20515
|
{
|
|
20295
|
-
x:
|
|
20296
|
-
y: -
|
|
20516
|
+
x: length35.parse(parameters.p) / 2,
|
|
20517
|
+
y: -length35.parse(parameters.h) / 2
|
|
20297
20518
|
}
|
|
20298
20519
|
],
|
|
20299
20520
|
stroke_width: 0.1,
|
|
@@ -20312,6 +20533,7 @@ var sod123f = (raw_params) => {
|
|
|
20312
20533
|
};
|
|
20313
20534
|
return {
|
|
20314
20535
|
circuitJson: sodWithoutParsing8(parameters).concat(
|
|
20536
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
20315
20537
|
silkscreenLine,
|
|
20316
20538
|
silkscreenRefText,
|
|
20317
20539
|
courtyard
|
|
@@ -20329,20 +20551,16 @@ var getSodCoords8 = (parameters) => {
|
|
|
20329
20551
|
};
|
|
20330
20552
|
var sodWithoutParsing8 = (parameters) => {
|
|
20331
20553
|
const pads = [];
|
|
20554
|
+
const p = length35.parse(parameters.p);
|
|
20555
|
+
const pl = length35.parse(parameters.pl);
|
|
20556
|
+
const pw = length35.parse(parameters.pw);
|
|
20557
|
+
const cornerRadius = 0.125;
|
|
20332
20558
|
for (let i = 1; i <= parameters.num_pins; i++) {
|
|
20333
20559
|
const { x, y } = getSodCoords8({
|
|
20334
20560
|
pn: i,
|
|
20335
|
-
p
|
|
20561
|
+
p
|
|
20336
20562
|
});
|
|
20337
|
-
pads.push(
|
|
20338
|
-
rectpad(
|
|
20339
|
-
i,
|
|
20340
|
-
x,
|
|
20341
|
-
y,
|
|
20342
|
-
Number.parseFloat(parameters.pl),
|
|
20343
|
-
Number.parseFloat(parameters.pw)
|
|
20344
|
-
)
|
|
20345
|
-
);
|
|
20563
|
+
pads.push(rectpad(i, x, y, pl, pw, cornerRadius));
|
|
20346
20564
|
}
|
|
20347
20565
|
return pads;
|
|
20348
20566
|
};
|
|
@@ -20359,7 +20577,7 @@ var sod123fl = (raw_params) => {
|
|
|
20359
20577
|
const parameters = sod123FL_def.parse(raw_params);
|
|
20360
20578
|
const silkscreenRefText = silkscreenRef(
|
|
20361
20579
|
0,
|
|
20362
|
-
|
|
20580
|
+
length36.parse(parameters.h),
|
|
20363
20581
|
0.3
|
|
20364
20582
|
);
|
|
20365
20583
|
const silkscreenLine = {
|
|
@@ -20368,20 +20586,20 @@ var sod123fl = (raw_params) => {
|
|
|
20368
20586
|
pcb_component_id: "",
|
|
20369
20587
|
route: [
|
|
20370
20588
|
{
|
|
20371
|
-
x:
|
|
20372
|
-
y:
|
|
20589
|
+
x: length36.parse(parameters.p) / 2,
|
|
20590
|
+
y: length36.parse(parameters.h) / 2
|
|
20373
20591
|
},
|
|
20374
20592
|
{
|
|
20375
|
-
x: -
|
|
20376
|
-
y:
|
|
20593
|
+
x: -length36.parse(parameters.w) / 2 - 0.2,
|
|
20594
|
+
y: length36.parse(parameters.h) / 2
|
|
20377
20595
|
},
|
|
20378
20596
|
{
|
|
20379
|
-
x: -
|
|
20380
|
-
y: -
|
|
20597
|
+
x: -length36.parse(parameters.w) / 2 - 0.2,
|
|
20598
|
+
y: -length36.parse(parameters.h) / 2
|
|
20381
20599
|
},
|
|
20382
20600
|
{
|
|
20383
|
-
x:
|
|
20384
|
-
y: -
|
|
20601
|
+
x: length36.parse(parameters.p) / 2,
|
|
20602
|
+
y: -length36.parse(parameters.h) / 2
|
|
20385
20603
|
}
|
|
20386
20604
|
],
|
|
20387
20605
|
stroke_width: 0.1,
|
|
@@ -20400,6 +20618,7 @@ var sod123fl = (raw_params) => {
|
|
|
20400
20618
|
};
|
|
20401
20619
|
return {
|
|
20402
20620
|
circuitJson: sodWithoutParsing9(parameters).concat(
|
|
20621
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
20403
20622
|
silkscreenLine,
|
|
20404
20623
|
silkscreenRefText,
|
|
20405
20624
|
courtyard
|
|
@@ -20447,7 +20666,7 @@ var sod723 = (raw_params) => {
|
|
|
20447
20666
|
const parameters = sod_def9.parse(raw_params);
|
|
20448
20667
|
const silkscreenRefText = silkscreenRef(
|
|
20449
20668
|
0,
|
|
20450
|
-
|
|
20669
|
+
length37.parse(parameters.h),
|
|
20451
20670
|
0.3
|
|
20452
20671
|
);
|
|
20453
20672
|
const silkscreenLine = {
|
|
@@ -20456,20 +20675,20 @@ var sod723 = (raw_params) => {
|
|
|
20456
20675
|
pcb_component_id: "",
|
|
20457
20676
|
route: [
|
|
20458
20677
|
{
|
|
20459
|
-
x:
|
|
20460
|
-
y:
|
|
20678
|
+
x: length37.parse(parameters.p) / 2,
|
|
20679
|
+
y: length37.parse(parameters.h) / 2
|
|
20461
20680
|
},
|
|
20462
20681
|
{
|
|
20463
|
-
x: -
|
|
20464
|
-
y:
|
|
20682
|
+
x: -length37.parse(parameters.w) / 2 - 0.1,
|
|
20683
|
+
y: length37.parse(parameters.h) / 2
|
|
20465
20684
|
},
|
|
20466
20685
|
{
|
|
20467
|
-
x: -
|
|
20468
|
-
y: -
|
|
20686
|
+
x: -length37.parse(parameters.w) / 2 - 0.1,
|
|
20687
|
+
y: -length37.parse(parameters.h) / 2
|
|
20469
20688
|
},
|
|
20470
20689
|
{
|
|
20471
|
-
x:
|
|
20472
|
-
y: -
|
|
20690
|
+
x: length37.parse(parameters.p) / 2,
|
|
20691
|
+
y: -length37.parse(parameters.h) / 2
|
|
20473
20692
|
}
|
|
20474
20693
|
],
|
|
20475
20694
|
stroke_width: 0.1,
|
|
@@ -20488,6 +20707,7 @@ var sod723 = (raw_params) => {
|
|
|
20488
20707
|
};
|
|
20489
20708
|
return {
|
|
20490
20709
|
circuitJson: sodWithoutParsing10(parameters).concat(
|
|
20710
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
20491
20711
|
silkscreenLine,
|
|
20492
20712
|
silkscreenRefText,
|
|
20493
20713
|
courtyard
|
|
@@ -20535,7 +20755,7 @@ var sod128 = (raw_params) => {
|
|
|
20535
20755
|
const parameters = sod_def10.parse(raw_params);
|
|
20536
20756
|
const silkscreenRefText = silkscreenRef(
|
|
20537
20757
|
0,
|
|
20538
|
-
|
|
20758
|
+
length38.parse(parameters.h) / 2 + 0.4,
|
|
20539
20759
|
0.3
|
|
20540
20760
|
);
|
|
20541
20761
|
const silkscreenLine = {
|
|
@@ -20544,20 +20764,20 @@ var sod128 = (raw_params) => {
|
|
|
20544
20764
|
pcb_component_id: "",
|
|
20545
20765
|
route: [
|
|
20546
20766
|
{
|
|
20547
|
-
x:
|
|
20548
|
-
y:
|
|
20767
|
+
x: length38.parse(parameters.p) / 2,
|
|
20768
|
+
y: length38.parse(parameters.h) / 2
|
|
20549
20769
|
},
|
|
20550
20770
|
{
|
|
20551
|
-
x: -
|
|
20552
|
-
y:
|
|
20771
|
+
x: -length38.parse(parameters.w) / 2 - 0.2,
|
|
20772
|
+
y: length38.parse(parameters.h) / 2
|
|
20553
20773
|
},
|
|
20554
20774
|
{
|
|
20555
|
-
x: -
|
|
20556
|
-
y: -
|
|
20775
|
+
x: -length38.parse(parameters.w) / 2 - 0.2,
|
|
20776
|
+
y: -length38.parse(parameters.h) / 2
|
|
20557
20777
|
},
|
|
20558
20778
|
{
|
|
20559
|
-
x:
|
|
20560
|
-
y: -
|
|
20779
|
+
x: length38.parse(parameters.p) / 2,
|
|
20780
|
+
y: -length38.parse(parameters.h) / 2
|
|
20561
20781
|
}
|
|
20562
20782
|
],
|
|
20563
20783
|
stroke_width: 0.1,
|
|
@@ -20576,6 +20796,7 @@ var sod128 = (raw_params) => {
|
|
|
20576
20796
|
};
|
|
20577
20797
|
return {
|
|
20578
20798
|
circuitJson: sodWithoutParsing11(parameters).concat(
|
|
20799
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
20579
20800
|
silkscreenLine,
|
|
20580
20801
|
silkscreenRefText,
|
|
20581
20802
|
courtyard
|
|
@@ -20604,17 +20825,28 @@ var sodWithoutParsing11 = (parameters) => {
|
|
|
20604
20825
|
x,
|
|
20605
20826
|
y,
|
|
20606
20827
|
Number.parseFloat(parameters.pl),
|
|
20607
|
-
Number.parseFloat(parameters.pw)
|
|
20828
|
+
Number.parseFloat(parameters.pw),
|
|
20829
|
+
0.125
|
|
20608
20830
|
)
|
|
20609
20831
|
);
|
|
20610
20832
|
}
|
|
20611
20833
|
return pads;
|
|
20612
20834
|
};
|
|
20835
|
+
var polygonpad = (pn, points) => {
|
|
20836
|
+
return {
|
|
20837
|
+
type: "pcb_smtpad",
|
|
20838
|
+
points,
|
|
20839
|
+
layer: "top",
|
|
20840
|
+
shape: "polygon",
|
|
20841
|
+
pcb_smtpad_id: "",
|
|
20842
|
+
port_hints: Array.isArray(pn) ? pn.map((item) => item.toString()) : [pn.toString()]
|
|
20843
|
+
};
|
|
20844
|
+
};
|
|
20613
20845
|
var sot89_3CourtyardOutline = [
|
|
20614
|
-
{ x: -
|
|
20615
|
-
{ x: -
|
|
20616
|
-
{ x: 2.
|
|
20617
|
-
{ x: 2.
|
|
20846
|
+
{ x: -2.85, y: -2.5 },
|
|
20847
|
+
{ x: -2.85, y: 2.5 },
|
|
20848
|
+
{ x: 2.25, y: 2.5 },
|
|
20849
|
+
{ x: 2.25, y: -2.5 }
|
|
20618
20850
|
];
|
|
20619
20851
|
var sot89_5CourtyardOutline = [
|
|
20620
20852
|
{ x: -2.85, y: -2.5 },
|
|
@@ -20622,6 +20854,30 @@ var sot89_5CourtyardOutline = [
|
|
|
20622
20854
|
{ x: 2.85, y: 2.5 },
|
|
20623
20855
|
{ x: 2.85, y: -2.5 }
|
|
20624
20856
|
];
|
|
20857
|
+
var sot89_5CenterPadPoints = [
|
|
20858
|
+
{ x: 0.9, y: 0.5 },
|
|
20859
|
+
{ x: 2.6, y: 0.5 },
|
|
20860
|
+
{ x: 2.6, y: -0.5 },
|
|
20861
|
+
{ x: 0.9, y: -0.5 },
|
|
20862
|
+
{ x: 0.4, y: -1 },
|
|
20863
|
+
{ x: -0.4, y: -1 },
|
|
20864
|
+
{ x: -0.9, y: -0.5 },
|
|
20865
|
+
{ x: -2.6, y: -0.5 },
|
|
20866
|
+
{ x: -2.6, y: 0.5 },
|
|
20867
|
+
{ x: -0.9, y: 0.5 },
|
|
20868
|
+
{ x: -0.4, y: 1 },
|
|
20869
|
+
{ x: 0.4, y: 1 }
|
|
20870
|
+
];
|
|
20871
|
+
var sot89_3CenterPadPoints = [
|
|
20872
|
+
{ x: 2, y: -0.8665 },
|
|
20873
|
+
{ x: -1.125, y: -0.8665 },
|
|
20874
|
+
{ x: -1.125, y: -0.45 },
|
|
20875
|
+
{ x: -2.6, y: -0.45 },
|
|
20876
|
+
{ x: -2.6, y: 0.45 },
|
|
20877
|
+
{ x: -1.125, y: 0.45 },
|
|
20878
|
+
{ x: -1.125, y: 0.8665 },
|
|
20879
|
+
{ x: 2, y: 0.8665 }
|
|
20880
|
+
];
|
|
20625
20881
|
var sot89_def = base_def.extend({
|
|
20626
20882
|
fn: z47.string(),
|
|
20627
20883
|
num_pins: z47.union([z47.literal(3), z47.literal(5)]).default(3),
|
|
@@ -20633,21 +20889,19 @@ var sot89_def = base_def.extend({
|
|
|
20633
20889
|
string: z47.string().optional()
|
|
20634
20890
|
});
|
|
20635
20891
|
var sot89_3 = (parameters) => {
|
|
20636
|
-
const pads = [];
|
|
20637
20892
|
const padGap = Number.parseFloat(parameters.p);
|
|
20638
20893
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
20639
|
-
const
|
|
20894
|
+
const length64 = Number.parseFloat(parameters.w);
|
|
20640
20895
|
const padHeight = Number.parseFloat(parameters.pl);
|
|
20641
|
-
const
|
|
20642
|
-
const
|
|
20643
|
-
pads.push(
|
|
20644
|
-
rectpad(1, -length63 / 2 + outerPadXShift, padGap, padHeight, padWidth),
|
|
20645
|
-
rectpad(2, -length63 / 2, 0, padHeight + centerExtra, padWidth),
|
|
20646
|
-
rectpad(3, -length63 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
|
|
20647
|
-
);
|
|
20648
|
-
const silkscreenRefText = silkscreenRef(0, 0, 0.3);
|
|
20649
|
-
const width10 = Number.parseFloat(parameters.w) / 2 - 1;
|
|
20896
|
+
const outerPadX = -length64 / 2 + 0.15;
|
|
20897
|
+
const width10 = length64 / 2 - 1;
|
|
20650
20898
|
const height10 = Number.parseFloat(parameters.h) / 2;
|
|
20899
|
+
const pads = [
|
|
20900
|
+
rectpad(1, outerPadX, padGap, padHeight, padWidth),
|
|
20901
|
+
polygonpad(2, sot89_3CenterPadPoints),
|
|
20902
|
+
rectpad(3, outerPadX, -padGap, padHeight, padWidth)
|
|
20903
|
+
];
|
|
20904
|
+
const silkscreenRefText = silkscreenRef(0, height10 + 0.5, 0.3);
|
|
20651
20905
|
const silkscreenPath1 = {
|
|
20652
20906
|
layer: "top",
|
|
20653
20907
|
pcb_component_id: "",
|
|
@@ -20688,24 +20942,16 @@ var sot89_3 = (parameters) => {
|
|
|
20688
20942
|
];
|
|
20689
20943
|
};
|
|
20690
20944
|
var sot89_5 = (parameters) => {
|
|
20691
|
-
const pads = [
|
|
20692
|
-
const padGap = Number.parseFloat(parameters.p);
|
|
20693
|
-
const padWidth = Number.parseFloat(parameters.pw);
|
|
20694
|
-
const length63 = Number.parseFloat(parameters.w);
|
|
20695
|
-
pads.push(
|
|
20945
|
+
const pads = [
|
|
20696
20946
|
rectpad(1, -1.85, -1.5, 1.5, 0.7),
|
|
20697
20947
|
rectpad(2, -1.85, 1.5, 1.5, 0.7),
|
|
20698
|
-
|
|
20948
|
+
polygonpad(3, sot89_5CenterPadPoints),
|
|
20699
20949
|
rectpad(4, 1.85, -1.5, 1.5, 0.7),
|
|
20700
20950
|
rectpad(5, 1.85, 1.5, 1.5, 0.7)
|
|
20701
|
-
|
|
20702
|
-
const silkscreenRefText = silkscreenRef(
|
|
20703
|
-
0,
|
|
20704
|
-
Number.parseFloat(parameters.h) / 2 + 0.5,
|
|
20705
|
-
0.3
|
|
20706
|
-
);
|
|
20951
|
+
];
|
|
20707
20952
|
const width10 = Number.parseFloat(parameters.w) / 2 - 1;
|
|
20708
20953
|
const height10 = Number.parseFloat(parameters.h) / 2;
|
|
20954
|
+
const silkscreenRefText = silkscreenRef(0, height10 + 0.5, 0.3);
|
|
20709
20955
|
const silkscreenPath1 = {
|
|
20710
20956
|
layer: "top",
|
|
20711
20957
|
pcb_component_id: "",
|
|
@@ -20766,11 +21012,11 @@ var sot89 = (raw_params) => {
|
|
|
20766
21012
|
};
|
|
20767
21013
|
var to220_def = base_def.extend({
|
|
20768
21014
|
fn: z48.string(),
|
|
20769
|
-
p:
|
|
20770
|
-
id:
|
|
20771
|
-
od:
|
|
20772
|
-
w:
|
|
20773
|
-
h:
|
|
21015
|
+
p: length39.optional().default("5.0mm"),
|
|
21016
|
+
id: length39.optional().default("1.0mm"),
|
|
21017
|
+
od: length39.optional().default("1.9mm"),
|
|
21018
|
+
w: length39.optional().default("13mm"),
|
|
21019
|
+
h: length39.optional().default("7mm"),
|
|
20774
21020
|
num_pins: z48.number().optional(),
|
|
20775
21021
|
string: z48.string().optional()
|
|
20776
21022
|
});
|
|
@@ -20877,11 +21123,11 @@ var TO220F_PITCH_MM = 2.54;
|
|
|
20877
21123
|
var to220f_def = base_def.extend({
|
|
20878
21124
|
fn: z49.string(),
|
|
20879
21125
|
// KiCad TO-220F-3_Vertical: hole=1.2mm, pad=1.905×2.0mm, pitch=2.54mm
|
|
20880
|
-
id:
|
|
20881
|
-
od:
|
|
20882
|
-
ph:
|
|
20883
|
-
w:
|
|
20884
|
-
h:
|
|
21126
|
+
id: length40.optional().default("1.2mm"),
|
|
21127
|
+
od: length40.optional().default("1.905mm"),
|
|
21128
|
+
ph: length40.optional().default("2mm"),
|
|
21129
|
+
w: length40.optional().default("13mm"),
|
|
21130
|
+
h: length40.optional().default("7mm"),
|
|
20885
21131
|
num_pins: z49.number().optional(),
|
|
20886
21132
|
string: z49.string().optional()
|
|
20887
21133
|
});
|
|
@@ -20942,7 +21188,7 @@ var minimelf = (raw_params) => {
|
|
|
20942
21188
|
const parameters = minimelf_def.parse(raw_params);
|
|
20943
21189
|
const silkscreenRefText = silkscreenRef(
|
|
20944
21190
|
0,
|
|
20945
|
-
|
|
21191
|
+
length41.parse(parameters.h) / 2 + 0.4,
|
|
20946
21192
|
0.3
|
|
20947
21193
|
);
|
|
20948
21194
|
const silkscreenLine = {
|
|
@@ -20951,20 +21197,20 @@ var minimelf = (raw_params) => {
|
|
|
20951
21197
|
pcb_component_id: "",
|
|
20952
21198
|
route: [
|
|
20953
21199
|
{
|
|
20954
|
-
x:
|
|
20955
|
-
y:
|
|
21200
|
+
x: length41.parse(parameters.p) / 2,
|
|
21201
|
+
y: length41.parse(parameters.h) / 2
|
|
20956
21202
|
},
|
|
20957
21203
|
{
|
|
20958
|
-
x: -
|
|
20959
|
-
y:
|
|
21204
|
+
x: -length41.parse(parameters.w) / 2,
|
|
21205
|
+
y: length41.parse(parameters.h) / 2
|
|
20960
21206
|
},
|
|
20961
21207
|
{
|
|
20962
|
-
x: -
|
|
20963
|
-
y: -
|
|
21208
|
+
x: -length41.parse(parameters.w) / 2,
|
|
21209
|
+
y: -length41.parse(parameters.h) / 2
|
|
20964
21210
|
},
|
|
20965
21211
|
{
|
|
20966
|
-
x:
|
|
20967
|
-
y: -
|
|
21212
|
+
x: length41.parse(parameters.p) / 2,
|
|
21213
|
+
y: -length41.parse(parameters.h) / 2
|
|
20968
21214
|
}
|
|
20969
21215
|
],
|
|
20970
21216
|
stroke_width: 0.1,
|
|
@@ -21007,7 +21253,8 @@ var miniMelfWithoutParsing = (parameters) => {
|
|
|
21007
21253
|
x,
|
|
21008
21254
|
y,
|
|
21009
21255
|
Number.parseFloat(parameters.pl),
|
|
21010
|
-
Number.parseFloat(parameters.pw)
|
|
21256
|
+
Number.parseFloat(parameters.pw),
|
|
21257
|
+
0.125
|
|
21011
21258
|
)
|
|
21012
21259
|
);
|
|
21013
21260
|
}
|
|
@@ -21026,7 +21273,7 @@ var sod882d = (raw_params) => {
|
|
|
21026
21273
|
const parameters = sod_def11.parse(raw_params);
|
|
21027
21274
|
const silkscreenRefText = silkscreenRef(
|
|
21028
21275
|
0,
|
|
21029
|
-
|
|
21276
|
+
length42.parse(parameters.h) + 0.1,
|
|
21030
21277
|
0.3
|
|
21031
21278
|
);
|
|
21032
21279
|
const silkscreenLine = {
|
|
@@ -21035,20 +21282,20 @@ var sod882d = (raw_params) => {
|
|
|
21035
21282
|
pcb_component_id: "",
|
|
21036
21283
|
route: [
|
|
21037
21284
|
{
|
|
21038
|
-
x:
|
|
21039
|
-
y:
|
|
21285
|
+
x: length42.parse(parameters.p) / 2 + 0.1,
|
|
21286
|
+
y: length42.parse(parameters.h) / 2
|
|
21040
21287
|
},
|
|
21041
21288
|
{
|
|
21042
|
-
x: -
|
|
21043
|
-
y:
|
|
21289
|
+
x: -length42.parse(parameters.w) / 2,
|
|
21290
|
+
y: length42.parse(parameters.h) / 2
|
|
21044
21291
|
},
|
|
21045
21292
|
{
|
|
21046
|
-
x: -
|
|
21047
|
-
y: -
|
|
21293
|
+
x: -length42.parse(parameters.w) / 2,
|
|
21294
|
+
y: -length42.parse(parameters.h) / 2
|
|
21048
21295
|
},
|
|
21049
21296
|
{
|
|
21050
|
-
x:
|
|
21051
|
-
y: -
|
|
21297
|
+
x: length42.parse(parameters.p) / 2 + 0.1,
|
|
21298
|
+
y: -length42.parse(parameters.h) / 2
|
|
21052
21299
|
}
|
|
21053
21300
|
],
|
|
21054
21301
|
stroke_width: 0.1,
|
|
@@ -21067,6 +21314,7 @@ var sod882d = (raw_params) => {
|
|
|
21067
21314
|
};
|
|
21068
21315
|
return {
|
|
21069
21316
|
circuitJson: sodWithoutParsing12(parameters).concat(
|
|
21317
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
21070
21318
|
silkscreenLine,
|
|
21071
21319
|
silkscreenRefText,
|
|
21072
21320
|
courtyard
|
|
@@ -21095,7 +21343,8 @@ var sodWithoutParsing12 = (parameters) => {
|
|
|
21095
21343
|
x,
|
|
21096
21344
|
y,
|
|
21097
21345
|
Number.parseFloat(parameters.pl),
|
|
21098
|
-
Number.parseFloat(parameters.pw)
|
|
21346
|
+
Number.parseFloat(parameters.pw),
|
|
21347
|
+
0.0625
|
|
21099
21348
|
)
|
|
21100
21349
|
);
|
|
21101
21350
|
}
|
|
@@ -21114,7 +21363,7 @@ var melf = (raw_params) => {
|
|
|
21114
21363
|
const parameters = melf_def.parse(raw_params);
|
|
21115
21364
|
const silkscreenRefText = silkscreenRef(
|
|
21116
21365
|
0,
|
|
21117
|
-
|
|
21366
|
+
length43.parse(parameters.h),
|
|
21118
21367
|
0.3
|
|
21119
21368
|
);
|
|
21120
21369
|
const silkscreenLine = {
|
|
@@ -21123,20 +21372,20 @@ var melf = (raw_params) => {
|
|
|
21123
21372
|
pcb_component_id: "",
|
|
21124
21373
|
route: [
|
|
21125
21374
|
{
|
|
21126
|
-
x:
|
|
21127
|
-
y:
|
|
21375
|
+
x: length43.parse(parameters.p) / 2,
|
|
21376
|
+
y: length43.parse(parameters.h) / 2
|
|
21128
21377
|
},
|
|
21129
21378
|
{
|
|
21130
|
-
x: -
|
|
21131
|
-
y:
|
|
21379
|
+
x: -length43.parse(parameters.w) / 2,
|
|
21380
|
+
y: length43.parse(parameters.h) / 2
|
|
21132
21381
|
},
|
|
21133
21382
|
{
|
|
21134
|
-
x: -
|
|
21135
|
-
y: -
|
|
21383
|
+
x: -length43.parse(parameters.w) / 2,
|
|
21384
|
+
y: -length43.parse(parameters.h) / 2
|
|
21136
21385
|
},
|
|
21137
21386
|
{
|
|
21138
|
-
x:
|
|
21139
|
-
y: -
|
|
21387
|
+
x: length43.parse(parameters.p) / 2,
|
|
21388
|
+
y: -length43.parse(parameters.h) / 2
|
|
21140
21389
|
}
|
|
21141
21390
|
],
|
|
21142
21391
|
stroke_width: 0.1,
|
|
@@ -21183,7 +21432,8 @@ var melfWithoutParsing = (parameters) => {
|
|
|
21183
21432
|
x,
|
|
21184
21433
|
y,
|
|
21185
21434
|
Number.parseFloat(parameters.pl),
|
|
21186
|
-
Number.parseFloat(parameters.pw)
|
|
21435
|
+
Number.parseFloat(parameters.pw),
|
|
21436
|
+
0.125
|
|
21187
21437
|
)
|
|
21188
21438
|
);
|
|
21189
21439
|
}
|
|
@@ -21202,7 +21452,7 @@ var micromelf = (raw_params) => {
|
|
|
21202
21452
|
const parameters = micromelf_def.parse(raw_params);
|
|
21203
21453
|
const silkscreenRefText = silkscreenRef(
|
|
21204
21454
|
0,
|
|
21205
|
-
|
|
21455
|
+
length44.parse(parameters.h),
|
|
21206
21456
|
0.3
|
|
21207
21457
|
);
|
|
21208
21458
|
const silkscreenLine = {
|
|
@@ -21211,20 +21461,20 @@ var micromelf = (raw_params) => {
|
|
|
21211
21461
|
pcb_component_id: "",
|
|
21212
21462
|
route: [
|
|
21213
21463
|
{
|
|
21214
|
-
x:
|
|
21215
|
-
y:
|
|
21464
|
+
x: length44.parse(parameters.p) / 2,
|
|
21465
|
+
y: length44.parse(parameters.h) / 2
|
|
21216
21466
|
},
|
|
21217
21467
|
{
|
|
21218
|
-
x: -
|
|
21219
|
-
y:
|
|
21468
|
+
x: -length44.parse(parameters.w) / 2 - 0.1,
|
|
21469
|
+
y: length44.parse(parameters.h) / 2
|
|
21220
21470
|
},
|
|
21221
21471
|
{
|
|
21222
|
-
x: -
|
|
21223
|
-
y: -
|
|
21472
|
+
x: -length44.parse(parameters.w) / 2 - 0.1,
|
|
21473
|
+
y: -length44.parse(parameters.h) / 2
|
|
21224
21474
|
},
|
|
21225
21475
|
{
|
|
21226
|
-
x:
|
|
21227
|
-
y: -
|
|
21476
|
+
x: length44.parse(parameters.p) / 2,
|
|
21477
|
+
y: -length44.parse(parameters.h) / 2
|
|
21228
21478
|
}
|
|
21229
21479
|
],
|
|
21230
21480
|
stroke_width: 0.1,
|
|
@@ -21271,7 +21521,8 @@ var microMelfWithoutParsing = (parameters) => {
|
|
|
21271
21521
|
x,
|
|
21272
21522
|
y,
|
|
21273
21523
|
Number.parseFloat(parameters.pl),
|
|
21274
|
-
Number.parseFloat(parameters.pw)
|
|
21524
|
+
Number.parseFloat(parameters.pw),
|
|
21525
|
+
0.1
|
|
21275
21526
|
)
|
|
21276
21527
|
);
|
|
21277
21528
|
}
|
|
@@ -21290,7 +21541,7 @@ var sma = (raw_params) => {
|
|
|
21290
21541
|
const parameters = sma_def.parse(raw_params);
|
|
21291
21542
|
const silkscreenRefText = silkscreenRef(
|
|
21292
21543
|
0,
|
|
21293
|
-
|
|
21544
|
+
length45.parse(parameters.h) / 2 + 0.5,
|
|
21294
21545
|
0.3
|
|
21295
21546
|
);
|
|
21296
21547
|
const silkscreenLine = {
|
|
@@ -21299,20 +21550,20 @@ var sma = (raw_params) => {
|
|
|
21299
21550
|
pcb_component_id: "",
|
|
21300
21551
|
route: [
|
|
21301
21552
|
{
|
|
21302
|
-
x:
|
|
21303
|
-
y:
|
|
21553
|
+
x: length45.parse(parameters.p) / 2,
|
|
21554
|
+
y: length45.parse(parameters.h) / 2
|
|
21304
21555
|
},
|
|
21305
21556
|
{
|
|
21306
|
-
x: -
|
|
21307
|
-
y:
|
|
21557
|
+
x: -length45.parse(parameters.w) / 2 - 0.5,
|
|
21558
|
+
y: length45.parse(parameters.h) / 2
|
|
21308
21559
|
},
|
|
21309
21560
|
{
|
|
21310
|
-
x: -
|
|
21311
|
-
y: -
|
|
21561
|
+
x: -length45.parse(parameters.w) / 2 - 0.5,
|
|
21562
|
+
y: -length45.parse(parameters.h) / 2
|
|
21312
21563
|
},
|
|
21313
21564
|
{
|
|
21314
|
-
x:
|
|
21315
|
-
y: -
|
|
21565
|
+
x: length45.parse(parameters.p) / 2,
|
|
21566
|
+
y: -length45.parse(parameters.h) / 2
|
|
21316
21567
|
}
|
|
21317
21568
|
],
|
|
21318
21569
|
stroke_width: 0.1,
|
|
@@ -21358,7 +21609,8 @@ var smaWithoutParsing = (parameters) => {
|
|
|
21358
21609
|
x,
|
|
21359
21610
|
y,
|
|
21360
21611
|
Number.parseFloat(parameters.pl),
|
|
21361
|
-
Number.parseFloat(parameters.pw)
|
|
21612
|
+
Number.parseFloat(parameters.pw),
|
|
21613
|
+
0.125
|
|
21362
21614
|
)
|
|
21363
21615
|
);
|
|
21364
21616
|
}
|
|
@@ -21377,7 +21629,7 @@ var smf = (raw_params) => {
|
|
|
21377
21629
|
const parameters = smf_def.parse(raw_params);
|
|
21378
21630
|
const silkscreenRefText = silkscreenRef(
|
|
21379
21631
|
0,
|
|
21380
|
-
|
|
21632
|
+
length46.parse(parameters.h) - 0.5,
|
|
21381
21633
|
0.3
|
|
21382
21634
|
);
|
|
21383
21635
|
const silkscreenLine = {
|
|
@@ -21386,20 +21638,20 @@ var smf = (raw_params) => {
|
|
|
21386
21638
|
pcb_component_id: "",
|
|
21387
21639
|
route: [
|
|
21388
21640
|
{
|
|
21389
|
-
x:
|
|
21390
|
-
y:
|
|
21641
|
+
x: length46.parse(parameters.p) / 2,
|
|
21642
|
+
y: length46.parse(parameters.h) / 2
|
|
21391
21643
|
},
|
|
21392
21644
|
{
|
|
21393
|
-
x: -
|
|
21394
|
-
y:
|
|
21645
|
+
x: -length46.parse(parameters.w) / 2,
|
|
21646
|
+
y: length46.parse(parameters.h) / 2
|
|
21395
21647
|
},
|
|
21396
21648
|
{
|
|
21397
|
-
x: -
|
|
21398
|
-
y: -
|
|
21649
|
+
x: -length46.parse(parameters.w) / 2,
|
|
21650
|
+
y: -length46.parse(parameters.h) / 2
|
|
21399
21651
|
},
|
|
21400
21652
|
{
|
|
21401
|
-
x:
|
|
21402
|
-
y: -
|
|
21653
|
+
x: length46.parse(parameters.p) / 2,
|
|
21654
|
+
y: -length46.parse(parameters.h) / 2
|
|
21403
21655
|
}
|
|
21404
21656
|
],
|
|
21405
21657
|
stroke_width: 0.1,
|
|
@@ -21446,7 +21698,8 @@ var smfWithoutParsing = (parameters) => {
|
|
|
21446
21698
|
x,
|
|
21447
21699
|
y,
|
|
21448
21700
|
Number.parseFloat(parameters.pl),
|
|
21449
|
-
Number.parseFloat(parameters.pw)
|
|
21701
|
+
Number.parseFloat(parameters.pw),
|
|
21702
|
+
0.125
|
|
21450
21703
|
)
|
|
21451
21704
|
);
|
|
21452
21705
|
}
|
|
@@ -21465,7 +21718,7 @@ var smb = (raw_params) => {
|
|
|
21465
21718
|
const parameters = smb_def.parse(raw_params);
|
|
21466
21719
|
const silkscreenRefText = silkscreenRef(
|
|
21467
21720
|
0,
|
|
21468
|
-
|
|
21721
|
+
length47.parse(parameters.h) / 2 + 0.5,
|
|
21469
21722
|
0.3
|
|
21470
21723
|
);
|
|
21471
21724
|
const silkscreenLine = {
|
|
@@ -21474,20 +21727,20 @@ var smb = (raw_params) => {
|
|
|
21474
21727
|
pcb_component_id: "",
|
|
21475
21728
|
route: [
|
|
21476
21729
|
{
|
|
21477
|
-
x:
|
|
21478
|
-
y:
|
|
21730
|
+
x: length47.parse(parameters.p) / 2,
|
|
21731
|
+
y: length47.parse(parameters.h) / 2
|
|
21479
21732
|
},
|
|
21480
21733
|
{
|
|
21481
|
-
x: -
|
|
21482
|
-
y:
|
|
21734
|
+
x: -length47.parse(parameters.w) / 2 - 0.1,
|
|
21735
|
+
y: length47.parse(parameters.h) / 2
|
|
21483
21736
|
},
|
|
21484
21737
|
{
|
|
21485
|
-
x: -
|
|
21486
|
-
y: -
|
|
21738
|
+
x: -length47.parse(parameters.w) / 2 - 0.1,
|
|
21739
|
+
y: -length47.parse(parameters.h) / 2
|
|
21487
21740
|
},
|
|
21488
21741
|
{
|
|
21489
|
-
x:
|
|
21490
|
-
y: -
|
|
21742
|
+
x: length47.parse(parameters.p) / 2,
|
|
21743
|
+
y: -length47.parse(parameters.h) / 2
|
|
21491
21744
|
}
|
|
21492
21745
|
],
|
|
21493
21746
|
stroke_width: 0.1,
|
|
@@ -21534,7 +21787,8 @@ var smbWithoutParsing = (parameters) => {
|
|
|
21534
21787
|
x,
|
|
21535
21788
|
y,
|
|
21536
21789
|
Number.parseFloat(parameters.pl),
|
|
21537
|
-
Number.parseFloat(parameters.pw)
|
|
21790
|
+
Number.parseFloat(parameters.pw),
|
|
21791
|
+
0.125
|
|
21538
21792
|
)
|
|
21539
21793
|
);
|
|
21540
21794
|
}
|
|
@@ -21558,20 +21812,20 @@ var smc = (raw_params) => {
|
|
|
21558
21812
|
pcb_component_id: "",
|
|
21559
21813
|
route: [
|
|
21560
21814
|
{
|
|
21561
|
-
x:
|
|
21562
|
-
y:
|
|
21815
|
+
x: length48.parse(parameters.p) / 2,
|
|
21816
|
+
y: length48.parse(parameters.h) / 2 - 0.8
|
|
21563
21817
|
},
|
|
21564
21818
|
{
|
|
21565
|
-
x: -
|
|
21566
|
-
y:
|
|
21819
|
+
x: -length48.parse(parameters.w) / 2 - 0.8,
|
|
21820
|
+
y: length48.parse(parameters.h) / 2 - 0.8
|
|
21567
21821
|
},
|
|
21568
21822
|
{
|
|
21569
|
-
x: -
|
|
21570
|
-
y: -
|
|
21823
|
+
x: -length48.parse(parameters.w) / 2 - 0.8,
|
|
21824
|
+
y: -length48.parse(parameters.h) / 2 + 0.8
|
|
21571
21825
|
},
|
|
21572
21826
|
{
|
|
21573
|
-
x:
|
|
21574
|
-
y: -
|
|
21827
|
+
x: length48.parse(parameters.p) / 2,
|
|
21828
|
+
y: -length48.parse(parameters.h) / 2 + 0.8
|
|
21575
21829
|
}
|
|
21576
21830
|
],
|
|
21577
21831
|
stroke_width: 0.1,
|
|
@@ -21617,7 +21871,8 @@ var smcWithoutParsing = (parameters) => {
|
|
|
21617
21871
|
x,
|
|
21618
21872
|
y,
|
|
21619
21873
|
Number.parseFloat(parameters.pl),
|
|
21620
|
-
Number.parseFloat(parameters.pw)
|
|
21874
|
+
Number.parseFloat(parameters.pw),
|
|
21875
|
+
0.125
|
|
21621
21876
|
)
|
|
21622
21877
|
);
|
|
21623
21878
|
}
|
|
@@ -22107,9 +22362,26 @@ var to92s_2 = (parameters) => {
|
|
|
22107
22362
|
const { p, id, od, h: h2 } = parameters;
|
|
22108
22363
|
const holeY = Number.parseFloat(h2) / 2;
|
|
22109
22364
|
const padSpacing7 = Number.parseFloat(p);
|
|
22365
|
+
const holeDiameter = Number.parseFloat(id);
|
|
22366
|
+
const padWidth = Number.parseFloat(od);
|
|
22367
|
+
const padHeight = padWidth * (1.5 / 1.05);
|
|
22110
22368
|
return [
|
|
22111
|
-
|
|
22112
|
-
|
|
22369
|
+
platedHoleWithRectPad({
|
|
22370
|
+
pn: 1,
|
|
22371
|
+
x: -padSpacing7,
|
|
22372
|
+
y: holeY - padSpacing7,
|
|
22373
|
+
holeDiameter,
|
|
22374
|
+
rectPadWidth: padWidth,
|
|
22375
|
+
rectPadHeight: padHeight
|
|
22376
|
+
}),
|
|
22377
|
+
platedHolePill(
|
|
22378
|
+
2,
|
|
22379
|
+
padSpacing7,
|
|
22380
|
+
holeY - padSpacing7,
|
|
22381
|
+
holeDiameter,
|
|
22382
|
+
padWidth,
|
|
22383
|
+
padHeight
|
|
22384
|
+
)
|
|
22113
22385
|
];
|
|
22114
22386
|
};
|
|
22115
22387
|
var to92s = (raw_params) => {
|
|
@@ -22184,12 +22456,12 @@ var to92s = (raw_params) => {
|
|
|
22184
22456
|
};
|
|
22185
22457
|
var jst_def = base_def.extend({
|
|
22186
22458
|
fn: z61.string(),
|
|
22187
|
-
p:
|
|
22188
|
-
id:
|
|
22189
|
-
pw:
|
|
22190
|
-
pl:
|
|
22191
|
-
w:
|
|
22192
|
-
h:
|
|
22459
|
+
p: length49.optional(),
|
|
22460
|
+
id: length49.optional(),
|
|
22461
|
+
pw: length49.optional(),
|
|
22462
|
+
pl: length49.optional(),
|
|
22463
|
+
w: length49.optional(),
|
|
22464
|
+
h: length49.optional(),
|
|
22193
22465
|
sh: z61.boolean().optional().describe(
|
|
22194
22466
|
'JST SH (Surface-mount) connector family. SH stands for "Super High-density".'
|
|
22195
22467
|
),
|
|
@@ -22223,27 +22495,27 @@ var modifyBoundsToIncludeRect = ({
|
|
|
22223
22495
|
};
|
|
22224
22496
|
var variantDefaults = {
|
|
22225
22497
|
ph: {
|
|
22226
|
-
p:
|
|
22227
|
-
id:
|
|
22228
|
-
pw:
|
|
22229
|
-
pl:
|
|
22230
|
-
w:
|
|
22231
|
-
h:
|
|
22498
|
+
p: length49.parse("2.2mm"),
|
|
22499
|
+
id: length49.parse("0.70mm"),
|
|
22500
|
+
pw: length49.parse("1.20mm"),
|
|
22501
|
+
pl: length49.parse("1.20mm"),
|
|
22502
|
+
w: length49.parse("6mm"),
|
|
22503
|
+
h: length49.parse("5mm")
|
|
22232
22504
|
},
|
|
22233
22505
|
sh: {
|
|
22234
|
-
p:
|
|
22235
|
-
pw:
|
|
22236
|
-
pl:
|
|
22237
|
-
w:
|
|
22238
|
-
h:
|
|
22506
|
+
p: length49.parse("1mm"),
|
|
22507
|
+
pw: length49.parse("0.6mm"),
|
|
22508
|
+
pl: length49.parse("1.55mm"),
|
|
22509
|
+
w: length49.parse("5.8mm"),
|
|
22510
|
+
h: length49.parse("7.8mm")
|
|
22239
22511
|
},
|
|
22240
22512
|
zh: {
|
|
22241
|
-
p:
|
|
22242
|
-
id:
|
|
22243
|
-
pw:
|
|
22244
|
-
pl:
|
|
22245
|
-
w:
|
|
22246
|
-
h:
|
|
22513
|
+
p: length49.parse("1.5mm"),
|
|
22514
|
+
id: length49.parse("0.73mm"),
|
|
22515
|
+
pw: length49.parse("1.03mm"),
|
|
22516
|
+
pl: length49.parse("1.73mm"),
|
|
22517
|
+
w: length49.parse("3mm"),
|
|
22518
|
+
h: length49.parse("3.5mm")
|
|
22247
22519
|
}
|
|
22248
22520
|
};
|
|
22249
22521
|
function getVariant(params) {
|
|
@@ -22512,7 +22784,7 @@ var sod110 = (raw_params) => {
|
|
|
22512
22784
|
const parameters = sod_def12.parse(raw_params);
|
|
22513
22785
|
const silkscreenRefText = silkscreenRef(
|
|
22514
22786
|
0,
|
|
22515
|
-
|
|
22787
|
+
length50.parse(parameters.h) / 2 + 0.5,
|
|
22516
22788
|
0.3
|
|
22517
22789
|
);
|
|
22518
22790
|
const silkscreenLine = {
|
|
@@ -22521,20 +22793,20 @@ var sod110 = (raw_params) => {
|
|
|
22521
22793
|
pcb_component_id: "",
|
|
22522
22794
|
route: [
|
|
22523
22795
|
{
|
|
22524
|
-
x:
|
|
22525
|
-
y:
|
|
22796
|
+
x: length50.parse(parameters.p) / 2,
|
|
22797
|
+
y: length50.parse(parameters.h) / 2
|
|
22526
22798
|
},
|
|
22527
22799
|
{
|
|
22528
|
-
x: -
|
|
22529
|
-
y:
|
|
22800
|
+
x: -length50.parse(parameters.w) / 2,
|
|
22801
|
+
y: length50.parse(parameters.h) / 2
|
|
22530
22802
|
},
|
|
22531
22803
|
{
|
|
22532
|
-
x: -
|
|
22533
|
-
y: -
|
|
22804
|
+
x: -length50.parse(parameters.w) / 2,
|
|
22805
|
+
y: -length50.parse(parameters.h) / 2
|
|
22534
22806
|
},
|
|
22535
22807
|
{
|
|
22536
|
-
x:
|
|
22537
|
-
y: -
|
|
22808
|
+
x: length50.parse(parameters.p) / 2,
|
|
22809
|
+
y: -length50.parse(parameters.h) / 2
|
|
22538
22810
|
}
|
|
22539
22811
|
],
|
|
22540
22812
|
stroke_width: 0.1,
|
|
@@ -22553,6 +22825,7 @@ var sod110 = (raw_params) => {
|
|
|
22553
22825
|
};
|
|
22554
22826
|
return {
|
|
22555
22827
|
circuitJson: sodWithoutParsing13(parameters).concat(
|
|
22828
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
22556
22829
|
silkscreenLine,
|
|
22557
22830
|
silkscreenRefText,
|
|
22558
22831
|
courtyard
|
|
@@ -22580,7 +22853,8 @@ var sodWithoutParsing13 = (parameters) => {
|
|
|
22580
22853
|
x,
|
|
22581
22854
|
y,
|
|
22582
22855
|
Number.parseFloat(parameters.pl),
|
|
22583
|
-
Number.parseFloat(parameters.pw)
|
|
22856
|
+
Number.parseFloat(parameters.pw),
|
|
22857
|
+
0.1
|
|
22584
22858
|
)
|
|
22585
22859
|
);
|
|
22586
22860
|
}
|
|
@@ -22627,11 +22901,11 @@ var vssop_def = base_def.extend({
|
|
|
22627
22901
|
var vssop = (raw_params) => {
|
|
22628
22902
|
const parameters = vssop_def.parse(raw_params);
|
|
22629
22903
|
const defaults = getDefaultValues(parameters.num_pins);
|
|
22630
|
-
const w =
|
|
22631
|
-
const h2 =
|
|
22632
|
-
const p =
|
|
22633
|
-
const pl =
|
|
22634
|
-
const pw =
|
|
22904
|
+
const w = length51.parse(parameters.w || defaults.w);
|
|
22905
|
+
const h2 = length51.parse(parameters.h || defaults.h);
|
|
22906
|
+
const p = length51.parse(parameters.p || defaults.p);
|
|
22907
|
+
const pl = length51.parse(parameters.pl || defaults.pl);
|
|
22908
|
+
const pw = length51.parse(parameters.pw || defaults.pw);
|
|
22635
22909
|
const pads = [];
|
|
22636
22910
|
const half = parameters.num_pins / 2;
|
|
22637
22911
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
@@ -22784,27 +23058,28 @@ var msop_def = base_def.extend({
|
|
|
22784
23058
|
pw: z64.string().optional(),
|
|
22785
23059
|
string: z64.string().optional()
|
|
22786
23060
|
});
|
|
22787
|
-
var getMsopCoords = (pinCount, pn, w, p) => {
|
|
23061
|
+
var getMsopCoords = (pinCount, pn, w, p, pl) => {
|
|
22788
23062
|
const half = pinCount / 2;
|
|
22789
23063
|
const rowIndex = (pn - 1) % half;
|
|
22790
23064
|
const col = pn <= half ? -1 : 1;
|
|
22791
23065
|
const row = (half - 1) / 2 - rowIndex;
|
|
23066
|
+
const padBodyOverlap = length52.parse("0.2mm");
|
|
22792
23067
|
return {
|
|
22793
|
-
x: col *
|
|
23068
|
+
x: col * (w / 2 + pl / 2 - padBodyOverlap),
|
|
22794
23069
|
y: row * p
|
|
22795
23070
|
};
|
|
22796
23071
|
};
|
|
22797
23072
|
var msop = (raw_params) => {
|
|
22798
23073
|
const parameters = msop_def.parse(raw_params);
|
|
22799
23074
|
const defaults = getDefaultValues2(parameters.num_pins);
|
|
22800
|
-
const w =
|
|
22801
|
-
const h2 =
|
|
22802
|
-
const p =
|
|
22803
|
-
const pl =
|
|
22804
|
-
const pw =
|
|
23075
|
+
const w = length52.parse(parameters.w || defaults.w);
|
|
23076
|
+
const h2 = length52.parse(parameters.h || defaults.h);
|
|
23077
|
+
const p = length52.parse(parameters.p || defaults.p);
|
|
23078
|
+
const pl = length52.parse(parameters.pl || defaults.pl);
|
|
23079
|
+
const pw = length52.parse(parameters.pw || defaults.pw);
|
|
22805
23080
|
const pads = [];
|
|
22806
23081
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
22807
|
-
const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
|
|
23082
|
+
const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p, pl);
|
|
22808
23083
|
pads.push(rectpad(i + 1, x, y, pl, pw));
|
|
22809
23084
|
}
|
|
22810
23085
|
const silkscreenBoxWidth = w;
|
|
@@ -22835,7 +23110,8 @@ var msop = (raw_params) => {
|
|
|
22835
23110
|
parameters.num_pins,
|
|
22836
23111
|
1,
|
|
22837
23112
|
silkscreenBoxWidth,
|
|
22838
|
-
p
|
|
23113
|
+
p,
|
|
23114
|
+
pl
|
|
22839
23115
|
);
|
|
22840
23116
|
const pin1MarkerPosition = {
|
|
22841
23117
|
x: pin1Position.x - 0.8,
|
|
@@ -22909,7 +23185,7 @@ var sod323w = (raw_params) => {
|
|
|
22909
23185
|
const parameters = sod323w_def.parse(raw_params);
|
|
22910
23186
|
const silkscreenRefText = silkscreenRef(
|
|
22911
23187
|
0,
|
|
22912
|
-
|
|
23188
|
+
length53.parse(parameters.h),
|
|
22913
23189
|
0.3
|
|
22914
23190
|
);
|
|
22915
23191
|
const silkscreenLine = {
|
|
@@ -22918,20 +23194,20 @@ var sod323w = (raw_params) => {
|
|
|
22918
23194
|
pcb_component_id: "",
|
|
22919
23195
|
route: [
|
|
22920
23196
|
{
|
|
22921
|
-
x:
|
|
22922
|
-
y:
|
|
23197
|
+
x: length53.parse(parameters.pad_spacing) / 2,
|
|
23198
|
+
y: length53.parse(parameters.h) / 2
|
|
22923
23199
|
},
|
|
22924
23200
|
{
|
|
22925
|
-
x: -
|
|
22926
|
-
y:
|
|
23201
|
+
x: -length53.parse(parameters.w) / 2 - 0.2,
|
|
23202
|
+
y: length53.parse(parameters.h) / 2
|
|
22927
23203
|
},
|
|
22928
23204
|
{
|
|
22929
|
-
x: -
|
|
22930
|
-
y: -
|
|
23205
|
+
x: -length53.parse(parameters.w) / 2 - 0.2,
|
|
23206
|
+
y: -length53.parse(parameters.h) / 2
|
|
22931
23207
|
},
|
|
22932
23208
|
{
|
|
22933
|
-
x:
|
|
22934
|
-
y: -
|
|
23209
|
+
x: length53.parse(parameters.pad_spacing) / 2,
|
|
23210
|
+
y: -length53.parse(parameters.h) / 2
|
|
22935
23211
|
}
|
|
22936
23212
|
],
|
|
22937
23213
|
stroke_width: 0.1,
|
|
@@ -22950,6 +23226,7 @@ var sod323w = (raw_params) => {
|
|
|
22950
23226
|
};
|
|
22951
23227
|
return {
|
|
22952
23228
|
circuitJson: sodWithoutParsing14(parameters).concat(
|
|
23229
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
22953
23230
|
silkscreenLine,
|
|
22954
23231
|
silkscreenRefText,
|
|
22955
23232
|
courtyard
|
|
@@ -22997,7 +23274,7 @@ var sod323fl = (raw_params) => {
|
|
|
22997
23274
|
const parameters = sod323FL_def.parse(raw_params);
|
|
22998
23275
|
const silkscreenRefText = silkscreenRef(
|
|
22999
23276
|
0,
|
|
23000
|
-
|
|
23277
|
+
length54.parse(parameters.h),
|
|
23001
23278
|
0.3
|
|
23002
23279
|
);
|
|
23003
23280
|
const silkscreenLine = {
|
|
@@ -23006,20 +23283,20 @@ var sod323fl = (raw_params) => {
|
|
|
23006
23283
|
pcb_component_id: "",
|
|
23007
23284
|
route: [
|
|
23008
23285
|
{
|
|
23009
|
-
x:
|
|
23010
|
-
y:
|
|
23286
|
+
x: length54.parse(parameters.pad_spacing) / 2,
|
|
23287
|
+
y: length54.parse(parameters.h) / 2
|
|
23011
23288
|
},
|
|
23012
23289
|
{
|
|
23013
|
-
x: -
|
|
23014
|
-
y:
|
|
23290
|
+
x: -length54.parse(parameters.w) / 2 - 0.2,
|
|
23291
|
+
y: length54.parse(parameters.h) / 2
|
|
23015
23292
|
},
|
|
23016
23293
|
{
|
|
23017
|
-
x: -
|
|
23018
|
-
y: -
|
|
23294
|
+
x: -length54.parse(parameters.w) / 2 - 0.2,
|
|
23295
|
+
y: -length54.parse(parameters.h) / 2
|
|
23019
23296
|
},
|
|
23020
23297
|
{
|
|
23021
|
-
x:
|
|
23022
|
-
y: -
|
|
23298
|
+
x: length54.parse(parameters.pad_spacing) / 2,
|
|
23299
|
+
y: -length54.parse(parameters.h) / 2
|
|
23023
23300
|
}
|
|
23024
23301
|
],
|
|
23025
23302
|
stroke_width: 0.1,
|
|
@@ -23038,6 +23315,7 @@ var sod323fl = (raw_params) => {
|
|
|
23038
23315
|
};
|
|
23039
23316
|
return {
|
|
23040
23317
|
circuitJson: sodWithoutParsing15(parameters).concat(
|
|
23318
|
+
...createFabricationNoteDiodeFromCopperPads(parameters),
|
|
23041
23319
|
silkscreenLine,
|
|
23042
23320
|
silkscreenRefText,
|
|
23043
23321
|
courtyard
|
|
@@ -23095,13 +23373,13 @@ var son = (raw_params) => {
|
|
|
23095
23373
|
...raw_params,
|
|
23096
23374
|
num_pins: numPins
|
|
23097
23375
|
});
|
|
23098
|
-
const w =
|
|
23099
|
-
const h2 =
|
|
23100
|
-
const p =
|
|
23101
|
-
const pl =
|
|
23102
|
-
const pw =
|
|
23103
|
-
const epw =
|
|
23104
|
-
const eph =
|
|
23376
|
+
const w = length55.parse(parameters.w);
|
|
23377
|
+
const h2 = length55.parse(parameters.h);
|
|
23378
|
+
const p = length55.parse(parameters.p);
|
|
23379
|
+
const pl = length55.parse(parameters.pl);
|
|
23380
|
+
const pw = length55.parse(parameters.pw);
|
|
23381
|
+
const epw = length55.parse(parameters.epw);
|
|
23382
|
+
const eph = length55.parse(parameters.eph);
|
|
23105
23383
|
const pads = [];
|
|
23106
23384
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
23107
23385
|
const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
|
|
@@ -23209,7 +23487,7 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
|
|
|
23209
23487
|
const col = pn <= half ? -1 : 1;
|
|
23210
23488
|
const row = (half - 1) / 2 - rowIndex;
|
|
23211
23489
|
return {
|
|
23212
|
-
x: col *
|
|
23490
|
+
x: col * length55.parse("1.4mm"),
|
|
23213
23491
|
y: row * p
|
|
23214
23492
|
};
|
|
23215
23493
|
};
|
|
@@ -23217,12 +23495,12 @@ var vson_def = base_def.extend({
|
|
|
23217
23495
|
fn: z68.string(),
|
|
23218
23496
|
num_pins: z68.number().optional().default(8),
|
|
23219
23497
|
p: distance3.describe("pitch (distance between center of each pin)"),
|
|
23220
|
-
w:
|
|
23498
|
+
w: length56.describe("width between vertical rows of pins"),
|
|
23221
23499
|
grid: dim2d.describe("width and height of the border of the footprint"),
|
|
23222
23500
|
ep: dim2d.default("0x0mm").describe("width and height of the central exposed thermal pad"),
|
|
23223
|
-
epx:
|
|
23224
|
-
pinw:
|
|
23225
|
-
pinh:
|
|
23501
|
+
epx: length56.default("0mm").describe("x offset of the center of the central exposed thermal pad"),
|
|
23502
|
+
pinw: length56.describe("width of the pin pads"),
|
|
23503
|
+
pinh: length56.describe("height of the pin pads")
|
|
23226
23504
|
});
|
|
23227
23505
|
var vson = (raw_params) => {
|
|
23228
23506
|
const parameters = vson_def.parse(raw_params);
|
|
@@ -23370,9 +23648,9 @@ var getSilkscreenPaths = (grid2) => {
|
|
|
23370
23648
|
};
|
|
23371
23649
|
var solderjumper = (params) => {
|
|
23372
23650
|
const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
|
|
23373
|
-
const padSpacing7 =
|
|
23374
|
-
const padWidth =
|
|
23375
|
-
const padHeight =
|
|
23651
|
+
const padSpacing7 = length57.parse(p);
|
|
23652
|
+
const padWidth = length57.parse(pw);
|
|
23653
|
+
const padHeight = length57.parse(ph);
|
|
23376
23654
|
const traceWidth = Math.min(padHeight / 4, 0.5);
|
|
23377
23655
|
const pads = [];
|
|
23378
23656
|
for (let i = 0; i < num_pins; i++) {
|
|
@@ -23705,11 +23983,11 @@ var sot963_def = base_def.extend({
|
|
|
23705
23983
|
});
|
|
23706
23984
|
var sot963 = (raw_params) => {
|
|
23707
23985
|
const parameters = sot963_def.parse({ ...raw_params, fn: "sot963" });
|
|
23708
|
-
const w =
|
|
23709
|
-
const h2 =
|
|
23710
|
-
const p =
|
|
23711
|
-
const pl =
|
|
23712
|
-
const pw =
|
|
23986
|
+
const w = length58.parse(parameters.w);
|
|
23987
|
+
const h2 = length58.parse(parameters.h);
|
|
23988
|
+
const p = length58.parse(parameters.p);
|
|
23989
|
+
const pl = length58.parse(parameters.pl);
|
|
23990
|
+
const pw = length58.parse(parameters.pw);
|
|
23713
23991
|
const pads = [];
|
|
23714
23992
|
for (let i = 0; i < 6; i++) {
|
|
23715
23993
|
const { x, y } = getSot963PadCoord(i + 1, w, p, pl);
|
|
@@ -23781,7 +24059,7 @@ var getSot963PadCoord = (pn, w, p, pl) => {
|
|
|
23781
24059
|
var potentiometer_def = base_def.extend({
|
|
23782
24060
|
fn: z71.string(),
|
|
23783
24061
|
num_pins: z71.union([z71.literal(3), z71.literal(2)]).default(3),
|
|
23784
|
-
p: z71.string().default("
|
|
24062
|
+
p: z71.string().default("5mm"),
|
|
23785
24063
|
id: z71.string().default("1.25mm"),
|
|
23786
24064
|
od: z71.string().default("2.35mm"),
|
|
23787
24065
|
ca: z71.string().default("14mm").describe(
|
|
@@ -23792,13 +24070,13 @@ var potentiometer_def = base_def.extend({
|
|
|
23792
24070
|
string: z71.string().optional()
|
|
23793
24071
|
});
|
|
23794
24072
|
var potentiometer_acp = (parameters) => {
|
|
23795
|
-
const { p, id, od, h: h2
|
|
23796
|
-
const
|
|
23797
|
-
const
|
|
24073
|
+
const { p, id, od, h: h2 } = parameters;
|
|
24074
|
+
const x = Number.parseFloat(h2);
|
|
24075
|
+
const y = Number.parseFloat(p);
|
|
23798
24076
|
return [
|
|
23799
|
-
platedhole(1, 0,
|
|
23800
|
-
platedhole(2,
|
|
23801
|
-
platedhole(3, 0, -
|
|
24077
|
+
platedhole(1, 0, y, id, od),
|
|
24078
|
+
platedhole(2, x, 0, id, od),
|
|
24079
|
+
platedhole(3, 0, -y, id, od)
|
|
23802
24080
|
];
|
|
23803
24081
|
};
|
|
23804
24082
|
var potentiometer = (raw_params) => {
|
|
@@ -23871,10 +24149,10 @@ var potentiometer = (raw_params) => {
|
|
|
23871
24149
|
};
|
|
23872
24150
|
var electrolytic_def = base_def.extend({
|
|
23873
24151
|
fn: z72.string(),
|
|
23874
|
-
p:
|
|
23875
|
-
id:
|
|
23876
|
-
od:
|
|
23877
|
-
d:
|
|
24152
|
+
p: length59.optional().default("7.5mm"),
|
|
24153
|
+
id: length59.optional().default("1mm"),
|
|
24154
|
+
od: length59.optional().default("2mm"),
|
|
24155
|
+
d: length59.optional().default("10.5mm")
|
|
23878
24156
|
});
|
|
23879
24157
|
var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
|
|
23880
24158
|
const topArc = [];
|
|
@@ -23903,7 +24181,14 @@ var electrolytic = (raw_params) => {
|
|
|
23903
24181
|
const parameters = electrolytic_def.parse(raw_params);
|
|
23904
24182
|
const { p, id, od, d } = parameters;
|
|
23905
24183
|
const plated_holes = [
|
|
23906
|
-
|
|
24184
|
+
platedHoleWithRectPad({
|
|
24185
|
+
pn: 1,
|
|
24186
|
+
x: -p / 2,
|
|
24187
|
+
y: 0,
|
|
24188
|
+
holeDiameter: id,
|
|
24189
|
+
rectPadWidth: od,
|
|
24190
|
+
rectPadHeight: od
|
|
24191
|
+
}),
|
|
23907
24192
|
platedhole(2, p / 2, 0, id, od)
|
|
23908
24193
|
];
|
|
23909
24194
|
const { topArc, bottomArc } = generate_circle_arcs(
|
|
@@ -24005,7 +24290,7 @@ var smbf = (raw_params) => {
|
|
|
24005
24290
|
const parameters = smbf_def.parse(raw_params);
|
|
24006
24291
|
const silkscreenRefText = silkscreenRef(
|
|
24007
24292
|
0,
|
|
24008
|
-
|
|
24293
|
+
length60.parse(parameters.h) - 0.5,
|
|
24009
24294
|
0.3
|
|
24010
24295
|
);
|
|
24011
24296
|
const silkscreenLine = {
|
|
@@ -24014,20 +24299,20 @@ var smbf = (raw_params) => {
|
|
|
24014
24299
|
pcb_component_id: "",
|
|
24015
24300
|
route: [
|
|
24016
24301
|
{
|
|
24017
|
-
x:
|
|
24018
|
-
y:
|
|
24302
|
+
x: length60.parse(parameters.p) / 2,
|
|
24303
|
+
y: length60.parse(parameters.h) / 2
|
|
24019
24304
|
},
|
|
24020
24305
|
{
|
|
24021
|
-
x: -
|
|
24022
|
-
y:
|
|
24306
|
+
x: -length60.parse(parameters.w) / 2 - 0.3,
|
|
24307
|
+
y: length60.parse(parameters.h) / 2
|
|
24023
24308
|
},
|
|
24024
24309
|
{
|
|
24025
|
-
x: -
|
|
24026
|
-
y: -
|
|
24310
|
+
x: -length60.parse(parameters.w) / 2 - 0.3,
|
|
24311
|
+
y: -length60.parse(parameters.h) / 2
|
|
24027
24312
|
},
|
|
24028
24313
|
{
|
|
24029
|
-
x:
|
|
24030
|
-
y: -
|
|
24314
|
+
x: length60.parse(parameters.p) / 2,
|
|
24315
|
+
y: -length60.parse(parameters.h) / 2
|
|
24031
24316
|
}
|
|
24032
24317
|
],
|
|
24033
24318
|
stroke_width: 0.1,
|
|
@@ -24062,20 +24347,16 @@ var getSmbfCoords = (parameters) => {
|
|
|
24062
24347
|
};
|
|
24063
24348
|
var smbfWithoutParsing = (parameters) => {
|
|
24064
24349
|
const pads = [];
|
|
24350
|
+
const p = length60.parse(parameters.p);
|
|
24351
|
+
const pl = length60.parse(parameters.pl);
|
|
24352
|
+
const pw = length60.parse(parameters.pw);
|
|
24353
|
+
const cornerRadius = 0.125;
|
|
24065
24354
|
for (let i = 1; i <= parameters.num_pins; i++) {
|
|
24066
24355
|
const { x, y } = getSmbfCoords({
|
|
24067
24356
|
pn: i,
|
|
24068
|
-
p
|
|
24357
|
+
p
|
|
24069
24358
|
});
|
|
24070
|
-
pads.push(
|
|
24071
|
-
rectpad(
|
|
24072
|
-
i,
|
|
24073
|
-
x,
|
|
24074
|
-
y,
|
|
24075
|
-
Number.parseFloat(parameters.pl),
|
|
24076
|
-
Number.parseFloat(parameters.pw)
|
|
24077
|
-
)
|
|
24078
|
-
);
|
|
24359
|
+
pads.push(rectpad(i, x, y, pl, pw, cornerRadius));
|
|
24079
24360
|
}
|
|
24080
24361
|
return pads;
|
|
24081
24362
|
};
|
|
@@ -24205,20 +24486,20 @@ var smtpad_def = base_def.extend({
|
|
|
24205
24486
|
rect: z75.boolean().optional(),
|
|
24206
24487
|
square: z75.boolean().optional(),
|
|
24207
24488
|
pill: z75.boolean().optional(),
|
|
24208
|
-
d:
|
|
24209
|
-
pd:
|
|
24210
|
-
diameter:
|
|
24211
|
-
r:
|
|
24212
|
-
pr:
|
|
24213
|
-
radius:
|
|
24214
|
-
w:
|
|
24215
|
-
pw:
|
|
24216
|
-
width:
|
|
24217
|
-
h:
|
|
24218
|
-
ph:
|
|
24219
|
-
height:
|
|
24220
|
-
s:
|
|
24221
|
-
size:
|
|
24489
|
+
d: length61.optional(),
|
|
24490
|
+
pd: length61.optional(),
|
|
24491
|
+
diameter: length61.optional(),
|
|
24492
|
+
r: length61.optional(),
|
|
24493
|
+
pr: length61.optional(),
|
|
24494
|
+
radius: length61.optional(),
|
|
24495
|
+
w: length61.optional(),
|
|
24496
|
+
pw: length61.optional(),
|
|
24497
|
+
width: length61.optional(),
|
|
24498
|
+
h: length61.optional(),
|
|
24499
|
+
ph: length61.optional(),
|
|
24500
|
+
height: length61.optional(),
|
|
24501
|
+
s: length61.optional(),
|
|
24502
|
+
size: length61.optional(),
|
|
24222
24503
|
string: z75.string().optional()
|
|
24223
24504
|
}).transform((v) => {
|
|
24224
24505
|
let shape = "rect";
|
|
@@ -24285,12 +24566,12 @@ var smtpad = (raw_params) => {
|
|
|
24285
24566
|
};
|
|
24286
24567
|
var platedhole_def = base_def.extend({
|
|
24287
24568
|
fn: z76.string(),
|
|
24288
|
-
d:
|
|
24289
|
-
hd:
|
|
24290
|
-
r:
|
|
24291
|
-
hr:
|
|
24292
|
-
pd:
|
|
24293
|
-
pr:
|
|
24569
|
+
d: length62.optional(),
|
|
24570
|
+
hd: length62.optional(),
|
|
24571
|
+
r: length62.optional(),
|
|
24572
|
+
hr: length62.optional(),
|
|
24573
|
+
pd: length62.optional(),
|
|
24574
|
+
pr: length62.optional(),
|
|
24294
24575
|
squarepad: z76.boolean().optional().default(false)
|
|
24295
24576
|
}).transform((v) => {
|
|
24296
24577
|
let holeD;
|
|
@@ -24711,9 +24992,9 @@ var mountedpcbmodule_def = base_def.extend({
|
|
|
24711
24992
|
fn: z80.string(),
|
|
24712
24993
|
numPins: z80.number().optional().default(0),
|
|
24713
24994
|
rows: z80.union([z80.string(), z80.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
|
|
24714
|
-
p:
|
|
24715
|
-
id:
|
|
24716
|
-
od:
|
|
24995
|
+
p: length63.default("2.54mm").describe("pitch"),
|
|
24996
|
+
id: length63.default("1.0mm").describe("inner diameter"),
|
|
24997
|
+
od: length63.default("1.5mm").describe("outer diameter"),
|
|
24717
24998
|
male: z80.boolean().optional().describe("the module uses male headers"),
|
|
24718
24999
|
nopin: z80.boolean().optional().default(false).describe("omit pins rendering"),
|
|
24719
25000
|
female: z80.boolean().optional().describe("the module uses female headers"),
|
|
@@ -24737,9 +25018,9 @@ var mountedpcbmodule_def = base_def.extend({
|
|
|
24737
25018
|
pinrowrightpins: z80.union([z80.string(), z80.number()]).transform((val) => Number(val)).optional(),
|
|
24738
25019
|
pinrowtoppins: z80.union([z80.string(), z80.number()]).transform((val) => Number(val)).optional(),
|
|
24739
25020
|
pinrowbottompins: z80.union([z80.string(), z80.number()]).transform((val) => Number(val)).optional(),
|
|
24740
|
-
width:
|
|
24741
|
-
height:
|
|
24742
|
-
pinRowHoleEdgeToEdgeDist:
|
|
25021
|
+
width: length63.optional(),
|
|
25022
|
+
height: length63.optional(),
|
|
25023
|
+
pinRowHoleEdgeToEdgeDist: length63.default("2mm"),
|
|
24743
25024
|
holes: z80.union([z80.string(), z80.array(z80.string())]).optional().transform((val) => {
|
|
24744
25025
|
if (!val) return val;
|
|
24745
25026
|
if (Array.isArray(val)) return val;
|
|
@@ -24748,9 +25029,9 @@ var mountedpcbmodule_def = base_def.extend({
|
|
|
24748
25029
|
}
|
|
24749
25030
|
return [val];
|
|
24750
25031
|
}),
|
|
24751
|
-
holeXDist:
|
|
24752
|
-
holeYDist:
|
|
24753
|
-
holeInset:
|
|
25032
|
+
holeXDist: length63.optional(),
|
|
25033
|
+
holeYDist: length63.optional(),
|
|
25034
|
+
holeInset: length63.default("1mm"),
|
|
24754
25035
|
pinrow: z80.union([z80.string(), z80.number()]).optional(),
|
|
24755
25036
|
usbposition: z80.enum(["left", "right", "top", "bottom"]).optional().default("left"),
|
|
24756
25037
|
usbleft: z80.boolean().optional().default(false),
|
|
@@ -24761,10 +25042,10 @@ var mountedpcbmodule_def = base_def.extend({
|
|
|
24761
25042
|
usbmicro: z80.boolean().optional().default(false),
|
|
24762
25043
|
usbc: z80.boolean().optional().default(false),
|
|
24763
25044
|
screen: z80.boolean().optional().default(false).describe("add silkscreen outline for screen/display area"),
|
|
24764
|
-
screenwidth:
|
|
24765
|
-
screenheight:
|
|
24766
|
-
screencenteroffsetx:
|
|
24767
|
-
screencenteroffsety:
|
|
25045
|
+
screenwidth: length63.optional(),
|
|
25046
|
+
screenheight: length63.optional(),
|
|
25047
|
+
screencenteroffsetx: length63.optional(),
|
|
25048
|
+
screencenteroffsety: length63.optional()
|
|
24768
25049
|
}).transform((data) => {
|
|
24769
25050
|
const pinlabelAnchorSide = determinePinlabelAnchorSide(data);
|
|
24770
25051
|
let pinRowSide = data.pinRowSide;
|
|
@@ -25478,7 +25759,7 @@ var footprinter = () => {
|
|
|
25478
25759
|
} else {
|
|
25479
25760
|
target[prop] = true;
|
|
25480
25761
|
target.fn = prop;
|
|
25481
|
-
if (prop === "res" || prop === "cap") {
|
|
25762
|
+
if (prop === "res" || prop === "cap" || prop === "led" || prop === "diode") {
|
|
25482
25763
|
if (v) {
|
|
25483
25764
|
if (typeof v === "string" && v.includes("_metric")) {
|
|
25484
25765
|
target.metric = v.split("_metric")[0];
|
|
@@ -25638,7 +25919,7 @@ var FootprintPlatedHole = ({
|
|
|
25638
25919
|
var ChipBody = ({
|
|
25639
25920
|
center,
|
|
25640
25921
|
width: width10,
|
|
25641
|
-
length:
|
|
25922
|
+
length: length64,
|
|
25642
25923
|
height: height10,
|
|
25643
25924
|
heightAboveSurface: heightAboveSurface2 = 0.15,
|
|
25644
25925
|
color = "#555",
|
|
@@ -25655,24 +25936,24 @@ var ChipBody = ({
|
|
|
25655
25936
|
}) => {
|
|
25656
25937
|
const straightHeight = height10 * straightHeightRatio;
|
|
25657
25938
|
const taperHeight = height10 - straightHeight;
|
|
25658
|
-
const taperInset = Math.min(width10,
|
|
25939
|
+
const taperInset = Math.min(width10, length64) * taperRatio;
|
|
25659
25940
|
const faceWidth = Math.max(width10 - taperInset, width10 * faceRatio);
|
|
25660
|
-
const faceLength = Math.max(
|
|
25661
|
-
const defaultNotchRadius = Math.min(width10,
|
|
25941
|
+
const faceLength = Math.max(length64 - taperInset, length64 * faceRatio);
|
|
25942
|
+
const defaultNotchRadius = Math.min(width10, length64) * 0.12;
|
|
25662
25943
|
const actualNotchRadius = notchRadius ?? defaultNotchRadius;
|
|
25663
25944
|
const defaultNotchPosition = {
|
|
25664
25945
|
x: 0,
|
|
25665
|
-
y:
|
|
25946
|
+
y: length64 / 2 - actualNotchRadius * 0.25,
|
|
25666
25947
|
z: height10
|
|
25667
25948
|
};
|
|
25668
25949
|
const actualNotchPosition = notchPosition ?? defaultNotchPosition;
|
|
25669
25950
|
const body = /* @__PURE__ */ jsxs(Union, { children: [
|
|
25670
25951
|
/* @__PURE__ */ jsxs(Hull, { children: [
|
|
25671
25952
|
/* @__PURE__ */ jsx2(Translate, { z: 5e-3, children: /* @__PURE__ */ jsx2(Cuboid, { size: [faceWidth, faceLength, 0.01] }) }),
|
|
25672
|
-
/* @__PURE__ */ jsx2(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx2(Cuboid, { size: [width10,
|
|
25953
|
+
/* @__PURE__ */ jsx2(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx2(Cuboid, { size: [width10, length64, 0.01] }) })
|
|
25673
25954
|
] }),
|
|
25674
25955
|
/* @__PURE__ */ jsxs(Hull, { children: [
|
|
25675
|
-
/* @__PURE__ */ jsx2(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx2(Cuboid, { size: [width10,
|
|
25956
|
+
/* @__PURE__ */ jsx2(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx2(Cuboid, { size: [width10, length64, 0.01] }) }),
|
|
25676
25957
|
/* @__PURE__ */ jsx2(Translate, { z: straightHeight + taperHeight, children: /* @__PURE__ */ jsx2(Cuboid, { size: [faceWidth, faceLength, 0.01] }) })
|
|
25677
25958
|
] })
|
|
25678
25959
|
] });
|
|
@@ -25689,7 +25970,7 @@ var ChipBody = ({
|
|
|
25689
25970
|
let finalBody = body;
|
|
25690
25971
|
if (chamferSize > 0) {
|
|
25691
25972
|
const xOffset = width10 / 2;
|
|
25692
|
-
const yOffset =
|
|
25973
|
+
const yOffset = length64 / 2;
|
|
25693
25974
|
finalBody = /* @__PURE__ */ jsxs(Subtract, { children: [
|
|
25694
25975
|
body,
|
|
25695
25976
|
chamferCutout(xOffset, yOffset),
|
|
@@ -25715,8 +25996,8 @@ function getExpandedStroke(strokeInput, width10) {
|
|
|
25715
25996
|
function getNormal(p1, p2) {
|
|
25716
25997
|
const dx = p2.x - p1.x;
|
|
25717
25998
|
const dy = p2.y - p1.y;
|
|
25718
|
-
const
|
|
25719
|
-
return { x: -dy /
|
|
25999
|
+
const length64 = Math.sqrt(dx * dx + dy * dy);
|
|
26000
|
+
return { x: -dy / length64, y: dx / length64 };
|
|
25720
26001
|
}
|
|
25721
26002
|
function addPoint(point, normal, factor) {
|
|
25722
26003
|
const newPoint = {
|
|
@@ -27048,11 +27329,11 @@ var FemaleHeaderRow = ({
|
|
|
27048
27329
|
};
|
|
27049
27330
|
var PushButton = ({
|
|
27050
27331
|
width: width10,
|
|
27051
|
-
length:
|
|
27332
|
+
length: length64,
|
|
27052
27333
|
innerDiameter = 1
|
|
27053
27334
|
}) => {
|
|
27054
27335
|
const bodyWidth = width10;
|
|
27055
|
-
const bodyLength10 =
|
|
27336
|
+
const bodyLength10 = length64;
|
|
27056
27337
|
const bodyHeight = width10 * 0.7;
|
|
27057
27338
|
const legWidth = innerDiameter / 2.5;
|
|
27058
27339
|
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
@@ -32429,7 +32710,7 @@ import * as THREE21 from "three";
|
|
|
32429
32710
|
// package.json
|
|
32430
32711
|
var package_default = {
|
|
32431
32712
|
name: "@tscircuit/3d-viewer",
|
|
32432
|
-
version: "0.0.
|
|
32713
|
+
version: "0.0.576",
|
|
32433
32714
|
main: "./dist/index.js",
|
|
32434
32715
|
module: "./dist/index.js",
|
|
32435
32716
|
type: "module",
|
|
@@ -32458,7 +32739,7 @@ var package_default = {
|
|
|
32458
32739
|
dependencies: {
|
|
32459
32740
|
"@jscad/regl-renderer": "^2.6.12",
|
|
32460
32741
|
"@jscad/stl-serializer": "^2.1.20",
|
|
32461
|
-
"circuit-json": "^0.0.
|
|
32742
|
+
"circuit-json": "^0.0.446",
|
|
32462
32743
|
"circuit-to-canvas": "^0.0.111",
|
|
32463
32744
|
"react-hot-toast": "^2.6.0",
|
|
32464
32745
|
three: "^0.165.0",
|
|
@@ -32497,7 +32778,7 @@ var package_default = {
|
|
|
32497
32778
|
"react-use-gesture": "^9.1.3",
|
|
32498
32779
|
semver: "^7.7.0",
|
|
32499
32780
|
"strip-ansi": "^7.1.0",
|
|
32500
|
-
tscircuit: "^0.0.
|
|
32781
|
+
tscircuit: "^0.0.2009",
|
|
32501
32782
|
tsup: "^8.3.6",
|
|
32502
32783
|
typescript: "^5.7.3",
|
|
32503
32784
|
vite: "^7.1.5",
|
|
@@ -34134,8 +34415,8 @@ var platedHole = (plated_hole, ctx, options = {}) => {
|
|
|
34134
34415
|
const copperHeight = copperFillHeight;
|
|
34135
34416
|
const createPillSection = (width10, height10, thickness) => {
|
|
34136
34417
|
const radius = height10 / 2;
|
|
34137
|
-
const
|
|
34138
|
-
if (
|
|
34418
|
+
const length64 = Math.abs(width10 - height10);
|
|
34419
|
+
if (length64 <= 1e-6) {
|
|
34139
34420
|
return (0, import_primitives4.cylinder)({
|
|
34140
34421
|
center: [plated_hole.x, plated_hole.y, 0],
|
|
34141
34422
|
radius,
|
|
@@ -34144,15 +34425,15 @@ var platedHole = (plated_hole, ctx, options = {}) => {
|
|
|
34144
34425
|
}
|
|
34145
34426
|
const rect = (0, import_primitives4.cuboid)({
|
|
34146
34427
|
center: [plated_hole.x, plated_hole.y, 0],
|
|
34147
|
-
size: shouldRotate ? [height10,
|
|
34428
|
+
size: shouldRotate ? [height10, length64, thickness] : [length64, height10, thickness]
|
|
34148
34429
|
});
|
|
34149
34430
|
const leftCap = (0, import_primitives4.cylinder)({
|
|
34150
|
-
center: shouldRotate ? [plated_hole.x, plated_hole.y -
|
|
34431
|
+
center: shouldRotate ? [plated_hole.x, plated_hole.y - length64 / 2, 0] : [plated_hole.x - length64 / 2, plated_hole.y, 0],
|
|
34151
34432
|
radius,
|
|
34152
34433
|
height: thickness
|
|
34153
34434
|
});
|
|
34154
34435
|
const rightCap = (0, import_primitives4.cylinder)({
|
|
34155
|
-
center: shouldRotate ? [plated_hole.x, plated_hole.y +
|
|
34436
|
+
center: shouldRotate ? [plated_hole.x, plated_hole.y + length64 / 2, 0] : [plated_hole.x + length64 / 2, plated_hole.y, 0],
|
|
34156
34437
|
radius,
|
|
34157
34438
|
height: thickness
|
|
34158
34439
|
});
|
|
@@ -34981,18 +35262,18 @@ var BoardGeomBuilder = class {
|
|
|
34981
35262
|
);
|
|
34982
35263
|
}
|
|
34983
35264
|
const radius = Math.min(w, h2) / 2;
|
|
34984
|
-
const
|
|
35265
|
+
const length64 = Math.abs(w - h2);
|
|
34985
35266
|
if (w > h2) {
|
|
34986
35267
|
return (0, import_booleans4.union)(
|
|
34987
|
-
(0, import_primitives6.cuboid)({ center: [0, 0, 0], size: [
|
|
34988
|
-
(0, import_primitives6.cylinder)({ center: [-
|
|
34989
|
-
(0, import_primitives6.cylinder)({ center: [
|
|
35268
|
+
(0, import_primitives6.cuboid)({ center: [0, 0, 0], size: [length64, h2, depth] }),
|
|
35269
|
+
(0, import_primitives6.cylinder)({ center: [-length64 / 2, 0, 0], radius, height: depth }),
|
|
35270
|
+
(0, import_primitives6.cylinder)({ center: [length64 / 2, 0, 0], radius, height: depth })
|
|
34990
35271
|
);
|
|
34991
35272
|
}
|
|
34992
35273
|
return (0, import_booleans4.union)(
|
|
34993
|
-
(0, import_primitives6.cuboid)({ center: [0, 0, 0], size: [w,
|
|
34994
|
-
(0, import_primitives6.cylinder)({ center: [0, -
|
|
34995
|
-
(0, import_primitives6.cylinder)({ center: [0,
|
|
35274
|
+
(0, import_primitives6.cuboid)({ center: [0, 0, 0], size: [w, length64, depth] }),
|
|
35275
|
+
(0, import_primitives6.cylinder)({ center: [0, -length64 / 2, 0], radius, height: depth }),
|
|
35276
|
+
(0, import_primitives6.cylinder)({ center: [0, length64 / 2, 0], radius, height: depth })
|
|
34996
35277
|
);
|
|
34997
35278
|
};
|
|
34998
35279
|
let boardHole = createHoleGeom(
|
|
@@ -40815,9 +41096,9 @@ function getAlignmentSides(placement, rects, rtl) {
|
|
|
40815
41096
|
}
|
|
40816
41097
|
const alignment = getAlignment(placement);
|
|
40817
41098
|
const alignmentAxis = getAlignmentAxis(placement);
|
|
40818
|
-
const
|
|
41099
|
+
const length64 = getAxisLength(alignmentAxis);
|
|
40819
41100
|
let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
40820
|
-
if (rects.reference[
|
|
41101
|
+
if (rects.reference[length64] > rects.floating[length64]) {
|
|
40821
41102
|
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
40822
41103
|
}
|
|
40823
41104
|
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
@@ -41123,28 +41404,28 @@ var arrow = (options) => ({
|
|
|
41123
41404
|
y
|
|
41124
41405
|
};
|
|
41125
41406
|
const axis = getAlignmentAxis(placement);
|
|
41126
|
-
const
|
|
41407
|
+
const length64 = getAxisLength(axis);
|
|
41127
41408
|
const arrowDimensions = await platform2.getDimensions(element);
|
|
41128
41409
|
const isYAxis = axis === "y";
|
|
41129
41410
|
const minProp = isYAxis ? "top" : "left";
|
|
41130
41411
|
const maxProp = isYAxis ? "bottom" : "right";
|
|
41131
41412
|
const clientProp = isYAxis ? "clientHeight" : "clientWidth";
|
|
41132
|
-
const endDiff = rects.reference[
|
|
41413
|
+
const endDiff = rects.reference[length64] + rects.reference[axis] - coords[axis] - rects.floating[length64];
|
|
41133
41414
|
const startDiff = coords[axis] - rects.reference[axis];
|
|
41134
41415
|
const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element));
|
|
41135
41416
|
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
41136
41417
|
if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) {
|
|
41137
|
-
clientSize = elements.floating[clientProp] || rects.floating[
|
|
41418
|
+
clientSize = elements.floating[clientProp] || rects.floating[length64];
|
|
41138
41419
|
}
|
|
41139
41420
|
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
41140
|
-
const largestPossiblePadding = clientSize / 2 - arrowDimensions[
|
|
41421
|
+
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length64] / 2 - 1;
|
|
41141
41422
|
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
41142
41423
|
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
41143
41424
|
const min$1 = minPadding;
|
|
41144
|
-
const max2 = clientSize - arrowDimensions[
|
|
41145
|
-
const center = clientSize / 2 - arrowDimensions[
|
|
41425
|
+
const max2 = clientSize - arrowDimensions[length64] - maxPadding;
|
|
41426
|
+
const center = clientSize / 2 - arrowDimensions[length64] / 2 + centerToReference;
|
|
41146
41427
|
const offset4 = clamp2(min$1, center, max2);
|
|
41147
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[
|
|
41428
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length64] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length64] / 2 < 0;
|
|
41148
41429
|
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0;
|
|
41149
41430
|
return {
|
|
41150
41431
|
[axis]: coords[axis] + alignmentOffset,
|
|
@@ -42403,14 +42684,14 @@ function deepEqual(a, b) {
|
|
|
42403
42684
|
if (typeof a === "function" && a.toString() === b.toString()) {
|
|
42404
42685
|
return true;
|
|
42405
42686
|
}
|
|
42406
|
-
let
|
|
42687
|
+
let length64;
|
|
42407
42688
|
let i;
|
|
42408
42689
|
let keys;
|
|
42409
42690
|
if (a && b && typeof a === "object") {
|
|
42410
42691
|
if (Array.isArray(a)) {
|
|
42411
|
-
|
|
42412
|
-
if (
|
|
42413
|
-
for (i =
|
|
42692
|
+
length64 = a.length;
|
|
42693
|
+
if (length64 !== b.length) return false;
|
|
42694
|
+
for (i = length64; i-- !== 0; ) {
|
|
42414
42695
|
if (!deepEqual(a[i], b[i])) {
|
|
42415
42696
|
return false;
|
|
42416
42697
|
}
|
|
@@ -42418,16 +42699,16 @@ function deepEqual(a, b) {
|
|
|
42418
42699
|
return true;
|
|
42419
42700
|
}
|
|
42420
42701
|
keys = Object.keys(a);
|
|
42421
|
-
|
|
42422
|
-
if (
|
|
42702
|
+
length64 = keys.length;
|
|
42703
|
+
if (length64 !== Object.keys(b).length) {
|
|
42423
42704
|
return false;
|
|
42424
42705
|
}
|
|
42425
|
-
for (i =
|
|
42706
|
+
for (i = length64; i-- !== 0; ) {
|
|
42426
42707
|
if (!{}.hasOwnProperty.call(b, keys[i])) {
|
|
42427
42708
|
return false;
|
|
42428
42709
|
}
|
|
42429
42710
|
}
|
|
42430
|
-
for (i =
|
|
42711
|
+
for (i = length64; i-- !== 0; ) {
|
|
42431
42712
|
const key = keys[i];
|
|
42432
42713
|
if (key === "_owner" && a.$$typeof) {
|
|
42433
42714
|
continue;
|