444 Commits

Author SHA1 Message Date
Mark Roszko
1e9025a4dc Move to a fixed enum for page sizes as well as well as holding a list of types accessible in a vector.
Drops some hardcoded size names in places among other bits.

Woooo committed pushed at 36000 feet.
2025-09-13 20:12:53 +02:00
Mark Roszko
bbecc4eaa8 Add UUID to PCB tables to ensure stable file sort 2025-09-07 09:56:12 -04:00
Ian McInerney
c95c15dd4e Don't throw away old hidden text that was converted to fields 2025-09-01 18:19:46 +01:00
Mark Roszko
267ee811a7 Try and suppress gcc warning 2025-09-01 11:58:13 -04:00
John Beard
e016dc52fd Pcbnew: Add concept of a 'point'
This is a zero-dimensional object that can be used for snapping
and documentation of useful, but non-physical features on a
board or footprint. They do not correspond to any physical
output in exports or plots.

Points do have a "size", but this is a graphical property only
and determines how large they are drawn on the board.

They also have a layer, which allows them to be selected and
made visible according to layer filters.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/4691
2025-09-01 23:44:21 +08:00
Mark Roszko
2b8542861c Missed a strtod in kicad legacy pcb parsing 2025-08-30 06:57:48 -04:00
Mark Roszko
9dd642b66c Kick out strtod in legacy parsers 2025-08-29 23:38:00 -04:00
Seth Hillbrand
8acf5c1a25 ADDED: Rounded Rectangles
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4742
2025-08-29 17:37:30 -07:00
modbw
57ad779797 Fix net assignment messed up in Eagle import
When there is a polygon in the Eagle project withput any pad connected 
netCode was not incremented and so the wrong nets were assigned to the 
following elements.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21243
2025-08-26 17:11:21 -07:00
Seth Hillbrand
4e7fa189aa Refactor gfx import cleanup
Break up monolithic function into responsibilities.  Adjust cleanup to
correctly modify each graphical pairing.  Fix drc test to properly
report gap distances that are relevant to outlines

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13090
2025-08-25 11:33:26 -07:00
dsa-t
66a1e268d7 EasyEDA import: Add footprint Reference text on F_Fab.
(cherry picked from commit 26b6c28befdfbcd0978794977e98186d720d97f5)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-08-21 17:41:09 +03:00
dsa-t
3e58b34843 EasyEDA import: Build basic Courtyard box for footprints.
(cherry picked from commit 8cd7b73b2a143ada362f38912819156018eb8fe4)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-08-21 17:13:33 +03:00
dsa-t
26b5e89640 EasyEDA import: Place component shape and marking on F_Fab.
(cherry picked from commit c2d31699bfa3d1420b452715d23faa95f51b0270)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-08-21 17:13:26 +03:00
Seth Hillbrand
44228bd580 Move IPC2581 output to REPORTER
Adds a wx_reporter_panel to the 2581 output window, shunt messages
through the reporter instance

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16314
2025-08-20 13:42:19 -07:00
Seth Hillbrand
29317ace77 Rotate graphics when part of fp
Non-pad features need to be rotated with fp as well

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18565
2025-08-20 12:40:31 -07:00
Mike Williams
92ef03cf15 design blocks/multichannel: make apply layout do routing, etc. 2025-08-20 15:20:13 -04:00
Seth Hillbrand
c1cd4dd157 Allow multiple pad->single pin in 2581 correctly
Grouped pads by pin number in the IPC-2581 exporter so only one pin node
is created per number.  Still output multiple pad shapes with the same
number.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18688
2025-08-20 08:55:55 -07:00
John Beard
811745ff96 Pcbnew: efficiency and error-checking in footprint layers 2025-08-20 01:41:19 +08:00
John Beard
9173d11398 Very minor Coverity fixes 2025-08-20 01:41:18 +08:00
John Beard
ed01324c1d Footprints: allow to set specific internal copper layers
Footprints can now have a custom stackup. This means that they specify
an exact number of copper layers and the layers map 1:1 to board layers.
If the board doesn't contain that layer, the element just doesn't
show. We could make this a DRC check later on.

If there is no stackup, the behavior is the current default: a rule area
the In1 layer "expands" to all Inner layers.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10838
2025-08-19 04:59:48 +08:00
John Beard
85dcdd5cb2 Altium: advanced config to skip models
This can be really slow, and isn't required if testing
something that's unrelated to models in a large demo file.
2025-08-16 05:36:11 +08:00
dsa-t
7c499f499d Altium PCB import: fix 3D models rotation when 3D body is on bottom side.
See https://gitlab.com/kicad/code/kicad/-/issues/18450


(cherry picked from commit 9de49e3ac5cde06db7f1a0d86f66b3bde4c24f71)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-08-15 01:15:13 +03:00
John Beard
299a6c6c7b Netinfo: avoid transitive string_utils.h include
Put the string manipuuation utils in the cpp, and
remove string_utils.h from the includes of netinfo.h.

This spams that header into about 350 files, not all of which
need it. Then go round and tidy up the places (most exporters
and dialogs) where CPP files weren't including string_utils.h
when they used it, as well as some other order-sensitive
include issues that turned up.
2025-08-12 20:00:15 +08: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
Seth Hillbrand
8f625086b1 Remove namespacing from IPC2581 output
Because some readers maintain global namespace per the standard, we make
sure that we don't overlap names between namespaces but keep the minimum
viable name for each element

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19914
2025-08-11 08:50:23 -07:00
jean-pierre charras
da92279436 Pcbnew: add pad fabrication property Press-Fit
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21457
2025-08-11 15:59:19 +02:00
Seth Hillbrand
b207ec8817 Remove negative index access from CPoint
Callers should be responsible for index count and/or use iterators
2025-08-08 10:46:45 -07:00
Seth Hillbrand
1a4eba56a7 ADDED: Skip Via support
Skip vias are vias that are flashed on their start and end layers but
have no annular rings on the interior layers and do not connect to zones
in those layers

You can now select Annular ring type "Start and end layers only".  This
will prevent annular ring flashing on intermediate layers and zones
fills will provide clearance.  You can still connect tracks to
intermediate layers but preventing that will fall to the designer

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21433
2025-08-07 15:48:10 -07:00
Seth Hillbrand
fa02553d53 Don't special case custom pads from Altium
All pads should follow the same behavior.  Remains todo to
differentiate between missing values (inherit in Altium) and custom 0mil
values (force no expansion)
2025-08-06 11:41:42 -07:00
Jeff Young
8e534449af Forgot to bump file format version for 5a70fc0bd5985416f3ed279eae221c41704bb349. 2025-08-06 11:28:34 +01:00
Jeff Young
5a70fc0bd5 Convert (island) to (island yes). 2025-08-05 13:49:31 +01:00
Seth Hillbrand
50c7aff3ff Simplify KiROUND using std::llround/clamp
Removes the bespoke rounding in favor of std::llround and std::clamp
routines
2025-08-04 09:26:25 -07:00
Seth Hillbrand
4aa2047f45 Replace alg::delete and alg::delete_if with std c++20 2025-08-04 09:03:16 -07:00
Alex Shvartzkop
39978ab2e2 Fix erroneous hex parsing when opening legacy PCB files on MSVC.
e.g. "FFFF8007" does not fit into signed "long" type (4 bytes on MSVC),
so strtoul returns 0x7FFFFFFF and sets errno to EINVAL.
2025-08-04 06:06:13 +03:00
Jeff Young
a8df4b16e2 Range checking. 2025-08-03 20:32:19 +01:00
jean-pierre charras
e1c56c71ef Fix compil warnings (some due to declarations colliding with a Windows header) 2025-08-03 16:11:14 +02:00
Jeff Young
a75fd2bb23 See if copying netclasses is responsible for KICAD-V6Z (and others). 2025-08-02 22:04:53 +01:00
Jeff Young
736d3c2d26 Don't require callers to jump through hoops.
Fixes KICAD-Y6J.
Fixes KICAD-Y6H.
Fixes KICAD-Y6G.
2025-07-31 15:58:49 +01:00
Jeff Young
37b0ba6273 Fix bad format statements (KICAD-Y1N). 2025-07-28 19:37:52 +01:00
Seth Hillbrand
094870e7a4 String fixes
- Clarify wording in a couple places
- Fix missing 'not' and remove non-standard dashes
- Standardize on single-quote for strings in strings
2025-07-23 17:36:51 -07:00
Seth Hillbrand
8556bd45c2 Handle model projection in Altium import
If the model is seated on the back, KiCad just needs to rotate and
offset for the board (if it is placed)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/213356
2025-07-17 16:48:26 -07:00
Seth Hillbrand
e8219c4300 Properly align imported dimensions
The height depends on which direction the dimension is being pulled.

Also try to mimic Altium's automatic arrow in/out style

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21329
2025-07-17 10:34:26 -07:00
Jeff Young
e230d5164d Honour renderSettings' default font.
This still leaves a few things out in the cold,
such as hit-testing and polygon generation.
But at least it allows us to plot with a default
font.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19031
2025-07-17 09:35:21 +01:00
Jeff Young
0495828a55 Honour front/back layer types for user layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21284
2025-07-17 09:35:21 +01:00
Seth Hillbrand
f6b599e155 Remove temporary file saving step
We implemented the intermediate temporary file in order to avoid issues
during save.  Unfortunately, this is heavily system-dependent and seems
to cause problems with unusual setups.  Now that we cache writing using
the prettifier, the errors during output will not affect the existing
file

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21330
2025-07-16 09:20:33 -07:00
Seth Hillbrand
6cd076eed4 Blast quite a bit of LOCALE_IO into the sun
After forcing the locale-specific read/writes out of our IO, we can
remove the global LOCALE_IO calls in many places.

Still to do: exporters, pcm, specctra, settings, drawing sheets,
plotters
2025-07-14 15:30:42 -07:00
Seth Hillbrand
55da0e46af Remove locale-specific floating point from io
Use only C-locale functions wxString::ToCDouble and fmt::format{}
functions so that we do not need to set the locale for file io
operations

This also introduces a cmake check that looks for certain banned
functions (strtod, strtof and atof) that convert strings into doubles
by the user locale or formatting specifiers like %f/%g that convert
doubles into strings by the users locale.  It will prevent compilation
in this case.

For the limited cases where we want to show the user a string in their
locale, we have an override string "format:allow" that can be added to
lines in order to allow them with %f/%g format specifiers
2025-07-14 14:26:00 -07:00
Jeff Young
c758a2fbaf Don't sequence layers when order doesn't matter. 2025-07-14 19:12:44 +01:00
Jeff Young
1b24c0a72b Fix copy/pasta. 2025-07-13 15:25:10 +01:00
Jeff Young
68d4940087 Thread-safety (potentially KICAD-VMX...)
... KICAD-6PV, KICAD-82, KICAD-R3A, and others.
2025-07-13 15:25:10 +01:00