@tscircuit/cli 0.1.1534 → 0.1.1535
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/cli/build/build.worker.js +193 -32
- package/dist/cli/main.js +641 -589
- package/dist/cli/snapshot/snapshot.worker.js +551 -10985
- package/dist/lib/index.js +2 -1
- package/package.json +2 -1
package/dist/cli/main.js
CHANGED
|
@@ -34840,16 +34840,16 @@ function segmentsDistance(a12, a2, b12, b22) {
|
|
|
34840
34840
|
function pointToSegmentDistance(p, v3, w3) {
|
|
34841
34841
|
const l22 = (w3.x - v3.x) ** 2 + (w3.y - v3.y) ** 2;
|
|
34842
34842
|
if (l22 === 0)
|
|
34843
|
-
return
|
|
34843
|
+
return distance22(p, v3);
|
|
34844
34844
|
let t = ((p.x - v3.x) * (w3.x - v3.x) + (p.y - v3.y) * (w3.y - v3.y)) / l22;
|
|
34845
34845
|
t = Math.max(0, Math.min(1, t));
|
|
34846
34846
|
const projection = {
|
|
34847
34847
|
x: v3.x + t * (w3.x - v3.x),
|
|
34848
34848
|
y: v3.y + t * (w3.y - v3.y)
|
|
34849
34849
|
};
|
|
34850
|
-
return
|
|
34850
|
+
return distance22(p, projection);
|
|
34851
34851
|
}
|
|
34852
|
-
function
|
|
34852
|
+
function distance22(p12, p22) {
|
|
34853
34853
|
const dx2 = p12.x - p22.x;
|
|
34854
34854
|
const dy2 = p12.y - p22.y;
|
|
34855
34855
|
return Math.sqrt(dx2 * dx2 + dy2 * dy2);
|
|
@@ -35787,7 +35787,7 @@ var __create3, __defProp3, __getOwnPropDesc2, __getOwnPropNames3, __getProtoOf3,
|
|
|
35787
35787
|
}
|
|
35788
35788
|
}, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, instanceOfType = (cls, params2 = {
|
|
35789
35789
|
message: `Input not instance of ${cls.name}`
|
|
35790
|
-
}) => custom((data) => data instanceof cls, params2), stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, ostring = () => stringType().optional(), onumber = () => numberType().optional(), oboolean = () => booleanType().optional(), coerce, NEVER, unitMappings, unitMappingAndVariantSuffixes, si_prefix_multiplier, resistance, capacitance, inductance, voltage, length, frequency,
|
|
35790
|
+
}) => custom((data) => data instanceof cls, params2), stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, ostring = () => stringType().optional(), onumber = () => numberType().optional(), oboolean = () => booleanType().optional(), coerce, NEVER, unitMappings, unitMappingAndVariantSuffixes, si_prefix_multiplier, resistance, capacitance, inductance, voltage, length, frequency, distance2, current, duration_ms, time, ms, timestamp, rotation, battery_capacity, expectTypesMatch = (shouldBe) => {}, expectStringUnionsMatch = (shouldBe) => {}, point, position, point3, position3, size, randomId = (length4) => {
|
|
35791
35791
|
const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
35792
35792
|
return Array.from({ length: length4 }, () => chars[Math.floor(Math.random() * chars.length)]).join("");
|
|
35793
35793
|
}, getZodPrefixedIdWithDefault = (prefix) => {
|
|
@@ -39272,7 +39272,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
39272
39272
|
capacitance: () => capacitance,
|
|
39273
39273
|
circuit_json_footprint_load_error: () => circuit_json_footprint_load_error,
|
|
39274
39274
|
current: () => current,
|
|
39275
|
-
distance: () =>
|
|
39275
|
+
distance: () => distance2,
|
|
39276
39276
|
duration_ms: () => duration_ms,
|
|
39277
39277
|
experiment_type: () => experiment_type,
|
|
39278
39278
|
external_footprint_load_error: () => external_footprint_load_error,
|
|
@@ -42749,7 +42749,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
42749
42749
|
voltage = external_exports.string().or(external_exports.number()).transform((v3) => parseAndConvertSiUnit(v3).value);
|
|
42750
42750
|
length = external_exports.string().or(external_exports.number()).transform((v3) => parseAndConvertSiUnit(v3).value);
|
|
42751
42751
|
frequency = external_exports.string().or(external_exports.number()).transform((v3) => parseAndConvertSiUnit(v3).value);
|
|
42752
|
-
|
|
42752
|
+
distance2 = length;
|
|
42753
42753
|
current = external_exports.string().or(external_exports.number()).transform((v3) => parseAndConvertSiUnit(v3).value);
|
|
42754
42754
|
duration_ms = external_exports.string().or(external_exports.number()).transform((v3) => parseAndConvertSiUnit(v3).value);
|
|
42755
42755
|
time = duration_ms;
|
|
@@ -42788,16 +42788,16 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
42788
42788
|
expectStringUnionsMatch('T1 has extra: "d", T2 has extra: "c"');
|
|
42789
42789
|
expectStringUnionsMatch(true);
|
|
42790
42790
|
point = external_exports.object({
|
|
42791
|
-
x:
|
|
42792
|
-
y:
|
|
42791
|
+
x: distance2,
|
|
42792
|
+
y: distance2
|
|
42793
42793
|
});
|
|
42794
42794
|
position = point;
|
|
42795
42795
|
expectTypesMatch(true);
|
|
42796
42796
|
expectTypesMatch(true);
|
|
42797
42797
|
point3 = external_exports.object({
|
|
42798
|
-
x:
|
|
42799
|
-
y:
|
|
42800
|
-
z:
|
|
42798
|
+
x: distance2,
|
|
42799
|
+
y: distance2,
|
|
42800
|
+
z: distance2
|
|
42801
42801
|
});
|
|
42802
42802
|
position3 = point3;
|
|
42803
42803
|
expectTypesMatch(true);
|
|
@@ -42853,7 +42853,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
42853
42853
|
expectTypesMatch(true);
|
|
42854
42854
|
kicadFont = external_exports.object({
|
|
42855
42855
|
size: point.optional(),
|
|
42856
|
-
thickness:
|
|
42856
|
+
thickness: distance2.optional()
|
|
42857
42857
|
});
|
|
42858
42858
|
expectTypesMatch(true);
|
|
42859
42859
|
kicadEffects = external_exports.object({
|
|
@@ -42889,7 +42889,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
42889
42889
|
shape: external_exports.string().optional(),
|
|
42890
42890
|
at: kicadAt.optional(),
|
|
42891
42891
|
size: point.optional(),
|
|
42892
|
-
drill:
|
|
42892
|
+
drill: distance2.optional(),
|
|
42893
42893
|
layers: external_exports.array(external_exports.string()).optional(),
|
|
42894
42894
|
removeUnusedLayers: external_exports.boolean().optional(),
|
|
42895
42895
|
uuid: external_exports.string().optional()
|
|
@@ -42920,7 +42920,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
42920
42920
|
});
|
|
42921
42921
|
expectTypesMatch(true);
|
|
42922
42922
|
kicadSymbolPinNames = external_exports.object({
|
|
42923
|
-
offset:
|
|
42923
|
+
offset: distance2.optional(),
|
|
42924
42924
|
hide: external_exports.boolean().optional()
|
|
42925
42925
|
});
|
|
42926
42926
|
expectTypesMatch(true);
|
|
@@ -42994,7 +42994,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
42994
42994
|
capacitance,
|
|
42995
42995
|
max_voltage_rating: voltage.optional(),
|
|
42996
42996
|
display_capacitance: external_exports.string().optional(),
|
|
42997
|
-
max_decoupling_trace_length:
|
|
42997
|
+
max_decoupling_trace_length: distance2.optional()
|
|
42998
42998
|
});
|
|
42999
42999
|
expectTypesMatch(true);
|
|
43000
43000
|
source_simple_resistor = source_component_base.extend({
|
|
@@ -43468,11 +43468,11 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43468
43468
|
type: external_exports.literal("schematic_box"),
|
|
43469
43469
|
schematic_component_id: external_exports.string().optional(),
|
|
43470
43470
|
schematic_symbol_id: external_exports.string().optional(),
|
|
43471
|
-
width:
|
|
43472
|
-
height:
|
|
43471
|
+
width: distance2,
|
|
43472
|
+
height: distance2,
|
|
43473
43473
|
is_dashed: external_exports.boolean().default(false),
|
|
43474
|
-
x:
|
|
43475
|
-
y:
|
|
43474
|
+
x: distance2,
|
|
43475
|
+
y: distance2,
|
|
43476
43476
|
subcircuit_id: external_exports.string().optional()
|
|
43477
43477
|
}).describe("Draws a box on the schematic");
|
|
43478
43478
|
expectTypesMatch(true);
|
|
@@ -43483,7 +43483,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43483
43483
|
schematic_symbol_id: external_exports.string().optional(),
|
|
43484
43484
|
fill_color: external_exports.string().optional(),
|
|
43485
43485
|
is_filled: external_exports.boolean().optional(),
|
|
43486
|
-
stroke_width:
|
|
43486
|
+
stroke_width: distance2.nullable().optional(),
|
|
43487
43487
|
stroke_color: external_exports.string().optional(),
|
|
43488
43488
|
points: external_exports.array(point),
|
|
43489
43489
|
subcircuit_id: external_exports.string().optional()
|
|
@@ -43561,11 +43561,11 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43561
43561
|
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
43562
43562
|
schematic_component_id: external_exports.string().optional(),
|
|
43563
43563
|
schematic_symbol_id: external_exports.string().optional(),
|
|
43564
|
-
x1:
|
|
43565
|
-
y1:
|
|
43566
|
-
x2:
|
|
43567
|
-
y2:
|
|
43568
|
-
stroke_width:
|
|
43564
|
+
x1: distance2,
|
|
43565
|
+
y1: distance2,
|
|
43566
|
+
x2: distance2,
|
|
43567
|
+
y2: distance2,
|
|
43568
|
+
stroke_width: distance2.nullable().optional(),
|
|
43569
43569
|
color: external_exports.string().default("#000000"),
|
|
43570
43570
|
is_dashed: external_exports.boolean().default(false),
|
|
43571
43571
|
subcircuit_id: external_exports.string().optional()
|
|
@@ -43577,10 +43577,10 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43577
43577
|
schematic_component_id: external_exports.string().optional(),
|
|
43578
43578
|
schematic_symbol_id: external_exports.string().optional(),
|
|
43579
43579
|
center: point,
|
|
43580
|
-
width:
|
|
43581
|
-
height:
|
|
43580
|
+
width: distance2,
|
|
43581
|
+
height: distance2,
|
|
43582
43582
|
rotation: rotation.default(0),
|
|
43583
|
-
stroke_width:
|
|
43583
|
+
stroke_width: distance2.nullable().optional(),
|
|
43584
43584
|
color: external_exports.string().default("#000000"),
|
|
43585
43585
|
is_filled: external_exports.boolean().default(false),
|
|
43586
43586
|
fill_color: external_exports.string().optional(),
|
|
@@ -43594,8 +43594,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43594
43594
|
schematic_component_id: external_exports.string().optional(),
|
|
43595
43595
|
schematic_symbol_id: external_exports.string().optional(),
|
|
43596
43596
|
center: point,
|
|
43597
|
-
radius:
|
|
43598
|
-
stroke_width:
|
|
43597
|
+
radius: distance2,
|
|
43598
|
+
stroke_width: distance2.nullable().optional(),
|
|
43599
43599
|
color: external_exports.string().default("#000000"),
|
|
43600
43600
|
is_filled: external_exports.boolean().default(false),
|
|
43601
43601
|
fill_color: external_exports.string().optional(),
|
|
@@ -43609,11 +43609,11 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43609
43609
|
schematic_component_id: external_exports.string().optional(),
|
|
43610
43610
|
schematic_symbol_id: external_exports.string().optional(),
|
|
43611
43611
|
center: point,
|
|
43612
|
-
radius:
|
|
43612
|
+
radius: distance2,
|
|
43613
43613
|
start_angle_degrees: rotation,
|
|
43614
43614
|
end_angle_degrees: rotation,
|
|
43615
43615
|
direction: external_exports.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
43616
|
-
stroke_width:
|
|
43616
|
+
stroke_width: distance2.nullable().optional(),
|
|
43617
43617
|
color: external_exports.string().default("#000000"),
|
|
43618
43618
|
is_dashed: external_exports.boolean().default(false),
|
|
43619
43619
|
subcircuit_id: external_exports.string().optional()
|
|
@@ -43660,8 +43660,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43660
43660
|
text: external_exports.string(),
|
|
43661
43661
|
font_size: external_exports.number().default(0.18),
|
|
43662
43662
|
position: external_exports.object({
|
|
43663
|
-
x:
|
|
43664
|
-
y:
|
|
43663
|
+
x: distance2,
|
|
43664
|
+
y: distance2
|
|
43665
43665
|
}),
|
|
43666
43666
|
rotation: external_exports.number().default(0),
|
|
43667
43667
|
anchor: external_exports.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
@@ -43787,10 +43787,10 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43787
43787
|
type: external_exports.literal("schematic_table"),
|
|
43788
43788
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
43789
43789
|
anchor_position: point,
|
|
43790
|
-
column_widths: external_exports.array(
|
|
43791
|
-
row_heights: external_exports.array(
|
|
43792
|
-
cell_padding:
|
|
43793
|
-
border_width:
|
|
43790
|
+
column_widths: external_exports.array(distance2),
|
|
43791
|
+
row_heights: external_exports.array(distance2),
|
|
43792
|
+
cell_padding: distance2.optional(),
|
|
43793
|
+
border_width: distance2.optional(),
|
|
43794
43794
|
subcircuit_id: external_exports.string().optional(),
|
|
43795
43795
|
schematic_component_id: external_exports.string().optional(),
|
|
43796
43796
|
anchor: ninePointAnchor.optional()
|
|
@@ -43806,11 +43806,11 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43806
43806
|
end_column_index: external_exports.number(),
|
|
43807
43807
|
text: external_exports.string().optional(),
|
|
43808
43808
|
center: point,
|
|
43809
|
-
width:
|
|
43810
|
-
height:
|
|
43809
|
+
width: distance2,
|
|
43810
|
+
height: distance2,
|
|
43811
43811
|
horizontal_align: external_exports.enum(["left", "center", "right"]).optional(),
|
|
43812
43812
|
vertical_align: external_exports.enum(["top", "middle", "bottom"]).optional(),
|
|
43813
|
-
font_size:
|
|
43813
|
+
font_size: distance2.optional(),
|
|
43814
43814
|
subcircuit_id: external_exports.string().optional()
|
|
43815
43815
|
}).describe("Defines a cell within a schematic_table");
|
|
43816
43816
|
expectTypesMatch(true);
|
|
@@ -43822,8 +43822,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43822
43822
|
}).describe("Defines a schematic sheet or page that components can be placed on");
|
|
43823
43823
|
expectTypesMatch(true);
|
|
43824
43824
|
point_with_bulge = external_exports.object({
|
|
43825
|
-
x:
|
|
43826
|
-
y:
|
|
43825
|
+
x: distance2,
|
|
43826
|
+
y: distance2,
|
|
43827
43827
|
bulge: external_exports.number().optional()
|
|
43828
43828
|
});
|
|
43829
43829
|
expectTypesMatch(true);
|
|
@@ -43837,8 +43837,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43837
43837
|
});
|
|
43838
43838
|
expectTypesMatch(true);
|
|
43839
43839
|
pcb_route_hint = external_exports.object({
|
|
43840
|
-
x:
|
|
43841
|
-
y:
|
|
43840
|
+
x: distance2,
|
|
43841
|
+
y: distance2,
|
|
43842
43842
|
via: external_exports.boolean().optional(),
|
|
43843
43843
|
via_to_layer: layer_ref.optional()
|
|
43844
43844
|
});
|
|
@@ -43846,11 +43846,11 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43846
43846
|
expectTypesMatch(true);
|
|
43847
43847
|
expectTypesMatch(true);
|
|
43848
43848
|
route_hint_point = external_exports.object({
|
|
43849
|
-
x:
|
|
43850
|
-
y:
|
|
43849
|
+
x: distance2,
|
|
43850
|
+
y: distance2,
|
|
43851
43851
|
via: external_exports.boolean().optional(),
|
|
43852
43852
|
to_layer: layer_ref.optional(),
|
|
43853
|
-
trace_width:
|
|
43853
|
+
trace_width: distance2.optional()
|
|
43854
43854
|
});
|
|
43855
43855
|
expectTypesMatch(true);
|
|
43856
43856
|
pcb_component = external_exports.object({
|
|
@@ -43893,8 +43893,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43893
43893
|
pcb_component_id: external_exports.string().optional(),
|
|
43894
43894
|
hole_shape: external_exports.literal("circle"),
|
|
43895
43895
|
hole_diameter: external_exports.number(),
|
|
43896
|
-
x:
|
|
43897
|
-
y:
|
|
43896
|
+
x: distance2,
|
|
43897
|
+
y: distance2,
|
|
43898
43898
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
43899
43899
|
soldermask_margin: external_exports.number().optional()
|
|
43900
43900
|
});
|
|
@@ -43909,8 +43909,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43909
43909
|
hole_shape: external_exports.literal("rect"),
|
|
43910
43910
|
hole_width: external_exports.number(),
|
|
43911
43911
|
hole_height: external_exports.number(),
|
|
43912
|
-
x:
|
|
43913
|
-
y:
|
|
43912
|
+
x: distance2,
|
|
43913
|
+
y: distance2,
|
|
43914
43914
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
43915
43915
|
soldermask_margin: external_exports.number().optional()
|
|
43916
43916
|
});
|
|
@@ -43924,8 +43924,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43924
43924
|
pcb_component_id: external_exports.string().optional(),
|
|
43925
43925
|
hole_shape: external_exports.enum(["circle", "square"]),
|
|
43926
43926
|
hole_diameter: external_exports.number(),
|
|
43927
|
-
x:
|
|
43928
|
-
y:
|
|
43927
|
+
x: distance2,
|
|
43928
|
+
y: distance2,
|
|
43929
43929
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
43930
43930
|
soldermask_margin: external_exports.number().optional()
|
|
43931
43931
|
});
|
|
@@ -43940,8 +43940,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43940
43940
|
hole_shape: external_exports.literal("oval"),
|
|
43941
43941
|
hole_width: external_exports.number(),
|
|
43942
43942
|
hole_height: external_exports.number(),
|
|
43943
|
-
x:
|
|
43944
|
-
y:
|
|
43943
|
+
x: distance2,
|
|
43944
|
+
y: distance2,
|
|
43945
43945
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
43946
43946
|
soldermask_margin: external_exports.number().optional()
|
|
43947
43947
|
});
|
|
@@ -43956,8 +43956,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43956
43956
|
hole_shape: external_exports.literal("pill"),
|
|
43957
43957
|
hole_width: external_exports.number(),
|
|
43958
43958
|
hole_height: external_exports.number(),
|
|
43959
|
-
x:
|
|
43960
|
-
y:
|
|
43959
|
+
x: distance2,
|
|
43960
|
+
y: distance2,
|
|
43961
43961
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
43962
43962
|
soldermask_margin: external_exports.number().optional()
|
|
43963
43963
|
});
|
|
@@ -43972,8 +43972,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43972
43972
|
hole_shape: external_exports.literal("rotated_pill"),
|
|
43973
43973
|
hole_width: external_exports.number(),
|
|
43974
43974
|
hole_height: external_exports.number(),
|
|
43975
|
-
x:
|
|
43976
|
-
y:
|
|
43975
|
+
x: distance2,
|
|
43976
|
+
y: distance2,
|
|
43977
43977
|
ccw_rotation: rotation,
|
|
43978
43978
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
43979
43979
|
soldermask_margin: external_exports.number().optional()
|
|
@@ -43989,8 +43989,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
43989
43989
|
outer_diameter: external_exports.number(),
|
|
43990
43990
|
hole_diameter: external_exports.number(),
|
|
43991
43991
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
43992
|
-
x:
|
|
43993
|
-
y:
|
|
43992
|
+
x: distance2,
|
|
43993
|
+
y: distance2,
|
|
43994
43994
|
layers: external_exports.array(layer_ref),
|
|
43995
43995
|
port_hints: external_exports.array(external_exports.string()).optional(),
|
|
43996
43996
|
pcb_component_id: external_exports.string().optional(),
|
|
@@ -44008,8 +44008,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44008
44008
|
hole_width: external_exports.number(),
|
|
44009
44009
|
hole_height: external_exports.number(),
|
|
44010
44010
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
44011
|
-
x:
|
|
44012
|
-
y:
|
|
44011
|
+
x: distance2,
|
|
44012
|
+
y: distance2,
|
|
44013
44013
|
ccw_rotation: rotation,
|
|
44014
44014
|
layers: external_exports.array(layer_ref),
|
|
44015
44015
|
port_hints: external_exports.array(external_exports.string()).optional(),
|
|
@@ -44029,11 +44029,11 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44029
44029
|
rect_pad_width: external_exports.number(),
|
|
44030
44030
|
rect_pad_height: external_exports.number(),
|
|
44031
44031
|
rect_border_radius: external_exports.number().optional(),
|
|
44032
|
-
hole_offset_x:
|
|
44033
|
-
hole_offset_y:
|
|
44032
|
+
hole_offset_x: distance2.default(0),
|
|
44033
|
+
hole_offset_y: distance2.default(0),
|
|
44034
44034
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
44035
|
-
x:
|
|
44036
|
-
y:
|
|
44035
|
+
x: distance2,
|
|
44036
|
+
y: distance2,
|
|
44037
44037
|
layers: external_exports.array(layer_ref),
|
|
44038
44038
|
port_hints: external_exports.array(external_exports.string()).optional(),
|
|
44039
44039
|
pcb_component_id: external_exports.string().optional(),
|
|
@@ -44054,11 +44054,11 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44054
44054
|
rect_pad_width: external_exports.number(),
|
|
44055
44055
|
rect_pad_height: external_exports.number(),
|
|
44056
44056
|
rect_border_radius: external_exports.number().optional(),
|
|
44057
|
-
hole_offset_x:
|
|
44058
|
-
hole_offset_y:
|
|
44057
|
+
hole_offset_x: distance2.default(0),
|
|
44058
|
+
hole_offset_y: distance2.default(0),
|
|
44059
44059
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
44060
|
-
x:
|
|
44061
|
-
y:
|
|
44060
|
+
x: distance2,
|
|
44061
|
+
y: distance2,
|
|
44062
44062
|
layers: external_exports.array(layer_ref),
|
|
44063
44063
|
port_hints: external_exports.array(external_exports.string()).optional(),
|
|
44064
44064
|
pcb_component_id: external_exports.string().optional(),
|
|
@@ -44080,11 +44080,11 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44080
44080
|
rect_pad_height: external_exports.number(),
|
|
44081
44081
|
rect_border_radius: external_exports.number().optional(),
|
|
44082
44082
|
rect_ccw_rotation: rotation,
|
|
44083
|
-
hole_offset_x:
|
|
44084
|
-
hole_offset_y:
|
|
44083
|
+
hole_offset_x: distance2.default(0),
|
|
44084
|
+
hole_offset_y: distance2.default(0),
|
|
44085
44085
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
44086
|
-
x:
|
|
44087
|
-
y:
|
|
44086
|
+
x: distance2,
|
|
44087
|
+
y: distance2,
|
|
44088
44088
|
layers: external_exports.array(layer_ref),
|
|
44089
44089
|
port_hints: external_exports.array(external_exports.string()).optional(),
|
|
44090
44090
|
pcb_component_id: external_exports.string().optional(),
|
|
@@ -44102,14 +44102,14 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44102
44102
|
hole_width: external_exports.number().optional(),
|
|
44103
44103
|
hole_height: external_exports.number().optional(),
|
|
44104
44104
|
pad_outline: external_exports.array(external_exports.object({
|
|
44105
|
-
x:
|
|
44106
|
-
y:
|
|
44105
|
+
x: distance2,
|
|
44106
|
+
y: distance2
|
|
44107
44107
|
})).min(3),
|
|
44108
|
-
hole_offset_x:
|
|
44109
|
-
hole_offset_y:
|
|
44108
|
+
hole_offset_x: distance2.default(0),
|
|
44109
|
+
hole_offset_y: distance2.default(0),
|
|
44110
44110
|
is_covered_with_solder_mask: external_exports.boolean().optional(),
|
|
44111
|
-
x:
|
|
44112
|
-
y:
|
|
44111
|
+
x: distance2,
|
|
44112
|
+
y: distance2,
|
|
44113
44113
|
layers: external_exports.array(layer_ref),
|
|
44114
44114
|
port_hints: external_exports.array(external_exports.string()).optional(),
|
|
44115
44115
|
pcb_component_id: external_exports.string().optional(),
|
|
@@ -44139,8 +44139,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44139
44139
|
subcircuit_id: external_exports.string().optional(),
|
|
44140
44140
|
source_port_id: external_exports.string(),
|
|
44141
44141
|
pcb_component_id: external_exports.string().optional(),
|
|
44142
|
-
x:
|
|
44143
|
-
y:
|
|
44142
|
+
x: distance2,
|
|
44143
|
+
y: distance2,
|
|
44144
44144
|
layers: external_exports.array(layer_ref),
|
|
44145
44145
|
is_board_pinout: external_exports.boolean().optional()
|
|
44146
44146
|
}).describe("Defines a port on the PCB");
|
|
@@ -44151,8 +44151,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44151
44151
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
44152
44152
|
pcb_group_id: external_exports.string().optional(),
|
|
44153
44153
|
subcircuit_id: external_exports.string().optional(),
|
|
44154
|
-
x:
|
|
44155
|
-
y:
|
|
44154
|
+
x: distance2,
|
|
44155
|
+
y: distance2,
|
|
44156
44156
|
radius: external_exports.number(),
|
|
44157
44157
|
layer: layer_ref,
|
|
44158
44158
|
port_hints: external_exports.array(external_exports.string()).optional(),
|
|
@@ -44167,8 +44167,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44167
44167
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
44168
44168
|
pcb_group_id: external_exports.string().optional(),
|
|
44169
44169
|
subcircuit_id: external_exports.string().optional(),
|
|
44170
|
-
x:
|
|
44171
|
-
y:
|
|
44170
|
+
x: distance2,
|
|
44171
|
+
y: distance2,
|
|
44172
44172
|
width: external_exports.number(),
|
|
44173
44173
|
height: external_exports.number(),
|
|
44174
44174
|
rect_border_radius: external_exports.number().optional(),
|
|
@@ -44190,8 +44190,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44190
44190
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
44191
44191
|
pcb_group_id: external_exports.string().optional(),
|
|
44192
44192
|
subcircuit_id: external_exports.string().optional(),
|
|
44193
|
-
x:
|
|
44194
|
-
y:
|
|
44193
|
+
x: distance2,
|
|
44194
|
+
y: distance2,
|
|
44195
44195
|
width: external_exports.number(),
|
|
44196
44196
|
height: external_exports.number(),
|
|
44197
44197
|
rect_border_radius: external_exports.number().optional(),
|
|
@@ -44214,8 +44214,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44214
44214
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
44215
44215
|
pcb_group_id: external_exports.string().optional(),
|
|
44216
44216
|
subcircuit_id: external_exports.string().optional(),
|
|
44217
|
-
x:
|
|
44218
|
-
y:
|
|
44217
|
+
x: distance2,
|
|
44218
|
+
y: distance2,
|
|
44219
44219
|
width: external_exports.number(),
|
|
44220
44220
|
height: external_exports.number(),
|
|
44221
44221
|
radius: external_exports.number(),
|
|
@@ -44232,8 +44232,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44232
44232
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
44233
44233
|
pcb_group_id: external_exports.string().optional(),
|
|
44234
44234
|
subcircuit_id: external_exports.string().optional(),
|
|
44235
|
-
x:
|
|
44236
|
-
y:
|
|
44235
|
+
x: distance2,
|
|
44236
|
+
y: distance2,
|
|
44237
44237
|
width: external_exports.number(),
|
|
44238
44238
|
height: external_exports.number(),
|
|
44239
44239
|
radius: external_exports.number(),
|
|
@@ -44279,8 +44279,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44279
44279
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
44280
44280
|
pcb_group_id: external_exports.string().optional(),
|
|
44281
44281
|
subcircuit_id: external_exports.string().optional(),
|
|
44282
|
-
x:
|
|
44283
|
-
y:
|
|
44282
|
+
x: distance2,
|
|
44283
|
+
y: distance2,
|
|
44284
44284
|
radius: external_exports.number(),
|
|
44285
44285
|
layer: layer_ref,
|
|
44286
44286
|
pcb_component_id: external_exports.string().optional(),
|
|
@@ -44292,8 +44292,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44292
44292
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
44293
44293
|
pcb_group_id: external_exports.string().optional(),
|
|
44294
44294
|
subcircuit_id: external_exports.string().optional(),
|
|
44295
|
-
x:
|
|
44296
|
-
y:
|
|
44295
|
+
x: distance2,
|
|
44296
|
+
y: distance2,
|
|
44297
44297
|
width: external_exports.number(),
|
|
44298
44298
|
height: external_exports.number(),
|
|
44299
44299
|
layer: layer_ref,
|
|
@@ -44306,8 +44306,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44306
44306
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
44307
44307
|
pcb_group_id: external_exports.string().optional(),
|
|
44308
44308
|
subcircuit_id: external_exports.string().optional(),
|
|
44309
|
-
x:
|
|
44310
|
-
y:
|
|
44309
|
+
x: distance2,
|
|
44310
|
+
y: distance2,
|
|
44311
44311
|
width: external_exports.number(),
|
|
44312
44312
|
height: external_exports.number(),
|
|
44313
44313
|
radius: external_exports.number(),
|
|
@@ -44321,11 +44321,11 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44321
44321
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
44322
44322
|
pcb_group_id: external_exports.string().optional(),
|
|
44323
44323
|
subcircuit_id: external_exports.string().optional(),
|
|
44324
|
-
x:
|
|
44325
|
-
y:
|
|
44324
|
+
x: distance2,
|
|
44325
|
+
y: distance2,
|
|
44326
44326
|
width: external_exports.number(),
|
|
44327
44327
|
height: external_exports.number(),
|
|
44328
|
-
ccw_rotation:
|
|
44328
|
+
ccw_rotation: distance2,
|
|
44329
44329
|
layer: layer_ref,
|
|
44330
44330
|
pcb_component_id: external_exports.string().optional(),
|
|
44331
44331
|
pcb_smtpad_id: external_exports.string().optional()
|
|
@@ -44336,8 +44336,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44336
44336
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
44337
44337
|
pcb_group_id: external_exports.string().optional(),
|
|
44338
44338
|
subcircuit_id: external_exports.string().optional(),
|
|
44339
|
-
x:
|
|
44340
|
-
y:
|
|
44339
|
+
x: distance2,
|
|
44340
|
+
y: distance2,
|
|
44341
44341
|
width: external_exports.number(),
|
|
44342
44342
|
height: external_exports.number(),
|
|
44343
44343
|
layer: layer_ref,
|
|
@@ -44372,9 +44372,9 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44372
44372
|
expectTypesMatch(true);
|
|
44373
44373
|
pcb_trace_route_point_wire = external_exports.object({
|
|
44374
44374
|
route_type: external_exports.literal("wire"),
|
|
44375
|
-
x:
|
|
44376
|
-
y:
|
|
44377
|
-
width:
|
|
44375
|
+
x: distance2,
|
|
44376
|
+
y: distance2,
|
|
44377
|
+
width: distance2,
|
|
44378
44378
|
copper_pour_id: external_exports.string().optional(),
|
|
44379
44379
|
is_inside_copper_pour: external_exports.boolean().optional(),
|
|
44380
44380
|
start_pcb_port_id: external_exports.string().optional(),
|
|
@@ -44383,12 +44383,12 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44383
44383
|
});
|
|
44384
44384
|
pcb_trace_route_point_via = external_exports.object({
|
|
44385
44385
|
route_type: external_exports.literal("via"),
|
|
44386
|
-
x:
|
|
44387
|
-
y:
|
|
44386
|
+
x: distance2,
|
|
44387
|
+
y: distance2,
|
|
44388
44388
|
copper_pour_id: external_exports.string().optional(),
|
|
44389
44389
|
is_inside_copper_pour: external_exports.boolean().optional(),
|
|
44390
|
-
hole_diameter:
|
|
44391
|
-
outer_diameter:
|
|
44390
|
+
hole_diameter: distance2.optional(),
|
|
44391
|
+
outer_diameter: distance2.optional(),
|
|
44392
44392
|
from_layer: external_exports.string(),
|
|
44393
44393
|
to_layer: external_exports.string()
|
|
44394
44394
|
});
|
|
@@ -44465,10 +44465,10 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44465
44465
|
pcb_group_id: external_exports.string().optional(),
|
|
44466
44466
|
subcircuit_id: external_exports.string().optional(),
|
|
44467
44467
|
subcircuit_connectivity_map_key: external_exports.string().optional(),
|
|
44468
|
-
x:
|
|
44469
|
-
y:
|
|
44470
|
-
outer_diameter:
|
|
44471
|
-
hole_diameter:
|
|
44468
|
+
x: distance2,
|
|
44469
|
+
y: distance2,
|
|
44470
|
+
outer_diameter: distance2.default("0.6mm"),
|
|
44471
|
+
hole_diameter: distance2.default("0.25mm"),
|
|
44472
44472
|
from_layer: layer_ref.optional(),
|
|
44473
44473
|
to_layer: layer_ref.optional(),
|
|
44474
44474
|
layers: external_exports.array(layer_ref),
|
|
@@ -44541,11 +44541,11 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44541
44541
|
pcb_component_id: external_exports.string(),
|
|
44542
44542
|
pcb_group_id: external_exports.string().optional(),
|
|
44543
44543
|
subcircuit_id: external_exports.string().optional(),
|
|
44544
|
-
stroke_width:
|
|
44545
|
-
x1:
|
|
44546
|
-
y1:
|
|
44547
|
-
x2:
|
|
44548
|
-
y2:
|
|
44544
|
+
stroke_width: distance2.default("0.1mm"),
|
|
44545
|
+
x1: distance2,
|
|
44546
|
+
y1: distance2,
|
|
44547
|
+
x2: distance2,
|
|
44548
|
+
y2: distance2,
|
|
44549
44549
|
layer: visible_layer
|
|
44550
44550
|
}).describe("Defines a silkscreen line on the PCB");
|
|
44551
44551
|
expectTypesMatch(true);
|
|
@@ -44566,7 +44566,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44566
44566
|
pcb_group_id: external_exports.string().optional(),
|
|
44567
44567
|
subcircuit_id: external_exports.string().optional(),
|
|
44568
44568
|
font: external_exports.literal("tscircuit2024").default("tscircuit2024"),
|
|
44569
|
-
font_size:
|
|
44569
|
+
font_size: distance2.default("0.2mm"),
|
|
44570
44570
|
pcb_component_id: external_exports.string(),
|
|
44571
44571
|
text: external_exports.string(),
|
|
44572
44572
|
is_knockout: external_exports.boolean().default(false).optional(),
|
|
@@ -44594,7 +44594,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44594
44594
|
pcb_group_id: external_exports.string().optional(),
|
|
44595
44595
|
subcircuit_id: external_exports.string().optional(),
|
|
44596
44596
|
font: external_exports.literal("tscircuit2024").default("tscircuit2024"),
|
|
44597
|
-
font_size:
|
|
44597
|
+
font_size: distance2.default("0.2mm"),
|
|
44598
44598
|
pcb_component_id: external_exports.string(),
|
|
44599
44599
|
text: external_exports.string(),
|
|
44600
44600
|
is_knockout: external_exports.boolean().default(false).optional(),
|
|
@@ -44653,8 +44653,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44653
44653
|
pcb_group_id: external_exports.string().optional(),
|
|
44654
44654
|
subcircuit_id: external_exports.string().optional(),
|
|
44655
44655
|
center: point,
|
|
44656
|
-
radius_x:
|
|
44657
|
-
radius_y:
|
|
44656
|
+
radius_x: distance2,
|
|
44657
|
+
radius_y: distance2,
|
|
44658
44658
|
layer: visible_layer,
|
|
44659
44659
|
ccw_rotation: rotation.optional()
|
|
44660
44660
|
}).describe("Defines a silkscreen oval on the PCB");
|
|
@@ -44678,7 +44678,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44678
44678
|
subcircuit_id: external_exports.string().optional(),
|
|
44679
44679
|
pcb_group_id: external_exports.string().optional(),
|
|
44680
44680
|
font: external_exports.literal("tscircuit2024").default("tscircuit2024"),
|
|
44681
|
-
font_size:
|
|
44681
|
+
font_size: distance2.default("1mm"),
|
|
44682
44682
|
pcb_component_id: external_exports.string(),
|
|
44683
44683
|
text: external_exports.string(),
|
|
44684
44684
|
layer: visible_layer,
|
|
@@ -44747,7 +44747,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44747
44747
|
subcircuit_id: external_exports.string().optional(),
|
|
44748
44748
|
name: external_exports.string().optional(),
|
|
44749
44749
|
font: external_exports.literal("tscircuit2024").default("tscircuit2024"),
|
|
44750
|
-
font_size:
|
|
44750
|
+
font_size: distance2.default("1mm"),
|
|
44751
44751
|
text: external_exports.string().optional(),
|
|
44752
44752
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
44753
44753
|
anchor_alignment: external_exports.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
@@ -44794,11 +44794,11 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44794
44794
|
subcircuit_id: external_exports.string().optional(),
|
|
44795
44795
|
name: external_exports.string().optional(),
|
|
44796
44796
|
text: external_exports.string().optional(),
|
|
44797
|
-
x1:
|
|
44798
|
-
y1:
|
|
44799
|
-
x2:
|
|
44800
|
-
y2:
|
|
44801
|
-
stroke_width:
|
|
44797
|
+
x1: distance2,
|
|
44798
|
+
y1: distance2,
|
|
44799
|
+
x2: distance2,
|
|
44800
|
+
y2: distance2,
|
|
44801
|
+
stroke_width: distance2.default("0.1mm"),
|
|
44802
44802
|
color: external_exports.string().optional(),
|
|
44803
44803
|
is_dashed: external_exports.boolean().optional()
|
|
44804
44804
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
@@ -44848,8 +44848,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44848
44848
|
pcb_group_id: external_exports.string().optional(),
|
|
44849
44849
|
subcircuit_id: external_exports.string().optional(),
|
|
44850
44850
|
center: point,
|
|
44851
|
-
width:
|
|
44852
|
-
height:
|
|
44851
|
+
width: distance2,
|
|
44852
|
+
height: distance2,
|
|
44853
44853
|
pcb_keepout_id: external_exports.string(),
|
|
44854
44854
|
layers: external_exports.array(external_exports.string()),
|
|
44855
44855
|
description: external_exports.string().optional()
|
|
@@ -44859,7 +44859,7 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
44859
44859
|
pcb_group_id: external_exports.string().optional(),
|
|
44860
44860
|
subcircuit_id: external_exports.string().optional(),
|
|
44861
44861
|
center: point,
|
|
44862
|
-
radius:
|
|
44862
|
+
radius: distance2,
|
|
44863
44863
|
pcb_keepout_id: external_exports.string(),
|
|
44864
44864
|
layers: external_exports.array(external_exports.string()),
|
|
44865
44865
|
description: external_exports.string().optional()
|
|
@@ -45008,8 +45008,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
45008
45008
|
source_trace_id: external_exports.string().optional(),
|
|
45009
45009
|
source_port_id: external_exports.string().optional(),
|
|
45010
45010
|
source_net_id: external_exports.string().optional(),
|
|
45011
|
-
x:
|
|
45012
|
-
y:
|
|
45011
|
+
x: distance2,
|
|
45012
|
+
y: distance2
|
|
45013
45013
|
}).describe("Defines a routing target within a pcb_group for a source_trace or source_net");
|
|
45014
45014
|
expectTypesMatch(true);
|
|
45015
45015
|
pcb_ground_plane = external_exports.object({
|
|
@@ -45037,9 +45037,9 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
45037
45037
|
pcb_ground_plane_id: external_exports.string(),
|
|
45038
45038
|
shape: external_exports.string(),
|
|
45039
45039
|
spoke_count: external_exports.number(),
|
|
45040
|
-
spoke_thickness:
|
|
45041
|
-
spoke_inner_diameter:
|
|
45042
|
-
spoke_outer_diameter:
|
|
45040
|
+
spoke_thickness: distance2,
|
|
45041
|
+
spoke_inner_diameter: distance2,
|
|
45042
|
+
spoke_outer_diameter: distance2,
|
|
45043
45043
|
pcb_plated_hole_id: external_exports.string().optional(),
|
|
45044
45044
|
subcircuit_id: external_exports.string().optional()
|
|
45045
45045
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
@@ -45121,8 +45121,8 @@ var init_chunk_SK323GHE = __esm(() => {
|
|
|
45121
45121
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
45122
45122
|
error_type: external_exports.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
45123
45123
|
pcb_via_ids: external_exports.array(external_exports.string()).min(2),
|
|
45124
|
-
minimum_clearance:
|
|
45125
|
-
actual_clearance:
|
|
45124
|
+
minimum_clearance: distance2.optional(),
|
|
45125
|
+
actual_clearance: distance2.optional(),
|
|
45126
45126
|
pcb_center: external_exports.object({
|
|
45127
45127
|
x: external_exports.number().optional(),
|
|
45128
45128
|
y: external_exports.number().optional()
|
|
@@ -49871,7 +49871,7 @@ function createSvgObjectsFromPcbCopperText(pcbCopperText, ctx) {
|
|
|
49871
49871
|
anchor_position.x,
|
|
49872
49872
|
anchor_position.y
|
|
49873
49873
|
]);
|
|
49874
|
-
const fontSizeNum =
|
|
49874
|
+
const fontSizeNum = distance2.parse(font_size) ?? 0.2;
|
|
49875
49875
|
const scaleFactor = Math.abs(transform2.a);
|
|
49876
49876
|
const copperColor = layerNameToColor(layerName, colorMap2);
|
|
49877
49877
|
const isBottom = layerName === "bottom";
|
|
@@ -52939,8 +52939,8 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
52939
52939
|
for (const circuitJsonElm of circuitJson) {
|
|
52940
52940
|
if (circuitJsonElm.type === "pcb_panel") {
|
|
52941
52941
|
const panel = circuitJsonElm;
|
|
52942
|
-
const width =
|
|
52943
|
-
const height =
|
|
52942
|
+
const width = distance2.parse(panel.width);
|
|
52943
|
+
const height = distance2.parse(panel.height);
|
|
52944
52944
|
if (width === undefined || height === undefined) {
|
|
52945
52945
|
continue;
|
|
52946
52946
|
}
|
|
@@ -52971,7 +52971,7 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
52971
52971
|
height: pad.height
|
|
52972
52972
|
});
|
|
52973
52973
|
} else if (pad.shape === "circle") {
|
|
52974
|
-
const radius =
|
|
52974
|
+
const radius = distance2.parse(pad.radius);
|
|
52975
52975
|
if (radius !== undefined) {
|
|
52976
52976
|
updateBounds({
|
|
52977
52977
|
center: { x: pad.x, y: pad.y },
|
|
@@ -53101,7 +53101,7 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
53101
53101
|
height: cutout.height
|
|
53102
53102
|
});
|
|
53103
53103
|
} else if (cutout.shape === "circle") {
|
|
53104
|
-
const radius =
|
|
53104
|
+
const radius = distance2.parse(cutout.radius);
|
|
53105
53105
|
if (radius !== undefined) {
|
|
53106
53106
|
updateBounds({
|
|
53107
53107
|
center: cutout.center,
|
|
@@ -53126,7 +53126,7 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
53126
53126
|
height: keepout.height
|
|
53127
53127
|
});
|
|
53128
53128
|
} else if (keepout.shape === "circle") {
|
|
53129
|
-
const radius = typeof keepout.radius === "number" ? keepout.radius :
|
|
53129
|
+
const radius = typeof keepout.radius === "number" ? keepout.radius : distance2.parse(keepout.radius) ?? 0;
|
|
53130
53130
|
if (radius > 0) {
|
|
53131
53131
|
updateBounds({
|
|
53132
53132
|
center: keepout.center,
|
|
@@ -53174,12 +53174,12 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
53174
53174
|
}) {
|
|
53175
53175
|
if (!center)
|
|
53176
53176
|
return;
|
|
53177
|
-
const centerX =
|
|
53178
|
-
const centerY =
|
|
53177
|
+
const centerX = distance2.parse(center.x);
|
|
53178
|
+
const centerY = distance2.parse(center.y);
|
|
53179
53179
|
if (centerX === undefined || centerY === undefined)
|
|
53180
53180
|
return;
|
|
53181
|
-
const numericWidth =
|
|
53182
|
-
const numericHeight =
|
|
53181
|
+
const numericWidth = distance2.parse(width) ?? 0;
|
|
53182
|
+
const numericHeight = distance2.parse(height) ?? 0;
|
|
53183
53183
|
const halfWidth = numericWidth / 2;
|
|
53184
53184
|
const halfHeight = numericHeight / 2;
|
|
53185
53185
|
minX = Math.min(minX, centerX - halfWidth);
|
|
@@ -53195,12 +53195,12 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
53195
53195
|
}) {
|
|
53196
53196
|
if (!center)
|
|
53197
53197
|
return;
|
|
53198
|
-
const centerX =
|
|
53199
|
-
const centerY =
|
|
53198
|
+
const centerX = distance2.parse(center.x);
|
|
53199
|
+
const centerY = distance2.parse(center.y);
|
|
53200
53200
|
if (centerX === undefined || centerY === undefined)
|
|
53201
53201
|
return;
|
|
53202
|
-
const numericWidth =
|
|
53203
|
-
const numericHeight =
|
|
53202
|
+
const numericWidth = distance2.parse(width) ?? 0;
|
|
53203
|
+
const numericHeight = distance2.parse(height) ?? 0;
|
|
53204
53204
|
const halfWidth = numericWidth / 2;
|
|
53205
53205
|
const halfHeight = numericHeight / 2;
|
|
53206
53206
|
boardMinX = Math.min(boardMinX, centerX - halfWidth);
|
|
@@ -53213,8 +53213,8 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
53213
53213
|
function updateBoundsToIncludeOutline(outline) {
|
|
53214
53214
|
let updated = false;
|
|
53215
53215
|
for (const point2 of outline) {
|
|
53216
|
-
const x3 =
|
|
53217
|
-
const y =
|
|
53216
|
+
const x3 = distance2.parse(point2.x);
|
|
53217
|
+
const y = distance2.parse(point2.y);
|
|
53218
53218
|
if (x3 === undefined || y === undefined)
|
|
53219
53219
|
continue;
|
|
53220
53220
|
minX = Math.min(minX, x3);
|
|
@@ -53230,8 +53230,8 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
53230
53230
|
function updateBoardBoundsToIncludeOutline(outline) {
|
|
53231
53231
|
let updated = false;
|
|
53232
53232
|
for (const point2 of outline) {
|
|
53233
|
-
const x3 =
|
|
53234
|
-
const y =
|
|
53233
|
+
const x3 = distance2.parse(point2.x);
|
|
53234
|
+
const y = distance2.parse(point2.y);
|
|
53235
53235
|
if (x3 === undefined || y === undefined)
|
|
53236
53236
|
continue;
|
|
53237
53237
|
boardMinX = Math.min(boardMinX, x3);
|
|
@@ -53248,8 +53248,8 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
53248
53248
|
function updateTraceBounds(route) {
|
|
53249
53249
|
let updated = false;
|
|
53250
53250
|
for (const point2 of route) {
|
|
53251
|
-
const x3 =
|
|
53252
|
-
const y =
|
|
53251
|
+
const x3 = distance2.parse(point2?.x);
|
|
53252
|
+
const y = distance2.parse(point2?.y);
|
|
53253
53253
|
if (x3 === undefined || y === undefined)
|
|
53254
53254
|
continue;
|
|
53255
53255
|
minX = Math.min(minX, x3);
|
|
@@ -53274,7 +53274,7 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
53274
53274
|
height: item.height
|
|
53275
53275
|
});
|
|
53276
53276
|
} else if (item.type === "pcb_silkscreen_circle") {
|
|
53277
|
-
const radius =
|
|
53277
|
+
const radius = distance2.parse(item.radius);
|
|
53278
53278
|
if (radius !== undefined) {
|
|
53279
53279
|
updateBounds({
|
|
53280
53280
|
center: item.center,
|
|
@@ -53286,8 +53286,8 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
53286
53286
|
updateBounds({ center: { x: item.x1, y: item.y1 }, width: 0, height: 0 });
|
|
53287
53287
|
updateBounds({ center: { x: item.x2, y: item.y2 }, width: 0, height: 0 });
|
|
53288
53288
|
} else if (item.type === "pcb_silkscreen_oval") {
|
|
53289
|
-
const radiusX =
|
|
53290
|
-
const radiusY =
|
|
53289
|
+
const radiusX = distance2.parse(item.radius_x);
|
|
53290
|
+
const radiusY = distance2.parse(item.radius_y);
|
|
53291
53291
|
if (radiusX !== undefined && radiusY !== undefined) {
|
|
53292
53292
|
updateBounds({
|
|
53293
53293
|
center: item.center,
|
|
@@ -53304,7 +53304,7 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
53304
53304
|
height: cutout.height
|
|
53305
53305
|
});
|
|
53306
53306
|
} else if (cutout.shape === "circle") {
|
|
53307
|
-
const radius =
|
|
53307
|
+
const radius = distance2.parse(cutout.radius);
|
|
53308
53308
|
if (radius !== undefined) {
|
|
53309
53309
|
updateBounds({
|
|
53310
53310
|
center: cutout.center,
|
|
@@ -53326,12 +53326,12 @@ function getPcbBoundsFromCircuitJson(circuitJson) {
|
|
|
53326
53326
|
function rectBounds(center, width, height) {
|
|
53327
53327
|
if (!center || width === undefined || height === undefined)
|
|
53328
53328
|
return;
|
|
53329
|
-
const cx2 =
|
|
53330
|
-
const cy2 =
|
|
53329
|
+
const cx2 = distance2.parse(center.x);
|
|
53330
|
+
const cy2 = distance2.parse(center.y);
|
|
53331
53331
|
if (cx2 === undefined || cy2 === undefined)
|
|
53332
53332
|
return;
|
|
53333
|
-
const numericWidth =
|
|
53334
|
-
const numericHeight =
|
|
53333
|
+
const numericWidth = distance2.parse(width);
|
|
53334
|
+
const numericHeight = distance2.parse(height);
|
|
53335
53335
|
if (numericWidth === undefined || numericHeight === undefined)
|
|
53336
53336
|
return;
|
|
53337
53337
|
const halfW = numericWidth / 2;
|
|
@@ -53351,8 +53351,8 @@ function getOutlineBounds(outline) {
|
|
|
53351
53351
|
let maxX = Number.NEGATIVE_INFINITY;
|
|
53352
53352
|
let maxY = Number.NEGATIVE_INFINITY;
|
|
53353
53353
|
for (const pt2 of outline) {
|
|
53354
|
-
const x3 =
|
|
53355
|
-
const y =
|
|
53354
|
+
const x3 = distance2.parse(pt2.x);
|
|
53355
|
+
const y = distance2.parse(pt2.y);
|
|
53356
53356
|
if (x3 === undefined || y === undefined)
|
|
53357
53357
|
continue;
|
|
53358
53358
|
minX = Math.min(minX, x3);
|
|
@@ -57640,8 +57640,8 @@ function convertCircuitJsonToSolderPasteMask(circuitJson, options) {
|
|
|
57640
57640
|
}
|
|
57641
57641
|
} else if (item.type === "pcb_panel") {
|
|
57642
57642
|
const panel = item;
|
|
57643
|
-
const width =
|
|
57644
|
-
const height =
|
|
57643
|
+
const width = distance2.parse(panel.width);
|
|
57644
|
+
const height = distance2.parse(panel.height);
|
|
57645
57645
|
if (width !== undefined && height !== undefined) {
|
|
57646
57646
|
const center = panel.center ?? { x: width / 2, y: height / 2 };
|
|
57647
57647
|
updateBounds(center, width, height);
|
|
@@ -100768,7 +100768,7 @@ var import_perfect_cli = __toESM2(require_dist2(), 1);
|
|
|
100768
100768
|
// lib/getVersion.ts
|
|
100769
100769
|
import { createRequire as createRequire2 } from "node:module";
|
|
100770
100770
|
// package.json
|
|
100771
|
-
var version = "0.1.
|
|
100771
|
+
var version = "0.1.1534";
|
|
100772
100772
|
var package_default = {
|
|
100773
100773
|
name: "@tscircuit/cli",
|
|
100774
100774
|
version,
|
|
@@ -100806,6 +100806,7 @@ var package_default = {
|
|
|
100806
100806
|
"bun-match-svg": "^0.0.12",
|
|
100807
100807
|
chokidar: "4.0.1",
|
|
100808
100808
|
"circuit-json": "^0.0.437",
|
|
100809
|
+
"circuit-json-to-3d-png": "^0.0.6",
|
|
100809
100810
|
"circuit-json-to-bom-csv": "^0.0.7",
|
|
100810
100811
|
"circuit-json-to-gerber": "^0.0.51",
|
|
100811
100812
|
"circuit-json-to-kicad": "0.0.153",
|
|
@@ -112137,6 +112138,190 @@ import path33 from "node:path";
|
|
|
112137
112138
|
import fs29 from "node:fs";
|
|
112138
112139
|
import path32 from "node:path";
|
|
112139
112140
|
|
|
112141
|
+
// node_modules/circuit-json-to-3d-png/dist/index.js
|
|
112142
|
+
function normalizeDir(dir) {
|
|
112143
|
+
const len = Math.sqrt(dir[0] ** 2 + dir[1] ** 2 + dir[2] ** 2);
|
|
112144
|
+
if (len === 0)
|
|
112145
|
+
return [0, 1, 0];
|
|
112146
|
+
return [dir[0] / len, dir[1] / len, dir[2] / len];
|
|
112147
|
+
}
|
|
112148
|
+
function distance(a, b) {
|
|
112149
|
+
return Math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2 + (a[2] - b[2]) ** 2);
|
|
112150
|
+
}
|
|
112151
|
+
function repositionCamera(cam, dir, distOverride) {
|
|
112152
|
+
const dist = distOverride ?? distance(cam.camPos, cam.lookAt);
|
|
112153
|
+
const [nx, ny, nz] = normalizeDir(dir);
|
|
112154
|
+
return {
|
|
112155
|
+
camPos: [
|
|
112156
|
+
cam.lookAt[0] + nx * dist,
|
|
112157
|
+
cam.lookAt[1] + ny * dist,
|
|
112158
|
+
cam.lookAt[2] + nz * dist
|
|
112159
|
+
],
|
|
112160
|
+
lookAt: cam.lookAt,
|
|
112161
|
+
fov: cam.fov
|
|
112162
|
+
};
|
|
112163
|
+
}
|
|
112164
|
+
var CAMERA_PRESETS = {
|
|
112165
|
+
"top-down": (cam) => repositionCamera(cam, [0.00000001, 1, -0.001]),
|
|
112166
|
+
"top-down-ortho": (cam) => {
|
|
112167
|
+
const desiredFov = 3;
|
|
112168
|
+
const dir = [0.00000001, 1, -0.001];
|
|
112169
|
+
const origDist = distance(cam.camPos, cam.lookAt);
|
|
112170
|
+
const origFovRad = Math.max(cam.fov * Math.PI / 180, 0.01);
|
|
112171
|
+
const desiredFovRad = Math.max(desiredFov * Math.PI / 180, 0.01);
|
|
112172
|
+
const tanOrig = Math.tan(origFovRad / 2);
|
|
112173
|
+
const tanDesired = Math.max(Math.tan(desiredFovRad / 2), 0.0001);
|
|
112174
|
+
const distScale = Number.isFinite(tanOrig / tanDesired) && tanOrig > 0 ? tanOrig / tanDesired : 1;
|
|
112175
|
+
const newDist = origDist * distScale;
|
|
112176
|
+
const repositioned = repositionCamera(cam, dir, newDist);
|
|
112177
|
+
return { ...repositioned, fov: desiredFov };
|
|
112178
|
+
},
|
|
112179
|
+
"top-left-corner": (cam) => repositionCamera(cam, [0.7, 1.2, -0.8]),
|
|
112180
|
+
"top-left": (cam) => repositionCamera(cam, [1, 1.2, 0]),
|
|
112181
|
+
"top-right-corner": (cam) => repositionCamera(cam, [-0.7, 1.2, -0.8]),
|
|
112182
|
+
"top-right": (cam) => repositionCamera(cam, [-1, 1.2, 0]),
|
|
112183
|
+
"left-sideview": (cam) => repositionCamera(cam, [1, 0.05, 0]),
|
|
112184
|
+
"right-sideview": (cam) => repositionCamera(cam, [-1, 0.05, 0]),
|
|
112185
|
+
front: (cam) => repositionCamera(cam, [0, 0.05, -1]),
|
|
112186
|
+
"top-center-angled": (cam) => repositionCamera(cam, [0, 1, -1])
|
|
112187
|
+
};
|
|
112188
|
+
var CAMERA_PRESET_NAMES = Object.keys(CAMERA_PRESETS);
|
|
112189
|
+
function applyCameraPreset(preset, cam) {
|
|
112190
|
+
if (!(preset in CAMERA_PRESETS)) {
|
|
112191
|
+
throw new Error(`Unknown camera preset "${preset}". Valid presets: ${CAMERA_PRESET_NAMES.join(", ")}`);
|
|
112192
|
+
}
|
|
112193
|
+
return CAMERA_PRESETS[preset](cam);
|
|
112194
|
+
}
|
|
112195
|
+
var viewToArrayBuffer2 = (view) => {
|
|
112196
|
+
const copy = new Uint8Array(view.byteLength);
|
|
112197
|
+
copy.set(new Uint8Array(view.buffer, view.byteOffset, view.byteLength));
|
|
112198
|
+
return copy.buffer;
|
|
112199
|
+
};
|
|
112200
|
+
var normalizeToArrayBuffer = async (value) => {
|
|
112201
|
+
if (value instanceof ArrayBuffer) {
|
|
112202
|
+
return value;
|
|
112203
|
+
}
|
|
112204
|
+
if (ArrayBuffer.isView(value)) {
|
|
112205
|
+
return viewToArrayBuffer2(value);
|
|
112206
|
+
}
|
|
112207
|
+
if ("arrayBuffer" in value && typeof value.arrayBuffer === "function") {
|
|
112208
|
+
const result = value.arrayBuffer();
|
|
112209
|
+
return result instanceof Promise ? await result : result;
|
|
112210
|
+
}
|
|
112211
|
+
throw new Error("Expected ArrayBuffer, ArrayBufferView, or Buffer-compatible object");
|
|
112212
|
+
};
|
|
112213
|
+
var normalizeToUint8Array2 = (value) => {
|
|
112214
|
+
if (value instanceof Uint8Array) {
|
|
112215
|
+
return value;
|
|
112216
|
+
}
|
|
112217
|
+
if (value instanceof ArrayBuffer) {
|
|
112218
|
+
return new Uint8Array(value);
|
|
112219
|
+
}
|
|
112220
|
+
if (ArrayBuffer.isView(value)) {
|
|
112221
|
+
return new Uint8Array(viewToArrayBuffer2(value));
|
|
112222
|
+
}
|
|
112223
|
+
throw new Error("Expected Uint8Array, ArrayBuffer, or ArrayBufferView");
|
|
112224
|
+
};
|
|
112225
|
+
var circuitJsonToGltfModulePromise = null;
|
|
112226
|
+
var poppyGlModulePromise = null;
|
|
112227
|
+
var loadCircuitJsonToGltf = async () => {
|
|
112228
|
+
circuitJsonToGltfModulePromise ??= import("circuit-json-to-gltf");
|
|
112229
|
+
return circuitJsonToGltfModulePromise;
|
|
112230
|
+
};
|
|
112231
|
+
var loadPoppyGl = async () => {
|
|
112232
|
+
poppyGlModulePromise ??= import("poppygl");
|
|
112233
|
+
return poppyGlModulePromise;
|
|
112234
|
+
};
|
|
112235
|
+
var modelUrlKeys = [
|
|
112236
|
+
"model_glb_url",
|
|
112237
|
+
"glb_model_url",
|
|
112238
|
+
"model_stl_url",
|
|
112239
|
+
"stl_model_url",
|
|
112240
|
+
"model_obj_url",
|
|
112241
|
+
"obj_model_url",
|
|
112242
|
+
"model_gltf_url",
|
|
112243
|
+
"gltf_model_url",
|
|
112244
|
+
"model_step_url",
|
|
112245
|
+
"step_model_url"
|
|
112246
|
+
];
|
|
112247
|
+
var hasUriScheme = (value) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(value) && !/^[a-zA-Z]:[\\/]/.test(value);
|
|
112248
|
+
var isWindowsAbsolutePath = (value) => /^[a-zA-Z]:[\\/]/.test(value);
|
|
112249
|
+
var getDefaultBaseDir = () => {
|
|
112250
|
+
if (typeof process !== "undefined" && process && typeof process.cwd === "function") {
|
|
112251
|
+
return process.cwd();
|
|
112252
|
+
}
|
|
112253
|
+
return;
|
|
112254
|
+
};
|
|
112255
|
+
var toFileUrl = (value) => {
|
|
112256
|
+
const normalizedPath = value.replace(/\\/g, "/");
|
|
112257
|
+
const pathname = isWindowsAbsolutePath(value) ? `/${normalizedPath}` : normalizedPath;
|
|
112258
|
+
return new URL(`file://${encodeURI(pathname)}`).href;
|
|
112259
|
+
};
|
|
112260
|
+
var toDirectoryUrl = (value) => {
|
|
112261
|
+
if (hasUriScheme(value)) {
|
|
112262
|
+
return value.endsWith("/") ? value : `${value}/`;
|
|
112263
|
+
}
|
|
112264
|
+
const directoryPath = value.endsWith("/") || value.endsWith("\\") ? value : `${value}/`;
|
|
112265
|
+
return toFileUrl(directoryPath);
|
|
112266
|
+
};
|
|
112267
|
+
var normalizeModelUrls = (circuitJson, options = {}) => {
|
|
112268
|
+
const baseDir = options.modelPathBaseDir ?? getDefaultBaseDir();
|
|
112269
|
+
const hasModelPathBaseDir = options.modelPathBaseDir != null;
|
|
112270
|
+
const preserveRelativeModelUrls = Boolean(options.projectBaseUrl);
|
|
112271
|
+
return circuitJson.map((element) => {
|
|
112272
|
+
if (!element || typeof element !== "object")
|
|
112273
|
+
return element;
|
|
112274
|
+
const updated = { ...element };
|
|
112275
|
+
for (const key of modelUrlKeys) {
|
|
112276
|
+
const value = updated[key];
|
|
112277
|
+
if (!value)
|
|
112278
|
+
continue;
|
|
112279
|
+
if (hasUriScheme(value))
|
|
112280
|
+
continue;
|
|
112281
|
+
if (value.startsWith("/") && preserveRelativeModelUrls) {
|
|
112282
|
+
updated[key] = value;
|
|
112283
|
+
} else if (value.startsWith("/") || isWindowsAbsolutePath(value)) {
|
|
112284
|
+
updated[key] = toFileUrl(value);
|
|
112285
|
+
} else if (preserveRelativeModelUrls && !hasModelPathBaseDir) {
|
|
112286
|
+
updated[key] = value;
|
|
112287
|
+
} else if (!baseDir) {
|
|
112288
|
+
updated[key] = value;
|
|
112289
|
+
} else {
|
|
112290
|
+
updated[key] = new URL(value, toDirectoryUrl(baseDir)).href;
|
|
112291
|
+
}
|
|
112292
|
+
}
|
|
112293
|
+
return updated;
|
|
112294
|
+
});
|
|
112295
|
+
};
|
|
112296
|
+
var getRenderCamera = (circuitJson, defaultCamera, options = {}) => {
|
|
112297
|
+
if (options.camera) {
|
|
112298
|
+
return options.camera;
|
|
112299
|
+
}
|
|
112300
|
+
if (!options.cameraPreset) {
|
|
112301
|
+
return defaultCamera;
|
|
112302
|
+
}
|
|
112303
|
+
return applyCameraPreset(options.cameraPreset, defaultCamera);
|
|
112304
|
+
};
|
|
112305
|
+
var getConversionOptions = (format, options = {}) => ({
|
|
112306
|
+
format,
|
|
112307
|
+
...options.projectBaseUrl ? { projectBaseUrl: options.projectBaseUrl } : {},
|
|
112308
|
+
...options.authHeaders ? { authHeaders: options.authHeaders } : {},
|
|
112309
|
+
...options.boardTextureResolution ? { boardTextureResolution: options.boardTextureResolution } : {}
|
|
112310
|
+
});
|
|
112311
|
+
var convertCircuitJsonTo3dGlb = async (circuitJson, options = {}) => {
|
|
112312
|
+
const normalizedCircuitJson = normalizeModelUrls(circuitJson, options);
|
|
112313
|
+
const { convertCircuitJsonToGltf: convertCircuitJsonToGltf2 } = await loadCircuitJsonToGltf();
|
|
112314
|
+
const glbBuffer = await convertCircuitJsonToGltf2(normalizedCircuitJson, getConversionOptions("glb", options));
|
|
112315
|
+
return normalizeToUint8Array2(await normalizeToArrayBuffer(glbBuffer));
|
|
112316
|
+
};
|
|
112317
|
+
var renderCircuitJsonTo3dPng = async (circuitJson, options = {}) => {
|
|
112318
|
+
const [{ getBestCameraPosition }, { renderGLTFToPNGFromGLB }] = await Promise.all([loadCircuitJsonToGltf(), loadPoppyGl()]);
|
|
112319
|
+
const glbBuffer = await convertCircuitJsonTo3dGlb(circuitJson, options);
|
|
112320
|
+
const glbArrayBuffer = await normalizeToArrayBuffer(glbBuffer);
|
|
112321
|
+
const defaultCamera = getBestCameraPosition(circuitJson);
|
|
112322
|
+
return renderGLTFToPNGFromGLB(glbArrayBuffer, getRenderCamera(circuitJson, defaultCamera, options));
|
|
112323
|
+
};
|
|
112324
|
+
|
|
112140
112325
|
// node_modules/circuit-json-to-step/node_modules/stepts/dist/index.js
|
|
112141
112326
|
var Entity = class {
|
|
112142
112327
|
static parse(_a, _ctx) {
|
|
@@ -114423,23 +114608,19 @@ async function circuitJsonToStep(circuitJson, options = {}) {
|
|
|
114423
114608
|
}
|
|
114424
114609
|
|
|
114425
114610
|
// cli/build/worker-output-generators.ts
|
|
114426
|
-
import {
|
|
114427
|
-
convertCircuitJsonToGltf as convertCircuitJsonToGltf2,
|
|
114428
|
-
getBestCameraPosition
|
|
114429
|
-
} from "circuit-json-to-gltf";
|
|
114611
|
+
import { convertCircuitJsonToGltf as convertCircuitJsonToGltf2 } from "circuit-json-to-gltf";
|
|
114430
114612
|
import {
|
|
114431
114613
|
convertCircuitJsonToPcbSvg,
|
|
114432
114614
|
convertCircuitJsonToSchematicSvg
|
|
114433
114615
|
} from "circuit-to-svg";
|
|
114434
|
-
import { renderGLTFToPNGFromGLB } from "poppygl";
|
|
114435
114616
|
|
|
114436
114617
|
// cli/build/worker-binary-utils.ts
|
|
114437
|
-
var
|
|
114618
|
+
var viewToArrayBuffer3 = (view) => {
|
|
114438
114619
|
const copy = new Uint8Array(view.byteLength);
|
|
114439
114620
|
copy.set(new Uint8Array(view.buffer, view.byteOffset, view.byteLength));
|
|
114440
114621
|
return copy.buffer;
|
|
114441
114622
|
};
|
|
114442
|
-
var
|
|
114623
|
+
var normalizeToUint8Array3 = (value) => {
|
|
114443
114624
|
if (value instanceof Uint8Array) {
|
|
114444
114625
|
return value;
|
|
114445
114626
|
}
|
|
@@ -114447,26 +114628,10 @@ var normalizeToUint8Array2 = (value) => {
|
|
|
114447
114628
|
return new Uint8Array(value);
|
|
114448
114629
|
}
|
|
114449
114630
|
if (ArrayBuffer.isView(value)) {
|
|
114450
|
-
return new Uint8Array(
|
|
114631
|
+
return new Uint8Array(viewToArrayBuffer3(value));
|
|
114451
114632
|
}
|
|
114452
114633
|
throw new Error("Expected Uint8Array, ArrayBuffer, or ArrayBufferView for binary data");
|
|
114453
114634
|
};
|
|
114454
|
-
var normalizeToArrayBuffer = async (value) => {
|
|
114455
|
-
if (value instanceof ArrayBuffer) {
|
|
114456
|
-
return value;
|
|
114457
|
-
}
|
|
114458
|
-
if (ArrayBuffer.isView(value)) {
|
|
114459
|
-
return viewToArrayBuffer2(value);
|
|
114460
|
-
}
|
|
114461
|
-
if (value && typeof value === "object") {
|
|
114462
|
-
const maybeArrayBufferLike = value;
|
|
114463
|
-
if (typeof maybeArrayBufferLike.arrayBuffer === "function") {
|
|
114464
|
-
const result = maybeArrayBufferLike.arrayBuffer();
|
|
114465
|
-
return result instanceof Promise ? await result : result;
|
|
114466
|
-
}
|
|
114467
|
-
}
|
|
114468
|
-
throw new Error("Expected ArrayBuffer, ArrayBufferView, or Buffer-compatible object");
|
|
114469
|
-
};
|
|
114470
114635
|
|
|
114471
114636
|
// cli/build/svg-to-png.ts
|
|
114472
114637
|
import { Resvg } from "@resvg/resvg-js";
|
|
@@ -114556,7 +114721,7 @@ var writeSimulationSvgAssetsFromCircuitJson = (circuitJson, outputDir, imageForm
|
|
|
114556
114721
|
var writeGlbFromCircuitJson = async (circuitJson, glbOutputPath) => {
|
|
114557
114722
|
const circuitJsonWithFileUrls = convertModelUrlsToFileUrls(circuitJson);
|
|
114558
114723
|
const glbBuffer = await convertCircuitJsonToGltf2(circuitJsonWithFileUrls, getCircuitJsonToGltfOptions({ format: "glb" }));
|
|
114559
|
-
const glbData =
|
|
114724
|
+
const glbData = normalizeToUint8Array3(glbBuffer);
|
|
114560
114725
|
fs29.mkdirSync(path32.dirname(glbOutputPath), { recursive: true });
|
|
114561
114726
|
fs29.writeFileSync(glbOutputPath, Buffer.from(glbData));
|
|
114562
114727
|
};
|
|
@@ -114586,11 +114751,8 @@ var writeImageAssetsFromCircuitJson = async (circuitJson, options) => {
|
|
|
114586
114751
|
}
|
|
114587
114752
|
writeSimulationSvgAssetsFromCircuitJson(circuitJson, outputDir, imageFormats);
|
|
114588
114753
|
if (imageFormats.threeDPngs) {
|
|
114589
|
-
const
|
|
114590
|
-
|
|
114591
|
-
const glbArrayBuffer = await normalizeToArrayBuffer(glbBuffer);
|
|
114592
|
-
const pngBuffer = await renderGLTFToPNGFromGLB(glbArrayBuffer, getBestCameraPosition(circuitJson));
|
|
114593
|
-
fs29.writeFileSync(path32.join(outputDir, "3d.png"), Buffer.from(normalizeToUint8Array2(pngBuffer)));
|
|
114754
|
+
const pngBuffer = await renderCircuitJsonTo3dPng(circuitJson);
|
|
114755
|
+
fs29.writeFileSync(path32.join(outputDir, "3d.png"), Buffer.from(pngBuffer));
|
|
114594
114756
|
}
|
|
114595
114757
|
};
|
|
114596
114758
|
|
|
@@ -114678,48 +114840,10 @@ var buildPreviewGltf = async ({
|
|
|
114678
114840
|
// cli/build/build-preview-images.ts
|
|
114679
114841
|
import fs32 from "node:fs";
|
|
114680
114842
|
import path35 from "node:path";
|
|
114681
|
-
import {
|
|
114682
|
-
convertCircuitJsonToGltf as convertCircuitJsonToGltf4,
|
|
114683
|
-
getBestCameraPosition as getBestCameraPosition2
|
|
114684
|
-
} from "circuit-json-to-gltf";
|
|
114685
114843
|
import {
|
|
114686
114844
|
convertCircuitJsonToPcbSvg as convertCircuitJsonToPcbSvg2,
|
|
114687
114845
|
convertCircuitJsonToSchematicSvg as convertCircuitJsonToSchematicSvg2
|
|
114688
114846
|
} from "circuit-to-svg";
|
|
114689
|
-
import { renderGLTFToPNGFromGLB as renderGLTFToPNGFromGLB2 } from "poppygl";
|
|
114690
|
-
var viewToArrayBuffer3 = (view) => {
|
|
114691
|
-
const copy = new Uint8Array(view.byteLength);
|
|
114692
|
-
copy.set(new Uint8Array(view.buffer, view.byteOffset, view.byteLength));
|
|
114693
|
-
return copy.buffer;
|
|
114694
|
-
};
|
|
114695
|
-
var normalizeToArrayBuffer2 = async (value) => {
|
|
114696
|
-
if (value instanceof ArrayBuffer) {
|
|
114697
|
-
return value;
|
|
114698
|
-
}
|
|
114699
|
-
if (ArrayBuffer.isView(value)) {
|
|
114700
|
-
return viewToArrayBuffer3(value);
|
|
114701
|
-
}
|
|
114702
|
-
if (value && typeof value === "object") {
|
|
114703
|
-
const maybeArrayBufferLike = value;
|
|
114704
|
-
if (typeof maybeArrayBufferLike.arrayBuffer === "function") {
|
|
114705
|
-
const result = maybeArrayBufferLike.arrayBuffer();
|
|
114706
|
-
return result instanceof Promise ? await result : result;
|
|
114707
|
-
}
|
|
114708
|
-
}
|
|
114709
|
-
throw new Error("Expected ArrayBuffer, ArrayBufferView, or Buffer-compatible object");
|
|
114710
|
-
};
|
|
114711
|
-
var normalizeToUint8Array3 = (value) => {
|
|
114712
|
-
if (value instanceof Uint8Array) {
|
|
114713
|
-
return value;
|
|
114714
|
-
}
|
|
114715
|
-
if (value instanceof ArrayBuffer) {
|
|
114716
|
-
return new Uint8Array(value);
|
|
114717
|
-
}
|
|
114718
|
-
if (ArrayBuffer.isView(value)) {
|
|
114719
|
-
return new Uint8Array(viewToArrayBuffer3(value));
|
|
114720
|
-
}
|
|
114721
|
-
throw new Error("Expected Uint8Array, ArrayBuffer, or ArrayBufferView for PNG");
|
|
114722
|
-
};
|
|
114723
114847
|
var generatePreviewAssets = async ({
|
|
114724
114848
|
build,
|
|
114725
114849
|
outputDir,
|
|
@@ -114785,13 +114909,9 @@ var generatePreviewAssets = async ({
|
|
|
114785
114909
|
}
|
|
114786
114910
|
if (imageFormats.threeDPngs) {
|
|
114787
114911
|
try {
|
|
114788
|
-
console.log(`${prefix}
|
|
114789
|
-
const
|
|
114790
|
-
|
|
114791
|
-
console.log(`${prefix}Rendering GLB to PNG buffer...`);
|
|
114792
|
-
const glbArrayBuffer = await normalizeToArrayBuffer2(glbBuffer);
|
|
114793
|
-
const pngBuffer = await renderGLTFToPNGFromGLB2(glbArrayBuffer, getBestCameraPosition2(circuitJson));
|
|
114794
|
-
fs32.writeFileSync(path35.join(outputDir, "3d.png"), Buffer.from(normalizeToUint8Array3(pngBuffer)));
|
|
114912
|
+
console.log(`${prefix}Generating 3D PNG...`);
|
|
114913
|
+
const pngBuffer = await renderCircuitJsonTo3dPng(circuitJson);
|
|
114914
|
+
fs32.writeFileSync(path35.join(outputDir, "3d.png"), Buffer.from(pngBuffer));
|
|
114795
114915
|
console.log(`${prefix}Written 3d.png`);
|
|
114796
114916
|
} catch (error) {
|
|
114797
114917
|
console.error(`${prefix}Failed to generate 3D PNG:`, error);
|
|
@@ -117425,8 +117545,8 @@ var isOffBoardEdgeOffset = (boardEdge, offset) => {
|
|
|
117425
117545
|
}
|
|
117426
117546
|
return offset > 0;
|
|
117427
117547
|
};
|
|
117428
|
-
var getComponentToComponentCalcString = (componentName, otherComponentName, direction,
|
|
117429
|
-
const d = fmtMm(
|
|
117548
|
+
var getComponentToComponentCalcString = (componentName, otherComponentName, direction, distance2) => {
|
|
117549
|
+
const d = fmtMm(distance2);
|
|
117430
117550
|
switch (direction) {
|
|
117431
117551
|
case "right":
|
|
117432
117552
|
return `${componentName}.pcbLeftEdgeX=calc(${otherComponentName}.maxX+${d})`;
|
|
@@ -117438,8 +117558,8 @@ var getComponentToComponentCalcString = (componentName, otherComponentName, dire
|
|
|
117438
117558
|
return `${componentName}.pcbBottomEdgeY=calc(${otherComponentName}.maxY+${d})`;
|
|
117439
117559
|
}
|
|
117440
117560
|
};
|
|
117441
|
-
var getComponentToBoardCalcString = (componentName, direction,
|
|
117442
|
-
const d = fmtMm(
|
|
117561
|
+
var getComponentToBoardCalcString = (componentName, direction, distance2) => {
|
|
117562
|
+
const d = fmtMm(distance2);
|
|
117443
117563
|
switch (direction) {
|
|
117444
117564
|
case "right":
|
|
117445
117565
|
return `${componentName}.centerX=calc(board.centerX+${d})`;
|
|
@@ -118095,9 +118215,9 @@ var getSeparationSuggestion = (a, b, overlapX, overlapY, preferredMover) => {
|
|
|
118095
118215
|
}
|
|
118096
118216
|
const { mover, anchor } = chooseMover(a, b, preferredMover);
|
|
118097
118217
|
const axis = overlapX <= overlapY ? "x" : "y";
|
|
118098
|
-
const
|
|
118218
|
+
const distance2 = axis === "x" ? overlapX : overlapY;
|
|
118099
118219
|
const direction = getMoveDirectionBetweenComponents(mover, anchor, axis);
|
|
118100
|
-
return `move ${mover.name} ${fmtMm2(
|
|
118220
|
+
return `move ${mover.name} ${fmtMm2(distance2)} ${direction}`;
|
|
118101
118221
|
};
|
|
118102
118222
|
var getCountainmentBonus = (a, b) => {
|
|
118103
118223
|
if (!a.bounds || !b.bounds || a.centerX === null || a.centerY === null)
|
|
@@ -168902,8 +169022,8 @@ var passive_def = base_def.extend({
|
|
|
168902
169022
|
p: length.optional(),
|
|
168903
169023
|
pw: length.optional(),
|
|
168904
169024
|
ph: length.optional(),
|
|
168905
|
-
metric:
|
|
168906
|
-
imperial:
|
|
169025
|
+
metric: distance2.optional(),
|
|
169026
|
+
imperial: distance2.optional(),
|
|
168907
169027
|
w: length.optional(),
|
|
168908
169028
|
h: length.optional(),
|
|
168909
169029
|
textbottom: external_exports.boolean().optional()
|
|
@@ -169319,7 +169439,7 @@ var bga_def = base_def.extend({
|
|
|
169319
169439
|
fn: external_exports.string(),
|
|
169320
169440
|
num_pins: external_exports.number().optional().default(64),
|
|
169321
169441
|
grid: dim2d.optional(),
|
|
169322
|
-
p:
|
|
169442
|
+
p: distance2.default("0.8mm"),
|
|
169323
169443
|
w: length.optional(),
|
|
169324
169444
|
h: length.optional(),
|
|
169325
169445
|
ball: length.optional().describe("ball diameter"),
|
|
@@ -174701,7 +174821,7 @@ var getSonPadCoord = (num_pins, pn22, w22, p3) => {
|
|
|
174701
174821
|
var vson_def = base_def.extend({
|
|
174702
174822
|
fn: external_exports.string(),
|
|
174703
174823
|
num_pins: external_exports.number().optional().default(8),
|
|
174704
|
-
p:
|
|
174824
|
+
p: distance2.describe("pitch (distance between center of each pin)"),
|
|
174705
174825
|
w: length.describe("width between vertical rows of pins"),
|
|
174706
174826
|
grid: dim2d.describe("width and height of the border of the footprint"),
|
|
174707
174827
|
ep: dim2d.default("0x0mm").describe("width and height of the central exposed thermal pad"),
|
|
@@ -176736,16 +176856,16 @@ function segmentsDistance2(a12, a2, b12, b22) {
|
|
|
176736
176856
|
function pointToSegmentDistance2(p3, v3, w22) {
|
|
176737
176857
|
const l22 = (w22.x - v3.x) ** 2 + (w22.y - v3.y) ** 2;
|
|
176738
176858
|
if (l22 === 0)
|
|
176739
|
-
return
|
|
176859
|
+
return distance23(p3, v3);
|
|
176740
176860
|
let t17 = ((p3.x - v3.x) * (w22.x - v3.x) + (p3.y - v3.y) * (w22.y - v3.y)) / l22;
|
|
176741
176861
|
t17 = Math.max(0, Math.min(1, t17));
|
|
176742
176862
|
const projection = {
|
|
176743
176863
|
x: v3.x + t17 * (w22.x - v3.x),
|
|
176744
176864
|
y: v3.y + t17 * (w22.y - v3.y)
|
|
176745
176865
|
};
|
|
176746
|
-
return
|
|
176866
|
+
return distance23(p3, projection);
|
|
176747
176867
|
}
|
|
176748
|
-
function
|
|
176868
|
+
function distance23(p12, p22) {
|
|
176749
176869
|
const dx2 = p12.x - p22.x;
|
|
176750
176870
|
const dy2 = p12.y - p22.y;
|
|
176751
176871
|
return Math.sqrt(dx2 * dx2 + dy2 * dy2);
|
|
@@ -176953,12 +177073,12 @@ function segmentToBoundsMinDistance(a2, b22, bounds) {
|
|
|
176953
177073
|
if (a2.x < bounds.minX || a2.x > bounds.maxX || a2.y < bounds.minY || a2.y > bounds.maxY) {
|
|
176954
177074
|
const closestX = clamp(a2.x, bounds.minX, bounds.maxX);
|
|
176955
177075
|
const closestY = clamp(a2.y, bounds.minY, bounds.maxY);
|
|
176956
|
-
distances.push(
|
|
177076
|
+
distances.push(distance23(a2, { x: closestX, y: closestY }));
|
|
176957
177077
|
}
|
|
176958
177078
|
if (b22.x < bounds.minX || b22.x > bounds.maxX || b22.y < bounds.minY || b22.y > bounds.maxY) {
|
|
176959
177079
|
const closestX = clamp(b22.x, bounds.minX, bounds.maxX);
|
|
176960
177080
|
const closestY = clamp(b22.y, bounds.minY, bounds.maxY);
|
|
176961
|
-
distances.push(
|
|
177081
|
+
distances.push(distance23(b22, { x: closestX, y: closestY }));
|
|
176962
177082
|
}
|
|
176963
177083
|
return Math.min(...distances);
|
|
176964
177084
|
}
|
|
@@ -176976,7 +177096,7 @@ function segmentToBoxMinDistance(a2, b22, box2) {
|
|
|
176976
177096
|
function segmentToCircleMinDistance(a2, b22, circle2) {
|
|
176977
177097
|
const circleCenter = { x: circle2.x, y: circle2.y };
|
|
176978
177098
|
if (a2.x === b22.x && a2.y === b22.y) {
|
|
176979
|
-
return Math.max(0,
|
|
177099
|
+
return Math.max(0, distance23(a2, circleCenter) - circle2.radius);
|
|
176980
177100
|
}
|
|
176981
177101
|
const ab = { x: b22.x - a2.x, y: b22.y - a2.y };
|
|
176982
177102
|
const ac22 = { x: circleCenter.x - a2.x, y: circleCenter.y - a2.y };
|
|
@@ -176986,7 +177106,7 @@ function segmentToCircleMinDistance(a2, b22, circle2) {
|
|
|
176986
177106
|
x: a2.x + t17 * ab.x,
|
|
176987
177107
|
y: a2.y + t17 * ab.y
|
|
176988
177108
|
};
|
|
176989
|
-
const distToCenter =
|
|
177109
|
+
const distToCenter = distance23(closestPoint, circleCenter);
|
|
176990
177110
|
return Math.max(0, distToCenter - circle2.radius);
|
|
176991
177111
|
}
|
|
176992
177112
|
var getUnitVectorFromPointAToB = (a2, b22) => {
|
|
@@ -178868,12 +178988,12 @@ expectTypesMatch2(true);
|
|
|
178868
178988
|
var portHints = external_exports.array(external_exports.string().or(external_exports.number()));
|
|
178869
178989
|
expectTypesMatch2(true);
|
|
178870
178990
|
var calcString = external_exports.string().regex(/^calc\(.*\)$/);
|
|
178871
|
-
var distance3 =
|
|
178872
|
-
var pcbCoordinate = calcString.or(
|
|
178991
|
+
var distance3 = distance2;
|
|
178992
|
+
var pcbCoordinate = calcString.or(distance2);
|
|
178873
178993
|
var point32 = external_exports.object({
|
|
178874
|
-
x:
|
|
178875
|
-
y:
|
|
178876
|
-
z:
|
|
178994
|
+
x: distance2,
|
|
178995
|
+
y: distance2,
|
|
178996
|
+
z: distance2
|
|
178877
178997
|
});
|
|
178878
178998
|
var url = external_exports.preprocess((value) => {
|
|
178879
178999
|
if (value && typeof value === "object" && "default" in value) {
|
|
@@ -178946,8 +179066,8 @@ var cadModelProp = external_exports.union([
|
|
|
178946
179066
|
expectTypesMatch2(true);
|
|
178947
179067
|
var footprintProp = external_exports.custom((v3) => true);
|
|
178948
179068
|
var point2 = external_exports.object({
|
|
178949
|
-
x:
|
|
178950
|
-
y:
|
|
179069
|
+
x: distance2,
|
|
179070
|
+
y: distance2
|
|
178951
179071
|
});
|
|
178952
179072
|
var kicadAt2 = point2.extend({
|
|
178953
179073
|
rotation: rotation.optional()
|
|
@@ -178955,7 +179075,7 @@ var kicadAt2 = point2.extend({
|
|
|
178955
179075
|
expectTypesMatch2(true);
|
|
178956
179076
|
var kicadFont2 = external_exports.object({
|
|
178957
179077
|
size: point2.optional(),
|
|
178958
|
-
thickness:
|
|
179078
|
+
thickness: distance2.optional()
|
|
178959
179079
|
});
|
|
178960
179080
|
expectTypesMatch2(true);
|
|
178961
179081
|
var kicadEffects2 = external_exports.object({
|
|
@@ -178991,7 +179111,7 @@ var kicadFootprintPad2 = external_exports.object({
|
|
|
178991
179111
|
shape: external_exports.string().optional(),
|
|
178992
179112
|
at: kicadAt2.optional(),
|
|
178993
179113
|
size: point2.optional(),
|
|
178994
|
-
drill:
|
|
179114
|
+
drill: distance2.optional(),
|
|
178995
179115
|
layers: external_exports.array(external_exports.string()).optional(),
|
|
178996
179116
|
removeUnusedLayers: external_exports.boolean().optional(),
|
|
178997
179117
|
uuid: external_exports.string().optional()
|
|
@@ -179022,7 +179142,7 @@ var kicadSymbolPinNumbers2 = external_exports.object({
|
|
|
179022
179142
|
});
|
|
179023
179143
|
expectTypesMatch2(true);
|
|
179024
179144
|
var kicadSymbolPinNames2 = external_exports.object({
|
|
179025
|
-
offset:
|
|
179145
|
+
offset: distance2.optional(),
|
|
179026
179146
|
hide: external_exports.boolean().optional()
|
|
179027
179147
|
});
|
|
179028
179148
|
expectTypesMatch2(true);
|
|
@@ -179062,9 +179182,9 @@ var kicadSymbolMetadata2 = external_exports.object({
|
|
|
179062
179182
|
});
|
|
179063
179183
|
expectTypesMatch2(true);
|
|
179064
179184
|
var pcbStyle = external_exports.object({
|
|
179065
|
-
silkscreenFontSize:
|
|
179066
|
-
viaPadDiameter:
|
|
179067
|
-
viaHoleDiameter:
|
|
179185
|
+
silkscreenFontSize: distance2.optional(),
|
|
179186
|
+
viaPadDiameter: distance2.optional(),
|
|
179187
|
+
viaHoleDiameter: distance2.optional(),
|
|
179068
179188
|
silkscreenTextPosition: external_exports.union([
|
|
179069
179189
|
external_exports.enum(["centered", "outside", "none"]),
|
|
179070
179190
|
external_exports.object({
|
|
@@ -179123,7 +179243,7 @@ var pinAttributeMap = external_exports.object({
|
|
|
179123
179243
|
});
|
|
179124
179244
|
expectTypesMatch2(true);
|
|
179125
179245
|
var schStyle = external_exports.object({
|
|
179126
|
-
defaultPassiveSize: external_exports.union([external_exports.enum(["xs", "sm", "md"]),
|
|
179246
|
+
defaultPassiveSize: external_exports.union([external_exports.enum(["xs", "sm", "md"]), distance2]).optional(),
|
|
179127
179247
|
defaultCapacitorOrientation: external_exports.enum(["vertical", "none"]).optional()
|
|
179128
179248
|
});
|
|
179129
179249
|
expectTypesMatch2(true);
|
|
@@ -179135,8 +179255,8 @@ var pcbLayoutProps = external_exports.object({
|
|
|
179135
179255
|
pcbRightEdgeX: pcbCoordinate.optional(),
|
|
179136
179256
|
pcbTopEdgeY: pcbCoordinate.optional(),
|
|
179137
179257
|
pcbBottomEdgeY: pcbCoordinate.optional(),
|
|
179138
|
-
pcbOffsetX:
|
|
179139
|
-
pcbOffsetY:
|
|
179258
|
+
pcbOffsetX: distance2.optional(),
|
|
179259
|
+
pcbOffsetY: distance2.optional(),
|
|
179140
179260
|
pcbRotation: rotation.optional(),
|
|
179141
179261
|
pcbPositionAnchor: external_exports.string().optional(),
|
|
179142
179262
|
pcbPositionMode: external_exports.enum([
|
|
@@ -179147,12 +179267,12 @@ var pcbLayoutProps = external_exports.object({
|
|
|
179147
179267
|
]).optional(),
|
|
179148
179268
|
shouldBeOnEdgeOfBoard: external_exports.boolean().optional(),
|
|
179149
179269
|
layer: layer_ref.optional(),
|
|
179150
|
-
pcbMarginTop:
|
|
179151
|
-
pcbMarginRight:
|
|
179152
|
-
pcbMarginBottom:
|
|
179153
|
-
pcbMarginLeft:
|
|
179154
|
-
pcbMarginX:
|
|
179155
|
-
pcbMarginY:
|
|
179270
|
+
pcbMarginTop: distance2.optional(),
|
|
179271
|
+
pcbMarginRight: distance2.optional(),
|
|
179272
|
+
pcbMarginBottom: distance2.optional(),
|
|
179273
|
+
pcbMarginLeft: distance2.optional(),
|
|
179274
|
+
pcbMarginX: distance2.optional(),
|
|
179275
|
+
pcbMarginY: distance2.optional(),
|
|
179156
179276
|
pcbStyle: pcbStyle.optional(),
|
|
179157
179277
|
pcbSx: pcbSx.optional(),
|
|
179158
179278
|
pcbRelative: external_exports.boolean().optional(),
|
|
@@ -179166,8 +179286,8 @@ var commonLayoutProps = external_exports.object({
|
|
|
179166
179286
|
pcbRightEdgeX: pcbCoordinate.optional(),
|
|
179167
179287
|
pcbTopEdgeY: pcbCoordinate.optional(),
|
|
179168
179288
|
pcbBottomEdgeY: pcbCoordinate.optional(),
|
|
179169
|
-
pcbOffsetX:
|
|
179170
|
-
pcbOffsetY:
|
|
179289
|
+
pcbOffsetX: distance2.optional(),
|
|
179290
|
+
pcbOffsetY: distance2.optional(),
|
|
179171
179291
|
pcbRotation: rotation.optional(),
|
|
179172
179292
|
pcbPositionAnchor: external_exports.string().optional(),
|
|
179173
179293
|
pcbPositionMode: external_exports.enum([
|
|
@@ -179177,22 +179297,22 @@ var commonLayoutProps = external_exports.object({
|
|
|
179177
179297
|
"relative_to_component_anchor"
|
|
179178
179298
|
]).optional(),
|
|
179179
179299
|
shouldBeOnEdgeOfBoard: external_exports.boolean().optional(),
|
|
179180
|
-
pcbMarginTop:
|
|
179181
|
-
pcbMarginRight:
|
|
179182
|
-
pcbMarginBottom:
|
|
179183
|
-
pcbMarginLeft:
|
|
179184
|
-
pcbMarginX:
|
|
179185
|
-
pcbMarginY:
|
|
179300
|
+
pcbMarginTop: distance2.optional(),
|
|
179301
|
+
pcbMarginRight: distance2.optional(),
|
|
179302
|
+
pcbMarginBottom: distance2.optional(),
|
|
179303
|
+
pcbMarginLeft: distance2.optional(),
|
|
179304
|
+
pcbMarginX: distance2.optional(),
|
|
179305
|
+
pcbMarginY: distance2.optional(),
|
|
179186
179306
|
pcbStyle: pcbStyle.optional(),
|
|
179187
179307
|
pcbSx: pcbSx.optional(),
|
|
179188
|
-
schMarginTop:
|
|
179189
|
-
schMarginRight:
|
|
179190
|
-
schMarginBottom:
|
|
179191
|
-
schMarginLeft:
|
|
179192
|
-
schMarginX:
|
|
179193
|
-
schMarginY:
|
|
179194
|
-
schX:
|
|
179195
|
-
schY:
|
|
179308
|
+
schMarginTop: distance2.optional(),
|
|
179309
|
+
schMarginRight: distance2.optional(),
|
|
179310
|
+
schMarginBottom: distance2.optional(),
|
|
179311
|
+
schMarginLeft: distance2.optional(),
|
|
179312
|
+
schMarginX: distance2.optional(),
|
|
179313
|
+
schMarginY: distance2.optional(),
|
|
179314
|
+
schX: distance2.optional(),
|
|
179315
|
+
schY: distance2.optional(),
|
|
179196
179316
|
schRotation: rotation.optional(),
|
|
179197
179317
|
layer: layer_ref.optional(),
|
|
179198
179318
|
footprint: footprintProp.optional(),
|
|
@@ -179237,7 +179357,7 @@ var lrPolarPins = [
|
|
|
179237
179357
|
"cathode",
|
|
179238
179358
|
"neg"
|
|
179239
179359
|
];
|
|
179240
|
-
var distanceOrMultiplier =
|
|
179360
|
+
var distanceOrMultiplier = distance2.or(external_exports.enum(["2x", "3x", "4x"]));
|
|
179241
179361
|
var kicadFootprintKeys = [
|
|
179242
179362
|
"Audio_Module/Reverb_BTDR-1H",
|
|
179243
179363
|
"Audio_Module/Reverb_BTDR-1V",
|
|
@@ -194713,18 +194833,18 @@ var schematicPortArrangement = external_exports.object({
|
|
|
194713
194833
|
var schematicPinArrangement = schematicPortArrangement;
|
|
194714
194834
|
expectTypesMatch2(true);
|
|
194715
194835
|
var schematicPinStyle = external_exports.record(external_exports.object({
|
|
194716
|
-
marginLeft:
|
|
194717
|
-
marginRight:
|
|
194718
|
-
marginTop:
|
|
194719
|
-
marginBottom:
|
|
194720
|
-
leftMargin:
|
|
194721
|
-
rightMargin:
|
|
194722
|
-
topMargin:
|
|
194723
|
-
bottomMargin:
|
|
194836
|
+
marginLeft: distance2.optional(),
|
|
194837
|
+
marginRight: distance2.optional(),
|
|
194838
|
+
marginTop: distance2.optional(),
|
|
194839
|
+
marginBottom: distance2.optional(),
|
|
194840
|
+
leftMargin: distance2.optional(),
|
|
194841
|
+
rightMargin: distance2.optional(),
|
|
194842
|
+
topMargin: distance2.optional(),
|
|
194843
|
+
bottomMargin: distance2.optional()
|
|
194724
194844
|
}));
|
|
194725
194845
|
expectTypesMatch2(true);
|
|
194726
194846
|
var schematicPinLabel = external_exports.string().regex(/^[A-Za-z0-9_]+$/);
|
|
194727
|
-
var schematicSymbolSize =
|
|
194847
|
+
var schematicSymbolSize = distance2.or(external_exports.enum(["xs", "sm", "default", "md"])).describe("distance between pin1 and pin2 of the schematic symbol");
|
|
194728
194848
|
var kicadPinElectricalType = external_exports.enum([
|
|
194729
194849
|
"input",
|
|
194730
194850
|
"output",
|
|
@@ -195041,7 +195161,7 @@ var subcircuitGroupProps = baseGroupProps.extend({
|
|
|
195041
195161
|
manualEdits: manual_edits_file.optional(),
|
|
195042
195162
|
schAutoLayoutEnabled: external_exports.boolean().optional(),
|
|
195043
195163
|
schTraceAutoLabelEnabled: external_exports.boolean().optional(),
|
|
195044
|
-
schMaxTraceDistance:
|
|
195164
|
+
schMaxTraceDistance: distance2.optional(),
|
|
195045
195165
|
routingDisabled: external_exports.boolean().optional(),
|
|
195046
195166
|
bomDisabled: external_exports.boolean().optional(),
|
|
195047
195167
|
defaultTraceWidth: length.optional(),
|
|
@@ -195056,11 +195176,11 @@ var subcircuitGroupProps = baseGroupProps.extend({
|
|
|
195056
195176
|
square: external_exports.boolean().optional(),
|
|
195057
195177
|
emptyArea: external_exports.string().optional(),
|
|
195058
195178
|
filledArea: external_exports.string().optional(),
|
|
195059
|
-
width:
|
|
195060
|
-
height:
|
|
195179
|
+
width: distance2.optional(),
|
|
195180
|
+
height: distance2.optional(),
|
|
195061
195181
|
outline: external_exports.array(point2).optional(),
|
|
195062
|
-
outlineOffsetX:
|
|
195063
|
-
outlineOffsetY:
|
|
195182
|
+
outlineOffsetX: distance2.optional(),
|
|
195183
|
+
outlineOffsetY: distance2.optional(),
|
|
195064
195184
|
circuitJson: external_exports.array(external_exports.any()).optional()
|
|
195065
195185
|
});
|
|
195066
195186
|
var subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({
|
|
@@ -195132,11 +195252,11 @@ expectTypesMatch2(true);
|
|
|
195132
195252
|
var subpanelProps = panelProps;
|
|
195133
195253
|
expectTypesMatch2(true);
|
|
195134
195254
|
var breakoutProps = subcircuitGroupProps.extend({
|
|
195135
|
-
padding:
|
|
195136
|
-
paddingLeft:
|
|
195137
|
-
paddingRight:
|
|
195138
|
-
paddingTop:
|
|
195139
|
-
paddingBottom:
|
|
195255
|
+
padding: distance2.optional(),
|
|
195256
|
+
paddingLeft: distance2.optional(),
|
|
195257
|
+
paddingRight: distance2.optional(),
|
|
195258
|
+
paddingTop: distance2.optional(),
|
|
195259
|
+
paddingBottom: distance2.optional()
|
|
195140
195260
|
});
|
|
195141
195261
|
expectTypesMatch2(true);
|
|
195142
195262
|
var connectionTarget2 = external_exports.string().or(external_exports.array(external_exports.string()).readonly()).or(external_exports.array(external_exports.string()));
|
|
@@ -195158,9 +195278,9 @@ var chipProps = commonComponentProps.extend({
|
|
|
195158
195278
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
195159
195279
|
pinCompatibleVariants: external_exports.array(pinCompatibleVariant).optional(),
|
|
195160
195280
|
schPinStyle: schematicPinStyle.optional(),
|
|
195161
|
-
schPinSpacing:
|
|
195162
|
-
schWidth:
|
|
195163
|
-
schHeight:
|
|
195281
|
+
schPinSpacing: distance2.optional(),
|
|
195282
|
+
schWidth: distance2.optional(),
|
|
195283
|
+
schHeight: distance2.optional(),
|
|
195164
195284
|
noSchematicRepresentation: external_exports.boolean().optional(),
|
|
195165
195285
|
connections: connectionsProp.optional()
|
|
195166
195286
|
});
|
|
@@ -195171,9 +195291,9 @@ var jumperProps = commonComponentProps.extend({
|
|
|
195171
195291
|
manufacturerPartNumber: external_exports.string().optional(),
|
|
195172
195292
|
pinLabels: external_exports.record(external_exports.number().or(schematicPinLabel), schematicPinLabel.or(external_exports.array(schematicPinLabel))).optional(),
|
|
195173
195293
|
schPinStyle: schematicPinStyle.optional(),
|
|
195174
|
-
schPinSpacing:
|
|
195175
|
-
schWidth:
|
|
195176
|
-
schHeight:
|
|
195294
|
+
schPinSpacing: distance2.optional(),
|
|
195295
|
+
schWidth: distance2.optional(),
|
|
195296
|
+
schHeight: distance2.optional(),
|
|
195177
195297
|
schDirection: external_exports.enum(["left", "right"]).optional(),
|
|
195178
195298
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
195179
195299
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
@@ -195192,9 +195312,9 @@ var connectorProps = commonComponentProps.extend({
|
|
|
195192
195312
|
manufacturerPartNumber: external_exports.string().optional(),
|
|
195193
195313
|
pinLabels: external_exports.record(external_exports.number().or(schematicPinLabel), schematicPinLabel.or(external_exports.array(schematicPinLabel))).optional(),
|
|
195194
195314
|
schPinStyle: schematicPinStyle.optional(),
|
|
195195
|
-
schPinSpacing:
|
|
195196
|
-
schWidth:
|
|
195197
|
-
schHeight:
|
|
195315
|
+
schPinSpacing: distance2.optional(),
|
|
195316
|
+
schWidth: distance2.optional(),
|
|
195317
|
+
schHeight: distance2.optional(),
|
|
195198
195318
|
schDirection: external_exports.enum(["left", "right"]).optional(),
|
|
195199
195319
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
195200
195320
|
internallyConnectedPins: external_exports.array(external_exports.array(external_exports.union([external_exports.string(), external_exports.number()]))).optional(),
|
|
@@ -195254,32 +195374,32 @@ var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
|
195254
195374
|
var distanceHiddenUndefined = external_exports.custom().transform((a2) => {
|
|
195255
195375
|
if (a2 === undefined)
|
|
195256
195376
|
return;
|
|
195257
|
-
return
|
|
195377
|
+
return distance2.parse(a2);
|
|
195258
195378
|
});
|
|
195259
195379
|
var platedHolePropsByShape = external_exports.discriminatedUnion("shape", [
|
|
195260
195380
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
195261
195381
|
name: external_exports.string().optional(),
|
|
195262
195382
|
connectsTo: external_exports.string().or(external_exports.array(external_exports.string())).optional(),
|
|
195263
195383
|
shape: external_exports.literal("circle"),
|
|
195264
|
-
holeDiameter:
|
|
195265
|
-
outerDiameter:
|
|
195266
|
-
padDiameter:
|
|
195384
|
+
holeDiameter: distance2,
|
|
195385
|
+
outerDiameter: distance2,
|
|
195386
|
+
padDiameter: distance2.optional().describe("Diameter of the copper pad"),
|
|
195267
195387
|
portHints: portHints.optional(),
|
|
195268
|
-
solderMaskMargin:
|
|
195388
|
+
solderMaskMargin: distance2.optional(),
|
|
195269
195389
|
coveredWithSolderMask: external_exports.boolean().optional()
|
|
195270
195390
|
}),
|
|
195271
195391
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
195272
195392
|
name: external_exports.string().optional(),
|
|
195273
195393
|
connectsTo: external_exports.string().or(external_exports.array(external_exports.string())).optional(),
|
|
195274
195394
|
shape: external_exports.literal("oval"),
|
|
195275
|
-
outerWidth:
|
|
195276
|
-
outerHeight:
|
|
195395
|
+
outerWidth: distance2,
|
|
195396
|
+
outerHeight: distance2,
|
|
195277
195397
|
holeWidth: distanceHiddenUndefined,
|
|
195278
195398
|
holeHeight: distanceHiddenUndefined,
|
|
195279
|
-
innerWidth:
|
|
195280
|
-
innerHeight:
|
|
195399
|
+
innerWidth: distance2.optional().describe("DEPRECATED use holeWidth"),
|
|
195400
|
+
innerHeight: distance2.optional().describe("DEPRECATED use holeHeight"),
|
|
195281
195401
|
portHints: portHints.optional(),
|
|
195282
|
-
solderMaskMargin:
|
|
195402
|
+
solderMaskMargin: distance2.optional(),
|
|
195283
195403
|
coveredWithSolderMask: external_exports.boolean().optional()
|
|
195284
195404
|
}),
|
|
195285
195405
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
@@ -195287,32 +195407,32 @@ var platedHolePropsByShape = external_exports.discriminatedUnion("shape", [
|
|
|
195287
195407
|
connectsTo: external_exports.string().or(external_exports.array(external_exports.string())).optional(),
|
|
195288
195408
|
shape: external_exports.literal("pill"),
|
|
195289
195409
|
rectPad: external_exports.boolean().optional(),
|
|
195290
|
-
outerWidth:
|
|
195291
|
-
outerHeight:
|
|
195410
|
+
outerWidth: distance2,
|
|
195411
|
+
outerHeight: distance2,
|
|
195292
195412
|
holeWidth: distanceHiddenUndefined,
|
|
195293
195413
|
holeHeight: distanceHiddenUndefined,
|
|
195294
|
-
innerWidth:
|
|
195295
|
-
innerHeight:
|
|
195414
|
+
innerWidth: distance2.optional().describe("DEPRECATED use holeWidth"),
|
|
195415
|
+
innerHeight: distance2.optional().describe("DEPRECATED use holeHeight"),
|
|
195296
195416
|
portHints: portHints.optional(),
|
|
195297
|
-
holeOffsetX:
|
|
195298
|
-
holeOffsetY:
|
|
195299
|
-
solderMaskMargin:
|
|
195417
|
+
holeOffsetX: distance2.optional(),
|
|
195418
|
+
holeOffsetY: distance2.optional(),
|
|
195419
|
+
solderMaskMargin: distance2.optional(),
|
|
195300
195420
|
coveredWithSolderMask: external_exports.boolean().optional()
|
|
195301
195421
|
}),
|
|
195302
195422
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
195303
195423
|
name: external_exports.string().optional(),
|
|
195304
195424
|
connectsTo: external_exports.string().or(external_exports.array(external_exports.string())).optional(),
|
|
195305
195425
|
shape: external_exports.literal("circular_hole_with_rect_pad"),
|
|
195306
|
-
holeDiameter:
|
|
195307
|
-
rectPadWidth:
|
|
195308
|
-
rectPadHeight:
|
|
195309
|
-
rectBorderRadius:
|
|
195426
|
+
holeDiameter: distance2,
|
|
195427
|
+
rectPadWidth: distance2,
|
|
195428
|
+
rectPadHeight: distance2,
|
|
195429
|
+
rectBorderRadius: distance2.optional(),
|
|
195310
195430
|
holeShape: external_exports.literal("circle").optional(),
|
|
195311
195431
|
padShape: external_exports.literal("rect").optional(),
|
|
195312
195432
|
portHints: portHints.optional(),
|
|
195313
|
-
holeOffsetX:
|
|
195314
|
-
holeOffsetY:
|
|
195315
|
-
solderMaskMargin:
|
|
195433
|
+
holeOffsetX: distance2.optional(),
|
|
195434
|
+
holeOffsetY: distance2.optional(),
|
|
195435
|
+
solderMaskMargin: distance2.optional(),
|
|
195316
195436
|
coveredWithSolderMask: external_exports.boolean().optional()
|
|
195317
195437
|
}),
|
|
195318
195438
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
@@ -195321,14 +195441,14 @@ var platedHolePropsByShape = external_exports.discriminatedUnion("shape", [
|
|
|
195321
195441
|
shape: external_exports.literal("pill_hole_with_rect_pad"),
|
|
195322
195442
|
holeShape: external_exports.literal("pill").optional(),
|
|
195323
195443
|
padShape: external_exports.literal("rect").optional(),
|
|
195324
|
-
holeWidth:
|
|
195325
|
-
holeHeight:
|
|
195326
|
-
rectPadWidth:
|
|
195327
|
-
rectPadHeight:
|
|
195444
|
+
holeWidth: distance2,
|
|
195445
|
+
holeHeight: distance2,
|
|
195446
|
+
rectPadWidth: distance2,
|
|
195447
|
+
rectPadHeight: distance2,
|
|
195328
195448
|
portHints: portHints.optional(),
|
|
195329
|
-
holeOffsetX:
|
|
195330
|
-
holeOffsetY:
|
|
195331
|
-
solderMaskMargin:
|
|
195449
|
+
holeOffsetX: distance2.optional(),
|
|
195450
|
+
holeOffsetY: distance2.optional(),
|
|
195451
|
+
solderMaskMargin: distance2.optional(),
|
|
195332
195452
|
coveredWithSolderMask: external_exports.boolean().optional()
|
|
195333
195453
|
}),
|
|
195334
195454
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
@@ -195336,14 +195456,14 @@ var platedHolePropsByShape = external_exports.discriminatedUnion("shape", [
|
|
|
195336
195456
|
connectsTo: external_exports.string().or(external_exports.array(external_exports.string())).optional(),
|
|
195337
195457
|
shape: external_exports.literal("hole_with_polygon_pad"),
|
|
195338
195458
|
holeShape: external_exports.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
195339
|
-
holeDiameter:
|
|
195340
|
-
holeWidth:
|
|
195341
|
-
holeHeight:
|
|
195459
|
+
holeDiameter: distance2.optional(),
|
|
195460
|
+
holeWidth: distance2.optional(),
|
|
195461
|
+
holeHeight: distance2.optional(),
|
|
195342
195462
|
padOutline: external_exports.array(point2),
|
|
195343
|
-
holeOffsetX:
|
|
195344
|
-
holeOffsetY:
|
|
195463
|
+
holeOffsetX: distance2,
|
|
195464
|
+
holeOffsetY: distance2,
|
|
195345
195465
|
portHints: portHints.optional(),
|
|
195346
|
-
solderMaskMargin:
|
|
195466
|
+
solderMaskMargin: distance2.optional(),
|
|
195347
195467
|
coveredWithSolderMask: external_exports.boolean().optional()
|
|
195348
195468
|
})
|
|
195349
195469
|
]).transform((a2) => {
|
|
@@ -195412,7 +195532,7 @@ var stampboardProps = boardProps.extend({
|
|
|
195412
195532
|
rightPins: external_exports.array(external_exports.string()).optional(),
|
|
195413
195533
|
topPins: external_exports.array(external_exports.string()).optional(),
|
|
195414
195534
|
bottomPins: external_exports.array(external_exports.string()).optional(),
|
|
195415
|
-
pinPitch:
|
|
195535
|
+
pinPitch: distance2.optional(),
|
|
195416
195536
|
innerHoles: external_exports.boolean().optional()
|
|
195417
195537
|
});
|
|
195418
195538
|
expectTypesMatch2(true);
|
|
@@ -195676,8 +195796,8 @@ var pcbPathPoint = point2.extend({
|
|
|
195676
195796
|
var pcbPath = external_exports.array(external_exports.union([pcbPathPoint, external_exports.string()]));
|
|
195677
195797
|
var baseTraceProps = external_exports.object({
|
|
195678
195798
|
key: external_exports.string().optional(),
|
|
195679
|
-
thickness:
|
|
195680
|
-
width:
|
|
195799
|
+
thickness: distance2.optional(),
|
|
195800
|
+
width: distance2.optional().describe("Alias for trace thickness"),
|
|
195681
195801
|
schematicRouteHints: external_exports.array(point2).optional(),
|
|
195682
195802
|
pcbRouteHints: external_exports.array(route_hint_point).optional(),
|
|
195683
195803
|
pcbPathRelativeTo: external_exports.string().optional(),
|
|
@@ -195687,7 +195807,7 @@ var baseTraceProps = external_exports.object({
|
|
|
195687
195807
|
schDisplayLabel: external_exports.string().optional(),
|
|
195688
195808
|
schStroke: external_exports.string().optional(),
|
|
195689
195809
|
highlightColor: external_exports.string().optional(),
|
|
195690
|
-
maxLength:
|
|
195810
|
+
maxLength: distance2.optional(),
|
|
195691
195811
|
connectsTo: external_exports.string().or(external_exports.array(external_exports.string())).optional()
|
|
195692
195812
|
});
|
|
195693
195813
|
var traceProps = external_exports.union([
|
|
@@ -195749,7 +195869,7 @@ var pcbOrientation = external_exports.enum(["vertical", "horizontal"]).describe(
|
|
|
195749
195869
|
expectTypesMatch2(true);
|
|
195750
195870
|
var pinHeaderProps = commonComponentProps.extend({
|
|
195751
195871
|
pinCount: external_exports.number(),
|
|
195752
|
-
pitch:
|
|
195872
|
+
pitch: distance2.optional(),
|
|
195753
195873
|
schFacingDirection: external_exports.enum(["up", "down", "left", "right"]).optional(),
|
|
195754
195874
|
gender: external_exports.enum(["male", "female", "unpopulated"]).optional().default("male"),
|
|
195755
195875
|
showSilkscreenPinLabels: external_exports.boolean().optional(),
|
|
@@ -195757,16 +195877,16 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
195757
195877
|
doubleRow: external_exports.boolean().optional(),
|
|
195758
195878
|
rightAngle: external_exports.boolean().optional(),
|
|
195759
195879
|
pcbOrientation: pcbOrientation.optional(),
|
|
195760
|
-
holeDiameter:
|
|
195761
|
-
platedDiameter:
|
|
195880
|
+
holeDiameter: distance2.optional(),
|
|
195881
|
+
platedDiameter: distance2.optional(),
|
|
195762
195882
|
pinLabels: external_exports.record(external_exports.string(), schematicPinLabel).or(external_exports.array(schematicPinLabel)).optional(),
|
|
195763
195883
|
connections: external_exports.custom().pipe(external_exports.record(external_exports.string(), connectionTarget)).optional(),
|
|
195764
195884
|
facingDirection: external_exports.enum(["left", "right"]).optional(),
|
|
195765
195885
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
195766
195886
|
schPinStyle: schematicPinStyle.optional(),
|
|
195767
|
-
schPinSpacing:
|
|
195768
|
-
schWidth:
|
|
195769
|
-
schHeight:
|
|
195887
|
+
schPinSpacing: distance2.optional(),
|
|
195888
|
+
schWidth: distance2.optional(),
|
|
195889
|
+
schHeight: distance2.optional()
|
|
195770
195890
|
});
|
|
195771
195891
|
expectTypesMatch2(true);
|
|
195772
195892
|
var netAliasProps = external_exports.object({
|
|
@@ -195991,14 +196111,14 @@ var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
|
195991
196111
|
});
|
|
195992
196112
|
expectTypesMatch2(true);
|
|
195993
196113
|
var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
195994
|
-
width:
|
|
195995
|
-
height:
|
|
195996
|
-
strokeWidth:
|
|
196114
|
+
width: distance2,
|
|
196115
|
+
height: distance2,
|
|
196116
|
+
strokeWidth: distance2.optional(),
|
|
195997
196117
|
isFilled: external_exports.boolean().optional(),
|
|
195998
196118
|
hasStroke: external_exports.boolean().optional(),
|
|
195999
196119
|
isStrokeDashed: external_exports.boolean().optional(),
|
|
196000
196120
|
color: external_exports.string().optional(),
|
|
196001
|
-
cornerRadius:
|
|
196121
|
+
cornerRadius: distance2.optional()
|
|
196002
196122
|
});
|
|
196003
196123
|
var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
196004
196124
|
pcbLeftEdgeX: true,
|
|
@@ -196030,11 +196150,11 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
196030
196150
|
from: dimensionTarget,
|
|
196031
196151
|
to: dimensionTarget,
|
|
196032
196152
|
text: external_exports.string().optional(),
|
|
196033
|
-
offset:
|
|
196153
|
+
offset: distance2.optional(),
|
|
196034
196154
|
font: external_exports.enum(["tscircuit2024"]).optional(),
|
|
196035
196155
|
fontSize: length.optional(),
|
|
196036
196156
|
color: external_exports.string().optional(),
|
|
196037
|
-
arrowSize:
|
|
196157
|
+
arrowSize: distance2.optional(),
|
|
196038
196158
|
units: external_exports.enum(["in", "mm"]).optional(),
|
|
196039
196159
|
outerEdgeToEdge: external_exports.literal(true).optional(),
|
|
196040
196160
|
centerToCenter: external_exports.literal(true).optional(),
|
|
@@ -196043,15 +196163,15 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
196043
196163
|
expectTypesMatch2(true);
|
|
196044
196164
|
var pcbTraceProps = external_exports.object({
|
|
196045
196165
|
layer: external_exports.string().optional(),
|
|
196046
|
-
thickness:
|
|
196166
|
+
thickness: distance2.optional(),
|
|
196047
196167
|
route: external_exports.array(route_hint_point)
|
|
196048
196168
|
});
|
|
196049
196169
|
var viaProps = commonLayoutProps.extend({
|
|
196050
196170
|
name: external_exports.string().optional(),
|
|
196051
196171
|
fromLayer: layer_ref,
|
|
196052
196172
|
toLayer: layer_ref,
|
|
196053
|
-
holeDiameter:
|
|
196054
|
-
outerDiameter:
|
|
196173
|
+
holeDiameter: distance2.optional(),
|
|
196174
|
+
outerDiameter: distance2.optional(),
|
|
196055
196175
|
connectsTo: external_exports.string().or(external_exports.array(external_exports.string())).optional(),
|
|
196056
196176
|
netIsAssignable: external_exports.boolean().optional()
|
|
196057
196177
|
});
|
|
@@ -196063,10 +196183,10 @@ var testpointProps = commonComponentProps.extend({
|
|
|
196063
196183
|
connections: testpointConnectionsProp.optional(),
|
|
196064
196184
|
footprintVariant: external_exports.enum(["pad", "through_hole"]).optional(),
|
|
196065
196185
|
padShape: external_exports.enum(["rect", "circle"]).optional().default("circle"),
|
|
196066
|
-
padDiameter:
|
|
196067
|
-
holeDiameter:
|
|
196068
|
-
width:
|
|
196069
|
-
height:
|
|
196186
|
+
padDiameter: distance2.optional(),
|
|
196187
|
+
holeDiameter: distance2.optional(),
|
|
196188
|
+
width: distance2.optional(),
|
|
196189
|
+
height: distance2.optional()
|
|
196070
196190
|
}).refine((props) => props.footprintVariant !== "through_hole" || props.holeDiameter !== undefined, { message: "holeDiameter is required for through_hole testpoints" });
|
|
196071
196191
|
expectTypesMatch2(true);
|
|
196072
196192
|
var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
@@ -196076,18 +196196,18 @@ expectTypesMatch2(true);
|
|
|
196076
196196
|
var pcbKeepoutProps = external_exports.union([
|
|
196077
196197
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
196078
196198
|
shape: external_exports.literal("circle"),
|
|
196079
|
-
radius:
|
|
196199
|
+
radius: distance2
|
|
196080
196200
|
}),
|
|
196081
196201
|
pcbLayoutProps.extend({
|
|
196082
196202
|
shape: external_exports.literal("rect"),
|
|
196083
|
-
width:
|
|
196084
|
-
height:
|
|
196203
|
+
width: distance2,
|
|
196204
|
+
height: distance2
|
|
196085
196205
|
})
|
|
196086
196206
|
]);
|
|
196087
196207
|
var courtyardRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
196088
|
-
width:
|
|
196089
|
-
height:
|
|
196090
|
-
strokeWidth:
|
|
196208
|
+
width: distance2,
|
|
196209
|
+
height: distance2,
|
|
196210
|
+
strokeWidth: distance2.optional(),
|
|
196091
196211
|
isFilled: external_exports.boolean().optional(),
|
|
196092
196212
|
hasStroke: external_exports.boolean().optional(),
|
|
196093
196213
|
isStrokeDashed: external_exports.boolean().optional(),
|
|
@@ -196111,12 +196231,12 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
|
196111
196231
|
color: external_exports.string().optional()
|
|
196112
196232
|
});
|
|
196113
196233
|
var courtyardCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
196114
|
-
radius:
|
|
196234
|
+
radius: distance2
|
|
196115
196235
|
});
|
|
196116
196236
|
var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
196117
|
-
width:
|
|
196118
|
-
height:
|
|
196119
|
-
radius:
|
|
196237
|
+
width: distance2,
|
|
196238
|
+
height: distance2,
|
|
196239
|
+
radius: distance2
|
|
196120
196240
|
});
|
|
196121
196241
|
var copperPourProps = external_exports.object({
|
|
196122
196242
|
name: external_exports.string().optional(),
|
|
@@ -196206,11 +196326,11 @@ var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
|
|
|
196206
196326
|
expectTypesMatch2(true);
|
|
196207
196327
|
var schematicArcProps = external_exports.object({
|
|
196208
196328
|
center: point,
|
|
196209
|
-
radius:
|
|
196329
|
+
radius: distance2,
|
|
196210
196330
|
startAngleDegrees: rotation,
|
|
196211
196331
|
endAngleDegrees: rotation,
|
|
196212
196332
|
direction: external_exports.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
196213
|
-
strokeWidth:
|
|
196333
|
+
strokeWidth: distance2.optional(),
|
|
196214
196334
|
color: external_exports.string().optional(),
|
|
196215
196335
|
isDashed: external_exports.boolean().optional().default(false)
|
|
196216
196336
|
});
|
|
@@ -196220,20 +196340,20 @@ var toolingrailProps = external_exports.object({
|
|
|
196220
196340
|
});
|
|
196221
196341
|
expectTypesMatch2(true);
|
|
196222
196342
|
var schematicBoxProps = external_exports.object({
|
|
196223
|
-
schX:
|
|
196224
|
-
schY:
|
|
196225
|
-
width:
|
|
196226
|
-
height:
|
|
196343
|
+
schX: distance2.optional(),
|
|
196344
|
+
schY: distance2.optional(),
|
|
196345
|
+
width: distance2.optional(),
|
|
196346
|
+
height: distance2.optional(),
|
|
196227
196347
|
overlay: external_exports.array(external_exports.string()).optional(),
|
|
196228
|
-
padding:
|
|
196229
|
-
paddingLeft:
|
|
196230
|
-
paddingRight:
|
|
196231
|
-
paddingTop:
|
|
196232
|
-
paddingBottom:
|
|
196348
|
+
padding: distance2.optional(),
|
|
196349
|
+
paddingLeft: distance2.optional(),
|
|
196350
|
+
paddingRight: distance2.optional(),
|
|
196351
|
+
paddingTop: distance2.optional(),
|
|
196352
|
+
paddingBottom: distance2.optional(),
|
|
196233
196353
|
title: external_exports.string().optional(),
|
|
196234
196354
|
titleAlignment: ninePointAnchor2.default("top_left"),
|
|
196235
196355
|
titleColor: external_exports.string().optional(),
|
|
196236
|
-
titleFontSize:
|
|
196356
|
+
titleFontSize: distance2.optional(),
|
|
196237
196357
|
titleInside: external_exports.boolean().default(false),
|
|
196238
196358
|
strokeStyle: external_exports.enum(["solid", "dashed"]).default("solid")
|
|
196239
196359
|
}).refine((elm) => elm.width !== undefined && elm.height !== undefined || Array.isArray(elm.overlay) && elm.overlay.length > 0, {
|
|
@@ -196244,8 +196364,8 @@ var schematicBoxProps = external_exports.object({
|
|
|
196244
196364
|
expectTypesMatch2(true);
|
|
196245
196365
|
var schematicCircleProps = external_exports.object({
|
|
196246
196366
|
center: point,
|
|
196247
|
-
radius:
|
|
196248
|
-
strokeWidth:
|
|
196367
|
+
radius: distance2,
|
|
196368
|
+
strokeWidth: distance2.optional(),
|
|
196249
196369
|
color: external_exports.string().optional(),
|
|
196250
196370
|
isFilled: external_exports.boolean().optional().default(false),
|
|
196251
196371
|
fillColor: external_exports.string().optional(),
|
|
@@ -196253,25 +196373,25 @@ var schematicCircleProps = external_exports.object({
|
|
|
196253
196373
|
});
|
|
196254
196374
|
expectTypesMatch2(true);
|
|
196255
196375
|
var schematicRectProps = external_exports.object({
|
|
196256
|
-
schX:
|
|
196257
|
-
schY:
|
|
196258
|
-
width:
|
|
196259
|
-
height:
|
|
196376
|
+
schX: distance2.optional(),
|
|
196377
|
+
schY: distance2.optional(),
|
|
196378
|
+
width: distance2,
|
|
196379
|
+
height: distance2,
|
|
196260
196380
|
rotation: rotation.default(0),
|
|
196261
|
-
strokeWidth:
|
|
196381
|
+
strokeWidth: distance2.optional(),
|
|
196262
196382
|
color: external_exports.string().optional(),
|
|
196263
196383
|
isFilled: external_exports.boolean().optional().default(false),
|
|
196264
196384
|
fillColor: external_exports.string().optional(),
|
|
196265
196385
|
isDashed: external_exports.boolean().optional().default(false),
|
|
196266
|
-
cornerRadius:
|
|
196386
|
+
cornerRadius: distance2.optional()
|
|
196267
196387
|
});
|
|
196268
196388
|
expectTypesMatch2(true);
|
|
196269
196389
|
var schematicLineProps = external_exports.object({
|
|
196270
|
-
x1:
|
|
196271
|
-
y1:
|
|
196272
|
-
x2:
|
|
196273
|
-
y2:
|
|
196274
|
-
strokeWidth:
|
|
196390
|
+
x1: distance2,
|
|
196391
|
+
y1: distance2,
|
|
196392
|
+
x2: distance2,
|
|
196393
|
+
y2: distance2,
|
|
196394
|
+
strokeWidth: distance2.optional(),
|
|
196275
196395
|
color: external_exports.string().optional(),
|
|
196276
196396
|
isDashed: external_exports.boolean().optional().default(false)
|
|
196277
196397
|
});
|
|
@@ -196284,8 +196404,8 @@ var fivePointAnchor2 = external_exports.enum([
|
|
|
196284
196404
|
"bottom"
|
|
196285
196405
|
]);
|
|
196286
196406
|
var schematicTextProps = external_exports.object({
|
|
196287
|
-
schX:
|
|
196288
|
-
schY:
|
|
196407
|
+
schX: distance2.optional(),
|
|
196408
|
+
schY: distance2.optional(),
|
|
196289
196409
|
text: external_exports.string(),
|
|
196290
196410
|
fontSize: external_exports.number().default(1),
|
|
196291
196411
|
anchor: external_exports.union([fivePointAnchor2.describe("legacy"), ninePointAnchor2]).default("center"),
|
|
@@ -196296,35 +196416,35 @@ expectTypesMatch2(true);
|
|
|
196296
196416
|
var schematicPathProps = external_exports.object({
|
|
196297
196417
|
points: external_exports.array(point).optional(),
|
|
196298
196418
|
svgPath: external_exports.string().optional(),
|
|
196299
|
-
strokeWidth:
|
|
196419
|
+
strokeWidth: distance2.optional(),
|
|
196300
196420
|
strokeColor: external_exports.string().optional(),
|
|
196301
196421
|
isFilled: external_exports.boolean().optional().default(false),
|
|
196302
196422
|
fillColor: external_exports.string().optional()
|
|
196303
196423
|
});
|
|
196304
196424
|
expectTypesMatch2(true);
|
|
196305
196425
|
var schematicTableProps = external_exports.object({
|
|
196306
|
-
schX:
|
|
196307
|
-
schY:
|
|
196426
|
+
schX: distance2.optional(),
|
|
196427
|
+
schY: distance2.optional(),
|
|
196308
196428
|
children: external_exports.any().optional(),
|
|
196309
|
-
cellPadding:
|
|
196310
|
-
borderWidth:
|
|
196429
|
+
cellPadding: distance2.optional(),
|
|
196430
|
+
borderWidth: distance2.optional(),
|
|
196311
196431
|
anchor: ninePointAnchor2.optional(),
|
|
196312
|
-
fontSize:
|
|
196432
|
+
fontSize: distance2.optional()
|
|
196313
196433
|
});
|
|
196314
196434
|
expectTypesMatch2(true);
|
|
196315
196435
|
var schematicRowProps = external_exports.object({
|
|
196316
196436
|
children: external_exports.any().optional(),
|
|
196317
|
-
height:
|
|
196437
|
+
height: distance2.optional()
|
|
196318
196438
|
});
|
|
196319
196439
|
expectTypesMatch2(true);
|
|
196320
196440
|
var schematicCellProps = external_exports.object({
|
|
196321
196441
|
children: external_exports.string().optional(),
|
|
196322
196442
|
horizontalAlign: external_exports.enum(["left", "center", "right"]).optional(),
|
|
196323
196443
|
verticalAlign: external_exports.enum(["top", "middle", "bottom"]).optional(),
|
|
196324
|
-
fontSize:
|
|
196444
|
+
fontSize: distance2.optional(),
|
|
196325
196445
|
rowSpan: external_exports.number().optional(),
|
|
196326
196446
|
colSpan: external_exports.number().optional(),
|
|
196327
|
-
width:
|
|
196447
|
+
width: distance2.optional(),
|
|
196328
196448
|
text: external_exports.string().optional()
|
|
196329
196449
|
});
|
|
196330
196450
|
expectTypesMatch2(true);
|
|
@@ -196371,29 +196491,29 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
196371
196491
|
pcbOffsetY: true,
|
|
196372
196492
|
pcbRotation: true
|
|
196373
196493
|
}).extend({
|
|
196374
|
-
strokeWidth:
|
|
196375
|
-
x1:
|
|
196376
|
-
y1:
|
|
196377
|
-
x2:
|
|
196378
|
-
y2:
|
|
196494
|
+
strokeWidth: distance2,
|
|
196495
|
+
x1: distance2,
|
|
196496
|
+
y1: distance2,
|
|
196497
|
+
x2: distance2,
|
|
196498
|
+
y2: distance2
|
|
196379
196499
|
});
|
|
196380
196500
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
196381
196501
|
filled: external_exports.boolean().default(true).optional(),
|
|
196382
196502
|
stroke: external_exports.enum(["dashed", "solid", "none"]).optional(),
|
|
196383
|
-
strokeWidth:
|
|
196384
|
-
width:
|
|
196385
|
-
height:
|
|
196386
|
-
cornerRadius:
|
|
196503
|
+
strokeWidth: distance2.optional(),
|
|
196504
|
+
width: distance2,
|
|
196505
|
+
height: distance2,
|
|
196506
|
+
cornerRadius: distance2.optional()
|
|
196387
196507
|
});
|
|
196388
196508
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
196389
196509
|
isFilled: external_exports.boolean().optional(),
|
|
196390
196510
|
isOutline: external_exports.boolean().optional(),
|
|
196391
|
-
strokeWidth:
|
|
196392
|
-
radius:
|
|
196511
|
+
strokeWidth: distance2.optional(),
|
|
196512
|
+
radius: distance2
|
|
196393
196513
|
});
|
|
196394
196514
|
var routeHintPointProps = external_exports.object({
|
|
196395
|
-
x:
|
|
196396
|
-
y:
|
|
196515
|
+
x: distance2,
|
|
196516
|
+
y: distance2,
|
|
196397
196517
|
via: external_exports.boolean().optional(),
|
|
196398
196518
|
toLayer: layer_ref.optional()
|
|
196399
196519
|
});
|
|
@@ -196427,14 +196547,14 @@ var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
|
196427
196547
|
});
|
|
196428
196548
|
expectTypesMatch2(true);
|
|
196429
196549
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
196430
|
-
width:
|
|
196431
|
-
height:
|
|
196432
|
-
strokeWidth:
|
|
196550
|
+
width: distance2,
|
|
196551
|
+
height: distance2,
|
|
196552
|
+
strokeWidth: distance2.optional(),
|
|
196433
196553
|
isFilled: external_exports.boolean().optional(),
|
|
196434
196554
|
hasStroke: external_exports.boolean().optional(),
|
|
196435
196555
|
isStrokeDashed: external_exports.boolean().optional(),
|
|
196436
196556
|
color: external_exports.string().optional(),
|
|
196437
|
-
cornerRadius:
|
|
196557
|
+
cornerRadius: distance2.optional()
|
|
196438
196558
|
});
|
|
196439
196559
|
expectTypesMatch2(true);
|
|
196440
196560
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
@@ -196464,11 +196584,11 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
196464
196584
|
pcbOffsetY: true,
|
|
196465
196585
|
pcbRotation: true
|
|
196466
196586
|
}).extend({
|
|
196467
|
-
x1:
|
|
196468
|
-
y1:
|
|
196469
|
-
x2:
|
|
196470
|
-
y2:
|
|
196471
|
-
strokeWidth:
|
|
196587
|
+
x1: distance2,
|
|
196588
|
+
y1: distance2,
|
|
196589
|
+
x2: distance2,
|
|
196590
|
+
y2: distance2,
|
|
196591
|
+
strokeWidth: distance2.optional(),
|
|
196472
196592
|
color: external_exports.string().optional(),
|
|
196473
196593
|
isDashed: external_exports.boolean().optional()
|
|
196474
196594
|
});
|
|
@@ -196488,11 +196608,11 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
196488
196608
|
from: dimensionTarget2,
|
|
196489
196609
|
to: dimensionTarget2,
|
|
196490
196610
|
text: external_exports.string().optional(),
|
|
196491
|
-
offset:
|
|
196611
|
+
offset: distance2.optional(),
|
|
196492
196612
|
font: external_exports.enum(["tscircuit2024"]).optional(),
|
|
196493
196613
|
fontSize: length.optional(),
|
|
196494
196614
|
color: external_exports.string().optional(),
|
|
196495
|
-
arrowSize:
|
|
196615
|
+
arrowSize: distance2.optional(),
|
|
196496
196616
|
units: external_exports.enum(["in", "mm"]).optional(),
|
|
196497
196617
|
outerEdgeToEdge: external_exports.literal(true).optional(),
|
|
196498
196618
|
centerToCenter: external_exports.literal(true).optional(),
|
|
@@ -209326,9 +209446,9 @@ var SingleComponentPackSolver = class extends BaseSolver2 {
|
|
|
209326
209446
|
width: p3.size.x,
|
|
209327
209447
|
height: p3.size.y
|
|
209328
209448
|
};
|
|
209329
|
-
const { distance:
|
|
209330
|
-
minObstacleGapDistance = Math.min(minObstacleGapDistance,
|
|
209331
|
-
return
|
|
209449
|
+
const { distance: distance232 } = computeDistanceBetweenBoxes(padBox, obsBox);
|
|
209450
|
+
minObstacleGapDistance = Math.min(minObstacleGapDistance, distance232);
|
|
209451
|
+
return distance232 + 0.000001 < this.minGap;
|
|
209332
209452
|
});
|
|
209333
209453
|
});
|
|
209334
209454
|
let outsideBounds = false;
|
|
@@ -225078,7 +225198,7 @@ var getStubEdges = ({
|
|
|
225078
225198
|
});
|
|
225079
225199
|
}
|
|
225080
225200
|
}
|
|
225081
|
-
edges = edges.filter((e22) =>
|
|
225201
|
+
edges = edges.filter((e22) => distance23(e22.from, e22.to) > 0.01);
|
|
225082
225202
|
return edges;
|
|
225083
225203
|
};
|
|
225084
225204
|
function tryNow(fn22) {
|
|
@@ -225612,7 +225732,7 @@ var createSchematicTraceCrossingSegments = ({
|
|
|
225612
225732
|
otherEdgesIntersections.push({
|
|
225613
225733
|
otherEdge,
|
|
225614
225734
|
crossingPoint: crossingPoint2,
|
|
225615
|
-
distanceFromEdgeFrom:
|
|
225735
|
+
distanceFromEdgeFrom: distance23(edge.from, crossingPoint2)
|
|
225616
225736
|
});
|
|
225617
225737
|
}
|
|
225618
225738
|
}
|
|
@@ -225638,7 +225758,7 @@ var createSchematicTraceCrossingSegments = ({
|
|
|
225638
225758
|
x: crossingPoint.x + crossingUnitVec.x * crossingSegmentLength / 2,
|
|
225639
225759
|
y: crossingPoint.y + crossingUnitVec.y * crossingSegmentLength / 2
|
|
225640
225760
|
};
|
|
225641
|
-
const overshot =
|
|
225761
|
+
const overshot = distance23(afterCrossing, edge.to) < crossingSegmentLength;
|
|
225642
225762
|
const newEdges = [
|
|
225643
225763
|
{ from: edge.from, to: beforeCrossing },
|
|
225644
225764
|
{ from: beforeCrossing, to: afterCrossing, is_crossing: true },
|
|
@@ -229896,8 +230016,8 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
229896
230016
|
} else if (props.shape === "polygon") {
|
|
229897
230017
|
const transformedPoints = props.points.map((point6) => {
|
|
229898
230018
|
const transformed = applyToPoint24(globalTransform, {
|
|
229899
|
-
x:
|
|
229900
|
-
y:
|
|
230019
|
+
x: distance2.parse(point6.x),
|
|
230020
|
+
y: distance2.parse(point6.y)
|
|
229901
230021
|
});
|
|
229902
230022
|
return {
|
|
229903
230023
|
x: transformed.x,
|
|
@@ -231561,7 +231681,7 @@ var CadModel = class extends PrimitiveComponent2 {
|
|
|
231561
231681
|
z: props.pcbZ ?? 0,
|
|
231562
231682
|
...typeof props.positionOffset === "object" ? props.positionOffset : {}
|
|
231563
231683
|
});
|
|
231564
|
-
const zOffsetFromSurface = props.zOffsetFromSurface !== undefined ?
|
|
231684
|
+
const zOffsetFromSurface = props.zOffsetFromSurface !== undefined ? distance2.parse(props.zOffsetFromSurface) : 0;
|
|
231565
231685
|
const layer = parent.props.layer === "bottom" ? "bottom" : "top";
|
|
231566
231686
|
const ext = props.modelUrl ? getFileExtension(props.modelUrl) : undefined;
|
|
231567
231687
|
const modelUrlWithoutExtFragment = props.modelUrl?.replace(/#ext=\w+$/, "");
|
|
@@ -233207,7 +233327,7 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
233207
233327
|
z: 0,
|
|
233208
233328
|
...typeof cadModel?.positionOffset === "object" ? cadModel.positionOffset : {}
|
|
233209
233329
|
});
|
|
233210
|
-
const zOffsetFromSurface = cadModel && typeof cadModel === "object" && "zOffsetFromSurface" in cadModel ? cadModel.zOffsetFromSurface !== undefined ?
|
|
233330
|
+
const zOffsetFromSurface = cadModel && typeof cadModel === "object" && "zOffsetFromSurface" in cadModel ? cadModel.zOffsetFromSurface !== undefined ? distance2.parse(cadModel.zOffsetFromSurface) : 0 : 0;
|
|
233211
233331
|
const computedLayer = this.props.layer === "bottom" ? "bottom" : "top";
|
|
233212
233332
|
const globalTransform = this._computePcbGlobalTransformBeforeLayout();
|
|
233213
233333
|
const decomposedTransform = decomposeTSR(globalTransform);
|
|
@@ -238321,8 +238441,8 @@ var Group6 = class extends NormalComponent3 {
|
|
|
238321
238441
|
const groupProps2 = props;
|
|
238322
238442
|
const hasOutline = groupProps2.outline && groupProps2.outline.length > 0;
|
|
238323
238443
|
const numericOutline = hasOutline ? groupProps2.outline.map((point6) => ({
|
|
238324
|
-
x:
|
|
238325
|
-
y:
|
|
238444
|
+
x: distance2.parse(point6.x),
|
|
238445
|
+
y: distance2.parse(point6.y)
|
|
238326
238446
|
})) : undefined;
|
|
238327
238447
|
const ctx = this.props;
|
|
238328
238448
|
const anchorPosition = this._getGlobalPcbPositionBeforeLayout();
|
|
@@ -238362,8 +238482,8 @@ var Group6 = class extends NormalComponent3 {
|
|
|
238362
238482
|
const hasExplicitPositioning = this._parsedProps.pcbX !== undefined || this._parsedProps.pcbY !== undefined;
|
|
238363
238483
|
if (hasOutline) {
|
|
238364
238484
|
const numericOutline = props.outline.map((point6) => ({
|
|
238365
|
-
x:
|
|
238366
|
-
y:
|
|
238485
|
+
x: distance2.parse(point6.x),
|
|
238486
|
+
y: distance2.parse(point6.y)
|
|
238367
238487
|
}));
|
|
238368
238488
|
const outlineBounds = getBoundsFromPoints2(numericOutline);
|
|
238369
238489
|
if (!outlineBounds)
|
|
@@ -240919,8 +241039,8 @@ function generatePanelTabsAndMouseBites(boards, options) {
|
|
|
240919
241039
|
}
|
|
240920
241040
|
var getBoardDimensionsFromProps = (board) => {
|
|
240921
241041
|
const props = board._parsedProps;
|
|
240922
|
-
let width = props.width != null ?
|
|
240923
|
-
let height = props.height != null ?
|
|
241042
|
+
let width = props.width != null ? distance2.parse(props.width) : undefined;
|
|
241043
|
+
let height = props.height != null ? distance2.parse(props.height) : undefined;
|
|
240924
241044
|
if ((width === undefined || height === undefined) && props.outline?.length) {
|
|
240925
241045
|
const outlineBounds = getBoundsFromPoints2(props.outline);
|
|
240926
241046
|
if (outlineBounds) {
|
|
@@ -240960,8 +241080,8 @@ function packIntoGrid({
|
|
|
240960
241080
|
}
|
|
240961
241081
|
let cols;
|
|
240962
241082
|
let rows;
|
|
240963
|
-
const minCellWidth = cellWidth ?
|
|
240964
|
-
const minCellHeight = cellHeight ?
|
|
241083
|
+
const minCellWidth = cellWidth ? distance2.parse(cellWidth) : 0;
|
|
241084
|
+
const minCellHeight = cellHeight ? distance2.parse(cellHeight) : 0;
|
|
240965
241085
|
if (col !== undefined) {
|
|
240966
241086
|
cols = col;
|
|
240967
241087
|
rows = row ?? Math.ceil(itemsWithDims.length / cols);
|
|
@@ -241047,8 +241167,8 @@ function getItemDimensions(item, db) {
|
|
|
241047
241167
|
const props = subpanel._parsedProps;
|
|
241048
241168
|
if (props.width !== undefined && props.height !== undefined) {
|
|
241049
241169
|
return {
|
|
241050
|
-
width:
|
|
241051
|
-
height:
|
|
241170
|
+
width: distance2.parse(props.width),
|
|
241171
|
+
height: distance2.parse(props.height)
|
|
241052
241172
|
};
|
|
241053
241173
|
}
|
|
241054
241174
|
const directBoards = subpanel._getDirectBoardChildren();
|
|
@@ -241078,7 +241198,7 @@ function getItemDimensions(item, db) {
|
|
|
241078
241198
|
return getBoardDimensionsFromProps(directBoards[0]);
|
|
241079
241199
|
}
|
|
241080
241200
|
if (subpanel._cachedGridWidth > 0 && subpanel._cachedGridHeight > 0) {
|
|
241081
|
-
const edgePadding =
|
|
241201
|
+
const edgePadding = distance2.parse(props.edgePadding ?? 5);
|
|
241082
241202
|
return {
|
|
241083
241203
|
width: subpanel._cachedGridWidth + edgePadding * 2,
|
|
241084
241204
|
height: subpanel._cachedGridHeight + edgePadding * 2
|
|
@@ -241204,13 +241324,13 @@ var Subpanel = class _Subpanel extends Group6 {
|
|
|
241204
241324
|
edgePaddingTop: edgePaddingTopProp,
|
|
241205
241325
|
edgePaddingBottom: edgePaddingBottomProp
|
|
241206
241326
|
} = this._parsedProps;
|
|
241207
|
-
const edgePadding =
|
|
241208
|
-
const edgePaddingLeft =
|
|
241209
|
-
const edgePaddingRight =
|
|
241210
|
-
const edgePaddingTop =
|
|
241211
|
-
const edgePaddingBottom =
|
|
241212
|
-
const panelWidth =
|
|
241213
|
-
const panelHeight =
|
|
241327
|
+
const edgePadding = distance2.parse(edgePaddingProp ?? 5);
|
|
241328
|
+
const edgePaddingLeft = distance2.parse(edgePaddingLeftProp ?? edgePadding);
|
|
241329
|
+
const edgePaddingRight = distance2.parse(edgePaddingRightProp ?? edgePadding);
|
|
241330
|
+
const edgePaddingTop = distance2.parse(edgePaddingTopProp ?? edgePadding);
|
|
241331
|
+
const edgePaddingBottom = distance2.parse(edgePaddingBottomProp ?? edgePadding);
|
|
241332
|
+
const panelWidth = distance2.parse(this._parsedProps.width);
|
|
241333
|
+
const panelHeight = distance2.parse(this._parsedProps.height);
|
|
241214
241334
|
availablePanelWidth = panelWidth - edgePaddingLeft - edgePaddingRight;
|
|
241215
241335
|
availablePanelHeight = panelHeight - edgePaddingTop - edgePaddingBottom;
|
|
241216
241336
|
}
|
|
@@ -241288,8 +241408,8 @@ var Subpanel = class _Subpanel extends Group6 {
|
|
|
241288
241408
|
return;
|
|
241289
241409
|
if (hasExplicitWidth && hasExplicitHeight) {
|
|
241290
241410
|
db.pcb_group.update(this.pcb_group_id, {
|
|
241291
|
-
width:
|
|
241292
|
-
height:
|
|
241411
|
+
width: distance2.parse(this._parsedProps.width),
|
|
241412
|
+
height: distance2.parse(this._parsedProps.height)
|
|
241293
241413
|
});
|
|
241294
241414
|
} else if (gridWidth > 0 || gridHeight > 0) {
|
|
241295
241415
|
const {
|
|
@@ -241299,14 +241419,14 @@ var Subpanel = class _Subpanel extends Group6 {
|
|
|
241299
241419
|
edgePaddingTop: edgePaddingTopProp,
|
|
241300
241420
|
edgePaddingBottom: edgePaddingBottomProp
|
|
241301
241421
|
} = this._parsedProps;
|
|
241302
|
-
const edgePadding =
|
|
241303
|
-
const edgePaddingLeft =
|
|
241304
|
-
const edgePaddingRight =
|
|
241305
|
-
const edgePaddingTop =
|
|
241306
|
-
const edgePaddingBottom =
|
|
241422
|
+
const edgePadding = distance2.parse(edgePaddingProp ?? 5);
|
|
241423
|
+
const edgePaddingLeft = distance2.parse(edgePaddingLeftProp ?? edgePadding);
|
|
241424
|
+
const edgePaddingRight = distance2.parse(edgePaddingRightProp ?? edgePadding);
|
|
241425
|
+
const edgePaddingTop = distance2.parse(edgePaddingTopProp ?? edgePadding);
|
|
241426
|
+
const edgePaddingBottom = distance2.parse(edgePaddingBottomProp ?? edgePadding);
|
|
241307
241427
|
db.pcb_group.update(this.pcb_group_id, {
|
|
241308
|
-
width: hasExplicitWidth ?
|
|
241309
|
-
height: hasExplicitHeight ?
|
|
241428
|
+
width: hasExplicitWidth ? distance2.parse(this._parsedProps.width) : gridWidth + edgePaddingLeft + edgePaddingRight,
|
|
241429
|
+
height: hasExplicitHeight ? distance2.parse(this._parsedProps.height) : gridHeight + edgePaddingTop + edgePaddingBottom
|
|
241310
241430
|
});
|
|
241311
241431
|
}
|
|
241312
241432
|
}
|
|
@@ -241364,8 +241484,8 @@ var Panel = class extends Subpanel {
|
|
|
241364
241484
|
const { db } = this.root;
|
|
241365
241485
|
const props = this._parsedProps;
|
|
241366
241486
|
const inserted = db.pcb_panel.insert({
|
|
241367
|
-
width: props.width !== undefined ?
|
|
241368
|
-
height: props.height !== undefined ?
|
|
241487
|
+
width: props.width !== undefined ? distance2.parse(props.width) : 0,
|
|
241488
|
+
height: props.height !== undefined ? distance2.parse(props.height) : 0,
|
|
241369
241489
|
center: this._getGlobalPcbPositionBeforeLayout(),
|
|
241370
241490
|
covered_with_solder_mask: !(props.noSolderMask ?? false)
|
|
241371
241491
|
});
|
|
@@ -241381,8 +241501,8 @@ var Panel = class extends Subpanel {
|
|
|
241381
241501
|
return;
|
|
241382
241502
|
if (hasExplicitWidth && hasExplicitHeight) {
|
|
241383
241503
|
db.pcb_panel.update(this.pcb_panel_id, {
|
|
241384
|
-
width:
|
|
241385
|
-
height:
|
|
241504
|
+
width: distance2.parse(this._parsedProps.width),
|
|
241505
|
+
height: distance2.parse(this._parsedProps.height)
|
|
241386
241506
|
});
|
|
241387
241507
|
} else if (gridWidth > 0 || gridHeight > 0) {
|
|
241388
241508
|
const {
|
|
@@ -241392,14 +241512,14 @@ var Panel = class extends Subpanel {
|
|
|
241392
241512
|
edgePaddingTop: edgePaddingTopProp,
|
|
241393
241513
|
edgePaddingBottom: edgePaddingBottomProp
|
|
241394
241514
|
} = this._parsedProps;
|
|
241395
|
-
const edgePadding =
|
|
241396
|
-
const edgePaddingLeft =
|
|
241397
|
-
const edgePaddingRight =
|
|
241398
|
-
const edgePaddingTop =
|
|
241399
|
-
const edgePaddingBottom =
|
|
241515
|
+
const edgePadding = distance2.parse(edgePaddingProp ?? 5);
|
|
241516
|
+
const edgePaddingLeft = distance2.parse(edgePaddingLeftProp ?? edgePadding);
|
|
241517
|
+
const edgePaddingRight = distance2.parse(edgePaddingRightProp ?? edgePadding);
|
|
241518
|
+
const edgePaddingTop = distance2.parse(edgePaddingTopProp ?? edgePadding);
|
|
241519
|
+
const edgePaddingBottom = distance2.parse(edgePaddingBottomProp ?? edgePadding);
|
|
241400
241520
|
db.pcb_panel.update(this.pcb_panel_id, {
|
|
241401
|
-
width: hasExplicitWidth ?
|
|
241402
|
-
height: hasExplicitHeight ?
|
|
241521
|
+
width: hasExplicitWidth ? distance2.parse(this._parsedProps.width) : gridWidth + edgePaddingLeft + edgePaddingRight,
|
|
241522
|
+
height: hasExplicitHeight ? distance2.parse(this._parsedProps.height) : gridHeight + edgePaddingTop + edgePaddingBottom
|
|
241403
241523
|
});
|
|
241404
241524
|
}
|
|
241405
241525
|
}
|
|
@@ -241412,8 +241532,8 @@ var Panel = class extends Subpanel {
|
|
|
241412
241532
|
const props = this._parsedProps;
|
|
241413
241533
|
const currentPanel = db.pcb_panel.get(this.pcb_panel_id);
|
|
241414
241534
|
db.pcb_panel.update(this.pcb_panel_id, {
|
|
241415
|
-
width: props.width !== undefined ?
|
|
241416
|
-
height: props.height !== undefined ?
|
|
241535
|
+
width: props.width !== undefined ? distance2.parse(props.width) : currentPanel?.width,
|
|
241536
|
+
height: props.height !== undefined ? distance2.parse(props.height) : currentPanel?.height,
|
|
241417
241537
|
center: this._getGlobalPcbPositionBeforeLayout(),
|
|
241418
241538
|
covered_with_solder_mask: !(props.noSolderMask ?? false)
|
|
241419
241539
|
});
|
|
@@ -242686,15 +242806,15 @@ var Fiducial = class extends PrimitiveComponent2 {
|
|
|
242686
242806
|
shape: "circle",
|
|
242687
242807
|
x: position2.x,
|
|
242688
242808
|
y: position2.y,
|
|
242689
|
-
radius:
|
|
242690
|
-
soldermask_margin: props.soldermaskPullback ?
|
|
242809
|
+
radius: distance2.parse(props.padDiameter) / 2,
|
|
242810
|
+
soldermask_margin: props.soldermaskPullback ? distance2.parse(props.soldermaskPullback) : distance2.parse(props.padDiameter) / 2,
|
|
242691
242811
|
is_covered_with_solder_mask: true
|
|
242692
242812
|
});
|
|
242693
242813
|
this.pcb_smtpad_id = pcb_smtpad2.pcb_smtpad_id;
|
|
242694
242814
|
}
|
|
242695
242815
|
getPcbSize() {
|
|
242696
242816
|
const { _parsedProps: props } = this;
|
|
242697
|
-
const d22 =
|
|
242817
|
+
const d22 = distance2.parse(props.padDiameter);
|
|
242698
242818
|
return { width: d22, height: d22 };
|
|
242699
242819
|
}
|
|
242700
242820
|
_setPositionFromLayout(newCenter) {
|
|
@@ -253162,7 +253282,7 @@ var registerDoctor = (program2) => {
|
|
|
253162
253282
|
import fs55 from "node:fs";
|
|
253163
253283
|
import path59 from "node:path";
|
|
253164
253284
|
import { promisify as promisify3 } from "node:util";
|
|
253165
|
-
import { convertCircuitJsonToGltf as
|
|
253285
|
+
import { convertCircuitJsonToGltf as convertCircuitJsonToGltf4 } from "circuit-json-to-gltf";
|
|
253166
253286
|
import {
|
|
253167
253287
|
convertCircuitJsonToPcbSvg as convertCircuitJsonToPcbSvg4,
|
|
253168
253288
|
convertCircuitJsonToSchematicSvg as convertCircuitJsonToSchematicSvg4,
|
|
@@ -256819,10 +256939,10 @@ var exportSnippet = async ({
|
|
|
256819
256939
|
outputContent = convertCircuitJsonToReadableNetlist(circuitJson);
|
|
256820
256940
|
break;
|
|
256821
256941
|
case "gltf":
|
|
256822
|
-
outputContent = JSON.stringify(await
|
|
256942
|
+
outputContent = JSON.stringify(await convertCircuitJsonToGltf4(circuitJson, getCircuitJsonToGltfOptions({ format: "gltf" })), null, 2);
|
|
256823
256943
|
break;
|
|
256824
256944
|
case "glb":
|
|
256825
|
-
outputContent = Buffer.from(await
|
|
256945
|
+
outputContent = Buffer.from(await convertCircuitJsonToGltf4(circuitJson, getCircuitJsonToGltfOptions({ format: "glb" })));
|
|
256826
256946
|
break;
|
|
256827
256947
|
case "srj":
|
|
256828
256948
|
{
|
|
@@ -278219,61 +278339,6 @@ var registerSimulate = (program3) => {
|
|
|
278219
278339
|
});
|
|
278220
278340
|
};
|
|
278221
278341
|
|
|
278222
|
-
// lib/shared/camera-presets.ts
|
|
278223
|
-
function normalizeDir(dir) {
|
|
278224
|
-
const len = Math.sqrt(dir[0] ** 2 + dir[1] ** 2 + dir[2] ** 2);
|
|
278225
|
-
if (len === 0)
|
|
278226
|
-
return [0, 1, 0];
|
|
278227
|
-
return [dir[0] / len, dir[1] / len, dir[2] / len];
|
|
278228
|
-
}
|
|
278229
|
-
function distance9(a2, b) {
|
|
278230
|
-
return Math.sqrt((a2[0] - b[0]) ** 2 + (a2[1] - b[1]) ** 2 + (a2[2] - b[2]) ** 2);
|
|
278231
|
-
}
|
|
278232
|
-
function repositionCamera(cam, dir, distOverride) {
|
|
278233
|
-
const dist = distOverride ?? distance9(cam.camPos, cam.lookAt);
|
|
278234
|
-
const [nx2, ny2, nz] = normalizeDir(dir);
|
|
278235
|
-
return {
|
|
278236
|
-
camPos: [
|
|
278237
|
-
cam.lookAt[0] + nx2 * dist,
|
|
278238
|
-
cam.lookAt[1] + ny2 * dist,
|
|
278239
|
-
cam.lookAt[2] + nz * dist
|
|
278240
|
-
],
|
|
278241
|
-
lookAt: cam.lookAt,
|
|
278242
|
-
fov: cam.fov
|
|
278243
|
-
};
|
|
278244
|
-
}
|
|
278245
|
-
var CAMERA_PRESETS = {
|
|
278246
|
-
"top-down": (cam) => repositionCamera(cam, [0.00000001, 1, -0.001]),
|
|
278247
|
-
"top-down-ortho": (cam) => {
|
|
278248
|
-
const desiredFov = 3;
|
|
278249
|
-
const dir = [0.00000001, 1, -0.001];
|
|
278250
|
-
const origDist = distance9(cam.camPos, cam.lookAt);
|
|
278251
|
-
const origFovRad = Math.max(cam.fov * Math.PI / 180, 0.01);
|
|
278252
|
-
const desiredFovRad = Math.max(desiredFov * Math.PI / 180, 0.01);
|
|
278253
|
-
const tanOrig = Math.tan(origFovRad / 2);
|
|
278254
|
-
const tanDesired = Math.max(Math.tan(desiredFovRad / 2), 0.0001);
|
|
278255
|
-
const distScale = Number.isFinite(tanOrig / tanDesired) && tanOrig > 0 ? tanOrig / tanDesired : 1;
|
|
278256
|
-
const newDist = origDist * distScale;
|
|
278257
|
-
const repositioned = repositionCamera(cam, dir, newDist);
|
|
278258
|
-
return { ...repositioned, fov: desiredFov };
|
|
278259
|
-
},
|
|
278260
|
-
"top-left-corner": (cam) => repositionCamera(cam, [0.7, 1.2, -0.8]),
|
|
278261
|
-
"top-left": (cam) => repositionCamera(cam, [1, 1.2, 0]),
|
|
278262
|
-
"top-right-corner": (cam) => repositionCamera(cam, [-0.7, 1.2, -0.8]),
|
|
278263
|
-
"top-right": (cam) => repositionCamera(cam, [-1, 1.2, 0]),
|
|
278264
|
-
"left-sideview": (cam) => repositionCamera(cam, [1, 0.05, 0]),
|
|
278265
|
-
"right-sideview": (cam) => repositionCamera(cam, [-1, 0.05, 0]),
|
|
278266
|
-
front: (cam) => repositionCamera(cam, [0, 0.05, -1]),
|
|
278267
|
-
"top-center-angled": (cam) => repositionCamera(cam, [0, 1, -1])
|
|
278268
|
-
};
|
|
278269
|
-
var CAMERA_PRESET_NAMES = Object.keys(CAMERA_PRESETS);
|
|
278270
|
-
function applyCameraPreset(preset, cam) {
|
|
278271
|
-
if (!(preset in CAMERA_PRESETS)) {
|
|
278272
|
-
throw new Error(`Unknown camera preset "${preset}". Valid presets: ${CAMERA_PRESET_NAMES.join(", ")}`);
|
|
278273
|
-
}
|
|
278274
|
-
return CAMERA_PRESETS[preset](cam);
|
|
278275
|
-
}
|
|
278276
|
-
|
|
278277
278342
|
// lib/shared/snapshot-project.ts
|
|
278278
278343
|
import fs66 from "node:fs";
|
|
278279
278344
|
import path70 from "node:path";
|
|
@@ -278362,15 +278427,10 @@ var snapshotFilesWithWorkerPool = async (options) => {
|
|
|
278362
278427
|
// lib/shared/process-snapshot-file.ts
|
|
278363
278428
|
import fs65 from "node:fs";
|
|
278364
278429
|
import path69 from "node:path";
|
|
278365
|
-
import {
|
|
278366
|
-
convertCircuitJsonToGltf as convertCircuitJsonToGltf6,
|
|
278367
|
-
getBestCameraPosition as getBestCameraPosition3
|
|
278368
|
-
} from "circuit-json-to-gltf";
|
|
278369
278430
|
import {
|
|
278370
278431
|
convertCircuitJsonToPcbSvg as convertCircuitJsonToPcbSvg5,
|
|
278371
278432
|
convertCircuitJsonToSchematicSvg as convertCircuitJsonToSchematicSvg5
|
|
278372
278433
|
} from "circuit-to-svg";
|
|
278373
|
-
import { renderGLTFToPNGFromGLB as renderGLTFToPNGFromGLB3 } from "poppygl";
|
|
278374
278434
|
|
|
278375
278435
|
// lib/shared/compare-images.ts
|
|
278376
278436
|
import looksSame from "@tscircuit/image-utils/looks-same";
|
|
@@ -278506,15 +278566,7 @@ var processSnapshotFile = async ({
|
|
|
278506
278566
|
let png3d = null;
|
|
278507
278567
|
if (threeD && !simulationOnly) {
|
|
278508
278568
|
try {
|
|
278509
|
-
|
|
278510
|
-
if (!(glbBuffer instanceof ArrayBuffer)) {
|
|
278511
|
-
throw new Error("Expected ArrayBuffer from convertCircuitJsonToGltf with glb format");
|
|
278512
|
-
}
|
|
278513
|
-
let cameraOptions = getBestCameraPosition3(circuitJson);
|
|
278514
|
-
if (cameraPreset) {
|
|
278515
|
-
cameraOptions = applyCameraPreset(cameraPreset, cameraOptions);
|
|
278516
|
-
}
|
|
278517
|
-
png3d = await renderGLTFToPNGFromGLB3(glbBuffer, cameraOptions);
|
|
278569
|
+
png3d = await renderCircuitJsonTo3dPng(circuitJson, { cameraPreset });
|
|
278518
278570
|
} catch (error) {
|
|
278519
278571
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
278520
278572
|
if (errorMessage.includes("No pcb_board found in circuit JSON")) {
|