From 42efee6996ebd6a7324f0164992bc7ac574711af Mon Sep 17 00:00:00 2001 From: svandenb-dev Date: Wed, 5 Nov 2025 13:36:14 +0100 Subject: [PATCH 1/3] component bounding box wrong formating --- src/pyedb/grpc/database/hierarchy/component.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyedb/grpc/database/hierarchy/component.py b/src/pyedb/grpc/database/hierarchy/component.py index c88d35150d..c76bb06f62 100644 --- a/src/pyedb/grpc/database/hierarchy/component.py +++ b/src/pyedb/grpc/database/hierarchy/component.py @@ -763,7 +763,7 @@ def location(self, value): super(Component, self.__class__).location.__set__(self, _location) @property - def bounding_box(self) -> list[float]: + def bounding_box(self) -> tuple[tuple[float, float], tuple[float, float]]: """Component's bounding box. Returns @@ -776,7 +776,7 @@ def bounding_box(self) -> list[float]: bbox = self.component_instance.get_bbox().points pt1 = bbox[0] pt2 = bbox[2] - return [Value(pt1.x), Value(pt1.y), Value(pt2.x), Value(pt2.y)] + return (Value(pt1.x), Value(pt1.y)), (Value(pt2.x), Value(pt2.y)) @property def rotation(self) -> float: From 7c4c57db1aec69ea40db65fa55de4d15019b40bb Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 5 Nov 2025 12:39:24 +0000 Subject: [PATCH 2/3] chore: adding changelog file 1630.fixed.md [dependabot-skip] --- doc/changelog.d/1630.fixed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/1630.fixed.md diff --git a/doc/changelog.d/1630.fixed.md b/doc/changelog.d/1630.fixed.md new file mode 100644 index 0000000000..84cf8eaece --- /dev/null +++ b/doc/changelog.d/1630.fixed.md @@ -0,0 +1 @@ +Component bounding box wrong formating From 9d93935eaf268c37f023dacaa0974a81c89060a0 Mon Sep 17 00:00:00 2001 From: svandenb-dev Date: Fri, 14 Nov 2025 15:14:46 +0100 Subject: [PATCH 3/3] grpc padstack instance bbox test fix --- src/pyedb/grpc/database/hierarchy/component.py | 8 ++++---- src/pyedb/workflows/drc/drc.py | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/pyedb/grpc/database/hierarchy/component.py b/src/pyedb/grpc/database/hierarchy/component.py index c76bb06f62..f6a139a832 100644 --- a/src/pyedb/grpc/database/hierarchy/component.py +++ b/src/pyedb/grpc/database/hierarchy/component.py @@ -1199,10 +1199,10 @@ def create_clearance_on_component(self, extra_soldermask_clearance=1e-4) -> bool bool """ bounding_box = self.bounding_box - opening = [bounding_box[0] - extra_soldermask_clearance] - opening.append(bounding_box[1] - extra_soldermask_clearance) - opening.append(bounding_box[2] + extra_soldermask_clearance) - opening.append(bounding_box[3] + extra_soldermask_clearance) + opening = [bounding_box[0][0] - extra_soldermask_clearance] + opening.append(bounding_box[0][1] - extra_soldermask_clearance) + opening.append(bounding_box[1][0] + extra_soldermask_clearance) + opening.append(bounding_box[1][1] + extra_soldermask_clearance) comp_layer = self.layer layer_names = list(self._pedb.stackup.layers.keys()) diff --git a/src/pyedb/workflows/drc/drc.py b/src/pyedb/workflows/drc/drc.py index b43dda73c8..e57684156e 100644 --- a/src/pyedb/workflows/drc/drc.py +++ b/src/pyedb/workflows/drc/drc.py @@ -398,7 +398,10 @@ def _build_spatial_index(self) -> None: for i, via in enumerate(self.edb.padstacks.instances.values()): self.idx_vias.insert(i, via.position) for i, comp in enumerate(self.edb.components.instances.values()): - self.idx_components.insert(i, comp.bounding_box) + comp_bbox = comp.bounding_box + if isinstance(comp_bbox, tuple): + comp_bbox = [comp_bbox[0][0], comp_bbox[0][1], comp_bbox[1][0], comp_bbox[1][1]] + self.idx_components.insert(i, comp_bbox) def check(self, rules: Rules) -> List[Dict[str, Any]]: """