easyeda 0.0.50 → 0.0.52
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.
|
@@ -1881,6 +1881,12 @@ var ShapeItemSchema = z59.object({
|
|
|
1881
1881
|
}
|
|
1882
1882
|
case "ARC": {
|
|
1883
1883
|
const [width, layer, , arcData] = shape.data.split("~");
|
|
1884
|
+
const match = arcData.match(
|
|
1885
|
+
/M\s*([\d.-]+)(?:\s*,\s*|\s+)([\d.-]+)\s*A\s*([\d.-]+)(?:\s*,\s*|\s+)([\d.-]+)\s*([\d.-]+)\s*([\d.-]+)\s*([\d.-]+)\s*([\d.-]+)(?:\s*,\s*|\s+)([\d.-]+)/
|
|
1886
|
+
);
|
|
1887
|
+
if (!match) {
|
|
1888
|
+
throw new Error(`Invalid arc data: ${arcData}`);
|
|
1889
|
+
}
|
|
1884
1890
|
const [
|
|
1885
1891
|
,
|
|
1886
1892
|
startX,
|
|
@@ -1892,9 +1898,7 @@ var ShapeItemSchema = z59.object({
|
|
|
1892
1898
|
sweepFlag,
|
|
1893
1899
|
endX,
|
|
1894
1900
|
endY
|
|
1895
|
-
] =
|
|
1896
|
-
/M\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)\s*A\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)\s*([\d.]+)\s*([01])\s*([01])\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)/
|
|
1897
|
-
);
|
|
1901
|
+
] = match;
|
|
1898
1902
|
const start = [Number(startX), Number(startY)];
|
|
1899
1903
|
const end = [Number(endX), Number(endY)];
|
|
1900
1904
|
return ArcSchema.parse({
|
|
@@ -2550,4 +2554,4 @@ export {
|
|
|
2550
2554
|
convertRawEasyToTsx,
|
|
2551
2555
|
convertEasyEdaJsonToVariousFormats
|
|
2552
2556
|
};
|
|
2553
|
-
//# sourceMappingURL=chunk-
|
|
2557
|
+
//# sourceMappingURL=chunk-ZM5DLN5C.js.map
|