summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-08-19 16:50:57 +0200
committerjaseg <git@jaseg.de>2023-11-14 21:52:12 +0100
commit07362c592feeda71ec9b583ae54ae107f983039e (patch)
tree3b0430dd39ed5f0df45ea43a2c1ca1fe26a6a993
parent2f5f7719c656d87d547ed9a24ba8a92364c1a456 (diff)
downloadgerbonara-07362c592feeda71ec9b583ae54ae107f983039e.tar.gz
gerbonara-07362c592feeda71ec9b583ae54ae107f983039e.tar.bz2
gerbonara-07362c592feeda71ec9b583ae54ae107f983039e.zip
Make sure we asterisk-terminate all G0x commands.
While this is common in the wild, not terminating them violates the spec. It also breaks JLCPCB pretty badly. It seems their human review process uses a Gerber viewer that like most can handle this, and won't notice anything out of the ordinary, but then their photoplotter chokes on this and literally stops plotting the file, discarding anything that is after that line. This error is then apparently ignored and the resulting broken boards shipped to the customer.
-rw-r--r--gerbonara/rs274x.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gerbonara/rs274x.py b/gerbonara/rs274x.py
index db74780..1559740 100644
--- a/gerbonara/rs274x.py
+++ b/gerbonara/rs274x.py
@@ -572,9 +572,9 @@ class GraphicsState:
def interpolation_mode_statement(self):
return {
- InterpMode.LINEAR: 'G01',
- InterpMode.CIRCULAR_CW: 'G02',
- InterpMode.CIRCULAR_CCW: 'G03'}[self.interpolation_mode]
+ InterpMode.LINEAR: 'G01*',
+ InterpMode.CIRCULAR_CW: 'G02*',
+ InterpMode.CIRCULAR_CCW: 'G03*'}[self.interpolation_mode]
class GerberParser: