Commit Graph

9051 Commits

Author SHA1 Message Date
Maciej Suminski 89698a727b Removed const modifier for returned non-reference types 2020-07-05 22:44:38 +02:00
Jeff Young 5bc6389477 Comments. 2020-07-05 19:53:04 +01:00
Jeff Young 40d8cb1a19 Fix missing reference found in code review. 2020-07-05 19:53:04 +01:00
Jeff Young edecfaa433 Minor code cleanup. 2020-07-05 19:53:04 +01:00
jean-pierre charras 82da739786 Better calculations in TransformRoundChamferedRectToPolygon().
the old calculations was creating a slightly too small shape for rounded corners.

Now the polygon is outside the perfect shape (as required to create a shape with clearance)

Fixes #4805
https://gitlab.com/kicad/code/kicad/issues/4805
2020-07-05 19:32:07 +02:00
Jon Evans 3ebd5b317b Don't try to switch projects during autosave
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4800
2020-07-05 11:02:48 -04:00
jean-pierre charras 1463dd10b2 Pcbnew fix: Select/Expand Connection can be used only once on the same segment
Was due to a incorrect cleared flag in calculations.

Fixes #4767
https://gitlab.com/kicad/code/kicad/issues/4767
2020-07-05 12:42:12 +02:00
Jon Evans 2f4a14a57b Properly exclude colorless GAL layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4793
2020-07-03 23:23:58 -04:00
Jon Evans 0148c1db84 Support layer switch hotkeys while routing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4699
2020-07-03 19:49:19 -04:00
Jon Evans 3d7610d6b9 Hide PNS debug graphics behind an AC key
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4061
2020-07-03 19:33:36 -04:00
Jon Evans a9e97848dd Fix use after free on BOARD_DESIGN_SETTINGS
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4792
2020-07-03 19:13:06 -04:00
jean-pierre charras 286c36b7da gl_utils.h: fix compil issue on Windows
__WINDOWS__ is defined in wxWidgets.
the right preprocessor symbol is _WIN32 for Windows 32/64 bits
2020-07-03 17:12:36 +02:00
Thomas Pointhuber 7ba6a77c94 Improve arc geometry manager to choose the direction which makes more sense
As long as the arc angle stays below <60°, it will automatically choose between
clockwise and counter clockwise. This allows the user to choose the direction
with a simple mouse movement.
2020-07-03 15:05:17 +00:00
Jon Evans 4dbbe1cf68 Project settings fixes from review
- Fix file extension for new project
- Fixes for exceptions on MSW
- Fix some ASAN issues
- Allow SETTINGS_MANAGER to run headless
- Don't flag schematic as modified after schematic setup is closed
- Don't automatically unload projects when LoadProject is called
- Don't unload project if it's the same as the current one
- Make sure to properly init/de-init template field names
2020-07-02 22:08:54 -04:00
Jon Evans fe5959b625 Remove the schematic and board backup file system
Per discussion on the developers list, this old system
no longer provides much value and is seen as annoying
by many users.  The new save logic should prevent any
cases of file corruption on save, which was a major
reason for the backup file system existing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2012
2020-07-02 22:08:54 -04:00
Jon Evans b592a4169f Update project template system for new format 2020-07-02 22:08:54 -04:00
Jon Evans 12b4a55ae8 Port Eeschema to new project settings
DRC/ERC error serialization changed to use explicit tokens
Old stored severities and ignored errors are discarded
2020-07-02 22:08:54 -04: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
Jon Evans a4fadfcdf2 Begin moving project file load to new system 2020-07-02 22:08:54 -04:00
Jon Evans a7708fa6dc Add PROJECT_FILE and basic load/unload methods 2020-07-02 22:08:54 -04:00
Ian McInerney c27207500d Cleanup some compiler warnings 2020-07-03 00:10:31 +01:00
Jeff Young 2cfd6ba978 Fix a couple of integer overflows. 2020-07-02 22:52:37 +01:00
Jeff Young eb1ff80d57 SHAPE collision fixes.
1) An actual distance of 0 is still a collision, even if the allowed
distance is 0.
2) Be consitent about edges and interiors.  Everyone expect the edge
of a RECT to be part of the RECT; same with a CIRCLE.  SHAPE_POLY_SET
shouldn't be any different.  (And SHAPE_LINE_CHAIN was a split-
personality with the edge considered part of it for Collide() but not
for PointInside()).
2020-07-02 21:38:37 +01:00
Seth Hillbrand 54aaade47e 'const void' is not a return type 2020-07-02 11:43:18 -07:00
Seth Hillbrand d663be853f Explicitly add signed/unsigned comparison to warnings 2020-07-02 10:54:34 -07:00
Jeff Young 441dfa30f0 Return individual custom pad shapes instead of a SHAPE_POLY_SET.
Also implements an optional pointer to return the actual distance
from all the SHAPE collision routines.

Fixes https://gitlab.com/kicad/code/kicad/issues/4774
2020-07-02 17:09:15 +01:00
jean-pierre charras af8f05d570 Fix incorrect calculation of pad bounding box
Fixes #4776
https://gitlab.com/kicad/code/kicad/issues/4776
2020-07-02 11:33:07 +02:00
Jon Evans f8bfb2bc16 Fix several issues with multilayer zones
- Properly refill if layer set is modified
- Fix some threading issues with island removal
- Fix copy constructor

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4765
2020-07-01 20:51:44 -04:00
jean-pierre charras bba5cfe17e fix a minor compil warning 2020-07-01 18:52:42 +02:00
jean-pierre charras 8d18f289c7 remove a message printed only for debug/test. 2020-07-01 18:52:42 +02:00
Jeff Young 424d551054 Cache pad bounding boxes for performance.
Also allows us to return to a LOD test for pad numbers which treats
round and square pads the same.
2020-07-01 16:57:00 +01:00
Jeff Young 3b764d6357 Minor dialog spacing issues. 2020-07-01 16:57:00 +01:00
Jeff Young 8c4bfed001 Slight improvement on function names. 2020-07-01 16:57:00 +01:00
jean-pierre charras 3993181de5 D_PAD::BuildEffectiveShapes(): fix incorrect rect shape size for rect pads
rotated by +-90 deg
Noticeable in PnS router.

Fixes #4771
https://gitlab.com/kicad/code/kicad/issues/4771
2020-07-01 16:06:31 +02:00
Jeff Young 7b042f4a75 Add rectangle tool to PCBNew toolbar in favour of Aux Origin.
ADDED new rectangle graphics tool for PCBNew and Footprint Editor.

Also adds rectangle tool to both Footprint Editor and PCBNew Place
menus.

The Aux Origin tool can come back once we have multi-select toobar
buttons.

Also collapses an unnecessary level out of the auxOrigin and gridOrigin
settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/2246
2020-07-01 13:31:30 +01:00
Jon Evans 32b7b0c617 Fix filled zone rotation and move operations 2020-06-30 22:26:30 -04:00
Jeff Young 40847c055d Check final corner of rectangle before merging.
Fixes https://gitlab.com/kicad/code/kicad/issues/4766
2020-06-30 21:01:51 +01:00
Jeff Young 40a72d9530 Add SH_RECT handling to 3D shape conversion.
Also add some debugging for not-implemented shape cases in other
places to catch simmilar issues in future.

Fixes https://gitlab.com/kicad/code/kicad/issues/4757
2020-06-30 18:32:31 +01:00
jean-pierre charras 42296d7eb9 fix issues in DRC and fill zone, related to recent changes in code.
Note also: the actual clearance between 2 pads when < minimal clearance
is incorrectly calculated.
2020-06-30 12:59:26 +02:00
Jon Evans 49c7ba6724 Make it easier to select keepouts 2020-06-29 20:37:57 -04:00
Jeff Young e91b7cf18f Separate the two offset strategies for PointEditor Pad editing.
This doesn't indicate what I think we should do with them; it will
just make whatever we decide easier to do.
2020-06-29 23:25:13 +01:00
Jeff Young d67f404dec Fix undo issue with merging lines into rectangles. 2020-06-29 22:58:05 +01:00
Jeff Young 36e94773a3 Adjustments to point-editing of pads.
1) Don't offset pad with no hole and no offset: move them instead.
2) Don't allow editing of locked pads in board editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/2153
2020-06-29 19:22:38 +01:00
Jon Evans 44f3cdb31e Fix a few issues with zone islands 2020-06-29 12:16:37 -04:00
Jeff Young 9cbcf3fe56 Improve pad annotation for custom-shaped pads.
Use the bounding box instead of the anchor pad size for determining
LOD and size/location of annotations.
2020-06-29 12:48:55 +01:00
Jeff Young 8ac3a3cbc0 Replace missing "sketch text" option from ModEdit View menu. 2020-06-29 12:08:11 +01:00
Jeff Young 516de9c85e Point editor hookup for non-custom-shaped pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/2153
2020-06-29 11:50:44 +01:00
jean-pierre charras a229e51962 Pcbnew: fix incorrect clearance of oval pads in zone fill.
(The clearance value was only half of the correct value)
2020-06-29 09:57:36 +02:00
Seth Hillbrand 224b41e8b1 Fix a threading segfault when filling zones
The shape cache gets reset by the zone fill algorithm.  This needs to be
cleaned before multiple threads are created and cannot be modified when
threading.

Fixes https://gitlab.com/kicad/code/kicad/issues/4723
2020-06-28 11:12:31 -07:00
Jon Evans 65f5ebd8f2 ADDED: Persistent selection filter UI for PcbNew 2020-06-28 15:12:47 +00:00