pcb-rnd knowledge pool

 

Long term plans: export option cleanup (details on changes)

export_cleanup2 by Tibor 'Igor2' Palinkas on 2019-08-15

Tags: roadmap, pcb-rnd, 3.0.0, 3.0, hidlib, rndlib, ringdove, export, png, ps, eps, gerber, as-shown

node source

 

 

Abstract: What changes are expected in the export plugins so that they comply with the hidlib requirements. This is also a list of exporters that should be part of the hidlib and should work in other ringdove applications.

 

1. export_gerber

The gerber exporter shall be a clean, multi-image, board-mode exporter. Direct geber exporting will be recommended for testing and checking the board. For any other purpose, using the cam plugin (CAM export job) will be recommended.

1.1. --copy-outline: remove

The --copy-outline option merges multiple layers, which violates the board exporter goal. Some fabs require the outline to be present on some layers, but that shall be achieved using the CAM syntax.

1.2. --name-style: remove

There will be only one naming style available: the pcb-rnd naming style (current default). Any other naming shall be achieved using the CAM syntax.

2. export_png

The png exporter shall be a clean, composite, screen-mode exporter.

2.1. --as-shown , --monochrome, --only-visible: remove+centralize

All screen-mode exporters will use the same, centrally defined options for controlling some aspects of the render (e.g. selection color).

2.2. --png-bloat: remove

This rarely used function will be available only through CAM, as layer transformation.

2.3. photo mode: split out to a new plugin

The whole photo-mode will be split out into a new, pcb-rnd-only export plugin. It will share most code and settings with the png exporter but will render in photo mode and will define a few extra options.

2.3. mask and paste special casing

Will be removed. As a screen-mode exporter, layer visibility on screen will be considered in direct exporting. In batch mode direct export this means the default visibility (paste and mask turned off) will apply.

It is not yet clear what would happen to far side silk, which is special case at the moment. But this affects the main GUI too, so the fix we come up with there will determine what we do here.

3. export_ps: ps

The ps exporter shall be a clean, multi-image, board-mode exporter, very similar to gerber.

3.1. --outline: remove

The --outline option merges multiple layers, which violates the board exporter goal. Since the ps export is not meant to be "screen-mode", we should try to reproduce data faithfully. In the rare case outline is really needed on all pages, it should be achieved using the CAM syntax.

3.2. --drill-helper and --drill-helper-size: remove+centralize

A drill is a pcb-only concept, deciding how to modify obects based on being drill can't remain in the export layer, has to be moved into the core draw layer (pcb-rnd core side).

This option was invented to help drilling in toner transfer. There are some users doing toner transfer from the png export. There is no reason for not having this option in the png export doing the same as here. This will also be fixed by centralizing the setting.

3.3. --mirror, --auto-mirror: remove+centralize

Same as 3.2.: board side and mirroring for home PCB board fabbing (auto-mirror) is a PCB concept, won't work with other apps. But in pcb-rnd it shall work the same way with the png exporter as well.

3.4. --drill-copper: remove

As a board-mode export, data needs to be preserved. If there are drills in board data, the exported data needs to reproduce that. There are multiple ways removing drills or at least making them very small before exporting (including the --drill-helper option and user srcripts).

At the moment the default value of this option is 1.

(This option must be gone because it depends on PCB concepts.)

4. export_ps: eps

The eps exporter shall be a clean, composite, screen-mode exporter.

4.1. --as-shown , --monochrome, --only-visible: remove+centralize

Same as in 2.1.

5. export_svg

The svg exporter shall be a clean, composite, screen-mode exporter.

5.1. --as-shown : remove+centralize

Same as in 2.1.

5.2. --flip: remove+centralize

This option differs from ps mirror because in a composite render this also determines layer ordering (whether the board is drawn from top or bottom). Since this is a PCB stackup related option, it must be removed.

However, the generic idea of flipping the board should be useful for any composite export, including png and eps. Thus there should be central options for flipping. But these options should be the same as on GUI: flip by x, by y or both. This should be an enum with an option for "as shown on screen", being the default.

5.3. photo mode: split out to a new plugin

The whole photo-mode will be split out into a new, pcb-rnd-only export plugin. It will share most code and settings with the svg exporter but will render in photo mode and will define a few extra options (for color).

6. Common behaviour

--as-shown

The --as-shown flag attempts to reproduce GUI rendering settings on export. This includes special, gui-only colors (e.g. selected color, found color, warning color) and GUI rendering modifiers (e.g. wireframe draw, check planes mode).

Without the --as-shown flag the export is reproducible and shall not depend on GUI settings.

Most of these flags are also accessible in the CAM syntax, using layer supplements.