easyeda 0.0.350 → 0.0.352
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/browser/index.js +67 -16
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +339 -287
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +2104 -2052
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7474,6 +7474,60 @@ var getModelStepCdnUrl = ({
|
|
|
7474
7474
|
};
|
|
7475
7475
|
var getModelCdnUrl = getModelObjCdnUrl;
|
|
7476
7476
|
|
|
7477
|
+
// lib/websafe/parse-easyeda-search-response.ts
|
|
7478
|
+
import { z as z199 } from "zod";
|
|
7479
|
+
var searchEnvelopeSchema = z199.object({
|
|
7480
|
+
success: z199.boolean(),
|
|
7481
|
+
code: z199.number().optional(),
|
|
7482
|
+
message: z199.string().optional()
|
|
7483
|
+
});
|
|
7484
|
+
var supplierNumberSchema = z199.object({ number: z199.string().nullish() }).nullish();
|
|
7485
|
+
var searchResultsSchema = z199.object({
|
|
7486
|
+
result: z199.object({
|
|
7487
|
+
lists: z199.object({
|
|
7488
|
+
lcsc: z199.array(
|
|
7489
|
+
z199.object({
|
|
7490
|
+
uuid: z199.string().min(1),
|
|
7491
|
+
lcsc: supplierNumberSchema,
|
|
7492
|
+
szlcsc: supplierNumberSchema,
|
|
7493
|
+
dataStr: z199.object({
|
|
7494
|
+
head: z199.object({
|
|
7495
|
+
c_para: z199.object({ "Supplier Part": z199.string().nullish() }).nullish()
|
|
7496
|
+
}).nullish()
|
|
7497
|
+
}).nullish()
|
|
7498
|
+
})
|
|
7499
|
+
)
|
|
7500
|
+
})
|
|
7501
|
+
})
|
|
7502
|
+
});
|
|
7503
|
+
var parseEasyEdaSearchResponse = (searchResponse, jlcpcbPartNumber) => {
|
|
7504
|
+
const envelope = searchEnvelopeSchema.safeParse(searchResponse);
|
|
7505
|
+
if (!envelope.success) {
|
|
7506
|
+
throw new Error(
|
|
7507
|
+
`Invalid EasyEDA search response for "${jlcpcbPartNumber}": expected a boolean success field`
|
|
7508
|
+
);
|
|
7509
|
+
}
|
|
7510
|
+
if (!envelope.data.success) {
|
|
7511
|
+
const { code, message } = envelope.data;
|
|
7512
|
+
throw new Error(
|
|
7513
|
+
`EasyEDA API rejected the component search for "${jlcpcbPartNumber}"${code === void 0 ? "" : ` (code ${code})`}${message ? `: ${message}` : ""}`
|
|
7514
|
+
);
|
|
7515
|
+
}
|
|
7516
|
+
const searchResults = searchResultsSchema.safeParse(searchResponse);
|
|
7517
|
+
if (!searchResults.success) {
|
|
7518
|
+
throw new Error(
|
|
7519
|
+
`Invalid EasyEDA search response for "${jlcpcbPartNumber}": expected result.lists.lcsc containing component UUIDs and supplier metadata`
|
|
7520
|
+
);
|
|
7521
|
+
}
|
|
7522
|
+
const components = searchResults.data.result.lists.lcsc;
|
|
7523
|
+
if (components.length === 0) {
|
|
7524
|
+
throw new Error(
|
|
7525
|
+
`Component not found in EasyEDA library search for "${jlcpcbPartNumber}". A supplier catalog listing does not guarantee importable symbol/footprint data.`
|
|
7526
|
+
);
|
|
7527
|
+
}
|
|
7528
|
+
return components;
|
|
7529
|
+
};
|
|
7530
|
+
|
|
7477
7531
|
// lib/websafe/fetch-easyeda-json.ts
|
|
7478
7532
|
var getModelUuidFromRawPackageDetail = (result) => {
|
|
7479
7533
|
const shapes = result.packageDetail?.dataStr?.shape;
|
|
@@ -7506,17 +7560,17 @@ var parseObjBounds = (objText) => {
|
|
|
7506
7560
|
const [, xStr, yStr, zStr] = trimmed.split(/\s+/, 4);
|
|
7507
7561
|
const x = Number(xStr);
|
|
7508
7562
|
const y = Number(yStr);
|
|
7509
|
-
const
|
|
7510
|
-
if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(
|
|
7563
|
+
const z203 = Number(zStr);
|
|
7564
|
+
if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z203)) {
|
|
7511
7565
|
continue;
|
|
7512
7566
|
}
|
|
7513
7567
|
vertexCount += 1;
|
|
7514
7568
|
minX = Math.min(minX, x);
|
|
7515
7569
|
minY = Math.min(minY, y);
|
|
7516
|
-
minZ = Math.min(minZ,
|
|
7570
|
+
minZ = Math.min(minZ, z203);
|
|
7517
7571
|
maxX = Math.max(maxX, x);
|
|
7518
7572
|
maxY = Math.max(maxY, y);
|
|
7519
|
-
maxZ = Math.max(maxZ,
|
|
7573
|
+
maxZ = Math.max(maxZ, z203);
|
|
7520
7574
|
}
|
|
7521
7575
|
if (vertexCount === 0) return null;
|
|
7522
7576
|
return {
|
|
@@ -7562,23 +7616,21 @@ async function fetchEasyEDAComponent(jlcpcbPartNumber, {
|
|
|
7562
7616
|
`Failed to search for the component (HTTP ${searchResponse.status})`
|
|
7563
7617
|
);
|
|
7564
7618
|
}
|
|
7565
|
-
const
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
}
|
|
7569
|
-
const requestedPartNumber = jlcpcbPartNumber.trim().toUpperCase();
|
|
7570
|
-
const bestMatchComponent = searchResult.result.lists.lcsc.find(
|
|
7571
|
-
(component) => {
|
|
7572
|
-
const candidatePartNumbers = [
|
|
7573
|
-
component.dataStr?.head?.c_para?.["Supplier Part"],
|
|
7574
|
-
component.lcsc?.number,
|
|
7575
|
-
component.szlcsc?.number
|
|
7576
|
-
];
|
|
7577
|
-
return candidatePartNumbers.some(
|
|
7578
|
-
(partNumber) => typeof partNumber === "string" && partNumber.trim().toUpperCase() === requestedPartNumber
|
|
7579
|
-
);
|
|
7580
|
-
}
|
|
7619
|
+
const searchComponents = parseEasyEdaSearchResponse(
|
|
7620
|
+
await searchResponse.json(),
|
|
7621
|
+
jlcpcbPartNumber
|
|
7581
7622
|
);
|
|
7623
|
+
const requestedPartNumber = jlcpcbPartNumber.trim().toUpperCase();
|
|
7624
|
+
const bestMatchComponent = searchComponents.find((component) => {
|
|
7625
|
+
const candidatePartNumbers = [
|
|
7626
|
+
component.dataStr?.head?.c_para?.["Supplier Part"],
|
|
7627
|
+
component.lcsc?.number,
|
|
7628
|
+
component.szlcsc?.number
|
|
7629
|
+
];
|
|
7630
|
+
return candidatePartNumbers.some(
|
|
7631
|
+
(partNumber) => typeof partNumber === "string" && partNumber.trim().toUpperCase() === requestedPartNumber
|
|
7632
|
+
);
|
|
7633
|
+
});
|
|
7582
7634
|
if (!bestMatchComponent) {
|
|
7583
7635
|
throw new Error(
|
|
7584
7636
|
`No exact EasyEDA component match for "${jlcpcbPartNumber}"`
|
|
@@ -7634,18 +7686,18 @@ async function fetchEasyEDAComponent(jlcpcbPartNumber, {
|
|
|
7634
7686
|
}
|
|
7635
7687
|
|
|
7636
7688
|
// lib/schemas/easy-eda-json-schema.ts
|
|
7637
|
-
import { z as
|
|
7689
|
+
import { z as z202 } from "zod";
|
|
7638
7690
|
|
|
7639
7691
|
// lib/schemas/package-detail-shape-schema.ts
|
|
7640
|
-
import { z as
|
|
7641
|
-
var safeNumber = (defaultValue = 0) =>
|
|
7692
|
+
import { z as z200 } from "zod";
|
|
7693
|
+
var safeNumber = (defaultValue = 0) => z200.union([z200.number(), z200.string()]).transform((val) => {
|
|
7642
7694
|
const num = Number(val);
|
|
7643
7695
|
return Number.isNaN(num) ? defaultValue : num;
|
|
7644
7696
|
}).default(defaultValue);
|
|
7645
|
-
var tenthmil =
|
|
7697
|
+
var tenthmil = z200.union([z200.number(), z200.string()]).optional().transform(
|
|
7646
7698
|
(n) => typeof n === "string" && n.endsWith("mil") ? n : `${Number.parseFloat(n) * 10}mil`
|
|
7647
|
-
).pipe(
|
|
7648
|
-
var PointSchema =
|
|
7699
|
+
).pipe(z200.string());
|
|
7700
|
+
var PointSchema = z200.any().transform((p) => {
|
|
7649
7701
|
if (Array.isArray(p)) {
|
|
7650
7702
|
const [x, y] = p;
|
|
7651
7703
|
return { x, y };
|
|
@@ -7655,106 +7707,106 @@ var PointSchema = z199.any().transform((p) => {
|
|
|
7655
7707
|
}
|
|
7656
7708
|
throw new Error(`Invalid point: ${p}`);
|
|
7657
7709
|
}).pipe(
|
|
7658
|
-
|
|
7659
|
-
x:
|
|
7660
|
-
y:
|
|
7710
|
+
z200.object({
|
|
7711
|
+
x: z200.number(),
|
|
7712
|
+
y: z200.number()
|
|
7661
7713
|
})
|
|
7662
7714
|
);
|
|
7663
|
-
var BaseShapeSchema =
|
|
7664
|
-
type:
|
|
7665
|
-
id:
|
|
7666
|
-
layer:
|
|
7715
|
+
var BaseShapeSchema = z200.object({
|
|
7716
|
+
type: z200.string(),
|
|
7717
|
+
id: z200.string().optional(),
|
|
7718
|
+
layer: z200.coerce.number().optional()
|
|
7667
7719
|
});
|
|
7668
7720
|
var TrackSchema = BaseShapeSchema.extend({
|
|
7669
|
-
type:
|
|
7670
|
-
width:
|
|
7671
|
-
points:
|
|
7721
|
+
type: z200.literal("TRACK"),
|
|
7722
|
+
width: z200.coerce.number(),
|
|
7723
|
+
points: z200.array(PointSchema)
|
|
7672
7724
|
});
|
|
7673
7725
|
var PadSchema = BaseShapeSchema.extend({
|
|
7674
|
-
type:
|
|
7675
|
-
shape:
|
|
7676
|
-
center:
|
|
7726
|
+
type: z200.literal("PAD"),
|
|
7727
|
+
shape: z200.enum(["RECT", "ELLIPSE", "OVAL", "POLYGON"]),
|
|
7728
|
+
center: z200.object({
|
|
7677
7729
|
x: tenthmil,
|
|
7678
7730
|
y: tenthmil
|
|
7679
7731
|
}),
|
|
7680
7732
|
width: tenthmil,
|
|
7681
7733
|
height: tenthmil,
|
|
7682
|
-
layermask:
|
|
7683
|
-
net:
|
|
7684
|
-
number:
|
|
7734
|
+
layermask: z200.number(),
|
|
7735
|
+
net: z200.union([z200.string(), z200.number()]).optional(),
|
|
7736
|
+
number: z200.union([z200.string(), z200.number()]),
|
|
7685
7737
|
holeRadius: tenthmil,
|
|
7686
|
-
points:
|
|
7738
|
+
points: z200.array(PointSchema).optional(),
|
|
7687
7739
|
rotation: safeNumber(0),
|
|
7688
7740
|
// Will default to 0 if NaN or missing
|
|
7689
|
-
plated:
|
|
7741
|
+
plated: z200.boolean()
|
|
7690
7742
|
});
|
|
7691
7743
|
var ArcSchema = BaseShapeSchema.extend({
|
|
7692
|
-
type:
|
|
7693
|
-
width:
|
|
7744
|
+
type: z200.literal("ARC"),
|
|
7745
|
+
width: z200.number(),
|
|
7694
7746
|
start: PointSchema,
|
|
7695
7747
|
end: PointSchema,
|
|
7696
|
-
radiusX:
|
|
7697
|
-
radiusY:
|
|
7698
|
-
largeArc:
|
|
7699
|
-
sweepDirection:
|
|
7748
|
+
radiusX: z200.number(),
|
|
7749
|
+
radiusY: z200.number(),
|
|
7750
|
+
largeArc: z200.boolean(),
|
|
7751
|
+
sweepDirection: z200.enum(["CW", "CCW"])
|
|
7700
7752
|
});
|
|
7701
7753
|
var CircleSchema = BaseShapeSchema.extend({
|
|
7702
|
-
type:
|
|
7754
|
+
type: z200.literal("CIRCLE"),
|
|
7703
7755
|
center: PointSchema,
|
|
7704
|
-
radius:
|
|
7705
|
-
width:
|
|
7756
|
+
radius: z200.number(),
|
|
7757
|
+
width: z200.number()
|
|
7706
7758
|
});
|
|
7707
7759
|
var SolidRegionSchema = BaseShapeSchema.extend({
|
|
7708
|
-
type:
|
|
7709
|
-
layermask:
|
|
7710
|
-
pathData:
|
|
7711
|
-
points:
|
|
7712
|
-
fillStyle:
|
|
7760
|
+
type: z200.literal("SOLIDREGION"),
|
|
7761
|
+
layermask: z200.number(),
|
|
7762
|
+
pathData: z200.string(),
|
|
7763
|
+
points: z200.array(PointSchema),
|
|
7764
|
+
fillStyle: z200.string().default("none")
|
|
7713
7765
|
});
|
|
7714
7766
|
var SVGNodeSchema = BaseShapeSchema.extend({
|
|
7715
|
-
type:
|
|
7716
|
-
svgData:
|
|
7717
|
-
gId:
|
|
7718
|
-
nodeName:
|
|
7719
|
-
nodeType:
|
|
7720
|
-
layerid:
|
|
7721
|
-
attrs:
|
|
7722
|
-
childNodes:
|
|
7767
|
+
type: z200.literal("SVGNODE"),
|
|
7768
|
+
svgData: z200.object({
|
|
7769
|
+
gId: z200.string(),
|
|
7770
|
+
nodeName: z200.string(),
|
|
7771
|
+
nodeType: z200.number(),
|
|
7772
|
+
layerid: z200.string(),
|
|
7773
|
+
attrs: z200.record(z200.string(), z200.string()),
|
|
7774
|
+
childNodes: z200.array(z200.unknown())
|
|
7723
7775
|
})
|
|
7724
7776
|
});
|
|
7725
7777
|
var HoleSchema = BaseShapeSchema.extend({
|
|
7726
|
-
type:
|
|
7778
|
+
type: z200.literal("HOLE"),
|
|
7727
7779
|
center: PointSchema,
|
|
7728
|
-
radius:
|
|
7780
|
+
radius: z200.number()
|
|
7729
7781
|
});
|
|
7730
7782
|
var ViaSchema = BaseShapeSchema.extend({
|
|
7731
|
-
type:
|
|
7783
|
+
type: z200.literal("VIA"),
|
|
7732
7784
|
center: PointSchema,
|
|
7733
|
-
outerDiameter:
|
|
7734
|
-
holeRadius:
|
|
7785
|
+
outerDiameter: z200.number(),
|
|
7786
|
+
holeRadius: z200.number()
|
|
7735
7787
|
});
|
|
7736
7788
|
var RectSchema = BaseShapeSchema.extend({
|
|
7737
|
-
type:
|
|
7789
|
+
type: z200.literal("RECT"),
|
|
7738
7790
|
x: tenthmil,
|
|
7739
7791
|
y: tenthmil,
|
|
7740
7792
|
width: tenthmil,
|
|
7741
7793
|
height: tenthmil,
|
|
7742
|
-
lineWidth:
|
|
7743
|
-
fillStyle:
|
|
7744
|
-
rotation:
|
|
7794
|
+
lineWidth: z200.number(),
|
|
7795
|
+
fillStyle: z200.string().default("none"),
|
|
7796
|
+
rotation: z200.number().optional()
|
|
7745
7797
|
});
|
|
7746
7798
|
var TextSchema = BaseShapeSchema.extend({
|
|
7747
|
-
type:
|
|
7748
|
-
text:
|
|
7799
|
+
type: z200.literal("TEXT"),
|
|
7800
|
+
text: z200.string(),
|
|
7749
7801
|
x: tenthmil,
|
|
7750
7802
|
y: tenthmil,
|
|
7751
|
-
size_mm:
|
|
7752
|
-
rotation:
|
|
7753
|
-
layer:
|
|
7754
|
-
textAnchor:
|
|
7755
|
-
font:
|
|
7803
|
+
size_mm: z200.number(),
|
|
7804
|
+
rotation: z200.number().optional(),
|
|
7805
|
+
layer: z200.number().optional(),
|
|
7806
|
+
textAnchor: z200.enum(["L", "C", "R", ""]).optional().transform((val) => val === "" ? void 0 : val),
|
|
7807
|
+
font: z200.string().optional()
|
|
7756
7808
|
});
|
|
7757
|
-
var PackageDetailShapeSchema =
|
|
7809
|
+
var PackageDetailShapeSchema = z200.discriminatedUnion("type", [
|
|
7758
7810
|
TrackSchema,
|
|
7759
7811
|
PadSchema,
|
|
7760
7812
|
ArcSchema,
|
|
@@ -7776,9 +7828,9 @@ var pairs = (arr) => {
|
|
|
7776
7828
|
var parsePoints = (pointsStr) => pairs(
|
|
7777
7829
|
pointsStr.trim().split(" ").map((n) => Number(n))
|
|
7778
7830
|
);
|
|
7779
|
-
var ShapeItemSchema =
|
|
7780
|
-
type:
|
|
7781
|
-
data:
|
|
7831
|
+
var ShapeItemSchema = z200.object({
|
|
7832
|
+
type: z200.string(),
|
|
7833
|
+
data: z200.string()
|
|
7782
7834
|
}).transform((shape) => {
|
|
7783
7835
|
switch (shape.type) {
|
|
7784
7836
|
case "TRACK": {
|
|
@@ -7959,23 +8011,23 @@ var ShapeItemSchema = z199.object({
|
|
|
7959
8011
|
throw new Error(`Unknown shape type: ${shape.type}`);
|
|
7960
8012
|
}
|
|
7961
8013
|
}).pipe(PackageDetailShapeSchema);
|
|
7962
|
-
var ShapesArraySchema =
|
|
8014
|
+
var ShapesArraySchema = z200.array(ShapeItemSchema);
|
|
7963
8015
|
|
|
7964
8016
|
// lib/schemas/single-letter-shape-schema.ts
|
|
7965
|
-
import { z as
|
|
7966
|
-
var PointSchema2 =
|
|
7967
|
-
x:
|
|
7968
|
-
y:
|
|
8017
|
+
import { z as z201 } from "zod";
|
|
8018
|
+
var PointSchema2 = z201.object({
|
|
8019
|
+
x: z201.number(),
|
|
8020
|
+
y: z201.number()
|
|
7969
8021
|
});
|
|
7970
|
-
var RectangleShapeOutputSchema =
|
|
7971
|
-
type:
|
|
8022
|
+
var RectangleShapeOutputSchema = z201.object({
|
|
8023
|
+
type: z201.literal("RECTANGLE"),
|
|
7972
8024
|
position: PointSchema2,
|
|
7973
|
-
width:
|
|
7974
|
-
height:
|
|
7975
|
-
color:
|
|
7976
|
-
lineWidth:
|
|
7977
|
-
fillColor:
|
|
7978
|
-
id:
|
|
8025
|
+
width: z201.number(),
|
|
8026
|
+
height: z201.number(),
|
|
8027
|
+
color: z201.string(),
|
|
8028
|
+
lineWidth: z201.number(),
|
|
8029
|
+
fillColor: z201.string().optional(),
|
|
8030
|
+
id: z201.string()
|
|
7979
8031
|
});
|
|
7980
8032
|
var parseRectangle = (str) => {
|
|
7981
8033
|
const [, x, y, , , width, height, color, lineWidth, , fillColor, id] = str.split("~");
|
|
@@ -7990,16 +8042,16 @@ var parseRectangle = (str) => {
|
|
|
7990
8042
|
id
|
|
7991
8043
|
};
|
|
7992
8044
|
};
|
|
7993
|
-
var RectangleShapeSchema =
|
|
7994
|
-
var EllipseShapeOutputSchema =
|
|
7995
|
-
type:
|
|
8045
|
+
var RectangleShapeSchema = z201.string().startsWith("R~").transform(parseRectangle).pipe(RectangleShapeOutputSchema);
|
|
8046
|
+
var EllipseShapeOutputSchema = z201.object({
|
|
8047
|
+
type: z201.literal("ELLIPSE"),
|
|
7996
8048
|
center: PointSchema2,
|
|
7997
|
-
radiusX:
|
|
7998
|
-
radiusY:
|
|
7999
|
-
color:
|
|
8000
|
-
lineWidth:
|
|
8001
|
-
fillColor:
|
|
8002
|
-
id:
|
|
8049
|
+
radiusX: z201.number(),
|
|
8050
|
+
radiusY: z201.number(),
|
|
8051
|
+
color: z201.string(),
|
|
8052
|
+
lineWidth: z201.number(),
|
|
8053
|
+
fillColor: z201.string().optional(),
|
|
8054
|
+
id: z201.string()
|
|
8003
8055
|
});
|
|
8004
8056
|
var parseEllipse = (str) => {
|
|
8005
8057
|
const [, x, y, radiusX, radiusY, color, lineWidth, , fillColor, id] = str.split("~");
|
|
@@ -8014,17 +8066,17 @@ var parseEllipse = (str) => {
|
|
|
8014
8066
|
id
|
|
8015
8067
|
};
|
|
8016
8068
|
};
|
|
8017
|
-
var EllipseShapeSchema =
|
|
8018
|
-
var ArcShapeOutputSchema =
|
|
8019
|
-
type:
|
|
8020
|
-
pathData:
|
|
8069
|
+
var EllipseShapeSchema = z201.string().startsWith("E~").transform(parseEllipse).pipe(EllipseShapeOutputSchema);
|
|
8070
|
+
var ArcShapeOutputSchema = z201.object({
|
|
8071
|
+
type: z201.literal("ARC"),
|
|
8072
|
+
pathData: z201.string(),
|
|
8021
8073
|
start: PointSchema2,
|
|
8022
8074
|
end: PointSchema2,
|
|
8023
|
-
radius:
|
|
8024
|
-
sweepFlag:
|
|
8025
|
-
color:
|
|
8026
|
-
lineWidth:
|
|
8027
|
-
id:
|
|
8075
|
+
radius: z201.number(),
|
|
8076
|
+
sweepFlag: z201.boolean(),
|
|
8077
|
+
color: z201.string(),
|
|
8078
|
+
lineWidth: z201.number(),
|
|
8079
|
+
id: z201.string()
|
|
8028
8080
|
});
|
|
8029
8081
|
var parseArc = (str) => {
|
|
8030
8082
|
const [, pathData, ...fields] = str.split("~");
|
|
@@ -8048,19 +8100,19 @@ var parseArc = (str) => {
|
|
|
8048
8100
|
id
|
|
8049
8101
|
};
|
|
8050
8102
|
};
|
|
8051
|
-
var ArcShapeSchema =
|
|
8052
|
-
var PinShapeOutputSchema =
|
|
8053
|
-
type:
|
|
8054
|
-
visibility:
|
|
8055
|
-
pinNumber:
|
|
8056
|
-
x:
|
|
8057
|
-
y:
|
|
8058
|
-
rotation:
|
|
8059
|
-
id:
|
|
8060
|
-
label:
|
|
8061
|
-
labelColor:
|
|
8062
|
-
path:
|
|
8063
|
-
arrow:
|
|
8103
|
+
var ArcShapeSchema = z201.string().startsWith("A~").transform(parseArc).pipe(ArcShapeOutputSchema);
|
|
8104
|
+
var PinShapeOutputSchema = z201.object({
|
|
8105
|
+
type: z201.literal("PIN"),
|
|
8106
|
+
visibility: z201.enum(["show", "hide", "none"]),
|
|
8107
|
+
pinNumber: z201.union([z201.string(), z201.number()]),
|
|
8108
|
+
x: z201.number(),
|
|
8109
|
+
y: z201.number(),
|
|
8110
|
+
rotation: z201.number(),
|
|
8111
|
+
id: z201.string(),
|
|
8112
|
+
label: z201.string(),
|
|
8113
|
+
labelColor: z201.string(),
|
|
8114
|
+
path: z201.string(),
|
|
8115
|
+
arrow: z201.string()
|
|
8064
8116
|
});
|
|
8065
8117
|
var parsePin = (pinString) => {
|
|
8066
8118
|
const parts = pinString.split("~");
|
|
@@ -8093,13 +8145,13 @@ var parsePin = (pinString) => {
|
|
|
8093
8145
|
arrow
|
|
8094
8146
|
};
|
|
8095
8147
|
};
|
|
8096
|
-
var PinShapeSchema =
|
|
8097
|
-
var PolylineShapeOutputSchema =
|
|
8098
|
-
type:
|
|
8099
|
-
points:
|
|
8100
|
-
color:
|
|
8101
|
-
lineWidth:
|
|
8102
|
-
id:
|
|
8148
|
+
var PinShapeSchema = z201.string().startsWith("P~").transform(parsePin).pipe(PinShapeOutputSchema);
|
|
8149
|
+
var PolylineShapeOutputSchema = z201.object({
|
|
8150
|
+
type: z201.literal("POLYLINE"),
|
|
8151
|
+
points: z201.array(PointSchema2),
|
|
8152
|
+
color: z201.string(),
|
|
8153
|
+
lineWidth: z201.number(),
|
|
8154
|
+
id: z201.string()
|
|
8103
8155
|
});
|
|
8104
8156
|
var parsePoints2 = (pointsStr) => {
|
|
8105
8157
|
return pointsStr.split(" ").reduce((acc, value, index) => {
|
|
@@ -8122,14 +8174,14 @@ var parsePolyline = (str) => {
|
|
|
8122
8174
|
id
|
|
8123
8175
|
};
|
|
8124
8176
|
};
|
|
8125
|
-
var PolylineShapeSchema =
|
|
8126
|
-
var PolygonShapeOutputSchema =
|
|
8127
|
-
type:
|
|
8128
|
-
points:
|
|
8129
|
-
fillColor:
|
|
8130
|
-
lineWidth:
|
|
8131
|
-
lineColor:
|
|
8132
|
-
id:
|
|
8177
|
+
var PolylineShapeSchema = z201.string().startsWith("PL~").transform(parsePolyline).pipe(PolylineShapeOutputSchema);
|
|
8178
|
+
var PolygonShapeOutputSchema = z201.object({
|
|
8179
|
+
type: z201.literal("POLYGON"),
|
|
8180
|
+
points: z201.array(PointSchema2),
|
|
8181
|
+
fillColor: z201.string(),
|
|
8182
|
+
lineWidth: z201.number(),
|
|
8183
|
+
lineColor: z201.string(),
|
|
8184
|
+
id: z201.string()
|
|
8133
8185
|
});
|
|
8134
8186
|
var parsePolygon = (str) => {
|
|
8135
8187
|
const [, ...rest] = str.split("~");
|
|
@@ -8143,14 +8195,14 @@ var parsePolygon = (str) => {
|
|
|
8143
8195
|
id
|
|
8144
8196
|
};
|
|
8145
8197
|
};
|
|
8146
|
-
var PolygonShapeSchema =
|
|
8147
|
-
var PathShapeOutputSchema =
|
|
8148
|
-
type:
|
|
8149
|
-
pathData:
|
|
8150
|
-
fillColor:
|
|
8151
|
-
strokeWidth:
|
|
8152
|
-
strokeColor:
|
|
8153
|
-
id:
|
|
8198
|
+
var PolygonShapeSchema = z201.string().startsWith("PG~").transform(parsePolygon).pipe(PolygonShapeOutputSchema);
|
|
8199
|
+
var PathShapeOutputSchema = z201.object({
|
|
8200
|
+
type: z201.literal("PATH"),
|
|
8201
|
+
pathData: z201.string(),
|
|
8202
|
+
fillColor: z201.string(),
|
|
8203
|
+
strokeWidth: z201.number(),
|
|
8204
|
+
strokeColor: z201.string(),
|
|
8205
|
+
id: z201.string()
|
|
8154
8206
|
});
|
|
8155
8207
|
var parsePath = (str) => {
|
|
8156
8208
|
const [, pathData, strokeColor, strokeWidth, , fillColor, id] = str.split("~");
|
|
@@ -8163,19 +8215,19 @@ var parsePath = (str) => {
|
|
|
8163
8215
|
id
|
|
8164
8216
|
};
|
|
8165
8217
|
};
|
|
8166
|
-
var PathShapeSchema =
|
|
8167
|
-
var IgnoredShapeOutputSchema =
|
|
8168
|
-
type:
|
|
8169
|
-
sourceType:
|
|
8218
|
+
var PathShapeSchema = z201.string().startsWith("PT~").transform(parsePath).pipe(PathShapeOutputSchema);
|
|
8219
|
+
var IgnoredShapeOutputSchema = z201.object({
|
|
8220
|
+
type: z201.literal("IGNORED"),
|
|
8221
|
+
sourceType: z201.enum(["AR", "I"])
|
|
8170
8222
|
});
|
|
8171
|
-
var IgnoredShapeSchema =
|
|
8223
|
+
var IgnoredShapeSchema = z201.string().transform((shape) => {
|
|
8172
8224
|
const sourceType = shape.startsWith("AR~") ? "AR" : shape.startsWith("I~") ? "I" : void 0;
|
|
8173
8225
|
if (!sourceType) {
|
|
8174
8226
|
throw new Error(`Invalid ignored shape: ${shape}`);
|
|
8175
8227
|
}
|
|
8176
8228
|
return { type: "IGNORED", sourceType };
|
|
8177
8229
|
}).pipe(IgnoredShapeOutputSchema);
|
|
8178
|
-
var optionalEasyEdaTextField = (fieldSchema) =>
|
|
8230
|
+
var optionalEasyEdaTextField = (fieldSchema) => z201.preprocess((textField) => {
|
|
8179
8231
|
if (textField == null) return void 0;
|
|
8180
8232
|
if (typeof textField === "string") {
|
|
8181
8233
|
const trimmedTextField = textField.trim();
|
|
@@ -8185,25 +8237,25 @@ var optionalEasyEdaTextField = (fieldSchema) => z200.preprocess((textField) => {
|
|
|
8185
8237
|
}
|
|
8186
8238
|
return textField;
|
|
8187
8239
|
}, fieldSchema);
|
|
8188
|
-
var TextShapeOutputSchema =
|
|
8189
|
-
type:
|
|
8190
|
-
alignment:
|
|
8191
|
-
x:
|
|
8192
|
-
y:
|
|
8193
|
-
rotation:
|
|
8194
|
-
fontColor:
|
|
8195
|
-
backgroundColor: optionalEasyEdaTextField(
|
|
8196
|
-
fontSize:
|
|
8197
|
-
fontWeight: optionalEasyEdaTextField(
|
|
8240
|
+
var TextShapeOutputSchema = z201.object({
|
|
8241
|
+
type: z201.literal("TEXT"),
|
|
8242
|
+
alignment: z201.enum(["L", "C", "R"]),
|
|
8243
|
+
x: z201.number(),
|
|
8244
|
+
y: z201.number(),
|
|
8245
|
+
rotation: z201.number(),
|
|
8246
|
+
fontColor: z201.string(),
|
|
8247
|
+
backgroundColor: optionalEasyEdaTextField(z201.string().optional()),
|
|
8248
|
+
fontSize: z201.string(),
|
|
8249
|
+
fontWeight: optionalEasyEdaTextField(z201.string().optional().default("normal")),
|
|
8198
8250
|
fontStyle: optionalEasyEdaTextField(
|
|
8199
|
-
|
|
8251
|
+
z201.enum(["normal", "italic"]).optional().default("normal")
|
|
8200
8252
|
),
|
|
8201
|
-
fontDecoration: optionalEasyEdaTextField(
|
|
8202
|
-
content:
|
|
8203
|
-
textType:
|
|
8204
|
-
visibility:
|
|
8205
|
-
mirror:
|
|
8206
|
-
id:
|
|
8253
|
+
fontDecoration: optionalEasyEdaTextField(z201.string().optional().default("")),
|
|
8254
|
+
content: z201.string(),
|
|
8255
|
+
textType: z201.string(),
|
|
8256
|
+
visibility: z201.enum(["0", "1"]),
|
|
8257
|
+
mirror: z201.string(),
|
|
8258
|
+
id: z201.string()
|
|
8207
8259
|
});
|
|
8208
8260
|
var parseText = (str) => {
|
|
8209
8261
|
const [
|
|
@@ -8244,8 +8296,8 @@ var parseText = (str) => {
|
|
|
8244
8296
|
id
|
|
8245
8297
|
};
|
|
8246
8298
|
};
|
|
8247
|
-
var TextShapeSchema =
|
|
8248
|
-
var SingleLetterShapeSchema =
|
|
8299
|
+
var TextShapeSchema = z201.string().startsWith("T~").transform(parseText).pipe(TextShapeOutputSchema);
|
|
8300
|
+
var SingleLetterShapeSchema = z201.string().transform((x) => {
|
|
8249
8301
|
if (x.startsWith("R~")) return RectangleShapeSchema.parse(x);
|
|
8250
8302
|
if (x.startsWith("E~")) return EllipseShapeSchema.parse(x);
|
|
8251
8303
|
if (x.startsWith("P~")) return PinShapeSchema.parse(x);
|
|
@@ -8259,7 +8311,7 @@ var SingleLetterShapeSchema = z200.string().transform((x) => {
|
|
|
8259
8311
|
if (x.startsWith("A~")) return ArcShapeSchema.parse(x);
|
|
8260
8312
|
throw new Error(`Invalid shape type: ${x}`);
|
|
8261
8313
|
}).pipe(
|
|
8262
|
-
|
|
8314
|
+
z201.union([
|
|
8263
8315
|
RectangleShapeOutputSchema,
|
|
8264
8316
|
EllipseShapeOutputSchema,
|
|
8265
8317
|
PinShapeOutputSchema,
|
|
@@ -8273,84 +8325,84 @@ var SingleLetterShapeSchema = z200.string().transform((x) => {
|
|
|
8273
8325
|
);
|
|
8274
8326
|
|
|
8275
8327
|
// lib/schemas/easy-eda-json-schema.ts
|
|
8276
|
-
var maybeNumber =
|
|
8277
|
-
var optionalNumberWithNumericString =
|
|
8328
|
+
var maybeNumber = z202.any().transform((k) => k === "nan" || Number.isNaN(k) ? null : k).pipe(z202.number().nullable().optional());
|
|
8329
|
+
var optionalNumberWithNumericString = z202.preprocess((value) => {
|
|
8278
8330
|
if (typeof value !== "string") return value;
|
|
8279
8331
|
if (value.trim() === "") return void 0;
|
|
8280
8332
|
return Number(value);
|
|
8281
|
-
},
|
|
8282
|
-
var SzlcscSchema =
|
|
8283
|
-
id:
|
|
8333
|
+
}, z202.number().optional());
|
|
8334
|
+
var SzlcscSchema = z202.object({
|
|
8335
|
+
id: z202.preprocess((value) => {
|
|
8284
8336
|
if (typeof value === "string" && /^\d+$/.test(value)) {
|
|
8285
8337
|
return Number(value);
|
|
8286
8338
|
}
|
|
8287
8339
|
return value;
|
|
8288
|
-
},
|
|
8289
|
-
number:
|
|
8290
|
-
step:
|
|
8291
|
-
min:
|
|
8340
|
+
}, z202.number()),
|
|
8341
|
+
number: z202.string(),
|
|
8342
|
+
step: z202.number().optional(),
|
|
8343
|
+
min: z202.number().optional(),
|
|
8292
8344
|
price: optionalNumberWithNumericString,
|
|
8293
|
-
stock:
|
|
8294
|
-
url:
|
|
8295
|
-
image:
|
|
8296
|
-
});
|
|
8297
|
-
var LcscSchema =
|
|
8298
|
-
id:
|
|
8299
|
-
number:
|
|
8300
|
-
step:
|
|
8301
|
-
min:
|
|
8345
|
+
stock: z202.number().optional(),
|
|
8346
|
+
url: z202.string().url().optional(),
|
|
8347
|
+
image: z202.string().optional().optional()
|
|
8348
|
+
});
|
|
8349
|
+
var LcscSchema = z202.object({
|
|
8350
|
+
id: z202.number(),
|
|
8351
|
+
number: z202.string(),
|
|
8352
|
+
step: z202.number().optional(),
|
|
8353
|
+
min: z202.number().optional(),
|
|
8302
8354
|
price: optionalNumberWithNumericString,
|
|
8303
|
-
stock:
|
|
8304
|
-
url:
|
|
8305
|
-
});
|
|
8306
|
-
var OwnerSchema =
|
|
8307
|
-
uuid:
|
|
8308
|
-
username:
|
|
8309
|
-
nickname:
|
|
8310
|
-
avatar:
|
|
8311
|
-
});
|
|
8312
|
-
var HeadSchema =
|
|
8313
|
-
docType:
|
|
8314
|
-
editorVersion:
|
|
8315
|
-
c_para:
|
|
8316
|
-
x:
|
|
8317
|
-
y:
|
|
8318
|
-
puuid:
|
|
8319
|
-
uuid:
|
|
8320
|
-
utime:
|
|
8355
|
+
stock: z202.number().optional(),
|
|
8356
|
+
url: z202.string().url().optional()
|
|
8357
|
+
});
|
|
8358
|
+
var OwnerSchema = z202.object({
|
|
8359
|
+
uuid: z202.string(),
|
|
8360
|
+
username: z202.string(),
|
|
8361
|
+
nickname: z202.string(),
|
|
8362
|
+
avatar: z202.string()
|
|
8363
|
+
});
|
|
8364
|
+
var HeadSchema = z202.object({
|
|
8365
|
+
docType: z202.preprocess((val) => val == null ? val : String(val), z202.string()),
|
|
8366
|
+
editorVersion: z202.string().default(""),
|
|
8367
|
+
c_para: z202.record(z202.string(), z202.string().nullable()),
|
|
8368
|
+
x: z202.number(),
|
|
8369
|
+
y: z202.number(),
|
|
8370
|
+
puuid: z202.string().optional(),
|
|
8371
|
+
uuid: z202.string(),
|
|
8372
|
+
utime: z202.preprocess((val) => {
|
|
8321
8373
|
if (val == null || val === "") return void 0;
|
|
8322
8374
|
if (typeof val === "string") return Number(val);
|
|
8323
8375
|
return val;
|
|
8324
|
-
},
|
|
8325
|
-
importFlag:
|
|
8326
|
-
c_spiceCmd:
|
|
8327
|
-
hasIdFlag:
|
|
8328
|
-
});
|
|
8329
|
-
var BBoxSchema =
|
|
8330
|
-
x:
|
|
8331
|
-
y:
|
|
8332
|
-
width:
|
|
8333
|
-
height:
|
|
8334
|
-
});
|
|
8335
|
-
var LayerItemSchema =
|
|
8336
|
-
name:
|
|
8337
|
-
color:
|
|
8338
|
-
visible:
|
|
8339
|
-
active:
|
|
8340
|
-
config:
|
|
8341
|
-
transparency:
|
|
8342
|
-
});
|
|
8343
|
-
var ObjectItemSchema =
|
|
8344
|
-
name:
|
|
8345
|
-
visible:
|
|
8346
|
-
locked:
|
|
8347
|
-
});
|
|
8348
|
-
var DataStrSchema =
|
|
8376
|
+
}, z202.number().optional()),
|
|
8377
|
+
importFlag: z202.number().optional(),
|
|
8378
|
+
c_spiceCmd: z202.any().optional(),
|
|
8379
|
+
hasIdFlag: z202.boolean().default(false)
|
|
8380
|
+
});
|
|
8381
|
+
var BBoxSchema = z202.object({
|
|
8382
|
+
x: z202.number(),
|
|
8383
|
+
y: z202.number(),
|
|
8384
|
+
width: z202.number(),
|
|
8385
|
+
height: z202.number()
|
|
8386
|
+
});
|
|
8387
|
+
var LayerItemSchema = z202.object({
|
|
8388
|
+
name: z202.string(),
|
|
8389
|
+
color: z202.string(),
|
|
8390
|
+
visible: z202.boolean(),
|
|
8391
|
+
active: z202.boolean(),
|
|
8392
|
+
config: z202.boolean(),
|
|
8393
|
+
transparency: z202.boolean()
|
|
8394
|
+
});
|
|
8395
|
+
var ObjectItemSchema = z202.object({
|
|
8396
|
+
name: z202.string(),
|
|
8397
|
+
visible: z202.boolean(),
|
|
8398
|
+
locked: z202.boolean()
|
|
8399
|
+
});
|
|
8400
|
+
var DataStrSchema = z202.object({
|
|
8349
8401
|
head: HeadSchema,
|
|
8350
|
-
canvas:
|
|
8351
|
-
shape:
|
|
8402
|
+
canvas: z202.string(),
|
|
8403
|
+
shape: z202.array(SingleLetterShapeSchema),
|
|
8352
8404
|
BBox: BBoxSchema.optional(),
|
|
8353
|
-
colors:
|
|
8405
|
+
colors: z202.union([z202.array(z202.string()), z202.record(z202.string())]).default([])
|
|
8354
8406
|
}).transform((data) => ({
|
|
8355
8407
|
...data,
|
|
8356
8408
|
BBox: data.BBox ?? {
|
|
@@ -8360,16 +8412,16 @@ var DataStrSchema = z201.object({
|
|
|
8360
8412
|
height: 0
|
|
8361
8413
|
}
|
|
8362
8414
|
}));
|
|
8363
|
-
var PackageDetailDataStrSchema =
|
|
8415
|
+
var PackageDetailDataStrSchema = z202.object({
|
|
8364
8416
|
head: HeadSchema,
|
|
8365
|
-
canvas:
|
|
8366
|
-
shape:
|
|
8417
|
+
canvas: z202.string(),
|
|
8418
|
+
shape: z202.array(z202.string()).transform(
|
|
8367
8419
|
(shapes) => shapes.map((shape) => {
|
|
8368
8420
|
const [type, ...data] = shape.split("~");
|
|
8369
8421
|
return ShapeItemSchema.parse({ type, data: data.join("~") });
|
|
8370
8422
|
})
|
|
8371
|
-
).pipe(
|
|
8372
|
-
layers:
|
|
8423
|
+
).pipe(z202.array(PackageDetailShapeSchema)),
|
|
8424
|
+
layers: z202.array(z202.string()).transform(
|
|
8373
8425
|
(layers) => layers.map((layer) => {
|
|
8374
8426
|
const [name, color, visible, active, config, transparency] = layer.split("~");
|
|
8375
8427
|
return LayerItemSchema.parse({
|
|
@@ -8382,7 +8434,7 @@ var PackageDetailDataStrSchema = z201.object({
|
|
|
8382
8434
|
});
|
|
8383
8435
|
})
|
|
8384
8436
|
),
|
|
8385
|
-
objects:
|
|
8437
|
+
objects: z202.array(z202.string()).transform(
|
|
8386
8438
|
(objects) => objects.map((obj) => {
|
|
8387
8439
|
const [name, visible, locked] = obj.split("~");
|
|
8388
8440
|
return ObjectItemSchema.parse({
|
|
@@ -8393,52 +8445,52 @@ var PackageDetailDataStrSchema = z201.object({
|
|
|
8393
8445
|
})
|
|
8394
8446
|
),
|
|
8395
8447
|
BBox: BBoxSchema,
|
|
8396
|
-
netColors:
|
|
8448
|
+
netColors: z202.array(z202.unknown()).optional()
|
|
8397
8449
|
});
|
|
8398
|
-
var PackageDetailSchema =
|
|
8399
|
-
uuid:
|
|
8400
|
-
title:
|
|
8401
|
-
docType:
|
|
8402
|
-
updateTime:
|
|
8450
|
+
var PackageDetailSchema = z202.object({
|
|
8451
|
+
uuid: z202.string(),
|
|
8452
|
+
title: z202.string(),
|
|
8453
|
+
docType: z202.number(),
|
|
8454
|
+
updateTime: z202.number(),
|
|
8403
8455
|
owner: OwnerSchema,
|
|
8404
|
-
datastrid:
|
|
8405
|
-
writable:
|
|
8456
|
+
datastrid: z202.string(),
|
|
8457
|
+
writable: z202.boolean(),
|
|
8406
8458
|
dataStr: PackageDetailDataStrSchema
|
|
8407
8459
|
});
|
|
8408
|
-
var ModelBoundsSchema =
|
|
8409
|
-
min:
|
|
8410
|
-
x:
|
|
8411
|
-
y:
|
|
8412
|
-
z:
|
|
8460
|
+
var ModelBoundsSchema = z202.object({
|
|
8461
|
+
min: z202.object({
|
|
8462
|
+
x: z202.number(),
|
|
8463
|
+
y: z202.number(),
|
|
8464
|
+
z: z202.number()
|
|
8413
8465
|
}),
|
|
8414
|
-
max:
|
|
8415
|
-
x:
|
|
8416
|
-
y:
|
|
8417
|
-
z:
|
|
8466
|
+
max: z202.object({
|
|
8467
|
+
x: z202.number(),
|
|
8468
|
+
y: z202.number(),
|
|
8469
|
+
z: z202.number()
|
|
8418
8470
|
})
|
|
8419
8471
|
});
|
|
8420
|
-
var EasyEdaJsonSchema =
|
|
8421
|
-
uuid:
|
|
8422
|
-
title:
|
|
8423
|
-
description:
|
|
8424
|
-
docType:
|
|
8425
|
-
type:
|
|
8472
|
+
var EasyEdaJsonSchema = z202.object({
|
|
8473
|
+
uuid: z202.string(),
|
|
8474
|
+
title: z202.string(),
|
|
8475
|
+
description: z202.string(),
|
|
8476
|
+
docType: z202.number(),
|
|
8477
|
+
type: z202.number(),
|
|
8426
8478
|
szlcsc: SzlcscSchema,
|
|
8427
8479
|
lcsc: LcscSchema,
|
|
8428
8480
|
owner: OwnerSchema,
|
|
8429
|
-
tags:
|
|
8430
|
-
category:
|
|
8431
|
-
updateTime:
|
|
8432
|
-
updated_at:
|
|
8481
|
+
tags: z202.array(z202.string()),
|
|
8482
|
+
category: z202.string().optional(),
|
|
8483
|
+
updateTime: z202.number(),
|
|
8484
|
+
updated_at: z202.string(),
|
|
8433
8485
|
dataStr: DataStrSchema,
|
|
8434
|
-
verify:
|
|
8435
|
-
SMT:
|
|
8436
|
-
datastrid:
|
|
8437
|
-
jlcOnSale:
|
|
8438
|
-
writable:
|
|
8439
|
-
isFavorite:
|
|
8486
|
+
verify: z202.boolean(),
|
|
8487
|
+
SMT: z202.boolean().optional(),
|
|
8488
|
+
datastrid: z202.string(),
|
|
8489
|
+
jlcOnSale: z202.number().optional(),
|
|
8490
|
+
writable: z202.boolean(),
|
|
8491
|
+
isFavorite: z202.boolean(),
|
|
8440
8492
|
packageDetail: PackageDetailSchema,
|
|
8441
|
-
_objMetadata:
|
|
8493
|
+
_objMetadata: z202.object({
|
|
8442
8494
|
bounds: ModelBoundsSchema
|
|
8443
8495
|
}).optional()
|
|
8444
8496
|
});
|
|
@@ -8468,17 +8520,17 @@ var parseObjBounds2 = (objText) => {
|
|
|
8468
8520
|
const [, xStr, yStr, zStr] = trimmed.split(/\s+/, 4);
|
|
8469
8521
|
const x = Number(xStr);
|
|
8470
8522
|
const y = Number(yStr);
|
|
8471
|
-
const
|
|
8472
|
-
if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(
|
|
8523
|
+
const z203 = Number(zStr);
|
|
8524
|
+
if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z203)) {
|
|
8473
8525
|
continue;
|
|
8474
8526
|
}
|
|
8475
8527
|
vertexCount += 1;
|
|
8476
8528
|
minX = Math.min(minX, x);
|
|
8477
8529
|
minY = Math.min(minY, y);
|
|
8478
|
-
minZ = Math.min(minZ,
|
|
8530
|
+
minZ = Math.min(minZ, z203);
|
|
8479
8531
|
maxX = Math.max(maxX, x);
|
|
8480
8532
|
maxY = Math.max(maxY, y);
|
|
8481
|
-
maxZ = Math.max(maxZ,
|
|
8533
|
+
maxZ = Math.max(maxZ, z203);
|
|
8482
8534
|
}
|
|
8483
8535
|
if (vertexCount === 0) return null;
|
|
8484
8536
|
return {
|