Add ShapeSearchTree: exact spatial index over item shapes

A bounding-box spatial hash (broad phase) with exact IntBox-intersection
narrow phase, replacing the exact router's occupancy grid. Supports
insert/remove-owner and overlap/region queries, a clearance_conflict test
(strict 2-D overlap of the clearance-expanded box, so tiles exactly a
clearance apart are allowed), and has_violation for the whole-board DRC
check. Tiles are tagged routed vs static so pad-vs-pad spacing in the
source design is not counted as a routing violation.
This commit is contained in:
2026-07-13 02:16:11 -06:00
parent 2d394872e3
commit b200ecf6f8
3 changed files with 203 additions and 0 deletions
+3
View File
@@ -17,6 +17,7 @@ from .clearance import ClearanceMatrix
from .items import ConductionArea, Item, ObstacleArea, Pin, Trace, Via
from .layer import Layer, LayerStructure
from .net import Net, Nets
from .search_tree import ShapeSearchTree, TreeShape
from .transform import CoordinateTransform
from .unit import Unit
@@ -35,5 +36,7 @@ __all__ = [
"Via",
"Trace",
"BasicBoard",
"ShapeSearchTree",
"TreeShape",
"build_board",
]