calculate-packing 0.0.66 → 0.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +16 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3030,6 +3030,18 @@ var extractPadInfos = (pcbComponent, db, getNetworkId) => {
|
|
|
3030
3030
|
absoluteCenter: { x, y },
|
|
3031
3031
|
pcbPortId
|
|
3032
3032
|
});
|
|
3033
|
+
for (const via of db.pcb_via.list({
|
|
3034
|
+
pcb_component_id: pcbComponent.pcb_component_id
|
|
3035
|
+
})) {
|
|
3036
|
+
pushPad({
|
|
3037
|
+
padId: via.pcb_via_id,
|
|
3038
|
+
pcbPortId: via.pcb_port_id,
|
|
3039
|
+
sx: via.outer_diameter ?? via.hole_diameter ?? 0,
|
|
3040
|
+
sy: via.outer_diameter ?? via.hole_diameter ?? 0,
|
|
3041
|
+
x: via.x,
|
|
3042
|
+
y: via.y
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3033
3045
|
for (const ph of db.pcb_plated_hole.list({
|
|
3034
3046
|
pcb_component_id: pcbComponent.pcb_component_id
|
|
3035
3047
|
})) {
|
|
@@ -3305,8 +3317,10 @@ var convertCircuitJsonToPackOutput = (circuitJson, opts = {}) => {
|
|
|
3305
3317
|
if (pcbComponent.position_mode === "relative_to_group_anchor") {
|
|
3306
3318
|
continue;
|
|
3307
3319
|
}
|
|
3308
|
-
let shouldAddInnerObstaclesForComp = opts.shouldAddInnerObstacles;
|
|
3309
|
-
if (pcbComponent.obstructs_within_bounds ===
|
|
3320
|
+
let shouldAddInnerObstaclesForComp = opts.shouldAddInnerObstacles ?? false;
|
|
3321
|
+
if (pcbComponent.obstructs_within_bounds === true) {
|
|
3322
|
+
shouldAddInnerObstaclesForComp = true;
|
|
3323
|
+
} else if (pcbComponent.obstructs_within_bounds === false) {
|
|
3310
3324
|
shouldAddInnerObstaclesForComp = false;
|
|
3311
3325
|
}
|
|
3312
3326
|
packOutput.components.push(
|
package/package.json
CHANGED