Commit Graph

198 Commits

Author SHA1 Message Date
jean-pierre charras 9f1e154753 Update Clipper to 6.4.2 2017-03-01 14:55:21 +01:00
Maciej Suminski 799c8b6922 Fixed a shadowed variable warning in clipper 2017-02-27 10:42:32 +01:00
jean-pierre charras 11dcb76fc9 Add -Wshadow compil option, if exists to warn about shadowed variables.
Swig auto generated .cxx file has a lot of shadowed variables, so this option cannot be used to compil all files.
2017-02-23 13:17:23 +01:00
Simon Richter 04e21d5c8f Remove check for undefined behaviour
Triangle::NeighborAcross returns a reference, which must refer to a valid
object whose address cannot be 0. Thus, this test is nonsensical.
2016-09-29 18:26:19 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
Tomasz Wlostowski 91a3b3d396 fixed polygon filleting glitch for colinear outline segments 2016-08-05 11:44:36 +02:00
jean-pierre charras 146a78a8fb Very minor fixes: Uncrustify a few files and rename a shadowed var. 2016-07-22 08:59:17 +02:00
Dick Hollenbeck e24990146d Pcbnew: major swig fix.
* Switched hashtables.h over to std::undordered_map from boost version.

* Added new macros DECL_VEC_FOR_SWIG() and DECL_MAP_FOR_SWIG() in macros.h.
  These along with future DECL_HASH_FOR_SWIG() unify the declaration to swig
  and C++ so that the resultant type name is common in both languages, and
  the types AGREE.

* Fixed swigging of NETINFO_ITEM and NETINFO_LIST via magic.

* Newly exposed (python wrapped) are: D_PADS, TRACKS (was TRACK_PTRS),
  NETNAME_MAP, NETCODE_MAP, wxString (without constructor purposely, read
  comment in wx.i), MARKERS, ZONE_CONTAINERS, NETCLASSPTR, KICAD_T types.

* std::vector<SOMETHING*> tends to end up named SOMETHINGS in C++ and python.
  Having the name consistent between like types is helpful, and between
  languages.  std::map<> ends up as SOMETHING_MAP.

* NETINFO_LIST::m_netNames and NETINFO_LIST::m_netCodes are now std::map
  instead of hashtables, because swig does not yet support std::unordered_map.

* You can now get to any netclass or net info.   NETNAMES_MAP and NETCODES_MAP
  are traversable basically the same as a python dictionary using a python
  string (not wsString) as the key!  The wxString typemap converts python
  string to wxString before the lookup happens.  Iteration also works.
2016-07-18 13:23:09 -04:00
Jon Neal 1293d04a7a Fix a bunch of misspellings of length. 2016-07-10 23:09:18 -04:00
jean-pierre charras 58ddb0fd37 PolyLine.cpp: NormalizeAreaOutlines now removes null segments.
* CPolyLine::Chamfer (and CPolyLine::Fillet) :  removes null segments before calculating modified outlines.
  It fixes some incorrect outlines after chamfer or fillet due to null segments creating overflow during calculations.
* CPolyLine::Chamfer : code cleaning (avoid useless double to integer and integer to double conversions).
2016-06-26 16:39:15 +02:00
Maciej Suminski 71aade6b51 Fixed a few warnings (mostly gcc6 -Wmisleading-indent). 2016-06-07 14:42:42 +02:00
Simon Richter 96ec9db5d6 Add missing C++ stdlib headers
The GCC standard library headers often include other headers, which makes
some code compile that forgets to include several headers.
2016-05-28 12:46:29 -04:00
jean-pierre charras bbe42d0f47 Fix very minor issues: compil warnings (mainly deprecated and shadowed vars warnings). 2016-05-22 19:39:20 +02:00
jean-pierre charras 178cf0dc25 Polygon calculation (zones filling): use fast mode when possible (in fact most of time) and strictly simple polygon option only in critical cases (in fact in plot Gerber functions mainly).
In polygon calculations (combining polygons, fracture) the mode of calculation (fast or strictly simple polygon option) as no more a default value, because choosing the best mode is better to optimize the calculation time.
2015-12-15 21:21:25 +01:00
Cirilo Bernardo 2128594a85 Coding policy fixes: remove trailing white space. 2015-12-14 16:20:54 -05:00
jean-pierre charras ab7350bf2d Better fix for issue fixed in rev 6350 2015-12-07 14:51:46 +01:00
jean-pierre charras fefa8d16f0 math_for_graphics.cpp: use abs() instead of std::abs() for integer values, to avoid errors with some compilers. 2015-12-07 11:01:33 +01:00
jean-pierre charras c80d92e927 Kicad manager: fix a potential bug which could crash Kicad manager. math_for_graphics.cpp: remove useless includes. 2015-12-07 10:24:31 +01:00
jean-pierre charras 34f1c0ea2d Fix a few Coverity warnings. 2015-11-11 19:47:51 +01:00
jean-pierre charras 602e38dab5 Clipper.cpp: fix a few minor Coverity warnings (about not initialized private members) 2015-11-03 17:55:31 +01:00
jean-pierre charras 01be350851 Update clipper library version (from 6.21) to the latest (currently 6.4.0 , 2 July 2015) which fixes some bugs. 2015-11-02 13:45:33 +01:00
jean-pierre charras f67c7fe052 Very minor changes. ( changes in clipper are made to avoid coverity minor warnings). 2015-08-25 16:47:09 +02:00
Jean-Pierre Charras fb8afc61ab Fix selfintersecting or outline intersecting holes issue. 2015-07-27 21:48:38 +02:00
Tomasz Wlostowski 63b35f40a7 Removed all dependencies on boost::polygon except for bitmap2component. Replaced almost all instances of CPOLYGONS_LIST with SHAPE_POLY_SET. 2015-07-27 21:45:57 +02:00
Maciej Suminski d2ebf688f9 Reverted commits that remove boost::polygon dependency (need more testing). 2015-07-14 22:23:13 +02:00
Tomasz Wlostowski 41c753b05d Removed all dependencies on boost::polygon except for bitmap2component. Replaced almost all instances of CPOLYGONS_LIST with SHAPE_POLY_SET. 2015-07-14 13:36:24 +02:00
Chris Pavlina 3af895e285 Replace abs() with std::abs(). 2015-06-26 19:21:09 -04:00
jean-pierre charras fc4352f082 PolyLine.h, Polyline.cpp: a bit of cleaning code: add comments in header, remove duplicate (and not used) method. 2015-06-03 12:35:21 +02:00
jean-pierre charras ba37f33bbb Pcbnew: Use a better (i.e. more suitable to calculate clearance areas) algorithm to inflate/deflate zones outlines. It fixes bug#1459734.
Previously, acute angles (especially small angles)  in zone outlines create incorrect shapes and sometimes strange shapes for clearance areas, when using generic algorithms.
This happens when zones outlines have "spikes", but not usually for smooth outlines.
2015-05-30 14:02:55 +02:00
jean-pierre charras 3c4f76abe4 Fix a not shown dialog under XFCE and Unity. Make display hotkeys window not modal. 2015-03-15 12:41:06 +01:00
jean-pierre charras d6c6b4debb Fix some coverity warnings (mainly not initialized vars). 2015-02-27 15:33:13 +01:00
jean-pierre charras 64925bfc4f Very minor fixes: add missing const return type to some GetBoundingBox() declarations. Change few functions names to better names in some places (like GetName() to GetPinName() ) 2015-01-18 18:28:14 +01:00
jean-pierre charras bb7a74f58f Pcbnew: fix Bug #1404191 (Zone filling fails when a zone inside having the same net and a highter priority exists, which is allowed to manage different fill parameters ) 2014-12-19 20:09:53 +01:00
jean-pierre charras 25a801ed8a Modify usage of Inflate/deflate polygon in zone calculations, in order to be compatible with boost::polygon >= 1.56
Some code cleanup.
2014-11-30 18:07:02 +01:00
jean-pierre charras 8da93abcb8 Polygon tools: update Clipper lib to 6.2.1
Minor doc update.
2014-11-12 18:58:39 +01:00
jean-pierre charras 6a93777a51 Polyline.h: remove useless class CRect. Use the more powerful EDA_RECT instead. Clean and remove duplicate code. 2014-11-08 13:25:29 +01:00
jean-pierre charras 24f516f6ae Fix many doxygen warnings (due to missing info, old comments, typo ...) when building the doxygen doc. 2014-11-02 17:25:04 +01:00
jean-pierre charras 29e6a93d01 Add license information to PolyLine.h and PolyLine.cpp files. 2014-10-29 13:18:02 +01:00
Wayne Stambaugh f86eb756af Source license, coding policy, and documentation fixes.
* Add more missing source code licenses.
* Fix coding policy violations (tabs and trailing white space) in Python
  scripting code.
* Add stable release policy to full documentation build.
2014-10-28 15:43:12 -04:00
jean-pierre charras d4731da097 Minor fixes: remove compil warning. Remove one of 3 messages when saving a part lib in libedit.
Update clipper version to 6.1.3a.
2014-09-29 12:51:04 +02:00
unknown c8d69f19c8 Pcbnew: add drc test for texts on copper layer (only in full drc test, not in on line drc), from a patch sent by Simon Schumann
Add EDA_TEXT::TransformTextShapeToSegmentList function to export a list of segments used to draw/plot the text.
2014-08-13 17:47:02 +02:00
Dick Hollenbeck 4578ea8b9e 1) Add 32 Cu Layers.
2) Change from legacy Cu stack to counting down from top=(F_Cu or 0).
   The old Cu stack required knowing the count of Cu layers to make
   sense of the layer number when converting to many exported file types.
   The new Cu stack is more commonly used, although ours still gives
   B_Cu a fixed number.
3) Introduce class LSET and enum LAYER_ID.
4) Change *.kicad_pcb file format version to 4 from 3.
5) Change fixed names Inner1_Cu-Inner14_Cu to In1_Cu-In30_Cu and their
   meanings are typically flipped.
6) Moved the #define LAYER_N_* stuff into legacy_plugin.cpp where they
   can die a quiet death, and switch to enum LAYER_ID symbols throughout.
7) Removed the LEGACY_PLUGIN::Save() and FootprintSave() functions.
   You will need to convert to the format immediately, *.kicad_pcb and
   *.kicad_mod (=pretty) since legacy format was never going to know
   about 32 Cu layers and additional technical layers and the reversed Cu
   stack.
2014-06-24 11:17:18 -05:00
jean-pierre charras afc5d13172 Apply a workaround in 3D_draw.cpp to avoid crash in boost::polygon (try to fix Bug #1322804)
This workaround was already used (bzr 4301, in file plot_board_layers.cpp) also to avoid similar crashes (uses 18 segments instead of 16 to approximate a circle by segments).
Minor code cleanup in dialog_plot.
2014-05-26 08:54:04 +02:00
Lorenzo Marcantonio 342016b692 Constification of HitTest and GetParent
In particular HitTest for zones *do not* select the nearest vertex/edge as a side effect
2014-05-04 19:08:36 +02:00
Marco Serantoni 932c92af55 [MacOSX] New reorg for building system, typos and path refines 2014-02-19 22:39:21 +01:00
jean-pierre charras fe919cd456 Update demos. Fix pspice netlist issues when using ( and ) in net names ( parenthesis are replaced by underscore) . 2014-01-07 20:42:34 +01:00
Dick Hollenbeck 84cf722541 This is why we cannot have nice things. This is why we test our changes before committing.
Pray for angus johnson who is support too many languages, and needs to find a text editor that removes trailing whitespace.
2014-01-03 18:46:06 -06:00
Dick Hollenbeck dbb72d161e fix some compiler warnings 2014-01-03 18:07:20 -06:00
Dick Hollenbeck e659d53590 fix compiler warnings 2014-01-03 17:16:40 -06:00
jean-pierre charras eb22bf426c Pcbnew: very minor fixes and update: update clipper version. uncrustify polytri/* and fix some warning compil. 2014-01-03 18:39:28 +01:00