summaryrefslogtreecommitdiff
path: root/gerbonara/cam.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-11-09 19:16:37 +0100
committerjaseg <git@jaseg.de>2023-11-14 21:52:12 +0100
commit74fb384c4c0899f4d6f153da8db748a7a49e78ee (patch)
tree6e956d0fb498f1e47b995ec6093827f2a5395fc8 /gerbonara/cam.py
parent9af071344523accb5ae094ec76d5ace8102f1b0e (diff)
downloadgerbonara-74fb384c4c0899f4d6f153da8db748a7a49e78ee.tar.gz
gerbonara-74fb384c4c0899f4d6f153da8db748a7a49e78ee.tar.bz2
gerbonara-74fb384c4c0899f4d6f153da8db748a7a49e78ee.zip
aperture macros: work around gerbv/jlc wonkiness
Diffstat (limited to 'gerbonara/cam.py')
-rw-r--r--gerbonara/cam.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gerbonara/cam.py b/gerbonara/cam.py
index 3c92441..8389425 100644
--- a/gerbonara/cam.py
+++ b/gerbonara/cam.py
@@ -54,6 +54,13 @@ class FileSettings:
zeros : bool = None
#: Number format. ``(integer, decimal)`` tuple of number of integer and decimal digits. At most ``(6,7)`` by spec.
number_format : tuple = (None, None)
+ #: At least the aperture macro implementations of gerbv and whatever JLCPCB uses are severely broken and simply
+ #: ignore parentheses in numeric expressions without throwing an error or a warning, leading to broken rendering.
+ #: To avoid trouble with severely broken software like this, we split out any non-trivial numeric sub-expressions
+ #: into separate internal macro variables by default.
+ #: If you want to export the macros with their original formulaic expressions (which is completely fine by the
+ #: Gerber standard, btw), set this parameter to ``True`` before exporting.
+ allow_mixed_operators_in_aperture_macros: bool = False
# input validation
def __setattr__(self, name, value):