Commit Graph

152 Commits

Author SHA1 Message Date
Wayne Stambaugh eb83f76bff Allow plotting of multiple board layers per plot in Python.
Since the always plot the edge cuts layer  option was deprecate,
the ability to plot multiple board layers was exposed through the
PLOT_CONTROLLER object.

Added the interactive plot information which was overlooked during
version 7 development.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13841
2023-02-14 09:49:20 -05:00
Jeff Young 26c821962f Simplify and regularize text variable substitution architecture.
EDA_ITEMs are responsible for giving their parent a crack at it if
they failed to resolve it.  This recurses all the way up to the schematic/
board, and then to the project.

Cross-reference handling is also move to the EDA_ITEMs.  It must be done
before bubbling up so that we don't end up in loops.  (The aDepth parameter
will break the loop, but without having done anything useful.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-17 17:05:41 +00:00
Roberto Fernandez Bautista 0015574a60 ${SHEETNAME} represents the sheet name + introduce ${SHEETPATH}
CHANGED: The text variable ${SHEETNAME} now always represents the name of the
sheet when used anywhere in the schematic editor, including the title block

ADDED: A new text variable ${SHEETPATH} which is replaced with the path to the
current sheet - e.g. "/Sheet 1/Sheet 2".

To ensure backward compatibility, the default drawing sheet now uses
${SHEETPATH}. Custom drawing sheets will need to be manually edited.
2022-04-09 15:45:58 +01:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Jeff Young e5d5ee07f0 Resolve textvars in plot directory.
Fixes https://gitlab.com/kicad/code/kicad/issues/10405
2022-01-23 18:14:07 +00:00
Jeff Young f3a583e490 Formatting & comment cleanup. 2022-01-23 18:14:07 +00:00
Marek Roszko 347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -05:00
Jeff Young e26341d424 Cleanup. 2021-12-23 20:36:18 +00:00
Jon Evans 75d75799f7 Move to getters/setters for aux and grid origin
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8836
2021-11-08 22:36:40 -05:00
Wayne Stambaugh 46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -04:00
Wayne Stambaugh cf00319c85 More NULL expunging. 2021-07-20 07:27:18 -04:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Jeff Young f1221a9ca3 Resolve text variables in title blocks for outputing to netlist.
Fixes https://gitlab.com/kicad/code/kicad/issues/7153
2021-01-17 16:24:22 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Marek Roszko 1d559108c8 Move LOCALE_IO out of common.h 2020-10-23 21:49:42 -04:00
Marek Roszko a1c75748a0 Remove GetChars(), a wxWidgets 2.9 compatibility hack 2020-10-15 20:53:25 -04:00
Marek Roszko 84fbb0e382 Remove some includes in random pcbnew files 2020-10-14 20:47:48 -04:00
Marek Roszko 491896d497 Add missing include 2020-10-14 19:34:44 -04:00
jean-pierre charras 13304d0870 more cleanup about removing useless include 2020-10-02 13:40:00 +02:00
Jeff Young 7b042f4a75 Add rectangle tool to PCBNew toolbar in favour of Aux Origin.
ADDED new rectangle graphics tool for PCBNew and Footprint Editor.

Also adds rectangle tool to both Footprint Editor and PCBNew Place
menus.

The Aux Origin tool can come back once we have multi-select toobar
buttons.

Also collapses an unnecessary level out of the auxOrigin and gridOrigin
settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/2246
2020-07-01 13:31:30 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Mark Roszko 19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
jean-pierre charras 85156300d6 Gerber plot: fix a minor issue: TF attribute "Drawing" is now "OtherDrawing,Comment"
Also use "AssemblyDrawing" attribute for fabrication layers in Pcbnew (actually assembly layers)
This is due some changes in recent Gerber file format.
2019-11-06 10:05:23 +01:00
jean-pierre charras eb06ae5910 Plot filenames automatically generated: change the point ('.') find in layer names to '_'
This change was in comments, but not in code.
2019-01-05 12:44:38 +01:00
jean-pierre charras 0b890b4d1d Drill files generation: add 3 structured comments in NC (Excellon) drill files and remove duplicate code. 2018-11-24 08:51:58 +01:00
jean-pierre charras 238abad004 Gerber job file: fix incorrect GUID.
Fixes: lp:1801696
https://bugs.launchpad.net/kicad/+bug/1801696
2018-11-06 08:16:07 +01:00
jean-pierre charras 654dbbb44b Gerber UUID parameter calculation: refinements and more comments 2018-10-29 18:56:26 +01:00
jean-pierre charras 03f3ff79a5 Pcbnew, Gerber output: fix incorrect UUID format in %TF.ProjectId attribute.
Fixes: lp:1800459
https://bugs.launchpad.net/kicad/+bug/1800459
2018-10-29 17:34:14 +01:00
jean-pierre charras 064b8a8d60 Gerber file generation: remove a optional info in .FileFunction: the layer type.
TF.FileFunction,Copper,L1,Top,Signal is now TF.FileFunction,Copper,L1,Top

This param is not useful, and probably never correctly set by users, because is is not used by Pcbnew.
(It is used only for dsn export)
2018-10-19 15:48:18 +02:00
jean-pierre charras 8552f3fedf fix code after renaming files 2018-01-29 22:00:44 +01:00
jean-pierre charras e499d337d8 rename files: update filenames in sources 2018-01-28 19:12:26 +01:00
jean-pierre charras bdc6a5950b rename plot_common.h to class_plotter.h, a better name, consistent with other class definitions. 2017-11-16 15:53:30 +01:00
Tomasz Włostowski 81d1e17f02 refactoring: renamed pcbstruct.h to pcb_display_options.h, DISPLAY_OPTIONS->PCB_DISPLAY_OPTIONS 2017-11-03 20:02:06 +01:00
jean-pierre charras 50164e9968 Add Gerber job file writer in Pcbnew, and a basic reader in Gerbview. Currently disabled
Fix also very minor issues in Gerbview
2017-08-30 11:04:33 +02:00
jean-pierre charras 6d52987928 Gerber files creation: fix an incorrect structured comment ('*' was missing at the end of line) 2017-07-25 11:50:24 +02:00
jean-pierre charras e97f49e009 Gerber X2 format: add the new TF.SameCoordinates attribute to Gerber files 2017-06-13 11:31:14 +02:00
jean-pierre charras afe92c7bfc Pcbnew: Add creation of Drill Files in Gerber X2 format.
Gerbview: add support of drill files in Gerber format.
Fix also an issue in drill dialog: Axis choice is now common to plot a drill files.
2017-05-01 12:43:40 +02:00
jean-pierre charras 6d6542e133 Gerber file generation: in X1 format, in header, use structured comments instead of basic comments.
(a structured comment starts by "G04 #@! " followed by a X2 attribute, and is a comment for old Gerber readers)
2016-11-30 17:48:31 +01:00
jean-pierre charras 6edee2ae1d Prepare Plot Gerber file to include advanced aperture and net attributes.
This option is not yet activated because the net attributes are not yet fully fixed by Ucamco, in Gerber file format specifications.
(To activate it, see dialog_plot.cpp, line 43)
2016-09-19 13:01:36 +02:00
jean-pierre charras bb95fcccfc plotcontroller: add method to get the current plot full file name and the current plot folder full path from Python script.
gen_gerber_and_drill_files_board.py: 
 * fix to make it compatible with rev 6280.
 *  allow this script to create files in  the current plot folder defined from the board forder, no more only in current working directory.
2015-10-26 18:51:41 +01:00
unknown ad10218a58 Rename {Set,Get}GerberExtensions() to {Set,Get}GerberProtelExtensions() (better name) in public API. 2015-10-21 08:55:30 +02:00
jean-pierre charras 4dc2ece011 Fix a few wording issues in dialogs (dialog plot and dialog move exact) for translators (more explicit words/sentences to remove ambiguities).
Pcbnew: Plot files: for copper layers, create suffix from user copper layer names instead of default copper layer names, like in last stable Kicad version (bzr 4022), to build the plot files filenames.
Better test of illegal chars in plot filename, both in plot dialog and functions aclled by Python scripts.
Fix a Plotcontroller issue to make SetUseGerberExtensions() work as expected from Python scripts ( from  Henner Zeller'patch with a fix to be sure it works properly from a Python script)
Note also using Protel Gerber Extensions is now a bad practice, because the official Gerber extension is .gbr since X2 Gerber version. But some users still use them)
2015-10-20 20:03:07 +02:00
jean-pierre charras 014f0eb61f Gerber file X2 attribute: Change the attribute Project Id key word from .TF.JobId to .TF.ProjectId, due to a change between the draft Gerber file format specif and a the final specifs (Revision 2015.08).
Remove a few wxCHECK_VERSION conditional compilation, now useless.
2015-10-14 09:20:28 +02:00
Simon Wells 3bcda184dd Fix issue in plot Gerber X2 format ( missing % char). Stra,gely, does not happen on all platforms. 2015-09-07 20:09:41 +02:00
Marco Hess 8699fdf12e Pcbnew: minor Protel gerber file extension fixes.
* Assign file extensions .g1d, .g2d, .g3d, ... for internal copper layers.
* Assign file extension .gm1 for edge cut layer.
2015-06-24 13:59:44 -04:00
jean-pierre charras 9da39717ae Add a python script example in demo folder to create various plot files from a board. Fix also some issues in plot controller helper class.
Important note: from a python script one cannot plot the palge layout, because the page layout template file is not stored in the board file, but it is part of the project.
Because when using a python script, the project is not loaded, the page layout template is not known.
Trying to plot it crashes the script.
2015-04-27 20:02:27 +02:00
jean-pierre charras 45808deb47 Minor fix: Gerber X2 attribute: remove one attribute (TF .GerberVersion, now no more in use) I added in my recent changes relative to the new J5 gerber version attributes. 2015-03-26 19:57:19 +01:00
jean-pierre charras 85bc2ae015 Rework on Gerber plot functions: add X2 attributes in J5 version. Minor code cleaning. 2015-03-25 14:07:05 +01:00