@tscircuit/core 0.0.1876 → 0.0.1877
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 +82 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -24078,11 +24078,21 @@ function routePlaneTerminatedBus(params) {
|
|
|
24078
24078
|
(direction) => direction !== bus.direction
|
|
24079
24079
|
)
|
|
24080
24080
|
];
|
|
24081
|
-
|
|
24081
|
+
const candidateDirectionPasses = [
|
|
24082
|
+
...candidateDirections.map((direction) => ({
|
|
24083
|
+
direction,
|
|
24084
|
+
centeredOutward: false
|
|
24085
|
+
})),
|
|
24086
|
+
...candidateDirections.map((direction) => ({
|
|
24087
|
+
direction,
|
|
24088
|
+
centeredOutward: true
|
|
24089
|
+
}))
|
|
24090
|
+
];
|
|
24091
|
+
for (const { direction, centeredOutward } of candidateDirectionPasses) {
|
|
24082
24092
|
const directionalBus = direction === bus.direction ? bus : { ...bus, direction };
|
|
24083
24093
|
const directionalPadSize = isHorizontal(direction) ? sourceObstacle.width : sourceObstacle.height;
|
|
24084
24094
|
const pairChannelFitsVia = getDirectionalPitch(directionalBus) / 2 - directionalPadSize / 2 >= viaDiameter / 2 + clearance - 1e-9;
|
|
24085
|
-
const viaHandednesses = pairChannelFitsVia ? [0] : [1, -1];
|
|
24095
|
+
const viaHandednesses = centeredOutward ? !pairChannelFitsVia && busIsOnOutwardComponentEdge(directionalBus) ? [0] : [] : pairChannelFitsVia ? [0] : [1, -1];
|
|
24086
24096
|
for (const viaHandedness of viaHandednesses) {
|
|
24087
24097
|
for (const connectionOrder of getConnectionOrders(directionalBus)) {
|
|
24088
24098
|
const candidatePlans = [];
|
|
@@ -34739,6 +34749,39 @@ var FanoutSolver = class extends BaseSolver {
|
|
|
34739
34749
|
const wideBoundaryBuses = unsortedBoundaryBuses.filter(
|
|
34740
34750
|
(bus) => bus.connections.length >= 8
|
|
34741
34751
|
);
|
|
34752
|
+
const hasForeignAllLayerObstaclesInComponent = wideBoundaryBuses.some(
|
|
34753
|
+
(bus) => this.routingSrj.obstacles.some(
|
|
34754
|
+
(obstacle) => obstacle.componentId !== bus.componentId && this.config.layerNames.every(
|
|
34755
|
+
(layer) => obstacle.layers.includes(layer)
|
|
34756
|
+
) && obstacle.center.x >= bus.componentBounds.minX && obstacle.center.x <= bus.componentBounds.maxX && obstacle.center.y >= bus.componentBounds.minY && obstacle.center.y <= bus.componentBounds.maxY
|
|
34757
|
+
)
|
|
34758
|
+
);
|
|
34759
|
+
const dogboneCandidateCountByConnectionIndex = /* @__PURE__ */ new Map();
|
|
34760
|
+
if (hasForeignAllLayerObstaclesInComponent) {
|
|
34761
|
+
for (const candidate of getComponentDogboneViaSiteCandidates(
|
|
34762
|
+
unsortedBoundaryBuses,
|
|
34763
|
+
{
|
|
34764
|
+
viaDiameter: this.config.viaDiameter,
|
|
34765
|
+
viaHoleDiameter: this.config.viaHoleDiameter,
|
|
34766
|
+
traceWidth: this.config.traceWidth,
|
|
34767
|
+
clearance: this.config.clearance,
|
|
34768
|
+
additionalObstacles: this.routingSrj.obstacles
|
|
34769
|
+
}
|
|
34770
|
+
)) {
|
|
34771
|
+
dogboneCandidateCountByConnectionIndex.set(
|
|
34772
|
+
candidate.connectionIndex,
|
|
34773
|
+
(dogboneCandidateCountByConnectionIndex.get(
|
|
34774
|
+
candidate.connectionIndex
|
|
34775
|
+
) ?? 0) + 1
|
|
34776
|
+
);
|
|
34777
|
+
}
|
|
34778
|
+
}
|
|
34779
|
+
const getBusDogboneCandidateCount = (bus) => bus.connections.reduce(
|
|
34780
|
+
(total, connection) => total + (dogboneCandidateCountByConnectionIndex.get(
|
|
34781
|
+
connection.connectionIndex
|
|
34782
|
+
) ?? 0),
|
|
34783
|
+
0
|
|
34784
|
+
);
|
|
34742
34785
|
const adjacentCenteredFieldByTurningBus = /* @__PURE__ */ new Map();
|
|
34743
34786
|
if (usePadAlignedDenseRouting && !configuredDensePlaneRouting) {
|
|
34744
34787
|
for (const bus of wideBoundaryBuses) {
|
|
@@ -34826,6 +34869,12 @@ var FanoutSolver = class extends BaseSolver {
|
|
|
34826
34869
|
...unsortedBoundaryBuses.map((bus) => bus.connections.length)
|
|
34827
34870
|
) >= 8 ? first.connections.length - second.connections.length : second.connections.length - first.connections.length;
|
|
34828
34871
|
if (connectionCountDifference !== 0) return connectionCountDifference;
|
|
34872
|
+
if (hasForeignAllLayerObstaclesInComponent && first.connections.length >= 8 && second.connections.length >= 8) {
|
|
34873
|
+
const dogboneCandidateCountDifference = getBusDogboneCandidateCount(first) - getBusDogboneCandidateCount(second);
|
|
34874
|
+
if (dogboneCandidateCountDifference !== 0) {
|
|
34875
|
+
return dogboneCandidateCountDifference;
|
|
34876
|
+
}
|
|
34877
|
+
}
|
|
34829
34878
|
}
|
|
34830
34879
|
const firstLayer = params.busLayerAssignments[first.busId];
|
|
34831
34880
|
const secondLayer = params.busLayerAssignments[second.busId];
|
|
@@ -35226,9 +35275,9 @@ var FanoutSolver = class extends BaseSolver {
|
|
|
35226
35275
|
yield;
|
|
35227
35276
|
if (seedViaPoints) {
|
|
35228
35277
|
const denseBoundaryBusesInRoutingOrder = [
|
|
35229
|
-
...multiLayerLeadingSingletonBuses,
|
|
35278
|
+
...hasForeignAllLayerObstaclesInComponent ? [] : multiLayerLeadingSingletonBuses,
|
|
35230
35279
|
...boundaryBuses.filter(
|
|
35231
|
-
(bus) => !multiLayerLeadingSingletonBuses.includes(bus) && !throughAllLeadingBuses.includes(bus)
|
|
35280
|
+
(bus) => (hasForeignAllLayerObstaclesInComponent || !multiLayerLeadingSingletonBuses.includes(bus)) && !throughAllLeadingBuses.includes(bus)
|
|
35232
35281
|
).flatMap((bus) => [
|
|
35233
35282
|
...throughAllLeadingBuses.filter(
|
|
35234
35283
|
(candidate) => getContainingWideSourceField(candidate) === bus
|
|
@@ -36866,7 +36915,7 @@ var FanoutSolver = class extends BaseSolver {
|
|
|
36866
36915
|
debugDense("plane-route:start", bus.busId);
|
|
36867
36916
|
const targetLayer = params.busLayerAssignments[bus.busId];
|
|
36868
36917
|
const blockingBusCounts = /* @__PURE__ */ new Map();
|
|
36869
|
-
|
|
36918
|
+
let busPlans = targetLayer ? routeBus({
|
|
36870
36919
|
srj: this.routingSrj,
|
|
36871
36920
|
bus,
|
|
36872
36921
|
targetLayer,
|
|
@@ -36883,6 +36932,32 @@ var FanoutSolver = class extends BaseSolver {
|
|
|
36883
36932
|
blockingBusCounts,
|
|
36884
36933
|
fixedViaPointsByConnectionIndex
|
|
36885
36934
|
}) : null;
|
|
36935
|
+
if (!busPlans && targetLayer && hasForeignAllLayerObstaclesInComponent) {
|
|
36936
|
+
busPlans = routeBus({
|
|
36937
|
+
srj: this.routingSrj,
|
|
36938
|
+
bus,
|
|
36939
|
+
targetLayer,
|
|
36940
|
+
acceptedPlans: matchedPlans,
|
|
36941
|
+
layerNames: this.config.layerNames,
|
|
36942
|
+
traceWidth: this.config.traceWidth,
|
|
36943
|
+
viaDiameter: this.config.viaDiameter,
|
|
36944
|
+
viaHoleDiameter: this.config.viaHoleDiameter,
|
|
36945
|
+
clearance: this.config.clearance,
|
|
36946
|
+
compactBusTracks: this.config.compactBusTracks,
|
|
36947
|
+
allowBlindAndBuriedVias: false,
|
|
36948
|
+
allowSameNetMerges: this.config.allowSameNetMerges,
|
|
36949
|
+
staticClearanceCache: this.routeStaticClearanceCache,
|
|
36950
|
+
blockingBusCounts
|
|
36951
|
+
});
|
|
36952
|
+
if (busPlans) {
|
|
36953
|
+
fixedViaPointsByConnectionIndex = new Map([
|
|
36954
|
+
...fixedViaPointsByConnectionIndex,
|
|
36955
|
+
...busPlans.flatMap(
|
|
36956
|
+
(plan) => plan.via ? [[plan.connectionIndex, plan.via.center]] : []
|
|
36957
|
+
)
|
|
36958
|
+
]);
|
|
36959
|
+
}
|
|
36960
|
+
}
|
|
36886
36961
|
if (!busPlans) {
|
|
36887
36962
|
debugDense(
|
|
36888
36963
|
"plane-route:failed",
|
|
@@ -51467,7 +51542,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
51467
51542
|
var package_default = {
|
|
51468
51543
|
name: "@tscircuit/core",
|
|
51469
51544
|
type: "module",
|
|
51470
|
-
version: "0.0.
|
|
51545
|
+
version: "0.0.1876",
|
|
51471
51546
|
types: "dist/index.d.ts",
|
|
51472
51547
|
main: "dist/index.js",
|
|
51473
51548
|
module: "dist/index.js",
|
|
@@ -51507,7 +51582,7 @@ var package_default = {
|
|
|
51507
51582
|
"@tscircuit/common": "^0.0.20",
|
|
51508
51583
|
"@tscircuit/copper-pour-solver": "^0.0.54",
|
|
51509
51584
|
"@tscircuit/create-fdm-enclosure": "0.0.4",
|
|
51510
|
-
"@tscircuit/fanout-solver": "0.0.
|
|
51585
|
+
"@tscircuit/fanout-solver": "0.0.68",
|
|
51511
51586
|
"@tscircuit/footprinter": "^0.0.426",
|
|
51512
51587
|
"@tscircuit/image-utils": "^0.0.8",
|
|
51513
51588
|
"@tscircuit/implicit-copper-pour-solver": "github:tscircuit/implicit-copper-pour-solver#a5cbbda0cd65fd4707c5c1af25779837c25aba92",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.1877",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@tscircuit/common": "^0.0.20",
|
|
42
42
|
"@tscircuit/copper-pour-solver": "^0.0.54",
|
|
43
43
|
"@tscircuit/create-fdm-enclosure": "0.0.4",
|
|
44
|
-
"@tscircuit/fanout-solver": "0.0.
|
|
44
|
+
"@tscircuit/fanout-solver": "0.0.68",
|
|
45
45
|
"@tscircuit/footprinter": "^0.0.426",
|
|
46
46
|
"@tscircuit/image-utils": "^0.0.8",
|
|
47
47
|
"@tscircuit/implicit-copper-pour-solver": "github:tscircuit/implicit-copper-pour-solver#a5cbbda0cd65fd4707c5c1af25779837c25aba92",
|