Commit Graph

1516 Commits

Author SHA1 Message Date
Jeff Young 92a229eec7 ADDED separate user-defined color for page limits.
Fixes https://gitlab.com/kicad/code/kicad/issues/5271
2022-03-24 14:11:41 +00:00
jean-pierre charras 93066004f1 QA: fix altium qa tests now the altium to pcbnew coordiantes are rounded
to the near 10nm value.
2022-03-24 12:36:46 +01:00
jean-pierre charras e2cda7837f Gerbview: Fix incorrect rendering of aperture macros combining polygons.
A aperture macro can have polygons with holes, and/or many polygons.
When combining polygons holes can be created. So ensure the resulting polygon
is fractured before drawing it.
Fixes #11218
https://gitlab.com/kicad/code/kicad/issues/11218
2022-03-23 20:50:29 +01:00
Jeff Young 65185f53a1 Rotate fp zones before comparing with library versions.
Also includes some performance fixes to not copy around triangulation
data when it's not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/10143
2022-03-14 15:53:24 +00:00
jean-pierre charras 3a5530d441 Gerbview: fix typo that prevent lo load a .gbrjob file from command line
Fixes #10921
https://gitlab.com/kicad/code/kicad/issues/10921
2022-02-21 11:32:36 +01:00
jean-pierre charras 233f86e8cf Gerbview: fix missing handling of ID_GRID_SETTINGS event.
Fixes #10885
https://gitlab.com/kicad/code/kicad/issues/10885
2022-02-18 08:31:32 +01:00
jean-pierre charras f8d6dd1efd Gerbview: fix a long standing issue: negative objects are now correctly printed. 2022-02-12 11:44:34 +01:00
Seth Hillbrand 79f5325697 Fix float scaling to use single fn
Function `scaletoIU` was updated in a8c275ae5d but this missed other
conversion points that re-implemented the same routine.  This unifies
the scaling for both ReadIJCoord and ReadXYCoord to use the same routine
as calls from am_primitive

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

(cherry picked from commit d937abb5b8)
2022-02-10 12:36:34 -08:00
jean-pierre charras c125cb673e gerbview: fix incorrect render of regions defined by a 360 deg arcd (a circle)
these regions were missing.
Fixes #10805
https://gitlab.com/kicad/code/kicad/issues/10805
2022-02-10 09:56:27 +01:00
Seth Hillbrand c79916b359 Fix relative return with nullptr condition
Previous fix for CVE munged return conditions for gerber files in some
cases.  This restores the proper order where a nullptr will return 0,0
in the relative case and the current coordinate in others

Also fixes incorrect scale factor for inches/mils conversion to mm
2022-02-10 09:53:55 +01:00
Marek Roszko 41f54349a5 Replace inserts/push_backs with emplace in some spots 2022-02-05 19:53:31 -05:00
Jeff Young 4e3109a633 Wide string decls for gerbview. 2022-02-05 22:34:45 +00:00
Seth Hillbrand 7ed569058c Review ReadXY/ReadIJ to avoid static char arrays
Tighten up the code a bit, removing extra calls and loops.  Removes
unchecked use of stack char array

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

(cherry picked from commit 927afe313d)
2022-02-02 17:18:25 -08:00
Seth Hillbrand 54b20cb049 Fix overflow vulnerability in Gerbview
Corrects an unguarded read that could lead to arbitrary code execution
in specifically crafted gerber files.

Fixes https://gitlab.com/kicad/code/kicad/issues/10700
2022-02-01 15:50:27 -08:00
Seth Hillbrand 098e8f7d9b Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option"
This reverts commit ea9f960cc1.

Reverted for updates as this currently breaks kicad-mac-builder
2022-01-31 15:57:56 -08:00
Jeff Young 60bcfd1bf1 Bug fixes in arc & textbox printing.
Also removal of the no-longer-used clipping code from GR*.
2022-01-31 20:00:47 +00:00
Davide Gerhard ea9f960cc1 cmake: adding KICAD_MACOSX_APP_BUNDLE option
ADDED: with cmake KICAD_MACOSX_APP_BUNDLE option the user can disable
the macOS app bundle creation when compiling on macOS. This permit to
use/install KiCad like any other *nix platform (/usr/bin, /usr/share,
ecc.). By default, cmake build the app bundle.
2022-01-28 15:49:37 -08:00
jean-pierre charras f651e31965 Fix minor compil and Coverity warnings. 2022-01-25 12:52:13 +01:00
Mike Williams 20788897ee Gerbview: display Start and End position of drawable items
Originally written by Tarun Johar.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8426
2022-01-24 08:40:49 -05:00
Mike Williams 6ddd5ec37f Gerbview: Add menu item to open files with autodetection
Needs an icon at some point
2022-01-24 08:40:49 -05:00
Mike Williams 8692014691 Gerbview: consolidate some dialog code
Preparing also for a third usage where we autodetect the file type
2022-01-24 08:40:49 -05:00
Mike Williams db407a1c0b Gerbview: clean up loading files to prepare for more autodetection 2022-01-24 08:40:49 -05:00
Mike Williams eee20f9f67 Gerbview: reduce redundant file loading code 2022-01-24 08:40:49 -05:00
Mike Williams 4140ab118e Gerbview: remove extra linebreaks from errors messages 2022-01-24 08:40:49 -05:00
Mike Williams 7043498875 Gerbview: handle unexpected invalid char
Attempting to print this as a char was causing wxWidgets to assert since
some input is neither ASCII or valid UTF-8.

Reproducable by trying to open zip files as gerber files from the
command line.
2022-01-24 08:40:49 -05:00
Mike Williams c83f1ea1cd Gerbview: support more filetypes from the command line, e.g. zip
Also parse other extensions, and use new heuristics to guess if we don't
know the extension.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/5680
2022-01-24 08:40:49 -05:00
Mike Williams 2612b94519 Gerbview: always search for the first available layer 2022-01-24 08:40:49 -05:00
Mike Williams 9a0d4f5ba4 Gerbview: don't erase current layer before loading files
Since we now load into the next available layer, don't erase our current
layer.
2022-01-24 08:40:49 -05:00
Mike Williams 45f1287a6c Gerbview: Allow layer move up, move down, and delete 2022-01-24 08:40:49 -05:00
Mike Williams 5767a08008 Gerbview: select first layer of opened archive 2022-01-24 08:40:49 -05:00
Mike Williams 2dd6b98b89 Gerbview: Load files into new layers 2022-01-24 08:40:49 -05:00
Mike Williams 3c1a6e95d8 Gerbview: Don't show unused layers 2022-01-24 08:40:49 -05:00
Mike Williams 3338745637 Gerbview: auto sort zip files based on X2 or extensions 2022-01-24 08:40:49 -05:00
Mike Williams da2e7e158b Gerbview: Attempt to parse unknown files as gerber/drill
Test parsing function transmogrified from gerbv 2.7.0. gEDA suite is GPL
2+ so should be license compatible with our GPL3.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/1848
2022-01-24 08:40:49 -05:00
Mike Williams 21a8dd6302 Gerbview: Better file extension association when opening zips
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/7855
2022-01-24 08:40:49 -05:00
Mike Williams a9379ecf39 Gerbview: Add ability to sort layers by file extension 2022-01-24 08:40:49 -05:00
Mike Williams d827f06a74 Gerbview: fix borked cleanup of layer remapping
Happened in 4ba3937f8a
2022-01-24 08:40:49 -05:00
Jeff Young 4eac8d7c66 Remove unit-less angles from geometry lib APIs. 2022-01-20 21:10:04 +00:00
Jeff Young 4a05b36bc6 Prefer EDA_ANGLE to naked radians. 2022-01-20 21:10:04 +00:00
Jeff Young 0091c76a6f Excise deci-degrees from UNIT_BINDER.
Fixes https://gitlab.com/kicad/code/kicad/issues/10495
2022-01-19 00:10:32 +00:00
Jeff Young 78385f7ab5 Clean some more tenths-of-degrees out of GerbView. 2022-01-18 02:14:09 +00:00
Jeff Young e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +00:00
Jeff Young 3f98769a77 More EDA_ANGLE.
Includes bug fix for catastrophic error in Add() for converting to
radians.

Includes bug fixes for the fact that the pcbnew test can't seem to
find the ANGLE_* objects (getting all 0's instead).
2022-01-15 01:30:04 +00:00
Seth Hillbrand 22a77d3556 Move EDA_ANGLE to KiMath lib
KiMath should only depend on itself not on other elements in the tree
2022-01-14 17:12:24 -08:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
Jeff Young 8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Marek Roszko ac715d2e51 Scoop up some more wxPoint instances 2022-01-03 20:00:53 -05:00
Simon Richter d25fe17b28 Bump minimum required CMake version to 3.11
Signed-off-by: Marek Roszko <mark.roszko@gmail.com>
2022-01-01 21:35:08 -05:00
Marek Roszko c91d3e3cf9 Remove some more wxPoint 2022-01-01 14:12:20 -05:00