Commit Graph

4917 Commits

Author SHA1 Message Date
Lorenzo Marcantonio 5399b6f438 More int casts to rounding conversions 2013-05-04 13:57:09 +02:00
jean-pierre charras 41b6c8434a All: use CPOLYGONS_LIST, a typedef of std::vector<CPolyPt> to handle a Corners Polygons List.
This is a starting point of some code enhancements relative to polygons in Pcbew and 3D viewer.
2013-05-03 19:51:10 +02:00
Felix Morgner 3031b9e6a5 Fixes implementation of MacOpenFile( const wxString& ) in KiCad.
Adds "kicad_pcb" to the list of file-extensions for PCBnew in its Info.plist 
to make Launch Services recognize the file associations.

Change 8 bit string to UTF8 so fancy mew in "um" can be shown.
2013-05-02 23:04:30 -05:00
Lorenzo Marcantonio 0d5331df59 Fixed bad computation in eeschema/transform (my fault)
Note: ArcTangente gives a double but *takes* ints, so it's not good to
use for nontrivial things
2013-05-02 22:53:12 +02:00
jean-pierre charras bca75d4930 Fix compil issue in Debug mode. 2013-05-02 20:42:08 +02:00
Lorenzo Marcantonio a70965eb6d Moved utilities for angles in trigo.h
New conversion routines and sin/cos implementation for angles in decidegrees
2013-05-02 20:06:58 +02:00
Dick Hollenbeck ad21bfda4d fix compiler warnings 2013-05-02 09:12:55 -05:00
jean-pierre charras fef46ffacf 3D viewer: Modify the 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-02 07:56:22 +02:00
jean-pierre charras f803745fc6 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
Lorenzo Marcantonio c36ab1c6ed Angle and distances cleanup (preparing for angles in doubles)
- Removed spurious int casts (these are truncated anyway and will break
  doubles)

- Applied the Distance, GetLineLength, EuclideanNorm, DEG2RAD, RAD2DEG
  ArcTangente and NORMALIZE* functions where possible

- ArcTangente now returns double and handles the 0,0 case like atan2, so
  it's no longer necessary to check for it before calling

- Small functions in trigo moved as inline
2013-05-01 19:32:36 +02:00
Dick Hollenbeck 28f9d7f28f remove temporary debug printf()s I no longer need. 2013-05-01 10:49:34 -05:00
Dick Hollenbeck 5b225186c4 fix 2 corner case bugs in specctra import 2013-05-01 10:48:00 -05:00
Dick Hollenbeck 09bb2a6054 pass round boards to freerouter via specctra_export 2013-05-01 08:36:26 -05:00
Dick Hollenbeck e1ea1237b7 fix goofy text messages, period after newline 2013-04-30 14:51:33 -05:00
Dick Hollenbeck ff439ecd7f wxString::Format() fix 2013-04-30 10:52:18 -05:00
Dr. Thomas Spindler 4cc4df87ff specctra_export supports interior polygons and circles on the Edge.Cuts layer.
Interior regions on Edge.Cuts are out as keepouts for specctra DSN file
and downstream routers.  Point to point matching during polygon assembly
can have individual thresholds, one for board edge and another for interior polygons.
This is more forgiving for sloppy graphical mousers, or those that work without
grid snap on.  Currently the threshold for board edge is at zero, meaning the
board edge has to be precisely defined as a polygon, just as before.  But it
is easily tunable for experimentation.
2013-04-30 10:25:41 -05:00
Lorenzo Marcantonio 4b624381e0 Added include guard to math_for_graphics.h 2013-04-30 15:27:08 +02:00
Wayne Stambaugh c5508f34b3 Pcbnew bug and warning fixes.
* Fixed a bug in PCB_EDIT_FRAME::loadFootprints when no footprint libraries
  are found when attempting to load footprints.
* Add a warning to PCB_EDIT_FRAME::loadFootprints to inform the user when
  a footprint library file cannot be found in any of the standard library
  search paths.
* Changed FOOTPRINT_INFO::m_padCount to unsigned to prevent signed/unsigned
  comparison compiler warnings.
* Put NestedSpace() function in netlist_reader.cpp inside conditional debug
  build statement to prevent warning in release builds.
2013-04-29 17:00:24 -04:00
Felix Morgner 3c667d7652 merge with upstream 2013-04-29 12:56:12 -04:00
Felix Morgner 4664427784 * Set "Ctrl+Shift+S" as shortcut for "Save as..." in CvPcb and PCBnew.
This seems to me like the defacto standard for this menu command.
* Added a default filename for save as. Currently it's set to
  "Unnamed file" using _() so its translatable.
* Changed the save dialog in PCBnew to use the path of the "original"
  file as a base for the new file.
2013-04-29 12:50:10 -04:00
Dick Hollenbeck c747ffef95 fix compiler warnings, comments, debug crash, and conceptual issues in specctra 2013-04-29 11:35:07 -05:00
Felix Morgner b5b1777304 merge with upstream 2013-04-28 18:47:58 -04:00
Wayne Stambaugh 228004b472 More post Pcbnew NETLIST_READER change clean up.
* Fix both legacy and s-expression netlist readers when footprints are
  assigned in the netlist.
* Add some helper functions to NETLIST for detecting when footprints are set
  or not set and when they have been changed while loading the .cmp file.
* Rename a few functions to improve their readability.
2013-04-28 16:20:40 -04:00
Lorenzo Marcantonio a1f91c08ad Converted macros to inline template function 2013-04-28 17:43:26 +02:00
Lorenzo Marcantonio 96dc27d9e6 Removed the SAFE_DELETE macro.
In most case the assignment to null was not necessary since it was easily provable that the (local) variable wouldn't have referenced after that anyway.
2013-04-28 16:28:13 +02:00
Lorenzo Marcantonio 11f9f15199 Message fix: SMD is an acronym, should be upper case 2013-04-28 15:34:59 +02:00
jean-pierre charras 991a92429e Pcbbnew: fix bug Bug #1172892 (bad drill map file names, when a point is used inside a board file name) 2013-04-28 11:10:54 +02:00
Felix Morgner 4f17dc0716 merge with upstream 2013-04-27 17:58:38 -04:00
Dick Hollenbeck 37c7fa9fb4 Fix SVG plot with filename containing & character. 2013-04-26 21:12:57 -05:00
Felix Morgner fd2f700390 merge with upstream 2013-04-26 11:24:44 -04:00
Wayne Stambaugh 97255b2b7f Post Pcbnew NETLIST_READER change clean up.
* Tweak the NETLIST_READER code to allow for component footprint names that
  are not found in any library to generate a warning instead of an error and
  update the board accordingly.
* Don't display undo warning in netlist dialog when dry run option selected.
* Rename netlist_reader_common.cpp to netlist_reader.cpp
* Rename netlist_reader_firstformat.cpp to legacy_netlist_reader.cpp
* Rename netlist_reader_kicad.cpp to kicad_netlist_reader.cpp
* Remove cvpcb/read_write_cmpfile.cpp and move the single function it
  contained into cvframe.cpp
* Remove cvpcb/loadcmp.cpp and move the single function it contained into
  class_DisplayFootprintsFrame.cpp.
* Remove cvpcb/readschematicnetlist.cpp and move the single function it
  contained into cvframe.cpp.
* Remove cvpcb/setvisu.cpp and move the few functions it contained into
  the appropriate source file.
2013-04-26 11:11:52 -04:00
Felix Morgner 8d32141b8f resaved some files as UTF-8 to silence clangs warnings about illegal character encodings. 2013-04-25 18:31:14 -04:00
Felix Morgner 7700779e2c made changes compliant to style guide. 2013-04-25 13:27:43 -04:00
Felix Morgner 1cc9d2ce5a merge with upstream 2013-04-25 13:22:52 -04:00
Wayne Stambaugh 324c39931c Pcbnew NETLIST_READER improvements.
* Create separate NETLIST object to hold contents of netlist files.
* Read entire netlist and footprint link files before making applying
  changes to board.
* Add BOARD::ReplaceNetlist() function to eliminate the calls between the
  NETLIST_READER, PCB_EDIT_FRAME, and BOARD objects.
* Change placement of new components below the center of the current board
  or in the center of the page if the BOARD is empty.
* Add dry run option to netlist dialog to print changes to message control
  without making changes.
* Add button to netlist dialog to allow saving contents of message control
  to a file.
* Eliminate the need to compile netlist_reader_*.cpp in both CvPcb and Pcbnew.
* Add netlist_reader_*.cpp to the pcbcommon library.
* Remove redundant load component link file code from CvPcb.
* Modify CvPcb new to work with the new NETLIST_READER object.
* Add compare() function and < and == operators to FPID object.
* Add REPORTER class to hide an underlying string writing implementation for
  use in low level objects.  Thank you Dick for the idea.
* Lots of minor coding policy, Doxygen comment, and missing license fixes.
2013-04-25 12:29:35 -04:00
Dick Hollenbeck 113325673f pcb_parser failed on (fill yes (arc_segments 16) (thermal_gap 1.99898) (thermal_bridge_width 1.99898))
See http://tech.groups.yahoo.com/group/kicad-users/message/15105
2013-04-25 07:25:47 -05:00
jean-pierre charras 6a429facb6 Pcbnew, dialog SVG export: Fix Pcbnew crash when opening the dialog. 2013-04-25 09:05:33 +02:00
Felix Morgner ec83adde3f Updated the pcbnew Info.plist to associate .kicad_pcb files with pcbnew. 2013-04-22 12:20:34 -04:00
Felix Morgner eed2bed0bd changed implementation of MacOpenFile to make it open files when they are double clicked in Finder. 2013-04-21 20:31:09 -04:00
Wayne Stambaugh 49045cf08c Fix KiCad crash when no template is selected on new project from template. (fixes lp:1170973) 2013-04-21 15:44:57 -04:00
jean-pierre charras 4b42ec3218 Pcbnew: fix bug in pcb_parser: incorrect pad local solder paste margin ratio value read when not 0. ( This also fixes bug 1170535 ) 2013-04-19 09:14:27 +02:00
Matthew Beckler e469d9d1f9 Fixes to scripting after refactoring & interface cleanups, 2013-04-18 23:23:11 +02:00
Miguel Angel Ajo d53d9d88fb Support to enable color from PLOT_CONTROLLER into plotters that start in B/W 2013-04-18 23:21:26 +02:00
Dick Hollenbeck ed484deec6 hide pageFmts[] since it is no longer NULL terminated and not global 2013-04-18 13:54:03 -05:00
Dick Hollenbeck df9502dd06 fix some compiler warnings 2013-04-18 12:03:47 -05:00
Dick Hollenbeck 6001254160 fix Lorenzo's bug introduced in rev. 4082 2013-04-18 12:03:25 -05:00
Stefan Helmert 20e7d431a6 The internal BOM generator has bugs. I designed an XSL script, which converts the generated XML Partlist into
a CSV file for Libre Office or Open Office.  It is very easy to use. You can specify it as a plugin for 
Eeshema netlist generator.

It searches for all field names, generates the table headings accounting for all fields found in any part.
Then stuffs all the parts rows according to proper fields.
2013-04-17 09:57:47 -05:00
jean-pierre charras be7de02a1d Eeschema: fix bug #1168116. Netlist generation: remove dead code and fully outdated option pspice "use net number"
Pcbnew: layer manager: display tooltips using translated form (where internationalized, but always shown in English).
2013-04-16 12:53:23 +02:00
Lorenzo Marcantonio 0dbf3ef30a Changed format specifiers of some printf involved with size_t values to %zu to avoid runtime assertions. 2013-04-14 13:02:19 +02:00
Lorenzo Marcantonio 76b558c831 Closes bug 1168753.
Depending on build options seems that wx uses different types for size() so the Format string was not always correct. Put a fat warning in a comment too.
2013-04-14 10:26:42 +02:00