@tscircuit/capacity-autorouter 0.0.47 → 0.0.48

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.js CHANGED
@@ -8387,8 +8387,17 @@ var SingleSimplifiedPathSolver5 = class extends SingleSimplifiedPathSolver {
8387
8387
  return;
8388
8388
  }
8389
8389
  if (!path45 && !this.lastValidPath) {
8390
+ const oldTailPoint = this.getPointAtDistance(this.tailDistanceAlongPath);
8390
8391
  this.tailDistanceAlongPath += this.minStepSize;
8391
8392
  this.moveHead(this.minStepSize);
8393
+ const newTailIndex = this.getNearestIndexForDistance(
8394
+ this.tailDistanceAlongPath
8395
+ );
8396
+ const newTailPoint = this.inputRoute.route[newTailIndex];
8397
+ const lastRoutePoint = this.inputRoute.route[this.inputRoute.route.length - 1];
8398
+ if (!this.arePointsEqual(oldTailPoint, newTailPoint) && !this.arePointsEqual(newTailPoint, lastRoutePoint)) {
8399
+ this.newRoute.push(newTailPoint);
8400
+ }
8392
8401
  return;
8393
8402
  }
8394
8403
  if (path45) {