@tscircuit/capacity-autorouter 0.0.167 → 0.0.168

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 CHANGED
@@ -1634,81 +1634,6 @@ declare class SingleLayerNodeMergerSolver extends BaseSolver {
1634
1634
  visualize(): GraphicsObject;
1635
1635
  }
1636
1636
 
1637
- interface Point$1 {
1638
- x: number;
1639
- y: number;
1640
- z: number;
1641
- }
1642
- declare class SingleSimplifiedPathSolver extends BaseSolver {
1643
- newRoute: HighDensityIntraNodeRoute$1["route"];
1644
- newVias: HighDensityIntraNodeRoute$1["vias"];
1645
- headIndex: number;
1646
- tailIndex: number;
1647
- inputRoute: HighDensityIntraNodeRoute$1;
1648
- otherHdRoutes: HighDensityIntraNodeRoute$1[];
1649
- obstacles: Obstacle[];
1650
- connMap: ConnectivityMap;
1651
- colorMap: Record<string, string>;
1652
- outline?: Array<{
1653
- x: number;
1654
- y: number;
1655
- }>;
1656
- constructor(params: {
1657
- inputRoute: HighDensityIntraNodeRoute$1;
1658
- otherHdRoutes: HighDensityIntraNodeRoute$1[];
1659
- obstacles: Obstacle[];
1660
- connMap: ConnectivityMap;
1661
- colorMap: Record<string, string>;
1662
- outline?: Array<{
1663
- x: number;
1664
- y: number;
1665
- }>;
1666
- });
1667
- getConstructorParams(): {
1668
- inputRoute: HighDensityIntraNodeRoute$1;
1669
- otherHdRoutes: HighDensityIntraNodeRoute$1[];
1670
- obstacles: Obstacle[];
1671
- connMap: Record<string, string[]>;
1672
- colorMap: Record<string, string>;
1673
- outline: {
1674
- x: number;
1675
- y: number;
1676
- }[] | undefined;
1677
- };
1678
- get simplifiedRoute(): HighDensityIntraNodeRoute$1;
1679
- isValidPath(pointsInRoute: Point$1[]): boolean;
1680
- _step(): void;
1681
- getVisualsForNewRouteAndObstacles(): GraphicsObject & Pick<Required<GraphicsObject>, "points" | "lines" | "rects" | "circles">;
1682
- }
1683
-
1684
- declare class MultiSimplifiedPathSolver extends BaseSolver {
1685
- simplifiedHdRoutes: HighDensityIntraNodeRoute$1[];
1686
- currentUnsimplifiedHdRouteIndex: number;
1687
- activeSubSolver: SingleSimplifiedPathSolver | null;
1688
- unsimplifiedHdRoutes: HighDensityIntraNodeRoute$1[];
1689
- obstacles: Obstacle[];
1690
- connMap: ConnectivityMap;
1691
- colorMap: Record<string, string>;
1692
- outline?: Array<{
1693
- x: number;
1694
- y: number;
1695
- }>;
1696
- defaultViaDiameter: number;
1697
- constructor(params: {
1698
- unsimplifiedHdRoutes: HighDensityIntraNodeRoute$1[];
1699
- obstacles: Obstacle[];
1700
- connMap?: ConnectivityMap;
1701
- colorMap?: Record<string, string>;
1702
- outline?: Array<{
1703
- x: number;
1704
- y: number;
1705
- }>;
1706
- defaultViaDiameter?: number;
1707
- });
1708
- _step(): void;
1709
- visualize(): GraphicsObject;
1710
- }
1711
-
1712
1637
  declare class CapacityMeshEdgeSolver2_NodeTreeOptimization extends CapacityMeshEdgeSolver {
1713
1638
  nodes: CapacityMeshNode[];
1714
1639
  private nodeTree;
@@ -1736,182 +1661,6 @@ declare class DeadEndSolver extends BaseSolver {
1736
1661
  visualize(): GraphicsObject;
1737
1662
  }
1738
1663
 
1739
- /**
1740
- * ObstacleTree wraps different spatial index implementations:
1741
- * - 'native': original spatial-hash grid
1742
- * - 'rbush': dynamic R-tree via rbush
1743
- * - 'flatbush': static index via flatbush
1744
- */
1745
- declare class ObstacleSpatialHashIndex {
1746
- private idx;
1747
- private storage;
1748
- constructor(implementation?: "native" | "rbush" | "flatbush", obstacles?: Obstacle[]);
1749
- insert(o: Obstacle): void;
1750
- search(bbox: {
1751
- minX: number;
1752
- minY: number;
1753
- maxX: number;
1754
- maxY: number;
1755
- }): Obstacle[];
1756
- searchArea(centerX: number, centerY: number, width: number, height: number): Obstacle[];
1757
- }
1758
-
1759
- interface Point {
1760
- x: number;
1761
- y: number;
1762
- z: number;
1763
- }
1764
- type Point2D = {
1765
- x: number;
1766
- y: number;
1767
- };
1768
- type HighDensityIntraNodeRoute = {
1769
- connectionName: string;
1770
- traceThickness: number;
1771
- viaDiameter: number;
1772
- route: Array<{
1773
- x: number;
1774
- y: number;
1775
- z: number;
1776
- }>;
1777
- vias: Array<{
1778
- x: number;
1779
- y: number;
1780
- }>;
1781
- };
1782
- type HighDensityRoute = HighDensityIntraNodeRoute;
1783
- declare class HighDensityRouteSpatialIndex {
1784
- private segmentBuckets;
1785
- private viaBuckets;
1786
- private routes;
1787
- private CELL_SIZE;
1788
- constructor(routes: HighDensityRoute[], cellSize?: number);
1789
- /**
1790
- * Finds routes that potentially conflict with a given line segment within a margin.
1791
- * Checks both segments and vias.
1792
- * @param segmentStart Start point of the query segment.
1793
- * @param segmentEnd End point of the query segment.
1794
- * @param margin The minimum required clearance distance from the query segment's centerline.
1795
- * @returns An array of conflicting routes and their minimum distance to the segment.
1796
- */
1797
- getConflictingRoutesForSegment(segmentStart: Point, // Keep Point for original Z data if needed elsewhere
1798
- segmentEnd: Point, margin: number): Array<{
1799
- conflictingRoute: HighDensityRoute;
1800
- distance: number;
1801
- }>;
1802
- /**
1803
- * Finds routes that pass near a given point within a margin.
1804
- * Checks both segments and vias.
1805
- * @param point The query point {x, y}. Z is ignored.
1806
- * @param margin The minimum required clearance distance from the query point.
1807
- * @returns An array of conflicting routes and their minimum distance to the point.
1808
- */
1809
- getConflictingRoutesNearPoint(point: Point2D, margin: number): Array<{
1810
- conflictingRoute: HighDensityRoute;
1811
- distance: number;
1812
- }>;
1813
- }
1814
-
1815
- interface RouteSection {
1816
- startIndex: number;
1817
- endIndex: number;
1818
- z: number;
1819
- points: HighDensityRoute["route"];
1820
- }
1821
- declare class SingleRouteUselessViaRemovalSolver extends BaseSolver {
1822
- obstacleSHI: ObstacleSpatialHashIndex;
1823
- hdRouteSHI: HighDensityRouteSpatialIndex;
1824
- unsimplifiedRoute: HighDensityRoute;
1825
- routeSections: Array<RouteSection>;
1826
- currentSectionIndex: number;
1827
- TRACE_THICKNESS: number;
1828
- OBSTACLE_MARGIN: number;
1829
- constructor(params: {
1830
- obstacleSHI: ObstacleSpatialHashIndex;
1831
- hdRouteSHI: HighDensityRouteSpatialIndex;
1832
- unsimplifiedRoute: HighDensityRoute;
1833
- });
1834
- breakRouteIntoSections(route: HighDensityRoute): never[] | this["routeSections"];
1835
- _step(): void;
1836
- canSectionMoveToLayer({ currentSection, targetZ, }: {
1837
- currentSection: RouteSection;
1838
- targetZ: number;
1839
- }): boolean;
1840
- getConstructorParams(): {
1841
- obstacleSHI: ObstacleSpatialHashIndex;
1842
- hdRouteSHI: HighDensityRouteSpatialIndex;
1843
- unsimplifiedRoute: HighDensityIntraNodeRoute;
1844
- };
1845
- getOptimizedHdRoute(): HighDensityRoute;
1846
- visualize(): GraphicsObject;
1847
- }
1848
-
1849
- interface UselessViaRemovalSolverInput {
1850
- unsimplifiedHdRoutes: HighDensityRoute$1[];
1851
- obstacles: Obstacle[];
1852
- colorMap: Record<string, string>;
1853
- layerCount: number;
1854
- }
1855
- declare class UselessViaRemovalSolver extends BaseSolver {
1856
- private input;
1857
- unsimplifiedHdRoutes: HighDensityRoute$1[];
1858
- optimizedHdRoutes: HighDensityRoute$1[];
1859
- unprocessedRoutes: HighDensityRoute$1[];
1860
- activeSubSolver?: SingleRouteUselessViaRemovalSolver | null | undefined;
1861
- obstacleSHI: ObstacleSpatialHashIndex | null;
1862
- hdRouteSHI: HighDensityRouteSpatialIndex | null;
1863
- constructor(input: UselessViaRemovalSolverInput);
1864
- _step(): void;
1865
- getOptimizedHdRoutes(): HighDensityRoute$1[] | null;
1866
- visualize(): GraphicsObject;
1867
- }
1868
-
1869
- interface SameNetViaMergerSolverInput {
1870
- inputHdRoutes: HighDensityRoute$1[];
1871
- obstacles: Obstacle[];
1872
- colorMap: Record<string, string>;
1873
- layerCount: number;
1874
- connMap?: ConnectivityMap;
1875
- outline?: Array<{
1876
- x: number;
1877
- y: number;
1878
- }>;
1879
- }
1880
- type Via = {
1881
- x: number;
1882
- y: number;
1883
- diameter: number;
1884
- net: string;
1885
- routeIndex: number;
1886
- layers: number[];
1887
- };
1888
- declare class SameNetViaMergerSolver extends BaseSolver {
1889
- private input;
1890
- inputHdRoutes: HighDensityRoute$1[];
1891
- mergedViaHdRoutes: HighDensityRoute$1[];
1892
- unprocessedRoutes: HighDensityRoute$1[];
1893
- vias: Via[];
1894
- offendingVias: [Via, Via][];
1895
- currentViaRoutes: HighDensityIntraNodeRoute$1[];
1896
- connMap?: ConnectivityMap;
1897
- colorMap: Record<string, string>;
1898
- outline?: Array<{
1899
- x: number;
1900
- y: number;
1901
- }>;
1902
- obstacles: Obstacle[];
1903
- viasByNet: Map<string, Via[]>;
1904
- obstacleSHI: ObstacleSpatialHashIndex | null;
1905
- hdRouteSHI: HighDensityRouteSpatialIndex | null;
1906
- constructor(input: SameNetViaMergerSolverInput);
1907
- private rebuildVias;
1908
- private findNextOffendingPair;
1909
- private handleOffendingPair;
1910
- _step(): void;
1911
- getMergedViaHdRoutes(): HighDensityRoute$1[] | null;
1912
- visualize(): GraphicsObject;
1913
- }
1914
-
1915
1664
  /**
1916
1665
  * A Disjoint Set Union (DSU) or Union-Find data structure.
1917
1666
  * It tracks a collection of disjoint sets and can efficiently merge them.
@@ -1966,6 +1715,61 @@ declare class NetToPointPairsSolver2_OffBoardConnection extends NetToPointPairsS
1966
1715
  _step(): void;
1967
1716
  }
1968
1717
 
1718
+ /**
1719
+ * TraceSimplificationSolver consolidates trace optimization by iteratively applying
1720
+ * via removal, via merging, and path simplification phases. It reduces redundant vias
1721
+ * and simplifies routing paths through configurable iterations.
1722
+ *
1723
+ * The solver operates in three alternating phases per iteration:
1724
+ * 1. "via_removal" - Removes unnecessary vias from routes using UselessViaRemovalSolver
1725
+ * 2. "via_merging" - Merges redundant vias on the same net using SameNetViaMergerSolver
1726
+ * 3. "path_simplification" - Simplifies routing paths using MultiSimplifiedPathSolver
1727
+ *
1728
+ * Each iteration consists of all phases executed sequentially.
1729
+ */
1730
+ declare class TraceSimplificationSolver extends BaseSolver {
1731
+ private simplificationConfig;
1732
+ /** The current state of high-density routes being progressively simplified */
1733
+ private hdRoutes;
1734
+ /** Current iteration count (0-indexed) */
1735
+ private currentRun;
1736
+ /** Total number of iterations to run (each iteration includes all phases) */
1737
+ private totalIterations;
1738
+ /** Current phase of simplification being executed */
1739
+ private currentPhase;
1740
+ /** Callback to extract results from the active sub-solver */
1741
+ private extractResult;
1742
+ /** Returns the simplified routes. This is the primary output of the solver. */
1743
+ get simplifiedHdRoutes(): HighDensityRoute$1[];
1744
+ /**
1745
+ * Creates a new TraceSimplificationSolver
1746
+ * @param simplificationConfig Configuration object containing:
1747
+ * - hdRoutes: Initial high-density routes to simplify
1748
+ * - obstacles: Board obstacles to avoid during simplification
1749
+ * - connMap: Connectivity map for routing validation
1750
+ * - colorMap: Mapping of net names to colors for visualization
1751
+ * - outline: Optional board outline boundary
1752
+ * - defaultViaDiameter: Default diameter for vias
1753
+ * - layerCount: Number of routing layers
1754
+ * - iterations: Number of complete simplification iterations (default: 2)
1755
+ */
1756
+ constructor(simplificationConfig: {
1757
+ hdRoutes: HighDensityRoute$1[];
1758
+ obstacles: Obstacle[];
1759
+ connMap: ConnectivityMap;
1760
+ colorMap: Record<string, string>;
1761
+ outline?: Array<{
1762
+ x: number;
1763
+ y: number;
1764
+ }>;
1765
+ defaultViaDiameter: number;
1766
+ layerCount: number;
1767
+ iterations?: number;
1768
+ });
1769
+ _step(): void;
1770
+ visualize(): GraphicsObject;
1771
+ }
1772
+
1969
1773
  interface CapacityMeshSolverOptions$1 {
1970
1774
  capacityDepth?: number;
1971
1775
  targetMinCapacity?: number;
@@ -1996,11 +1800,7 @@ declare class AutoroutingPipelineSolver extends BaseSolver {
1996
1800
  singleLayerNodeMerger?: SingleLayerNodeMergerSolver;
1997
1801
  strawSolver?: StrawSolver;
1998
1802
  deadEndSolver?: DeadEndSolver;
1999
- uselessViaRemovalSolver1?: UselessViaRemovalSolver;
2000
- uselessViaRemovalSolver2?: UselessViaRemovalSolver;
2001
- sameNetViaMerger?: SameNetViaMergerSolver;
2002
- multiSimplifiedPathSolver1?: MultiSimplifiedPathSolver;
2003
- multiSimplifiedPathSolver2?: MultiSimplifiedPathSolver;
1803
+ traceSimplificationSolver?: TraceSimplificationSolver;
2004
1804
  viaDiameter: number;
2005
1805
  minTraceWidth: number;
2006
1806
  startTimeOfPhase: Record<string, number>;
@@ -2012,7 +1812,7 @@ declare class AutoroutingPipelineSolver extends BaseSolver {
2012
1812
  capacityNodes: CapacityMeshNode[] | null;
2013
1813
  capacityEdges: CapacityMeshEdge[] | null;
2014
1814
  cacheProvider: CacheProvider | null;
2015
- pipelineDef: (PipelineStep$1<typeof NetToPointPairsSolver2_OffBoardConnection> | PipelineStep$1<typeof RectDiffSolver> | PipelineStep$1<typeof StrawSolver> | PipelineStep$1<typeof CapacityMeshEdgeSolver2_NodeTreeOptimization> | PipelineStep$1<typeof DeadEndSolver> | PipelineStep$1<typeof CapacityPathingGreedySolver> | PipelineStep$1<typeof CapacityPathingMultiSectionSolver> | PipelineStep$1<typeof CapacityEdgeToPortSegmentSolver> | PipelineStep$1<typeof CapacitySegmentToPointSolver> | PipelineStep$1<typeof UnravelMultiSectionSolver> | PipelineStep$1<typeof HighDensitySolver> | PipelineStep$1<typeof MultipleHighDensityRouteStitchSolver> | PipelineStep$1<typeof UselessViaRemovalSolver> | PipelineStep$1<typeof MultiSimplifiedPathSolver> | PipelineStep$1<typeof SameNetViaMergerSolver>)[];
1815
+ pipelineDef: (PipelineStep$1<typeof NetToPointPairsSolver2_OffBoardConnection> | PipelineStep$1<typeof RectDiffSolver> | PipelineStep$1<typeof StrawSolver> | PipelineStep$1<typeof CapacityMeshEdgeSolver2_NodeTreeOptimization> | PipelineStep$1<typeof DeadEndSolver> | PipelineStep$1<typeof CapacityPathingGreedySolver> | PipelineStep$1<typeof CapacityPathingMultiSectionSolver> | PipelineStep$1<typeof CapacityEdgeToPortSegmentSolver> | PipelineStep$1<typeof CapacitySegmentToPointSolver> | PipelineStep$1<typeof UnravelMultiSectionSolver> | PipelineStep$1<typeof HighDensitySolver> | PipelineStep$1<typeof MultipleHighDensityRouteStitchSolver> | PipelineStep$1<typeof TraceSimplificationSolver>)[];
2016
1816
  constructor(srj: SimpleRouteJson, opts?: CapacityMeshSolverOptions$1);
2017
1817
  currentPipelineStepIndex: number;
2018
1818
  _step(): void;
@@ -2173,6 +1973,26 @@ declare function getGlobalLocalStorageCache(): LocalStorageCache;
2173
1973
  declare function getGlobalInMemoryCache(): InMemoryCache;
2174
1974
  declare function setupGlobalCaches(): void;
2175
1975
 
1976
+ /**
1977
+ * ObstacleTree wraps different spatial index implementations:
1978
+ * - 'native': original spatial-hash grid
1979
+ * - 'rbush': dynamic R-tree via rbush
1980
+ * - 'flatbush': static index via flatbush
1981
+ */
1982
+ declare class ObstacleSpatialHashIndex {
1983
+ private idx;
1984
+ private storage;
1985
+ constructor(implementation?: "native" | "rbush" | "flatbush", obstacles?: Obstacle[]);
1986
+ insert(o: Obstacle): void;
1987
+ search(bbox: {
1988
+ minX: number;
1989
+ minY: number;
1990
+ maxX: number;
1991
+ maxY: number;
1992
+ }): Obstacle[];
1993
+ searchArea(centerX: number, centerY: number, width: number, height: number): Obstacle[];
1994
+ }
1995
+
2176
1996
  interface Target$1 {
2177
1997
  x: number;
2178
1998
  y: number;
@@ -2391,6 +2211,191 @@ declare class AssignableViaNodeMergerSolver extends BaseSolver {
2391
2211
  visualize(): GraphicsObject;
2392
2212
  }
2393
2213
 
2214
+ interface Point$1 {
2215
+ x: number;
2216
+ y: number;
2217
+ z: number;
2218
+ }
2219
+ declare class SingleSimplifiedPathSolver extends BaseSolver {
2220
+ newRoute: HighDensityIntraNodeRoute$1["route"];
2221
+ newVias: HighDensityIntraNodeRoute$1["vias"];
2222
+ headIndex: number;
2223
+ tailIndex: number;
2224
+ inputRoute: HighDensityIntraNodeRoute$1;
2225
+ otherHdRoutes: HighDensityIntraNodeRoute$1[];
2226
+ obstacles: Obstacle[];
2227
+ connMap: ConnectivityMap;
2228
+ colorMap: Record<string, string>;
2229
+ outline?: Array<{
2230
+ x: number;
2231
+ y: number;
2232
+ }>;
2233
+ constructor(params: {
2234
+ inputRoute: HighDensityIntraNodeRoute$1;
2235
+ otherHdRoutes: HighDensityIntraNodeRoute$1[];
2236
+ obstacles: Obstacle[];
2237
+ connMap: ConnectivityMap;
2238
+ colorMap: Record<string, string>;
2239
+ outline?: Array<{
2240
+ x: number;
2241
+ y: number;
2242
+ }>;
2243
+ });
2244
+ getConstructorParams(): {
2245
+ inputRoute: HighDensityIntraNodeRoute$1;
2246
+ otherHdRoutes: HighDensityIntraNodeRoute$1[];
2247
+ obstacles: Obstacle[];
2248
+ connMap: Record<string, string[]>;
2249
+ colorMap: Record<string, string>;
2250
+ outline: {
2251
+ x: number;
2252
+ y: number;
2253
+ }[] | undefined;
2254
+ };
2255
+ get simplifiedRoute(): HighDensityIntraNodeRoute$1;
2256
+ isValidPath(pointsInRoute: Point$1[]): boolean;
2257
+ _step(): void;
2258
+ getVisualsForNewRouteAndObstacles(): GraphicsObject & Pick<Required<GraphicsObject>, "points" | "lines" | "rects" | "circles">;
2259
+ }
2260
+
2261
+ declare class MultiSimplifiedPathSolver extends BaseSolver {
2262
+ simplifiedHdRoutes: HighDensityIntraNodeRoute$1[];
2263
+ currentUnsimplifiedHdRouteIndex: number;
2264
+ activeSubSolver: SingleSimplifiedPathSolver | null;
2265
+ unsimplifiedHdRoutes: HighDensityIntraNodeRoute$1[];
2266
+ obstacles: Obstacle[];
2267
+ connMap: ConnectivityMap;
2268
+ colorMap: Record<string, string>;
2269
+ outline?: Array<{
2270
+ x: number;
2271
+ y: number;
2272
+ }>;
2273
+ defaultViaDiameter: number;
2274
+ constructor(params: {
2275
+ unsimplifiedHdRoutes: HighDensityIntraNodeRoute$1[];
2276
+ obstacles: Obstacle[];
2277
+ connMap?: ConnectivityMap;
2278
+ colorMap?: Record<string, string>;
2279
+ outline?: Array<{
2280
+ x: number;
2281
+ y: number;
2282
+ }>;
2283
+ defaultViaDiameter?: number;
2284
+ });
2285
+ _step(): void;
2286
+ visualize(): GraphicsObject;
2287
+ }
2288
+
2289
+ interface Point {
2290
+ x: number;
2291
+ y: number;
2292
+ z: number;
2293
+ }
2294
+ type Point2D = {
2295
+ x: number;
2296
+ y: number;
2297
+ };
2298
+ type HighDensityIntraNodeRoute = {
2299
+ connectionName: string;
2300
+ traceThickness: number;
2301
+ viaDiameter: number;
2302
+ route: Array<{
2303
+ x: number;
2304
+ y: number;
2305
+ z: number;
2306
+ }>;
2307
+ vias: Array<{
2308
+ x: number;
2309
+ y: number;
2310
+ }>;
2311
+ };
2312
+ type HighDensityRoute = HighDensityIntraNodeRoute;
2313
+ declare class HighDensityRouteSpatialIndex {
2314
+ private segmentBuckets;
2315
+ private viaBuckets;
2316
+ private routes;
2317
+ private CELL_SIZE;
2318
+ constructor(routes: HighDensityRoute[], cellSize?: number);
2319
+ /**
2320
+ * Finds routes that potentially conflict with a given line segment within a margin.
2321
+ * Checks both segments and vias.
2322
+ * @param segmentStart Start point of the query segment.
2323
+ * @param segmentEnd End point of the query segment.
2324
+ * @param margin The minimum required clearance distance from the query segment's centerline.
2325
+ * @returns An array of conflicting routes and their minimum distance to the segment.
2326
+ */
2327
+ getConflictingRoutesForSegment(segmentStart: Point, // Keep Point for original Z data if needed elsewhere
2328
+ segmentEnd: Point, margin: number): Array<{
2329
+ conflictingRoute: HighDensityRoute;
2330
+ distance: number;
2331
+ }>;
2332
+ /**
2333
+ * Finds routes that pass near a given point within a margin.
2334
+ * Checks both segments and vias.
2335
+ * @param point The query point {x, y}. Z is ignored.
2336
+ * @param margin The minimum required clearance distance from the query point.
2337
+ * @returns An array of conflicting routes and their minimum distance to the point.
2338
+ */
2339
+ getConflictingRoutesNearPoint(point: Point2D, margin: number): Array<{
2340
+ conflictingRoute: HighDensityRoute;
2341
+ distance: number;
2342
+ }>;
2343
+ }
2344
+
2345
+ interface RouteSection {
2346
+ startIndex: number;
2347
+ endIndex: number;
2348
+ z: number;
2349
+ points: HighDensityRoute["route"];
2350
+ }
2351
+ declare class SingleRouteUselessViaRemovalSolver extends BaseSolver {
2352
+ obstacleSHI: ObstacleSpatialHashIndex;
2353
+ hdRouteSHI: HighDensityRouteSpatialIndex;
2354
+ unsimplifiedRoute: HighDensityRoute;
2355
+ routeSections: Array<RouteSection>;
2356
+ currentSectionIndex: number;
2357
+ TRACE_THICKNESS: number;
2358
+ OBSTACLE_MARGIN: number;
2359
+ constructor(params: {
2360
+ obstacleSHI: ObstacleSpatialHashIndex;
2361
+ hdRouteSHI: HighDensityRouteSpatialIndex;
2362
+ unsimplifiedRoute: HighDensityRoute;
2363
+ });
2364
+ breakRouteIntoSections(route: HighDensityRoute): never[] | this["routeSections"];
2365
+ _step(): void;
2366
+ canSectionMoveToLayer({ currentSection, targetZ, }: {
2367
+ currentSection: RouteSection;
2368
+ targetZ: number;
2369
+ }): boolean;
2370
+ getConstructorParams(): {
2371
+ obstacleSHI: ObstacleSpatialHashIndex;
2372
+ hdRouteSHI: HighDensityRouteSpatialIndex;
2373
+ unsimplifiedRoute: HighDensityIntraNodeRoute;
2374
+ };
2375
+ getOptimizedHdRoute(): HighDensityRoute;
2376
+ visualize(): GraphicsObject;
2377
+ }
2378
+
2379
+ interface UselessViaRemovalSolverInput {
2380
+ unsimplifiedHdRoutes: HighDensityRoute$1[];
2381
+ obstacles: Obstacle[];
2382
+ colorMap: Record<string, string>;
2383
+ layerCount: number;
2384
+ }
2385
+ declare class UselessViaRemovalSolver extends BaseSolver {
2386
+ private input;
2387
+ unsimplifiedHdRoutes: HighDensityRoute$1[];
2388
+ optimizedHdRoutes: HighDensityRoute$1[];
2389
+ unprocessedRoutes: HighDensityRoute$1[];
2390
+ activeSubSolver?: SingleRouteUselessViaRemovalSolver | null | undefined;
2391
+ obstacleSHI: ObstacleSpatialHashIndex | null;
2392
+ hdRouteSHI: HighDensityRouteSpatialIndex | null;
2393
+ constructor(input: UselessViaRemovalSolverInput);
2394
+ _step(): void;
2395
+ getOptimizedHdRoutes(): HighDensityRoute$1[] | null;
2396
+ visualize(): GraphicsObject;
2397
+ }
2398
+
2394
2399
  type Candidate = {
2395
2400
  prevCandidate: Candidate | null;
2396
2401
  node: CapacityMeshNode;