Commit Graph

214 Commits

Author SHA1 Message Date
Jeff Young fcb9af2b12 When saving footprint to library don't detach from board too early.
In particular, make sure it's been flipped to the front layer first.
We need to know the layers to do the flip.

Fixes https://gitlab.com/kicad/code/kicad/issues/7780
2021-03-03 15:07:01 +00:00
WhiteChairFromIkea bbd6a1db0e Formatting 2021-03-02 19:57:19 +00:00
WhiteChairFromIkea b33ec125ac use "pattern" instead of "sourcelibreference" for footprints 2021-03-02 19:57:19 +00:00
WhiteChairFromIkea a9ca1e4ebd use "pattern" instead of "sourcelibreference" for footprints 2021-03-02 19:57:19 +00:00
WhiteChairFromIkea 6533b47f0a use "pattern" instead of "sourcelibreference" for footprints 2021-03-02 19:57:19 +00:00
Jonathan Haas f90164f7cf Fix some typos and improve wording 2021-03-02 19:13:49 +01:00
Jon Evans dbb6d0fb4a Move paste and mask clearance settings back to board file
These are needed for correct Gerber plotting so need to be stored
along with the board file
2021-02-28 14:04:28 -05:00
Seth Hillbrand bcc3767c2a FABMASTER: Fill both kinds of silk polys
Silkscreen polygons are always filled (I think) in FABMASTER.  Other
layer polygons are not
2021-02-27 06:58:04 -08:00
Seth Hillbrand 5d352d2373 FABMASTER: Enforce KiCad limits on line width
We require unfilled polygons to have positive width
2021-02-26 17:16:54 -08:00
Seth Hillbrand 7e0168a99d FABMASTER: Process newer outline tag
Allegro uses the subclass "DESIGN_OUTLINE" in newer version for their
edge cuts instead of just "OUTLINE".  This handles both.

Fixes https://gitlab.com/kicad/code/kicad/issues/7735
2021-02-26 17:06:56 -08:00
Seth Hillbrand c9b39aaaed FABMASTER: Process REFDES position
The reference designator is stored separately with the Tracks, so we
need to extract position/size data from it there and match back to the
components later.

Fixes https://gitlab.com/kicad/code/kicad/issues/7733
2021-02-26 17:04:21 -08:00
Seth Hillbrand 75c525af4f FABMASTER: Handle polygons better
Polygons in non-etch layers need special handling to ensure they get
treated the same.

Fixes https://gitlab.com/kicad/code/kicad/issues/7731
2021-02-26 14:01:04 -08:00
Seth Hillbrand 2d5015c217 FABMASTER: Try harder to figure out nets
Find all intersecting points both forward and back between the filled
areas and the outlines in order to determine the proper net assignment
for the zones

Also creates rule areas for special zones instead of filled zones

Fixes https://gitlab.com/kicad/code/kicad/issues/7732
2021-02-26 13:06:06 -08:00
jean-pierre charras b31bf1e40f Always store via drill value in .kicad_pcb file.
Old boards were using UNDEFINED_DRILL_DIAMETER value in file for via drill when
the via drill value was the netclass value.
Recent boards always set the via drill to the actual value, but now we need
to be sure always store the drill value, because netclass value is not stored
in the board file. Otherwise the drill value of some (old) vias can be unknown
2021-02-26 20:57:43 +01:00
Seth Hillbrand 73dd93701a FABMASTER: demote odd graphics warning
Drill layers have many different shapes in FABMASTER.  These are not
used for board information, so we can ignore them.
2021-02-26 11:37:21 -08:00
Seth Hillbrand ae2a9ef538 Use std::locale::classic static local
Prevents performance issues when creating new locales under MSVC
2021-02-26 11:37:21 -08:00
Seth Hillbrand 103dde67f6 FABMASTER: Handle rotated/flipped custom pads
The rotate mirror actions need to line up with the expectation.
FABMASTER keeps elements board-referenced while KiCad has some elements
referenced to the board and some referenced to the footprint
2021-02-26 11:37:21 -08:00
Seth Hillbrand ff1300d13b FABMASTER: Preallocate vectors
Reserves memory for vector elements based on file size.  This helps
reduce the number of re-allocations needed when reading large files
2021-02-26 11:37:21 -08:00
Jeff Young 86aaa2e9cb Rationalize footprint bounding boxes and cache all of them.
Fixes https://gitlab.com/kicad/code/kicad/issues/7720
2021-02-26 13:50:27 +00:00
Seth Hillbrand c15a9e60d4 Used cached footprints without check in preview
Between the time the user loads the footprint preview in cvpcb or Add
Footprint in pcbnew, we don't need to verify cache integrity to display
the footprint.  We use the cache copy when displaying until we close the
selection window and re-open.  This limits our need to iterate over the
full directory on every footprint display.

Alternate solutions for v7 should include looking into libfswatch for
change detection
2021-02-25 15:46:52 -08:00
Seth Hillbrand 54539d2cd7 Calculate timestamp the same way both times
Timestamps were checked using a different routine than they were
generated with, leading to the cache always being out of date.

This uses the same routine for both.  While it iterates over the
directory twice during the initial load, this will never be dominant

Fixes https://gitlab.com/kicad/code/kicad/issues/7711
2021-02-25 14:36:49 -08:00
Seth Hillbrand 154d56b4f4 If items exist on the "Rescue" layer, prompt user
Don't allow Rescue items to enter the board design.  This prompts the
user to either delete them or move them to the Comments layer.
2021-02-23 09:25:00 -08:00
Roberto Fernandez Bautista 09ebfcd650 CADSTAR Importer: Fix Code Style
- Rename member variable names to use the 'm_' prefix
- Rename a few object types that clashed with KiCad object names, such
  as BOARD and SCHEMATIC, to avoid the use of '::' to access the KiCad
  objects.
- Remove some unused code.
2021-02-22 13:24:00 +00:00
Jon Evans 3bc9d7b95e Rework GAL layer enum to fix visibility import from legacy boards 2021-02-21 13:41:43 -05:00
Jeff Young 9dacd4abb7 Don't allow footprint children in groups outside their footprint.
Fixes https://gitlab.com/kicad/code/kicad/issues/7625
2021-02-20 18:09:56 +00:00
Marek Roszko 622baa6531 Silence more unused exception var warnings 2021-02-20 12:01:51 -05:00
Seth Hillbrand de7d9ef874 Fix tabs 2021-02-15 08:09:20 -08:00
Seth Hillbrand 55db1aa5f5 Fix minor Fabmaster issue 2021-02-13 16:32:39 -08:00
Roberto Fernandez Bautista 19d786852a CADSTAR PCB Archive Loader: Fix loading of zero sized pads
Some CADSTAR designs use zero sized pads because CADSTAR did not allow
arbitrarily assigning pad numbers: they had to be sequential. The
workaround to this was to use zero sized pads. However this causes DRC
errors in KiCad, so we load them just in a mask layer.
2021-02-10 18:49:21 +00:00
Roberto Fernandez Bautista aabe9c063f CADSTAR PCB Archive Loader: Some fixes to design rules
1. Make sure to convert to KiCad units
2. There are some KiCad rules that have no CADSTAR equivalent.
   Make a guess as to what an appropriate rule could be.
2021-02-10 18:49:21 +00:00
Roberto Fernandez Bautista 2d66abdc89 CADSTAR PCB Archive Importer: More improvements to loading of zones
Adds a new function Area() to SHAPE_POLY_SET
2021-02-10 18:49:21 +00:00
Roberto Fernandez Bautista 06c420a2a3 CADSTAR PCB Archive Importer: Improve loading of zones
Load fill state and guess zone priorities from fill state
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 80d8974f87 CADSTAR Archive Importer: Fix loading of non-cadstar font text sizes
Non-cadstar fonts use a width of 0.
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista f559e94b00 Non-Kicad Project Importers: Fix the creation of project fp libraries
Adds a new function to PLUGIN GetImportedCachedLibraryFootprints() that
loads the library footprints of the board design that was imported
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7449
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 297ff282f1 CADSTAR Importer: Update copyright years and remove white spaces 2021-02-10 18:49:20 +00:00
Marek Roszko 872184fe8b Revert "Bump minimum required CMake version to 3.10"
This reverts commit a475f45753.
2021-02-09 18:46:13 -05:00
Simon Richter a475f45753 Bump minimum required CMake version to 3.10
This allows us to remove even more workarounds
2021-02-08 12:23:08 +00:00
Thomas Pointhuber 088ff5b2bb altiium: set fill version, which allows us to do a copper pour without a line 2021-02-06 23:58:30 +01:00
Thomas Pointhuber 8ee6694c57 altium: Set smaller zone MinThickness by default to better account for missing design rules 2021-02-06 23:45:28 +01:00
Thomas Pointhuber d444ed80a5 altium: parse Regions6 to fill zone on import 2021-02-06 23:06:59 +01:00
Seth Hillbrand 016bffc899 Remove some more unneeded atof() calls 2021-02-05 10:18:34 -08:00
Seth Hillbrand 2e67cd2db8 Fix locale issue in Fabmaster import 2021-02-04 16:32:02 -08:00
Seth Hillbrand aa0db969ca Caching ConvexHull routine
Stores a cache of the convex hull similar to the bounding box.  Modifies
the hull based on actions to allow  complex footprint graphics without delay

Fixes https://gitlab.com/kicad/code/kicad/issues/7341
2021-02-04 15:56:52 -08:00
jean-pierre charras 0de3d48db5 typo 2021-02-04 09:00:35 +01:00
Seth Hillbrand 22d78a5827 FABMASTER: Handle flipped custom pads and rounded rects
Adds error messages for more cases and fallback for custom pads to
prevent invalid pad generation
2021-02-02 19:33:18 -08:00
Seth Hillbrand b54e951ed8 Fix a couple of checks in Fabmaster 2021-01-31 14:12:40 -08:00
Marek Roszko 21fe8542df Remove shadowing of identical base m_parser member 2021-01-31 12:56:27 -05:00
Thomas Pointhuber 70e6d0e79f altium: use those new fancy user definable layers and import the name from Altium 2021-01-31 11:15:08 +01:00
Thomas Pointhuber 6a9e1ecf9e altium: Center board after import 2021-01-30 17:43:02 +01:00
Seth Hillbrand 89a72df0b1 Fix a few FABMASTER issues
- Custom pads now properly supported with offset/rotation
- Fix missing pads from alternate layers

Fixes https://gitlab.com/kicad/code/kicad/issues/7299
2021-01-27 17:50:14 -08:00