diff --git a/lib/solvers/AutoroutingPipelineSolver.ts b/lib/solvers/AutoroutingPipelineSolver.ts index c1692b8b..7af39511 100644 --- a/lib/solvers/AutoroutingPipelineSolver.ts +++ b/lib/solvers/AutoroutingPipelineSolver.ts @@ -37,6 +37,7 @@ import { CapacityMeshNodeSolver3_LargerSingleLayerNodes } from "./CapacityMeshSo import { StrawSolver } from "./StrawSolver/StrawSolver" import { SingleLayerNodeMergerSolver } from "./SingleLayerNodeMerger/SingleLayerNodeMergerSolver" import { CapacityNodeTargetMerger2 } from "./CapacityNodeTargetMerger/CapacityNodeTargetMerger2" +import { PathSmoothingSolver } from "./PathSmoothingSolver/PathSmoothingSolver" interface CapacityMeshSolverOptions { capacityDepth?: number @@ -83,6 +84,7 @@ export class CapacityMeshSolver extends BaseSolver { colorMap: Record segmentToPointSolver?: CapacitySegmentToPointSolver unravelMultiSectionSolver?: UnravelMultiSectionSolver + pathSmoothingSolver?: PathSmoothingSolver segmentToPointOptimizer?: CapacitySegmentPointOptimizer highDensityRouteSolver?: HighDensitySolver highDensityStitchSolver?: MultipleHighDensityRouteStitchSolver @@ -241,6 +243,9 @@ export class CapacityMeshSolver extends BaseSolver { }, ], ), + definePipelineStep("pathSmoothingSolver", PathSmoothingSolver, (cms) => [ + {}, + ]), ] constructor( @@ -327,6 +332,7 @@ export class CapacityMeshSolver extends BaseSolver { this.segmentToPointOptimizer?.visualize() const highDensityViz = this.highDensityRouteSolver?.visualize() const highDensityStitchViz = this.highDensityStitchSolver?.visualize() + const pathSmoothingViz = this.pathSmoothingSolver?.visualize() const problemViz = { points: [...this.srj.connections.flatMap((c) => c.pointsToConnect)], rects: [ @@ -379,6 +385,7 @@ export class CapacityMeshSolver extends BaseSolver { convertSrjToGraphicsObject(this.getOutputSimpleRouteJson()), ) : null, + pathSmoothingViz, ].filter(Boolean) as GraphicsObject[] // return visualizations[visualizations.length - 1] return combineVisualizations(...visualizations) diff --git a/lib/solvers/PathSmoothingSolver/PathSmoothingSolver.ts b/lib/solvers/PathSmoothingSolver/PathSmoothingSolver.ts new file mode 100644 index 00000000..7829a993 --- /dev/null +++ b/lib/solvers/PathSmoothingSolver/PathSmoothingSolver.ts @@ -0,0 +1,10 @@ +import { GraphicsObject } from "graphics-debug" +import { BaseSolver } from "../BaseSolver" + +export class PathSmoothingSolver extends BaseSolver { + constructor(params: {}) { + super() + } + + visualize(): GraphicsObject {} +}