Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gerbolyze convert generates... nothing, or a bunch of identical broken files? #41

Open
transplier opened this issue Sep 7, 2023 · 1 comment

Comments

@transplier
Copy link

I'm trying to get the protoboard generator working again, and I've mostly succeeded, but I'm running into something I haven't managed to chase down in the bowels of gerbolyze: the gerber files made seem to be broken or blank. I need help pinpointing the issue. For an example, I will use a file generated by generate_protoboards.py, called output_protoboards/svg/tht_normal_pitch100mil_large_holes/no_mounting_holes/tht_normal_pitch100mil_large_holes_30x40.svg (referred from now on as proto.svg)

When I run the command that export_protoboards.py would run, I get a pile of tiny, identical gerber files:

(venv) g@hamilton:~/programs/gerbolyze$ python3 -m gerbolyze convert --log-level=info --pattern-complete-tiles-only --use-apertures-for-patterns proto.svg proto_out
Warning (in fontdb:207): Failed to load a font face 0 from '/home/g/.fonts/Sleepy Hollow 3.ttf' cause font doesn't have a family name.
(venv) g@hamilton:~/programs/gerbolyze$ md5sum proto_out/*
ba41d73a010d9e5e62ac383554027b38  proto_out/proto-B.Cu.gbr
ba41d73a010d9e5e62ac383554027b38  proto_out/proto-B.Mask.gbr
ba41d73a010d9e5e62ac383554027b38  proto_out/proto-B.Paste.gbr
ba41d73a010d9e5e62ac383554027b38  proto_out/proto-B.SilkS.gbr
ba41d73a010d9e5e62ac383554027b38  proto_out/proto-Edge.Cuts.gbr
ba41d73a010d9e5e62ac383554027b38  proto_out/proto-F.Cu.gbr
ba41d73a010d9e5e62ac383554027b38  proto_out/proto-F.Mask.gbr
ba41d73a010d9e5e62ac383554027b38  proto_out/proto-F.Paste.gbr
ba41d73a010d9e5e62ac383554027b38  proto_out/proto-F.SilkS.gbr
ba41d73a010d9e5e62ac383554027b38  proto_out/proto.nonplated.drl
ba41d73a010d9e5e62ac383554027b38  proto_out/proto.plated.drl
(venv) g@hamilton:~/programs/gerbolyze$ cat proto_out/proto-B.Cu.gbr 
G04 Gerber file generated by Gerbonara*
%MOMM*%
%FSLAX46Y46*%
%IPPOS*%
G75
%LPD*%
%AMGNC*
1,1,$1,0,0,-57.29578X$4*
1,0,$2,0,0,0*
21,0,$2,$3,0,0,$4X-57.29578*
%
%AMGNR*
21,1,$1,$2,0,0,$5X-57.29578*
1,0,$3,0,0,0*
21,0,$3,$4,0,0,$5X-57.29578*
%
%AMGNO*
21,1,$1,$2,0,0,$5X-57.29578*
1,1,$2,$1/2,0,$5X-57.29578*
1,1,$2,(0-$1)/2,0,$5X-57.29578*
1,0,$3,0,0,0*
21,0,$3,$4,0,0,$5X-57.29578*
%
%AMGNP*
5,1,$2,0,0,$1,$3X-57.29578*
1,0,$4,0,0,0*
%
%ADD10C,0.05*%
M02*

This looks incorrect. I'd at least expect some of the files to be different from each other...

The source svg file is here: proto

Various dependency versions I've arrived at by trial and error:

(venv) g@hamilton:~/programs/gerbolyze$ pip3 show gerbonara
Name: gerbonara
Version: 0.13.0
Summary: Tools to handle Gerber and Excellon files in Python
Home-page: https://gitlab.com/gerbolyze/gerbonara
Author: jaseg, XenGi
Author-email: gerbonara@jaseg.de
License: 
Location: /home/g/programs/gerbolyze/venv/lib/python3.11/site-packages
Requires: click
Required-by: 
(venv) g@hamilton:~/programs/gerbolyze$ usvg --version
0.27.0
(venv) g@hamilton:~/programs/gerbolyze$ resvg --version
0.27.0
(venv) g@hamilton:~/programs/gerbolyze$ python --version
Python 3.11.4

Could use a pointer or two! Even if it's just a known-good-set of python, usvg, resvg, gerbonara, and whatever else dependency version numbers.

@jaseg
Copy link
Owner

jaseg commented Nov 14, 2023

I suspect that your issue stems from some breakage that happened in usvg's command-line API this year. Try updating both resvg and usvg, their respective latest releases are both v0.36.0.

Gerbolyze right now also has some trouble with more recent KiCad gerbers, expect a fix for that in the next week or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants