Skip to main content

Python package for 2D and 3D rendering of GerberX3 files.

Project description

https://raw.githubusercontent.com/Argmaster/pygerber/main/docs/_static/pygerber_logo.png

Overview

PyGerber is a Python library for 2D and 3D rendering of Gerber X3 files. It is completely written in Python, and only dependencies are limiting its portability.

This package is a Free Software; it is released under MIT license. Be aware that dependencies might be using different licenses.

PyGerber offers a CLI and API for Python to allow easy rendering of Gerber files. Parser was build with GBR X3 format in mind, however, it has extensive support for older standards and deprecated features. Package is using third party libraries for low level drawing and mesh creation.

PyGerber’s parser was not ment to be used by package users, but there are no obstacles preventing you from using it. However, stability of the API is not guaranteed between minor releases (I’ll do my best to make it stable among patches).

Installation

PyGerber is available on PyPI and can be obtained via pip

pip install pygerber

You can also install the in-development version from github with

pip install https://github.com/Argmaster/pygerber/archive/main.zip

Blender dependency issue mentioned in previous releases was resolved by using PyR3 package which provides Blender. However, blender has to be installed independently from package by calling PyR3.install_bpy script:

python -m PyR3.install_bpy

Before You try to use 3D rendering.

Compatibility

PyGerber officially runs on Python 3.9.* and only on this version. However it may be possible to run 2D rendering on other Python versions that are supported by Pillow.

I’ll consider bringing Python 3.8 3D rendering support, but no sooner than after implementation of full set of 3D rendering features and macros support.

Documentation

Documentation of this library is available at https://pygerber.readthedocs.io/

Development

To run all the tests, just run:

tox

To only build the docs:

tox -e docs

To build and verify that the built package is proper and other code QA checks:

tox -e check

Changelog

0.0.0 (2021-09-25)

  • First release on PyPI.

  • Added 2D rendering

1.0.0 (2021-10-06)

  • Added 3D rendering (not full-featured)

  • Added CLI and API for 3D rendering

  • Installing bpy is required for 3D rendering

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygerber-1.0.0.tar.gz (1.7 MB view hashes)

Uploaded Source

Built Distribution

pygerber-1.0.0-py3-none-any.whl (55.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page