Commit Graph

81 Commits

Author SHA1 Message Date
jean-pierre charras 456735f803 VIEW::ViewGetLOD() returns double now instead of int.
ViewGetLOD() returns the minimal value of a zoom to show an item.
However a zoom is a double, and using int as minimal value does not
allows setting a correct value in some cases.
2020-09-21 17:55:24 +02:00
Jeff Young 6c74658a98 Finish arc implementation of m_ThirdPoint for EDGE_MODULEs.
Fixes https://gitlab.com/kicad/code/kicad/issues/5191
2020-08-15 17:32:13 +01:00
Maciej Suminski 89698a727b Removed const modifier for returned non-reference types 2020-07-05 22:44:38 +02:00
Jeff Young d3f017d825 DRC rules parser and engine.
Fixes https://gitlab.com/kicad/code/kicad/issues/2182

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/1965
2020-05-16 15:53:05 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jeff Young 7f1b409305 Remove dead legacy print code. 2020-04-20 17:03:38 +01:00
Jeff Young 3b97993daf Another attempt to fix offset issues when pasting board items to ModEdit.
Fixes https://gitlab.com/kicad/code/kicad/issues/4032
2020-03-16 18:45:55 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Jeff Young 37af3adffb Add preference for flip axis.
Fixes: lp:1836267
* https://bugs.launchpad.net/kicad/+bug/1836267
2019-07-14 10:36:48 +01:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
jean-pierre charras 4cac974420 Add Bezier curve (S_CURVE shape) support in DIALOG_GRAPHIC_ITEM_PROPERTIES.
Fix some issues related to S_CURVE shape support.
2018-07-22 18:39:48 +02:00
jean-pierre charras 72d1597201 DXF import: add import of DXF splines that are converted to Bezier curves.
Fix also a lot of bugs related to Bezier curves (S_CURVE shape in DRAW_SEGMENT class) in Pcbnew code.
Add missing code to handle these Bezier curves
2018-07-22 18:39:47 +02:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
Andrzej Wolski 4c19606eb7 Fix pads and footprints rendering switches behavior
Pads and footprints rendering switches in Render tab were working incorrectly, as described in bug report:
https://bugs.launchpad.net/kicad/+bug/1743890

This patch fixes it and makes GAL behave as the legacy canvas.

Fixes: lp:1743890
2018-02-21 13:44:52 -05:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h

Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.

This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.

The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.

Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
Simon Richter ad088db6d2 Add more "override" markers. 2016-09-25 13:59:41 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
Maciej Suminski 2c08ff1d59 Switched to default copy ctor and/or operator= for BOARD, BOARD_CONNECTED_ITEM, DRAWSEGMENT & EDGE_MODULE. 2016-09-12 11:50:06 +02:00
jean-pierre charras 5658ed9c8e Prepare rounded rect and custom shaped pads: add plot functions. It fixes also a pcbnew crash in HPGL mode when plotting trapezoidal pads. 2016-02-10 17:02:40 +01:00
jean-pierre charras 75d02086ad Modedit: fix a minor bug in footprint transform (polygons not mirrored or rotated in global footprint transform).
Code cleaning: in class EDGE_MODULE and TEXTE_MODULE, remove duplicate methods for  fp edition (about rotation, mirroring and move) and add comments.
2015-07-31 21:04:30 +02:00
John Beard 873e0740e8 Fix bug in footrpint editor when creating circular arrays. (fixes lp:1424331) 2015-02-28 12:39:05 -05:00
jean-pierre charras 70a61b8028 Pcbnew: fix Bug #1373267 (polygons in footprint outlines do not flip correctly)
Minor other fixes.
2014-09-24 18:42:56 +02:00
Maciej Suminski 953f71df3e Move() method updates local coordinates in EDGE_MODULE, D_PAD and TEXTE_MODULE classes. 2014-07-09 11:59:24 +02:00
jean-pierre charras 52d2e7eb59 Fix a bug in ClassOf which crashes Pcbnew when its argument is NULL. It fixes bug #1329364. 2014-06-12 22:03:57 +02:00
Tomasz Wlostowski 4121c27269 Clang-alike lightweight RTTI for pcbnew + type casting cleanup. 2014-06-06 11:44:21 +02:00
Lorenzo Marcantonio 7b4b3297db - Better way to iterate on vias in the track list (GetFirstVia)
- Converted the Next/Prev C casts to static casts and removed the type
  unsafe ones
- Splitted as virtual the VIA::Flip member instead of using RTTI
- Heavily refactored the 'unconnected track' cleanup routine
- Misc constification
2014-04-30 21:16:22 +02:00
Wayne Stambaugh abe9801d3d Pcbnew: fix graphic item undo/redo bug. (--fixes lp:1252264)
* Use std::swap for PCB_LINE_T items in SwapData().
* Use std::swap for PCB_MODULE_EDGE_T items in SwapData().
* Add assignment operator to EDGE_MODULE object.
* Move code from copy method to assignment operator.
* Minor coding policy fixes.
2013-11-19 13:58:12 -05:00
Lorenzo Marcantonio af5a9a8de9 Removed Show code from BOARD_ITEM derived classes (as requested by Dick) 2013-05-05 12:23:18 +02:00
jean-pierre charras 4ac7dd5845 3D viewer: Modify yhe way board items shapes are built:
* All items shapes  are converted to polygons.
* Polygons are merged layer by layer (for calculation time reasons,zones are not merged)
* for copper layers, vias and pads holes are substracted from polygons (but, for calculation time reasons,  not inside zones areas).
* the look is better, mainly when displaying the copper thickness
* solder and paste layers are now shown in 3D viewer.
* the code was seriously cleaned (but still needs to be enhanced).
* Note this is a work in progress which needs refinements.
2013-05-01 21:01:14 +02:00
Wayne Stambaugh f8a56d446f Base object decoupling improvements.
* Improve MSG_PANEL_ITEM to handle message panel information.
* Create containers for passing message panel items between objects and
  the message panel.
* Rename EDA_ITEM::DisplayInfo to EDA_ITEM::GetMsgPanelInfo.
* Remove all direct manipulation of EDA_DRAW_FRAME from all objects derived
  from EDA_ITEM.
2013-01-12 12:32:24 -05:00
Lorenzo Marcantonio 082d901d60 Encapsulated drawmode as an enum for type checking 2012-09-01 15:38:27 +02:00
Dick Hollenbeck 69905af749 EAGLE_PLUGIN now positions text correct for most cases 2012-05-30 16:40:32 -05:00
Wayne Stambaugh d8b60a14e1 Pcbnew s-expression file format improvements.
* Move board item object Format() functions into PCB_IO object.
* Change file format to use layer names instead of numbers.
* Change file extension to kicad_pcb.
2012-04-22 11:16:39 -04:00
Dick Hollenbeck 3341669fc6 more footprint support for LEGACY_PLUGIN 2012-04-16 20:35:43 -05:00
Wayne Stambaugh d7feb9ab45 Initial Pcbnew s-expression file format commit.
* Add s-expression Format() function to all objects derived from
  BOARD_ITEM.
* Add s-expression Format() function to base objects as required.
* Add functions to convert coordinates from base internal units
  (nanometers) to millimeter string for writing to s-expression
  file.
* Add temporary dummy conversion functions to prevent link errors
  until schematic and board object and action code can be separated
  into DSO/DLL.
* Add CMake build option to build Pcbnew with nanometer internal
  units.
2012-04-01 16:51:56 -04:00
Wayne Stambaugh 45445dd88f Minor code improvements and coding policy fixes.
* BLOCK_SELECTOR class is not longer derived from EDA_ITEM.
* Encapsulate BLOCK_SELECTOR class member variables and add access methods.
* Move HandleBlockBegin() function from block_commande.cpp to drawframe.cpp.
* Remove virtual methods from top level derived objects per future
  coding policy change.
* Remove Doxygen copydoc statement from objects derived from EDA_ITEM
  since the comments are automatically copied to the derived object.
* Removed copy and pasted Doxygen comments from objects derived from
  EDA_ITEM.
2012-03-26 19:47:08 -04:00
Wayne Stambaugh 058e17edf7 Minor code and Doxygen comment improvements.
* Remove double Clone() function calls from all classes derived from
  EDA_ITEM.
* Lots of Doxygen comment warning fixes.
2012-03-17 10:39:27 -04:00
Dick Hollenbeck b8a0ab4c52 switch to <> for includes from "" per conversation with Jean-Pierre and Wayne, adjust search paths 2012-01-22 22:33:36 -06:00
Wayne Stambaugh 5289c22087 Pcbnew object improvements.
* Remove unnecessary copy constructors from board and module library
  objects.
* Add doClone() method to board and library objects.
* Add comment to class definitions where the default copy constructor
  generated by the compiler was adequate.
* Replace copy method with clone method where applicable.
* Remove DuplicateStruct() function.
* Remove track object copy function.
2012-01-14 14:50:32 -05:00
Dick Hollenbeck 463c17b807 fix EDA_ITEM::Show() prototype bug, fix KICAD_PLUGIN::Save() problem with netclasses. 2011-12-14 11:25:42 -06:00
Dick Hollenbeck 96bb90dee1 kicad_plugin 2011-12-13 22:29:25 -06:00
Dick Hollenbeck 343e55b09a First working copy of KICAD_PLUGIN::Load() 2011-12-02 15:56:47 -06:00
Dick Hollenbeck 1b5edd6d4c KICAD_PLUG work 2011-12-01 16:50:41 -06:00
Wayne Stambaugh edd35b4e90 PCB common library header rationalization.
* All header files used to create the PCB common library now compile as
  stand alone code.  This prevents the need to define them in a specific
  order to make source code compile properly.  It should also now be
  possible to relocate the source code to build the common PCB library
  to a separate folder.
2011-09-23 09:57:12 -04:00
Wayne Stambaugh 4230ac4ca7 Remove sine and cosine look up tables and other minor fixes.
* Remove sine and cosine look up tables from trigo.cpp and replace them with
  sin() and cos() math functions.
* Large include file clean up to prevent header ordering dependency build
  failures.
* Translate French code names and comments.
* Lots of coding style policy and doxygen comment fixes.
2011-09-20 09:57:40 -04:00
Wayne Stambaugh 4c858cbb0b 3D viewer coding style policy fixes. 2011-09-17 11:31:21 -04:00
Dick Hollenbeck 45c5e594b6 zwischen punkt for migration to PNG bitmaps 2011-08-28 22:04:59 -05:00
Marco Mattila 1a97b31d9a Combine DRAWSEGMENT and EDGE_MOD code in pcbnew. 2011-08-09 02:50:55 +03:00
Wayne Stambaugh f60c982397 Refactor PCBNew selection clarification menu icon code.
* Move clarification menu icon code from base board item object to the appropriate
  object.
* Remove left over French comments.
* Coding policy fixes.
2011-08-01 11:29:27 -04:00
Wayne Stambaugh 2fb2ab0d37 Refactor PCBNew selection clarification menu text code.
* Move menu text code from base board item object to the appropriate
  object.
* Add helper to get board layer to base board item object.
2011-07-14 11:42:44 -04:00