@tscircuit/core 0.0.1261 → 0.0.1263
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.d.ts +2 -1
- package/dist/index.js +32 -6
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { symbols, SchSymbol, BaseSymbolName } from 'schematic-symbols';
|
|
|
12
12
|
import { CircuitJsonUtilObjects } from '@tscircuit/circuit-json-util';
|
|
13
13
|
import { Matrix } from 'transformation-matrix';
|
|
14
14
|
import { PackSolver2 } from 'calculate-packing';
|
|
15
|
-
import { AutoroutingPipelineSolver, AssignableAutoroutingPipeline2, AssignableAutoroutingPipeline3, AutoroutingPipeline1_OriginalUnravel, AutoroutingPipelineSolver3_HgPortPointPathing, AutoroutingPipelineSolver5, SimplifiedPcbTrace as SimplifiedPcbTrace$1, SimpleRouteJson as SimpleRouteJson$1 } from '@tscircuit/capacity-autorouter';
|
|
15
|
+
import { AutoroutingPipelineSolver, AssignableAutoroutingPipeline2, AssignableAutoroutingPipeline3, AutoroutingPipeline1_OriginalUnravel, AutoroutingPipelineSolver3_HgPortPointPathing, AutoroutingPipelineSolver5, AutoroutingPipelineSolver8, SimplifiedPcbTrace as SimplifiedPcbTrace$1, SimpleRouteJson as SimpleRouteJson$1 } from '@tscircuit/capacity-autorouter';
|
|
16
16
|
import { CopperPourPipelineSolver } from '@tscircuit/copper-pour-solver';
|
|
17
17
|
import { Bounds } from '@tscircuit/math-utils';
|
|
18
18
|
import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
|
|
@@ -27,6 +27,7 @@ declare const SOLVERS: {
|
|
|
27
27
|
AutoroutingPipelineSolver3_HgPortPointPathing: typeof AutoroutingPipelineSolver3_HgPortPointPathing;
|
|
28
28
|
AutoroutingPipelineSolver4: typeof AutoroutingPipelineSolver;
|
|
29
29
|
AutoroutingPipelineSolver5: typeof AutoroutingPipelineSolver5;
|
|
30
|
+
AutoroutingPipelineSolver8: typeof AutoroutingPipelineSolver8;
|
|
30
31
|
CopperPourPipelineSolver: typeof CopperPourPipelineSolver;
|
|
31
32
|
};
|
|
32
33
|
type SolverName = keyof typeof SOLVERS;
|
package/dist/index.js
CHANGED
|
@@ -13657,7 +13657,8 @@ import {
|
|
|
13657
13657
|
AssignableAutoroutingPipeline3,
|
|
13658
13658
|
AutoroutingPipelineSolver3_HgPortPointPathing,
|
|
13659
13659
|
AutoroutingPipelineSolver4,
|
|
13660
|
-
AutoroutingPipelineSolver5
|
|
13660
|
+
AutoroutingPipelineSolver5,
|
|
13661
|
+
AutoroutingPipelineSolver8
|
|
13661
13662
|
} from "@tscircuit/capacity-autorouter";
|
|
13662
13663
|
import { CopperPourPipelineSolver } from "@tscircuit/copper-pour-solver";
|
|
13663
13664
|
var SOLVERS = {
|
|
@@ -13669,6 +13670,7 @@ var SOLVERS = {
|
|
|
13669
13670
|
AutoroutingPipelineSolver3_HgPortPointPathing,
|
|
13670
13671
|
AutoroutingPipelineSolver4,
|
|
13671
13672
|
AutoroutingPipelineSolver5,
|
|
13673
|
+
AutoroutingPipelineSolver8,
|
|
13672
13674
|
CopperPourPipelineSolver
|
|
13673
13675
|
};
|
|
13674
13676
|
|
|
@@ -13694,6 +13696,7 @@ var TscircuitAutorouter = class {
|
|
|
13694
13696
|
useAssignableSolver = false,
|
|
13695
13697
|
useAutoJumperSolver = false,
|
|
13696
13698
|
autorouterVersion: autorouterVersion2,
|
|
13699
|
+
useLaserPrefabSolver = false,
|
|
13697
13700
|
effort,
|
|
13698
13701
|
onSolverStarted
|
|
13699
13702
|
} = options;
|
|
@@ -13706,6 +13709,8 @@ var TscircuitAutorouter = class {
|
|
|
13706
13709
|
solverName = "AutoroutingPipelineSolver4";
|
|
13707
13710
|
} else if (autorouterVersion2 === "v5") {
|
|
13708
13711
|
solverName = "AutoroutingPipelineSolver5";
|
|
13712
|
+
} else if (useLaserPrefabSolver) {
|
|
13713
|
+
solverName = "AutoroutingPipelineSolver8";
|
|
13709
13714
|
} else if (useAutoJumperSolver) {
|
|
13710
13715
|
solverName = "AssignableAutoroutingPipeline3";
|
|
13711
13716
|
} else if (useAssignableSolver) {
|
|
@@ -17484,6 +17489,7 @@ import Debug11 from "debug";
|
|
|
17484
17489
|
|
|
17485
17490
|
// lib/components/primitive-components/Group/Group_doInitialSchematicTraceRender/createSchematicTraceSolverInputProblem.ts
|
|
17486
17491
|
import "@tscircuit/schematic-trace-solver";
|
|
17492
|
+
var DEFAULT_MAX_MSP_PAIR_DISTANCE = 2.4;
|
|
17487
17493
|
function createSchematicTraceSolverInputProblem(group) {
|
|
17488
17494
|
const { db } = group.root;
|
|
17489
17495
|
const connKeyToSourceNet = /* @__PURE__ */ new Map();
|
|
@@ -17608,9 +17614,28 @@ function createSchematicTraceSolverInputProblem(group) {
|
|
|
17608
17614
|
if (st.subcircuit_connectivity_map_key) {
|
|
17609
17615
|
userNetIdToConnKey.set(userNetId, st.subcircuit_connectivity_map_key);
|
|
17610
17616
|
}
|
|
17617
|
+
const portA = db.schematic_port.get(a);
|
|
17618
|
+
const portB = db.schematic_port.get(b);
|
|
17619
|
+
let portDistance = 0;
|
|
17620
|
+
if (portA && portB) {
|
|
17621
|
+
portDistance = Math.sqrt(
|
|
17622
|
+
(portA.center.x - portB.center.x) ** 2 + (portA.center.y - portB.center.y) ** 2
|
|
17623
|
+
);
|
|
17624
|
+
}
|
|
17625
|
+
const maxMspDist = group._parsedProps.schMaxTraceDistance ?? DEFAULT_MAX_MSP_PAIR_DISTANCE;
|
|
17626
|
+
let netLabelWidth;
|
|
17627
|
+
if (st.display_name && !st.display_name.startsWith(".") && portDistance > maxMspDist) {
|
|
17628
|
+
netLabelWidth = Number(
|
|
17629
|
+
getSchematicNetLabelTextWidth({
|
|
17630
|
+
text: String(st.display_name),
|
|
17631
|
+
font_size: 0.14
|
|
17632
|
+
}).toFixed(2)
|
|
17633
|
+
);
|
|
17634
|
+
}
|
|
17611
17635
|
directConnections.push({
|
|
17612
17636
|
pinIds: [a, b].map((id) => schematicPortIdToPinId.get(id)),
|
|
17613
|
-
netId: userNetId
|
|
17637
|
+
netId: userNetId,
|
|
17638
|
+
netLabelWidth
|
|
17614
17639
|
});
|
|
17615
17640
|
}
|
|
17616
17641
|
}
|
|
@@ -17673,7 +17698,7 @@ function createSchematicTraceSolverInputProblem(group) {
|
|
|
17673
17698
|
directConnections,
|
|
17674
17699
|
netConnections,
|
|
17675
17700
|
availableNetLabelOrientations,
|
|
17676
|
-
maxMspPairDistance: group._parsedProps.schMaxTraceDistance ??
|
|
17701
|
+
maxMspPairDistance: group._parsedProps.schMaxTraceDistance ?? DEFAULT_MAX_MSP_PAIR_DISTANCE
|
|
17677
17702
|
};
|
|
17678
17703
|
return {
|
|
17679
17704
|
inputProblem,
|
|
@@ -20170,6 +20195,7 @@ var Group5 = class extends NormalComponent3 {
|
|
|
20170
20195
|
targetMinCapacity: phaseAutorouterConfig.targetMinCapacity,
|
|
20171
20196
|
useAssignableSolver: phaseIsLaserPrefabPreset || isSingleLayerBoard,
|
|
20172
20197
|
useAutoJumperSolver: phaseIsAutoJumperPreset,
|
|
20198
|
+
useLaserPrefabSolver: phaseIsLaserPrefabPreset,
|
|
20173
20199
|
autorouterVersion: autorouterVersion2,
|
|
20174
20200
|
effort,
|
|
20175
20201
|
onSolverStarted: ({ solverName, solverParams }) => this.root?.emit("solver:started", {
|
|
@@ -21502,7 +21528,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
21502
21528
|
var package_default = {
|
|
21503
21529
|
name: "@tscircuit/core",
|
|
21504
21530
|
type: "module",
|
|
21505
|
-
version: "0.0.
|
|
21531
|
+
version: "0.0.1262",
|
|
21506
21532
|
types: "dist/index.d.ts",
|
|
21507
21533
|
main: "dist/index.js",
|
|
21508
21534
|
module: "dist/index.js",
|
|
@@ -21534,7 +21560,7 @@ var package_default = {
|
|
|
21534
21560
|
"@biomejs/biome": "^1.8.3",
|
|
21535
21561
|
"@resvg/resvg-js": "^2.6.2",
|
|
21536
21562
|
"@tscircuit/alphabet": "0.0.25",
|
|
21537
|
-
"@tscircuit/capacity-autorouter": "^0.0.
|
|
21563
|
+
"@tscircuit/capacity-autorouter": "^0.0.529",
|
|
21538
21564
|
"@tscircuit/checks": "0.0.130",
|
|
21539
21565
|
"@tscircuit/circuit-json-util": "^0.0.94",
|
|
21540
21566
|
"@tscircuit/common": "^0.0.20",
|
|
@@ -21551,7 +21577,7 @@ var package_default = {
|
|
|
21551
21577
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
21552
21578
|
"@tscircuit/props": "^0.0.536",
|
|
21553
21579
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
21554
|
-
"@tscircuit/schematic-trace-solver": "^0.0.
|
|
21580
|
+
"@tscircuit/schematic-trace-solver": "^0.0.60",
|
|
21555
21581
|
"@tscircuit/solver-utils": "^0.0.3",
|
|
21556
21582
|
"@tscircuit/soup-util": "^0.0.41",
|
|
21557
21583
|
"@types/bun": "^1.2.16",
|
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.1263",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@biomejs/biome": "^1.8.3",
|
|
34
34
|
"@resvg/resvg-js": "^2.6.2",
|
|
35
35
|
"@tscircuit/alphabet": "0.0.25",
|
|
36
|
-
"@tscircuit/capacity-autorouter": "^0.0.
|
|
36
|
+
"@tscircuit/capacity-autorouter": "^0.0.529",
|
|
37
37
|
"@tscircuit/checks": "0.0.130",
|
|
38
38
|
"@tscircuit/circuit-json-util": "^0.0.94",
|
|
39
39
|
"@tscircuit/common": "^0.0.20",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@tscircuit/ngspice-spice-engine": "^0.0.8",
|
|
51
51
|
"@tscircuit/props": "^0.0.536",
|
|
52
52
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
53
|
-
"@tscircuit/schematic-trace-solver": "^0.0.
|
|
53
|
+
"@tscircuit/schematic-trace-solver": "^0.0.60",
|
|
54
54
|
"@tscircuit/solver-utils": "^0.0.3",
|
|
55
55
|
"@tscircuit/soup-util": "^0.0.41",
|
|
56
56
|
"@types/bun": "^1.2.16",
|