Commit Graph

1045 Commits

Author SHA1 Message Date
Seth Hillbrand a1adc59cb8 Remove all references to old website
The kicad-pcb.org website is no longer valid
2021-10-18 15:47:01 -07:00
jean-pierre charras 7272020cd3 fix use of a non const method in a const method ( from master branch) 2021-09-14 14:33:40 +02:00
jean-pierre charras 16fff71c31 Gerbview: fix incorrect bounding box of lines drawn with a rectangular aperture.
See master, commit 5abe25
2021-09-14 10:50:51 +02:00
jean-pierre charras 8dab9041e4 Gerbview, Excellon reader: use Leading Zeros format when not specified in file.
Some very poor files do not specify the coordinates format.
In this case, the default is INCH,LZ that looks like the more usual.
From master branch, commit b1fd462
2021-08-01 16:08:28 +02:00
jean-pierre charras 6aed98f795 Gerbview, Excellon reader: fix incorrect size of tools when the size is embedded.
From master branch, commit 70b5e26.
2021-08-01 10:26:23 +02:00
Jon Evans fc8ffd8421 Disable Cairo canvas for Mac
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7052
2021-04-02 18:50:21 -04:00
jean-pierre charras 51708bab49 Gerbview, Legacy graphic mode: fix missing or incorrect inits related to zoom.
Fixes #6326
https://gitlab.com/kicad/code/kicad/issues/6326
2020-11-09 10:32:12 +01:00
jean-pierre charras bf71a4e012 Gerbview: fix draw issue when drawing a line using a rectangular aperture.
Lines using a rectangular aperture are not common, but this is legal in Gerber files.

Fixes #5205
https://gitlab.com/kicad/code/kicad/issues/5205
2020-08-18 10:26:10 +02:00
jean-pierre charras 86a710e175 Gerbview: show a message instead of an error when trying to open a job file as plot file.
From master branch, commit ef0ae8
2020-08-06 14:59:29 +02:00
jean-pierre charras 97dea6ede5 Gerbview: Fix a crash Don't try to close an empty polygon on G37 command.
Can happens with malformed Gerber files.
From Master, commit 528ebf8.
2020-05-07 09:55:13 +02:00
jean-pierre charras 263efb41e8 Gerbview: fix incorrect rendering of oval vertical standard aperture with hole.
Fix also incorrect display of dcode size in toolbal: was Y size, X size.
Now is X size, Y size as expected.

From master branch
2020-04-10 16:26:38 +02:00
jean-pierre charras d6312c7b92 Gerbview: add a error message for invalid files missing G74 or G75 commands.
They are mandatory to read arc coordinates.
2020-04-10 13:38:11 +02:00
jean-pierre charras d5c43c4675 Gerber: fix a minor issue in OBLONG standard aperture: - incorrect (too big) bounding box. - HitTest did not test the exact shape. 2020-03-27 16:19:22 +01:00
jean-pierre charras 693aec949c Gerbview: Gerber attributes display: fix incorrect attributes deletion.
The Gerber attribute deletion command (%TD,xxx) always cleared all attributes,
instead of clearing xxx attribute.
Therefore some attributes were not always displayed.

From master branch, commit 7206b567
2020-02-23 10:05:00 +01:00
Ian McInerney 1cbee4c504 gerbview: Add default filename to export to pcbnew function
Some platforms (such as Linux) don't automatically append file
extensions, so we should ensure extensions are correct and the user is
prompted accordingly.

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

(Cherry-picked from 88e0ef548d)
2020-01-26 16:26:03 +00:00
Ian McInerney fcb6f814de Fix macos plist version string generation
Generate these resource files similar to how it is done one Linux.

Fixes mac-builder issue https://gitlab.com/kicad/packaging/kicad-mac-builder/issues/275

(Cherry-picked from 25a302758e)
2020-01-18 01:44:01 +00:00
jean-pierre charras 8c03d1bdde Gerber files: update unicode coding to the 2019 06 Gerber specifications.
In gbr files, not allowed chars are coded using a 16 bit (4 hexa digits)
unicode sequence.
Previously, it was \XXXX and now is \uXXXX escape sequence.

Changes from master branch.
2019-12-27 20:03:01 +01:00
jean-pierre charras bea2d42e8c Gerbview,export to pcbnew: avoid exporting not valid polygons.
Gerber regions are exported as polygons (they are filled polygon).
The fix ensure the polygons are simple and valid.
Invalid polygons crash Pcbnew.

From master branch, commit 25504319.
2019-12-15 14:24:11 +01:00
jean-pierre charras 9cda16220e Gerbview: add parsing of optional Aperture Macro parameter. AMP_CIRCLE primitive has 4 or 5 parameters (last is optional) Reading the optional parameter was missing.
Fixes: lp:1852924
https://bugs.launchpad.net/kicad/+bug/1852924
2019-11-18 09:07:32 +01:00
jean-pierre charras e04d82e940 Gerber plot: minor fixes in TO object attributes.
Gerbview: remove a outdated warning about RS274D format.
2019-11-05 14:25:30 +01:00
jean-pierre charras 3bc3193805 Fix typo 2019-10-15 17:50:40 +02:00
jean-pierre charras ba2e34682e Gerbview: enhancement: show attributes for polygons (Regions in Gerber dialect) that have no DCode
This change is needed to follow current specifications in Gerber X2
2019-10-08 10:25:25 +02:00
jean-pierre charras 078045f73b Gerbview: fix incorrect canvas type saving after closing Gerbview.
Was due to the fact the canvas type was now saved into m_canvasType when opening Gerbview.
2019-10-02 18:30:36 +02:00
Seth Hillbrand 25f6483488 gerbview: Ensure selection lives on top
Just picking the next layer will be overwritten when we have multiple
objects on the same layer in gerbview.  Move the selection to the top to
ensure it is out top-most layer when drawing.

Fixes: lp:1833868
* https://bugs.launchpad.net/kicad/+bug/1833868

(cherry picked from commit 77488e379c)
2019-08-22 10:52:56 -07:00
jean-pierre charras 269f88ee28 Fix incorrect handling of unicode chars (non ASCII7) in filenames in .gbrjob files. 2019-07-14 11:19:03 +02:00
Jeff Young b16d4d18e0 Don't select items on inactive layers in high-contrast mode.
Fixes: lp:1833870
* https://bugs.launchpad.net/kicad/+bug/1833870
2019-06-26 01:18:59 +01:00
Ian McInerney 71f5f96e64 Remove help from F1 key and move it to an action
Create a new action in pcbnew, gerbview and the footprint viewer/
editor to display the help documentation. Disconnect the wxID_HELP
event from the window so that it no longer conflicts with the zoom
action.

Fixes: lp:1822041
* https://bugs.launchpad.net/kicad/+bug/1822041
2019-06-13 14:11:24 -04:00
Steven A. Falco cfa187f477 Show the current grid setting. 2019-06-13 12:14:41 -04:00
Seppe Stas 9233ae97d0 Set KiCad version in MacOS apps
Uses CMake's configure_file function [1] to automaticaly set the
CFBundleShortVersionString [2] value in every app's Info.plist file.

Also updates the CFBundleLongVersionString and CFBundleVersion with the
extended KiCad Version

[1]: https://cmake.org/cmake/help/latest/command/configure_file.html
[2]: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring

(cherry picked from commit 455ee4c08c)
2019-06-12 14:12:01 -07:00
jean-pierre charras 407301a28c Fix issue in cairo_gal when drawing a 360 deg arc (in fact a circle). It was due to a angle normalization between -360 and 360 degrees. So, in arcs, if the start angle and end angle diff is n*360 deg, this normalization gives start angle = end angle. The fix forces end angle = start angle+360deg in this case.
Fixes: lp:1832096
https://bugs.launchpad.net/kicad/+bug/1832096
2019-06-09 11:09:43 +02:00
jean-pierre charras 1113e18c40 Fix incorrect initialization of some menuitems IDs.
Although is is currently working, it is a potential issue.
2019-06-06 08:01:24 +02:00
Jon Evans 5d1dcb4387 GerbView: properly load worksheet visibility at startup 2019-05-25 16:58:10 -04:00
Jon Evans ede2575018 Exclude invisible items from view bounding box for zoom-to-fit
Fixes: lp:1116457
* https://bugs.launchpad.net/kicad/+bug/1116457
2019-05-25 10:44:15 -04:00
Jon Evans b00e20b23f GerbView: fix saving of canvas type and lingering legacy menu item
Fixes: lp:1829647
* https://bugs.launchpad.net/kicad/+bug/1829647
2019-05-19 15:28:27 -04:00
jean-pierre charras e997a7db9a Gerbview: Sync issue between the D Code drop list and the active layer
Fixes: lp:1829234
https://bugs.launchpad.net/kicad/+bug/1829234
2019-05-15 16:28:18 +02:00
Wayne Stambaugh d3c9154f9a Fix frame name capitalization in all about dialogs.
This is a stop gap fix.  It should be possible to use the wxFrame title
string for this but some of the frame windows have appropriated the title
string for configuration file naming purposes which is less than ideal.

Fixes lp:1825977

https://bugs.launchpad.net/kicad/+bug/1825977
(cherry picked from commit 3c4f8c1bf7)
2019-05-13 16:22:52 -04:00
Jeff Young 4dae82054e Increase GervView layers to 51.
This also makes its use of LSET consistent with PCBNew.

Fixes: lp:1809019
* https://bugs.launchpad.net/kicad/+bug/1809019

(cherry picked from commit b7c12b238f)
2019-04-10 21:23:29 +01:00
Michael Kavanagh 7cc3e9a16d Add Ctrl+, hotkey to preferences dialog
Also change interactive router settings from Ctrl+, to Ctrl+Shift+,

(cherry picked from commit b0674b8802)
2019-04-02 13:17:37 -04:00
Michael Kavanagh 9ad352d4bd Fix 'hokey' -> 'hotkey' typo
(cherry picked from commit fe6bc411dd)
2019-04-02 13:17:18 -04:00
Wayne Stambaugh 17fdce01a9 GerbView: remember last open gerber file dialog wildcard.
This is only for the current GerbView session.  When GerbView is closed,
the last open gerber file dialog wildcard setting is lost.

(cherry picked from commit f20a1314ff)
2019-04-01 12:47:45 -04:00
jean-pierre charras e1f64d6283 Kicad and Gerbview: add .nc and .xnc file ext to files seen as drill files. .nc is an other usual Excellon drill file ext, and .xnc will be soon also in use. 2019-03-30 09:32:32 +01:00
jean-pierre charras a00caac789 Gerbview: fix crash when reading a .gbrjob, and when a file given by the .gbrjob is not found. A incorrect gerber image was created, creating crash on exit or when enable the layer view. 2019-03-24 17:40:16 +01:00
Michael de706635cc Add high contrast hotkey to GerbView
Also add all existing hotkeys to menubar.

Fixes: lp:1795388
https://bugs.launchpad.net/kicad/+bug/1795388
2019-03-03 19:25:53 -08:00
Seth Hillbrand c4fe6785ad gerbview: Fix arc filling
Arcs in gerbview should not be filled.

Fixes: lp:1817246
* https://bugs.launchpad.net/kicad/+bug/1817246
2019-02-21 21:26:10 -08:00
Tomasz Włostowski bbee30671a gal: pixel alignment hacks, works for Retina display too now.
gal: pixel alignment for Cairo.
gal: pixel alignment for OpenGL

Cleanup of pixel alignment patches

gal/opengl: more pixel alignment patches:
- works on Retina displays now
- pixel alignment for circles
- correct 1-pixel strokes
- fixed unfinished 1-pixel line ends

GAL: Restore antialiasing options in Cairo
GAL: Fix arc drawing

Removes DrawArcSegment, which drew arcs whose edge was optionally
stroked (a feature that we did not use).  Fixes Cairo arc drawing issue
where arcs were not visible in pcbnew.

gal: further cleanup
gal: removed unused shader parameter
2019-02-16 20:03:13 +01:00
John Beard e6a6266f3d Build: libpolygon provides its own includes
Libpolygon can provide its own includes via target_include_dirs PUBLIC.
This means any linking targets do not need to specifiy them manually.

As common requires polygon, the polygon dep is also now no longer
required downstream of libcommon, as it's transisitvely implied
by libcommon's target_link_libraries.

This resolves a circular dependency previously detected and also
simplifies CMakeLists.
2019-02-04 19:29:31 -08:00
John Beard bb2ae8e13b Bitmaps: move bitmap defs to bitmaps library
The bitmap definitions (BITMAP_DEF and so on) do not
have any dependencies on other libs, including WX. This
means the bitmaps library can be isolated from the other
dependencies.

Common now depends on bitmaps, and libraries that depend
on common can pick it up from the common target_link_libraries,
as it is PUBLIC. This means a lot of targets no longer
need manual bitmap linkage.

This avoids a circular dependency that was previously reported
by static analysis.

Avoiding pulling in WX and other headers into the include
tree of each bitmap .cpp is a huge speed up (around 10x) in
compilation, and the generated static library is also 10x
smaller (20MB vs 200MB)

Add common as a link library to pnsrouter,connectivity.
THese library do still use common code (including bitmaps,
via base_screen.h) and this allows them to pick up the libcommon
includes correctly.
2019-02-04 19:29:31 -08:00
Seth Hillbrand 9d99fd188f Revert "Change top selection drop-down to combobox"
This reverts commit 7d06651a10.
2019-01-28 10:15:32 -08:00
John Beard 658cc8fd96 Wildcards: unify handling of all files wildcards
Use the AddFileExtListToFilter() to also generate the
wildcard for "all files". This is because:

* Users can use AddFileExtListToFilter for the all files WC
  with the same interface as for any other extensions.
* Users do not need to worry about wxGetTranslation, as the
  _() is applied in the same way as the other *Wildcard() helpers,
  and it is a function just like the others, so it is consistent
* There is a testable interface to document the expected result.
  The test is added.
2019-01-09 08:57:42 -05:00
Seth Hillbrand 1e5ba6f1b1 Replace DIM() macro
The standard DIM() macro was not typesafe as it happily deferred errors
to runtime that can be caught at compile time.  Replacing it with a
generic C++11 constexpr allows for typecasting, comparison and compile
time error checking.
2019-01-06 08:43:12 -08:00