Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Argmaster committed Nov 23, 2024
1 parent c8a5067 commit 1b7555b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 11 deletions.
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,31 @@ To check version of PyGerber available in your environment, you can use:
pygerber --version
```

To access PyGerbers image rendering feature, you can use `render` subcommand. Assuming
that your Gerber file is named `source.gbr` and you want to render a PNG image of it,
you can use following command:
To convert Gerber file to PNG image you can use `pygerber gerber convert png` command.
Assuming that your Gerber file is named `source.gbr` representing a copper layer and you
want to convert it to PNG image with DPMM of 600, command would look like this:

```bash
pygerber render raster source.gbr -o output.png
pygerber gerber convert png source.gbr -o output.png -d 600 -s copper_alpha
```

This will create `output.png` file in current working directory. Depending on your image
size you may need to adjust `--dpmm` parameter to raise or lower the resolution of
image.
size you may need to adjust `-d` (`--dpmm`) parameter to increase or decrease the
resolution of image.

![example_pcb_image](https://github.com/Argmaster/pygerber/assets/56170852/9bca28bf-8aa6-4215-aac1-62c386490485)
Here is an example result of converting a Gerber file to PNG image:

PyGerber has also a lot more options related to rendering available. For extensible
guide on how to use PyGerber CLI, please refer to documentation.
![output](https://github.com/user-attachments/assets/0dfc4682-a284-4cb0-8a74-81136e213766)

There are more export target formats available, like JPEG, TIFF or SVG to name some of
them. Use `--help` flag to get list of available conversion commands:

```bash
pygerber gerber convert --help
```

For more detailed command line interface documentation please visit `Gerber` ->
`Command Line` section in [documentation](https://argmaster.github.io/pygerber/stable/).

## § Language Server

Expand Down
7 changes: 5 additions & 2 deletions docs/40_gerber/20_quick_start/01_single_file.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Single file guide

This guide shows how to create and use `GerberFile` class instances to render and format
individual Gerber files.
Welcome to the PyGerber single file guide. This guide focuses on tools which take single
Gerber file as opposed to [Multi file guide](./02_multi_file.md) guide which is
concerned with operating on collections of Gerber files. Most of the functionality is
exposed as methods on `GerberFile` class which can be imported from
`pygerber.gerber.api` module and we will be using it throughout this document.

## Creating `GerberFile` instance

Expand Down
8 changes: 8 additions & 0 deletions docs/40_gerber/25_command_line/00_introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Introduction

Welcome to the PyGerber command line interface documentation. This documentation is
intended to guide you through the usage of the command line interface of PyGerber.

Unfortunately, currently this documentation is under construction. You can still
discover most of the features using `--help` option in command line with each
subcommand.
1 change: 1 addition & 0 deletions docs/40_gerber/25_command_line/20_gerber.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Gerber

0 comments on commit 1b7555b

Please sign in to comment.