summaryrefslogtreecommitdiff
path: root/gerbonara/apertures.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-04-29 17:25:32 +0200
committerjaseg <git@jaseg.de>2023-04-30 11:07:29 +0200
commit26c2460490b6e64790c94e00be848465a6a5fa96 (patch)
treec23288bc30772615a758a856a456cc1d74affb31 /gerbonara/apertures.py
parentaf3458b1e22f92f51606cff8f771d03551af4cc0 (diff)
downloadgerbonara-26c2460490b6e64790c94e00be848465a6a5fa96.tar.gz
gerbonara-26c2460490b6e64790c94e00be848465a6a5fa96.tar.bz2
gerbonara-26c2460490b6e64790c94e00be848465a6a5fa96.zip
Fix remaining unit tests
Diffstat (limited to 'gerbonara/apertures.py')
-rw-r--r--gerbonara/apertures.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gerbonara/apertures.py b/gerbonara/apertures.py
index 4582b76..c49b599 100644
--- a/gerbonara/apertures.py
+++ b/gerbonara/apertures.py
@@ -60,8 +60,8 @@ class Aperture:
_ : KW_ONLY
unit: LengthUnit = None
attrs: tuple = None
- original_number: int = None
- _bounding_box: tuple = None
+ original_number: int = field(default=None, hash=False, compare=False)
+ _bounding_box: tuple = field(default=None, hash=False, compare=False)
def _params(self, unit=None):
out = []
@@ -351,7 +351,7 @@ class PolygonAperture(Aperture):
hole_dia : Length(float) = None
def __post_init__(self):
- self.n_vertices = int(self.n_vertices)
+ object.__setattr__(self, 'n_vertices', int(self.n_vertices))
def _primitives(self, x, y, unit=None, polarity_dark=True):
return [ gp.ArcPoly.from_regular_polygon(x, y, self.unit.convert_to(unit, self.diameter)/2, self.n_vertices,