diff options
Diffstat (limited to 'gerbonara/apertures.py')
-rw-r--r-- | gerbonara/apertures.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gerbonara/apertures.py b/gerbonara/apertures.py index 09b15d2..f057052 100644 --- a/gerbonara/apertures.py +++ b/gerbonara/apertures.py @@ -446,6 +446,11 @@ class ApertureMacroInstance(Aperture): def scaled(self, scale): return replace(self, macro=self.macro.scaled(scale)) + def calculate_out(self, unit=None, macro_name=None): + return replace(self, + parameters=tuple(), + macro=self.macro.substitute_params(self._params(unit), unit, macro_name)) + def _params(self, unit=None): # We ignore "unit" here as we convert the actual macro, not this instantiation. # We do this because here we do not have information about which parameter has which physical units. @@ -455,4 +460,3 @@ class ApertureMacroInstance(Aperture): parameters = parameters[:self.macro.num_parameters] return tuple(parameters) - |