Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Fail to convert .gbl file to png file #213

Open
HelloDorwin opened this issue Jun 5, 2021 · 0 comments
Open

Fail to convert .gbl file to png file #213

HelloDorwin opened this issue Jun 5, 2021 · 0 comments

Comments

@HelloDorwin
Copy link

Hello, everyone!
I ran pcb_example.py successfully and got corresponding images.
but fail to convert .gbl file to png file

2G09E752G0.zip

This is my test file:

import os
from gerber import load_layer
from gerber.render import RenderSettings, theme
from gerber.render.cairo_backend import GerberCairoContext



# The default style can be overridden by passing a RenderSettings instance to
# render_layer().
# First, create a settings object:
our_settings = RenderSettings(color=theme.COLORS['white'], alpha=0.85)

# Open the gerber files

copper = load_layer('f.gbl')

# Create a new drawing context
ctx = GerberCairoContext()

# Draw the copper layer. render_layer() uses the default color scheme for the
# layer, based on the layer type. Copper layers are rendered as
ctx.render_layer(copper)


# Write output to png file
ctx.dump('gbl.png')

#

The error is:

Segmentation fault (core dumped)

Is someone know what's going on?

My environment: ubuntu16.04 x64 & python2.7.6

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

No branches or pull requests

1 participant