Commit Graph

3813 Commits

Author SHA1 Message Date
jean-pierre charras c1f88b2d9c Gerber P&P file: remove BGA option from TO.CMnt attribute. 2019-11-17 20:34:28 +01:00
Ian McInerney 88e55bbf2d Recursively delete directories in the project tree
Ensure we iterate over all the sub directories and files inside of them
when deleting a directory from the project tree.

Fixes: lp:1852357
* https://bugs.launchpad.net/kicad/+bug/1852357
2019-11-15 00:26:52 +00:00
Jeff Young 04b0feb365 Fix a couple of issues in new Save As command.
Handle symbols as well as strings in the "source" lists of
netlist files.

Handle Protex gerber file extensions.

Check for project_name-whatever pattern for files that we
don't recognize (such as project_name-NPTH-drl_map.ps)
2019-11-11 20:36:48 +00:00
Ian McInerney 122ec64c02 Make build date update whenever build version does
Previously, the build version would only update if the dialog_about.cpp
file were modified. This moves the date generation into the same file
as the build version, so it will be updated whenever a new version
is made.
2019-11-11 18:01:38 +00:00
Jeff Young fd8154d085 Remove comment which is no longer necessary.
We no longer use UTF8 mode on Mac, so wxStrings are now
thread-safe.
2019-11-10 14:52:01 +00:00
jean-pierre charras 4b5d29e253 Remove unused include 2019-11-10 10:23:51 +01:00
jean-pierre charras 4de6ed6206 Fix issues created by Adds Save As... to the Kicad manger.
Mainly replacing std::string by wxString to manage filenames.
On Windows, a sdt::string cannot manage a filename, unless using
in many places TO_UTF8 and FROM_UTF8.
So the best way is to use a wxString for filenames and error messages.
2019-11-10 09:37:39 +01:00
Jeff Young b5904b0401 Installment one of project Save As... feature.
ADD: Adds Save As... to the File menu for the project window.

Fixes: lp:594051
* https://bugs.launchpad.net/kicad/+bug/594051
2019-11-09 20:22:44 +00:00
jean-pierre charras 01553a6bd1 FIX: add parameter to GAL::DrawCurve to control the curve to polyline conversion. Cairo supports curves, but not Opengl, that needs a conversion to polyline. This control allows optimization in conversion 2019-11-09 11:41:29 +01:00
jean-pierre charras 943858fd67 FIX: Bezier curves: replace previous algorithm to convert the curve to segments. In some cases it was not working well. Opengl was using an other algo (using the curve properties to create segments) Now only the OpenGL algo is used, with optimization to reduce the number of segments. 2019-11-09 11:41:29 +01:00
Seth Hillbrand 6625d0721e Implement Get/Set display options
The pointer passing for display options is deprecated.  This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.

In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
2019-11-07 08:26:44 -08:00
Jeff Young 1c153c55c0 Add default units and precision for new dimension objects.
Fixes: lp:1846376
* https://bugs.launchpad.net/kicad/+bug/1846376
2019-11-05 17:22:51 +00:00
Jeff Young 4662205ecb Fix compiler warnings. 2019-11-05 17:22:51 +00:00
Jeff Young 35c8d64f98 Add super- and subscript support to Eeschema.
Note that since the markup might exist for other reasons, it has
to be turned on with a preference setting.  (It goes through a set
of bitflags so the same architecture can be used for other markup
structures that we might want to support in the future.)

Note also that this is more about engineering nomenclature than
visual formatting.  In that respect it's more similar to overbar
than italic or bold.
2019-11-05 17:22:51 +00:00
jean-pierre charras 5f3353cad1 Add native Bezier curve plot in SVG plotter. 2019-11-05 14:27:07 +01:00
jean-pierre charras 51ed01d765 GERBER_PLOTTER: small change in code to manage the current selected aperture.
Avoid using an iterator to store this aperture because iterators can be invalided
when modifying a list.
Enhancements in gerber_placefile_writer.
2019-11-04 14:33:10 +01:00
jean-pierre charras 4a0bd46ed6 More work on Gerber pick and place files
In P&P files, user strings are now quoted, and use UTF8 encoding
2019-11-01 08:34:24 +01:00
Seth Hillbrand 43768b71c0 Unify string lists of forbidden footprint chars
We have forbidden lists maintained in 3 separate locations.  This causes
a bit of confusion as to which is correct.

This makes the list uniform but remains to place the character set in a
single location.
2019-10-29 13:31:11 -07:00
jean-pierre charras bc5dcf182f keepout in footprint: fix some crashes and issues. Create a specific type (PCB_MODULE_ZONE_AREA_T) for zones in footprint. The new class (MODULE_ZONE_CONTAINER) is the same as ZONE_CONTAINER, but the type ID is PCB_MODULE_ZONE_AREA_T instead of PCB_ZONE_AREA_T.
This is mandatory because these zones must be handled differently in many functions.
2019-10-29 11:24:57 +01:00
Ross Schlaikjer 64a42ffa35 Add keepout in footprints: Starting point. 2019-10-29 11:24:30 +01:00
Seth Hillbrand ea1c8525ce Increase visibility of polygon preview
This set the polygon preview item to wider size and adjusts the draw
order to ensure it remains visible even when antialiasing
2019-10-24 16:00:01 -07:00
Seth Hillbrand 8f1c1cf298 pcbnew: Don't limit editing of the polygons
45 deg contraints are not saved per polygon, so don't limit per polygon.
The constraint is only enforced during creation.

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

Fixes: lp:1846029
* https://bugs.launchpad.net/kicad/+bug/1846029
2019-10-20 09:29:42 -07:00
Seth Hillbrand 2e1af66a2b pcbnew: Commit polygon points to new constrained zone
Adds leader points if they are not already existing in the zone

Fixes: lp:1846028
* https://bugs.launchpad.net/kicad/+bug/1846028
2019-10-20 09:29:35 -07:00
jean-pierre charras f892ebbb49 Fix issues in Gerber attributes 2019-10-19 11:26:29 +02:00
jean-pierre charras 47f9c505c5 Gerber plot: better handling of polygonal pad shapes plotting
update GBR_CMP_PNP_METADATA.
2019-10-19 11:26:29 +02:00
jean-pierre charras 36253450e7 Pcbnew: Add experimental place file (P&P) export in Gerber format. 2019-10-19 11:26:28 +02:00
Seth Hillbrand 6084614371 GAL: Use vector for stroke elements
deque structures have higher overhead than vectors.  Not usually
problematic, but with hundreds of thousands of characters each with only
a few strokes, the overhead becomes dominant.
2019-10-18 21:48:58 -07:00
jean-pierre charras 23e09d3de7 some other WXDEBUG replacement 2019-10-14 12:38:52 +02:00
jean-pierre charras 967b9d4a97 Gencad export: fix an issue in hash_eda calculation, that can generate the same hash for 2 different footprints.
Therefore, for some footprints, the right footprint was not associated to the component.
The hash calculation was using a XOR to combine 2 sub hash values.
This is not a strong way to combine these hash values.
They are now added. Looks better to identify similar and different footprints.

Fixes: lp:1847575
https://bugs.launchpad.net/kicad/+bug/1847575
2019-10-10 20:18:48 +02:00
jean-pierre charras c7d636d560 Gerber file generation: fix incorrect aperFunction attribute for graphic items on edge cut layer.
Was NonConductor. Must be Profile.
2019-10-09 15:46:35 +02:00
jean-pierre charras 0a829c328e Python scripting: fix a crash with some pythons scripts calling BOARD::ComputeBoundingBox()
This function calls Pgm(), but when running from a script (not from kicad) Pgm() uses a nullptr reference.
The nullptr reference is now tested in ComputeBoundingBox()
2019-10-05 10:39:33 +02:00
Ian McInerney b33c3a5ad8 pcbnew: Clean up extension handling in graphics plugins
* Fix wildcard display in the file selector dialog (on GTK
  it would show the regex to the user)
* Move the file extension comparison into a common function
2019-10-04 15:43:29 -04:00
Jeff Young d22ea0e201 Safety for frames which don't have an m_viewControls. 2019-10-03 22:23:35 +01:00
Ian McInerney 5862b1559f Cleanup position handling for TOOL_EVENTs
* Make the events generated by the selection of context menu items
  have the position where the menu was opened
* Ensure that TC_COMMAND type events have their position set to
  be the cursor position where the event originated
2019-10-03 19:04:33 +01:00
jean-pierre charras ac2373ae16 Gerber plotter: add support of standard aperture regular polygon as flashed shape.
Standard apertures are circle, rect, oblong and polygon (regular polygonal shapes with 3 to 12 vertices)
The support of the standard aperture type polygon was missing in Gerber plotter.
2019-10-02 17:33:06 +02:00
Jeff Young 58b9d5f69e Map orientation when converting text types.
Also fixes up dangling state when converting.

Fixes: lp:1844716
* https://bugs.launchpad.net/kicad/+bug/1844716
2019-10-01 15:16:43 +01:00
jean-pierre charras 8ed49b3f68 Add a Markdown to Html converted, to display help written in markdown in a wxHtmlWindow.
The help file bridget_tee_formula.md can be displayed in pcb_calculator.
For Help messages, a markdown text (with some basic html tags) is often enough
and is more easy to translate than full html texts.
2019-09-29 17:25:56 +02:00
jean-pierre charras ce62941bb8 Minor fix: fix misplaced include 2019-09-28 13:46:12 +02:00
Jeff Young 4bf2b6a9f7 Performance enhancements for cross-probing.
While found when profiling cross-probing, many of these will also
improve other things.
2019-09-27 19:58:16 +01:00
jean-pierre charras 19cf78f802 simulator: plot curves: fix incorrect draw area limits calculation when zooming.
Fixes: lp:1674132
https://bugs.launchpad.net/kicad/+bug/1674132
2019-09-26 16:29:52 +02:00
Seth Hillbrand 72da23725a pcbnew: Don't copy const structures when not needed
Copying the const pointer on large structures (filled zones) will be
very slow and memory intensive.  This can cause OOM on linux and extreme
slowdowns when the save is triggered.

Fixes: lp:1840168
* https://bugs.launchpad.net/kicad/+bug/1840168
2019-09-24 11:47:21 -07:00
jean-pierre charras a1fe8cfa5a Minor changes: cleanup code and prepare code to add more attributes to Object Attributes (.TO) 2019-09-18 11:48:49 +02:00
Ian McInerney 2b387f4b4d Manually put the UNIT_BINDER text on the primary selection clipboard
The OnKillFocus handler of the UNIT_BINDER replaces the text in the
control with the evaluated string, which removes the selection. To
get the original text on the primary selection clipboard, we must
add it ourselves.

Fixes: lp:1794623
* https://bugs.launchpad.net/kicad/+bug/1794623
2019-09-09 09:00:59 -07:00
Jeff Young 8dd8740fa3 Performance enhancement for pad drawing.
Fixes: lp:1843065
* https://bugs.launchpad.net/kicad/+bug/1843065
2019-09-09 13:45:06 +01:00
Jeff Young a612fb690b Cherry pick of line-ending-safety fix from 5.1.
Fixes: lp:1842943
* https://bugs.launchpad.net/kicad/+bug/1842943
2019-09-07 03:14:03 +01:00
Jeff Young 2553dd2942 Bail on our custom dockart provider.
It appears that it was causing some crashes, and it was never clear
that it looked better anyway.
2019-09-06 23:38:20 +01:00
Jeff Young 10c25a2290 Update frame type enum to match current class names. 2019-09-06 23:38:20 +01:00
Wayne Stambaugh 24454f5105 Pcbnew: fix size of graphics import warning dialog.
Use the HTML_MESSAGE_BOX window to present the warning messages rather
than wxMessageBox which would overflow the display when there were a lot
of graphic items that could not be parsed.

Fixes lp:1839565

https://bugs.launchpad.net/kicad/+bug/1839565
2019-09-06 14:57:04 -04:00
jean-pierre charras bd34348068 Pcbnew: allows using filled polygons in zones with no outline thickness.
This option was only available if advanced config "ForceThickZones" was set.
2019-09-06 16:13:41 +02:00
Seth Hillbrand 90b5cd3032 Unify text edit dialog behavior
This makes the pcbnew multiline text editor natively accept tabs in the
same manner as eeschema and extracts key handling routines to the shim
to allow undo/redo.

Also allows Ctrl-Y under Linux in addition to other platforms.  While
not as popular as Ctrl-Shift-Z, it is utilized for Redo in some contexts
2019-09-05 14:11:02 -07:00