circuit-json-to-gerber 0.0.76 → 0.0.78
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.
|
@@ -402,9 +402,11 @@ var getTraceRouteViaElements = (circuitJson) => {
|
|
|
402
402
|
continue;
|
|
403
403
|
}
|
|
404
404
|
for (const [index, point] of element.route.entries()) {
|
|
405
|
-
if (point.route_type !== "via" || typeof point.hole_diameter !== "number" || typeof point.outer_diameter !== "number") {
|
|
405
|
+
if (point.route_type !== "via" || typeof point.hole_diameter !== "number" || typeof point.outer_diameter !== "number" || typeof point.from_layer !== "string" || typeof point.to_layer !== "string") {
|
|
406
406
|
continue;
|
|
407
407
|
}
|
|
408
|
+
const fromLayer = point.from_layer;
|
|
409
|
+
const toLayer = point.to_layer;
|
|
408
410
|
routeVias.push({
|
|
409
411
|
type: "pcb_via",
|
|
410
412
|
pcb_via_id: `${element.pcb_trace_id}_route_via_${index}`,
|
|
@@ -412,9 +414,9 @@ var getTraceRouteViaElements = (circuitJson) => {
|
|
|
412
414
|
y: point.y,
|
|
413
415
|
hole_diameter: point.hole_diameter,
|
|
414
416
|
outer_diameter: point.outer_diameter,
|
|
415
|
-
from_layer:
|
|
416
|
-
to_layer:
|
|
417
|
-
layers: [
|
|
417
|
+
from_layer: fromLayer,
|
|
418
|
+
to_layer: toLayer,
|
|
419
|
+
layers: [fromLayer, toLayer]
|
|
418
420
|
});
|
|
419
421
|
}
|
|
420
422
|
}
|
|
@@ -464,6 +466,9 @@ var convertSoupToExcellonDrillCommands = ({
|
|
|
464
466
|
})) {
|
|
465
467
|
continue;
|
|
466
468
|
}
|
|
469
|
+
if (is_plated && element.type === "pcb_hole") {
|
|
470
|
+
continue;
|
|
471
|
+
}
|
|
467
472
|
const holeDiameter = "hole_diameter" in element && typeof element.hole_diameter === "number" ? element.hole_diameter : "hole_width" in element && typeof element.hole_width === "number" && "hole_height" in element && typeof element.hole_height === "number" ? Math.min(element.hole_width, element.hole_height) : void 0;
|
|
468
473
|
if (!holeDiameter) continue;
|
|
469
474
|
if (!diameterToToolNumber[holeDiameter]) {
|
|
@@ -493,6 +498,9 @@ var convertSoupToExcellonDrillCommands = ({
|
|
|
493
498
|
})) {
|
|
494
499
|
continue;
|
|
495
500
|
}
|
|
501
|
+
if (is_plated && element.type === "pcb_hole") {
|
|
502
|
+
continue;
|
|
503
|
+
}
|
|
496
504
|
const holeDiameter = "hole_diameter" in element && typeof element.hole_diameter === "number" ? element.hole_diameter : "hole_width" in element && typeof element.hole_width === "number" && "hole_height" in element && typeof element.hole_height === "number" ? Math.min(element.hole_width, element.hole_height) : void 0;
|
|
497
505
|
if (!holeDiameter || diameterToToolNumber[holeDiameter] !== i) {
|
|
498
506
|
continue;
|
|
@@ -1814,6 +1822,7 @@ function getAllApertureTemplateConfigsForLayer({
|
|
|
1814
1822
|
}
|
|
1815
1823
|
}
|
|
1816
1824
|
} else if (elm.type === "pcb_hole") {
|
|
1825
|
+
if (!isSoldermaskLayer) continue;
|
|
1817
1826
|
if (glayer_name.endsWith("_Mask") && elm.is_covered_with_solder_mask === true) {
|
|
1818
1827
|
continue;
|
|
1819
1828
|
}
|
|
@@ -1892,7 +1901,7 @@ var findApertureNumber = (glayer, search_params) => {
|
|
|
1892
1901
|
// package.json
|
|
1893
1902
|
var package_default = {
|
|
1894
1903
|
name: "circuit-json-to-gerber",
|
|
1895
|
-
version: "0.0.
|
|
1904
|
+
version: "0.0.77",
|
|
1896
1905
|
main: "dist/index.js",
|
|
1897
1906
|
type: "module",
|
|
1898
1907
|
scripts: {
|
|
@@ -2365,7 +2374,7 @@ var convertSoupToGerberCommands = (circuitJson, opts = {}) => {
|
|
|
2365
2374
|
}
|
|
2366
2375
|
const transformMatrix = transforms.length > 0 ? compose(...transforms) : void 0;
|
|
2367
2376
|
const applyTransform = (point) => transformMatrix ? applyToPoint(transformMatrix, point) : point;
|
|
2368
|
-
if (
|
|
2377
|
+
if (element.is_knockout) {
|
|
2369
2378
|
const padding = element.knockout_padding ?? {
|
|
2370
2379
|
left: 0.2,
|
|
2371
2380
|
right: 0.2,
|
|
@@ -2430,7 +2439,7 @@ var convertSoupToGerberCommands = (circuitJson, opts = {}) => {
|
|
|
2430
2439
|
anchoredX += fontSize + letterSpacing;
|
|
2431
2440
|
}
|
|
2432
2441
|
glayer.push(...gerber.build());
|
|
2433
|
-
if (
|
|
2442
|
+
if (element.is_knockout) {
|
|
2434
2443
|
glayer.push(
|
|
2435
2444
|
...gerberBuilder().add("set_layer_polarity", { polarity: "D" }).build()
|
|
2436
2445
|
);
|
|
@@ -3225,4 +3234,4 @@ export {
|
|
|
3225
3234
|
stringifyGerberCommands,
|
|
3226
3235
|
convertSoupToGerberCommands
|
|
3227
3236
|
};
|
|
3228
|
-
//# sourceMappingURL=chunk-
|
|
3237
|
+
//# sourceMappingURL=chunk-O4SBQLXH.js.map
|