Commit Graph

564 Commits

Author SHA1 Message Date
Marek Roszko e6ed275c25 Repoint IU_PER_MILS 2022-09-16 21:09:26 -04:00
Marek Roszko a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Jeff Young 281b9d405a ADDED ability to specify where pad number (& net name) go on custom shaped pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/6627
2022-09-14 11:37:20 +01:00
Roberto Fernandez Bautista fa5dc23797 CADSTAR PCB: Fix regression when loading pads in footprints
Zero sized pads can be valid - e.g. a through hole pad
2022-09-04 00:59:57 +02:00
Roberto Fernandez Bautista 9abf3438b8 CADSTAR PCB: Invert logic for guessing which layer is top / bottom
Ensures correct automatic layer mapping is applied to the design in
https://gitlab.com/kicad/code/kicad/-/issues/12349
2022-09-04 00:59:57 +02:00
Roberto Fernandez Bautista c961624d43 CADSTAR PCB: Load 2-point polygons as line segments
Fixes asserts when loading design from https://gitlab.com/kicad/code/kicad/-/issues/12349
2022-09-04 00:59:57 +02:00
Roberto Fernandez Bautista 21b3753e9b CADSTAR PCB: Parse Teardrops
Todo: We need to figure out how we will load teardrops. For now
just drop them on import.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12349
2022-09-04 00:59:56 +02:00
Jeff Young 9188838e50 RIP EDA_RECT. 2022-08-31 23:57:24 +01:00
Jeff Young b4492e0bd2 More EDA_RECE yeetage. 2022-08-31 17:19:50 +01:00
Jeff Young 5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00
Jeff Young 0c8787cbb9 Some more wxPoint/EDA_RECT yeeting. 2022-08-31 00:44:33 +01:00
Seth Hillbrand b736460e71 Move optional access from value() to *operator
`value()` throws.  Where we check for existence, we don't need to use
the throwing version and should just use the unprotected variant
2022-08-30 13:59:39 -07:00
Marek Roszko 03aa63bd50 Move 5 helpers to EDA_UNIT_UTILS since they aren't iu specific 2022-08-29 20:11:03 -04:00
Marek Roszko bf964d8678 Commonize page_info by simply making the Iu scale a parameter on call. 2022-08-27 13:36:00 -04:00
Seth Hillbrand 146495672e Utilize our combine_hash routine for multiple hash
We should be using the one routine every time we want to build a hash
from indepedent values rather than rebuilding it differently in multiple
places
2022-08-26 08:45:13 -07:00
Seth Hillbrand f1261e71d4 Replace boost::optional with std::optional 2022-08-25 15:50:47 -07:00
Jeff Young ec51955dad Remove vestiges of old pad locking system.
We now use a session preference (Allow free pads) in the board editor,
and we never supported pad locking in the footprint editor.
2022-08-23 18:02:16 +01:00
Seth Hillbrand 4b63c7012d Silence some clang warnings 2022-08-22 12:54:00 -07:00
Wayne Stambaugh c72457482c Fix Eagle plugin footprint QA test issue.
Apparently mapping Eagle footprint layers to the KiCad Dwg_User
that were previously mapped to UNDEFINED_LAYER breaks the QA test
and causes the footprint editor to crash when opening Eagle
footprints.  This means that the potential data loss issue when
loading Eagle footprints is still in play.
2022-08-22 09:11:30 -04:00
Wayne Stambaugh 0bc1188897 Fix Eagle plugin board layer mapping issue.
The Eagle plugin layers have to be mapped differently depending on
whether a board is being imported or a footprint library is being
cached.  Footprint libraries can bypass the manual layer remapping
step that happens when importing a board.

Please note that when loading footprints in the footprint editor
and viewer, all layers that do not directly map to KiCad layers are
put on the Dwg_User layer so that there is data loss.  Users will
have to manually remap objects to the correct layer as required.
This is less than ideal but until the footprint library table parser
supports prompting users to remap unknown layers, it will have to do.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11839
2022-08-21 14:56:04 -04:00
Jeff Young 46df421064 ADDED defined pad groups for net-tie footprints
Each pad group is allowed to short nets with other pads in its group.

Legacy footprints with the "net tie" keyword hack will get a single
group auto-created with all the footprint's pads in it.

DRC and the router now allow a track to collide with copper graphic items
while entering a net-tie pad as long as the closest point in the collision
is within the pad.

DRC (and the footprint checker) now check for copper items in the
footprint shorting pads which are not in the same pad group.

Fixes https://gitlab.com/kicad/code/kicad/issues/2265
2022-08-19 18:54:20 +01:00
Seth Hillbrand 35ac39844f Clean up some auto usage
Don't make new copies of shared_ptr if we can use references.  Keep auto
usage down to hard-to-type-out sequences
2022-08-15 11:29:45 -07:00
Jeff Young db91bcbabf Bump file format version for allow-soldermask-bridges-in-FPs. 2022-08-15 18:03:03 +01:00
Seth Hillbrand 9828360759 Remove unused variable 2022-08-15 07:52:53 -07:00
Marek Roszko c418b25756 Centralize the parseDouble functions in the parsers and gcc specialcase 2022-08-14 18:46:19 -04:00
Jeff Young 86938aa425 Read, write and process the board-wide Allow soldermask bridges in FPs. 2022-08-14 22:56:29 +01:00
Jeff Young a9536b5de9 CHANGED netclass assignments now done via canvas or via patterns. 2022-08-14 22:56:29 +01:00
Roberto Fernandez Bautista 6b349fdb0a CADSTAR PCB: Allow remapping all non-electrical layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12196
2022-08-14 22:24:17 +01:00
Roberto Fernandez Bautista 69d696660b cadstar: Report warning that imported text may be different
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12195
2022-08-14 22:24:16 +01:00
Marek Roszko a070959209 Switch from strtod to std::from_chars for performance 2022-08-14 16:19:24 +00:00
Seth Hillbrand 2ee65b2d83 Force removal of zero-sized pads on load.
Pads with zero width or height cause issues when rendering and
selecting.  KiCad has never allowed these elements but hasn't prevented
importing systems where they exist.  This prevents their import and
cleans existing designs where the pads are placed

Fixes https://gitlab.com/kicad/code/kicad/issues/12200
2022-08-13 19:10:48 -07:00
Marek Roszko f695ae5522 Generate const keyword_hash maps at compile time
Or else the map gets pointlessly recreated during footprint loading thousands of times
2022-08-09 00:56:49 -04:00
Jeff Young 96f01d33c8 Performance improvements.
1) Move a bunch of std::map's to std::unordered_map to get constant-time
look-ups
2) Lengthen progress-reporting intervals to spend more time doing work
and less time talking about it
3) Reverse order of SHAPE_LINE_CHAINs in thermal intersection checks to
make (much) better use of bbox caches
4) Don't re-generate bboxes we already have
5) Fix some autos that weren't by reference (and were therefore copying
large datasets)
6) Rename delta progressDelta so it's easier to search for in future
7) Get rid of a few more autos (because I don't like them)
8) Pass large items to lambdas by reference

Fixes https://gitlab.com/kicad/code/kicad/issues/12130
2022-08-03 11:59:42 +01:00
jean-pierre charras 49bf717c0e fix minor compil warnings 2022-07-17 20:29:59 +02:00
Jeff Young aa9fe58abe Don't duplicate user-defined track widths, via sizes or DP dims...
... when appending to board.

Fixes https://gitlab.com/kicad/code/kicad/issues/12014
2022-07-15 20:52:08 +01:00
Jeff Young 2de10080cd Add edge and margin clearances to message panel. 2022-07-15 16:14:32 +01:00
jean-pierre charras 50bb7c93a1 Fix bug in commit 64e1720f 2022-07-15 17:03:05 +02:00
jean-pierre charras 64e1720f12 FP_SHAPE in pads: always specify fill mode for shapes that can be filled or not.
Fixes #12012
https://gitlab.com/kicad/code/kicad/issues/12012
2022-07-15 16:50:38 +02:00
Mike Williams 99f8b21ed1 PCB: Add bitmap layer per board layer 2022-07-14 11:23:23 +00:00
Mike Williams 3669cb4673 PCB Editor: Add User Background Images 2022-07-14 11:23:23 +00:00
Seth Hillbrand a9a5136c1c Always allow blind/buried/micro vias
Removes a nanny setting that prevented the use of
blind/buried/micro-vias without a checkbox.  If the designer does not
want microvias in their board, they simply do not place microvias.
2022-07-12 19:47:31 -07:00
Wayne Stambaugh 6a74ecbffd Pcbnew: fix minor white space issue in board file.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11669
2022-07-11 11:21:45 -04:00
Seth Hillbrand 0c47a09517 Ensure rectangles are normalized
Normalize on creation and fixup rectangles previously saved with
inverted coordinates

Fixes https://gitlab.com/kicad/code/kicad/issues/11965
2022-07-07 10:40:18 -07:00
luz paz af6ba1a16e Fix typos in pcbnew sub-directory
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-06-30 09:39:45 -04:00
jean-pierre charras c8ce01ce8e pcb_parser: fix an incorrect CHECK_MSG when parsing a dimension in a footprint.
this incorrect CHECK_MSG created a crash.
Fixes #11859
https://gitlab.com/kicad/code/kicad/issues/11859
2022-06-20 10:42:19 +02:00
jean-pierre charras f20cb0fda8 Activate teardrops: remove advanced config option and add teardrop keywords in files. (the ability to read teardrop keywords was added some time ago) 2022-06-17 19:42:27 +02:00
jean-pierre charras 9fd5ee5a2f paper min size set to 1 inch (previously 0.1 inch, very small indeed)
Avoid using magic numbers in file pcb_parser.cpp.
Fixes #11807
https://gitlab.com/kicad/code/kicad/issues/11807
2022-06-13 17:51:29 +02:00
Seth Hillbrand ac0f95683f Sort PCAD layers
Better fix for 11750.  Instead of figeting with layer values, we sort
our map based on the layer numbers in the PCAD file.  F_Cu is always
layer 1 and B_Cu is always layer 2.

Fixes https://gitlab.com/kicad/code/kicad/issues/11750
2022-06-09 11:10:34 -07:00
Seth Hillbrand e857622dd4 Handle B_Cu ordering
Stopgap until we introduce multi-layer mapping widget

Fixes https://gitlab.com/kicad/code/kicad/issues/11750

(cherry picked from commit 32aabaf010)
2022-06-08 17:19:37 -07:00