summaryrefslogtreecommitdiff
path: root/gerbonara/apertures.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara/apertures.py')
-rw-r--r--gerbonara/apertures.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gerbonara/apertures.py b/gerbonara/apertures.py
index feccb7f..73a6e9c 100644
--- a/gerbonara/apertures.py
+++ b/gerbonara/apertures.py
@@ -20,7 +20,7 @@ import math
from dataclasses import dataclass, replace, field, fields, InitVar
from .aperture_macros.parse import GenericMacros
-from .utils import MM, Inch
+from .utils import MM, Inch, sum_bounds
from . import graphic_primitives as gp
@@ -118,6 +118,9 @@ class Aperture:
"""
return self._primitives(x, y, unit, polarity_dark)
+ def bounding_box(self, unit=None):
+ return sum_bounds((prim.bounding_box() for prim in self.flash(0, 0, unit, True)))
+
def equivalent_width(self, unit=None):
""" Get the width of a line interpolated using this aperture in the given :py:class:`~.LengthUnit`.