jaseg / gerbonara

Pythonic library for reading/modifying/writing Gerber/Excellon/IPC-356 files. docs: https://gerbolyze.gitlab.io/gerbonara
Apache License 2.0
6 stars 2 forks source link

.art files are not rendered #2

Closed Rajkisan closed 2 weeks ago

Rajkisan commented 2 weeks ago

I am getting the below error while running a gerber zip file exported from OrCAD SystemError: Ambiguous layer names: top copper (Assembly_top.art, place_bound_top.art, TOP.art), bottom copper (assembly_bottom.art, BOTTOM.art, place_bound_bottom.art), bottom unknown (evb_board_BOM.ods, evb_board-1-4.drl)

I used the comment gerbonara render "Flexray_board_fabrication_and_assembly.zip" "output2.svg"

Rajkisan commented 2 weeks ago

Flexray_board_fabrication_and_assembly.zip

jaseg commented 2 weeks ago

Oh, interesting. Thank you for the example, I will add some matches to the layer identification later today.

With the gebers you posted, there is one problem though that gerbonara will never be able to solve: Your layers are named "top, gnd, pwr, bottom". While top and bottom are unambiguous, from the gerbers alone, gerbonara can't automatically determine which way around the ground and power planes are supposed to go. Is there some way of exporting this layer info from OrCAD, such as in GerberX2 attributes or in a .gbrjob file? Without this info, I think I'll make gerbonara just emit a warning and assign the layers alphabetically.

Rajkisan commented 2 weeks ago

I couldn't do so, Is there any other option to automatically assign them, and I also I just want to render the dimensions and image for the file

jaseg commented 2 weeks ago

If you just need the bounds and a render of a single layer, you can just extract the zip and pass one layer individually to gerbonara render or gerbonara bounding-box.

Rajkisan commented 2 weeks ago

I tried both of them, same error

Rajkisan commented 2 weeks ago

gerbonara bounding-box "TOP.art" gives -7.262495 -2.518994 10.664495 5.818994 [None]

which says board is Width: 17.92699, Height: 8.337988

but the board size is 84x72mm(3.31x2.83 inches).

jaseg commented 2 weeks ago

I've pushed some changes to the main branch that should fix the issues you observed with gerbonara render and gerbonara bounding-box.