83 Commits

Author SHA1 Message Date
Mark Roszko
4f32146f9a nlohmann json is locale independent (uses to_chars) 2025-08-27 20:41:47 -04:00
jean-pierre charras
9725ac2215 GERBER_JOBFILE_WRITER: fix incorrect layer id in File Attributes for inner layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21569
2025-08-27 13:25:24 +02:00
jean-pierre charras
09e1fca7e4 More about support of press-fit pad fabrication property
Also some fixes in dialogs.
2025-08-11 18:48:35 +02:00
Jeff Young
c758a2fbaf Don't sequence layers when order doesn't matter. 2025-07-14 19:12:44 +01:00
Jeff Young
a1fbff35e8 Formatting. 2025-01-17 22:07:07 +00:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
jean-pierre charras
06b1dd7bd8 GERBER_JOBFILE_WRITER: fix issues with layer names after layer renumbering. 2024-09-18 15:37:10 +02:00
Seth Hillbrand
5e0abadb23 Reorganize layer numbering
F_Cu = 0
B_Cu = 2
Remaining internal copper layers are even and incrementing

Non-copper layers are odd and incrementing.

This means that we can no longer do things like:
for( PCB_LAYER_ID layer = F_Cu; layer <= B_Cu; ++layer)
Instead, we have the class LAYER_RANGE:
for( PCB_LAYER_ID layer : LAYER_RANGE( F_Cu, B_Cu) )

Similarly, gt/lt tests should not refer to the integer value of the
layer.  We have functions such as IsCopperLayer to test whether a layer
is copper or not.

When using the connectivity RTree, the third dimension is layer, so we
provide B_Cu with the special INT_MAX value, ensuring that elements
between F_Cu and B_Cu will be identified.  There is a new, special
function GetBoardLayer() for interfacing with CN_ITEMS

Similarly, PNS layers remain unchanged and sequential.  A set of
interface functions is provided to map PNS layers to Board layers and
back.  This allows the PNS_LAYER_RANGE to function as expected
2024-09-06 23:07:58 +00:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
jean-pierre charras
cb8ed07858 GERBER_JOBFILE_WRITER: use UTF8 encoding according to current specif.
Since 2020, non ASCII7 chars are encoded using UTF8 encoding.
A old but incorrect encoding was previously used.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17534
2024-03-22 09:50:32 +01:00
Nimish Telang
51e55dd750 Convert sprintf to snprintf in most files 2023-04-17 15:39:34 +00:00
jean-pierre charras
593dc9e8b6 Some fixes in Gerber job file:
- Ensure colors use a normalized value (normalized name or RnnGnnBnn notation).
- Better code.
2022-12-06 17:01:37 +01:00
jean-pierre charras
d7368588db stackup manager: fix incorrect handling of colors for multi-layer dielectrics
The dialog allows a color selection for each dielectric layer.
However for a "dielectric" defined by more than one layer, the color was handled
only for the first layer, and not for the other sub-layers.
2022-12-01 16:19:13 +01:00
Marek Roszko
66e8931405 Remove IU_PER_MM thats standalone 2022-09-16 21:09:27 -04:00
Jeff Young
5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00
Jeff Young
a9536b5de9 CHANGED netclass assignments now done via canvas or via patterns. 2022-08-14 22:56:29 +01:00
jean-pierre charras
4d48376eae Fix some warnings detected by PVS-STUDIO (not used vars) 2022-07-26 16:00:14 +02:00
jean-pierre charras
a6606924f1 GERBER_JOBFILE_WRITER: fix a crash due to use of a null pointer.
Can happens when it is created from a Python script.
Fixes #11227
https://gitlab.com/kicad/code/kicad/issues/11227
2022-03-24 17:54:05 +01:00
jean-pierre charras
e140298878 GERBER_JOBFILE_WRITER: allows all *_User layers to be listed in *gbrjob file. 2022-02-17 15:22:18 +01:00
jean-pierre charras
529d598c36 GERBER_JOBFILE_WRITER: fix missing handling of User_1 to User_9 user layers.
Fixes #10878
https://gitlab.com/kicad/code/kicad/issues/10878
2022-02-17 11:41:23 +01:00
Jeff Young
b2e3f03222 More wide-string declarations. 2022-02-05 22:03:04 +00:00
Jeff Young
407660201e Expand text vars in titleblock before exporting.
Fixes https://gitlab.com/kicad/code/kicad/issues/10197
2022-01-22 15:54:34 +00:00
Seth Hillbrand
78ff9a857a Jerry-rig HTML-format alpha parsing
On wx3.0, the HTML format #RRGGBBAA cannot handle the alpha channel.
Instead, we route this through a COLOR4D routine when we need to use
these colors

Fixes https://gitlab.com/kicad/code/kicad/issues/9963
2021-12-13 16:04:40 -08:00
jean-pierre charras
5853f0890e Gerber job file: fix a bug that prevent writing dielectric constants for impedance controlled boards. 2021-09-26 16:11:15 +02:00
Wayne Stambaugh
46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -04:00
Jeff Young
ea6769b702 The REPORTER interface is inherently line-based.
Also fixes a bunch of error messages that were similar but not
identical (which just increases translation burden).

Fixes https://gitlab.com/kicad/code/kicad/issues/8723
2021-07-05 13:41:06 +01:00
Jeff Young
1722bc03b0 Consistent terminology and punctuation. 2021-06-17 00:05:17 +01:00
Jeff Young
096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01: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
07635d2fc7 Minor adjustments 2021-01-12 20:51:31 +00:00
Dominik Wernberger
ac94d72d2d Add more const specifiers 2021-01-12 20:51:31 +00:00
Jeff Young
bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young
52a46341db More module -> footprint. 2020-11-13 15:16:24 +00:00
Jeff Young
f5443de7f9 D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
Jeff Young
84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young
f7333ad64a Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
Marek Roszko
1d559108c8 Move LOCALE_IO out of common.h 2020-10-23 21:49:42 -04:00
Jeff Young
70c3c5c514 Retire the two-item version of BOARD_CONNECTED_ITEM::GetClearance(). 2020-10-12 18:40:03 +01:00
jean-pierre charras
0b23cb7dbb more cleanup about removing useless include 2020-10-03 15:26:03 +02:00
Jon Evans
18e17abd6a Rename "Keepout" to "Rule Area"
These objects can now be used in advanced DRC rules and
not just for keeping things out.  Also remove the restriction
that at least one of the "basic" keepout rules must be set,
so that these areas can be used for more advanced rules.
2020-09-21 23:55:02 -04:00
Jeff Young
9e12ea9bb6 Cleanup some dead code and make better use of iterators.
Also applies coding style around auto and lambdas.
2020-08-28 11:05:58 +01:00
Jeff Young
e5b50d90a7 Update DRC rules to new layer and disallow grammars.
Also adds support for hooking rules up to named zones.

Fixes https://gitlab.com/kicad/code/kicad/issues/2041
2020-08-07 21:49:36 +01:00
Jon Evans
aae40148dc Switch to ordered_json and enable ignore_comments parser option 2020-08-02 13:11:16 +00:00
Jon Evans
c0aa6965de Migrate PcbNew project settings to new framework
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.

ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
2020-07-02 22:08:54 -04:00
Ian McInerney
4357c1d3b3 Coverity and compiler warning fixes
* Initialize variables
* Test dynamic casts

Fixes https://gitlab.com/kicad/code/kicad/issues/4620
2020-06-05 12:50:56 +01:00
Jeff Young
39ec63c4e9 Fix some inconsistencies in clearance priorities.
Fixes https://gitlab.com/kicad/code/kicad/issues/4555
2020-05-29 13:41:45 +01:00
jean-pierre charras
259d7a47d4 Pcbnew: enhancements:
Plot Gerber format default values:  X2 attributes enabled.
Gerber job file: use a trick to truncate floating values to 4 digits in mantissa.
It gives a much better readability and 0.1 micron is enough for
mechanical dimensions
2020-03-29 15:35:47 +02:00
jean-pierre charras
b7cd0c54c2 Fix compil issues, especially on Windows:
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.
2020-03-04 10:48:18 +01:00
Jeff Young
85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +00:00