Argmaster / pygerber

Python implementation of Gerber X3/X2 standard with 2D rendering engine.
https://argmaster.github.io/pygerber/stable
MIT License
55 stars 10 forks source link

pyparsing.exceptions.ParseException #303

Closed Feiyuyu0503 closed 2 months ago

Feiyuyu0503 commented 2 months ago

Describe the bug pyparsing.exceptions.ParseException: Expected {{End of file end of expression} | {Program stop end of expression}}, found 'I0J26016' (at char 1312652), (line:5045, col:1222912)

To Reproduce

file = 'xxx.gbr'

def main():

    GerberFile.from_file(
        file_path=file,
    ).parse(on_parser_error=OnParserErrorEnum.Ignore).render_raster(
        f"{file[:-4]}.png",
        #dpmm=105,
        #color_scheme=ColorScheme.COPPER_ALPHA,
        #pixel_format=PixelFormatEnum.RGBA,
    )

Expected behavior render correctly

Desktop (please complete the following information):

Argmaster commented 2 months ago

I will look into it, funky syntax though. If possible, fix will be included in 3.0.0a2, watch out for changes in API design.

Feiyuyu0503 commented 2 months ago

thanks!

Argmaster commented 2 months ago

Could you please provide reference image showing what is the expected result? It could be for example a screenshot from software you have used for generating this file.

Argmaster commented 2 months ago

.

Feiyuyu0503 commented 2 months ago

Yes!Thank you for your help!

Feiyuyu0503 commented 2 months ago

Could you please edit this reply and remove the reference image? 🙏

Argmaster commented 2 months ago

Sure