Commit Graph

542 Commits

Author SHA1 Message Date
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
Seth Hillbrand 124bdb6673 Check for older tags in pcad import
The pourOutline/planeOutline do not include support for fillets

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

(cherry picked from commit 72b7f9fe10)
2022-06-08 16:27:17 -07:00
Seth Hillbrand 6c0856c384 Fix PCAD silk layer for solder-side fp
The layer should be flipped based on the footprint mirror value rather
than the text mirror value (which is independent)

Fixes https://gitlab.com/kicad/code/kicad/issues/11652
2022-05-31 13:03:32 -07:00
Jeff Young 155620cc9a Move H/V/45 mode from zone properties to toolbar.
Fixes https://gitlab.com/kicad/code/kicad/issues/8587
2022-05-29 21:30:15 +01:00
Seth Hillbrand 35b79c2ec9 Make PCAD import case-insensitive
According to the PCAD specification, all tags are case insensitive.
Most exporters honor the defaults but there is always an outlier or two

Fixes https://gitlab.com/kicad/code/kicad/issues/11652
2022-05-27 10:09:40 -07:00
Jeff Young 4afca58ce7 Eagle octagonal pads are regular (~29% chamfered).
Also cleans up setting of KeepTopBottom (which is ignored unless
we're doing optional flahing -- which we're not for Eagle imports).

Fixes https://gitlab.com/kicad/code/kicad/issues/11664
2022-05-23 10:43:34 +01:00
Marek Roszko 88c7322a0d EDA_TEXT Get/SetTextSize should use VECTOR2I 2022-05-14 08:16:15 -04:00
jean-pierre charras 5c7a79e287 (WIP) Teardrop: use a specific attribute in .kicad_pcb file to identify teardrops
the new attribute is:
"(attr (teardrop type padvia)))" or "(attr (teardrop (type track_end)))"
However (Work in Progress) writing this attribute in file is temporarily disabled.
2022-05-14 09:50:00 +02:00
Jeff Young 37aa42d1e3 Don't allow Edge_Cuts or Margin in footprint private layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/11431
2022-04-27 17:14:33 +01:00
jean-pierre charras 1e80f3a65a pcad importer: fix a truncation when converting mils to IU. The value in mils is a double, but the function to convert in IU uses int. Fixes #11380 https://gitlab.com/kicad/code/kicad/issues/11380 2022-04-21 10:01:59 +02:00
Jeff Young 9b087a3c25 Add automatic precision choices for dimensions.
Fixes https://gitlab.com/kicad/code/kicad/issues/6690
2022-04-17 20:02:58 +01:00
jean-pierre charras e9da8c3a00 Ensure net_code is not used by non copper zones when saving the board file.
For some obscure reason, non copper zones inside footprints can have non 0 netcode.
Fixes #11395
https://gitlab.com/kicad/code/kicad/issues/11395
2022-04-15 13:19:35 +02:00
Jeff Young a33e23e25a Import radial dimensions from Eagle.
Fixes https://gitlab.com/kicad/code/kicad/issues/10763
2022-04-12 15:47:39 +01:00
Jeff Young 739f4d0a1e Improvements to Eagle dimension importing.
1) Import leaders
2) Drop radius and angle dimensions
3) Import dimension text sizes
4) Correctly interpret which side dimension offset is on
5) Correclty handle offsets for non-cardinal dimensions

Fixes https://gitlab.com/kicad/code/kicad/issues/10763
2022-04-12 15:47:39 +01:00
Jeff Young 2663ad5340 Implement Eagle text variables.
Also fixes two bugs:
1) subsequent text items that are marked >NAME or >VALUE will now get
imported as text items with ${REFERENCE} or ${VALUE} (instead of overwriting
the previous text item)

2) we no longer (accidentally) capitalize all text items.

Fixes https://gitlab.com/kicad/code/kicad/issues/11321
2022-04-10 17:29:47 +01:00
Jeff Young a23399a1af Formatting. 2022-04-10 17:29:47 +01:00
jean-pierre charras 5e52539939 eagle importer: fix incorrect conversion UTF8/wxString.
When importing a eagle board file using wxXmlDocument, the strings in eagle BOARD
(UTF8 encoded) are correctly converted to wxString (using unicode wide chars)
So trying to reconvert these strings using FROM_UTF8( <wxString>.c_str() )
is incorrect and can break initial string if non ASCII7 chars are found
2022-04-09 15:33:01 +02:00
Wayne Stambaugh 0bdbfe1446 Pcbnew: add plot on all layers feature.
ADDED: Any addition board layers can be plotted on all selected board layer
when plotting.

CHANGED: The new plot to all layers feature made the plot edge cuts option
obsolete.  Users must now select the edge cuts layer from the list of
plot to all layer selections to include edge cuts on all layers when
plotting.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2449
2022-04-02 14:33:40 -04:00
Thomas Pointhuber bd18e340f4 eagle: introduce *.lbr footprint import test
Bugs found but not fixed yet:
* Reference and Value are not converted correctly yet
  * HOTFIX: test commented out
* GP3906-TLP and UBLOX_ZOE_M8-0-10 are not able to import the description again
  * HOTFIX: description removed from gold file
2022-04-02 20:07:16 +02:00
Thomas Pointhuber 406c528ab7 altium: Create region for items on the KEEP_OUT_LAYER and use new Track unit-tests 2022-04-02 18:17:19 +02:00
Jeff Young a2d4351b97 Correct initialization of justification.
Fixes https://gitlab.com/kicad/code/kicad/issues/11248
2022-03-28 17:11:20 +01:00
Wayne Stambaugh 7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
Wayne Stambaugh 7b2d9dfc0c Fix some Coverity uninitialized scalar variable issues. 2022-03-24 13:17:07 -04:00