From 07362c592feeda71ec9b583ae54ae107f983039e Mon Sep 17 00:00:00 2001 From: jaseg Date: Fri, 19 Aug 2022 16:50:57 +0200 Subject: 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. --- gerbonara/rs274x.py | 6 +++--- 1 file 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: -- cgit