Home/ Reference/ Units & Conversion

shape.GetBoundingBox() → w*h

Bounding box area, for overlap tests like "are these two G's the same one": overlap area / min(area A, area B) >= 0.85 counts as the same spot. That's the dedupe log

Signature

shape.GetBoundingBox() → w*h

Notes

Bounding box area, for overlap tests like "are these two G's the same one": overlap area / min(area A, area B) >= 0.85 counts as the same spot. That's the dedupe logic in the code.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
shape = app.ActiveSelectionRange(1)

x, y, w, h = shape.GetBoundingBox()     # (left x, bottom y, width, height)
box_area = w * h

print("Bounding box area: ", round(box_area, 4))
print("in mm2: ", round(box_area * 25.4 * 25.4, 1))

About this section: Units & Conversion

Units & Conversion — document units and conversion.

Other entries in this section