@crazyhappyone/auto-graph 0.2.9 → 0.2.10
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/cli/index.cjs +311 -44
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +311 -44
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +311 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +311 -44
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -770,6 +770,18 @@ interface RouteEdgeInput {
|
|
|
770
770
|
hardObstacleIndex?: BoxSpatialIndex;
|
|
771
771
|
/** Maximum greedy rerouting iterations (default 5). */
|
|
772
772
|
maxRoutingAttempts?: number;
|
|
773
|
+
/** Corridor expansion margin in px for corner-graph prefilter (default 32).
|
|
774
|
+
* Larger values include more obstacles in the local routing window. */
|
|
775
|
+
corridorMargin?: number;
|
|
776
|
+
/** Route-length / direct-distance ratio above which a backtracking
|
|
777
|
+
* warning is emitted (default 20). */
|
|
778
|
+
maxBacktrackingRatio?: number;
|
|
779
|
+
/** Max corner-graph vertices. Undefined → adaptive (derived from
|
|
780
|
+
* corridor size + obstacle count, clamped to a safe range). */
|
|
781
|
+
maxCorners?: number;
|
|
782
|
+
/** Max grid A* nodes. Undefined → adaptive (derived from obstacle
|
|
783
|
+
* count + corridor, clamped to a safe range). */
|
|
784
|
+
maxNodes?: number;
|
|
773
785
|
}
|
|
774
786
|
interface RouteEdgeResult {
|
|
775
787
|
points: Point[];
|
|
@@ -832,6 +844,15 @@ interface SolveDiagramOptions {
|
|
|
832
844
|
labelPlacement?: "beside" | "on-path";
|
|
833
845
|
/** Pixels to offset edge labels from the edge path when labelPlacement is "beside". */
|
|
834
846
|
labelOffset?: number;
|
|
847
|
+
/** Corridor expansion margin for corner-graph prefilter.
|
|
848
|
+
* - number: fixed px margin
|
|
849
|
+
* - "auto" (default): max(200, contentDiagonal * 0.3)
|
|
850
|
+
* Larger margins include more obstacles in the local routing window,
|
|
851
|
+
* improving path quality on dense diagrams at the cost of more vertices. */
|
|
852
|
+
corridorMargin?: number | "auto";
|
|
853
|
+
/** Route-length / direct-distance ratio above which a backtracking
|
|
854
|
+
* warning is emitted (default 20). */
|
|
855
|
+
maxBacktrackingRatio?: number;
|
|
835
856
|
}
|
|
836
857
|
interface PortShiftingOptions {
|
|
837
858
|
enabled?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -770,6 +770,18 @@ interface RouteEdgeInput {
|
|
|
770
770
|
hardObstacleIndex?: BoxSpatialIndex;
|
|
771
771
|
/** Maximum greedy rerouting iterations (default 5). */
|
|
772
772
|
maxRoutingAttempts?: number;
|
|
773
|
+
/** Corridor expansion margin in px for corner-graph prefilter (default 32).
|
|
774
|
+
* Larger values include more obstacles in the local routing window. */
|
|
775
|
+
corridorMargin?: number;
|
|
776
|
+
/** Route-length / direct-distance ratio above which a backtracking
|
|
777
|
+
* warning is emitted (default 20). */
|
|
778
|
+
maxBacktrackingRatio?: number;
|
|
779
|
+
/** Max corner-graph vertices. Undefined → adaptive (derived from
|
|
780
|
+
* corridor size + obstacle count, clamped to a safe range). */
|
|
781
|
+
maxCorners?: number;
|
|
782
|
+
/** Max grid A* nodes. Undefined → adaptive (derived from obstacle
|
|
783
|
+
* count + corridor, clamped to a safe range). */
|
|
784
|
+
maxNodes?: number;
|
|
773
785
|
}
|
|
774
786
|
interface RouteEdgeResult {
|
|
775
787
|
points: Point[];
|
|
@@ -832,6 +844,15 @@ interface SolveDiagramOptions {
|
|
|
832
844
|
labelPlacement?: "beside" | "on-path";
|
|
833
845
|
/** Pixels to offset edge labels from the edge path when labelPlacement is "beside". */
|
|
834
846
|
labelOffset?: number;
|
|
847
|
+
/** Corridor expansion margin for corner-graph prefilter.
|
|
848
|
+
* - number: fixed px margin
|
|
849
|
+
* - "auto" (default): max(200, contentDiagonal * 0.3)
|
|
850
|
+
* Larger margins include more obstacles in the local routing window,
|
|
851
|
+
* improving path quality on dense diagrams at the cost of more vertices. */
|
|
852
|
+
corridorMargin?: number | "auto";
|
|
853
|
+
/** Route-length / direct-distance ratio above which a backtracking
|
|
854
|
+
* warning is emitted (default 20). */
|
|
855
|
+
maxBacktrackingRatio?: number;
|
|
835
856
|
}
|
|
836
857
|
interface PortShiftingOptions {
|
|
837
858
|
enabled?: boolean;
|