Commit Graph

162 Commits

Author SHA1 Message Date
Simon Richter 1502e27695 Remove debug code matching on specific component names 2017-03-03 08:30:48 -05:00
Maciej Suminski a073a90c45 Remove BOARD::SetBoundingBox()
Bounding box should be computed basing on the items belonging to the
board.
2017-03-03 13:28:19 +01:00
Dick Hollenbeck 0c459ced97 EDA_TEXT object refactor.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.

Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.

Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
2017-01-25 08:03:32 -05:00
Wayne Stambaugh 64c892ee23 Make footprint ID into a generic library ID.
Rename FPID to LIB_ID as is now used as a generic library identifier and
is no longer specific to footprints.

Remove all mention of footprint from the new LIB_ID doxygen comments and
code.

Rename files fpid.h and fpid.cpp to lib_id.h and lib_id.cpp.

Rename fp_lib_table.keywords file to lib_table.keywords and adjust CMake
build dependencies accordingly.

Update all source files effected by the code and file name changes.

Update .gitignore for file name changes.
2016-11-20 18:35:08 -05:00
Maciej Suminski 0cc2c87ef8 Removed BOARD::AppendNet()
It is handled by BOARD::Add() now.
2016-09-12 13:45:57 +02:00
Simon Richter bfb6e0bbb2 Convert remaining occurences of stri[n]cmp to str[n]casecmp.
This also reverses the substitution logic if strcasecmp is missing (config.h.cmake)
2016-08-16 10:27:09 +02:00
Mrio Luzeiro d8eab321f7 3D Viewer: complete refactor of the 3D viewer.
* Split and rewrite the preview window and canvas.
* Create a new class for handling the board information.
* Adds new render targets: openGL, legacy, and ray tracing.
* Render targets take full advantage of the new 3D plugins system and 3D cache
  for a fast 3D model loading.
* Faster board loading.
* New OpenGL render is faster than the old one.
* New ray tracing render target with a post processing shader.
* Use of new 3D plugins (WRL, X3D, STEP and IGES) and 3D model caching.
* Preview of 3D model while browsing the file name.
* 3D preview of the footprint while adding / align 3D shapes.
* Render of 3D models according to attributes: Normal, Normal+Insert, Virtual.
* Pivot rotation centered in one point over the PCB board.
* Shortcuts keys improved for XYZ orientation..
* Animated camera.
2016-07-19 13:35:25 -04:00
Wayne Stambaugh 4ed346ea64 Eeschema: initial schematic I/O plugin.
* Factor out PROPERTIES object from the PCB plugin code and move it into
  common so it can be used by both the Pcbnew and Eeschema plugins.

* Add schematic I/O plugin manager for loading and saving schematic and
  component library files.

* Add initial attempt at a parser for current schematic file format.  This
  parser will be infinitely more strict than the current parser which is very
  forgiving in what it parses.

* Make minor changes to the base bitmap class to support the new parser.

* Add find root sheet support to sheet object to allow fetching the root
  sheet from any sheet in the stack.
2016-07-06 05:22:56 -04:00
Simon Richter da5699de0a Replace boost::shared_ptr with std::shared_ptr. 2016-06-29 11:09:55 -04:00
jean-pierre charras 6d1e904334 Code cleanup: Remove outdated decimils to/from iu defines and conversion functions (decimils are no more in use since a long time).
Remove convert_from_iu.h file, only used for one define, and containing brokenand duplicate defines. Only convert_to_biu.h is now used.
2016-06-05 13:49:25 +02:00
Chris Pavlina f9386fcbc0 Add support for PCB and footprint format versioning
Currently, kicad_pcb files have a (version ...) tag, but it is ignored. This
commit does the following:

1. Parse the version. If it's later than the last supported version, present an
alternative error message suggesting an upgrade if the file does not load
correctly. The version will be interpreted as an integer YYYYMMDD to suggest
a KiCad release date.

2. Accept a (version ...) tag also in kicad_mod files, but do not write them
yet. If no version tag is present in these files, assume the version to be that
of the current format version at the time of this commit.

This is meant to be merged to the 4.x stable series, and preps for KiCad 5
which will start emitting version tags also in footprints - users with what
will then be 'old stable' will not get a parse error when we introduce this for
footprints, and we can safely increment the format version later.
2016-05-10 15:07:35 -04:00
Wayne Stambaugh b7c974b2c4 MinGW64 build warning fixes.
* On MinGW64 and possibly other 64-bit platforms, time_t is defined as a long
  long unsigned integer but all of the scanf and printf format specifiers used
  to save and load the schematic files are %lX which is a long unsigned integer
  which causes compile warnings.  Add casts and temporary variables to eliminate
  the compile type warnings.
2016-03-14 14:20:19 -04:00
Chris Pavlina 3fd179cd10 pcbnew: remove dead legacy save code 2016-03-08 15:49:25 -05:00
Chris Pavlina 2ff439b894 Move some old legacy save code into the block for that 2016-01-15 10:34:51 -05:00
jean-pierre charras 21d700facc Replace "module" by "footprint" in a few messages. 2015-11-17 17:18:00 +01:00
jean-pierre charras 4fc230b773 Rework on Enum PAD_SHAPE_T, PAD_DRILL_SHAPE_T and PAD_ATTR_T (see rev 6008) : the new and better names are now used in Kicad code and existing python scripts.
PAD_SHAPE_T  and PAD_ATTR_T still have a double definition (new names and old names) to be sure python scripts are nor broken by the change.
 PAD_DRILL_SHAPE_T does not  have a double definition, because it is unlikely oblong holes are used in python scripts.
Double definitions will be removed in the (next) future.
2015-08-23 21:40:33 +02:00
unknown cc7549a2a5 * Python scripting: brings pad.GetZoneConnection() and in example pad.SetZoneConnection(pcbnew.PAD_ZONE_CONN_FULL) to full workable.
* Cleanup namespace  in enum ZoneConnection in pcbnew/zones.h to self-explained names unification:  PAD_ZONE_CONN_INHERITED, PAD_ZONE_CONN_NONE,PAD_ZONE_CONN_THERMAL,PAD_ZONE_CONN_FULL, PAD_ZONE_CONN_THT_THERMAL
2015-08-18 16:19:17 +02:00
jean-pierre charras cc2fe47c95 Fix a few coverity warnings. 2015-08-16 11:02:19 +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
jean-pierre charras 17d900411f Pcbnew fixes in import plugins: Legacy .brd files: accept pcb texts tracks on non activated copper layers (tracks are removed and texts front on top layer) .
Eagle plugin: if a board has a odd number of copper layers, the converted  board copper layer count is rounded to the next even count (a odd count creates issues in .kicad_pcb files).
2015-07-25 13:16:05 +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
jean-pierre charras 169905d26e Drc dialog: fix some issues, and mainly the fact the progress bar shown during track tests and zone filling can be sent to the background and the dialog can be closed during tests or the board edited during tests.
Add a minor change in dialog_shim only for OSX. (force raising the dialog).
Very minot other fixes: coverity warnings, better message in debug mode in baord outlines calculations.
2015-07-07 19:49:03 +02:00
jean-pierre charras 9c43d6f22b Very minor fixes: 3D viewer: remove artifacts with NPTH pads having the save size as their hole. Kicad: remove duplicate submenu in menubar. remove a minor coverity warning 2015-03-23 09:28:12 +01:00
jean-pierre charras 9004ed8801 Remove a few coverity warnings. Fix some comments which were incorrect, due to the changes in code. Remove not compiled code (kept as comments), now outdated or useless
legacy plugin: better compatibility with old brd files (current track width and current vias size, stored in SETUP section, were not read from file and incorrectly set)
2015-03-13 17:48:42 +01:00
jean-pierre charras 399ab4baa4 Footprint editor: set the default footprint text size to 1 mm. Minor cleaning code. Very minor other fixes. 2015-03-02 16:59:03 +01:00
Wayne Stambaugh 25b9a42ea3 More Coverity scan error fix goodness. 2015-02-28 15:50:35 -05:00
Luis 83d666806c Fix temporary file bug when saving modified footprints. (fixes lp:1384550)
* Use wxRenameFile which falls back to a file copy and file remove when
  wxRename fails.
2014-10-23 16:25:04 -04:00
jean-pierre charras 82339a9235 Fix bug #1358742 (drill map file output faulty), which was Gerber format specific.
Minor code change (which removes a SWIG warning)
2014-10-13 10:40:34 +02:00
Wayne Stambaugh 7c747c1a44 Fix field greater than 2 legacy footprint library file parser bug. (fixes lp:1375419) 2014-10-01 10:13:11 -04:00
Lorenzo Marcantonio 424aac6cf2 TEXTE_MODULE cleanup in preparation for text on different layers
- Removed the friends MODULE and FOOTPRINT_EDIT_FRAME from TEXTE_MODULE
  (as in the @todo comment)

- Refactored the Rotate/Flip/Mirror for text in modules into the
  TEXTE_MODULE class itself (members RotateWithModule, FlipWithModule,
  MirrorWithModule)

- New behaviour in coloring text on screen: reference and value still
  take the color from the MOD_TEXT_FR_VISIBLE and MOD_TEXT_BK_VISIBLE
  visibles; other text takes the color of the layer containing it
  (except when hidden, obviously) but still get its visibility
  controlled by those visibles (probably the most intuitive and useful
  behaviour)

- Still need to decide: should text on a layer be hidden when the layer
  is? Probably yes (still to be implemented);

- Some comment fixed and many cast converted to static_cast
2014-09-10 17:18:42 +02:00
jean-pierre charras cd85ee626b Cosmetic enhancement: change plot icon in menus.
3dviewer: back to double (from float) in class S3D_MASTER for 3 members (m_MatScale, m_MatRotation, m_MatPosition) which are used in dialogs and r/w file functions, which expect double.
Using float create minor but unwanted issues in  r/w file functions.
S3D_MATERIAL: enable all color options: if a 3d shape has bad color parameters, the shape must be modified, not the 3d rendering.
The rendering now matches what we see in other vrml viewer like FreeCAD.
Some minor coding style fixes.
2014-08-09 20:18:04 +02:00
unknown 7a4ea8955e 3D viewer enhancements (better render + better vrml reader) from Mario Luzeiro 2014-07-30 11:01:25 +02:00
Dick Hollenbeck 8627684122 use LSET::any() whereever possible and avoid conversion to integral type 2014-06-25 12:01:50 -05:00
Dick Hollenbeck 8b6c569aef copyright 2014-06-25 09:24:02 -05:00
Dick Hollenbeck b920fa00a5 1) Fix compiles using wx 3.x and 2.8.
2) Fix passing wxString to common/config_params so lookup keys 
   can be dynamically generated.  This gives ~/.kicad files all the colors.
3) Fix LEGACY_PLUGIN so it loads all layer types and masks properly.
4) Extend the table in router/pns_index.h to 128 from 64.
2014-06-24 23:36:02 -05: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 335f5a57e5 Pcbnew: fix an issue with very old .brd files. 2014-06-06 12:30:07 +02:00
Maciej Suminski 2af3e5f6e9 bugfix #1325743: cvpcb crashes when opening any netlist. 2014-06-03 09:32:57 +02:00
Maciej Suminski fa846932c1 bugfix 1325375: pcbnew crash while append a board 2014-06-02 11:41:54 +02:00
Maciej Suminski 3087c05a5d Bugfix #1322914: pcbnew crashes when opening a file 2014-05-25 17:36:24 +02:00
Maciej Suminski 537a97cf52 Ratsnest is computed for legacy boards in GAL view. 2014-05-22 19:34:28 +02:00
Maciej Suminski f31f92e45e Fixes the bug that causes pcbnew crash, when there are multiple net classes and the plot dialog was opened.
Changed NETCLASS* to boost::shared_ptr<NETCLASS>.
2014-05-20 11:29:37 +02:00
Maciej Suminski 4fcaf4c586 Minor BOARD_DESIGN_SETTINGS refactoring.
Removed SetCurrentClassName() (it was not used anywhere and less safe than SetCurrentClass()).
Added BOARD_DESIGN_SETTIGNS::GetDefault() to make some pieces of shorter and clearer.
2014-05-15 10:51:08 +02:00
Maciej Suminski d9eb15c9fa Moved NETCLASSES to BOARD_DESIGN_SETTINGS.
Most of the changes are just adding GetDesignSettings() before every occurence of m_NetClasses.
More complex changes:
class_netclass.cpp - NETCLASS does not store the pointer to the parent BOARD anymore. Added function SetParams( BOARD_DESIGN_SETTINGS& ).
class_netclass.h - Removed GetTrackMinWidth(), GetViaMinDiameter(), GetViaMinDrill(), GetuViaMinDiameter(), GetuViaMinDrill() as they were refering to BOARD_DESIGN_SETTINGS anyway (they are not net class specific).
kicad_plugin.cpp - filters out empty nets (that are anyway not saved) when storing net class information. Previously it was done in NETCLASS::Format() function.
2014-05-13 11:22:51 +02:00
Maciej Suminski cd8aaee160 Moved most of the board design rules related fields & methods to BOARD_DESIGN_SETTINGS class. 2014-05-13 11:22:51 +02:00
Maciej Suminski c3b448b633 Upstream merge. 2014-05-01 15:55:50 +02:00
Lorenzo Marcantonio 3f2c0e1a8d TRACK/SEGVIA cleanup
- SEGVIA becomes VIA
- Drill size moved from TRACK to VIA
- Removed shape from TRACK, becomes ViaType in VIA
- GetTrace becomes GetTrack, for uniformity
- Some minor constification and typo fixes
2014-04-25 08:00:04 +02:00
Maciej Suminski f72aec25c0 Auto zone refilling after using the POINT_EDITOR.
Minor code cleaning.
2014-03-06 11:49:08 +01:00
Maciej Suminski b6e3b3a3f9 Merged selection_tool branch. 2014-03-06 10:43:40 +01:00