@tscircuit/schematic-trace-solver 0.0.145 → 0.0.147
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 +9 -2
- package/dist/index.js +482 -86
- package/lib/solvers/AvailableNetOrientationSolver/AvailableNetOrientationSolver.ts +38 -30
- package/lib/solvers/InlineNetLabelSolver/InlineNetLabelSolver.ts +30 -8
- package/lib/solvers/InlineNetLabelSolver/pushAnchoredNetLabelsAwayFromInlineLabels.ts +530 -0
- package/lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver.ts +6 -21
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2.ts +7 -23
- package/lib/solvers/TraceAnchoredNetLabelOverlapSolver/candidates.ts +7 -14
- package/lib/types/InputProblem.ts +8 -0
- package/lib/utils/getNetLabelWidthForConnection.ts +63 -0
- package/package.json +1 -1
- package/tests/assets/inline-net-label-anchored-label-clearance.json +56 -0
- package/tests/repros/__snapshots__/repro-ti-power-output-section.snap.svg +80 -0
- package/tests/repros/repro-ti-power-output-section.input.ts +341 -0
- package/tests/repros/repro-ti-power-output-section.test.ts +13 -0
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/fallback-net-label-width.snap.svg +69 -0
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label-anchored-label-clearance.snap.svg +54 -0
- package/tests/solvers/InlineNetLabelSolver/fallback-net-label-width.test.ts +152 -0
- package/tests/solvers/InlineNetLabelSolver/inline-net-label-anchored-label-clearance.test.ts +28 -0
- package/tests/solvers/InlineNetLabelSolver/push-anchored-net-labels-away.test.ts +227 -0
package/dist/index.d.ts
CHANGED
|
@@ -88,6 +88,12 @@ interface InputDirectConnection {
|
|
|
88
88
|
pinIds: [PinId, PinId];
|
|
89
89
|
netId?: string;
|
|
90
90
|
netLabelWidth?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Width of the conventional anchored label to use only when an inline label
|
|
93
|
+
* cannot be placed. Unlike `netLabelWidth`, this does not affect whether or
|
|
94
|
+
* how the point-to-point connection is routed.
|
|
95
|
+
*/
|
|
96
|
+
fallbackNetLabelWidth?: number;
|
|
91
97
|
/**
|
|
92
98
|
* When true, this point-to-point connection may be labeled with an "inline
|
|
93
99
|
* net label": the net name is drawn parallel to (and offset from) the routed
|
|
@@ -116,6 +122,7 @@ interface InputNetConnection {
|
|
|
116
122
|
netId: string;
|
|
117
123
|
pinIds: Array<PinId>;
|
|
118
124
|
netLabelWidth?: number;
|
|
125
|
+
fallbackNetLabelWidth?: number;
|
|
119
126
|
netLabelHeight?: number;
|
|
120
127
|
/**
|
|
121
128
|
* When true, a named one- or two-pin net may use inline labels. A single-pin
|
|
@@ -221,7 +228,6 @@ declare class SchematicTraceSingleLineSolver2 extends BaseSolver {
|
|
|
221
228
|
});
|
|
222
229
|
getConstructorParams(): ConstructorParameters<typeof SchematicTraceSingleLineSolver2>[0];
|
|
223
230
|
private getTextBoxPaddingForConnectionPair;
|
|
224
|
-
private getNetLabelWidthForConnectionPair;
|
|
225
231
|
private getNetLabelHeightForConnectionPair;
|
|
226
232
|
private axisOfSegment;
|
|
227
233
|
private pathLength;
|
|
@@ -855,7 +861,6 @@ declare class AvailableNetOrientationSolver extends BaseSolver {
|
|
|
855
861
|
private getSearchDistanceLimit;
|
|
856
862
|
private getLateralColumnMaxDistance;
|
|
857
863
|
private createCandidate;
|
|
858
|
-
private getNetLabelWidth;
|
|
859
864
|
private getNetLabelHeight;
|
|
860
865
|
private getCandidateStatus;
|
|
861
866
|
private isAcceptableTraceAnchorChipCollision;
|
|
@@ -1250,6 +1255,7 @@ declare class InlineNetLabelSolver extends BaseSolver {
|
|
|
1250
1255
|
queuedConnections: InlineEligibleConnection[];
|
|
1251
1256
|
private tracesByPinPairKey;
|
|
1252
1257
|
private hasAlignedPortOnlyStubs;
|
|
1258
|
+
private postProcessedOutput?;
|
|
1253
1259
|
constructor(input: InlineNetLabelSolverInput);
|
|
1254
1260
|
getConstructorParams(): [InlineNetLabelSolverInput];
|
|
1255
1261
|
_step(): void;
|
|
@@ -1279,6 +1285,7 @@ declare class InlineNetLabelSolver extends BaseSolver {
|
|
|
1279
1285
|
*/
|
|
1280
1286
|
private getSupersededNetLabelKeys;
|
|
1281
1287
|
private getOutputTraces;
|
|
1288
|
+
private buildPostProcessedOutput;
|
|
1282
1289
|
getOutput(): {
|
|
1283
1290
|
traces: SolvedTracePath[];
|
|
1284
1291
|
netLabelPlacements: NetLabelPlacement[];
|