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

Improve PCB fabrication output generator #255

Merged
merged 3 commits into from May 1, 2018

Conversation

Projects
None yet
3 participants
@ubruhin
Member

ubruhin commented Apr 22, 2018

Note: Depends on #254, so this one must not yet be merged.

  • Make Gerber/Excellon export settings configurable (output path, file suffixes, ...)
  • Save these settings in board files
  • Add support for inner copper layers
  • Allow to generate separate drill files for NPTH and PTH
  • Fix wrong export of NPTH drills (they appeared on all layers)
  • Make output files reproducible by sorting all objects by their UUID
  • Add link to official reference Gerber viewer

This is how the fabrication output generator dialog now looks like:

fabrication output generator_010

Fixes #73, #215.

@ubruhin ubruhin added the enhancement label Apr 22, 2018

@ubruhin ubruhin added this to the 0.1 milestone Apr 22, 2018

@ubruhin ubruhin self-assigned this Apr 22, 2018

@dbrgn

This comment has been minimized.

Show comment
Hide comment
@dbrgn

dbrgn Apr 22, 2018

Contributor

Nice!

I think the intro text in the dialog should mention the Gerber version ("Extended Gerber X2" or "RS-274X X2").

Also, since we don't yet have support for manufacturer profiles, maybe we can just add a toggle button where you can switch between encode-layer-in-name (XXX.gbr) and encode-layer-in-extension (project.XXX)? Would be very useful since with that you could already cover most manufacturers without manually changing every layer filename.

Contributor

dbrgn commented Apr 22, 2018

Nice!

I think the intro text in the dialog should mention the Gerber version ("Extended Gerber X2" or "RS-274X X2").

Also, since we don't yet have support for manufacturer profiles, maybe we can just add a toggle button where you can switch between encode-layer-in-name (XXX.gbr) and encode-layer-in-extension (project.XXX)? Would be very useful since with that you could already cover most manufacturers without manually changing every layer filename.

@sebgonzo

This comment has been minimized.

Show comment
Hide comment
@sebgonzo

sebgonzo Apr 23, 2018

@dbrgn

I think better instead adding additional checkbox use new Jinja syntax.
E.g.

  • layer-in-name: {{PCB_LAYER_NAME}}.gbr
  • layer-in-extension: {{PROJECT_NAME}}.{{GERBER_EXT}}

sebgonzo commented Apr 23, 2018

@dbrgn

I think better instead adding additional checkbox use new Jinja syntax.
E.g.

  • layer-in-name: {{PCB_LAYER_NAME}}.gbr
  • layer-in-extension: {{PROJECT_NAME}}.{{GERBER_EXT}}
@ubruhin

This comment has been minimized.

Show comment
Hide comment
@ubruhin

ubruhin Apr 23, 2018

Member

I think the intro text in the dialog should mention the Gerber version ("Extended Gerber X2" or "RS-274X X2").

👍

Also, since we don't yet have support for manufacturer profiles, maybe we can just add a toggle button where you can switch between encode-layer-in-name (XXX.gbr) and encode-layer-in-extension (project.XXX)? Would be very useful since with that you could already cover most manufacturers without manually changing every layer filename.

An alternative would be to just use Protel file extensions as default, which probably most PCB manufacturers accept. Then no additional GUI widgets are needed. But actually I don't like this approach because the Gerber specifications recommends to use the .gbr extension for all files...

I think better instead adding additional checkbox use new Jinja syntax.
E.g.

layer-in-name: {{PCB_LAYER_NAME}}.gbr
layer-in-extension: {{PROJECT_NAME}}.{{GERBER_EXT}}

@sebgonzo I don't understand how you mean that, where would PCB_LAYER_NAME and GERBER_EXT be defined?

Member

ubruhin commented Apr 23, 2018

I think the intro text in the dialog should mention the Gerber version ("Extended Gerber X2" or "RS-274X X2").

👍

Also, since we don't yet have support for manufacturer profiles, maybe we can just add a toggle button where you can switch between encode-layer-in-name (XXX.gbr) and encode-layer-in-extension (project.XXX)? Would be very useful since with that you could already cover most manufacturers without manually changing every layer filename.

An alternative would be to just use Protel file extensions as default, which probably most PCB manufacturers accept. Then no additional GUI widgets are needed. But actually I don't like this approach because the Gerber specifications recommends to use the .gbr extension for all files...

I think better instead adding additional checkbox use new Jinja syntax.
E.g.

layer-in-name: {{PCB_LAYER_NAME}}.gbr
layer-in-extension: {{PROJECT_NAME}}.{{GERBER_EXT}}

@sebgonzo I don't understand how you mean that, where would PCB_LAYER_NAME and GERBER_EXT be defined?

@sebgonzo

This comment has been minimized.

Show comment
Hide comment
@sebgonzo

sebgonzo Apr 24, 2018

@ubruhin
My idea is to add built-in attributes:

  • {{PCB_LAYER_NAME}} - it will substitute with layer name taken from Board Editor layer names (e.g. "Top Copper", "Bottom Copper" etc.)
  • {{GERBER_EXT}} - it will substitute with Gerber files extensions like in Protel format ("GTL", "GBL" etc.)

Using this attributes in textboxes user can construct it's own Gerber filename template.
For example:
{{PCB_LAYER_NAME}}.gbr will translate to Top Copper.gbr, Bottom Copper.gbr
{{PROJECT}}.{{GERBER_EXT}} will translate to My Project.GTL, My Project.GBL

sebgonzo commented Apr 24, 2018

@ubruhin
My idea is to add built-in attributes:

  • {{PCB_LAYER_NAME}} - it will substitute with layer name taken from Board Editor layer names (e.g. "Top Copper", "Bottom Copper" etc.)
  • {{GERBER_EXT}} - it will substitute with Gerber files extensions like in Protel format ("GTL", "GBL" etc.)

Using this attributes in textboxes user can construct it's own Gerber filename template.
For example:
{{PCB_LAYER_NAME}}.gbr will translate to Top Copper.gbr, Bottom Copper.gbr
{{PROJECT}}.{{GERBER_EXT}} will translate to My Project.GTL, My Project.GBL

@dbrgn

This comment has been minimized.

Show comment
Hide comment
@dbrgn

dbrgn Apr 24, 2018

Contributor

@sebgonzo if I'm not mistaken this might already be possible. At least @ubruhin certainly intended to implement support for placeholders when I talked to him yesterday.

Contributor

dbrgn commented Apr 24, 2018

@sebgonzo if I'm not mistaken this might already be possible. At least @ubruhin certainly intended to implement support for placeholders when I talked to him yesterday.

@ubruhin

This comment has been minimized.

Show comment
Hide comment
@ubruhin

ubruhin Apr 24, 2018

Member

@sebgonzo I think this doesn't really work, because the board layer names do not always correspond to gerber layer names. For example in the drill file there are vias and pads (so, two different layers in one gerber file), or on silkscreen you can configure which of the layers "Top/Bot Placement", "Top/Bot Names" and "Top/Bot Values" should be exported.

@dbrgn Yes, placeholders like "{{PROJECT}}" or "{{LAYER}}" (for the index of inner copper layers) are already supported (see screenshot above), but I don't plan to support more placeholders for the gerber export.

Member

ubruhin commented Apr 24, 2018

@sebgonzo I think this doesn't really work, because the board layer names do not always correspond to gerber layer names. For example in the drill file there are vias and pads (so, two different layers in one gerber file), or on silkscreen you can configure which of the layers "Top/Bot Placement", "Top/Bot Names" and "Top/Bot Values" should be exported.

@dbrgn Yes, placeholders like "{{PROJECT}}" or "{{LAYER}}" (for the index of inner copper layers) are already supported (see screenshot above), but I don't plan to support more placeholders for the gerber export.

ubruhin added some commits Apr 21, 2018

Improve board fabrication output generator
- Use settings provided by BoardFabricationOutputSettings
- Make settings configurable (output path, file suffixes, ...)
- Provide two different predefined configurations (default/protel)
- Add support for inner copper layers
- Add support for solder paste layers (stencil)
- Allow to generate separate drill files for NPTH and PTH
- Fix wrong export of NPTH drills (they appeared on all layers)
- Make output files reproducible by sorting all objects by their UUID
- Add link to official reference Gerber viewer
Update submodule "demo-workspace"
Add PCB fabrication settings
@ubruhin

This comment has been minimized.

Show comment
Hide comment
@ubruhin

ubruhin Apr 28, 2018

Member

Update

  • Rebased to master (now we have support for Jinja attributes syntax)
  • Add support for solder paste layers (creating Gerber files for stencils)
  • Add buttons to easily switch between two predefined configurations (*.gbr vs. Protel file extensions)
    • It's not the cleanest solution, but I think it should be enough until we create a real output generator...

Default configuration

fabrication output generator_010

Protel configuration

fabrication output generator_011

Member

ubruhin commented Apr 28, 2018

Update

  • Rebased to master (now we have support for Jinja attributes syntax)
  • Add support for solder paste layers (creating Gerber files for stencils)
  • Add buttons to easily switch between two predefined configurations (*.gbr vs. Protel file extensions)
    • It's not the cleanest solution, but I think it should be enough until we create a real output generator...

Default configuration

fabrication output generator_010

Protel configuration

fabrication output generator_011

@ubruhin ubruhin changed the title from WIP: Improve PCB fabrication output generator to Improve PCB fabrication output generator Apr 28, 2018

@ubruhin ubruhin merged commit 90078c9 into master May 1, 2018

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@ubruhin ubruhin deleted the pcb_fabrication_settings branch May 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment