Skip to content

Commit 9d93935

Browse files
committed
grpc padstack instance bbox test fix
1 parent 7c4c57d commit 9d93935

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/pyedb/grpc/database/hierarchy/component.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,10 +1199,10 @@ def create_clearance_on_component(self, extra_soldermask_clearance=1e-4) -> bool
11991199
bool
12001200
"""
12011201
bounding_box = self.bounding_box
1202-
opening = [bounding_box[0] - extra_soldermask_clearance]
1203-
opening.append(bounding_box[1] - extra_soldermask_clearance)
1204-
opening.append(bounding_box[2] + extra_soldermask_clearance)
1205-
opening.append(bounding_box[3] + extra_soldermask_clearance)
1202+
opening = [bounding_box[0][0] - extra_soldermask_clearance]
1203+
opening.append(bounding_box[0][1] - extra_soldermask_clearance)
1204+
opening.append(bounding_box[1][0] + extra_soldermask_clearance)
1205+
opening.append(bounding_box[1][1] + extra_soldermask_clearance)
12061206

12071207
comp_layer = self.layer
12081208
layer_names = list(self._pedb.stackup.layers.keys())

src/pyedb/workflows/drc/drc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,10 @@ def _build_spatial_index(self) -> None:
398398
for i, via in enumerate(self.edb.padstacks.instances.values()):
399399
self.idx_vias.insert(i, via.position)
400400
for i, comp in enumerate(self.edb.components.instances.values()):
401-
self.idx_components.insert(i, comp.bounding_box)
401+
comp_bbox = comp.bounding_box
402+
if isinstance(comp_bbox, tuple):
403+
comp_bbox = [comp_bbox[0][0], comp_bbox[0][1], comp_bbox[1][0], comp_bbox[1][1]]
404+
self.idx_components.insert(i, comp_bbox)
402405

403406
def check(self, rules: Rules) -> List[Dict[str, Any]]:
404407
"""

0 commit comments

Comments
 (0)