summaryrefslogtreecommitdiff
path: root/gerbonara/cad/protoboard.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-04-09 18:46:36 +0200
committerjaseg <git@jaseg.de>2023-04-10 23:57:15 +0200
commit8181651a75fab99acc986bcf3105779317ac4e2e (patch)
treee5ac9f026d0c82477229608f4d41fd8ac559ab33 /gerbonara/cad/protoboard.py
parent888ae71889dfb4a9698f8f2607b649d384dd3738 (diff)
downloadgerbonara-8181651a75fab99acc986bcf3105779317ac4e2e.tar.gz
gerbonara-8181651a75fab99acc986bcf3105779317ac4e2e.tar.bz2
gerbonara-8181651a75fab99acc986bcf3105779317ac4e2e.zip
protoserve: Fix bugs, make gerber link more visible
Diffstat (limited to 'gerbonara/cad/protoboard.py')
-rw-r--r--gerbonara/cad/protoboard.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gerbonara/cad/protoboard.py b/gerbonara/cad/protoboard.py
index a3d616f..b61a0ed 100644
--- a/gerbonara/cad/protoboard.py
+++ b/gerbonara/cad/protoboard.py
@@ -116,6 +116,10 @@ class PropLayout:
return [ unit(leftover * (value or 1.0) / sum_props if not isinstance(value, str) else calculated, MM)
for value, calculated in zip(self.proportions, out) ]
+ @property
+ def single_sided(self):
+ return all(elem.single_sided for elem in self.content)
+
def __str__(self):
children = ', '.join( f'{elem}:{width}' for elem, width in zip(self.content, self.proportions))
return f'PropLayout[{self.direction.upper()}]({children})'