@tscircuit/capacity-autorouter 0.0.46 → 0.0.47

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
@@ -2038,7 +2038,7 @@ function clamp(value, min, max) {
2038
2038
  return Math.max(min, Math.min(max, value));
2039
2039
  }
2040
2040
 
2041
- // node_modules/@tscircuit/math-utils/dist/chunk-OMVVSGKD.js
2041
+ // node_modules/@tscircuit/math-utils/dist/chunk-K7F26NYD.js
2042
2042
  function segmentToBoundsMinDistance(a, b, bounds) {
2043
2043
  const topLeft = { x: bounds.minX, y: bounds.minY };
2044
2044
  const topRight = { x: bounds.maxX, y: bounds.minY };
@@ -8144,10 +8144,11 @@ var SingleSimplifiedPathSolver5 = class extends SingleSimplifiedPathSolver {
8144
8144
  const vias = hdRoute.vias;
8145
8145
  const filteredVias = [];
8146
8146
  for (const via of vias) {
8147
- const minX = via.x - hdRoute.viaDiameter / 2;
8148
- const maxX = via.x + hdRoute.viaDiameter / 2;
8149
- const minY = via.y - hdRoute.viaDiameter / 2;
8150
- const maxY = via.y + hdRoute.viaDiameter / 2;
8147
+ const margin = this.OBSTACLE_MARGIN + this.TRACE_THICKNESS / 2 + hdRoute.viaDiameter / 2;
8148
+ const minX = via.x - margin;
8149
+ const maxX = via.x + margin;
8150
+ const minY = via.y - margin;
8151
+ const maxY = via.y + margin;
8151
8152
  if (minX <= bounds.maxX && maxX >= bounds.minX && minY <= bounds.maxY && maxY >= bounds.minY) {
8152
8153
  filteredVias.push({ ...via, diameter: hdRoute.viaDiameter });
8153
8154
  }