Compare commits

..

4663 Commits

Author SHA1 Message Date
Wayne Stambaugh 593c974063 One last update before 4.0.0 stable release. 2015-11-29 14:53:12 -05:00
jean-pierre charras 7b0d981f21 pcb_calculator: bigger (more readable) microstrip_zodd_zeven bitmap. 2015-11-29 20:22:03 +01:00
Wayne Stambaugh a68b3cb486 Merge with tip of product branch for 4.0.0 stable release. 2015-11-29 14:06:50 -05:00
Wayne Stambaugh 6e9237593d Update credits in AUTHORS.txt and about dialog. 2015-11-29 14:02:42 -05:00
jean-pierre charras 7f49fc9a03 Fix a minor bug I created in rev 6332 in dialog_design_rules.cpp (a line of code removed by accident). 2015-11-29 16:17:47 +01:00
jean-pierre charras 19e06f13fc Commit change which was missing in commit 6332 ( Pcbnew: auxiliary axis shape: use the same look as GAL, to be consistent with GAL.) 2015-11-29 15:53:03 +01:00
jean-pierre charras da9f68911c Autosize row label column in wxGrid in pcb_calculator and design rules dialog.
Pcbnew: auxiliary axis shape: use the same look as GAL, to be consistent with GAL.
Minor change in dialog_env_var_config (use the wxStdDialogButtonSize for usual OK, Cancel and help buttons)
2015-11-29 15:19:22 +01:00
jean-pierre charras 407aa9c586 Very minor fix: a pcbnew option (show page limits) was not stored in user config, and was lost after closing the session.
3d-viewer: very minor fix
2015-11-29 07:56:27 +01:00
unknown c1b46e6ed8 Fix bug Bug #1519590 (gal cannot start on surface book) 2015-11-29 07:50:25 +01:00
Adam Wolfe e511afdf0f Fix bug in library-repos-install.sh. 2015-11-24 16:53:15 -05:00
jean-pierre charras 22fb7dafba Rename the automatically generated version.h to kicad_build_version.h as a workaround to an issue in msys2: for a very obscure reason, version.h was added as dependency to most of .cpp files.
It was an issue, because each time the bzr version was modified, a full kicad rebuild was made.
It does not happen on Linux.
2015-11-24 11:09:39 +01:00
jean-pierre charras 9dc5bc4c66 Rename the automatically generated version.h to kicad_build_version.h as a workaround to an issue in msys2: for a very obscure reason, version.h was added as dependency to most of .cpp files. 2015-11-24 11:05:34 +01:00
jean-pierre charras 2afee8fb58 Make translation easier in dialog_create_array_base. 2015-11-22 11:21:14 +01:00
Wayne Stambaugh 08d9b362be More developer credit updates.
* Minor credit information updates.
* Add a packagers tab to the about dialog.
* Coding policy fixes.
2015-11-19 15:03:02 -05:00
Wayne Stambaugh 4b85adb7d3 Developer credit and copyright updates.
* Remove duplicate developer credits added in last commit.
* Update developer email addresses.
* Change copyright.h from GPL2+ to GPL3+ per FSF.
* Update newstroke license from CC-BY to CC0 with permission by author
  Vladimir Uryvaev which reflects the official license on the newstroke
  website http://vovanium.ru/sledy/newstroke/en.
* Coding policy fixes in AboutDialog_main.cpp.
2015-11-19 10:04:12 -05:00
jean-pierre charras 4749921bbc Remove confirmation dialog when deleting footprints.
Very minor other fixes.
2015-11-18 19:59:24 +01:00
Chris Pavlina bbba5d5c47 Eeschema: fix find and replace bug where replace value lags by one cycle. (fixes lp:1517101) 2015-11-18 10:38:46 -05:00
Tomasz Wlostowski 72b0593fdb Pcbnew: push and shove router fixes.
* Fix segfault caused by invalidation of the end item by
  PNS_LINE_PLACER::UpdateSizes().
* GAL zone drawing tool updates the ratsnest after zone drawing is complete.
* Fixed performance issue in zones processing using strict simplification
  only for the final filled area.
2015-11-18 09:35:17 -05:00
Wayne Stambaugh 20b6346180 Update authors.txt and developer list in about dialog. 2015-11-17 14:00:58 -05:00
jean-pierre charras 21d700facc Replace "module" by "footprint" in a few messages. 2015-11-17 17:18:00 +01:00
Wayne Stambaugh ebdc1e4b17 Pcbnew: minor footprint properties dialog fixes.
* Replace the term module with footprint.
* Use default dialog size to allow sizers to determine the size of the dialog.
* Fix a few alignment and spacing issues.
* Fix some minor grammatical issues.
* Use front and back for board side instead of top and bottom to be consistent
  with layer naming scheme.
2015-11-17 09:03:57 -05:00
jean-pierre charras 7f9a07334e Remove the 32 chars limit in chipname in dialog_edit_component_in_schematic, which is useless and creates a bug in wxGTK if the intial chip name has more than 32 chars. (Fix [Bug 1516157) 2015-11-17 09:22:03 +01:00
jean-pierre charras f31f129ce7 Remove the 32 chars limit in chipname in dialog_edit_component_in_schematic, which is useless and creates a bug in wxGTK if the intial chip name has more than 32 chars. 2015-11-17 08:48:51 +01:00
jean-pierre charras 49d75d5850 Drill file generation: add the option to merge NPTH and PTH, which was disabled recently, due to code changes.
Add missing translator name in AUTHORS.txt and About dialog (patch from Eldar Khayrullin)
2015-11-16 19:42:58 +01:00
jean-pierre charras d5aef07816 Kicad manager: fix a very serious bug which crashes Kicad when running and closing gerbview, pcb_calculator, bitmap2component or pl_editor, when the Kicad manager frame is not the top level frame (It happens very easily if eeschema or pcbnew is running, after opening and closing a dialog).
Fix a few wxWidgets asserts.
menubar in pcbnew: move the recreate .cmp file menu to export menu, and fixes its help comment which was fully outdated.
2015-11-15 19:04:19 +01:00
unknown 3e8b4503d1 Try to fix Bug #1458215 (3D viewer plane artifacts on first render) 2015-11-15 18:55:53 +01:00
unknown 4141a250fe Eagle plugin: remve a non-static initializer. 2015-11-15 18:53:26 +01:00
Jon Neal 19075e3434 Pcbnew: fix segfault in eagle plugin when importing zone keepout areas. 2015-11-15 08:29:48 -05:00
jean-pierre charras c3b51b0d07 2 very minor fixes in Eeschema:
* Component doc: add https as prefix in list of urls which are opened by a Internet browser.
* Import .cmp files: Use "IdModule" instead of "IdModule  =" as keyword for footprint name and use '=' only as separator.
2015-11-14 09:20:17 +01:00
jean-pierre charras a356293fee Cvpcb: Fix incorrect unique pad count for footprints using mixed letters/digits in pad name (like AA12, AB12 or Anod for instance.) and skip pads with no pad name. 2015-11-13 12:32:42 +01:00
Wayne Stambaugh 8f79b4fb11 Pcbnew: fix minor Doxygen comment error. 2015-11-11 15:16:39 -05:00
jean-pierre charras 34f1c0ea2d Fix a few Coverity warnings. 2015-11-11 19:47:51 +01:00
Damien Espitallier 16c2c398e9 CvPcb: count unique pin numbers when filtering by pin count. (fixes:1300719) 2015-11-11 13:35:26 -05:00
jean-pierre charras a988d7a2f1 Demos: minor update in kit-dev-coldfire-xilinx_5213.kicad_pcb 2015-11-10 20:33:02 +01:00
jean-pierre charras 91391a5975 Small change in gr_basic.cpp to try to fix Bug #1514635, which is a bug in wxWidgets Print process, on Linux (current pen having sometimes its setup lost after setting wxBrush in curren DC)
It was previoulsy incorrectly fixed when forcing the black and white print option.
2015-11-10 13:17:33 +01:00
jean-pierre charras 6cc91a074b Remove a few conditional compilation for wxWidgets version < 3.0
Update a old .fbp file.
2015-11-09 13:14:28 +01:00
unknown d830b24c56 Fix memory leak in meander placer. 2015-11-09 13:11:27 +01:00
Wayne Stambaugh ce81524b83 Merge with tip of product branch r6303, 4.0.0-rc1. 2015-11-08 16:22:19 -05:00
unknown 5897580c13 LIB_TEXT::Plot doesn't take justification into account, so when generating postscript/PDF/etc with left/right-justified text, the text is in the wrong position. This rev fixes that. 2015-11-08 11:10:52 +01:00
unknown 2cfa79e52f Fix Bug #1513556 (missing components, when pspice specific fields Spice_Netlist_Enabled or Spice_Node_Sequence have no value.) 2015-11-06 09:22:46 +01:00
unknown 2f92087bac Small fix in eagle_plugin.cpp (see bug Bug #1513112). This is not actually a bug, just a fix in comments, and a minor enhancement 2015-11-05 19:38:19 +01:00
jean-pierre charras ecad3ad235 Netlist generator: avoid changing the order of parts in libparts section each time libraries are reloaded.
pic_programmer demo: very minor fix and update netlist.
cached_container.cpp:  more info when the message "Out of memory" is displayed.
2015-11-05 17:28:31 +01:00
Tomasz Wlostowski 08178104bb router: take track width changes into account when calculating trace length for tuning 2015-11-05 19:20:08 +10:00
jean-pierre charras a23cbe052d Opengl canvas: avoid hanging when the CACHED_CONTAINER is "out of memory" (which can happen which very large boards) and the vertex manager cannot allocate an other vertex: the message "Vertex allocation error" is now shown only once.
the opengl canvas cannot show the full board, but at least the user can save the board, or switch to the legacy canvas.
2015-11-04 13:27:42 +01:00
unknown 1ee7458140 1. Fixed copy paste error in append_board_to_current.cpp ruining a if else condition, should fix a possible bounding box computation bug
2. Whole bunch of pointless casts removed
3. Unused variables removed
4. Fix bug caused by JP on April 25, 2015 where strings were adjusted for translation and the hotkeys section table accidentally swapped the footprint editor title with tag, resulting in "footprint editor" being exported instead of "[footprinteditor]"
No functional changes besides #4, technically it'll "break" imports hotkeys files but April 25 broke imports as well.
2015-11-04 09:48:34 +01:00
Mark Roszko 33419ee4bf Eeschema: remove unused headers, unused variables, redundant casts, and minor boolean tweaks. 2015-11-03 14:44:05 -05: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
Thomasz Wlostowski 6e470ece1d Pcbnew: fix push and shove router segfault bug. 2015-11-03 11:19:42 -05:00
jean-pierre charras 6d8fb6015b Fix Bug #1512726 (pl_editor can't not load template that have image with (option page1only) )
demo kit-dev-coldfire-xilinx_5213.kicad_pcb: minor 3d shape update
2015-11-03 17:03:44 +01:00
Chris Pavlina 85c3ae3715 Common: fix subtle project path bug when loading sym-linked project files.
* Assuming: a project exists in /a/b/project.pro, and /a/b is symlinked to
  /a/c

  1. Load /a/b/project.pro
  2. Load /a/c/project.pro

  Expectation: file name switches to /a/c/project.pro (even though they are
  the same file, a user would expect the path to reflect the file selection
  they just made)

  Reality: file name does not switch

  This is because PROJECT::SetProjectFullName() does not do anything if the
  path is not changed, and it uses wxFileName::SameAs() to check this. For
  some bizarre reason, wxFileName::SameAs compares filesystem inodes rather
  than actual paths.

  This patch instead creates a second wxFileName from the candidate name in
  order to normalize the path, and then compares paths directly. This should
  be much more in line with what a user would expect.
2015-11-02 14:04:53 -05:00
Simon Wells 0a9a07af2e OSX package maker fixes.
* Removed outdated package maker information, the pmdoc is generated and does
  not belong in the KiCad tree, it is also highly specific as seen due to the
  references to /Users/marco.  This is not used in normal builds nor in the
  packaging for KiCad OSX nightly builds.
* Updated identifiers in package marker docs to remove references to sourceforge
  and to follow other identifiers.
2015-11-02 13:29:55 -05: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 ae506e8223 polygons in footprint body: fix incorrect calculation of polygons with clearance or outline thickness (fix bug #1511366)
Clean demos
2015-11-02 10:24:32 +01:00
Wayne Stambaugh e64c36af6e Eeschema: set modified flag when clearing annotation. 2015-10-31 12:25:52 -04:00
jean-pierre charras c94a5dd46f Footprint wizard: fixes and enhancements in python scripts. 2015-10-31 12:54:48 +01:00
Simon Wells 7efd3f3707 Removed outdated packagemaker information, the pmdoc is generated and does not belong in the kicad tree, it is also highly specific as seen due to the references to /Users/marco, this is not used in normal builds nor in the packaging for kicad osx nightlies 2015-10-31 02:08:31 +13:00
Simon Wells 80d880a3e1 Updated identifiers in packagemarker docs to remove references to sourceforge and to follow other identifiers 2015-10-31 01:53:06 +13:00
Simon Wells 96918d4a8a Changed the bundle identifier to org.kicad-pcb.<app> to follow the kicad domain name 2015-10-30 08:43:04 +13:00
jean-pierre charras ad2c4b807b footprint generators python plugins: fix a few issues, and make them more compliant with the KiCad Library Convention 0.11 2015-10-29 18:35:52 +01:00
jean-pierre charras 77f1d8a848 Pcbnew: Fix a bug in exchange footprints: if a set of pads having the same name (complex pads) is found in a footprint, not all pads of this set have the netname updated (however reading the netlist fixes this isssue). 2015-10-28 19:45:20 +01:00
jean-pierre charras 48df08ceb6 Component editor: to avoid mistakes (like "bug" #1509936 ), when adding a pin to a multipart component , the pins automatically added to other parts have their pin number set to "??" instead of duplicating the master pin. They should therefore appear as different pins. 2015-10-27 14:52:54 +01:00
jean-pierre charras 8ff5bc6108 gen_gerber_and_drill_files_board.py script: fix incorrect output folder for drill files. 2015-10-26 19:55:37 +01:00
jean-pierre charras bb95fcccfc plotcontroller: add method to get the current plot full file name and the current plot folder full path from Python script.
gen_gerber_and_drill_files_board.py: 
 * fix to make it compatible with rev 6280.
 *  allow this script to create files in  the current plot folder defined from the board forder, no more only in current working directory.
2015-10-26 18:51:41 +01:00
jean-pierre charras c877c5ff6e 3D viewer: Fix potential crash risk introduced in rev 6279 (from a coverity warning). Make strings translatable in wx_html_report_panel_base. 2015-10-26 08:46:19 +01:00
unknown 1af9b46ada Pcbnew, dialog create drill file: remove option to merge plated holes and not plated holes:
reasons: 
* This option is called "bad practice" in gerber files format specifications and is even forbidden in gerber drill files.
* Generates problems with some board makers because these holes are not identified in a single NC file.
* No one was able to explain us how to identified them in a single NC file.
* Recent change in drill file generation is not compatible with merged holes (minor reason)
2015-10-26 08:43:30 +01:00
unknown c721c21bdf 3D viewer: Fix bug #1509506: Crash with MeshLab reduced 3D model. 2015-10-25 19:51:41 +01:00
jean-pierre charras ade51289a7 All: use solid lines instead of dashed lines to draw X and Y axis in legacy canvas (like in Gal canvas). The main reason: on OSX axis using dashed lines are very very slow to draw (looks like a wxWidget issue when the wxDC scale factor is very small) 2015-10-25 17:58:04 +01:00
jean-pierre charras bafb06c8c0 Footprint wizard frame: closing the messages box before closing the frame is no more allowed, to avoid a pcbnew crash when changing a parameter or closing the wizard frame. 2015-10-24 19:46:50 +02:00
unknown a0f52db1c8 Drill files generation: when using blind/buried vias, the files are now created for each via layer pair, each file groups vias having the same pair, and one for through holes.
Drill report: serious enhancements.
Plot files names for copper layers: build from the user layer name, like in bzr 4022 stable version. no change for other layers.
2015-10-23 16:30:22 +02:00
jean-pierre charras 289897e364 Pcbnew, Netlist reader: when replacing footprints, activate option "use library local settings values" for new footprints which replace old footprints, prepared by rev 6274. 2015-10-23 09:14:11 +02:00
jean-pierre charras d63c017a0a Exchange footprints: remove duplicate code, and keep the "Locked" attribute state after exchange/replace. 2015-10-22 18:50:27 +02:00
unknown ad10218a58 Rename {Set,Get}GerberExtensions() to {Set,Get}GerberProtelExtensions() (better name) in public API. 2015-10-21 08:55:30 +02:00
jean-pierre charras 4dc2ece011 Fix a few wording issues in dialogs (dialog plot and dialog move exact) for translators (more explicit words/sentences to remove ambiguities).
Pcbnew: Plot files: for copper layers, create suffix from user copper layer names instead of default copper layer names, like in last stable Kicad version (bzr 4022), to build the plot files filenames.
Better test of illegal chars in plot filename, both in plot dialog and functions aclled by Python scripts.
Fix a Plotcontroller issue to make SetUseGerberExtensions() work as expected from Python scripts ( from  Henner Zeller'patch with a fix to be sure it works properly from a Python script)
Note also using Protel Gerber Extensions is now a bad practice, because the official Gerber extension is .gbr since X2 Gerber version. But some users still use them)
2015-10-20 20:03:07 +02:00
jean-pierre charras 9aba2f2683 Add tool tips in pns settings dialogs. Use default events handlers in cancel and ok buttons and close window.
Fia an incorrect sentence in general board editor options dialog.
2015-10-16 17:56:50 +02:00
jean-pierre charras 52d1bd1a61 Minor fix: Remove duplicate id for 2 buttons (Undo and Close) in dialog hotkeys editor and use better button label (Cancel instead of Close, because changes are actually cancelled by closing the editor).
On Windows, duplicate ids in same window must be avoided, and on Linux, one  associated icon (depending on the window manager) was wrong.
2015-10-16 11:14:33 +02:00
jean-pierre charras 184eff0e69 Remove duplicate id for 2 buttons in dialog hotkeys editor and use better button label (Cancel instead of Close, because changes are actually cancelled by closing the editor). 2015-10-16 10:53:57 +02:00
unknown 3ca82446d8 Fixes in GEDA footprint plugin import. 2015-10-14 20:22:47 +02:00
Wayne Stambaugh bc6e9e855c Pcbnew: fix broken board ratsnest visibility storage behavior.
* The board ratsnest visibility state was being saved in both the board file
  and the Pcbnew configuration files causing visibility state issues.  Use the
  board file to save the board ratsnest visibility state.
* Remove all of the board ratsnest save visibility state to configuration file
  code.
* Add code to set the board modified property when layer visibility states
  change to give the user a chance to save the state in the board file.
* Some minor code cleaning and coding policy fixes.
2015-10-14 14:12:17 -04:00
jean-pierre charras 014f0eb61f Gerber file X2 attribute: Change the attribute Project Id key word from .TF.JobId to .TF.ProjectId, due to a change between the draft Gerber file format specif and a the final specifs (Revision 2015.08).
Remove a few wxCHECK_VERSION conditional compilation, now useless.
2015-10-14 09:20:28 +02:00
Traumflug c5f9896dec Pcbnew: gEDA plugin fix to recognize values with units. (fixes lp:1427494)
* Recognize values with units in more recent gEDA footprint files and scale accordingly.
* Join both parseInt() implementations.  This should reduce rounding errors as well as
  code duplication.
2015-10-12 19:31:26 -04:00
Wayne Stambaugh a033386a6b Minor compiling document fixes.
* Fix missing link to MinGW website.
* Add link to library dependency section in introduction.
* Add "Known Issues" section to document known build issues.
2015-10-12 19:09:52 -04:00
Tomasz Wlostowski 0725575830 router: fixed disappearing segments when dragging corners/vias 2015-10-12 14:08:27 +02:00
Wayne Stambaugh 627f8cba4d Fix "Building KiCad from Source" developers documentation.
* Change command blocks from using ``` to delineate block and use indentation
  instead.  The ``` method seems to be broken on Doxygen 1.8.9.1 used by the
  autobuilder.  It also removes the line numbering which did not make sense
  for commands that spanned multiple lines.
2015-10-12 09:42:09 -04:00
Maciej Suminski 42b598d677 Fixed missing ratsnest lines when nodes are connected to different subpolygons of a zone. 2015-10-12 11:13:16 +02:00
Tomasz Wlostowski cd0031be47 router: fix segfault when placing a via with failed shove of head trace 2015-10-12 10:02:03 +02:00
Simon Wells cb6ea1ed13 Eeschema: minor fix to wxFileDialog file name parameter when saving project settings. 2015-10-11 15:37:33 -04:00
Wayne Stambaugh faf8e3a723 Create markdown version of compiling KiCad for developer documentation.
* Add compiling.md with most of the important information from the plain
  text versions of platform specific compiling files.
* Remove the old plain text compiling files and folder.
2015-10-11 11:16:25 -04:00
jean-pierre charras 70b584c5f5 Dialog Pad Properties: fix 2 issues: Bug #1504749 (pad parameter "delta" checking error for non trapezoid pads which do not use this parameter) and SMD pads allowed on all layers
The existing test was disabled for an unknown reason, which is a non sense and more important breaks the DRC.
2015-10-10 18:56:31 +02:00
Tomasz Wlostowski 3596ef2d4c router: fixed loop removal regression in shove mode 2015-10-09 14:31:06 +02:00
Simon Wells 11952fadfa Changed the file dialog to use the name instead of the path as its a file dialog 2015-10-09 20:38:35 +13:00
Dimitris Lampridis 7d5cb75507 Update Greek translators list in about dialog. 2015-10-08 13:48:27 -04:00
Wayne Stambaugh 74f00d4027 Minor string and coding policy fixes.
* Make the about dialog help string consistent across all menus.
* Improve print preview window and print initialization error messages.
* The usual smattering of coding policy fixes.
2015-10-08 09:52:03 -04:00
Stefan (stol) 18eb10e4d1 Fix Bug #1502012 (Can not close the print preview window with the "X" icon) Linux spécific. 2015-10-08 14:13:54 +02:00
Stefan (stol) 9537884f7e Try to fix Bug #1502012 (Can not close print preview window with the "X" icon) Linux spécific. 2015-10-08 13:59:00 +02:00
Tomasz Wlostowski b4fd9f3ed5 router: pick similar starting shapes for the diff pairs, not the very nearest one 2015-10-07 19:26:33 +02:00
Wayne Stambaugh 346b721156 Pcbnew: remove redundant export from IDFv3 menu entry. (fixes lp:1503076) 2015-10-07 11:05:21 -04:00
Wayne Stambaugh 40e48a6bb7 Pcbnew: fix design rules dialog tab switching bug on OSX. (fixes lp:1502823)
* Add skip event to notebook page changed event handler.  Apparently OSX
  updates the selected notebook page in this event instead of the page
  changing event used on Window and Linux.
* Improve duplicate net class name error message.
2015-10-07 10:15:24 -04:00
Maciej Suminski 53cd964910 Merge lp:~xzcvczx/kicad/clarify-menu-fix into lp:kicad 2015-10-07 15:57:51 +02:00
Simon Wells 5bc6a55015 Changed behaviour so if the menu is closed without selection by pressing esc or clicking outside of the menu that the last highlighted option wont be selected 2015-10-08 02:32:36 +13:00
Maciej Suminski a3786fd6d8 router; Changed 'custom track via/size' hotkey to Q (to avoid conflict with cycling through defined track widths). 2015-10-07 11:10:34 +02:00
jean-pierre charras 20a3e236fa Fix Bug #1498252 (segfault + assert failed in Yield(): wxYield called recursively) and a few other issues (footprint viewer or 3D viewer not always raised in some cases). Linux specific 2015-10-06 08:36:12 +02:00
jean-pierre charras a112a33fa2 Fix Bug #1498252 (segfault + assert failed in Yield(): wxYield called recursively) and a few other issues (footprint viewer or 3D viewer not always raised in some cases). Linux specific 2015-10-06 08:23:05 +02:00
Maciej Suminski 2607497b37 Code formatting. 2015-10-05 18:28:41 +02:00
Maciej Suminski 480cf85102 router: Layer switching uses the layer pair settings when placing a through-hole via. 2015-10-05 13:28:32 +02:00
jean-pierre charras 8e08baee10 Export vrml: fix Bug #1502550 (Pcbnew Messes Up File-Name and File-Path with Multiple Export WRL) and fix a not so good file name handling after loading an other board in a stand alone Pcbnew session. 2015-10-04 19:07:20 +02:00
Nick Østergaard 5591353871 Pcbnew: fix minor issues with eagle plugin. (fixes lp:1399737).
* Co-authored by John Neal <reportingsjr@gmail.com>
2015-10-04 12:56:59 -04:00
jean-pierre charras 19124ceee8 Fix crash when exporting vrml (see bug Bug #1502549) when there is a Glu error.
Enhancement: dialog_footprint_wizard_list remembers now its size.
2015-10-04 13:46:56 +02:00
Kinichiro Inoguchi 2930506f03 Fix demo footprint 3D model file assignments due to library changes. 2015-10-03 16:55:01 -04:00
Bernhard Stegmaier 3f807bdc78 OSX Python scripting plugin path fixes. 2015-10-02 16:07:29 -04:00
Wayne Stambaugh 8e5e2164e8 Pcbnew: design rules dialog fixes and improvements. (fixes lp:1499538)
* Use default dialog size to allow sizers to do their job.
* General layout and sizer improvements.
* Remove HTML message window which could not be used when error dialog was displayed.
* Use wxStdDialogButtonSizer for the OK and Cancel buttons.
* Check for design rule validity in TransferDataFromWindow() to prevent dialog from being
  closed and all new design rules being lost when an error is detected.  This gives the user a
  chance to fix any design rules errors before dismissing the dialog.
* Add missing test for extra via drill diameter violations.
* Remove unnecessary OK and Cancel butten clicked event handlers.
2015-10-02 15:11:33 -04:00
jean-pierre charras 23d0de1bda Eeschema: fix crash when closing or moving the print preview frame on Windows 7 (at least version 32 and compiled with mingw/ GCC 5.2) 2015-10-02 18:52:54 +02:00
kinichiro acc19096c3 Demos: fix 3D models (bug 1500956) kit/pic/sonde/test_xil/video 2015-10-03 01:14:48 +09:00
jean-pierre charras a0b31b62ba Eeschema: fix crashes when closing or moving the print preview frame on Windows 7 2015-10-02 16:07:37 +02:00
kinichiro d797379855 Demos: fix 3D models (bug 1500956) complex_hierarchy/ecc83/flat_hierarchy 2015-10-02 21:39:32 +09:00
Andrey Fedorushkov 845638fc63 pcbnew: fix not build in linux 2015-10-02 07:07:08 +03:00
Wayne Stambaugh 053458b81a Minor scripting improvements and code cleaning.
* Coding policy fixes in the scripting initialization code missed in my previous commit.
* Remove redundant checks for valid Python library paths in kicadplugins.i.
2015-10-01 20:15:01 -04:00
Brian Sidebotham 28bda90e87 Fix system scripting plugin path on Windows and Linux. 2015-10-01 15:21:00 -04:00
Maciej Suminski ea005bc94d Fixed crash on disabling all layers in the pad properties window. 2015-10-01 16:03:20 +02:00
Maciej Suminski db8560f055 Fixed crash when placing 45-degree lines in the footprint editor (GAL). 2015-10-01 15:52:45 +02:00
Wayne Stambaugh ce68767fce Demos: fix 3D models due to library changes. (fixes lp:1500956) 2015-10-01 09:56:42 -04:00
Wayne Stambaugh 8f99fc0496 Minor Python scripting fixes.
* Actually install the contents of the pcbnew/scripting/plugins directory on
  Windows and Linux
* Move the test for existence of a directory before adding it to the Python
  system library paths when loading the Python plugins.
2015-09-30 16:14:59 -04:00
Wayne Stambaugh 5a4c663682 Eeschema: fix infinite loop in replace all caused by previous find fix.
* Only check for search cache update on close dialog event instead of every
  update of the find/replace view which caused an infinite loop when replace
  all was called.
* Check for dirty search cache for each find/replace event.
* Add code to save and restore last replace index on cache refresh.
2015-09-30 14:02:31 -04:00
jean-pierre charras 3d38a7b252 Remove a change committed erroneously 2015-09-30 18:44:44 +02:00
jean-pierre charras ad48723deb Update 2 footprint wizard python scripts to display the value of parameters in the window messages. DRC: do not generate warnings for pads which are only on tech layers and over a hole.
A very minor other fix.
2015-09-30 18:42:28 +02:00
Baranovskiy Konstantin 50d8195623 Yet another help menu unification fix. 2015-09-30 10:05:07 -04:00
Maciej Suminski f13208dc04 router: Display an error message when trying to place diff pair tracks that violate design rules. 2015-09-30 13:37:19 +02:00
Maciej Suminski f752f7875e Code formatting. 2015-09-30 11:18:19 +02:00
jean-pierre charras 2a4f8db792 Pcbnew, archive footprints: fix bug #1495321. The user can now save the footprints in a library in fp lib table, or in a new library. 2015-09-28 10:46:00 +02:00
jean-pierre charras b504252789 wizard_3DShape_Libs_downloader : show/hide the warning message relative to the target local folder when the target local folder name is modified by hand. 2015-09-26 18:51:52 +02:00
jean-pierre charras 68bca14e64 wizard_3DShape_Libs_downloader : show/hide warning message when the target local folder name is modified by hand. 2015-09-26 18:03:38 +02:00
jean-pierre charras d957ef9f71 Fix a Coverity warning (potential bug)
Prepare work to fix Bug #1495321 (clean code in dialog_select_pretty_lib, fix incorrect comments)
2015-09-26 08:46:25 +02:00
Wayne Stambaugh 78dc14c078 GerbView: fix path bug due to quoted command paramaters.
* It appears the wxApp leaves the trailing double quote when handling a quoted parameter list
  that was causing the project path passed from KiCad to have a trailing double quote which caused
  a file read error.
* Remvoe all comments from source file gerbview/gerbview_frame.cpp.
* Remove unused and empty function GERBVIEW_FRAME::SetAllVisibles().
* Add path paramters to KiCad executable launcher so we can see the full command string.
2015-09-25 19:34:57 -04:00
Simon Wells 3ef7df3be5 More help menu unification fixes. 2015-09-25 18:22:54 -04:00
Wayne Stambaugh f98ddbe33d Missed file update from previous commit. 2015-09-25 15:41:14 -04:00
Wayne Stambaugh a6a9d8eedf Default and most recently used path fixes. (fixes: 1494210)
* Rename Eda_FileSelector to EDA_FILE_SELECTOR.
* Add optional pointer to wxString to save the most recently used path to EDA_FILE_SELECTOR.
* Rename Eda_DirectorySelector to EDA_PATH_SELECTOR.
* Replace wxGetCwd() with wxStandardPaths::GetDocumentsDir().  This fixes the windows issue
  where wxGetCwd() returns the path where the executable files are located.
* Add code to handle most recently used path to EDA_BASE_FRAME.
* Fix string formatting error in kicad/files-io.cpp.
* Remove setting and restoring current working directory when launching GerbView.  Setting the CWD
  has no effect on the launched executable which starts with it's own CWD.
* Allow project path to be passed to GerbView when launched from KiCad.
* Note: this is a work in progress.  Do not expect every path and/or file selection dialog to properly
  update the most recently used path.  The correct solution to this problem requires a much more
  well though out solution which will not happen until after the next stable release.
2015-09-25 15:38:09 -04:00
jean-pierre charras be8b0b4823 Fix Bug #1499788 ( Kicad manager unarchive files to home directory instead selected )
Fix a very minor issue about  accelerator key in help menu:  for "Eeschema Manual" of library browser it was "H". It is now "M" like in other help menus.
2015-09-25 20:45:45 +02:00
Simon Wells a285aead3f Fixed order of icons in help menu for gerbview and pagelayout-editor 2015-09-26 05:58:50 +12:00
Wayne Stambaugh dd41260c2c Eeschema: fix segfault when closing find dialog on dirty search cache. (fixes lp:1498997) 2015-09-25 09:55:08 -04:00
Maciej Suminski 45a9b1c000 Fixed the build problem introduced in revision 6215. 2015-09-24 18:59:10 +02:00
Maciej Suminski 9bb74e5244 Synchronize layers visibility on canvas switch. 2015-09-24 18:34:22 +02:00
Maciej Suminski f2807035df router: Improved via placement code. - Blind/buried vias going through all layers are converted to TH vias. - If current layer is not set in the pair, router switches to the top layer instead of keep using the same layer. - Microvias switch between one of the outer layers and the adjacent one. 2015-09-24 18:34:22 +02:00
Maciej Suminski 504cf55642 Minor code formatting corrections. 2015-09-24 18:34:22 +02:00
Maciej Suminski 41e96e03d6 router: Added messages explaining why a blind/buried/microvia cannot be placed. 2015-09-24 11:04:42 +02:00
Dick Hollenbeck b27176f230 Pcbnew: fix segfault after deleting a pad from a footprint then performing a DRC action such as a via drag. 2015-09-23 19:02:40 -04:00
Simon Wells 49cad0de95 Unify help menus across top level windows. 2015-09-23 16:34:48 -04:00
Simon Wells 29d94fcf08 Changed to use full name instead of abbreviation 2015-09-24 07:41:51 +12:00
Simon Wells c0d9fc1b5c Changed about menu items to just say About Kicad as its a common about dialog across the project 2015-09-24 06:59:31 +12:00
Simon Wells e45cdaedb6 fixed footprint editor accelerator 2015-09-24 06:45:24 +12:00
Simon Wells bb286d52b1 Created handlers for getting started menu items in gerbview and pl_editor 2015-09-24 06:43:40 +12:00
Simon Wells 1b26ca59b1 Added getting started to the remaining menus and fixed the icons 2015-09-24 06:29:21 +12:00
Simon Wells 70b93f3c6c Updated accelerator keys to &M in eeschema and libedit 2015-09-24 06:11:56 +12:00
Simon Wells 58d0abb23a Made help menu items consistent 2015-09-24 04:47:34 +12:00
jean-pierre charras 1861f94ec1 Kicad: fix Unarchive file dialog fails to list zip files (Linux specific) 2015-09-23 11:26:50 +02:00
Wayne Stambaugh 41242a5a00 Pcbnew: fix error message on footprint ID load failure. 2015-09-22 13:05:07 -04:00
Maciej Suminski 0c92a8583a Fixed crash on tracks & vias clean up (GAL). 2015-09-22 17:55:10 +02:00
Wayne Stambaugh e97395090c CvPcb: fix wxString formatting bug. (fixes lp:1497908)
* Fix wxString formatting assertion in Eeschema generic netlist exporter.
2015-09-21 16:39:59 -04:00
Wayne Stambaugh 1831b2329a Pcbnew: minor keep out zone properties dialog fixes.
* UI capitalization policy fixes.
* Set OK button as the default.
* Use default dialog size to allow sizers to do their job.
* Minor grammar and abbreviation string fixes.
2015-09-21 11:36:13 -04:00
Maciej Suminski 25d5a2fbfb Disable capture cursor & autopanning for tools in idle state (GAL). 2015-09-21 10:16:23 +02:00
Wayne Stambaugh 66a9b04487 Fix windows help path bug. (fixes lp:1313412)
* SearchHelpFileFullPath(): clean up platform specific path code, add executable path sans bin
  directory on non-osx platforms, and move KICAD path variable to the beginning of the search
  list.
* Minor search stack debug output improvements.
2015-09-20 14:23:17 -04:00
Wayne Stambaugh 3adff48dcd Pcbnew: minor UI improvements.
* Make OK button the default in the copper zones properties dialog.
* Change the set global text edit properties menu entry so that is describes
  what the dialog actually does.
* Make the clean up tracks and vias menu entry description more accurate.
2015-09-17 16:43:14 -04:00
jean-pierre charras 37c8462c8b 3D viewe: Very minor fixes in 3D Display Options dialog. 2015-09-15 20:47:20 +02:00
Wayne Stambaugh 0493148df6 3D Viewer: minor menu string improvements. (fixes lp:1495935) 2015-09-15 13:35:26 -04:00
Wayne Stambaugh 25ef22b00c Pcbnew: fix assertion due to string formatting error when loading footprint from board in footprint editor. (fixes lp:1495744) 2015-09-15 13:16:23 -04:00
Chris Pavlina a2beb2ecad Eeschema: remove assertion in OnOrient() when the current object cannot be oriented. 2015-09-15 09:51:47 -04:00
Tomasz Wlostowski 5bbf980ec7 router: fixes for disappearing segments after shoving & assertion in PNS_NODE destructor 2015-09-14 18:40:29 +02:00
Wayne Stambaugh 463b8b4127 Revert changes to CreateGitVersionHeader.cmake that were causing configuration issues. 2015-09-14 08:45:25 -04:00
jean-pierre charras f7b8ac52e1 Disable proxy menu in Unity window manager. Only usual menubar works with wxWidgets (at least <= 3.1). When the proxy menu menubar is enable, some important things for us do not work: menuitems UI events and shortcuts. Also issues when switching from Legacy to GAL display mode. 2015-09-14 09:58:31 +02:00
Simon Wells f053922fdf Eeschema: fix focus issue in pin properties dialog in OSX. (fixes lp:1434045) 2015-09-13 18:43:38 -04:00
Simon Richter 0e7f3bf366 Make forward declaration of SELECTION consistant with actual declaration. 2015-09-13 15:38:27 -04:00
Simon Richter fdefe25fbd Make netlist_reader.h a build dependency of the pcbcommon library. 2015-09-13 15:11:45 -04:00
Joseph Chen c890abe08a Improve git generated KiCad version string. 2015-09-13 14:04:40 -04:00
unknown bb045e18b3 Forgotten in rev 6189: Make call to DXF importer not possible if a footprint does not exist, also in GAL mode. (Workaround for bug #1384902: SIGSEGV when importing DXF in footprint editor) 2015-09-13 19:07:31 +02:00
jean-pierre charras 00cffb080e Make call to DXF importer not possible if a footprint does not exist, also in GAL mode. 2015-09-13 18:44:07 +02:00
jean-pierre charras 8193a898f3 Footprint Editor: make call to DXF importer not possible if a footprint does not exist, to avoid crash. ( It fixes an issue on Unity, where the file menu to call the DXF importer is not always disabled when no footprint loaded) 2015-09-13 16:23:01 +02:00
Wayne Stambaugh ca1ae0d4a0 Eeschema: minor library configuration dialog improvments.
* Move check box above line spacer for consistency with other dialog designs.
* Fix spacing for a few buttons for layout consistency.
2015-09-12 16:20:16 -04:00
Wayne Stambaugh 9b0bd8ff42 Eeschema: minor color selection dialog improvements.
* Move color conflict checking code into TranferDataFromWindow so that it can be used in both the
  OK and Apply button message handlers.
* Change Erc to ERC in text labels.
* Check for color conflicts and give the user the option to dismiss the changes before applying them.
* Add color conflict checking when apply button is pressed.
* Use default dialog size to allow sizers to set the initial size of the dialog.
2015-09-12 16:13:12 -04:00
Wayne Stambaugh 72e50b496c Pcbnew: minor VRML export dialog improvements.
* Track the last used path for the current session.
* Set focus back to OK button after wxFilePickerCtrl button is pressed to change file path
  and/or file name so next return key press fires OK event.
* Use default dialog size to let the sizers set initial dialog size.
* Add spacer to improve layout when resizing dialog.
2015-09-12 12:57:38 -04:00
Simon Wells 3076a5deda KiCad: fix segfault when cancelling when another instance is already running. (fixes lp:1494616)
* Do not initialize BIN_MOD until after program initialiaztion returns true.
2015-09-12 11:06:37 -04:00
Wayne Stambaugh f3a142b03c Pcbnew: minor pad properties dialog improvements. 2015-09-11 19:13:54 -04:00
Simon Wells 906991c4ac moved m_bm.Init as it is not required before initPgm 2015-09-12 10:37:33 +12:00
Wayne Stambaugh 4541eb4f37 Pcbnew: minor graphic items properties dialog improvements.
* Use colons for consistency with other dialogs.
* Use default size to allow sizers to determine dialog size.
* Use "segment" rather than abbreviation "segm".
* Use width and height to describe text instead of X and Y.
* Add spacer to improve layout when resizing dialog.
2015-09-11 10:31:45 -04:00
Wayne Stambaugh 0ac50f3671 Pcbnew: minor track and via property dialog fixes.
* Use colons consistently in labels.
* Use default dialog size to allow sizers to size dialog.
* Fix control alignment and spacing consistency.
* Add spacer to improve layout when resizing dialog.
2015-09-11 10:02:57 -04:00
Wayne Stambaugh b6bb87af74 Pcbnew: minor graphic item properties dialog improvements.
* Make control spacing and alignment consistent.
* Use default dialog size and to allow the sizers to do thier job.
* Add colons to per item labels for consistency.
* Fix error message box title capitalization per UI policy.
2015-09-11 09:08:53 -04:00
Wayne Stambaugh 2e3806c397 Pcbnew: minor display option dialog fixes.
* Remove hard coded dialog size and let the sizers do their job.
* Minor UI policy text fixes.
* Minor text changes to improve readability.
* Minor tool tip changes to improve readability.
2015-09-10 16:29:45 -04:00
Wayne Stambaugh cae9b8b885 Pcbnew: minor global delete dialog fixes.
* Fix control spacing for more aesthetic layout.
* Minor UI policy text changes.
* Set OK button as the default action.
2015-09-10 16:00:18 -04:00
Wayne Stambaugh a42adc096c Pcbnew: minor IDF export dialog fixes.
* Fix control spacing and alignment for more aesthetic layout.
* Minor text changes to improve readability.
2015-09-10 15:48:28 -04:00
jean-pierre charras 24409c6edc Workaround to fix Bug #1492513 (EEschema crash when I hit ERC button Edit). It happens only on Window 32bits build with msys2+gcc 5.2). The crash is due to the wxHtmlListBox used in ERC dialog (Although the sample htlbox works fine).
The wxHtmlListBox is just replaced by the wxHtmlWindow to display and select the ERC marker list.
2015-09-10 14:03:16 +02:00
Wayne Stambaugh 1d4a46d9c8 Simon Wells <swel024@gmail.com> 2015-09-09 15:34:18 -04:00
Wayne Stambaugh c0d7c3fd0b Remove unnecessary edits left over from previous commit. 2015-09-09 15:17:19 -04:00
Tomasz Wlostowski 2088b5296e Fix bug when plotting DXF board outline. 2015-09-09 11:51:02 -04:00
Wayne Stambaugh 42ecf0a994 Fix VRML export bug.
* Split graphic circle objects into two 180 degree arcs to prevent the
  VRML_LAYER::AddCircle() function from obscuring objects in the hole
  (cut out) area of the circle.
2015-09-09 11:08:53 -04:00
Maciej Suminski 5659e3f8dc Adjusted ROUTER_PREVIEW_ITEM depth values. 2015-09-09 11:56:16 +02:00
Maciej Suminski 247f018075 FIxed rendering artifacts in OpenGL canvas. 2015-09-09 10:49:25 +02:00
Wayne Stambaugh 626915851c Eeschema: enable a few disabled stand alone mode options.
* Enable CvPcb launching in stand alone mode.
* Enable footprint editor launching in stand alone mode.
* Remove some dead code left over from the change in CvPcb behavior.
* These changes were made for users who prefer to work in a less project-
  centric work flow.  KiCad should not be in the business of dictating
  work flow whenever possible.
2015-09-08 14:45:11 -04:00
Simon Wells f88140c95d Fixed RS274X image rotation parsing.
If the image was being rotated by a valid amount but not 270 degrees due to the if statements it would already report that there was an invalid value.

Also due to the strnicmp only checking the first 2 characters which was valid for 0* but not the rest of the numbers, some values would be able to work that shouldn't
2015-09-09 00:21:31 +12:00
Maciej Suminski 6e23979253 Removal tool asks for confirmation only for modules (GAL). 2015-09-08 11:17:30 +02:00
Chris Pavlina b55c074a11 Interpret unassigned hotkeys correctly.
* If a hotkey is set to "unassigned" (typically by causing a conflict), it 
  is not loaded correctly. The loader interprets "unassigned" as "keep the 
  default assignment", which leads to a conflict later that causes an 
  assertion failure.
2015-09-07 16:04:16 -04:00
jean-pierre charras 168940158d Footprint wizard frame: Remove an assert message in Debug mode. 2015-09-07 20:25:45 +02:00
Simon Wells 3bcda184dd Fix issue in plot Gerber X2 format ( missing % char). Stra,gely, does not happen on all platforms. 2015-09-07 20:09:41 +02:00
jean-pierre charras 4a06cd2326 Pcbnew: try to fix a crash (only on some Linux versions) when exporting a footprint from the footprint wizard frame.
Replace %zu by %d in wxString::Format (%zu format not always known by wxString::Format on Windows, depending on the way wxWidgets was built ) in a few messages
2015-09-07 17:45:44 +02:00
jean-pierre charras 991927a177 Fix crash (only on Linux) when exporting a footprint from the footprint wizard frame.
Replace %zu be %d in wxString::Format (%zu format not known by wxString::Format on Windows 32 bits)
2015-09-07 17:20:15 +02:00
Maciej Suminski b98d745336 Fixed crash on "Cleanup Track and Vias" when GAL canvas is active. 2015-09-07 14:02:02 +02:00
jean-pierre charras 7b0d597f6d Fix some issues related to the footprint wizard frame:
* Mainly the wxDialog that was opened when the wizard is created is now no more created by the wizard frame CTOR. On some W.M. it created a serious issue related to the way Event Loops are managed. Now the user has to call it by the toolbar tool.
* 2 settings not saved in config are now saved.
* a few other minor enhancements
* better icon in  footprint wizard frame
Remove a few #define relative to the wxWidgets 2.8 version, no more supported.
2015-09-07 12:52:16 +02:00
Simon Wells e2972c5fff Fixed gerber generation with J5_ATTR defined 2015-09-07 18:05:23 +12:00
Maciej Suminski 73e8645e2a pcbnew starts with F.Cu layer selected as the active one. 2015-09-06 22:49:47 +02:00
unknown 6b3ff2d59a Eeschema:fix bug 1492542 component pins look disconnected if component is selected and then pan/scroll/zoom view 2015-09-06 15:07:46 +02:00
Maciej Suminski 2f0cf27ae4 More adjustments to the layer ordering (GAL). 2015-09-06 12:58:46 +02:00
Brian Sidebotham 34aab6f687 Add axis origin to the Footprint Editor to align with the Legacy canvas 2015-09-05 20:47:35 +01:00
Maciej Suminski 8f14e9e0b7 Improved the displayed layer order (GAL). 2015-09-05 19:00:54 +02:00
Maciej Suminski bfca6f083f Bounding box for arc contains only the arc itself (excluding the center point) (GAL). 2015-09-03 23:05:01 +02:00
jean-pierre charras 0a56afe566 Fix typo 2015-09-05 16:53:53 +02:00
jean-pierre charras 7995f0e7de Fix KIWAY_PLAYER::ShowModal: the top level windows children of the KIWAY_PLAYER Modal frame are now enabled (previously were disabled). It fix some issues for instance with the aui toolbar when moved, and the dialog open when starting the footprint wizard frame. Perhaps also explains a few other bugs in modal mode.
footprint wizard frame: now shows messages from footprints python scripts. Especially usefull when a parameter is incorrect. Fix also an other issue (IO exception error) with some python scripts when they are usin a  print command to output messages (now they use the new message window.
2015-09-05 16:47:16 +02:00
jean-pierre charras 7808b2e240 Fix in KIWAY_PLAYER::ShowModal: the top level windows children of the KIWAY_PLAYER Modal frame are now enabled (previously were disabled). It fix some issues for instance with the aui toolbar when moved, and the dialog open when starting the footprint wizard frame. Perhaps explain a few other bugs.
footprint wizard frame: now shows messages from footprints python scripts. Especially usefull when a parameter is incorrect. Fix also an other issue (IO error) with some scripts which were usint the print command to output messages (now they use the nes message window.
2015-09-05 14:10:54 +02:00
Maciej Suminski 4636d8d615 PNS router changes layer on 'Place Via' hot key while it is not laying out a track. 2015-09-03 18:25:48 +02:00
Maciej Suminski b1d241c271 Net highlighting mode is toggled when used on the same net (GAL). 2015-09-03 17:56:30 +02:00
Maciej Suminski 9f41fe0bda Added a hot key for (un)locking modules (GAL). 2015-09-03 17:35:41 +02:00
Maciej Suminski 8dbf6beed6 Fixed a corner case for arc bounding box calculation. 2015-09-03 10:42:52 +02:00
unknown 8fedc57499 Small cleanup: remove a few unnecessary casts, and minor cleaning code. 2015-09-03 09:44:30 +02:00
jean-pierre charras 4a56ee42c5 Footprint wizard: Fix IO exception error in python scripts which happens sometimes, due to the fact these scripts printed messages to a console, but when Pcbnew is not run from a console, there is no IO channel to read these messages.
The fix is not perfect (still no IO channel to read these messages) ,  but it works better.
Also, fix erroneous comments in code, and cleanup code.
2015-09-02 15:55:36 +02:00
Maciej Suminski 387054d83f Fixed a mistake in the previous commit. 2015-09-02 10:55:35 +02:00
Maciej Suminski 9c9b0d1c6d One more fix for #1490786. 2015-09-02 10:48:10 +02:00
unknown 276a923027 SHAPE_POLY_SET: fix segfault when checking for a point in empty polyset 2015-09-02 08:32:24 +02:00
Maciej Suminski 1d877f5b74 Redraw module texts on "Reset Footprint Field Sizes" (GAL). 2015-09-01 18:06:11 +02:00
Maciej Suminski 8fe18d83a0 Added missing comments for the last commit. 2015-09-01 15:06:54 +02:00
Maciej Suminski 3cddf14e73 Ratsnest algorithm handles items in pad areas (GAL). 2015-09-01 13:44:07 +02:00
Maciej Suminski 24e7f961b9 Fix a Coverity report (catches an unhandled exception). 2015-09-01 11:32:23 +02:00
Maciej Suminski 8b8098d228 GAL canvas highlight net mode works on all layers. 2015-09-01 11:27:38 +02:00
jean-pierre charras dba0494b02 Pcbnew: Rework on dialog global deletions. 2015-09-01 11:13:22 +02:00
Maciej Suminski 330b253018 Recalculate ratsnest on canvas switch. 2015-09-01 10:50:59 +02:00
unknown 5fe527242f eeschema: fix documentation on SCH_SHEET_PATH::Cmp to match actual behavior 2015-08-31 13:13:26 +02:00
unknown b0241bacf0 Eeschema ERC now catches errors of unmatched global labels. 2015-08-31 13:09:47 +02:00
jean-pierre charras 545d127a1c Fix netlist changes netnames randomly when netnames come from power pins invisible connected together but having different names. 2015-08-31 10:44:27 +02:00
jean-pierre charras f7f7e3e918 Remove useless or not working code used in Load/Save config. 2015-08-31 08:43:33 +02:00
jean-pierre charras 4e94d522a6 Eeschema: Fix a minor draw issue in choose component dialog preview ( sometimes incorrect colors or line widths ) . 2015-08-30 16:46:34 +02:00
jean-pierre charras 3eae0feeaa Fix incorrect default URL in wizard_add_fplib_base. Update an old test dialog. 2015-08-30 13:00:30 +02:00
jean-pierre charras 156d5f50d6 fix unwanted foreground frame change on Windows when creating BOM and netlists from scripts.
Very minor coverity warning fixes.
2015-08-28 16:15:45 +02:00
Cirilo Bernardo adddfd22a3 Pcbnew: add user position option to DXF import dialog.
* Dialog UI policy fixes and layout improvement provided by Wayne Stambaugh.
2015-08-27 14:10:28 -04:00
Maciej Suminski 51a6d389fb Fix jumping when block-moving items for certain window managers. 2015-08-27 10:29:12 +02:00
Michael Beardsworth 2e4136720d Removed set-but-unused failingDirCheck variable 2015-08-26 17:52:56 +02:00
Maciej Suminski 33dd214b4f Fixed crash on closing the footprint editor with hot key (GAL). 2015-08-26 11:50:16 +02:00
Maciej Suminski a813deb579 Fix a ratsnest assertion when selecting a copper connection between only 2 nodes. 2015-08-25 18:27:04 +02: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
Jon Neal 0aa9fad668 Push UI preferences to child edit and view windows. (fixes lp:1468388)
* Push center on zoom, use middle mouse button to pan, limit panning, and
  pan while moving object settings from schematic editor to symbol library
  editor and symbol library viewer child windows.
* Push center on zoom, use middle mouse button to pan, limit panning, and
  pan while moving object settings from board editor to footprint library
  editor and footprint library viewer child windows.
2015-08-25 10:16:15 -04:00
Maciej Suminski 11275f78e5 Preserve module editor settings when a new footprint is created. 2015-08-25 11:44:45 +02:00
Maciej Suminski 8fa28797f9 Fixed the problem of GAL frames excessively taking over focus in Windows. 2015-08-25 11:21:00 +02:00
Tomasz Wlostowski 0723ac5bef enumeratePads: fix segfault when no module is loaded in the editor 2015-08-25 10:22:52 +02:00
jean-pierre charras 204eb49ce5 Minor enhancement in python console: remove margins around the client area. simplify code. 2015-08-24 20:32:56 +02:00
Wayne Stambaugh 7ba02bad7c Pcbnew: bug fix and minor changes in github plugin. (fixes lp:1484331)
* Catch all unhandled exceptions derived from std::exception() class in
  KICAD_PLUGIN::get_remote_zip() to prevent KiCad from crashing when
  exceptions are thrown from the C++ standard library.
* Make boost::system::system_error() catch const and and improve comments
  about avhttp library usage in KICAD_PLUGIN::get_remote_zip().  Thanks to
  Dick Hollenbeck for these improvements.
2015-08-24 13:30:26 -04:00
Mario Luzeiro 61f4f1ca9d Add hole count function and other minor improvements to SHAPE_POLY_SET. 2015-08-24 09:55:22 -04:00
Marco Ciampa 49ef3ac132 Fix environment variable dialog error messages. 2015-08-24 08:50:47 -04:00
unknown 44b5d19d3b barcodefootprint wizard - cleanup python code. 2015-08-23 21:44:34 +02: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
jean-pierre charras 705eb1f245 Minor change in a fp wizard (better name). Add a new fp wizard to generate a fp with a bar code on the silkscreen layer. 2015-08-23 15:06:39 +02:00
unknown d6b1aa764e kicad footprint plugins wizards: avoid spaces in generated footprint names (which often creates issues in filenames) 2015-08-23 14:44:56 +02:00
jean-pierre charras bb3dc5771c Pcbnew: Fpid parser: Fix crash when reading a .kicad_pcb file containing a valid fpid with a revision value.
Fix an issue when a .kicad_pcb file contains an incorrect fpid ( containing a '/ ' in footprint section ) . After saving the board the file was no more readable, due to a broken fpid saved in file
(can happens in old .kicad_pcb files, coming from the bzr 4022 stable version, and/or in files converted from an other EDA tool like altium)
Fix 2 very minor coverity warnings.
2015-08-23 14:35:49 +02:00
Maciej Suminski 0386a4df94 Bulletproof canvas switching. 2015-08-21 10:33:36 +02:00
Tomasz Wlostowski a33fc223ae router: take net clearance when deskewing diff pairs.
Apply correction on DP corner radius to avoid DRC issues.
2015-08-21 16:37:44 +02:00
Tomasz Wlostowski b4135e0a33 router: fixed snapping to target while placing diff pair 2015-08-21 16:35:34 +02:00
jean-pierre charras 2605ab0984 Fixes related to exchage footprint dialog:
* The exchange dialog can be now called from the footprint popup menu.
* It can be (as before) called from the footprint properties menu, but in this case, the footprint properties menu is closed before calling the exchange menu.
* Changes in exchange dialog to avoid truncation of long FPIDs
* Changes in exchange dialog to make some texts translatable (Previously, the same English sentence was used in very different contexts)
2015-08-20 20:13:18 +02:00
Tomasz Wlostowski 2b70aeafba fix rare segfault when head line had unsimplified segments 2015-08-20 15:11:16 +02:00
jean-pierre charras 392600276f Pcbnew: Add a wizard to download 3d shapes libraries from Github and make a local copy. 2015-08-20 12:23:38 +02:00
Tomasz Wlostowski 9da18f6db6 router: fix ortho snap mode for diff pairs 2015-08-20 09:46:19 +02:00
jean-pierre charras edbcf2d0cb Add a wizard to Pcbnew to download 3d shapes libraries from Github 2015-08-20 09:14:44 +02:00
Tomasz Wlostowski a96299d456 router: improvements to shove algorithm 2015-08-19 18:07:16 +02:00
Tomasz Wlostowski 95c59c8060 router: multiple fixes:
- PNS_ITEMSET now keeps ownership info (does not rely on PNS_ITEM::Owner(), avoiding the risk of dangling pointers)
- fixed vias losing connected traces when dragging in mark obstacles mode
- fixed rare segfault when board item returned null netclass
2015-08-19 17:27:23 +02:00
Cirilo Bernardo 33a9f7ecc8 Pcbnew: restore automatic calculation of reference position when exporting to IDF. 2015-08-18 19:48:42 -04:00
jean-pierre charras adca4d55f0 Dialog tracks and vias properties on GAL: fix a minor issue ( min size not set: missing call to SetSizeHints() ), which fixes also a more annoying issue on Unity (dialog never raised).
Remove useless code to find 3 sizers by just making them protected in wxFormBuilder.
2015-08-18 18:15:57 +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
Tomasz Wlostowski f6689f75a8 router: fixed loop removal issue 2015-08-18 11:38:17 +02:00
jean-pierre charras eb71c15b46 3D viewer: Minor enhancement: in show on/off layers menu option, user layers options are disabled in realistic mode to avoid mistakes, because they are never shown in this mode. 2015-08-18 12:59:43 +02:00
Chris Pavlina 56084b3ee2 Fix bug in Eeschema component rescue library. (fixes lp:1485352)
* Rescue creates invalid file for project names with spaces.  This fix replaces the spaces with
  underscores to resolve the issue.
2015-08-17 19:12:34 -04:00
Wayne Stambaugh b384c94e46 Envrionment variable dialog improvments.
* Remove ENVIRONMENT_VARIABLE_CHAR_VALIDATOR::OnChar() because it was skipping
  the filtering of the first character.  Not sure what was going but this seemed to fix the issue.
* Added environment variable name test to DIALOG_ENV_VAR_CONFIG::TransferDataFromWindow
  because apparently validators do not get called in wxGrids even whe the extend window style
  wxWS_EX_VALIDATE_RECURSIVELY is set.
* Set the default button using wxFormBuilder since the OK button is not part of a wxStdDialogButtonSizer.
* Minor improvements to the HTML help dialog.
* Fix assertion when calling HTML help dialog.  Apparently any dialog derived from DIALOG_SHIM must
  have a KIWAY top level window as a parent.
2015-08-16 20:30:29 -04:00
jean-pierre charras c63f6aa3c5 Polygon boolean operations on SHAPE_POLY_SET: Add a parameter (aFastMode) to speed up calculations. By default, the transforms use an option to create stricly simple polygons.
In 3D viewer, this option can take a *very long* calculation time (minutes instead of seconds, or hangs) and they are now using aFastMode = true to do polygon calculations, especially for zones inside zones belong to the same net but having different priority (which creates weak polygons).
aFastMode = false is the default for other calculations (zone filling) as before.
2015-08-16 14:07:58 +02:00
jean-pierre charras cc2fe47c95 Fix a few coverity warnings. 2015-08-16 11:02:19 +02:00
Maciej Suminski 0cad702fc7 Fixed footprint editor crash on ref/val text layer change (GAL). 2015-08-15 16:00:34 +02:00
Maciej Suminski a09d6431e4 Coverity report fix: handle an exception potentially thrown by CONTEXT_MENU::runOnSubmenus. 2015-08-15 16:00:33 +02:00
Henrik Nyberg 5486104e8d Fixed the missing remove zone corner menu entry. 2015-08-15 15:28:48 +02:00
unknown 37742627b4 Restore Meter option to VRML export + other changes
* Adds a "Grid Reference Point" to the VRML export; this allows a user to specify the (X,Y) coordinate which will be the origin point on the output
 * Adds a "Grid Reference Point" to the IDF export; this is similar in purpose to the corresponding VRML export feature.
2015-08-13 15:13:34 +02:00
jean-pierre charras ef0e13331d Eeschema: fix and other case where the UFT8 strings are not correctly read on Windows (part name and ref in schematic files correctly saved but not correctly read) 2015-08-13 12:48:14 +02:00
Tomasz Wlostowski e342744a32 router: Do not use reference to a temporary object. Prevent double freeing (m_joints). Draw tuned track always on top. 2015-08-12 21:12:13 +02:00
Maciej Suminski 6989af7904 Minor fixes (PNS). 2015-08-12 21:12:13 +02:00
Maciej Suminski 127fcfa7c9 Code formatting. 2015-08-12 21:12:12 +02:00
Henrik Nyberg a6c94e26f6 Improved code for handling zone corner dragging (GAL). 2015-08-12 10:15:45 +02:00
jean-pierre charras 666e825e17 Eeschema: fix Bug #1483693 : eeschema for Windows fails to deal with Cyrillic (UTF8) (Windows specific).
lib_dxf/libdxfrw.cpp: try to fix a coverity warning about resource leak.
2015-08-12 09:24:18 +02:00
jean-pierre charras 5ba6cb975b 3D viewer: a few optimizations to speed up scene building, and better look of circles in footprint outlines. 2015-08-11 13:56:02 +02:00
Maciej Suminski 65ebfe12c1 Fixed oval pads highlighting in mark collisions mode (PNS). 2015-08-10 17:50:10 +02:00
jean-pierre charras 7a51a502b4 3D viewer: optimizations in code to build the 3D view.
Remove no more used code.
Building the 3D view is now faster.
2015-08-10 17:17:10 +02:00
Maciej Suminski 8b46c4eb8f Fixed crash when pcbnew was set to start with GAL canvas. 2015-08-10 14:34:55 +02:00
unknown 2330b13864 Fix coverity reported strcat/strcpy potential overflows 2015-08-10 10:17:22 +02:00
unknown 140d17bf82 fixes Coverity issue 109780 in project_rescue.cpp: an uncaught exception on load or save of the project library list 2015-08-10 09:39:13 +02:00
jean-pierre charras ef2e05c8d7 Try to fix coverity warning 102619. 2015-08-09 20:13:22 +02:00
jean-pierre charras fa55c0f18e Minor fix (minor bug #148296) and very minor change. 2015-08-09 17:04:49 +02:00
jean-pierre charras 11be2b2d3d Commit missing files 2015-08-09 11:46:18 +02:00
jean-pierre charras 9de24b15ae Pcb_calculator: Fix a bug which prevents the pcb_calculator to write and read correctly its configuration file.
* Cosmetic enhancements in transmission lines panel.
* Fix very minor cosmetic issues in track width versus current panel
2015-08-09 11:03:25 +02:00
unknown 61818578fb PCB calculator enhancement: track width units change auto-recalculation:
* Automatically update results on input change
* Allow user to specify trace width and calculate maximum current it can handle
* Allow the trace thickness to be set separately for external and internal layers
* Allow specification of the resistivity
* Change the non-editable text boxes (resistance, power loss etc) to labels
2015-08-09 09:15:42 +02:00
jean-pierre charras f58e288140 Pcbnew option dialog: fix very minor bug #1482647 and remove the option about zone filling algo, now useless. 2015-08-08 15:54:32 +02:00
jean-pierre charras 9d3a24a87c Fix bug #1482809 (Pcbnew crashes when opening if it was closed in OpenGL mode) 2015-08-08 14:44:39 +02:00
Maciej Suminski 6018bb6625 Pcbnew saves the type of used canvas. 2015-08-07 19:15:47 +02:00
Maciej Suminski 1d6fc920e6 Simplified code for switching canvases.
Moved SwitchCanvas() to PCB_BASE_FRAME and made it common for all subclasses.
More code from UseGalCanvas() is shared between classes.
2015-08-07 19:15:36 +02:00
Maciej Suminski ddcdda1a59 GalType -> GAL_TYPE 2015-08-07 18:24:43 +02:00
Maciej Suminski f43510739c Append board in GAL. 2015-08-07 18:24:42 +02:00
Maciej Suminski 0bd85fd8d1 Fixed a minor memleak. 2015-08-07 18:20:49 +02:00
Maciej Suminski 03d8d6850a Minor fixes. - Prevent a crash if m_activeTools is empty (should not happen, but you know the Murphy's law) - Better use of conditions in FOOTPRINT_EDIT_FRAME::Process_Special_Functions() 2015-08-07 18:17:51 +02:00
Maciej Suminski a4ffb065d4 Corrected TEXTE_MODULE:GetBoundingBox() function. 2015-08-07 18:17:51 +02:00
Maciej Suminski 9ecc593aac TOOL_SETTINGS acquires wxConfigBase each time it is used. 2015-08-07 18:17:51 +02:00
Maciej Suminski 5cd464f244 Exit gracefully when there are errors during initialization. 2015-08-07 17:07:43 +02:00
Maciej Suminski 5caa1523bd Handling Coverity reports. 2015-08-07 17:07:06 +02:00
jean-pierre charras a0b5d1cd7b Pcbnew, dialog exchange footprints: better messages in option radio box. 2015-08-07 10:28:14 +02:00
Cirilo Bernardo 64760cc952 Pcbnew: minor exporter fixes.
* Remove unused 1 inch units choice from VRML export dialog.
* Fix model offset calculation in IDF exporter.
2015-08-06 19:13:02 -04:00
Chris Pavlina acb2c54594 Option dialog mnemonic and padding fixes
* Fix conflicting mnemonics in Eeschema options dialog.
* Add mnemonics to Pcbnew, Footprint editor, and Component editor option
  dialogs.
* Fix padding in all option dialogs.
* Remove obsolete DIALOG_LIBEDIT_DIMENSIONS.
2015-08-06 14:40:22 -04:00
Wayne Stambaugh 09d8e85d84 Pcbnew: minor fixes to exchange footprint dialog.
* Replace module nomenclature with footprint for improved consistency.
* Replace abbreviations in control text.
* Replace exchange nomenclature with change.
2015-08-06 13:11:51 -04:00
Wayne Stambaugh 90a53b9aa2 Pcbnew: set default button in footprint editor options dialog. 2015-08-06 11:29:06 -04:00
jean-pierre charras d9ba0b975b Bug #1474624 fixed (eeschema crashes on a further pressing the DOWN KEY on the last component folder selection) 2015-08-06 11:17:23 +02:00
Chris Pavlina fa29c62277 Fix saving undo/redo limits in Eeschema. 2015-08-05 20:10:52 -04:00
Henner Zeller ecb046ad0e Footprint library install script improvements.
* Make WORKING_TREES configurable with an environment variable to simplify
  external install scripts.
* Use native sed functionality rather than grep to find relevant lines in
  github JSON (grep can create trouble if there is a global --color=always
  setting, guess how I found out about the color setting)
2015-08-05 11:01:16 -04:00
Chris Pavlina aaadb40a71 Make undo/redo limits user configurable.
* Add code to allow each editing window it's own undo/redo count.
* Add code to allow for infinite undo/redo when count is set to 0.
* Add edit control to all editing windows general options dialog for
  user configuration of undo/redo count.
* Add code to save and restore undo/redo count for each editing window.
2015-08-05 10:28:27 -04:00
Jon Neal 89f4316afc Pcbnew: fix minor string formatting error in DIALOG_PLOT_BASE. 2015-08-05 09:00:01 -04:00
Chris Pavlina 4403a56480 Eeschema: fix minor flex grid issue in DIALOG_EESCHEMA_OPTIONS with GTK. 2015-08-05 08:40:21 -04:00
Maciej Suminski d624115f35 Fixed failing undo while routing. 2015-08-04 23:08:13 +02:00
Tomasz Wlostowski b6f61ff676 PNS: correctly snap to offset pads 2015-08-04 12:15:47 +02:00
Tomasz Wlostowski 86b07d89a7 PNS: fixed crash on via dragging 2015-08-04 11:37:16 +02:00
Chris Pavlina 21b0818e58 KiCad: do not create noname.pro when no project file is defined.
* Disable Eeschema, Component Editor, Pcbnew, and Footprint Editor toolbar
  buttons and menu entries to prevent them from creating project, schematic,
  and/or board files.
2015-08-03 16:56:37 -04:00
Maciej Suminski 4739c54f0e Few minor updates to CACHED_CONTAINER & GPU_MANAGER classes. - Reduced the number of memory reallocations - Updated code for tests 2015-08-03 21:12:00 +02:00
Maciej Suminski 3e99290a3d Fixed style change in WX_HTML_REPORT_PANEL after a reported action. 2015-08-03 21:11:59 +02:00
Maciej Suminski 2a93d083ee More DXF import fixes. 2015-08-03 21:11:59 +02:00
Maciej Suminski 0fbf31ef38 P&S: memory mgr & disappearing trace fixes. Still a bit buggy, though... 2015-08-03 21:11:51 +02:00
Tomasz Wlostowski 07f5516e59 geometry: Parse() method for SHAPE_LINE_CHAIN, working on Read() in SHAPE_FILE_IO 2015-08-03 20:29:44 +02:00
Tomasz Wlostowski 9c2bcb2f3c Fixed crash on right click on zone with GAL mode. 2015-08-03 11:53:58 +02:00
Bernhard Stegmaier 5f4423f7af Changed abs() to std::abs() in pns_topology.cpp. 2015-08-03 10:50:05 +02:00
Tomasz Wlostowski 037772fe3c Corrected SHAPE_POLY_SET::pointInPolygon() return value. 2015-08-03 10:45:30 +02:00
Wayne Stambaugh 7b39b1bfc4 Pcbnew: fix dimension dialog default button on Linux. 2015-08-02 18:14:13 -04:00
jean-pierre charras 8174e1aefd 3D viewer: speed up the silkscreen layer generation (not perfect, but it help). 2015-08-02 20:59:29 +02:00
jean-pierre charras b0585253c3 Avoid creation of the zones_dump.txt file each time the zones are re-filled, when this option is not enabled. 2015-08-02 19:39:24 +02:00
jean-pierre charras 9f61254839 Fix bug #1480619 (Moving silkscreen reference of rotated footprints glitches in GAL) 2015-08-02 11:19:01 +02:00
Wayne Stambaugh 0cff6444e0 Fix assertion when exporting hotkeys. (fixes lp:1479859)
* wxFD_SAVE and wxFD_OPEN cannot be specified when calling wxFileDialog.  it even says so in
  the documentation.
2015-08-01 17:46:27 -04:00
Wayne Stambaugh e9ed3e3e55 Pcbnew: make OK button default item in dimension properties dialog. 2015-08-01 17:30:38 -04:00
jean-pierre charras 6a6a55f9bf A few messages modified in dialogs to help translations. 2015-08-01 14:48:38 +02:00
jean-pierre charras 4b4d9d9770 Plot solder mask layer: fix incorrect margin of zones drawn on this layer (zone areas were slighly larger than the actual areas)
Fix a few  minor and very minor other issues: coverity warnings and compil warning.
2015-08-01 12:20:23 +02: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
Maciej Suminski f140e36021 Footprint editor uses the same canvas as the layout editor. 2015-07-31 17:40:19 +02:00
Maciej Suminski 73a6e95407 Ratsnest algorithm takes into account pad offset. 2015-07-31 17:40:19 +02:00
Maciej Suminski e3cbfb0609 Better way of handling changes in EDIT_TOOL (GAL). 2015-07-31 17:40:19 +02:00
Simon Richter 27a2098e0a Add <cstddef> include for offsetof 2015-07-30 14:29:50 +02:00
Simon Richter 362ebd039d Remove superflous includes. 2015-07-31 09:50:47 -04:00
Simon Richter b35ad79d7b Disambiguate fabs() cast. 2015-07-31 08:15:42 -04:00
Maciej Suminski cb629e0ad4 Fixed DXF placing problem (GAL). 2015-07-30 13:49:36 +02:00
Maciej Suminski 781ac8df9f RN_NET::GetClosestNodes() minor fix. 2015-07-30 13:49:36 +02:00
Maciej Suminski 3049bc1d5f Fixing SELECTION_TOOL heuristics, take #2. 2015-07-30 13:49:35 +02:00
Maciej Suminski 4718b6d7c8 Code formatting. 2015-07-30 13:49:35 +02:00
Maciej Suminski 29cbaa206e Fixed updating of Zoom & Grid context menus. 2015-07-30 13:49:35 +02:00
Maciej Suminski 094c286024 Fixed issues reported by Coverity. 2015-07-30 13:49:35 +02:00
Tomasz Wlostowski fb29373b4c fix hang in fracturing algorithm 2015-07-30 13:49:22 +02:00
unknown 07ad6cb0bb Fix potential crash in pcbnew (if if a pad in a footprint in a mal-formed .pretty library contains a reference to a net) 2015-07-29 20:55:56 +02:00
jean-pierre charras 21b98f40b7 Fix a minor bug relative to SCH_MARKERs introduced in rev 6014 2015-07-29 20:48:20 +02:00
jean-pierre charras 6dd0073130 Move the non shared file class_sch_screen.h to eeschema folder. Code cleaning. Remove some wxCHECK_VERSION tests now useless. 2015-07-29 20:06:45 +02:00
jean-pierre charras 32f0ea621f Shape poly set: fix bug in BBox calculation. Class MARKER : fix broken code and clean code. Fix bug #1369682 (EESchema Erc not show error count) due to this broken code. 2015-07-29 14:18:53 +02:00
Maciej Suminski 63b0e63152 Prevent 'select copper' & 'select trivial connection' from picking modules. 2015-07-28 17:33:18 +02:00
Maciej Suminski f7dbd8a213 Fixed a refresh issue on footprint insert (GAL). 2015-07-28 17:33:18 +02:00
Maciej Suminski c632f3db18 Update ratsnest on footprint change (GAL). 2015-07-28 17:33:18 +02:00
Maciej Suminski 5402bf0960 Allow zone drawing tool to start a new zone in the previous zone last point. 2015-07-28 17:33:18 +02:00
jean-pierre charras 3d17807fcc Fix Bug #1478709: http links in template description does not work.
Also add  PAD_SHAPE_<PADSHAPE> equiv to  PAD_<PADSHAPE> and PAD_ATTRIB_PAD_<PADATTRIB> equiv to  PAD_<PADATTRIB>
(<PADSHAPE> = ROUND, RECT...  and <PADATTRIB> =SMD, CONN ... )
2015-07-28 15:05:47 +02:00
Maciej Suminski 55b09483df Picker tool captures cursor by default. 2015-07-28 11:11:18 +02:00
Maciej Suminski c9837595ef Fixed VIEW_CONTROLS too frequent reset. 2015-07-28 10:30:06 +02:00
Maciej Suminski e9921d8eea Fixed an assert when footprint viewer was closed before the pcbnew window. 2015-07-28 10:29:00 +02:00
Maciej Suminski 6983f90b9f Align cursor to the grid when dragging multiple items (GAL). 2015-07-28 10:28:59 +02:00
Jean-Pierre Charras fb8afc61ab Fix selfintersecting or outline intersecting holes issue. 2015-07-27 21:48:38 +02:00
Jean-Pierre Charras 81e2f2e22e boost::polygon from bitmap2component 2015-07-27 21:48:17 +02:00
Jean-Pierre Charras 1d26647a60 de-boostization: Fixed incorrect zone fill clearance when overlapped with another zone of higher priority. 2015-07-27 21:47:49 +02:00
Tomasz Wlostowski 1d7e49a45c SHAPE_POLY_SET::Inflate(): correct arc approximation for negative offsets (deflation). Control circle->segments count explicitly in all Inflate() calls 2015-07-27 21:46:47 +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
unknown a30a2d72e8 3D viewer: Add icons in file menu 2015-07-27 17:01:35 +02:00
jean-pierre charras 078429581d Kicad manager: when creating a new project, also creates (if not exist) the 2 main files: <project>.sch and <project>.kicad_pcb.
It should avoid the message dialog asking for creating files the first time eeschema or pcbnew are launched.
2015-07-27 09:59:11 +02:00
jean-pierre charras f18aef8182 Minor fixes: Bug #1478279 : wrong icon in "YES/NO" dialog; Bug Bug #1478278 (crappy warning/log messages) 2015-07-26 19:50:13 +02:00
unknown 8b18f5118c 3D viewer: cosmetic modification: use blue color for Z axis and Green color for Y axis 2015-07-26 14:35:27 +02:00
unknown eda130dbc6 3D viewer: cosmetic enhancement: color of 3D axis is equal to the color of the corresponding icon in toolbar 2015-07-26 13:35:05 +02:00
unknown 508a9b2f06 IDF tool export: fixes a bug in the idf2vrml tool which results in the incorrect rendering of OTHER_OUTLINE sections which are placed on the bottom layer. 2015-07-25 14:51:42 +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
jean-pierre charras ee08e8d1de Pcbnew: Fix some issues in dialog netlist: remove useless check box, avoid a message sometimes erroneously shown, use lazy mode to build the netlist report, store the netlist report options in user config. 2015-07-24 20:49:47 +02:00
unknown e4c8854159 Added lazy rendering mode for HTML reporter widget (allows a faster report creation, when the report has many lines) 2015-07-24 17:47:48 +02:00
jean-pierre charras 9b9c7945a2 Many minor fixes (like bug #1477213). Better help in dialog environment variables editor (the tooltip was never shown on Windows) 2015-07-24 12:23:34 +02:00
Maciej Suminski d010703eaf Fixed cursor freeze in pcbnew (GAL). 2015-07-24 10:58:47 +02:00
Maciej Suminski 656790a672 Make module texts selectable if overlapping with module pads. 2015-07-24 09:42:46 +02:00
Maciej Suminski 74584e2081 Fixed crash on undo layer change in TEXTE_MODULE. 2015-07-24 09:42:46 +02:00
Maciej Suminski 7650b0e8ad Minor code cleaning (PNS). 2015-07-24 09:42:46 +02:00
Maciej Suminski d6bc33bd42 Removed a few more memory leaks and fixed crash on exit. 2015-07-24 09:42:46 +02:00
Maciej Suminski 982eee7905 Do not invoke PNS inline dragging when 'Duplicate' is run. 2015-07-24 09:42:45 +02:00
Maciej Suminski f7fa0852b5 Fixed screen scrolling on zooming in/out. 2015-07-24 09:42:45 +02:00
Maciej Suminski cd205db812 VIEW_CONTROLS::GetMousePosition() returns VECTOR2I. 2015-07-24 09:42:45 +02:00
Wayne Stambaugh 49d8b90e0b Fix middle mouse panning bug and cross-hair drawing bug. (fixes lp:1462067).
* Update cross-hair position when using mouse wheel to pan.
* Add ugly hack when mouse cursor enters canvas to force the cross-hair visibility counter
  back to zero.  There was a bug on Windows when using the middle mouse button to pan
  and the user released the middle mouse button off of the canvas, the cross-hair would no
  longer be displayed until the window was closed and reopened.
2015-07-22 19:33:50 -04:00
Simon Richter 068b1d035f Fix sort function signature used by EDA_LIST_DIALOG. 2015-07-22 18:54:55 -04:00
Tomasz Wlostowski 591f54f540 DRAWING_TOOL: show cursor when placing text 2015-07-22 13:51:59 +02:00
Tomasz Wlostowski afb6571249 PNS_NODE: fix segfault when dragging a track/corner of a track forming a ring 2015-07-22 13:51:12 +02:00
Tomasz Wlostowski 8752f46f07 PNS_ROUTER: correctly handle NPTH pad layer sets. 2015-07-22 13:49:53 +02:00
Maciej Suminski 83171482b3 Fixed a memleak (CONDITIONAL_MENU). 2015-07-22 10:46:57 +02:00
Maciej Suminski 6cb57f100a Fixed a memleak (PNS). 2015-07-22 10:46:56 +02:00
Maciej Suminski b16ade0805 PNS code formatting. 2015-07-22 10:46:56 +02:00
Jan Dubiec 7f1f436a4e Proper OPT_OBSTACLE casting. 2015-07-22 10:46:45 +02:00
Wayne Stambaugh ba32ccbbb2 KiCad: do not create noname.pro file in KiCad binary path. (fixes lp:1473079)
* If a valid project name was not specified or the default project name was not
  specified, do no automatically create noname.pro which ends up in the current
  working directory.  On Linux this is generally not writable by the user but on
  windows it usually is and create an unwanted noname.pro file.
2015-07-21 15:43:19 -04:00
Chris Pavlina 3921f78ac2 Eeschema: fix connection indicators for power symbol targets. 2015-07-21 10:07:52 -04:00
Chris Pavlina ca0849b968 Pcbnew: fix default button while in text edit control on Linux in footprint text edit dialog. 2015-07-21 09:28:19 -04:00
Jan Dubiec e173023e27 Prevent wxWidgets_CONFIG_OPTIONS specified on the command line from being overwritten. (fixes lp:1472919) 2015-07-21 09:14:38 -04:00
Wayne Stambaugh 8482637c83 Default KISYSMOD and KISYS3DMOD path fixes. (fixes lp:1455472) 2015-07-20 20:46:58 -04:00
Chris Pavlina 752d0df916 Eeschema: fix string formatting assertion in dialog_print_using_printer.cpp. 2015-07-20 19:29:59 -04:00
Chris Pavlina 991d1066ef Pcbnew: improve dialog message when no footprints on BOM export. 2015-07-20 16:49:39 -04:00
Chris Pavlina e94ebf561e Eeschema: fix connection indicator. (fixes lp:1476005).
* When multiple pins are in the same position and one is not connected,
  show connection indicator correctly.
* LIB_PIN::IsVisible should be a const method so it can be called on
  DANGLING_END_ITEM children without having to discard const.
* Test the (!IsVisible() && GetType() == PIN_POWER_IN) condition in a method
  LIB_PIN::IsPowerConnection to avoid duplicating that condition if the test
  needs to be performed in more than one place. (e.g. dunderheads like myself
  might forget about the necessary GetType() == PIN_POWER_IN and just check
  visibility.)
* Coding style fix: break a couple lines that were above the 99-column maximum.
* Add and/or improve Doxygen comments on SCH_COMPONENT::IsPinDanglingStateChanged
  and SCH_COMPONENT::IsDanglingStateChanged.
2015-07-20 15:49:32 -04:00
Hartmut Henkel 5013fa2c2f Eeschema: fix pspice netlist exporter bug. (fixes lp:1472756) 2015-07-20 10:44:30 -04:00
Ruben De Smet 4b98dc9dda Minor coding policy fix. 2015-07-20 10:24:56 -04:00
Nick Ostergaard 87d2f55e7f Eeschema: add 100 mil grid size. 2015-07-20 10:11:34 -04:00
jean-pierre charras ba5d45c479 Eeschema: fix Bug #1475905: Opening a legacy (.brd) file from a schematic fails. Now opening a board from eeschema works like from Kicamanager: if a .brd file exists and the .kicad_pcb file does not exists, the .brd file will be loaded. 2015-07-19 16:38:02 +02:00
jean-pierre charras 1885a924d3 Fic bug #1475891 (Assertion failed when appending a board in pcbnew) 2015-07-19 11:18:07 +02:00
jean-pierre charras 3e0334a972 Avoid Cvpcb crash from malformed fp libraries (namely converted from Eagle) when the fp names are not coded using ASCII/UTF8 code. 2015-07-17 15:13:31 +02:00
unknown 40ccc0bedf replace round() with KiROUND(), our function that is used almost everywhere for rounding, and detects int overflows in debug mode. 2015-07-17 10:26:48 +02:00
jean-pierre charras 3372b77b43 Fix a minor issue on Windows: when a viewer or a lib editor is already open and iconized, and when one try to run it, it stayed inconized. It is now raised, like on Linux. 2015-07-16 21:29:40 +02:00
Maciej Suminski 27eafcb5c1 Fix erroneous cursor control with keys when grid size is less than one pixel with certain zoom levels. 2015-07-16 17:52:08 +02:00
Maciej Suminski 232d7462b6 Removed wrong assert. 2015-07-16 12:05:07 +02:00
Maciej Suminski dd8f7cc4b5 Fixed crash on ratsnest calculation after a zone was removed. 2015-07-16 11:10:31 +02:00
Maciej Suminski cba132aaf4 Fixed an assert in the Create Array dialog. 2015-07-16 11:10:30 +02:00
Maciej Suminski fbdaf9bbdc Removed unnecessary header file. 2015-07-16 11:06:17 +02:00
Maciej Suminski 6451fcf174 Fixed double EndModal() assert in the Global Deletion dialog. 2015-07-15 19:05:59 +02:00
Maciej Suminski 36d3d9f78e Cursor warps to the drag origin (GAL). 2015-07-15 17:32:30 +02:00
jean-pierre charras 5fb7c211f9 Fix issues on Unbuntu Unity (dialogs/frames not raised when they are created and shown) 2015-07-15 15:03:19 +02:00
jean-pierre charras 2ee222e3bc Fix issues on Linux/Unity (dialogs not always raised) 2015-07-15 14:41:30 +02:00
Maciej Suminski 4b45146c46 Improvements to the SELECTION_TOOL heuristics & sanitization rules. 2015-07-15 14:08:52 +02:00
Maciej Suminski 6a6ea35335 Fixed assert on double 'Move' command invocation (GAL). 2015-07-15 14:08:52 +02:00
Maciej Suminski 59af7a96f8 Minor code cleaning. 2015-07-15 14:08:52 +02:00
Maciej Suminski 36d1818b54 Fixed snapping problem when commands are issued from the context menu (GAL). 2015-07-15 14:08:51 +02:00
Maciej Suminski 2752953f34 Merging for non-copper zones (GAL). 2015-07-15 14:08:50 +02:00
Maciej Suminski 694ff39f53 Footprint Library Wizard accepts any folder name as .pretty library. 2015-07-15 14:08:50 +02:00
Maciej Suminski 6f8b02c726 Zones cleared in the legacy canvas are not refilled on modification in GAL. 2015-07-15 14:08:50 +02:00
Maciej Suminski 80885a4635 Fixed a few warnings. 2015-07-15 14:08:50 +02:00
Maciej Suminski 600bb2b640 Track & via properties dialog start with focus on track width/via diameter text input. 2015-07-15 14:08:50 +02:00
jean-pierre charras ac1deb32ee Fix issues on Linux/Unity (dialogs not always raised) 2015-07-15 10:18:48 +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 9f18e5a98f SHAPE_POLY_SET::Inflate(): correct arc approximation for negative offsets (deflation). Control circle->segments count explicitly in all Inflate() calls 2015-07-14 15:05:41 +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 c8f8256329 Fix 2 minor issues in SVG plots: sometimes a color was not good. Rectangles with 0 vertiacl or horizontal size are not plot.
Minor code cleaning.
Also fix a minor coverity warning about a not initialized member.
2015-07-13 20:36:06 +02:00
Andrew Zonenberg 6289f5bcf4 Fixed a bug causing layer-switch events to noe be handled by GAL. 2015-07-13 17:18:29 +02:00
Andrew Zonenberg 75d1dc63cb Merged changes from mainline 2015-07-13 07:53:19 -07:00
Andrew Zonenberg 0a5847c71a Removed a couple of trailing spaces 2015-07-12 21:57:07 -07:00
Andrew Zonenberg 1ad3b05664 Fixed a bug causing layer-switch events to not be handled by GAL 2015-07-12 21:52:17 -07:00
Andrew Zonenberg b87ab79d6d Reverting last commit since it causes regressions 2015-07-12 12:54:11 -07:00
Andrew Zonenberg ed43694682 GAL now hides cursor when mouse is outside the view. No change to legacy view. 2015-07-12 12:10:59 -07:00
Andrew Zonenberg 2fdfaca38c Merged changes from mainline to this branch 2015-07-12 09:18:42 -07:00
jean-pierre charras d7f4c76682 build process on mingw/msys2: force usage of a response file at archive/link stage to avoid truncation of the command line when the list of modules to archive/link is very long (happens for eeschema and pcbnew). 2015-07-12 11:01:40 +02:00
Andrew Zonenberg 561a962977 Fixed bug where "add text" tool in module editor did not update the toolbar radio buttons correctly 2015-07-11 17:03:50 -07:00
Andrew Zonenberg 31c9856d22 Fixed bug where "add text" tool in module editor did not update the toolbar radio buttons correctly 2015-07-11 17:03:50 -07:00
Andrew Zonenberg 6775cf392a Removed leading space 2015-07-11 16:50:31 -07:00
Andrew Zonenberg 4c065e63c8 Removed leading space 2015-07-11 16:50:31 -07:00
Wayne Stambaugh c01a9d0285 Footprint editor dialog improvments and UI policy fixes.
* Clean up formatting and make OK button the default in the array dialog.
* Make the OK button the default in the move exact dialog.
* Change the directory picker control from wxGenericDirCtrl to wxDirPickerCtrl so the native
  directory picker dialog is used to select the directory in the select pretty library path dialog.
* Make the OK button the default in the select pretty library path dialog.
2015-07-11 19:11:34 -04:00
Andrew Zonenberg 1ea566b59d Fixed bug where GAL text tool was overzealously capturing the cursor when not necessary 2015-07-11 16:03:07 -07:00
Andrew Zonenberg 186d0a4fd3 Fixed bug where GAL text tool was overzealously capturing the cursor when not necessary 2015-07-11 16:03:07 -07:00
Andrew Zonenberg a3a0db9be9 Fixed bug where GAL module editor does not release mouse capture after exiting text tool 2015-07-11 15:31:01 -07:00
jean-pierre charras 1c9115ee91 opengl_gal: fix a strange but already encountered issue on Ubuntu/Unity when switching to GAL: the dialog which test the opengl version was never raised, and the Pcb editor frame partially no more responding to menu events.
Also fix a bug: this test dialog was never destroyed.
2015-07-13 10:46:05 +02:00
Nick Østergaard af1f3c9b49 Add git build version header support.
* Add CreateGitVersionHeader.cmake to extract git version information to create the kicad version
  header.
* Add check for .git folder in source path to trigger git version CMake macro.
2015-07-12 20:06:50 -04:00
Andrew Zonenberg d10c6dd1b3 Fixed bug where GAL module editor does not release mouse capture after exiting text tool 2015-07-11 15:31:01 -07:00
jean-pierre charras c291b88608 Eeschema: fix dangling ends when enter the first time in a sub sheet of a schematic hierarchy. Minor code cleanup. 2015-07-11 09:37:52 +02:00
Maciej Suminski c9370ae5e6 Fixed a PNS assert. 2015-07-10 23:42:13 +02:00
Maciej Suminski a530ffad50 Code formatting. 2015-07-10 23:42:05 +02:00
Tomasz Wlostowski a7613b6d6a Fixed cancelling inline track dragging. 2015-07-10 12:14:27 +02:00
Wayne Stambaugh 5ddc9b378b Correctly fix version header generation to be rebuilt during make.
* Use CMake add_custom_target() to run WriteVersionHeader.cmake as a command.
* Modify WriteVersionHeader.cmake to be run as a command instead of a macro.
* Add version header creation as a CMake common library build dependency.
* Add cached CMake variable KICAD_BUILD_VERSION when build version is defined during
  configuration.
2015-07-10 14:47:59 -04:00
unknown be42bd163b BOARD::chainMarkedSegments() : fix coding style, bad comments, and better debug messages. 2015-07-10 18:43:25 +02:00
jean-pierre charras 6ec3d891d4 Pcbnew: remove erroneous warning message when starting pcbnew if scripting mode is enabled and wxpython disabled 2015-07-09 21:22:40 +02:00
Maciej Suminski ca27eeb5c7 Fixed "select copper connection". 2015-07-09 20:04:54 +02:00
jean-pierre charras 718053376d forgotten python_scripting.cpp fix. 2015-07-09 18:51:08 +02:00
jean-pierre charras 01ae08a9a9 Remove the call to wxversion.py on winbuilder, because it does not work (not found, even when exists), ans it is not useful. Avoid crashes when wxPython scripting layer is not loaded, on kicad exit, and when trying to open the py console. 2015-07-09 18:44:23 +02:00
Maciej Suminski f0a1f6dd78 Hotkeys for selecting trivial or copper connection (GAL). 2015-07-09 17:11:34 +02:00
Maciej Suminski 825fe8e5de F4 panning (GAL). 2015-07-09 17:09:34 +02:00
Maciej Suminski 33e1797116 Tracks & vias properties dialog. 2015-07-09 13:35:51 +02:00
Maciej Suminski 9c44750ae0 Method to check WX_UNIT_BINDER value validity. 2015-07-09 13:35:50 +02:00
Maciej Suminski f7ea9f9136 DIALOG_TRACK_VIA_SIZE does not allow to set 0 for track width or via diameter/drill. 2015-07-09 13:35:50 +02:00
Maciej Suminski 13739217b8 New SELECTION_CONDITION subclass (OnlyTypes). 2015-07-09 13:35:49 +02:00
Jon Neal fdf5b821f0 Add centering cursor on zoom to GAL. 2015-07-09 10:18:27 +02:00
Garth Corral 901e96126d Fix OSX Python scripting builds. 2015-07-08 13:44:55 -04:00
jean-pierre charras da89f8a47a A bit of cleaning code. 2015-07-08 19:46:24 +02:00
Maciej Suminski 4fffd147f2 Fix one warning. 2015-07-07 18:38:49 +02:00
Maciej Suminski f2785d35bf Muting Coverity report. 2015-07-07 18:37:03 +02:00
Maciej Suminski 4661e39e08 Fixed displayed modifiers for hotkeys in context menus (GAL). 2015-07-07 18:37:00 +02:00
Maciej Suminski df15be4f01 CONTEXT_TRACK_VIA_SIZE_MENU: generic context menu that displays track/via sizes. 2015-07-07 18:36:56 +02:00
Maciej Suminski 3a908b8b8a PNS: fix hotkey conflict (Diff Pair Dimensions vs Drag). 2015-07-07 18:36:54 +02:00
Maciej Suminski 15e9e69ae0 Clicking with keyboard handles keyboard modifiers (GAL). 2015-07-07 18:36:52 +02:00
Maciej Suminski e7099036d7 Fixed one key delay when moving items with arrow keys (GAL). 2015-07-07 18:36:50 +02:00
Maciej Suminski 2dc9d2ae66 PNS: hide cursor after inline dragging. 2015-07-07 18:36:47 +02:00
Maciej Suminski 5b7d08f2fd PNS: initalize starting point. 2015-07-07 18:36:45 +02:00
Maciej Suminski 8e98008f67 PNS: prevent placing multiple vias in the same spot. 2015-07-07 18:36:43 +02:00
Maciej Suminski e7626a8592 PNS: hide preview via when disabled. 2015-07-07 18:36:41 +02:00
Maciej Suminski 66778e1b00 PNS code formatting. 2015-07-07 18:36:38 +02:00
Maciej Suminski 1b4daade82 GRID_HELPER anchors for vias (GAL). 2015-07-07 18:36:32 +02:00
unknown fa9727b3e3 Drc dialog, progress bar: fix issue on OSX. 2015-07-08 09:33:11 +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 351914da9d Fix minor and very minor compil and Cppcheck warnings. 2015-07-06 19:56:05 +02:00
unknown edeaaf23e4 Eeschema, libedit: Avoiding pin table crash on Mac (Use the automatic scrollbar, which works because it is enabled when the data view model is attached to the data view, which is sufficiently long after construction that the object is indeed complete.) 2015-07-06 18:06:54 +02:00
Tomasz Włostowski 24170f5588 Fixes to SHAPE_POLY_SET slitting/fracturing algo, some speed optimization. 2015-07-06 15:15:48 +02:00
Garth Corral c9739b622b Canvas switching with Alt-Fx on Mac OS. 2015-07-06 13:52:52 +02:00
Maciej Suminski 8c80f0b4dd Fixed fatal assert on track removal. 2015-07-06 10:52:58 +02:00
Wayne Stambaugh 94ad141570 Actually remove file CMakeModules/version.h.cmake forgotten in previous commit. 2015-07-05 15:27:00 -04:00
Wayne Stambaugh 9d69b73b85 Minor version string generation changes.
* Fix CMake macro create_bzr_version_header to always update version.h file whenever a repo change
  is found.  Running `make rebuild_cache is no longer required.
* Add new CMake function for writing version.h file.
* Always use version.h file for build version string instead of meaningless hard coded date.
* Only use bzr version string when build version is not defined at configuration time for stable release
  version strings.
* Minor cleanup of FindBazaar.cmake.
* Remove unnecessary version.h.cmake file.
2015-07-05 15:24:34 -04:00
jean-pierre charras c1bbf3ecb4 Temporary back to boost::polygon in 3d-viewer. Fix an assert warning in hashtables.h, when a wxString contains non basic ASCII chars (Bug #1470078). 2015-07-04 21:53:37 +02:00
jean-pierre charras b9f1ada90b Use Clipper lib in 3D viewer, in calculations that crashed the 3D viewer when using boost:: polygon. Work in Progress. 2015-07-04 18:38:08 +02:00
unknown a85964b8ad fix incorrect slot orientation and width in export IDF 2015-07-04 18:32:37 +02:00
jean-pierre charras 8d5ee67c9c New attempt to manage the Cmd key on OSX in menus. 2015-07-04 10:36:58 +02:00
Maciej Suminski bbce641ad5 Umbilical lines for module texts (GAL). 2015-07-03 20:58:13 +02:00
Maciej Suminski 453b05db09 One more zoom fit-to-screen fix (GAL). 2015-07-03 20:58:13 +02:00
Maciej Suminski 0cc6992d88 Double click finishes drawing (GAL). 2015-07-03 20:58:13 +02:00
Maciej Suminski 1b208e0a5e Display info in the message panel if only one item was selected using area selection tool. 2015-07-03 20:58:12 +02:00
Maciej Suminski 3cb095b7c2 GAL canvases update status bar, message panel & zoom widget. 2015-07-03 20:58:12 +02:00
Maciej Suminski 891bd3d629 Do not show 'Properties' menu entry if there is more than one item selected (GAL). 2015-07-03 20:58:11 +02:00
unknown 10098b5c71 Some minor fixes and cleanup. 2015-07-03 10:42:47 +02:00
jean-pierre charras 3907de0289 Modedit: fix Bug #1471020 (user grid not stored) 2015-07-03 10:15:37 +02:00
Maciej Suminski 705c4ef4c5 bugfix: Blank footprint viewer in legacy canvas. 2015-07-02 21:25:39 +02:00
Maciej Suminski 766da1e494 Code formatting. 2015-07-02 16:11:15 +02:00
Tomasz Wlostowski 506e8c4d89 added missing file 2015-07-02 16:11:02 +02:00
Tomasz Wlostowski f650eca784 dialogs: store inline drag mode in PNS settings dialog 2015-07-02 16:10:54 +02:00
Tomasz Wlostowski a180f70086 router: compute (and display) DP gap dynamically when tuning length 2015-07-02 16:10:49 +02:00
Tomasz Wlostowski 0ade919a98 router: fix shortcut crash & inline dragging for inline dragging P&S 2015-07-02 16:10:07 +02:00
Jonathan Jara-Almonte 2fd493255d router: compute diff pair gap on the fly when tuning the length 2015-07-02 16:10:02 +02:00
Tomasz Wlostowski 171d39c8d0 router: invoke interactive drag when dragging traces/vias in edit tool (disabled by default) 2015-07-02 16:09:56 +02:00
Tomasz Wlostowski a86fda1d37 tools: added TOOL_SETTINGS class for storing persistent tool settings in config file (just a wrapper for wxConfigBase) router: free angle mode (mark obstacles only) & persistent settings 2015-07-02 16:09:51 +02:00
Mathias Grimmberger 7724c581fd router: support for non-90 degree pad orientations 2015-07-02 16:09:43 +02:00
Tomasz Wlostowski 4abcc159d2 router: don't run optimizer if head line == NULL or on shove failure 2015-07-02 16:09:38 +02:00
Tomasz Wlostowski 52e193eded router: fixing assert 2015-07-02 16:09:32 +02:00
Tomasz Wlostowski e6dd016cb2 router: improve rounding error handling in hull calculation 2015-07-02 16:09:29 +02:00
Tomasz Wlostowski f96c65254c router: allow for insertion of a via without leading trace (e.g. in the middle of already existing trace) 2015-07-02 16:09:24 +02:00
Tomasz Wlostowski a3edd9706f router: more robust nearest obstacle clipping 2015-07-02 16:09:16 +02:00
jean-pierre charras c48a417dcd Pcbnew: Replace wxComboBoxes by wxChoice in auxiliary horizontal toolbar, to try to avoid issues on OSX (combo boxes not responding to mouse clicks). 2015-07-02 14:51:27 +02:00
jean-pierre charras 1311f81448 Replace wxComboBoxes by wxChoice in auxiliary horizontal toolbar, to try to avoid issues on OSX. 2015-07-02 11:50:38 +02:00
Maciej Suminski 1073ba1999 Fixed crash on double switching to legacy canvas on start. 2015-07-02 11:40:36 +02:00
Maciej Suminski 9d27caca75 More robust method of regaining keyboard focus (GAL). 2015-07-02 11:40:33 +02:00
Maciej Suminski d3e276387d Ratsnest fix (GAL). 2015-07-02 11:25:59 +02:00
jean-pierre charras 5c7f073a28 Hotkeys: try to use Cmd instead of Ctrl on Mac OSX. 2015-07-02 09:28:54 +02:00
jean-pierre charras 2796a843e7 3D viewer: minor fix in toolbar icons: the rotate Z and rotate Y icons were swapped. 2015-07-01 18:07:42 +02:00
jean-pierre charras 0a10813352 Eeschema: BOM dialog: fix some minor issues when displaying messages.
Cvpcb: fix Bug #1470201 (select next/previous unlinked comp and clear links not working well)
demo/complex_hierarchy: use our new schematic symbols.
2015-07-01 12:55:41 +02:00
Maciej Suminski 51c0ae3480 Fixed cursor offset in GAL. 2015-07-01 03:46:42 +02:00
Maciej Suminski 6ad6f0bde2 Corrected VIEW::ToScreen(). 2015-07-01 03:22:50 +02:00
jean-pierre charras 377942ed2a Minor fixes. 2015-06-30 18:31:48 +02:00
Maciej Suminski 785638a396 more fix for Cairo setting screen size. 2015-06-30 15:06:30 +02:00
Maciej Suminski d3c7b45438 Corrected GAL canvases screen size, so they do not include scroll bars. 2015-06-30 14:08:35 +02:00
Maciej Suminski b352ef9deb Panning with keyboard (GAL). 2015-06-30 14:08:29 +02:00
Maciej Suminski 30b679ae5e Cursor control with keyboard (GAL). 2015-06-30 14:08:24 +02:00
Maciej Suminski b5ef511063 Fixed alignment to grid when there is a grid offset (GAL). 2015-06-30 14:08:03 +02:00
Maciej Suminski 5ca8e0b9d6 Fixed incorrect polygon finishing in 45-degree mode (GAL). 2015-06-30 13:55:30 +02:00
jean-pierre charras 272f1b35b6 Eeschema: Dialog BOM: minor fix in help doc, and a minor enhancement (the plugin name with %P in name is correctly found to display its help and to edit it) 2015-06-29 18:34:31 +02:00
unknown 15cc245a83 Eesschema, dialog rescue: enhancements:
- Slightly change the info text in the dialog. Add a definition of  exactly what it means to "rescue" a component.
- Reload the project libraries when a project is opened, even if kicad  is already running and the same project is open (to be sure the lib cache is up to date).
- Set the Modified flag on cancel, because a change has indeed been  made (choosing not to rescue is equivalent to updating the components)
2015-06-29 18:31:00 +02:00
LordBlick 3adf12344a Use the system text color in WX_HTML_REPORT_PANEL. 2015-06-29 10:43:09 +02:00
jean-pierre charras 66aa22c1db Eeschema: remove an unused argument in a few functions.
Fix also the  minor Bug #1469504.
2015-06-28 18:45:05 +02:00
jean-pierre charras 3076876ef2 Dialog set grid: add error checking in dialog (min and max grid size and max offset) 2015-06-28 16:11:57 +02:00
Eldar Khayrullin f556161a21 Fix Pcad to kicad circle conversion. 2015-06-28 16:02:47 +02:00
Simon Richter 2df8495e4f Eeschema: fix error in library pin table editor pin grouping broken in commit r5751.
* Coverity warns about falling through the switch statement which is acutally the correct behavior.
2015-06-27 17:34:43 -04:00
Wayne Stambaugh c288d200fb Minor wxPython scripting improvements.
* Wrap Pgm().OnPgmExit() changes in APP_SINGLE_TOP to build conditionally
  when KICAD_SCRIPTING_WXPYTHON is enabled.
* Check the result of loading the correct wxPython version during
  initialization.
2015-06-27 15:05:26 -04:00
jean-pierre charras 7be1d32a10 Fix minor issues (included Bug #1469358 hierarchical sheet pin not redrawn after edition) 2015-06-27 11:12:32 +02:00
Chris Pavlina ada5274b28 Remove some unused variables. 2015-06-26 19:29:01 -04:00
Chris Pavlina 3af895e285 Replace abs() with std::abs(). 2015-06-26 19:21:09 -04:00
unknown f194905117 Fixes and enhancements in python scripts relative to BOM generation. 2015-06-26 19:52:49 +02:00
Maciej Suminski 1c5cde94f0 Make WX_HTML_REPORT_PANEL use the default system background color. 2015-06-26 17:34:07 +02:00
Maciej Suminski 15857f22ca Fixed dragging offset in eeschema after crossprobing a multipart component in pcbnew GAL canvas. 2015-06-26 17:32:48 +02:00
Maciej Suminski 37db33cbca Update cross hairshape (GAL). 2015-06-26 17:30:41 +02:00
Maciej Suminski a43a288e10 Update zones when DRC is launched (GAL). 2015-06-26 17:30:04 +02:00
Maciej Suminski ac6a90afa3 Update ratsnest after properties are changed. 2015-06-25 17:36:57 +02:00
Chis Pavlina f3c73f5947 Eeschema: minor component library rescue helper fixes.
* Components with multiple "converts" were rendered with all of them overlapping instead
   of just one.
* Schematics missing a -cache.lib resulted in unnecessary renaming suggestions.
* The dialog title "Conflicts Checking" is inaccurate now (as we're checking for more than
   just conflicts) and also somewhat awkward, unidiomatic GUI English; I renamed it to
   "Project Rescue Helper".
2015-06-26 11:17:23 -04:00
unknown 71b3125d8e Cleanup: remove unnecessary macros EXCHG and NEGATE. add MIRROR macro. 2015-06-26 15:41:56 +02:00
Jon Neal 3e398ce1c6 Fix assertion in CvPcb, Eeschema, and Pcbnew when cancel is selected from save on exit dialog. 2015-06-25 15:06:51 -04:00
jean-pierre charras 928e155450 Better, but not really good, html icon. 2015-06-25 13:08:47 +02:00
unknown bdeac4c116 Fix potential buffer overflows in eeschema. Fix Bug #1468604 (Assert triggered in eeschema when trying to edit components) 2015-06-25 10:53:45 +02:00
Marco Hess be01e15f66 KiCad: add html file support to tree view.
* Create bitmap for html files in tree view.
* Run default web browser when html files are double clicked.
2015-06-24 15:30:35 -04:00
Marco Hess 8699fdf12e Pcbnew: minor Protel gerber file extension fixes.
* Assign file extensions .g1d, .g2d, .g3d, ... for internal copper layers.
* Assign file extension .gm1 for edge cut layer.
2015-06-24 13:59:44 -04:00
unknown 257ee806fd Pcbnew: enhancements in algorithm to build the board outlines as polygon (with holes) in specctra.cpp. the polygonal description is used in specctra export but also in 3D viewer. 2015-06-24 18:13:25 +02:00
Chris Pavlina 9466f19427 Eeschema: show connection indicator when placing no connect objects. 2015-06-24 11:39:44 -04:00
jean-pierre charras a928bbfaac Fix issue in richio.cpp, when printing strings with a size > 500 chars.
This was due to an use of twice the same va_list by 2 calls to vsnprintf, but the first call can change the va_list.
2015-06-24 15:53:03 +02:00
Maciej Suminski a8bffb862c Fix for disappearing ratsnest lines (GAL). 2015-06-24 00:28:21 +02:00
unknown 5dd0099119 Eeschema: Remove backtracking (overlapping) wires when creating new connections. 2015-06-23 17:01:34 +02:00
Henner Zeller 07d34e4428 Eeschema: improve netlist generation useability.
* Eliminate modal annotation warning dialog when generating a netlist fails
  due to components that are not annotated.
* Add warning message to annotate dialog.
2015-06-23 09:55:16 -04:00
Chris Pavlina c9d52c8894 Fix segfault when exiting Pcbnew with wxPython scritping enabled. (fixes lp:1431028) 2015-06-23 08:42:12 -04:00
Chris Pavlina 8879c0a411 Fix segfault when exiting stand alone apps under certian conditions. (fixes lp:1467221) 2015-06-23 08:31:27 -04:00
jean-pierre charras 35fe8b7a36 Eeschema: fix a minor bug: the board editor was not launched from the toolbar, if the footprint viewer or the footprint editor was previously run from Eeschema. 2015-06-23 12:59:38 +02:00
Chris Pavlina 5a4e528d6a Correct PNS boundaries for offset pads. 2015-06-23 11:41:53 +02:00
unknown 3160553d31 Specctra export/import: fix an issue: via drill sizes were not round tripping if they were bigger than the default. 2015-06-23 10:37:54 +02:00
unknown 077c33a400 Fix build error from 5803 2015-06-22 20:33:15 +02:00
jean-pierre charras 23278df0ab Dialog exchange modules: add a fp selection from the fp viewer
Fix also an issue on Windows, when using the footprint viewer or the component viewer in modal mode:
Reason: these frames (when run under the Kicad manager) have the Kicad manager as parent, and were built with wxFRAME_FLOAT_ON_PARENT style.
On windows, when the frame with style wxFRAME_FLOAT_ON_PARENT is displayed its parent frame is brought to the foreground, on the top of the calling frame.
and stays displayed when closing the frame in modal mode.
This issue does not happen on unix so we use now wxSTAY_ON_TOP on Windows, and wxFRAME_FLOAT_ON_PARENT on unix to simulate a dialog called by ShowModal.
This is not perfect, but at least it works.
2015-06-22 19:23:00 +02:00
jean-pierre charras bf2f480b7c Dialog exchange modules: add a fp selection from the fp viewer
Fix also an issue on Windows, when using the footprint viewer or the component viewer in modal mode:
Reason: these frames (when run under the Kicad manager) have the Kicad manager as parent, and were built with wxFRAME_FLOAT_ON_PARENT style.
On windows, when the frame with style wxFRAME_FLOAT_ON_PARENT is displayed  its parent frame is brought to the foreground, on the top of the calling frame.
and stays displayed when closing the  frame in modal mode.
This issue does not happen on unix so we use now wxSTAY_ON_TOP on Windows, and wxFRAME_FLOAT_ON_PARENT on unix to simulate a dialog called by ShowModal.
This is not perfect, but at least it works.
2015-06-22 19:21:34 +02:00
Henner Zeller e1b3a2d410 Eeschema: improve annotation dialog checkbox labeling
* Change 'Silent mode' -> 'Always ask for confirmation'.  Default on
 (Same behavior as before, though arguably, it is very annoying and
  should probably be default off)
* 'Automatically close dialog' -> 'Keep this dialog open'.  Also changed
  the default to _not_ keep the dialog open (what is keeping it open even
  useful for ?)
2015-06-22 11:53:27 -04:00
Chris Pavlina 80eb5460f9 Eeschema: component library rescue improvements.
* Fix case sensitive component library name searches
* Factor out rescue code into a generic rescue project class.
2015-06-22 11:38:54 -04:00
Tomasz Wlostowski c55e729117 fp library wizard: remember last local download directory & refresh download progress dialog. 2015-06-22 14:24:40 +02:00
unknown bdf1d1335b Fix Bug 146731: Zone fills entire area when set to THT Thermal ( fracturing (holes->single contour) algorithm bug ) 2015-06-22 09:11:52 +02:00
unknown 97010c3867 Fix Bug 146731: Zone fills entire area when set to THT Thermal ( fracturing (holes->single contour) algorithm bug ) 2015-06-22 09:09:44 +02:00
Wayne Stambaugh 4d1feef597 Minor code cleaning. 2015-06-21 16:30:33 -04:00
unknown 48d3371abd cleanup naming in component tree search container 2015-06-21 20:41:00 +02:00
jean-pierre charras 7c8c1d4954 Minor fix and cleanup. 3D viewer: modify the status bar. (Should be enough to avoid the bug #1467111). 2015-06-21 20:21:20 +02:00
jean-pierre charras 69414684a1 Try to fix a crash when exit pcb_calculator if the attenuators panel was displayed, wxGTK specific. Looks like a wxGTK bug.
(workaround: replace a wxTextCtrl by a wxHtmlWindow in attenuators panel)
2015-06-21 17:37:33 +02:00
jean-pierre charras 5cb6eb8d7a Try to fix a crash when exit pcb_calculator if the attenuators panel was displayed, wxGTK specific (looks like a wxGTK bug) 2015-06-21 17:10:14 +02:00
jean-pierre charras fe7bc2784a Eeschema, select component dialog: speed up (up to 20 to 30 times) the tree rebuild process, when the filter is used.
3d_draw_helper_functions.cpp: minor cleanup, and fix a very minor issue in 3D grid.
2015-06-20 11:19:57 +02:00
unknown bea46ddde3 Fix a regression in session back-import from specctra, broken recently (The symptoms of this regression is that all tracks are moved to the front layer as they are back imported) 2015-06-19 20:01:22 +02:00
Tomasz Wlostowski e8fca89a2c fix dereference of a deleted pointer 2015-06-19 19:39:33 +02:00
Maciej Suminski 09febe745d Remove a corner from zone outline function (GAL). 2015-06-19 17:32:33 +02:00
Maciej Suminski a988ebaabd Zone merging (GAL). 2015-06-19 17:32:33 +02:00
Maciej Suminski 39ddb3e9ae Two new selection conditions: same net & same layer. 2015-06-19 17:32:33 +02:00
Maciej Suminski e91fdd0079 Removed redundant transition in SELECTION_TOOL. 2015-06-19 17:32:32 +02:00
Maciej Suminski 8162260e80 Removed another dialog assert. 2015-06-19 17:32:32 +02:00
Wayne Stambaugh 27f83614a3 Eeschema hot key changes (fixes lp:1463509).
* Change leave sheet hot key from back space to alt + back space.  Note: for
  some reason ctrl + back space did not work at least on windows.
* Add back space as delete node hot key which is consistent with the delete
  track segment hot key in Pcbnew.
2015-06-19 11:24:12 -04:00
Chris Pavlina 872a43ff92 Pcbnew: assertion work around when automatically saving an unnamed file. 2015-06-19 09:27:06 -04:00
J. Morio Sakaguchi 4464032b6d Blind vias currently user ALT-V for a hotkey. This will also open the View menu. 2015-06-19 08:32:31 -04:00
unknown fe6cf2f5f8 3d-viewer: Fix a regression: grid was not updated ( now updated by calling CreateDrawGL_List ) 2015-06-19 11:06:52 +02:00
jean-pierre charras 355bd47e16 Edit microvia: fix incorrect drill size (Bug #1466653)
Fix a few coverity minor warnings.
2015-06-19 10:55:37 +02:00
Henner Zeller e211a77d8b Pcbnew: fix ADD_APPEND option in BOARD::Add() so using version control for board files is practical. 2015-06-18 15:23:01 -04:00
Chris Pavlina a543b5063f Work around for assertion in Eeschema when auto save tries to save unnamed schematic. 2015-06-18 14:43:26 -04:00
jean-pierre charras 4f71260319 Fix micro via size incorrect when adding it in pns router 2015-06-18 20:22:23 +02:00
Maciej Suminski a16dd894d5 Show Place & Drill origin in GAL. 2015-06-18 17:51:54 +02:00
Maciej Suminski 28a270a328 Refactored grid origin point drawing (GAL). 2015-06-18 17:51:53 +02:00
Maciej Suminski 2ebacfa3c2 GAL sets appropriate top layer after loading a PCB. 2015-06-18 17:51:53 +02:00
Maciej Suminski b3d4a680fa Prevent weird viewport settings after switching twice to GAL canvas. 2015-06-18 17:51:52 +02:00
Maciej Suminski fa3d074ca4 Find command zooms in found items (GAL). 2015-06-18 17:51:52 +02:00
Maciej Suminski 8964ff8922 Hotkey lists displayed after pressing the Help button (GAL). 2015-06-18 17:51:52 +02:00
Maciej Suminski f63170ca84 Tools available under toolbar buttons: delete items, highlight net, set drill/place origin (GAL). 2015-06-18 17:51:51 +02:00
Maciej Suminski 057bd1b886 PICKER_TOOL - generic tool for picking a point. 2015-06-18 17:51:51 +02:00
Maciej Suminski ac10ca40f8 Net highlighting is moved to a separate TOOL_ACTION. 2015-06-18 17:51:50 +02:00
unknown c636c4e735 Fix to closing polylines in DXF imports.
The DXF format polylines and lwpolylines have a 'flags' field of which bit 0 indicates if the polyline/lwpolyline is to be closed or open.
This flags field is correctly read during the import but in the conversion to board segments, was previously not used.
2015-06-18 17:51:17 +02:00
jean-pierre charras d4d201f0d8 Libedit: Fix an issue relative to bounding boxes of symbol items: some were calculated using the top to bottom draw Y axis, some others using the bottom to top libedit Y axis
Now all are calculated using the top to bottom draw Y axis. This is perhaps not a good idea, but at least it will be easy to change, later.
Code cleaning relative to these bounding boxes.
2015-06-18 16:56:08 +02:00
unknown 1c8fd8b207 Eeschema: remove the run cvpcb menu entry from eeschema tools menu when running as stand alone.
Pcbnew: fixes a problem exporting to DSN where the layername for B_Cu provided to the *.DSN file was incorrect
2015-06-18 15:29:26 +02:00
jean-pierre charras 6ff03b41fd Vias, creation and editon: fix a bug in legacy mode when creating a micro-via (the drill diameter was the standard vias drill, not the micro-via drill).
Also in global vas edition, always set the via drill to the actual current netclass value (do not use anymore the 0 value as default), to avoid unwanted invisible drill change for existing vias when the netclass value is modified.
This is consistent with the via creation, in GAL mode
2015-06-18 15:20:32 +02:00
jean-pierre charras 07d6cbaeb7 Vias, creation and editon: fix a bug in legacy mode when creating a micro-via (the drill diameter was the standard vias drill, not the micro-via drill).
Also in global vas edition, always set the via drill to the actual current netclass value (do not use anymore the 0 value as default), to avoid unwanted invisible drill change for existing vias when the netclass value is modified.
This is consistent with the via creation, in GAL mode
2015-06-18 15:19:30 +02:00
Jon Neal 3a9dfe274b Zoom to DRC error after double clicking an entry (GAL). 2015-06-18 11:35:02 +02:00
jean-pierre charras e0e69498e2 3D viewer, color selection: fix a minor bug and add more board body colors in preselection 2015-06-17 17:17:34 +02:00
jean-pierre charras 6c42987842 Refinements in 3D viewer, color selection: better icons and adding board body color selection 2015-06-17 14:59:41 +02:00
jean-pierre charras c41542a141 3D viewer, realistic mode : Add a color selection for copper, solder mask, solder paste and silkcreen. The work of Jeppe Johansen helped me. 2015-06-17 11:10:47 +02:00
jean-pierre charras f8275943e8 3D color selection : clean code. Add solder paste color selection 2015-06-17 11:06:39 +02:00
jean-pierre charras 022ffb3104 Add missing files 2015-06-16 20:25:15 +02:00
jean-pierre charras 1b2bf516a3 Add icons in 3D viewer for silkscreen, solder mask and copper color selection. 2015-06-16 20:14:57 +02:00
jean-pierre charras d0daa2cab7 Add color selector in 3D viewer for silkscreen, solder mask and copper.
Remove unused or duplicate icons.
2015-06-16 20:04:02 +02:00
Maciej Suminski 06aa47c93d Fixed wxString to char* cast for wxWidgets built with certain flags. 2015-06-16 19:15:28 +02:00
Maciej Suminski d3b31316ba Fixed module text visibility settings (GAL). 2015-06-16 17:03:36 +02:00
Maciej Suminski 12adb25a71 Fixed 'Edit in footprint editor' hotkey (GAL). 2015-06-16 15:27:59 +02:00
Maciej Suminski dd5275f6c6 Minor SELECTION_TOOL fixes. 2015-06-16 14:51:39 +02:00
Maciej Suminski c007e308f8 One more dialog assert fix. 2015-06-16 14:51:34 +02:00
Chris Pavlina ed0f17ef68 Eeschema: bus entry connection indication improvements.
* If a bus entry is drawn between two WIRES (not a wire and a bus, or two
  buses), it looks like it's connecting the wires together, but doesn't
  actually represent a connection.  Display them as dangling in that case,
  to make it clear to the user that a connection has not actually been made.
2015-06-16 09:05:27 -04:00
Maciej Suminski 5c6ecb0491 Zoom hotkeys fix for Windows (GAL). 2015-06-16 14:22:12 +02:00
Tomasz Wlostowski b562cfb8bb WX_HTML_REPORT_PANEL: a REPORTER widget on steroids. 2015-06-16 14:20:42 +02:00
Bernhard Stegmaier daa29d95df Add wxWidgets 3.0.2 (possibly earlier) patch to fix wxDataViewCtrl crash bug on OSX. 2015-06-15 16:15:34 -04:00
Martin d' Allens 28004abe58 Fix entry selection issue in Eeschema find dialog combo box in wxGTK builds. 2015-06-15 13:12:44 -04:00
Maciej Suminski d433a06d11 Fixed initialization for custom track/via size values (PNS). More meaningful error messages. 2015-06-15 17:54:58 +02:00
Chris Pavlina dc33bb1868 Display pin and bus connection targets when moving for better user feedback. 2015-06-15 10:41:08 -04:00
jean-pierre charras 49fac351ab Fix a few coverity warnings. 2015-06-15 16:01:43 +02:00
Maciej Suminski 6d07e9a754 Fixed dialogs asserts. 2015-06-15 15:54:58 +02:00
Maciej Suminski db44fc3649 Removed debug messages from Footprint Library Wizard. 2015-06-15 14:53:40 +02:00
unknown c70f4a0706 Pcbnew: Increase board thickness limit from 3mm to 10mm 2015-06-14 20:18:34 +02:00
jean-pierre charras dc9ebf30e5 A few minor fixes. Eeschema: add a workaround (not afix) to solve issue Bug #1464773 (Print bug with differently sized subsheets). 2015-06-14 19:58:57 +02:00
Wayne Stambaugh 7c21dcbab5 Add patch to fix wxWidgets 3.0.2 mirrored print bug. 2015-06-13 17:39:18 -04:00
Chris Pavlina 02ece9ccb5 Eeschema show rescue library error message when rescue fails. 2015-06-13 17:36:54 -04:00
Nicolas Planel 2212888e6e Fix memory leak in IDF importer and add C++ build configuration symbol checks. 2015-06-13 12:26:06 -04:00
Nicolas PLANEL 1b5db6cb66 Avoid memleak on ColorMap during normal usage 2015-06-12 18:38:31 -04:00
Wayne Stambaugh 4cd392a6ae Add backspace hot key to Eeschema to leave current sheet. 2015-06-12 17:31:44 -04:00
jean-pierre charras fc15404947 Fix a build issue in scripting mode (due to a no more existing method still declared in class_zone.h header) 2015-06-12 18:32:24 +02:00
Tomasz wlostowski eba3a55bb2 pcbnew: new zone filling algorithm using ClipperLib. Possibility to fall back to the old one 2015-06-12 17:13:18 +02:00
Tomasz Wlostowski feaa403266 common/geometry: introducing set-of-polygons class (SHAPE_POLY_SET) and File I/O for shapes class (SHAPE_FILE_IO) 2015-06-12 17:12:02 +02:00
Tomasz Wlostowski 7e4bc6262c common/geometry: added AllowDuplication option for adding vertices to a SHAPE_LINE_CHAIN 2015-06-12 17:11:56 +02:00
Tomasz Wlostowski 9cf885c383 common/geometry: rouding error fixes 2015-06-12 17:11:50 +02:00
jean-pierre charras 2daaf084be Cvpcb: minro fixes: fix an outdated help message, and remove dead code. 2015-06-12 16:30:36 +02:00
Chris Pavlina 8b33bfc61b Fix remaining invalid net ID bugs in board file parser. 2015-06-12 09:59:58 -04:00
jean-pierre charras 0027bb14c5 Pcbnew: read netlist dialog: remove the .cmp file option. Use only the netlist to know the footprint associated to a component. 2015-06-12 14:46:41 +02:00
jean-pierre charras e952302e43 Fix some issues in eeschema, dialog BOM: now displays info and error messages when running the BOM script 2015-06-12 09:02:06 +02:00
Nicolas PLANEL 9349158d02 Add missing CXX check : HAVE_STRCASECMP, HAVE_STRNCASECMP on string.h
This issue appear with clang++ -O1 -fsanitize=address compiler
2015-06-11 22:14:05 -04:00
Wayne Stambaugh f97191b050 Fix some more OSX bundle issues due to CvPcb changes. 2015-06-11 16:42:48 -04:00
Maurice 3d72306f78 Minor Eeschema user interface improvements.
* Enable and disable save schematic button and menu entry depending on
  modification status.
* Add toolbar and menu entries for leaving sheet.
* Enable and disable leave sheet menu entry and toolbar when in root sheet
  or descended into the hierarchy.
2015-06-11 13:27:36 -04:00
Garth Corral d13a05093a Remove cvpcb.app from OSX bundle as it is no longer an executable. 2015-06-11 08:14:41 -04:00
Wayne Stambaugh 63c978d987 3D viewer save image improvements.
* Set initial path to the current project path.
* Remember user selected path and file name between saves.
* Prompt user when over writing existing files.
2015-06-10 15:39:30 -04:00
Chris Pavlina 61d699b7c6 Add connection targets to bus wire entries. 2015-06-10 14:43:46 -04:00
unknown 64df4ce7ef Eeschema minor bugfix: hide pin targets for junction dots 2015-06-10 20:32:25 +02:00
jean-pierre charras 6f2c2db274 Eeschema: fix Bug #1463158 (When a schematic hierarchy is being edited, Eeschema saves sub-sheets in the new project, when the user open a new project, and save the current editon).
This was due to the fact the project name was changed before the user was prompted to save the design.
A very minor other fix.
2015-06-10 18:23:09 +02:00
jean-pierre charras 5d2500d7db Eeschema: fix Bug #1463158 (When a schematic hierarchy is being edited, Eeschema saves sub-sheets in the new project, when the user open a new project, and save the current editon).
This was due to the fact the project name was changed before the user was prompted to save the design.
A very minor other fix.
2015-06-10 18:21:35 +02:00
jean-pierre charras bdaf07c17c Eeschema: Refactor dialog_color_config code. It should fix bug #1463205 ( Eeschema color settings window cannot be closed from the title bar) which is platform dependent. 2015-06-09 19:49:26 +02:00
jean-pierre charras 0c17d22332 Refactor eeschema dialog_color_config.xx, using wxFormBuilder to create the base dialog 2015-06-09 18:42:41 +02:00
jean-pierre charras d583b1ff98 Fix Bug #1462876 (Eeschema ERC NoConnect not reliable.) 2015-06-09 12:40:34 +02:00
Wayne Stambaugh 1617957ef4 Fix broken build configuration dependency due to CvPcb new executable no longer being built. 2015-06-08 15:37:48 -04:00
Chris Pavlina 097c73b8eb Fix crash when parsing a PCB file with an invalid net code. 2015-06-08 15:28:04 -04:00
Chris Pavlina 859435cabe Fix clang build error due to ambiguous function GetSheet() in SCH_SHEET_PATH. 2015-06-08 10:37:45 -04:00
Chris Pavlina eb800d903f Hide pin and wire targets to show wire connections in Eeschema. 2015-06-07 20:07:42 -04:00
Wayne Stambaugh 54bad8b5e8 Fix Eeschema sheet recursion bugs.
* Add code to test for sheet path recursion to SCH_SHEET_PATH and SCH_SHEET_LIST.
* Add recursion tests to edit sheet code in Eeschema.
* Add recursion tests to block paste code in Eeschema.
2015-06-07 16:31:55 -04:00
Wayne Stambaugh 3bfb3da091 Change CvPcb save toolbar button tooltip to reflect removal of *.cmp files. 2015-06-07 15:22:49 -04:00
Dick Hollenbeck 8fb520249e Use KiwayExpress messaging for CvPcb footprint assignment instead of *.cmp file.
* Remove global s_NetObjectslist.
* Separate out non-owning version of NETLIST_OBJECTS_LIST into NETLIST_OBJECTS.
* Fix double free pertaining to ~NETLIST_READER().
* Remove all file-io from CvPCB.
* Remove exe launcher cvpcb, retain only cvpcb.kiface, since cvpcb.kiface has no file i/o.
* Add void CVPCB_MAINFRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) and teach it to use old
  netlist loading code with a STRING_LINE_READER LINE_READER.
* Fix BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, KIWAY_PLAYER )
2015-06-07 14:18:45 -04:00
Maciej Suminski aadcd93ab5 Removed a redundant field in RN_NODE class. 2015-06-05 17:49:01 +02:00
Maciej Suminski e86351b1b0 Fixed ratsnest for tracks with 0 length. 2015-06-05 17:49:01 +02:00
Maciej Suminski b9805e4530 Added missing contents for TOOL_EVENT_LIST operator||. 2015-06-05 17:49:01 +02:00
Maciej Suminski fa421f15d8 Clearer dynamic ratsnest (for moved items). 2015-06-05 17:49:00 +02:00
Maciej Suminski 16db8e644b Logical operators for ratsnest node filters. 2015-06-05 17:49:00 +02:00
Maciej Suminski 6cc535f27f Less significant changes to the ratsnest code (GAL). 2015-06-05 17:49:00 +02:00
Maciej Suminski f202e5318c Fixed SELECTION_CONDITIONS::lessThanFunc(). 2015-06-05 17:48:59 +02:00
Wayne Stambaugh 16daa04518 Fix title capitalization in P&S router properties dialog. 2015-06-05 09:59:57 -04:00
jean-pierre charras fb059b99b6 Cvpcb: fix a regression: in the stable version one could select many components and assign a footprint to the whole selection. Select more than on component is now re-enabled 2015-06-05 15:46:05 +02:00
unknown c582cf5946 Fix Bug #1445851: libedit field editor unnecessarily replaces spaces with underscores. Only reference and mainly value (in fact symbol name in lib) do not accept spaces in schematic libraries. 2015-06-04 17:44:56 +02:00
Maciej Suminski 0cb649b3b0 Removed a dubious function from TTL library. 2015-06-04 14:54:08 +02:00
Maciej Suminski 209e630873 Disable net highlighting after loading a new board. 2015-06-04 14:54:08 +02:00
Maciej Suminski ce4b4f8221 Update ratsnest on zone refill (GAL). 2015-06-04 14:54:08 +02:00
Maciej Suminski c23adc47b7 Ratsnest algorithm distinguishes layers (GAL). 2015-06-04 14:54:08 +02:00
Maciej Suminski 42215f2388 Moved GetLayerSet() to BOARD_ITEM. 2015-06-04 14:54:07 +02:00
Maciej Suminski a12ea29de8 Refactored the way zones are kept in ratsnest model (GAL). 2015-06-04 14:54:07 +02:00
Maciej Suminski a2b8ab6b41 Ratsnest fix (GAL). 2015-06-04 14:54:07 +02:00
Maciej Suminski d89d1d49a3 Fixed ghost effect in GAL view. 2015-06-04 14:54:07 +02:00
Maciej Suminski 0331d9958a Minor optimization for ratsnest. 2015-06-04 14:54:06 +02:00
Wayne Stambaugh e81477704d Make OK button default in P&S router properties dialog. 2015-06-04 08:21:30 -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
Brian Sidebotham 8afeba3325 * Fix EDA_LIST_DIALOG which had incorrect wxWidgets version check in
column sizing. Now the columns are sized to fit either the headers or
  items, depending on which is widest
2015-06-02 23:34:55 +01:00
Chris Pavlina 064e8a82e1 Fixed an assertion in arc drawing tool (GAL). 2015-06-02 20:16:55 +02:00
unknown 64e08f9274 Eeschema main toolbar: 2 tools cannot be safely managed when eeschema is run from the project manager: "new project" and "open project".
Therefore they are disabled when running on the project manager, and enabled in stand alone mode.
2015-06-01 20:02:32 +02:00
Chris Pavlina 1c47a85ab9 Make Eeschema component cache library rescue check for pin name changes. 2015-06-01 08:51:02 -04:00
jean-pierre charras 0cab3e47ad Enable plot in clipboard on Linux and OSX in eeschema, and copy in clipboard in 3d viewer ( was existing on Windows, but disabled on other OS ).
Minor other fixes (duplicate hot key in eeschema, which fixes Bug #1460359)
2015-05-31 13:51:50 +02:00
jean-pierre charras 9f03d15a2e Try to enable Clipboard copy on linux 2015-05-31 13:14:57 +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
Wayne Stambaugh 2500976e31 Fix undefined MODULE dtor for auto_ptr in pcb_netlist.h which caused a memory leak. Thanks Simon Richter for finding this. 2015-05-28 20:21:38 -04:00
unknown a1349ceb96 Fixes 2 critical bugs in the IDF framework code:
1. the code refused to read IDF files with circular cutouts; this caused the idf2vrml tool to fail
2. under certain conditions the IDF exporter created a defective file (outline data did not conform to specifications)
2015-05-28 09:20:43 +02:00
Simon Schubert 2db1b3adc8 Print out footprint texts placed on layers different than silkscreen. 2015-05-27 22:14:51 +02:00
Simon Schubert cfeabde282 Grey out text in high-contrast mode. 2015-05-27 22:13:51 +02:00
Dick Hollenbeck 89143851ba Added missing config file for nginx. 2015-05-27 15:33:33 +02:00
jean-pierre charras 1cf6979d89 Dialog BOM: update help displayed by the help button.
Rename dialog_footprint_wizard_list.fbp to dialog_footprint_wizard_list_base.fbp, to be consistent with other dialogs.
2015-05-27 11:35:21 +02:00
Dick Hollenbeck a411e4bd34 Fix %O which is broken in eeschema BOM, did not include project directory in path. Add %P which is project dir. 2015-05-26 17:13:33 +02:00
Dick Hollenbeck 60bcbba585 Configuration file for nginx.
Radically improves the speed of github plugin if run on a machine near you. It acts as a cache-ing proxy server.
2015-05-26 17:12:43 +02:00
Chris Pavlina 775f08b2bb Eliminate "PAD has no layer" warning for valid pads. 2015-05-26 16:33:46 +02:00
Wayne Stambaugh 4664b094ae Make KiCad template selection dialog translatable. Thank you Marco. 2015-05-26 09:59:01 -04:00
unknown de06578b4b Fix IDF code bug in the calculation of the outlines winding direction. 2015-05-26 08:18:50 +02:00
jean-pierre charras 9ebcf41b8d Fix bug #1458188, about zone clearance, when a zone is inside an other zone, the clearance was sometimes not right. 2015-05-23 19:12:40 +02:00
jean-pierre charras fd907a413c Minor changes: modify a few messages in dialogs to allow a better or more easy translation of these messages (too short messages cannot be safely translated).
Remove no more existing special.lib from template file kicad.pro
2015-05-22 13:00:43 +02:00
Garth Corral e63cafa62a Update WX_VIEW_CONTROLS::onMagnify() to recent changes. 2015-05-22 09:37:57 +02:00
Maciej Suminski 18fa766f53 Updated OS X pinch-to-zoom patch. 2015-05-21 23:29:26 +02:00
Garth Corral 6eaf029a0e Pinch to zoom for OS X. 2015-05-21 22:54:29 +02:00
Maciej Suminski 162ac38639 Added a note about the Retina OpenGL patch. 2015-05-21 11:15:35 +02:00
jean-pierre charras a5367391a9 Plot PS and PDF: fix bug Bug #1457215 (rect/trap pads plotted with an incorrect pen size, and therefore an incorrect size and shape. Only noticeable with a large default pen size)
Very minor coding style fixes.
2015-05-21 11:04:47 +02:00
Maciej Suminski 48a74dba37 Added missing 'def' 2015-05-21 00:47:53 +02:00
Maciej Suminski 420c1d1bcd Changed the patch to support full resolution on Retina screens to be more bulletproof. 2015-05-21 00:42:46 +02:00
jean-pierre charras 84ba36fa72 Allows switching GAL or legacy mode in footprint editor (previously, the mode was inherited from the board editor, and was not modifiable without closing the footprint editor) by menu or F9, F11 and F12 keys) 2015-05-19 18:39:05 +02:00
Johannes Maibaum 21332b588f Fixed Retina OpenGL patch filename. 2015-05-19 17:29:36 +02:00
Maciej Suminski 4026cb6c58 Moved zoom limits and area boundaries handling to VIEW. 2015-05-18 13:48:13 +02:00
Maciej Suminski 01c9f09833 wxWidgets under OS X require wxMenuItem ids to be >0. 2015-05-18 13:48:13 +02:00
Maciej Suminski 6fc59f9acd Full resolution in OpenGL canvas on Retina displays 2015-05-18 13:48:12 +02:00
Maciej Suminski 6788e31a1e Fixed context menu crash on OS X (GAL). 2015-05-18 13:48:12 +02:00
Maciej Suminski cbb86c3b9c Fixed zooming with Apple pointing devices (GAL). 2015-05-18 13:48:12 +02:00
Maciej Suminski 7c59d0dcc4 Layer toggling with 'Place Via' hot key when router is 2015-05-18 13:48:11 +02:00
Maciej Suminski 26ee2092af PNS router uses the legacy canvas hot key bindings. 2015-05-18 13:48:11 +02:00
Maciej Suminski 15cefcda9f Code formatting. 2015-05-18 13:48:11 +02:00
Maciej Suminski 2043d4696f Scrollbars (GAL). 2015-05-18 13:48:10 +02:00
Maciej Suminski 4fe65715a2 Added trivial connection selection (GAL). 2015-05-18 13:48:10 +02:00
jean-pierre charras e25ba1f51e Demos: make a private library for each demo, to avoid issues when using modified kicad new schematic libraries 2015-05-18 09:15:25 +02:00
unknown 093232103f Eeschema: fix wxassert failure on schematic plot with ERC markers 2015-05-18 08:23:41 +02:00
unknown 00cf800ce8 Pcbnew: fix false DRC violations for oval pads, minor code cleaning and translate French comments in drc_clearance_test_functions.cpp file. 2015-05-17 12:58:23 +02:00
jean-pierre charras e74eccede3 Kicad manager: Allows the selection of templates paths, in template selector dialog. 2015-05-16 11:20:26 +02:00
jean-pierre charras 77249d9b2d Minor fixes: remove a few useless includes and move a few others to the right file. Remove a few coverity warnings about not initialized members.
Minor bug fix: Zone duplicate zone in legacy mode: duplicate a zone to the same layer (and therefore  the same location) is no more allowed.
2015-05-15 14:49:11 +02:00
Chris Pavlina c7b8f790a7 Eeschema component library rescue changes.
* Show rescued component names in rescue dialog.
* Remove summary dialog.
* Don't create empty rescue library.
2015-05-13 11:09:55 -04:00
Maciej Suminski 4f3337f5ed Fix hot keys for adjusting grid size (GAL). 2015-05-12 12:03:39 +02:00
jean-pierre charras 37b0868376 Pcbnew: fix minor issues about fast grid switching, and next/previous grid selection from hotkeys. (GAL mode still has an issue) 2015-05-12 11:05:36 +02:00
Wayne Stambaugh b2745c4b00 Unify platform information code in about dialog and version information. 2015-05-11 12:25:33 -04:00
jean-pierre charras 4ebe471420 Minor fixes in add zone and duplicate zone (legacy mode) 2015-05-10 21:10:10 +02:00
jean-pierre charras e2c7e6bf02 onrightclick.cpp: remove useless wxClientDC, which was used only the hide/show (to the same location) the on-grid cursor during the creation of the popup menu (perhaps a trace of legacy code).
Minor changes in pcb_calculator GUI messages to make easier translation of these messages.
Cosmetic enhancements for 2 icons
2015-05-09 10:37:50 +02:00
jean-pierre charras e3700cae91 Enable/disable (depending on the display mode) menus which are usable only in GAL mode (and have no action in legacy mode) 2015-05-08 10:58:59 +02:00
jean-pierre charras 84c77aebc5 Cvpcb link process: add missing openmp lib (used by 3d viewer since rev 5544) in library list to link. 2015-05-08 08:11:06 +02:00
Maciej Suminski 7eaceffd35 Fixed weird handling of 'Find' action. 2015-05-05 20:39:42 +02:00
Maciej Suminski da75c52665 Hot keys settings are synchronized between GAL & legacy 2015-05-05 20:39:42 +02:00
Maciej Suminski 99e5228948 Moved the list of TOOL_ACTIONs to ACTION_MANAGER. 2015-05-05 20:39:41 +02:00
Simon Richter 1cd3cfa225 Minor build system fix.
* Move perform_feature_checks() before GCC configuration to allow compiler
  option tests to be recognized during the first build when no cache file
  exists.
2015-05-05 08:15:08 -04:00
unknown 69de718910 lib-cache-rescue coding style fix. lib-cache-rescue set default button OK in dialog. 2015-05-04 09:35:17 +02:00
jean-pierre charras 425ddb92a7 Cosmetic enhancements in dialogs and menus 2015-05-03 20:43:07 +02:00
unknown 04ffd0a4ac i18n pcbnew GAL popup menu entries 2015-05-03 17:53:44 +02:00
jp charras 722435f317 Fix issues in auto-save files:
* auto-save was broken for all sub sheets with are in a sub-directory of the project directory. (reason wxFileName::Normalize(), used to create the absolute path  has issues with filenames starting by '$', perhaps due to env var which also start by $). the auto-save prefix is modified ( now AUTOSAVE_PREFIX_FILENAME which defines "_save_"  ) and defined only once.
* auto-save files from sub-sheets were not found due to the fact the path was not set (fixed by Blair Bonnet's patch)
2015-05-03 15:48:05 +02:00
jean-pierre charras d41bc31c49 Fix bug #1447905 (very minor bug, in fact). Fix a few minor coding style issues.
Fix 2 coverity warnings.
2015-05-03 08:31:14 +02:00
Simon Richter 3efa8347a3 Move feature check before dependent tests
The GCC/LLVM specific handling for adding -fvisibility options is later in
this file, so these options would only be added on the second invocation
without clearing the cache.
2015-05-01 23:48:47 +02:00
jean-pierre charras 2047d87317 Minor fixes (Bug #1414328 and Bug #1440312). Remove translatable attribute in a debug message.
tools/edit_tool.cpp: remove limitation (GAL mode) to delete the last pad in a footprint (a footprint can have 0 pad, for instance a logo)
2015-05-01 17:01:09 +02:00
jean-pierre charras 5a02b91e5f Fix some issues created by rev 5632:
*  Use only double to store zoom levels in class BASE_SCREEN (int type is not working for eeschema or page layout editor) (this fix Bug #1450551, Assertion failed on wxRound() when zooming)
*  Fix crash in all apps but Pcbnew when a grid or a zoom was selected from the popup menu.
*  Modify default hotkeys for Next Grid and Previous Grid: the initial key was a dead key, not suitable as hotkey. the 'N' and Shift N keys are used instead (with a change for unfill zone hotkey)
*  Modify code in EDA_DRAW_FRAME::SetNextGrid() and EDA_DRAW_FRAME::SetPreviousGrid() to make them compatible with other editors than the board editor.
2015-05-01 11:31:23 +02:00
jean-pierre charras 82dff76530 Eeschema: fix minor bugs #1450107 and #1450104 (assertion failures, only visible in Debug mode) 2015-04-30 13:08:35 +02:00
Maciej Suminski 81ea3ce408 Missing files. 2015-04-30 11:08:18 +02:00
Maciej Suminski f261bf3878 Zoom & grid menu for GAL. 2015-04-30 10:58:57 +02:00
Maciej Suminski 8390fec69d Minor fixes. 2015-04-30 10:46:08 +02:00
Maciej Suminski 47582e2741 GAL autozooms on every EDA_DRAW_FRAME::Zoom_Automatique 2015-04-30 10:46:08 +02:00
Maciej Suminski 872259981a CONDITIONAL_MENU supports separators and ordering. 2015-04-30 10:46:08 +02:00
Maciej Suminski 958046ddb2 Moved SELECTION_TOOL context menu to a separate class. 2015-04-30 10:46:08 +02:00
Maciej Suminski 9ef9b7b8e1 Preliminary selection mode for SELECTION_TOOL. 2015-04-30 10:46:07 +02:00
Maciej Suminski b8295b6af8 Code formatting. 2015-04-30 10:46:07 +02:00
Maciej Suminski e37b07a6fc Explicit destruction of menu entries in CONTEXT_MENU. 2015-04-30 10:46:07 +02:00
Maciej Suminski b218c1099f Added TA_CONTEXT_MENU_CLOSED tool event. 2015-04-30 10:46:07 +02:00
Maciej Suminski d18ed945c9 Do not run OpenMP loops when there is no data to 2015-04-30 10:46:06 +02:00
Maciej Suminski f2788a3086 Corrected way of storing cursor coordinates for context 2015-04-30 10:46:06 +02:00
Maciej Suminski 787415c2aa Updating the user grid size on change in GAL. 2015-04-30 10:46:06 +02:00
Maciej Suminski 3e46f2233a Corrected "Zoom Auto" in GAL with empty board. 2015-04-30 10:46:06 +02:00
Maciej Suminski 6379d80636 Zoom & grid menus for GAL canvases. 2015-04-30 10:46:05 +02:00
Maciej Suminski 06b978b829 Refactored CONTEXT_MENU, added handler for updating. 2015-04-30 10:46:05 +02:00
Maciej Suminski dfb0443b67 Refactoring library dependencies. 2015-04-30 10:46:05 +02:00
Maciej Suminski 10a4b64005 More icons for context menus. 2015-04-30 10:46:04 +02:00
Maciej Suminski 025d4cf23a Alternative way of handling grid settings in GAL. 2015-04-30 10:46:04 +02:00
Maciej Suminski 4be876a13a Expandable CONTEXT_MENUs (GAL). Minor CONTEXT_MENU 2015-04-30 10:46:04 +02:00
Maciej Suminski 946b9d1933 setTransitions() are called automatically for tools. 2015-04-30 10:46:03 +02:00
Maciej Suminski 6e45180b5a Two extra filters for .bzrignore. 2015-04-30 10:46:03 +02:00
Maciej Suminski 50afd515c2 Minor code cleaning. 2015-04-30 10:46:03 +02:00
Maciej Suminski c4888afbcc Refactored the way GAL handles zoom settings. 2015-04-30 10:46:02 +02:00
Maciej Suminski 74a902da20 Syntactic sugar for TOOL_MANAGER::RunAction(). 2015-04-30 10:46:02 +02:00
Maciej Suminski 557bb43dd2 Moved TOOL_MANAGER & TOOL_DISPATCHER to EDA_DRAW_FRAME. 2015-04-30 10:46:02 +02:00
Maciej Suminski 5c984aa069 Parametrized TOOL_ACTIONs. 2015-04-30 10:46:01 +02:00
Simon Richter 89699a193a Fix typo in FindOpenSSL.cmake 2015-04-29 12:50:16 -04:00
jean-pierre charras 699c76ccea Rework on EXCELLON_WRITER class, to allow gerber and drill files creation from a python script.
added the example gen_gerber_and_drill_files_board.py in demos, which shows how to do that.
Fix a Printf format issue (shown in Debug mode) in Libedit (%d used for a size_t, changed in %zu)
2015-04-29 17:37:37 +02:00
jean-pierre charras 569c2be354 Minor fixes: dialog rescue: make strings translatable. Remove a few coverity warnings (not initialized members). Very minor other changes. 2015-04-28 17:07:36 +02:00
jean-pierre charras c74f7b1a3d Add missing dependency to build python wappers. 2015-04-27 21:27:59 +02:00
jean-pierre charras 9da39717ae Add a python script example in demo folder to create various plot files from a board. Fix also some issues in plot controller helper class.
Important note: from a python script one cannot plot the palge layout, because the page layout template file is not stored in the board file, but it is part of the project.
Because when using a python script, the project is not loaded, the page layout template is not known.
Trying to plot it crashes the script.
2015-04-27 20:02:27 +02:00
unknown 665f346a03 Arcs in modules and board were rendered incorrectly on vrml export (bug 1448192). 2015-04-27 10:55:08 +02:00
jean-pierre charras 3b9ebd2270 Minor fixes in dialog rescue: missing title, incorrect refresh due to use of a wxPaintDC outside a paint event, and coverity warnings (not initialized members). 2015-04-27 10:44:17 +02:00
jean-pierre charras 3084c0aa0b Eeschema: add missing rotate and mirror sheet in sheet context menu (these transforms were possible in block commands, but not from the sheet menu).
Fix a i18n issue in field names when loading a component, if the language was changed during a session, and kicad not restarted (see Bug #1448654).
However changing the language needs restarting kicad, in order to have all messages or menus translated.
2015-04-26 18:32:16 +02:00
Chris Pavlina 26c320db57 Add schematic component library change rescue feature (fixes lp:1435338).
* Add code to test if any of the components in the schematic cache have been changed
  in the component libraries.
* Prompt user to accept or reject components when changes are found.
* If the user chooses to use the components in the cache, create a new library with the old
  components and add it to the beginning of the component library list so the schematic will
  not be changed.
* Create dialogs to handle user feedback and status.
2015-04-25 18:26:51 -04:00
Wayne Stambaugh ad9ec412f5 UI consistency and assertion fixes.
* Use "Close" in the file menu of every main frame window instead of the
  mismatch of the terms "Close", "Exit", and "Quit".
* Change the terminology in the Pcbnew graphic text edit dialog to match the
  module text edit dialog.
* Improve the layout of the Pcbnew graphic text dialog.
* Fix some wxPrintf parameter type assertions for 64 bit time_t.
* Fix all (at least I think I got all of them) duplicate menu accelerator
  characters.
2015-04-23 15:43:45 -04:00
jean-pierre charras 20dfe9ca29 Minor fixes: dialog_create_array.* files: clean code ( remove useless declarations and functions ).
fix a few coverity warnings about not initialized members in ctors.
2015-04-22 18:39:49 +02:00
Dick Hollenbeck e637493e04 Github plugin: Do not hard code https as the URI scheme for GITHUB_PLUGIN.
Use whatever comes from the lib_path in the fp-lib-table, thus opening up the same plugin for alternative generic servers.
2015-04-22 14:02:18 +02:00
jean-pierre charras 94479d87c1 eeschema: fix minor Bug #1446779 (repeat parameters not initialized until a project config is read)
Now these parameters are stored in user config, not project config ( they are not really related to a given project, they are just a setup during an edition),
and the schematic editor and the component editor have now separate parameters, because they are separate editors with different constraints.
component editor: repeat pin enhancement (from and idea of Edward Johns)
2015-04-22 13:39:00 +02:00
jean-pierre charras 584f35e6d4 Minor fix in a long message. 2015-04-21 17:53:51 +02:00
jean-pierre charras ea6b03cd5f footprint wizard python plugins management: Fix a memory leak. Remove useless and outdated code, and add a minor enhancement.
Make a string translatable in a pcbnew info dialog.
2015-04-21 17:42:30 +02:00
jean-pierre charras 53b8a8ca96 Pcbnew: add the board thickness setup in dialog_layers_setup.cpp (mainly for the 3D viewer) 2015-04-20 18:48:31 +02:00
jean-pierre charras 4e210a2d05 ModEdit: fix a refresh issue after deleting a pad (depending on the position of the pad, the pad was sometimes not immediately undrawn).
Fix a few coverity wanings (not initialized members in ctors)
2015-04-20 16:59:25 +02:00
Maciej Suminski 709697ea40 Better way to determine supported OpenGL version and extensions. 2015-04-20 14:16:41 +02:00
Wayne Stambaugh 9a6a3c8b58 Fix some more size_t assertions in the VRML parser debugging messages. 2015-04-19 19:46:38 -04:00
jean-pierre charras 1c6ae1eac7 Gerbview: fix a crash when trying to edit hotkeys. Add a few missing hotkeys.
Very minor coding style issue fix in hotkey code (pl_editor and gerbview).
Fix a compil error  using c++11 option for painstaking compilers
2015-04-19 20:41:57 +02:00
jean-pierre charras 016eef39e4 Dialog layers setup: cosmetic enhancements (fix a very minor issue on Windows). Remove a not used and outdated file. 2015-04-19 13:09:35 +02:00
unknown 6bd8fa1dd7 Fix I18n issues 2015-04-19 13:07:31 +02:00
unknown c2f8898c58 Hide "Power component value text cannot be modified" in libedit (which should be displayed only in schematic editor for power parts) 2015-04-17 20:31:30 +02:00
unknown 5f7268a178 3d-viewer, fix again a transparency issue. 2015-04-17 13:12:59 +02:00
jean-pierre charras dcdf9066b9 Better handling of disabled layers when editing a footprint (value, ref) from the board editor (avoid the "illegal layer" message box when possible). 2015-04-17 12:24:35 +02:00
Maciej Suminski 7480bcf1ae Yet another desperate trial to fix the depth buffer issues. 2015-04-17 12:15:25 +02:00
Maciej Suminski d281d86eee Fixed undo/redo display refresh for miras & dimensions (GAL). 2015-04-17 12:15:07 +02:00
jean-pierre charras 4daf9039db Eeschema: Fix a very old bug relative to the tool to load power parts:
Previously, only the lib named "power" was used (and therefore power parts defined in other libs not shown).
Now, all power parts can be loaded from any library.
Also, when loading power parts from the chose component dialog or the lib viewer, libs and parts are filtered:  only power parts and libs containing power parts are listed.
Hotkeys: move a few global strings in the files where ther are actually used (and make them local.) and code cleaning.
Fix a few other minor issues.
2015-04-16 17:26:51 +02:00
jean-pierre charras 4354139f24 Very minor fixes.
Removing trailing spaces in some files.
2015-04-16 10:07:10 +02:00
unknown d40ea8adcb 3D viewer: fix issues with transparencies in some models (material issues in VRML2 parser)
Fix some issues in filling zones normals.
Fix an issue with some models that have materials but didn't defined the diffuse color.
Workaround for Bug #1443431.
Implement some missing "code logic" for pervertexperface normals.
Remove some not used functions.
Calculate normals using double type.
2015-04-16 09:43:27 +02:00
Maciej Suminski b85ed89ea5 Corrected a few pads layer settings in 'sonde xilinx' demo. 2015-04-16 09:33:33 +02:00
Wayne Stambaugh 4b22e8ed37 Fix wxLogTrace string argument format specifiers for size_t types in vrml_v2_parser.cpp 2015-04-14 21:42:33 -04:00
jean-pierre charras 9c0c89256e Make hotkeys editor titles translatable. 2015-04-14 19:44:19 +02:00
jean-pierre charras 79af0c454d 2 very minor fixes. 2015-04-14 17:57:07 +02:00
jean-pierre charras 19347b1243 3D viewer: minor fixes. Use our class REPORTER to show warning messages and activity info when building the 3D board view. Add a few comments in sources.
Very minor other fixes.
2015-04-14 17:12:35 +02:00
Brian Sidebotham ae57c4692a Move S3D_MESH* to smart pointer to fix CID 108646 2015-04-13 21:56:15 +01:00
jean-pierre charras c519eea12b 3D viewer: fix (the fix is not perfect) a minor issue in zone rendering: copper thickness was not good when the option 'Show Holes in Zones" was OFF, and "Show Copper Thickness" ON.
Fix a few coverity minor warnings.
2015-04-12 19:44:46 +02:00
Maciej Suminski cec0a956bd bugfix: pcbnew segfaults after adding footprint directly from editor 2015-04-11 23:41:22 +02:00
Chris Pavlina 3fc45fb74f Fix bug where user defined grid change does not update in GAL canvas. (fixes lp:146098) 2015-04-10 19:43:15 -04:00
Chris Pavlina 148ba4302e Make tab order more sensible for DIALOG_PCB_TEXT_PROPERTIES. 2015-04-10 19:28:25 -04:00
jean-pierre charras 5a387ce5fa Eeschema: fix a crash on undo command, which sometimes happens after a wire /bus creation command was aborted.
(probably fix  Bug #1434988)
2015-04-10 13:22:44 +02:00
unknown d545c698fb 3D vrml export: fix for bug #1441734 2015-04-10 09:30:21 +02:00
Nick Østergaard 44d6595c6a Fix swapped M and N in create array dialog string. 2015-04-09 19:41:08 -04:00
Dick Hollenbeck 659ea5184c Fix Eeschema search segfault.
* The SCH_COLLECTOR m_foundItems was being obsoleted after a pin name search.
  If a library edit changed the found pin name, the cache still held the now
  missing library pin and would segfault on next search due to the cache being
  out of date.
2015-04-09 15:37:48 -04:00
unknown ea11c013b6 fix bug in idfcyl utility 2015-04-09 20:56:52 +02:00
jean-pierre charras ec17455d35 board_items_to_polygon_shape_transform.cpp: remove full duplicate code between DRAWSEGMENT and EDGE_MODULE, and fix incorrect conversion of DRAWSEGMENT polygon type to its polygonal shape.
Gerbview: better info from X2 filefunction attribute displayed in layer manager about copper layers
2015-04-09 20:53:36 +02:00
Wayne Stambaugh 4274f2d5d5 Fix config.h default data install path assignment during configuration.
* Remove redundant definition of KICAD_DATA_PATH since DEFAULT_INSTALL_PATH
  was already defined.
* Use DEFAULT_INSTALL_PATH as the substitution for the default environment
  variable paths.
* Add option to define DEFAULT_INSTALL_PATH during CMake configuration with
  fall back to CMAKE_INSTALL_PREFIX if not not defined.
* Developer note: this change is primarily for package builders where
  CMAKE_INSTALL_PATH is the path where the package builder temporarily
  installs the build output before creating the package.  When building
  packages, DEFAULT_INSTALL_PATH should be set to the path where the
  package will be installed by default.
2015-04-08 13:27:04 -04:00
jean-pierre charras 0d77a8600d Pcbnew: always save the line width of footprint graphic edges in files, to allow width = 0 in polygon outlines.
(should not change anything currently for all existing footprints).
2015-04-08 15:45:34 +02:00
jean-pierre charras 0f7e358030 3D viewer: fix a bug introduced in rev 5579s. Remove a few useless wxBusyCursor. Minor other fixes. 2015-04-08 14:50:36 +02:00
Wayne Stambaugh 763290ad56 Make CvPcb strings translatable. 2015-04-07 14:44:51 -04:00
Maciej Suminski 78d9e7b789 bugfix: pcbnew crashes when selected component is removed in OpenGL canvas 2015-04-07 18:31:37 +02:00
jean-pierre charras d38c9b205f Extend max number of units per package: fix incorrect unit string for unit >= 52. Fix unit list limited to 26 in dialof edit compinent in schematic..cpp
lib_pin.cpp: in 4 functions, use an unsigned param instead of int, for  a better code.
2015-04-07 15:19:30 +02:00
jean-pierre charras 17297babe7 Eeschema: extend max number of units per package to 52 and clean code to easily extend this value upto 26x26 (but 52 is a reasonable max value).
Fix a few minor coverity warnings.
Add about_dialog typo fix from Nick Østergaard
2015-04-07 13:52:29 +02:00
Mikhail Karpenko 886a8521a4 Comments typos fixed. 2015-04-06 21:50:12 +02:00
Eldar Khayrullin 7d5ad2785a Make translatable 'Routing Options...' entry 2015-04-05 18:01:50 +02:00
Sven D. a7af3346e0 Enable 'Via Gap' setting when respective checkbox is selected. 2015-04-05 16:58:19 +02:00
jean-pierre charras f25f465d4c Make strings translatable in Create Array dialog (and a minor cosmetic enhancement).
Modview: fix issue about mouse on wrong monitor when starting Modview.
2015-04-05 11:52:41 +02:00
Nick Østergaard 0241776d54 Sync the about dialog with AUTHORS.txt, and updates the copyright year 2015-04-05 11:48:54 +02:00
Eldar Khayrullin 5d55fa018e Translate Selection tool "Select..." entry. 2015-04-04 21:57:38 +02:00
Dick Hollenbeck 83ecd43754 Eeschema impovements.
* Improve schematic label edit dialog.
* Rename SCH_SCREEN::BuildSchCmpLinksToLibCmp() to SCH_SCREEN::CheckComponentsToPartsLinks()
  for improved readability.
2015-04-03 16:38:24 -04:00
jean-pierre charras cbf487c598 Pcbnew: duplicate and create array: popup menus in legacy mode: remove these options for a few items which cannot be (safely) duplicated (pads in board editor, and a few others )
Modedit, GAL mode: fix a crash when a duplicated area includes the ref or value fields.
Add missing bitmap for pad enumerate.
fix bad flag for Portuguese language.
Fix a few typo in messages.
2015-04-03 21:10:09 +02:00
jean-pierre charras 4def0958a5 Fix some coverity warnings. Fix typo and errors in comments. Very minor other fixes. 2015-04-03 11:13:06 +02:00
Tomasz Wlostowski be785d554b Update GAL ratsnest on canvas switch. 2015-04-02 22:45:19 +02:00
jean-pierre charras f5c47a191b eeschema: fix Bug #1437604 (double translation of some messages in pin editor dialog) relative to some static strings flagged "to be translated".
This is due to the fact static strings flagged translated ( _("string") notation)  are not translated  when they are static only if they are not inside a dll.
When they are static inside a dll, the dictionary is already loaded, and the constructor translate them.
Therefore they can be translated twice in dialogs are calling wxGetTranslation to show them, if the application is run from kicad.
But if the application is run as stand alone, the translation is made only once (as expected).
2015-04-02 20:51:47 +02:00
Maciej Suminski b1cd83c197 Icons in GAL context menus. 2015-04-02 16:09:48 +02:00
Maciej Suminski 6083f3b011 Internationalization of GAL dialogs & menus. 2015-04-02 16:09:26 +02:00
Maciej Suminski be839aca29 Fixed Footprint Library Wizard for builds with GIthub plugin disabled. 2015-04-02 13:31:29 +02:00
jean-pierre charras bbbb84e6c2 Fix a few minor coverity warnings.
Fix minor 3D viewer issues (includling change number of segments and its optimization to draw pad holes.)
Fix Bug #1439132 (track and via list on toolbar not always refresh after loading a board).
Remove useless tool in Modedit.
2015-04-02 13:18:19 +02:00
Maciej Suminski 589dd442f5 Clippy returns home. 2015-04-02 09:18:45 +02:00
Maciej Suminski 8be73ad05a KiCad assistant. 2015-03-31 23:45:02 +02:00
Wayne Stambaugh a6172bb72e Minor path configuration code fixes.
* Fix bug (and Coverity error) when deleting environment variable map entries.
* Remove debug logging code inadvertently left over from development.
2015-03-31 11:46:31 -04:00
jean-pierre charras c9a917eef1 3d viewer: fix a few warning coverity (and a potential bug). fp libs wizard: make it internationalized, and replace an untranslatable string created by grouping 3 strings by one translatable string. 2015-03-31 13:14:21 +02:00
Maciej Suminski 9a6deaebac Removed WEBKIT entries from documentation. 2015-03-30 23:29:04 +02:00
Maciej Suminski bfb700c79b Removed the remaining lines related to WebViewer. Undone reduced number of layer in VIEW. 2015-03-30 22:40:29 +02:00
Maciej Suminski 4dae107dab Alternative depth range in OpenGL GAL. 2015-03-30 22:14:37 +02:00
Maciej Suminski 09f2af3c42 Fixed invisible tracks in PNS. 2015-03-30 21:49:30 +02:00
jean-pierre charras f3b4aff76c Minor fixes: make a message translatable in CvPcb. Dialog choose component: fix a missing min size calculation and make min size bigger. 2015-03-30 21:34:41 +02:00
Maciej Suminski 7f1ea9e54d New Footprint Library Wizard. 2015-03-30 18:42:39 +02:00
Chris Pavlina ec1d2128bd bugfix: Avoid rendering component preview if either dimension is 0 (eeschema). 2015-03-30 17:23:31 +02:00
Wayne Stambaugh 6aff74665a Fix build error cause by difference in wxRichMessageDialog between versions 3.0.1 and 3.0.2. 2015-03-30 10:52:54 -04:00
Maciej Suminski 9e8719d3ff Fixed overlapping segment endings in OpenGL view. 2015-03-30 14:09:56 +02:00
Wayne Stambaugh 45d0448bb9 Add path (environment variable) configuration dialog.
* Create new dialog to edit environment variables.
* Add helper class ENV_VAR_ITEM to manage environment variable values and
  if they were defined externally.
* A path configuration dialog access to KiCad, CvPcb, Pcbnew, and Footprint Editor
  window menus.
* Add validator for environment variables.
2015-03-29 17:22:53 -04:00
unknown 34dfbc3306 3D viewer: fix an issue introduced in previous commit. Add an improvement. 2015-03-29 18:13:58 +02:00
unknown c0518db743 3D viewer: Some more support cases to VRML2 parser and fix some issues. 2015-03-29 12:59:53 +02:00
unknown 4b680dd598 Pin table dlg: improvements. 2015-03-28 17:25:34 +01:00
unknown 26990213db 3ED viewer: added more support for the VRML2 parser 2015-03-28 17:16:40 +01:00
jean-pierre charras ff154dba3c demos/ schematic tidying 2015-03-28 13:24:13 +01:00
unknown 8db15e7299 3D-viewer: Fixes and enhancements (add 3D bounding box for components). Add comments in header files. Fix some coding style issues. 2015-03-28 12:36:19 +01:00
unknown eee901ff57 3D-viewer: Fixes and enhancements. Add comments in header files. Fix some coding style issues. 2015-03-28 12:33:56 +01:00
unknown 33acfae75a Libedit: Add pin table dialog, from a patch of Simon Richter, with a few fixes. 2015-03-27 12:59:22 +01:00
unknown 561c018035 Add pin table dialog 2015-03-27 11:26:07 +01:00
Wayne Stambaugh ec4d74c984 Minor 3D viewer improvements (fixes lp:1406680).
* Make OK button the default action in the 3D viewer option dialog per UI
  policy.
* Fix standard button sizer padding in 3D viewer options dialog.
* Let sizers do their job by using default size for 3D viewer options
  dialog.
* Set 3D viewer hot key to Alt+3 in all parent windows where 3D viewer is
  accessible.
* Minor code cleaning and coding policy fixes.
2015-03-26 15:04:52 -04:00
jean-pierre charras 45808deb47 Minor fix: Gerber X2 attribute: remove one attribute (TF .GerberVersion, now no more in use) I added in my recent changes relative to the new J5 gerber version attributes. 2015-03-26 19:57:19 +01:00
jean-pierre charras 1bc3e9f105 Better error messge when a .kiface file ( or, if it exists, a .dll or .so shared library ) is not found at start up 2015-03-26 18:27:13 +01:00
Maciej Suminski 32c8fdad37 Fix for printing non-consecutive layers or starting with layer > 1 in gerbview. 2015-03-26 18:23:17 +01:00
Wayne Stambaugh 681090b8ef Remove COPYRIGHT.txt to prevent license confusion as there is now GPL3+ code in KiCad. 2015-03-26 12:02:37 -04:00
jean-pierre charras bb50e141f4 Pcbnew: Force visibility of items which have no option in dialogs to controle this visibility, when reading the .kicad_brd file.
these options are used in GAL mode, but the usercannot control this visibility. So if the board file does not have these visibility flags set, the GAL never show them.
Fix also a compil warning.
2015-03-26 14:20:11 +01:00
Maciej Suminski b74b2efff0 More printing fixes. 2015-03-25 18:27:17 +01:00
jean-pierre charras 85bc2ae015 Rework on Gerber plot functions: add X2 attributes in J5 version. Minor code cleaning. 2015-03-25 14:07:05 +01:00
Maciej Suminski 0b7fd874a0 Fixed printing issues under Linux. 2015-03-25 10:55:00 +01:00
Wayne Stambaugh ec8bf0c13a Library configuration menu naming improvements.
* Add footprint and drop table from the Pcbnew footprint library table menu
  entry to make it clear to new users.
* Add component to the Eeschema library configuration menu entry.
2015-03-23 11:44:19 -04:00
unknown 74154480de Eeschema enhancements: Option to annotate keeping multi-unit parts grouped and friendlier warning for modifying power values. 2015-03-23 12:45:31 +01: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 0e03fbff07 Make hotkey string info translatable in dialogs. These strings are now prefixed by _HKI , which can be used by translation tools to extract them. 2015-03-22 15:04:09 +01:00
https://launchpad.net/~john-j-beard 0350290499 Fix Bug #1426675 (Undo and cancel commands don't have effect for Duplicate operation in legacy mode) 2015-03-22 10:42:41 +01:00
unknown 036404ded5 eeschema restructure of netlist export code. 2015-03-21 11:46:54 +01:00
jean-pierre charras 6e8a8a6b25 Fix some coverity warnings (mainly not initialized members) 2015-03-21 10:06:04 +01:00
unknown 35c23f3135 Fix incorrect close function in HTML_MESSAGE_BOX (whichcan be shown in modal or not modal mode) 2015-03-20 20:11:11 +01:00
jean-pierre charras 834b31b491 Plot pdf: fix issue when a 0 sized text is plotted (files are broken): now 0 sized texts are ignored.
pcbnew: remove a false error message when undoing a change on a text, or some other board items (graphic items for instance)
2015-03-18 20:50:42 +01:00
jean-pierre charras 9a3a92f93a 3d-viewer: avoid useless warning messages each time a 3d view option is changed.
they are now shown only when a new board is loaded, if there are warnings.
2015-03-17 08:39:15 +01:00
unknown eef494d9c5 Pcbnew: Fix an Incorrect save-on-quit in pcbnew with unamed board 2015-03-17 08:34:02 +01:00
jean-pierre charras 115cb2d647 Try to fix Bug #1431765 (Pcbnew crashes in GAL when entering 3d display when a board outline is not closed)
This change modify the way warning messages are displayed: now the are displayed outside a paint event.
2015-03-16 18:39:35 +01:00
Chris Pavlina 1d2e2e555b Final solution for the text overbar problem in GAL. 2015-03-16 18:18:18 +01:00
Chris Pavlina e6db185f2e Adjusted text overbar height in GAL. 2015-03-16 16:42:45 +01:00
Chris Pavlina be29952819 Fix for hotkey collisions when modifiers are used. 2015-03-16 10:34:45 +01:00
John Beard 900ecbae9d Fix for cancellation of duplicate in GAL mode. 2015-03-16 10:25:40 +01:00
Mario Luzeiro d80a3d651e 3d-viewer: fixes and enhancements. 2015-03-15 16:51:56 +01:00
jean-pierre charras 5c26381963 Pcbnew: Fix Bug #1432370 (Solder mask cutouts extended by "Zone min thickness value") 2015-03-15 16:11:14 +01:00
Balint Kiss and John Beard 797ff5eeb7 Better icons for diff pair routine menus 2015-03-15 15:22:37 +01:00
jean-pierre charras 1ebc632813 Fix a not shown dialog (sheet pin dialog editor) under XFCE and Unity. Make "display hotkeys list" window not modal.
As usual, fix a few minor coverity warnings
2015-03-15 14:40:41 +01: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 efe5658a9b Fix bug Bug #1432165 (fp lib table dialog editor not shown on XFCE and Unity)
Cvpcb: Shows a better message when a netlist is not found.
2015-03-14 17:47:25 +01:00
jean-pierre charras f743b98844 Try to fix Bug #1431391 (Unable to edit pins in Schematic library editor). It happens on XFCE, but also on Unity. This fix works on Unity. (it is due to the fact the dialog is not raised, for an unknown reason, and this bug depend on the way Eeschema and Libedit are run).
Add Ctrl+E hotkey in eeschema to edit a component with Libedit (similar to pcbnew Ctrl+E hotkey)
As usual, fix a few minor coverity warnings
2015-03-14 12:50:39 +01:00
unknown adf2fc830e Pcbnew, legacy mode: add Hotkey for editing module with module editor (Ctrl-E) 2015-03-14 08:43:36 +01:00
unknown cbb0e2ad35 Rework on 3D viewer. Fix some issues, some optimizations and better rendering. 2015-03-13 20:27:25 +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 2427b40271 Fix Bug #1431423 (pcbnew: edited 3d model filename is not saved).
Eechema, libedit, pin dialog editor: show pin texts  in pin  preview canvas.
2015-03-12 18:43:39 +01:00
Tomasz Wlostowski aeddbb51ff router: respect NPTH holes too 2015-03-11 23:48:53 +01:00
Tomasz Wlostowski e9bc7b58cc Snap cursor to pad center when moving (GAL footprint editor). 2015-03-11 18:06:44 +01:00
unknown b3b791961a coverity common folder fixes (mainly not initialized members). 2015-03-11 17:04:20 +01:00
jean-pierre charras f16e083ecf Fix minor bug #1429990 (3D viewer shows hidden footprint graphic texts ). Fix minor coverity warnings (not initialized members and dead code) 2015-03-11 14:59:43 +01:00
Maciej Suminski b6c5b291a2 Coverity fixes. 2015-03-11 14:17:43 +01:00
unknown 8e7bc5666b 3d viewer: fix current shading issues with some models. 2015-03-10 21:15:41 +01:00
unknown f87577ca72 class PLOTTER: dash lines parameters in one place for plot. I made minor changes (values in mm and set to give the same size as dashed lines drawn by wxDC, using short dash.) 2015-03-10 21:00:50 +01:00
jean-pierre charras c586d9735e Eeschema: fix bug #142970 (broken append sheet function)
Fix a few minor coverity warnings.
2015-03-10 19:31:21 +01:00
Maciej Suminski 035b231b62 Refinement for fix in 5497. 2015-03-10 18:31:23 +01:00
Maciej Suminski 4ad4898254 Fixed jumping cursor when closing pad properties window (GAL footprint editor). 2015-03-10 17:27:15 +01:00
Maciej Suminski 2ecb72da84 Fixed disappearing selected items when switching between GAL canvases. 2015-03-10 17:05:38 +01:00
Maciej Suminski 26f20fbb00 Moved "Place Target" and "Place Module" tools from DRAWING_TOOL to PCB_EDITOR_CONTROL (to avoid placing modules in the footprint editor). 2015-03-10 16:58:26 +01:00
Maciej Suminski 721949b50e Fix memory leak in pns_node and pns_line_placer. Fix coverity uninitialized warnings. 2015-03-10 15:38:27 +01:00
Maciej Suminski 97e4a3897c Minor fix to ratsnest algorithm (GAL). 2015-03-10 15:02:27 +01:00
Maciej Suminski c160a7de17 Capturing cursor in drawing tools (GAL). 2015-03-10 14:43:14 +01:00
Maciej Suminski cc72e585f0 Fixed segfault in arc drawing tool (GAL footprint editor). 2015-03-10 14:32:40 +01:00
Maciej Suminski 143f52eb4d VIEW_CONTROLS::CaptureCursor() 2015-03-10 13:20:38 +01:00
Maciej Suminski a72a04654c MInor fix for Tool Framework notifications. 2015-03-10 13:20:22 +01:00
Maciej Suminski 56b692ae3e "Select net/connection" (GAL). 2015-03-10 09:36:04 +01:00
Maciej Suminski 190af5d95b Added functions to resolve connectivity queries in ratsnest (GAL). 2015-03-09 13:41:34 +01:00
Maciej Suminski e6a10faab7 FIxed a few clang warnings. 2015-03-09 11:06:54 +01:00
Eldar Khayrullin 5d8f7ba0e6 bugfix: cannot draw 180 degree arc in OpenGL canvas 2015-03-09 10:26:29 +01:00
jean-pierre charras c9b9ccd2b6 Fix issue #1429665 (eeschema doesn't recognize .sch file when the LIBS section is empty. But the section is not used, just a comment, therefore can be empty).
Very minor other fixes.
2015-03-09 10:25:39 +01:00
jean-pierre charras 086ff54ef0 Fix minor issues: plot svg did not handle dashed lines.
Eeschema now uses dashed lines for graphic lines (to be consistent with plot functions and toolbal icon).
Fix an old bug in some envionments which warp the mouse on a bad monitor when opening eeschema, pcbnew and some other windows, only noticeable guys who are lucky enough to have more than one monitor.
2015-03-06 18:46:04 +01:00
Alexander Golubev f2ce42ddb5 fix several -Woverloaded-virtual warnings in common/* dir
- CACHED_CONTAINER::GetVertices: removed useless and unused function
   which does nothing but tainted the API
 - SHAPE_LINE_CHAIN::Collide( const BOX2I& aBox, int aClearance ):
   removed an outdated function with assert(false)
 - SHAPE::BBox(): fix a small typo in the doc string
2015-03-06 15:26:47 +01:00
unknown c3e3ff3682 Minot fixes: Minor coding style issues fix (tab -> spaces). Add missing GetClass to all classes derived from EDA_ITEM. Make debug method Show() only compiled in debug mode. 2015-03-06 09:58:32 +01:00
jean-pierre charras 02c8d4db8a Minor fixes: coding style in 3d-viewer and minor code cleanup, and some fixes in bom python scripts, which did not work when a non ascii char (but a valid utf8 symbol) was found in xml netlist. Add comments. 2015-03-05 20:46:38 +01:00
Tomasz Wlostowski 435ca8a7dd router: fix tuning status popup & incorrect length display 2015-03-05 10:02:29 +01:00
Tomasz Wlostowski 504c8bf286 router: fix segfault on misnamed DP complementary net 2015-03-05 10:01:54 +01:00
jean-pierre charras 6a016742c9 Fix a typo. 2015-03-04 21:08:57 +01:00
Wayne Stambaugh d13912c26a Fix bug in gEDA footprint library parser and OpenSSL version CMake file. (fixes lp:1427917)
* Fixed incorrect parameter ordering in gEDA footprint library parser
  which read drill diameter, pad clearance and solder mask clearance.
* Fix FindOpenSSL.cmake version detect bug which was exposed by OpenSSL
  version 1.0.2.
2015-03-04 14:46:06 -05:00
jean-pierre charras 8d6e75fce6 Fix 2 coverity warnings, and cleanup a old code in dialog_color_config. 2015-03-04 20:45:18 +01:00
Maciej Suminski 8cc70d4468 Refinement to the previous commit. 2015-03-04 20:22:33 +01:00
Maciej Suminski 63ae839489 Fix for uninitialized length tuning status popup. 2015-03-04 20:08:30 +01:00
jean-pierre charras a550ff84db Fix some coverity and cppcheck warnings (most are very minor issues: not initialized members and initialized but not used variables) 2015-03-04 10:26:00 +01:00
Tomasz Wlostowski 5f1c9060ac P&S router: fix unguarded boost optional derefernce. (fixes lp:1427880) 2015-03-03 20:16:14 -05:00
Tom Wlostowski b580ef70c5 Fix segfault in P&S router. 2015-03-03 15:58:36 -05:00
Tom Wlostowski 7977ac5421 Fix double free in P&S router causing KiCad to segfault. (fixes lp:1427803) 2015-03-03 15:07:56 -05:00
Garth Corral 9dce5b6ad9 Merge trunk @ 5469 2015-03-03 08:12:41 -08:00
jean-pierre charras c7d04c3d08 Code cleaning: Remove EDA_BASE_FRAME::m_FrameName member which is a duplicate of wxFrame name. 2015-03-03 15:53:47 +01:00
Maciej Suminski 9716165d06 Merged the differential pair router & track length tuning tool. 2015-03-03 13:41:43 +01:00
Maciej Suminski a6bd3314e4 Fixed warnings. 2015-03-03 12:59:26 +01:00
Maciej Suminski 161b360297 Fixed frozen cursor (GAL). 2015-03-03 11:55:23 +01:00
jean-pierre charras 177c9f7da5 Add hotkeys to Kicad manager, and some rework on hotkeys management.
The hotkey import/export files have now the extension ".hotkeys"
2015-03-03 11:51:13 +01:00
Maciej Suminski 0dd9efd9db Merged the differential pair router & length tuning tool. 2015-03-03 11:50:50 +01:00
Tomasz Włostowski 385d3648d6 router: removed some printfs() 2015-03-03 10:36:44 +01:00
jean-pierre charras 2804d2e566 Add hotkeys to Kicad manager, and some rework on hotkeys management. 2015-03-02 18:29:18 +01:00
Tomasz Włostowski fe40567426 router: shove now respects diff pair gap 2015-03-02 17:21:04 +01:00
Tomasz Włostowski bf3128c683 router: fix syntax error in PNS_LOGGER output files 2015-03-02 17:20:48 +01:00
Tomasz Włostowski 0f9b72c0bf eeschema: fix assertions on debug messages caused by wxLogTrace argument size mismatch 2015-03-02 17:18: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
jean-pierre charras 4bab8dde65 Fix some minor coverity warnings. Fix a bug in pcad2kicad plugin. Scripting: map BASE_SET. Rename some python bom scripts with better names. Fix erroneous comments and add comments 2015-03-02 09:28:49 +01:00
Garth Corral 1af9315006 Merge trunk @ 5464 2015-03-01 17:24:28 -08:00
Garth Corral 16ebfafa9f Forgot to update the compiling docs after merging a patch from trunk 2015-03-01 17:13:12 -08:00
Wayne Stambaugh 25b9a42ea3 More Coverity scan error fix goodness. 2015-02-28 15:50:35 -05:00
Wayne Stambaugh 9131d89e80 Make KiCad project tree tab traversable so mouse is not required to open files. (fixes lp:1426556)
* Add wxTAB_TRAVERSAL to TREE_PROJECT_FRAME ctor.
* Please note that there is still a focus issue when closing a child window (at least on
  windows) that prevents this from being an ideal solution.
* Minor code cleaning.
2015-02-28 14:00:48 -05: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 00f8994ee1 Eeschema: Fix a (minor but annoying) bug detected by coverity which prevent Eeschema to draw components in "fast mode" (i;e. without pin texts) when they are moved, due to a draw parameter which was incorrectly used.
Move items rework: enhancements: for some items (sheets, components, bus entries) the mouse cursor is no more wrapped to the anchor. For large symbols, this is better: they are more easy to place.
There is also a change when starting a move item command: the full screen is redraw, and therefore there is no artifact due to the XOR draw mode.
Some other minor coverity fixes (uninitialized members).
2015-02-28 17:56:09 +01:00
Blair Bonnett 2101324691 Fix wxGTK scrollbar assertion in Pcbnew layer setup dialog. 2015-02-28 11:48:39 -05:00
Wayne Stambaugh 4000820bb6 Fixed coding policy violations in last commit. 2015-02-28 09:21:49 -05:00
HDE_Opticalworm 534ed58f02 Add title block information to Eeschema BOM generator. 2015-02-28 09:16:41 -05:00
Wayne Stambaugh b42e47eeed Fix a few more wxLog string formatting assertions in Eeshcema. 2015-02-28 08:12:09 -05:00
Wayne Stambaugh d8a74aa7af wxLog string arguement parsing assertion message fixes. 2015-02-27 14:12:01 -05:00
jean-pierre charras d6c6b4debb Fix some coverity warnings (mainly not initialized vars). 2015-02-27 15:33:13 +01:00
Bernhard Stegmaier 30acc07e11 Default path fixes and remove old to find 3D model path code.
* Fix default KISYSMOD/KISYS3DMOD (#ifdef typo) for OSX builds.
* Remove setting KIGITHUB from kicad/pcbnew Info.plist in favor of hardcoded default
  setting for OSX builds.
* Remove now unneeded Set3DShapesDefaultPath() and other small things.
2015-02-27 08:34:02 -05:00
Tomasz Włostowski 3f015705ac working on shove fix for DPs 2015-02-26 16:34:10 +01:00
jean-pierre charras 10d67ffbd9 Fix some coverity warnings (not initialized members). Add comments. Better (more informative) title in dialog to download .pretty libs. 2015-02-26 11:33:15 +01:00
jean-pierre charras dbdadbf519 Fix someminor coverity warning, and one bug found by coverity in drill report files : buried holes were not properly counted and listed. 2015-02-25 20:43:37 +01:00
Tomasz Wlostowski 79d9229d86 fixed persistent assertion failure in component edit dialog caused by checking always null pointer 2015-02-24 11:15:20 +01:00
jean-pierre charras ede0daf9db lib_dxf: Update to version 0.5.13 (previous: 0.5.11) due to a bug (memory leak) fixed in 0.5.13, which has also more comments, and try to fix most of coverity warnings (not initialized class members).
These members are now initialized, which also fix some other more serious coverity issues.
2015-02-24 10:07:40 +01:00
Brian Sidebotham d5e70c93d9 * Make sure MinGW uses ANSI C99/C++ stdio snprintf 2015-02-23 21:08:11 +00:00
jean-pierre charras feb14fa37d pcbnew, place file: Fix a minor bug in side identification: a comment in file header was generated with always "top side" id even when the bottom side file was created. Fix also a minor coverity warning (no bug) 2015-02-23 14:03:20 +01:00
Mark Roszko 3c42764563 Fix snprintf usage. 2015-02-22 18:56:38 -05:00
Bernhard Stegmaier 1e6c8cf88f Enable file extension filters on OSX file dialog. 2015-02-22 17:48:33 -05:00
Wayne Stambaugh 4c6ca81f2c More Coverity scan error fixes. 2015-02-22 16:25:29 -05:00
jean-pierre charras 7e80e7207c Pcbnew, Footprint place file: use standard keywords "top" and "bottom" as board side identifiers instead of external copper layers names, which have no meaning in this fabrication file 2015-02-22 16:42:13 +01:00
jean-pierre charras 0975e3e5bd Move exact dialog: make all messages translatable. Fix minor issues (some can be Windows specific). Remove useless declarations. Fix coding style issues
Fix minor warnings from cppcheck.
2015-02-22 15:43:44 +01:00
jean-pierre charras c1978b3242 Pcbnew: fix crash when undoing a move exact pad in board editor.
Fix also very minor warnings detected by cppcheck.
2015-02-22 10:39:58 +01:00
Garth Corral d970481d83 Merge trunk @ 5441 2015-02-21 21:18:13 -08:00
Maciej Suminski 014905e7db bugfix: pad enumerator skips pads if mouse cursor is moved too fast (GAL module editor). 2015-02-21 21:16:28 +01:00
Maciej Suminski de03accdb1 Coverity report fixes. 2015-02-21 14:58:39 +01:00
jean-pierre charras c6f4f15926 Eeschema: Minor code reorganization:
* move not shared files (sch_item_struct.*, sch_base_frame.h) to eeschema;
* move wxEeschemaStruct.h to eeschema and rename it schframe.h to be consistent with the other corresponding file name schframe.cpp;
* remove few not needed  #include
2015-02-21 10:46:44 +01:00
Mark Roszko 3918d3f0b2 Eeschema code cleanup and coverity fixes. 2015-02-21 09:11:58 +01:00
Wayne Stambaugh d1d1e2b58a Lots of Coverity scan error fixes. 2015-02-20 19:41:10 -05:00
jean-pierre charras bd5d468251 Pcbnew: fix bug #142348 (airwire does not always appear after deleting a track). Very minor other fixes. 2015-02-20 20:04:32 +01:00
Maciej Suminski 590d9b3b18 Merged lp:~john-j-beard/kicad/moveexact with some patches. 2015-02-20 14:46:12 +01:00
Maciej Suminski 3e9bb6b887 SELECTION::GetCenter() returns VECTOR2I instead of wxPoint. 2015-02-20 11:40:36 +01:00
Tomasz Wlostowski f0e7363f88 SHAPE_LINE_CHAIN: fix segfault 2015-02-20 10:37:25 +01:00
jean-pierre charras 11e2bdf17b Eeschema: code cleaning, remove dead code and not used #define or#include in some cpp files. 2015-02-20 09:17:54 +01:00
Mark Roszko 6c7744e286 VRML file parser fixes.
* Fix coverity scan error for array comparison.
* Check for buffer length overflow that fixes segfault.
2015-02-19 19:21:34 -05:00
Maciej Suminski c2bd2491f1 Added asserts in spots where DEGREES are not handled. 2015-02-19 16:03:45 +01:00
Maciej Suminski 84517d0e79 BOARD::DuplicateAndAddItem() handles vias too. 2015-02-19 14:55:46 +01:00
Maciej Suminski f7a32e839e Moved UndoInhibit related functions from TOOL_MANAGER to EDIT_TOOL. 2015-02-19 14:53:31 +01:00
Wayne Stambaugh 04c55f0956 wxPython configuration fixes.
* Add support for setting python site package path to PYTHON_SITE_PACKAGE_PATH.
* Move configure_file() so WXPYTHON_VERSION is already initialized before creating
  config.h (Duh!).
* Add status message to indicate the version of wxPython found.
2015-02-18 20:47:34 -05:00
Maciej Suminski aafdfd015e Disabled 'Duplicate' & 'Create array' for pads in the layout editor. 2015-02-18 20:30:14 +01:00
Maciej Suminski 9bed4814a3 Ratsnest update in 'Create array' tool (GAL). 2015-02-18 20:29:52 +01:00
Maciej Suminski f06690c8d3 Merged lp:~john-j-beard/kicad/moveexact. 2015-02-18 20:27:00 +01:00
Maciej Suminski 4fb9bce354 Code formatting. 2015-02-18 17:53:46 +01:00
jean-pierre charras 63d3c835cb Pcbnew: refinement to Bug #1422093 fix. 2015-02-18 10:13:17 +01:00
Tomasz Włostowski 112adccbcb router: differential pairs & length tuning support 2015-02-18 01:29:54 +01:00
Tomasz Włostowski e5deafb4bb bulk improvements for selection and edit tools (GAL) disambiguatin heuristics and smarter grid alignment 2015-02-18 01:10:20 +01:00
Tomasz Włostowski a46a92f918 new IDs for diff pair & length tuning tools 2015-02-18 01:06:14 +01:00
Tomasz Włostowski 9f0b02268b tools: moved tools registration outside pcbframe.cpp 2015-02-18 01:04:47 +01:00
Tomasz Włostowski 4da839f30f groundwork for invoking module editor on selected footprint in GAL mode 2015-02-18 01:01:02 +01:00
Tomasz Włostowski da9fc84421 improved module locking: lock pads only/lock whole module mode added 2015-02-18 00:58:14 +01:00
Tomasz Włostowski 5d78a007cc added ClassOf() for DRAWSEGMENTs, PADs and PCB_TEXTs 2015-02-18 00:53:57 +01:00
Tomasz Włostowski 0879b457ac undo should work on pads too (GAL view) 2015-02-18 00:51:40 +01:00
Tomasz Włostowski a3cf294881 bitmaps: added diff pair/length matching dialog images 2015-02-18 00:50:28 +01:00
Tomasz Włostowski 83ffb8969f gal: minor comment fix 2015-02-18 00:45:29 +01:00
Tomasz Włostowski aaf1b634d7 base_struct.h: added DP_COUPLED flag 2015-02-18 00:44:23 +01:00
Tomasz Włostowski 8bd9dd49bb view: added quick hiding mechanism in VIEW/VIEW_ITEM 2015-02-18 00:43:02 +01:00
Tomasz Włostowski 8a4bf35b5b math: added OPT_BOX2 type 2015-02-18 00:40:27 +01:00
Tomasz Włostowski c87b136522 geometry: new methods and fixes in SEG class 2015-02-18 00:40:11 +01:00
Tomasz Włostowski da8e9e9bee added Remove() and CountTypes() methods in COLLECTOR class 2015-02-18 00:36:27 +01:00
Tomasz Włostowski f0c913c65e common: added WX_STATUS_POPUP and WX_UNIT_BINDER widget classes 2015-02-18 00:35:18 +01:00
Tomasz Włostowski 1112681a77 Merge branch 'bzr/master' 2015-02-17 23:09:30 +01:00
jean-pierre charras 6312f8386a Temporary fix a crash I created in rev 5427, when erasing all modules on a board and read the netlist. Will be fully fixed later.
Very minor fixes: remove duplicate #define in vrml_v2_modelparser.cpp, and "undo" a very minor change I made in class_board.cpp when I tried to fix a Pcbnew crash.
2015-02-17 21:32:49 +01:00
Wayne Stambaugh f4d5e349bf Fix a bunch of Coverity scan "unhandled exception" errors. 2015-02-17 13:47:21 -05:00
jean-pierre charras 39497b109e Pcbnew: fix Bug #1422093 (pcbnew crashes after editing a footprint cominng from the board with the fp editor and saving it on a librray and trying to load it to the board)
Some other very minor fixes.
2015-02-17 17:32:47 +01:00
Cirilo Bernardo dcdaee4c63 Pcbnew IDF and VRML exporter Coverity scan error fixes. 2015-02-17 09:56:45 -05:00
Cirilo Bernardo 1acfbb0ddd Coverity scan IDF fixes.
* Fix resource leak in idf_parser.cpp
* Fix logically dead code in idf_parser.cpp
* Fix use after free bug in idf_parser.cpp
* Fix unitialized scalar value in idf_parser.cpp
* Fix logically dead code in idf_outlines.cpp
* Fix unitialized scalar value in idf_outlines.cpp
* Fix invalid iterator in idf_common.cpp
* Fix unitialized scalar value in vrml_layer.cpp
2015-02-16 12:45:37 -05:00
Garth Corral 989e70edab Merge trunk @ 5424 2015-02-15 18:16:31 -08:00
Wayne Stambaugh f2edf02b35 Coverity error fixes.
* Fix unitialized variable in MSG_PANEL_ITEM default ctor.
* Fix a bunch of uncaught exception issues.
* Fix a memory leak in the NETLIST_READER::GetNetlistReader() when an
  an attempt to read an invalid net list file occurs.
2015-02-15 19:04:48 -05:00
Garth Corral 1bd70efc8a Merge trunk @ 5423 2015-02-15 15:21:01 -08:00
Maciej Suminski b0ad779ee4 Calming down the Coverity report. 2015-02-15 23:21:52 +01:00
Sven D d819a38075 Fix VRML V2 parser bug. (fixes lp:1417217)
* Add support for VRML DEF coordinate key word.
* Coding policy fixes by Blair Bonnett <blair.bonnett@gmail.com>
* Debugging output clean up.
2015-02-15 16:30:34 -05:00
Miguel Angel Ajo 1e2af7fed1 Add GetLayerID method to BOARD.
This method is added for scripting purposes, to be able to query
specific board layer names thru a board object.

If no board specific layer name is found, it will fallback to
standard layer names.
2015-02-15 14:31:47 +01:00
Ronald Sousa 64507e397c - changes sheet number, path, and timestamp from nodes to attributes
- changes comment number and value from nodes to attibutes
- UPdate bom_with_title_block_2_csv to use the changes made for sheet and comment
2015-02-15 10:45:43 +00:00
Maciej Suminski b1ace1607b Reworked GAL switching.
Now OpenGL can report its problems instead of shutting down the application.
2015-02-15 02:18:35 +01:00
Maciej Suminski b19010ff8b Cross-probing pcbnew<->eeschema (GAL). 2015-02-14 21:52:22 +01:00
Maciej Suminski bb861b81b2 Missing comments in the PLACEMENT_TOOL class. 2015-02-14 21:49:06 +01:00
Maciej Suminski 902d0e3f1f Tools are processing const TOOL_EVENT& (Tool Framework). 2015-02-14 21:28:47 +01:00
Wayne Stambaugh 69553d6fa3 wxPython find and version loading fixes. (fixes lp:1408060)
* Add test to CMakeLists.txt to verify wxPython is installed when
  KICAD_SCRIPTING_WXPYTHON=ON.
* Add test to make sure wxPython version major and minor numbers match
  the version of wxWidgets found.
* Add code to set the correct version of wxPython to the python scripting
  initialization code.
* Minor code simplification in Pcbnew KIFACE main window creation.
2015-02-14 19:23:54 -05:00
jean-pierre charras 1a74913063 Minor fixes: fix issue Bug #1420910 (Linux specific).
Rename eeschema/dialogs/dialog_sch_find.fbp to dialog_schematic_find_base.fbp, to be consistent with other dialogs. 
Pcbnew run from the project manager: add menu Save Copy As..., which is the same command as Save As ... in stand alone mode, but with the constraints of a project (no cwd change, no board filename change, and keep project settings)
2015-02-14 13:43:11 +01:00
John Beard d7f96d37a4 Add Fit() call to move exact and create array dialogs 2015-02-12 03:22:24 +00:00
John Beard 8c6313ac1a Extend arrays and duplicate to pcbnew (GAL and legacy), covering modules, text, lines, tracks, dimensions and targets.
Text arrays can now use "%s" as a placeholder to be substituted with the array index.

Also expand menu options for move exact, arrays and duplicate.

Minor fixes for arrays - use proper unit parsing, add numbering start for circular arrays

Add circle radius indicator to array dialogue
2015-02-12 03:22:24 +00:00
John Beard 3c5f3f7049 Add create array tool 2015-02-12 03:22:24 +00:00
John Beard 4f3672da4d Add "move exact" and "duplicate" tools to pcbnew 2015-02-12 03:22:24 +00:00
Ronald Sousa d4135f5d2b - Minor naming changes and code clean up 2015-02-11 13:04:42 +00:00
Ronald Sousa 7392f04b75 - Added sheet information to the net file. i.e. sheet number, human path name and timestamp
- update bom_with_title_block_2_csv.xsl
2015-02-11 11:11:05 +00:00
jean-pierre charras 74e83e924a Pcbnew: Fix Bug #1420074 (Crash when a footprint is added to the board (or edited) from the footprint editor, if a new pad was added, because the net info of the new pad is broken in this case) 2015-02-11 11:10:53 +01:00
Maciej Suminski 0001bc2844 Fix for clarification menu crash (GAL/Windows). 2015-02-11 00:23:45 +01:00
jean-pierre charras 698bd331c4 Dialog enum pads: fix incorrect use of sizers. 2015-02-10 11:38:22 +01:00
Ronald Sousa 534a3c1f78 - changed generatedDate back to date. this should keep compatibly
- the net file now has all project sheet title block using node 'sheets' and 'sheet'
- Updated bom_with_title_block_2_csv. Note, its only going to output the root title block.
2015-02-10 08:35:37 +00:00
jean-pierre charras 80f6a4f2a0 Pcbnew: fix ver minor issues. ModEdit: fix issue in GAL mode: when importing a footprint from the footprint wizard, the new footprint was not shown. 2015-02-10 09:35:17 +01:00
Ronald Sousa ef20a2bb9e - Renamed tb2 to tb
- corrected the code that violated the code policy. i.e. added the extra space to make the code more readable
- Restored bom2csv.xsl to its original form 
- Added bom_with_title_block_2_csv.xsl which has the new BOM generator.
2015-02-09 07:39:06 +00:00
Ronald Sousa 8a916a610a -update XNODE* NETLIST_EXPORT_TOOL::makeGenericDesignHeader() so that the net file now outputs project information.
For example:
        - Company name
        - Project title
        - issue date
        - Revision
        - Comment 1 to 4

- updated bom2csv.xsl plugin to take advatage of the extra project information that the net file now outputs.

Overall this improvement will make it easier to automatically make controlled and traceable documents.
2015-02-08 10:54:35 +00:00
Garth Corral ebec4e6987 Merge trunk @ 5410 2015-02-07 19:45:27 -08:00
Tomasz Włostowski ae9eacb2c3 Merge branch 'bzr/master' 2015-02-07 09:58:30 +01:00
Blair Bonnett 07db7c8d29 Prevent Pcbnew edit graphics property dialog from excepting zero length objects. (fixes lp:1392117) 2015-02-06 16:49:40 -05:00
Adam Wolf 88ce5920b5 Fix OSX help search paths. 2015-02-06 16:13:35 -05:00
jean-pierre charras 7dadeadbf3 bugfix 1418736: pcbnew crashes if "Interactive Router" was selected from the context menu. 2015-02-06 22:01:57 +01:00
Tomasz Włostowski b03d421801 Merge branch 'bzr/master' 2015-02-06 21:32:33 +01:00
Wayne Stambaugh 8f1addc1f8 Fix serious memory leak in schematic part library manager. 2015-02-06 10:34:11 -05:00
jean-pierre charras d52436aed8 Pcbnew: fix Bug #1418135 (scrollbars never shown in design rules dialog, in netclasses grid list, which prevent to use many netclasses). Also fix very minor other issues. 2015-02-06 11:54:55 +01:00
jean-pierre charras 1ed8cdf63a Pcbnew build: Set KICAD_USE_WEBKIT option default value to OFF. There are 3 reasons:
* Using a Web navigator embedded in Kicad can create security issues in Kicad.
* The web kit is not always easily available on Linux.
* There is now a tool in kicad fp lib wizard  to list and select the .pretty libs available on Github Kicad repo (When the kicad plugin is selected, this tool can download and make a local copy of these libs)
However, using -D KICAD_USE_WEBKIT=ON when invoking  cmake still build the embedded web viewer.
2015-02-06 11:49:09 +01:00
Wayne Stambaugh bd199b894e Set default footprint library table and 3D model library environment variables. 2015-02-03 15:42:33 -05:00
jean-pierre charras 4265fa60bd Pcbnew - plot dialog: fix Bug #1417435 (Gerber(and some others) plot mode is fixed as”sketch” instead of "filled" ) 2015-02-03 11:35:46 +01:00
jean-pierre charras 01fdbdf94e Dialogs edit footprint in module editor and edit footprint in board editor: add button to edit the selected 3D shape filename.
Dialog edit component in library editor: add button to edit the selected footprint filter.
2015-02-02 17:45:47 +01:00
jean-pierre charras 5eb7b41fba Dialogs edit footprint in module editor and edit footprint in board editor: add button to edit the selected 3D shape filename.
Dialog edit component in library editor: add button to edit the selected footprint filter.
2015-02-02 17:43:34 +01:00
jean-pierre charras b1cd42cf08 Pcbnew: simplify draw code in default canvas and plot functions by removing the plot LINE option, which is not existing in all plotters, not existing in opengl/cairo canvas, and not usefull in default canvas. 2015-02-02 09:06:39 +01:00
Miguel Angel Ajo 2ff623dcb9 Fix the pcb bouncing box test adding the track clearance. 2015-02-01 19:31:47 +01:00
Miguel Angel Ajo bd04e61b6f qa/test.py change to make sure failed tests return 1 in all systems. 2015-02-01 19:20:20 +01:00
jean-pierre charras 3c343b415a Fix the minor bug 1016924 ( Unhandled event id 6263 in pcbnew ). Remove duplicate code. 2015-02-01 08:19:31 +01:00
Garth Corral f0e295ca1c Merge trunk @ 5397 2015-01-31 17:34:01 -08:00
jean-pierre charras 8412f2ad4e ModEdit: add a settings menu option(and the corresponding dialog) to set default values used when creating a footprint or add graphic items to a footprint being edited.
These settings are now not common to the board editor, because the footprint editor can be run outside the board editor.
download_boost.cmake: ignore  .htm* files when installing boost. They are not used, and often have a very very long (and stupid) name which sometimes creates issues.
2015-01-30 19:42:46 +01:00
Maciej Suminski 789bb9663c bugfix: Find does not work in high contrast mode in GAL. 2015-01-29 18:23:54 +01:00
jean-pierre charras b556fb2324 Class BOARD: Rename an overloaded method named SetLayer with the better name SetLayerDescr, and comment it. It also remove some warnings when compiled with option -Woverloaded-virtual 2015-01-29 17:01:48 +01:00
Simon Richter f5d9d09e04 Hide EDA_ITEM ctors to prevent direct instantiation of abstract class. 2015-01-29 10:27:24 -05:00
Alexander Golubev 3838082bf3 Minor compiler warning and object improvements.
* Fix -Woverloaded-virtual warning in DIALOG_LIB_NEW_COMPONENT class
  definition.
* Make EDA_ITEM::Matches( const wxString& wxFindReplaceData& ) protected
  since it's a helper function that should only be called by derived objects.
2015-01-28 16:43:46 -05:00
jean-pierre charras ba6e2ffbcf Footprint Editor: New footprint creation: change defaults for ref and value texts: now Ref text is REF** and Value text is the footprint name. Also Value is put on fab layer (front)
muonde.cpp: cleanup this very old code, and fix not working code.
2015-01-28 11:00:48 +01:00
Wayne Stambaugh 93b0a0831e Minor fixes and code cleaning.
* Check to see if image handler is already initialized to prevent warning
  on debug builds.
* Change LIB_PART destructor message output to use wxLogDebug for debugging
  on windows builds.
* Minor code cleaning and coding policy fixes.
2015-01-27 13:40:52 -05:00
Wayne Stambaugh 4a95880be9 Fix FindOpenSSL.cmake version string regex breakage in OpenSSL 1.0.2. 2015-01-27 09:24:46 -05:00
jean-pierre charras 2beeb920fd Minor fixes 2015-01-27 12:04:08 +01:00
jean-pierre charras 6393d226ea Other minor fixes 2015-01-27 12:01:58 +01:00
jean-pierre charras 813efb77ef Smal change in dialog. 2015-01-27 10:09:09 +01:00
jean-pierre charras 2a4d0bad60 Fix minor aesthetic issues in dialogs (these minor issues (overlapping widgets) exit only with some Windows managers like KDE) 2015-01-27 08:34:19 +01:00
Maciej Suminski 2647fdfd89 Fixed context submenus event handlers (GAL/Windows). 2015-01-25 19:11:02 +01:00
Maciej Suminski 5447bb5914 bugfix: Pcbnew (Windows) crashes using selection tool in OpenGL or Cairo 2015-01-25 19:08:52 +01:00
Garth Corral cf01c580af Merge trunk @ 5386 2015-01-24 02:51:34 -08:00
jean-pierre charras f0a52644ea Pcbnew: fix Bug #1413701 (Segfault on highlight "unconnected" net 0 in Pcbnew ). Also, remove now useless code and other very minor fixes. 2015-01-23 12:24:32 +01:00
Wayne Stambaugh ca065833ea Remove EDA_DRAW_FRAME::IsActive() and replace with wxFrame::IsActive(). 2015-01-22 08:42:24 -05:00
jean-pierre charras ebb967c46f Pcbnew: fix issues and potential issues when reading board files and mainly old board files, and enhance the DRC tests and Delete Single Pad Net option when reading a netlist:
* Delete Single Pad Net option does not delete the net if a zone use this net (i.e. is attached to this pad).
* pcb_parser accept now negative netcodes in zones (can happen with old files, which previously could crash Pcbnew)
* pcb_parser accept now files with incorrect or missing net count  (can happen with old files, which previously could crash Pcbnew)
* if a zone has a non-existent net name it now keep this net name, and DRC detect it (previously, the net name was lost, and the DRC did not tected this issue).
* Drc test: now detect a "dead" net, i.e. a net with 0 pads, but still used by a zone. It happens easily after a schematic modification, when a net disappears or is renamed.
2015-01-22 13:06:34 +01:00
jean-pierre charras 64dd1f7461 Eeschema: fix a minor bug and enhances SCH_MARHER::Matches function ( partial use of 0005-SCH_MARKER-fix-a-Woverloaded-virtual.patch, from <fatzer2@gmail.com> ) and other very minor fix. 2015-01-20 13:06:44 +01:00
jean-pierre charras 59f497978a Pcbnew, layers manager: Fix an annoying bug I added in rev 5359, in Render options: in Board editor many render options were not displayed (similar fp editor mode).
Now fixed.
2015-01-20 08:01:32 +01:00
jean-pierre charras d4e04dcc97 Fix bugs detected by Cppcheck. 2015-01-19 20:03:50 +01:00
Tomasz Włostowski 78442a8b06 Merge branch 'bzr/master' 2015-01-19 19:35:47 +01:00
Tomasz Włostowski ee66a3cd1d common: added WX_UNIT_INPUT to CMakeLists 2015-01-19 19:35:05 +01:00
jean-pierre charras 79e2a41469 Pcbnew: Fix potential bug in DRAG_SEGM_PICKER (a variable type bool was used as int. type is now int). Minor code cleanup. 2015-01-19 09:23:10 +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
unknown 8876fdf4af Misc minor fixes (Fix some minor compil warnings). 2015-01-18 12:49:32 +01:00
jean-pierre charras ac539b9578 Minor and very minors fixes: move -DKICAD_USE_WEBKIT definition to the main CMakeLists.txt. Remove duplicate semi-colon at end of some lines. 2015-01-17 09:01:16 +01:00
Garth Corral 0bebc34a4b Merge trunk @ 5376 2015-01-16 19:40:35 -08:00
Wayne Stambaugh 77fb1897b7 Add missing coding policy to full documentatin build. 2015-01-16 15:18:34 -05:00
Nick Østergaard 96138e1237 Convert coding policy document from odt to markdown for inclusion in developer's documentation. 2015-01-16 13:57:16 -05:00
Maciej Suminski 92a8f8f19c Support for zone cut-outs in the point editor (GAL). 2015-01-16 16:44:42 +01:00
Wayne Stambaugh 7ec906a373 Fix variable naming bug causing the bzr version to be dropped in FindBazaar.cmake. 2015-01-16 09:14:51 -05:00
unknown d477004436 2 minor fixes. 2015-01-16 09:28:58 +01:00
jean-pierre charras c27b2fbf4c Fix issues in fp lib table wizard 2015-01-16 09:10:23 +01:00
jean-pierre charras 0b1a6fd7c3 More work on fp lib table wizard: add a button to import the full list of .pretty libs on github.
* if the current select plugin is the github plugin, one can select some of these libraries and add them to the table
* if the current select plugin is the kicad plugin, one can select some of these libraries and download them to make alocal copy.
  They can added to the table after they are downloaded.
2015-01-15 21:01:53 +01:00
unknown b269128b8c Fixes issues with IDF file I/O on Windows (the famous 'ascii vs. binary' issue) and the reported problem of partial paths when KISYS3DMOD is specified. 2015-01-13 11:47:07 +01:00
jean-pierre charras 960ea566d6 Cvpcb: minor fixes. 2015-01-13 09:33:17 +01:00
jean-pierre charras bf2f650eb9 Cvpcb: fix a typo which prevents cvpcb to be compiled with webkit suppport. Equ files support enhancements. 2015-01-13 09:05:43 +01:00
Wayne Stambaugh 0b6d1bbcf7 Minor dialog improvements.
* Make generate button the default in Eeschema netlist dialog.
* Fix spacing issues in export IDF dialog.
* Make OK button the default in export IDF dialog.
* Remove unnecessary end dialog code from export IDF dialog.
* Improve resizing of export IDF dialog.
2015-01-12 14:25:20 -05:00
jean-pierre charras 670df702b7 Cvpcb: very minor fixes. 2015-01-11 19:35:02 +01:00
jean-pierre charras 972329527e Cvpcb: fix issues relatives to .equ files management:
* Add dialog to edit the list of active equ files.
* allows use of our environment variables in .equ file names.
2015-01-11 18:22:45 +01:00
Garth Corral 267bca589f Merge trunk @ 5363 2015-01-10 15:26:01 -08:00
jean-pierre charras 0cb7c3dc7d ModEdit: fix incorrect size of the toolbar grid size combo box 2015-01-10 12:08:12 +01:00
jean-pierre charras 9cfb97d8b4 Add hight contrast option in Modedit. In hight contrast mode, solder masks and solder paste are shown.
this option was possible only by modifying the way display options are managed.
before these changes, display options were a global DISPLAY_OPTIONS class instance.
Now each EDA_DRAW_FRAME(and derivated classes)  includes its own DISPLAY_OPTIONS class instance.
As a consequence, some duplicate display option variables in these classes have been removed, because there were just duplicate variables of the  DISPLAY_OPTIONS class instance.
2015-01-10 11:27:49 +01:00
jean-pierre charras 6cf3b937fc Fix Eeschema drag Bug #1408661 2015-01-10 10:28:09 +01:00
John Beard 1ddde7426f Fix case statement indentation setting for uncrustify. 2015-01-08 09:02:27 -05:00
Garth Corral b941da6b0e Merge trunk @ 5359 2015-01-07 16:12:00 -08:00
jean-pierre charras 7d8df0425f Modedit: now shows a specific layers manager, which allows user to select the technical layer which is used when adding a new graphic text or outline to the current footprint.
Please, note the layer manager was already available in GAL mode, but is was the same as tne board editor, which is not good.
Now:
- In default mode or GAL mode, the look is the same.
- Only suitable technical layers (i.e. paired layers) are selectable from the layers manager (for special purposes, some other layers can be used, via the graphic items properties dialog)
2015-01-07 20:07:15 +01:00
Adam Wolf 1bcfd95675 Fix KiCad project file missing error meassage on first run and missing history file. 2015-01-07 13:11:30 -05:00
Garth Corral d0aeb87927 Merge trunk @ 5357 2015-01-07 07:34:07 -08:00
Jose Ingnacio c9a1b239a6 Use XDG_CONFIG_DIR for lock file path on Linux.
* With fixes from Adam Wolf.
2015-01-07 10:04:57 -05:00
Nick Ostergaard 547c145a1e Remove .gitignore file and add .gitconfig. (fixes previous fix for lp:1407338) 2015-01-06 16:46:04 -05:00
Paulo Henrique Silva 44bdcaad02 Add .gitignore file for github mirror developers. (fixes lp:1407338) 2015-01-06 15:40:59 -05:00
jean-pierre charras 678a763481 Pcbnew: better display of tracks/vias/grid in toolbar. All: modify the zoom value shown in toolbar or status bar (roughly now zoom 1.0 is near the 1:1 scale, on a 22 inches Monitor). Fix also many other minor and very minor issues 2015-01-06 08:38:58 +01:00
Paulo Henrique Silva f5059ec4c2 Fix duplicate text in IDF header export. (fixes lp:1407336) 2015-01-05 16:51:47 -05:00
Wayne Stambaugh a2129fcd39 Minor toolbar and menu coherence fixes.
* Change Read to Load in Pcbnew and Eeschema preference menus.
* Make electrical rules check status bar message the same for both the menu
  and toolbar entries.
2015-01-05 16:01:35 -05:00
jean-pierre charras ad74a9a191 Pcbnew: better display of tracks/vias/grid sizes in toolbar 2015-01-05 14:20:04 +01:00
unknown 036a7cd8ed Fix a typo error in wizard lib. 2015-01-04 12:50:12 +01:00
jean-pierre charras 100913a696 Cvpcb: better fix of Bug #1402306 2015-01-04 11:50:45 +01:00
jean-pierre charras 9624d3233d Pcbnew scripting: fix swig 3.03 compatibility 2015-01-04 08:40:32 +01:00
jean-pierre charras 6a19315557 Fix compat with swig 3.03 2015-01-04 08:19:04 +01:00
Garth Corral ac26035fe1 Merged trunk @ 5348 2015-01-02 13:06:58 -08:00
Fat-Zer 846b2ae24e Fix Bug #1381287 (CvPCB ignores the footprint filter field on aliased components) 2015-01-02 08:52:29 +01:00
jean-pierre charras 45fcc04dbf Update ecc83 demo. default KISYS3DMOD definition on Linux: add /usr/local/kicad/share/kicad/module/package3d test to find a suitable value. 2015-01-01 19:52:23 +01:00
jean-pierre charras 9aa4fb6955 Cvpcb: force project name in stand alone mode, to allow access to project fp lib table. In project mode: disable the read netlist option (the netlist is read when Cvpcb is started by eeschema)
Dialog fp lib table editor: now shows the table full filenames, to help users.
2015-01-01 16:46:11 +01:00
jean-pierre charras 6ba5e40669 Fix a minor issue in fp lib wizard.
Remove a duplicate code for dialog select dir list.
2015-01-01 12:37:23 +01:00
jean-pierre charras 605a9bb5f2 Page layout selection: fix Bug #1405972, and add minor enhancement in page layout selection dialog (the new layout is shown after selection).
When the filename is not absolute, the page layout file is now searched first in project folder, and then in kicad template folder, if not found in project.
2014-12-31 13:31:19 +01:00
Wayne Stambaugh 614c8e45c8 Fix paths and hints variable naming bug in FindOpenSSL.cmake. 2014-12-30 14:20:33 -05:00
jean-pierre charras de8ae428fd Minor fixes (typo in messages) 2014-12-30 18:15:46 +01:00
Wayne Stambaugh 02d89ad0a9 Fix a CMake 3.1 policy violation warning in CMakeLists.txt. 2014-12-29 13:06:09 -05:00
Bernhard Stegmaier fcbce8b60e Add KIGITHUB definition for stand alone version of Pcbnew on OSX 2014-12-28 17:07:15 -05:00
Garth Corral bb2bc9d17c Merged trunk @ 5339 2014-12-28 09:39:27 -08:00
Cirilo Bernardo 0ceb90dfe1 Fix bug in IDF exporter when circles and arcs have zero radius. (fixes lp:1371656) 2014-12-28 10:09:35 -05:00
Maciej Suminski a5972e7b48 Fixed crash on toggling the pad outline display mode in CvPcb. 2014-12-26 18:07:45 +01:00
jean-pierre charras caafffd703 Code cleaning: move class PAGE_INFO from common.h to class_page_info.h;
Fix issue when using a page layout file in project folder: eeschema and Pcbnew did not use it, unless using an absolute path.
Now, if the file path is not absolute, it is seen as relative to the project (which is the expected behavior)
fp lib wizard: when pcbnew id compiled with USE_GITHUB_PLUGIN=OFF, the github plugin option is no more accessible (and the web viewer no more used).
2014-12-23 15:30:34 +01:00
jean-pierre charras 9ba847c848 Disable webkit when BUILD_GITHUB_PLUGIN is off 2014-12-23 14:50:42 +01:00
jean-pierre charras bc230f7650 Code cleaning: move class PAGE_INFO from common.h to class_page_info.h;
Fix issue when using a page layout file in project folder: eeschema and Pcbnew did not use it, unless using an absolute path.
Now, if the file path is nor absolute, it is seen as relative to the project (which is the expected behavior)
fp lib wizard: when pcbnew id compiled with USE_GITHUB_PLUGIN=OFF, the github plugin option is no more accessible (and the web viewer no more used).
2014-12-23 14:01:59 +01:00
jean-pierre charras ef098324ca Freeroute dialog: remove freeroute access via java web start, because freeroutecanot be run now via java web start.
freeroute.ja rcan be run by Kicad, as long as freeroute.jar is found by Kicad (for instance if it is in kicad bin folder)
2014-12-22 18:43:13 +01:00
jean-pierre charras 21cc8e0dc0 Freeroute dialog: remove freeroute access via java web start, because freeroutecanot be run now via java web start.
freeroute.jarcan be run by Kicad, as long freeroute.jar is found by Kicad (for instance if it is in kicad bin folder)
2014-12-22 17:58:43 +01:00
jean-pierre charras 2c015157aa Fix install issue after removing freeroute.jnl, now useless because freeroute is no more accessible via the web.
(Kicad is still able to run freeroute if freeroute.jar is accessible)
add wxWidgets-3.0.2 folder detection in FindwxWidgets.cmake
2014-12-22 14:10:29 +01:00
jean-pierre charras 9b7ef20be9 Fix install issue after removing freeroute.jnl, now useless because freeroute is no more accessible via the web.
(Kicad is still able to run freeroute if freeroute.jar is accessible)
add wxWidgets-3.0.2 folder detection in FindwxWidgets.cmake
2014-12-22 12:55:33 +01:00
jean-pierre charras 7231dd362c FindwxWidgets.cmake: fix missing webview library name in library list to analyze. this fixes missing symbols issue in winbuilder. 2014-12-22 10:31:45 +01:00
jean-pierre charras 3c3235f4de Very minor fixes. 2014-12-21 16:47:38 +01:00
jean-pierre charras cfb4331793 Add a wizard to the footprint library table dialog editor, to help users to select the right plugin, an existing enviroment vairable or an absolute path, and addl a list of new entries to the table.
Note: the wxWidgets webkit/webview library is needed.
On windows,there is no problem.
On Linux,  the libwebkitgtk-dev tool (sudo apt-get install libwebkitgtk-dev)  must be installed if it is missing (and wxWidgets rebuilt).
However, to avoid use of wxwebview, you can compile kicad with cmake option -DKICAD_USE_WEBKIT=OFF.
But the github plugin wizard will be not available.
2014-12-21 16:38:07 +01:00
jean-pierre charras 83e43993bd fix compil issue on Linux 2014-12-21 16:27:28 +01:00
jean-pierre charras e4a74213e4 Add wizard to fp lib dialog to easily add entries to this table. 2014-12-21 15:13:14 +01:00
Garth Corral f2a9ea1ddf Merge trunk @ 5331 2014-12-20 17:25:24 -08:00
Wayne Stambaugh 1393bcafc0 Save document file when creating new component library from component in library editor. (fixes lp:1351952) 2014-12-20 14:44:02 -05:00
Wayne Stambaugh 3f66000bf3 Improve component unit naming consistency. (fixes lp:1369153)
* Remove redundant number from unit context menu.
* Use letters instead of numbers in component edit dialog.
2014-12-20 12:26:37 -05:00
unknown 05073c15ed Add option to VRML Export for Plain PCB (patch from Cirilo Bernardo) 2014-12-20 17:13:51 +01:00
Nick Østergaard 41e044c0b4 Handle arcs in board outline in Eagle pluging. 2014-12-19 17:02:02 -05: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 1a748e6b9b Eeschema: Fix Bug #1404118 (Schematic Editor Option Seg Fault in Template Field Names) 2014-12-19 16:59:58 +01:00
jean-pierre charras 43013cec1f Fix crash in eeschema, config dialog. 2014-12-19 16:37:14 +01:00
jean-pierre charras 6deb3823d7 Aesthetic enhancements ( use few svg icons from Konstantin Baranowskiy).
Allows use of modifier shift key with letters A ... Z  in hot keys (including hot key editor). Thanks to John Bird, who helped me with his patch.
2014-12-18 19:53:19 +01:00
Ashley Mills bcbad9d3ec Fix FreeBSD build issues. 2014-12-16 15:47:47 -05:00
jean-pierre charras a5c5738559 Fix Bug #1210120 (commit rev 4280 did not fully fixed this bug)
Road map: Gerber X2 file function extension marked done in Pcbnew and Gerbview
2014-12-16 19:58:26 +01:00
Wayne Stambaugh 91c0868985 Update road map. 2014-12-14 16:42:28 -05:00
Nick Østergaard 46a5f14174 Enable search to Doxygen html files. 2014-12-13 15:58:09 -05:00
jean-pierre charras d83eb11aa6 Minor fixes. Remove unused icon. Add 3 new icons. Change one icon (3 icons are from Konstantin Baranowskiy) 2014-12-11 13:00:59 +01:00
Garth Corral 20d7c09a80 Merge trunk @ 5319 2014-12-10 20:35:52 -08:00
Maciej Suminski 7e249c758b bugfix: Tools are deactivated on canvas switch. 2014-12-10 00:50:31 +01:00
Nick Østergaard 1df31338a3 Shortcut for fill all and unfill all zones for GAL. 2014-12-08 23:41:47 +01:00
Johannes Maibaum 834d54415f OSX build fixes.
* Make patches/wxwidgets-3.0.2_macosx_yosemite.patch usable.  There were
  complaints here before that the patch does not work because it is a
  "metapatch" that tries to patch another patch (which is not in the tree
  and therefore fails). With this change, it becomes a normal patch again,
  that can be applied to the wxWidgets source tree as described in
  Documentation/compiling/mac-osx.txt.
* Make scripts/library-repos-install.sh compatible with OSX: This involves
  checking for the correct option to enable extended regular expressions in
  sed during detect_pretty_repos, as the script uses "-r", which is only
  available in GNU sed. The sed shipped with Mac OSX is an older BSD descendant
  sed which needs "-E". This change has been tested to work on Mac OSX 10.10.1
  and on an up-to-date Arch Linux.  I also changed the error message during
  --install-prerequisites to inform users without apt-get or yum which programs
  need to be installed to use the script.
* Add the execute flag to scripts/osx_build_wx.sh: At the moment, after
  fetching the source with bzr, one has to chmod the file by hand. This
  change change ensures consistency between the script and the build docs
  for OSX, which assumes the script to be executable.
2014-12-08 12:40:38 -05:00
Blair Bonnett de4e688b83 Imporve hot key name description. (fixes lp:1066193) 2014-12-07 14:10:12 -05:00
Garth Corral 5a202e16c6 Merge trunk @ 5315 2014-12-07 10:32:59 -08:00
John Beard 58f2d2e872 Fix debug assertion when CvPcb footprint list is empty. 2014-12-07 12:19:52 -05:00
Paul LeoNerd Evens 33f39fc282 Fix Eagle footprint library import of arcs. (fixes lp:1399745) 2014-12-07 12:07:05 -05:00
Nick Østergaard e373850d26 Add remove fill and fill all zones hot keys. 2014-12-06 16:21:13 -05:00
jean-pierre charras 0e996cac9e Pcbnew: fix Bug #1395594 (pcbplotparams parser sensitive to formatting)
Looked like a minor issue, but was due to a more serious bug, when using 2 different DSN_LEXERS which were not synchronized.
The fix is not perfect, but unfortunately, the parser used to read the PCB_PLOT_PARAMS in .kicad_pcb files is also used in legacy board file reader.
Therefore it is better than write 2 parser functions, one for legacy files, the other for the .kicad_pcb files, which make the same thing.
2014-12-04 20:15:26 +01:00
jean-pierre charras 0ac378fad7 More about BOM dialog. Still not perfect, but more easy to use. 2014-12-03 20:09:56 +01:00
jean-pierre charras f3765a32d8 Fix minor issues. Fix some outdated and broken BOM python scripts. Add info in BOM python scripts.
BOM dialog: remove a not very useful button, and merge its function with an other (not perfect, need more work)
Add message box to show info added in BOM python scripts (See scripts/bom-in-python/README-bom.txt about this info)
2014-12-03 17:22:06 +01:00
jean-pierre charras 479af2a7a8 Pcbnew, export Solder masks in Gerber Format: fix not working export when the solder mask minimal width is not 0 (the exported shapes were the same as if the vule = 0) with boost version >= 1.56
This is due to the fact the boost::pylygon function resize ( a inflate/deflate function) used for calculations does not work with boost version >= 1.56.
Use Clipper  inflate/deflate function instead. It is faster and works fine.
2014-12-01 15:54:33 +01:00
Garth Corral 0cf91f466f Merge trunk @ 5308 2014-11-30 10:35:24 -08:00
jean-pierre charras cf9a885c55 Modify usage of Inflate/deflate polygon in zone calculations, in order to be compatible with boost::polygon >= 1.56
Inflate/deflate polygons does not work very well (neither with  boost::polygon >= 1.56 nor with Clipper) for polygons which have holes linked by overlapping segments
(i.e. polygons with holes which can be drawn, because they are see as only one polygon)
Some code cleanup.
2014-11-30 18:40:34 +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 4bba4b875d Pcbnew: Allows trapezoidal pads in zones. 2014-11-29 13:58:34 +01:00
unknown f4ca3d5557 Fix bug 1397394 : Spelling mistakes in PCB Calculator 2014-11-29 10:24:21 +01:00
Bernhard Stegmaier b495ad0374 OSX build fixes.
* Make defintion of OSX build target a requirement.
* Update OSX build documenation to reflect build changes.
* Update OSX build script to reflect build changes.
2014-11-28 12:34:00 -05:00
Maciej Suminski e6ff6af7b3 Fixed typo. 2014-11-27 11:51:16 +01:00
Maciej Suminski 0daa1fa67e Missing fixes for the revision 5301. 2014-11-27 11:47:17 +01:00
Angus Gratton 6c4808bd49 pns: Non-copper pads are not treated as obstacles. 2014-11-26 15:46:47 +01:00
Maciej Suminski 03f7003c00 pcbnew: Unconnected items share the same NETINFO_ITEM, even if on different boards. 2014-11-24 16:34:47 +01:00
jean-pierre charras 30c7821ba2 Grebview: add info in layer manager for Excellon drill filles, similar to X2 file function info in X2 gerber files. 2014-11-23 12:41:57 +01:00
jean-pierre charras 49fa6f92a2 Eeschema: Netlist generator: remove option to generate the fully outdated old netlist file format (based on a very old Orcad netlist format)
Only the new (S expression) better netlist file format is now used.
2014-11-22 12:57:02 +01:00
jean-pierre charras 555ce68efe Gerbview: Add support for recent File Format Attribute metadata, both for X2 Gerber file format and X1 (R274X) format.
Pcbnew already uses this attribute when creating Gerber files.
Because Gerber files using this attribute identify the board layers stackup, Gerbview (if this attribute is defined) can sort gerber images stach up like the board.
(in layer manager, just right click to access to the sort menu)
2014-11-22 12:52:57 +01:00
Garth Corral 668c3b76bf Merge trunk @ 5297 2014-11-21 09:48:23 -08:00
Maciej Suminski 0c1a87ca56 selection_tool: Added SelectItem and UnselectItem actions. 2014-11-21 11:50:13 +01:00
Maciej Suminski 823623acb8 selection_tool: Renamed deselect* to unselect* for naming consistency. 2014-11-21 11:49:54 +01:00
Maciej Suminski 62e2537e73 selection_tool: Renamed selectSingle to selectCursor. 2014-11-21 11:49:28 +01:00
Maciej Suminski 18898fe807 tool: Added a generic parameter for RunAction(). 2014-11-21 11:28:34 +01:00
jean-pierre charras 383fec1510 More about fix issue on Ubuntu/Unity. 2014-11-19 21:45:57 +01:00
jean-pierre charras 1e5fa54d1a Try to fix an issue on Ubuntu/Unity for some dialogs which are not displayed. Adding GetSizer()->Fit( this ) after last dialog "geometry" change (size for instance) or Raise() if the window is not a dialog fix it.
Partial fix. There are few cases where the frame is still not displayed.
Looks like a Unity issue, not a Kicad issue.
2014-11-19 20:13:10 +01:00
Blair Bonnett 149a04f331 Fix crash in footprint editor when SMD pad diameter is zero. (fixes lp:1378917) 2014-11-19 13:39:02 -05:00
jean-pierre charras 8a1c8a91f4 More fixes on Ubuntu/Unity for dialogs which are not displayed. 2014-11-19 18:13:55 +01:00
jean-pierre charras ca2b9cee57 Try to fix issues on Ubuntu/Unity for dialogs which are not displayed: adding GetSizer()->Fit( this ) in some other dialogs 2014-11-19 16:54:36 +01:00
jean-pierre charras 2ab98f76c1 Try to fix an issue on Ubuntu/Unity for some dialogs which are not displayed. For most, adding GetSizer()->Fit( this ) in dialog constructor fix the issue, but at least one dialog still is not displayed. 2014-11-19 15:22:47 +01:00
TomCC 1a550b8ef1 Fix Python BOM script bug when output file cannot be opened. (fixes:lp:1391904) 2014-11-17 13:03:56 -05:00
jean-pierre charras 1ebaf1371a Fix remark 1 in Bug #1393277 (the option "use absolute paths" acts reversed: ticked exports relative paths, unticked exports absolute paths) 2014-11-17 14:55:26 +01:00
Garth Corral 79a1086089 Merge trunk @ 5288 2014-11-16 00:45:35 -08:00
Wayne Stambaugh 1dc5178095 Message panel consistency improvements and coding policy fixes.
* Make title capitalization consistant.
* Replace some instances of module with footprint.
* Use angle instead of orientation where appropriate.
* Remove abbreviations where it made sense.
* Coding policy fixes.
2014-11-15 14:06:05 -05:00
Blair Bonnett a95b5693fc Fix Linux desktop mime definitions to match FreeDesktop specification. (fixes lp:746710) 2014-11-15 09:14:01 -05:00
Camille 5729ee7ea5 Compile warning fixes and minor code policy fixes. 2014-11-15 08:43:23 -05:00
John Beard 71e5fb13e6 Segment message panel infromation improvements.
* Make "Drawing" string translatable.
* Add segment length to message panel.
* Add segment angle to message panel.
2014-11-15 08:09:59 -05:00
Maciej Suminski 9245b90392 Code formatting. 2014-11-14 20:19:00 +01:00
Tomasz Wlostowski 7721d02afe gal/stroke_font: made text vertical alignment follow the non-GAL renderer. 2014-11-14 19:19:08 +01:00
Tomasz Wlostowski 33f3aca611 geometry: IsSolid() and Move() methods, segment overlap detection, some improvements in SHAPE_LINE_CHAIN class. 2014-11-14 19:18:31 +01:00
Tomasz Wlostowski 4e280f065f P&S router: fixed shove force propagation incorrect issues causing improper via dragging. 2014-11-14 19:17:52 +01:00
Tomasz Wlostowski 4e67de5c15 P&S router bugfixes
- fixed walkaround bug causing unwanted overlap/clearance violation when the first segment of trace being laid intersects the obstacle's hull at the same point twice (ie. goes in, turns around and goes out).
- fixed placer bug not splitting the start segment after toggling via placement or changing trace width
2014-11-14 19:17:01 +01:00
Tomasz Wlostowski 80adf9d85b router: multiple changes
- re-worked PNS_LINE_PLACER and PNS_ROUTER classes a bit, removing duplicate class members
- cleaned up Andrew's blind/buried via fixes
- fixed 'custom via width' dialog bug updating the width even when closed/cancelled
- fixed incorrect radius of drawn microvias
2014-11-14 19:15:58 +01:00
Garth Corral c3a3ac9da2 Merge trunk @ 5278 2014-11-14 09:04:21 -08:00
Nick Østergaard 32eb568ec4 Pcbnew place track menu entry hot key text fix. 2014-11-14 11:09:07 -05:00
Maciej Suminski 030e4795f0 Added an additional search path for GLEW (closing bug report 1247910). 2014-11-14 09:30:52 +01:00
jean-pierre charras 35c591166f Pcbnew: fix Bug #1391561 (PCBNew segfaults on BOM creation). Does not happen on all platforms. Could be due to use of data just previoulsy deleted.
Very minor other changes.
2014-11-14 08:25:17 +01:00
Maciej Suminski 15aa24afe8 pcbnew: Modules can be selected with block selection tool without including texts & references (GAL). 2014-11-13 17:32:59 +01:00
Maciej Suminski 4eabe23104 pcbnew: Allows selecting module edges in module editor, when they are covered with other items (GAL). 2014-11-13 16:58:24 +01:00
Maciej Suminski 90c7c72d81 Reverted missing changes. 2014-11-13 16:37:15 +01:00
Maciej Suminski 7de3aa9af2 Reverted the last commit, apparently not every GLEW contains required definitions. 2014-11-13 16:30:30 +01:00
Maciej Suminski 1f8b77697f gal: Check maximum framebuffer size (OpenGL). 2014-11-13 16:17:53 +01:00
Maciej Suminski 1855db5493 pcbnew: Fix persistent multiple items selection box that stays after selecting a polygon/line (GAL). 2014-11-13 14:11:26 +01:00
unknown d54675b56b Fix bug in IDF export (plus minor cleaning up of IDF/VRML export) 2014-11-13 12:29:05 +01:00
Maciej Suminski d84567ae40 pcbnew: fixes crash when a new part footprint is changed. 2014-11-13 11:06:41 +01:00
jean-pierre charras f5fd471dd9 Pcbnew: fix Bug #1392087 ( adhesive layer plot broken ). 2014-11-13 09:00:28 +01:00
Garth Corral 7edce2fa16 Merge trunk @ 5266 2014-11-12 21:01:25 -08:00
Alexander Golubev 1aec1f5985 An ugly if condition replaced with a CACHE'd cmake variable in CMakeList.txt. 2014-11-12 21:09:47 -05:00
Adam Wolf 174c62440b Fix previous version of patches/wxwidgets-3.0.2_macosx_yosemite.patch. 2014-11-12 19:38:18 -05:00
Wayne Stambaugh 37da6766ec Update avhttp-master.zip to the latest version so Boost 1.57 can be used to build KiCad. 2014-11-12 19:13:27 -05: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
unknown b411b240f2 bitmap2component: Add a layer selection to export a logo for Pcbnew from a Cirilo Bernardo's patch.
Apply patch from Cirilo Bernardo with some minor changes: mainly allows also the solder mask layer and keep ref and value fields on the silk layer.
2014-11-12 17:59:12 +01:00
unknown 9524ad1f17 Cvpcb: fix bug Bug #1386933 (Horizontal scrollbars not appearing in CvPcb) 2014-11-12 11:46:40 +01:00
jean-pierre charras 9e6ed2b75f Eeschema plot: fix Bug #1391538 (eeschema PS/PDF export, objects have wrong Z-order ) 2014-11-12 11:32:02 +01:00
Blair Bonnett 1188cd433b Fix wxWidgets debug assertion for wxTextCtrl::IsSingleLine() in GTK.
* Fix assertions in Eeschema when editing net labels, electronic rules check,
  and plotting.
* Fix assertion when opening PCB calculator.
* Fix assertions in Pcbnew when changing footprints in footprint properties
  dialog and adding or editing text.
2014-11-09 14:24:37 -05:00
Garth Corral a0e0958cec Merge trunk @ 5258 2014-11-08 14:21:46 -08:00
jean-pierre charras f877a1159e Fix python scripting issue (EDA_RECT not mapped) 2014-11-08 14:30: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
Garth Corral a2bff761c3 - Revert some local build changes that slipped in inadvertently
- Remove a local patch that was added to trunk as wxwidgets-3.0.0_macosx_scrolledwindow.patch
2014-11-06 20:06:29 -08:00
Garth Corral f5a8689385 Merge trunk @ 5256 2014-11-06 20:01:54 -08:00
Garth Corral 3764021ef7 Add patch for wxWidgets 3 to fix scrolling on OSX. 2014-11-06 19:50:08 -05:00
Garth Corral 5c3cc11ed5 Fix debug assertion when clicking on hot key menu. (fixes lp:1389932) 2014-11-06 15:56:34 -05:00
Adam Wolf 5f6f59ef2e Fix OSX bundle library write permission bug. 2014-11-06 13:36:07 -05:00
jean-pierre charras f55a436d58 map class CPolyLine (used in zones) in Python. 2014-11-06 16:27:22 +01:00
Alexander Golubev 483a7b2747 A small cmake enhancement:
An ugly if-condition replaced with a CACHE'd cmake variable.
2014-11-05 19:39:36 +03:00
Gilbert 9f6d1d0ea7 Update the kicad-install.sh script to work with Fedora 20. 2014-11-04 14:32:22 -05:00
Adam Wolf e9a25ceba9 Added patch for wxWidgets 3.0.2 for Mac OSX 10.10 (Yosemite).
* Patch was taken from https://trac.macports.org/ticket/44524 for the upstream
  bug of http://trac.wxwidgets.org/ticket/16329.
2014-11-04 14:24:22 -05:00
Garth Corral c9d3fd6d89 Merge trunk @5250 2014-11-03 09:06:13 -08: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
Dick Hollenbeck 322aae6a2e Test for existence of *.sch file so Eeschema does not create a new one. 2014-11-02 08:17:48 -05:00
Marco Ciampa 40f044bd8d More renaming instances of module to footprint for consistency. 2014-11-02 07:44:57 -05:00
Gilbert J.M. Forkel 25061ed626 Add check for correct wxGTK version report by wx-config. If incorrect cmake fails. Compare https://bugzilla.redhat.com/show_bug.cgi?id=1077718 2014-11-02 00:20:53 +01:00
Gilbert J.M. Forkel 6aa4de9bfd Do not exit if yum group install fails, because it also fails if all packages are installed already 2014-11-02 00:05:56 +01:00
Gilbert J.M. Forkel 7413cfd160 Updated wxWidget from 2 to 3 2014-11-01 23:58:34 +01:00
Gilbert J.M. Forkel 4942c8b982 Removed invalid packet: install 2014-11-01 23:57:33 +01:00
Garth Corral 2c9b84a7f4 Merge trunk @ 5247 to pickup build fixes 2014-10-31 17:38:40 -07:00
Wayne Stambaugh 0561940db0 Fix CMake warning caused by removal of boost dependency when not actually building boost from source. 2014-10-31 17:22:37 -04:00
Michal Jahelka 835bb37b88 Remove library nickname from module position file 2014-10-31 21:18:25 +00:00
Wayne Stambaugh 03d50b2213 Change Windows install tree to match Linux install tree.
* Move all Windows install subfolders from ${CMAKE_INSTALL_PREFIX}/share/ to
  ${CMAKE_INSTALL_PREFIX}/share/kicad/.
* Remove unused define DEFAULT_FP_LIB_PATH from build configuration.
* Remove Boost target when skipping internal Boost build.
* Update INSTALL.txt to reflect install tree changes.
2014-10-31 16:44:09 -04:00
jean-pierre charras 7b5318ff64 Fix minor issues about translated strings and coding style. Add comment relative to file function info in X1 gerber file format. 2014-10-31 19:59:37 +01:00
jean-pierre charras db31daffe4 Fix compil issue I created in rev 5242 when KICAD_SCRIPTING_WXPYTHON is ON 2014-10-31 16:21:57 +01:00
jean-pierre charras 4fd2a4da94 Pcbnew, python console: refinements. 2014-10-31 15:45:46 +01:00
Garth Corral e8bfd5fa5d Merge in trunk 2014-10-31 01:23:16 -07:00
jean-pierre charras 30497943f7 Pcbnew: Console python: use a wxMiniFrame to show the console and remove the management by a EDA_PANEINFO, which was not the right way to manage this console. 2014-10-31 08:52:51 +01:00
jean-pierre charras 7e431a0d4b Pcbnew: Console python: use a wxMiniFrame to show the console and remove the management by a EDA_PANEINFO, which was not the right way to manage this console. 2014-10-31 08:51:22 +01:00
Garth Corral efafe11f1d - Fixed and issue where Cmd+Shift-modifed (off-center) mousewheel zoom direction was
inverted due to wxWidgets handling of the axis and wheel rotation of shifted events.
2014-10-31 00:49:43 -07:00
Garth Corral 4b9db692fb - Changed mousewheel handling to pan more smoothly rather than in larger
steps to better support devices with precise scrolling deltas (trackpads).
  Scrolling is done in the handler rather than creating and firing cmd events.
  This is intended to support two-finger scrolling on the Magic Trackpad.
- Added a preference, 'Use mousewheel to pan', to allow panning by default
  on mousewheel events.  This reverses the existing behavior where unmodified 
  mousewheel zooms and Shift/Cmd modified pans.  

  The old behavior was:
  - Unmodified scrollwheel performed zoom in/out
  - Shift modified scrollwheel performed pan up/down
  - Cmd modified scrollwheel performed pan left/right
  - Shift+Cmd modified scrollwheel performed zoom in/out
    with no cursor warp

  With the new preference checked, this changes to:

  - Unmodified scrollwheel performs pan up/down
  - Shift modified scrollwheel performs pan left/right
  - Cmd modified scrollwheel performs zoom in/out
  - Shift+Cmd modified scrollwheel performs zoom in/out
    with no cursor warp

  With the preference unchecked, this is now:
  - Unmodified scrollwheel performed zoom in/out
  - Shift modified scrollwheel performed pan left/right
  - Cmd modified scrollwheel performed pan up/down
  - Shift+Cmd modified scrollwheel performed zoom in/out
    with no cursor warp

  It should be noted that for the last case, the behavior has changed.
  This is not arbitrary.  This now matches expected behavior for an OS X
  application.  This also matches what wxWidgets expects on this platform
  as wxWidgets changes the axis of mousewheel events to horizontal when
  the event is shift-modified.

  The preference is added everwhere that mouse preferences previously
  existed, i.e., eeschema, pcbnew and gerbview.  The 3D Viewer does
  not yet honor this preference, but behaves as if it was checked.
  The pl_editor does not currently have any preferences to honor.

  As with the magnify event support, this covers canvases for all
  current tools, EDA_DRAW_PANEL, EDA_3D_CANVAS and EDA_DRAW_PANEL_GAL.

  This does NOT modify the behavior of mousewheel zooming, though it
  probably should.  This remains unsuitable for use with a trackpad,
  use pinch-to-zoom instead.
2014-10-30 11:53:08 -07:00
Marco Ciampa 359e64850d More renaming instances of module to footprint for consistency. 2014-10-30 13:31:56 -04:00
Garth Corral ae322dba35 - Updated mac-osx.txt with instructions for compiling in magnify event support. 2014-10-30 09:57:49 -07:00
Garth Corral cf020b77aa - Added a patch to fix http://trac.wxwidgets.org/ticket/15684
This was causing scrollwin events to be handled in the wxScrolled
    default handler even if we'd already handled it, resulting in scrolling
    in both the vertical and horizontal direction for a single event.
2014-10-30 09:45:16 -07:00
Garth Corral 6c137ac79c Added support for wxWidgets magnify events from the Magic Trackpad on OS X
Committing this separately from the rest to ease making a patch for just this
  functionality in case that it might make it into the trunk.
  
  This can function standalone, though it is less useful without the rest.
  It requires that wxwidgets-3.0.0_macosx_magnify_event.patch be applied to wxWidgets
  It is completely optional; everything is guarded by the USE_OSX_MAGNIFY_EVENT macro.
  
  - Added OnMagnify event handler to EDA_DRAW_PANEL, EDA_3D_CANVAS and the helper for
    EDA_DRAW_PANEL_GAL, WX_VIEW_CONTROLS. This should cover canvases all current tools.
  - Guarded all with USE_OSX_MAGNIFY EVENT feature macro and added support in CMakeLists.txt
2014-10-30 09:42:19 -07:00
Garth Corral 83667d4d39 - Add wxWidgets patch to support Cocoa's NSEventTypeMagnify from the Magic Trackpad.
This was originally submitted by Jared Boone in http://trac.wxwidgets.org/ticket/14322
    and has been updaetd to apply cleanly to wxWidgets-3.0 (and less cleanly to 3.0.1 an 3.0.2).
    The ticket is marked as accepted but not scheduled, so no idea if it will ever make it in.
2014-10-30 09:39:02 -07:00
Garth Corral 96f61af19b Fix wxWidgets OSX patch bug when configured for monolithic build. (fixes lp:1387271) 2014-10-30 12:07:43 -04:00
Marco Ciampa 5d306bb244 Rename instances of module to footprint for consistency. 2014-10-30 11:37:46 -04:00
jean-pierre charras 09e20c6c0f Pcbnew: fix a serious bug in ZONE_CONTAINER class copy constructor: a pointer was not initialized. Pcbnew crashes when deleting or filling a copied zone.
Eeschema: remove dead code and uncrutify class_netlist_object.h
2014-10-30 09:42:11 +01:00
Wayne Stambaugh 8814d67034 Update road map document. 2014-10-29 16:02:50 -04:00
jean-pierre charras 29e6a93d01 Add license information to PolyLine.h and PolyLine.cpp files. 2014-10-29 13:18:02 +01:00
jean-pierre charras b87d034158 Cvpcb, fp conflict assignment selector: fix issue on Linux. 2014-10-29 13:00:42 +01:00
jean-pierre charras 6f99e608b0 fp conflict assignment selector: fix issue on Linux. 2014-10-29 10:52:39 +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 045f7f0d4d Kicad manager, Gerbview: When running Gerbview from Kicad manger, set the Gerbview CWD to the current project directory.
Therefore, when trying to open Gerber files, the default directory is now thecurrent project directory.
(fix Bug #1380088 )
2014-10-28 20:29:44 +01:00
jean-pierre charras a061eeb176 Cvpcb: Fix a very minor issue. 2014-10-28 16:21:20 +01:00
jean-pierre charras 3abfb6ca97 Cvpcb: Add a tool to solve conflict assignments when the schematic netlist and the .cmp file do not contain the same assignment and both are valid fpid.
It happens when footprint assignments are modified outside Cvpcb (when editing the footprint assignment field in schematic)
2014-10-28 16:15:39 +01:00
unknown a7b916d641 Eeschema: Fix Bug #983251 (Eeschema mouse hit testing error on non horizontal or vertical wires) 2014-10-28 13:03:50 +01:00
Wayne Stambaugh 86b39ca3c0 More missing source license fixes. 2014-10-27 10:14:39 -04:00
jean-pierre charras 71c4f49d1d Kicad manager: fix Bug #1385953 (unable to open .PDF files with spaces in name/path when using default PDF browser).
Fix also an issue when selecting preferred browser.
2014-10-27 10:32:24 +01:00
Wayne Stambaugh e273a48ddc Remove old build configuration since kiway is now the only way to build kicad. 2014-10-26 15:54:48 -04:00
unknown ad645abac4 Eeschema, Plot dialog: add Plot directory selection. The patch from 1383026@bugs.launchpad.net was widely used. 2014-10-26 14:59:01 +01:00
jean-pierre charras fa96780798 eeschema: fix Bug #1385789 (eeschema segfaults, when editing a new field). Fix an other minor bug in Footprint editor. 2014-10-26 12:42:25 +01:00
Nick Østergaard 5034f07a31 * Update the python qa test suite to exit with an error code if any errors fail 2014-10-25 22:26:41 +01:00
Brian Sidebotham e4a5f2482e * Fix FindPythonLibs to search /include/ for Python.h 2014-10-25 21:56:44 +01:00
Wayne Stambaugh d3b4d535a1 Fix build issues on MinGW when finding OpenSSL.
* Add FindOpenSSL.cmake from CMake 3.0.2.
* Change MinGW find library to find libssl and libcrypto as well as libeay32 and ssleay32.  Apparently
 at some point OpenSSL changed the library file names for MinGW.
* Stop find_library() from looking in system paths and returning the actual DLLs rather than the link
  libraries.
2014-10-24 17:06:50 -04:00
Wayne Stambaugh 3ee0c98c9f Restore custom FindPythonLibs.cmake with improvements to fix MSYS2 bug. 2014-10-24 11:28:07 -04:00
Maciej Suminski 1338774d54 pcbnew: Disable DXF import in the module editor when there is no module loaded. 2014-10-24 11:19:54 +02: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
Wayne Stambaugh f12953855e More missing source license fixes. 2014-10-23 13:53:38 -04:00
Wayne Stambaugh b7f890adb3 Fix parallel build bugs.
* Make all files generated by make_lexer() dependencies of thier respective build targets.
* Make building Boost a dependency for all libraries.
* Remove duplicate make_lexer() call for Specctra lexer files.
2014-10-22 19:25:59 -04:00
Wayne Stambaugh fd0d266bfe More missing source license fixes. 2014-10-22 11:51:34 -04:00
jean-pierre charras 7b13463302 change malformed comments in kicad.i 2014-10-22 13:16:20 +02:00
Brian Sidebotham 3c7113107a * Add Cirilo Bernardo as contributor in AUTHORS.txt 2014-10-22 11:24:16 +01:00
Brian Sidebotham 4d8e9b6f95 * Update AUTHORS.txt with more valuable contributors 2014-10-22 10:17:01 +01:00
Wayne Stambaugh 40779a08ce More missing source license fixes. 2014-10-21 14:36:45 -04:00
jean-pierre charras c237838d00 python scripting: refinement for UTF8 class (from Miguel Ángel Ajo Pelayo) add __str__ method, usefull to print a UTF8 string.
Kicad manager: fix issues in file watcher: changes (adding/removing files)  in project folder not seen by Kicad manager (perhaps due to changes in internal wxWidgets code between 2.9.5 and 3.0).
2014-10-21 18:34:51 +02:00
nosuz 959b63ba8f Fix kicad-install.sh to only install wxPython when building with scripting enabled. 2014-10-21 11:52:30 -04:00
Wayne Stambaugh 8cdd4faad5 More missing source license fixes. 2014-10-21 11:48:00 -04:00
Joseph Chen ad5ca60401 Minor improvements to kicad-install.sh.
* Exit script when package install, build configuration, or build fails.
* Install each dependency package one at a time.
2014-10-20 10:33:53 -04:00
Wayne Stambaugh 08bfaa416d More source file missing license fixes. 2014-10-19 18:17:43 -04:00
Wayne Stambaugh e8362df15f Add missing source file licenses and code policy fixes. 2014-10-19 16:20:16 -04:00
Wayne Stambaugh fa9f2f0439 Fix MSYS2 build configuration issues. 2014-10-19 14:36:41 -04:00
Wayne Stambaugh 5c952a2afa Add stable release policy to developers documentation.
* Write stable-release-policy.md for upcoming stable release.
* Remove unused Doxygen options from Doxyfile.
2014-10-18 11:37:08 -04:00
unknown 6728f0a863 scripts/test_kicad_plugin.py cleanup 2014-10-18 17:11:25 +02:00
jean-pierre charras f23bb59cd1 Python scripting: make UTF8 class accessible by python scripts. Add python method GetChars() to UTF8 class to get its char buffer.
See scripts/test_kicad_plugin.py for example.
2014-10-18 10:18:14 +02:00
Wayne Stambaugh 431ed318e0 Pcbnew VRML export improvements.
* Improve VRML export dialog lay out.
* Make the OK button the default action in the export dialog.
* Make 3D model export work correctly and avoid redundant file copies.
* Fix embedded path separators in wrl files on windows.
* Fix absolute model file path creation in wrl files.
* Clean up VRML export code.
2014-10-17 19:28:12 -04:00
Henner Zeller 40468bffa8 Fix install location of fp-lib-table in scripts/library-repos-install.sh. 2014-10-17 14:44:38 -04:00
jean-pierre charras 9c64b061fe Pcbnew: fix Bug #1380943 (Filled polygons with thick outlines are missing last outline thick segment in gerber)
Remove a debug message in searchhelpfilefullpath.cpp.
2014-10-17 20:30:56 +02:00
Bernhard Stegmaier f06bfe6d70 Commit the rest of the OSX build fixes missed in the previous commit. 2014-10-17 13:45:33 -04:00
Mark Roszko 816974b8ca Hot key editor dialog improvemnts.
* Change hot key editing contol from wxGridTableBase to wxListCtrl.
* Separate hot key lists into separate tabs rather than one large list.
* Coding policy fixes.
2014-10-17 10:36:47 -04:00
jean-pierre charras 4167080692 Kicad manager: fix Bug #1380935 (Archive function for projects strange behavior.)
Archive function now recurses project sub directories.
2014-10-17 14:52:11 +02:00
unknown 5a947e6759 Fix bug: Dialog "Page settings" does not always detect page format. Formats A, B, C, D, E, Custom (User) are detected right but A0-A4, US* are wrong. 2014-10-17 10:14:30 +02:00
Mark Roszko c85d64aee6 Fix hotkey editor on Windows not using max height of the dialog for the list control.
Set wxNO_BORDER for the tab page.
2014-10-16 23:16:46 -04:00
Bernhard Stegmaier a4c59e6b97 More OSX build fixes.
* Many path related fixes.
* Fix execution of external applications.
* Update mac-osx.txt.
* Add top-level links for standalone applications inside OSX bundle.
* Fix document icons for Eeschema and pl_editor.
* Create individual bundles for standalone applications inside the main application bundle.
* Add usual 'site-packages' to python path in OSX bundle.
* Fix name of OSX bundle plugin folder.
2014-10-16 18:13:01 -04:00
Brian Sidebotham e4eddc5649 * Update AUTHORS.txt to include known contributors 2014-10-16 21:53:13 +01:00
Mark Roszko 606f2e91f8 Make hotkey command titles use consistent capitalization.
Rename "Switch highcontrast" to "Toggle High Contrast".
Eliminate most of the abbreviated hotkey titles.
Doxygenize dialog_hotkeys_editor.h and add missing license block.
Display <unassigned> if key code is 0 (NULL).
2014-10-15 21:17:51 -04:00
Mark Roszko 651a92a80f Hotkey Editor Polishing
Refactor hotkey editor to use tab control instead of one giant list.
Each tab is a separate hotkey section.
Modify EDA_HOTKEY_CONFIG to change the m_Comment member to m_Title for a new purpose.
We want a pretty title in the hotkey editor. We use m_Title for the key export comment which
still conveys the purpose just as easily.
Refactored usage of wxGrid into wxListCtrl which allows capturing navigation characters
and also works better (single selection is built in).
Add hotkey overwrite prompts that are paired with "Common" section. It will check if a hotkey
overlaps with the proper sections. i.e. Common with the all other sections; or Section 1 with just Common.
Right-click menu removed due to wxListCtrl being able to catch the special keys properly.
2014-10-15 21:17:46 -04:00
Brian Sidebotham 753d834029 Enhance EESCHEMA Options Dialog
* Include new field template editor
    - Removes 10 template limitation
    - Adds ability to set default value
    - Adds ability to set default visibility
  * Documentation to follow
  * Tested in Linux (Ubuntu 14.04) + Windows, Windows has issue with displaying highlight for selected template, fix to follow
2014-10-15 20:46:08 +01:00
jean-pierre charras 203247aefe Add missing search paths in kicad help doc search paths ( only noticeable for non English users ). Sometimes the translated doc was not found, and the English doc was displayed. 2014-10-15 15:14:14 +02:00
jean-pierre charras 77b3201bbf Libview and Modview: fix issues relative to hotkeys (hardcoded keys instead of user defined keys and not working tools and popup menus).
Add menubars (can be disabled)
Fix also some minor coding style issues.
2014-10-15 14:08:42 +02:00
jean-pierre charras d82f403fd7 Libview and Modview: fix issues relative to hotkeys (hardcoded keys instead of user defined keys) and not working tools and popup menus.
Fix also some minor coding style issues.
2014-10-15 13:40:38 +02:00
Brian Sidebotham b554a22176 * Fix unedited dialog 2014-10-14 23:55:42 +01:00
Brian Sidebotham 11919da621 * Fix issues mainly for windows 2014-10-14 23:50:47 +01:00
Mark Roszko 396e7b8ccb Add select footprint feature to Eeschema field properties dialog. 2014-10-14 16:39:25 -04:00
Brian Sidebotham 37748ad24e * Final commit for eeschema options dialog tidyup + template field name improved editor 2014-10-14 21:14:18 +01:00
Brian Sidebotham 40c276605e * Commit before merge 2014-10-14 19:52:31 +01:00
Konstantin Baranovskiy f8cea8188b Fix CvPcb menu accelerator bug in Linux. (fixes lp:1375232) 2014-10-14 09:18:48 -04:00
Maciej Suminski 788a25438a pcbnew: Minor fixes to 'Find Item' dialog (GAL canvas). 2014-10-13 20:27:36 +02:00
jean-pierre charras 7c9418f667 Add FILE_NAME_WITH_PATH_CHAR_VALIDATOR, a custom wxValidator which allows file names with paths, in schematic sheet editor
( FILE_NAME_CHAR_VALIDATOR previously used in this dialog does not allow chars used in path names, like / and on Windows \ and : )
2014-10-13 18:42:28 +02:00
Maciej Suminski d12ffd307f Added missing header file. 2014-10-13 15:30:57 +02:00
Maciej Suminski 0d7b7b02e7 pcbnew: Apply display settings on canvas switch (GAL canvas). 2014-10-13 15:26:06 +02:00
Maciej Suminski ac7bdfc7f6 pcbnew: Fixed 'Find Item' (GAL canvas). 2014-10-13 15:25:16 +02:00
Maciej Suminski 18c9a62c6e pcbnew: DIALOG_FIND allows to change warp options and set callbacks for found items. 2014-10-13 15:23:30 +02:00
Maciej Suminski ad2df70953 Added EDA_DRAW_PANEL_GAL::ForceRefresh(). 2014-10-13 15:22:45 +02:00
Maciej Suminski 1c74019f4c pcbnew: Added "Get and Move" in pcbnew (GAL canvas). 2014-10-13 15:22:14 +02:00
unknown 4280a1f5d3 Fix absence of PCB_TARGET class in python interface. 2014-10-13 13:14:02 +02: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
Mark Roszko 2d008c79fd More module to footprint UI fixes. 2014-10-12 11:12:02 -04:00
Wayne Stambaugh 716613b7da Actually make FindPythonInterp.cmake use correct FindPackageHandleStandardArgs.cmake. 2014-10-11 17:50:18 -04:00
Wayne Stambaugh 655703ccc8 CMake housekeeping.
* Remove CMakeParseArguments.cmake to use the version that ships with CMake.
* Remove FindPackageHandleStandardArgs.cmake to use the version that ships
  with CMake.
* Remove FindPythonLibs.cmake to use the version that ships with CMake.
* Edit FindPythonInterp.cmake to use the stock CMake version of
  FindPackageHandleStandardArgs.cmake since the local version was removed.
2014-10-11 17:22:50 -04:00
Mark Roszko a08471b725 Convert UI inconsistent use of legacy term module to footprint. 2014-10-09 20:23:40 -04:00
Bernhard Stegmaier a9ab824373 Fix OSX wxPython scripting build when running parallel builds. 2014-10-09 19:45:58 -04:00
John Beard ef2337ca16 Improve alias handling in component chooser dialog. 2014-10-08 20:49:29 -04:00
Wayne Stambaugh a398d45914 Fix coding policy violations missed in previous commit. 2014-10-08 19:54:51 -04:00
Mark Roszko 4aa28d82a7 Eeschema dialog improvements.
* Use the proper verb Annotate in the Annotate dialog for the action button
* Used the proper verb Generate in the Netlist dialog for the action button
* Fix ERC dialog title to be "Electrical Rules Checker".
* Fix all usages of "Erc" to "ERC" consistently in ERC dialog.
* Move action buttons to bottom of ERC dialog and change Del Markers to
  Delete Markers.
* Add tooltips to ERC options matrix buttons to indicate their current state.
* Cleanup ERC options code that for some reason decided to delete the button
  and recreate it instead of just updating it's bitmap directly.
* Rename "Test ERC" to "Run" to describe what it's actually doing properly
2014-10-08 19:45:21 -04:00
Mark Roszko c29ee59cf1 Centralize error count update logic, clear the count on marker deletion. 2014-10-08 18:40:47 -04:00
Mark Roszko 1d80fb7410 Reword count labels to be more proper 2014-10-08 18:40:39 -04:00
Brian Sidebotham 6f1b2e8265 * Merge TRUNK 2014-10-08 21:48:01 +01:00
Brian Sidebotham 9f811aaaa0 * Changes before merge 2014-10-08 21:47:42 +01:00
Berhnard Stegmaier b8d1789a22 OSX build fixes and improvements.
* Fix creation of single app bundle with respect to scripting support.
* Cleanup scripting search paths for OSX.
* Fix some small CMake bugs from previous OSX build change.
* Optimize bundle file structure to be consistent with Apple specs.
* Add helper script for compiling wxWidgets and wxPython
* Update OSX build instructions.
2014-10-08 14:41:36 -04:00
Mark Roszko fbc4abc55a Update module to footprint in the little info bar at bottom of window
Fix text in Get and Move Footprint Dialog
Fix right click in board editor options
2014-10-08 02:26:26 -04:00
Mark Roszko fcbfaac7c9 Update footprint editor property dialog to use "Footprint" instead of "Module" 2014-10-08 01:58:59 -04:00
Mark Roszko bfdc13df61 Update footprint property editor (activated from board editor) to use "Footprint". 2014-10-08 01:54:52 -04:00
Mark Roszko 08f0051799 Rename module to footprint in menu,toolbars, window, etc that are in code 2014-10-08 01:50:56 -04:00
Mark Roszko 87aba60608 Tweak the ERC dialog a bit.
Fix dialog title to be "Electrical Rules Checker" to match everywhere else.
Fix all usages of "Erc" to "ERC" consistently.
Move action buttons to bottom of dialog, make Del Markers actually say Delete Markers.
Add tooltips to ERC options matrix buttons to indicate what their current state is, for newb friendliness.
Cleanup ERC options code that for some reason decided to delete the button and recreate it instead of just updating it's bitmap directly.
Rename "Test Erc" to "Run" because you are running ERC and not testing it.
Fix improper usage of SetLabel on a wxTextCtrl instead of SetValue so the ERC totals now work!
2014-10-08 00:02:48 -04:00
Wayne Stambaugh 0b2cadbcca Fix minor OSX errors in the OSX build documentation. 2014-10-07 15:15:17 -04:00
Henri Valta bfab279a43 Fix parallel build issue when KICAD_SKIP_BOOST=ON. 2014-10-07 14:10:01 -04:00
jean-pierre charras fc2229dfca Eeschema: fix Bug #1376669 (graphics lost in aliased components)
Cleaning 3 svg files (no icon change)
Very minor other changes.
2014-10-06 20:13:11 +02:00
Wayne Stambaugh 99f30c9d38 Road map and Doxygen work.
* Remove obsolete settings from Doxygen configuration file.
* Fix some Doxygen warnings.
* Add the board edge segment snapping to developers road map.
* Fix some coding style issues in CMakeLists.txt
2014-10-05 21:18:24 -04:00
Mark Roszko 8a2eecf435 Use the verb "Annotate" instead of "Annotation" in the Annotate Schematic dialog 2014-10-05 19:33:20 -04:00
Mark Roszko 3169b4170f Use the verb "Generate" rather than the noun "Netlist" on the button in the Netlist Dialog. 2014-10-05 19:32:12 -04:00
Lorenzo Marcantonio 94f8c2a276 Implemented TEXTE_MODULE::GetShownText
Handles % macro expansion in user texts inside pcb modules.
At the moment the following are available:
%%      A plain %
%R      Insert the reference
%V      Insert the value
2014-10-04 17:15:38 +02:00
Bernhard Stegmaier 8b3c14c08b OSX build improvements.
* Compile all binaries into a single application bundle.
* Use CMake BundleUtilities to make application bundle relocatable.
* Restructure build output to directly create an image file.
* Fix default search paths.
* Set KIGITHUB environment variable.
* Added patch to fix wxWidgets so names for OSX.
2014-10-02 19:03:52 -04:00
jean-pierre charras e6274f70b0 BOARD::Add(): fix an issue for tracks: parent not set (could be an issue only in python scripts, because the parent is set by the constructor)
*.i : fix coding style issues.
python method: add BOARD_ITEM Duplicate, which is a wrapper to Clone(). ( defined as Cast_to_BOARD_ITEM(selt.Clone()).Cast() )
update some .py examples.
2014-10-02 19:09:32 +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
Wayne Stambaugh 21ca86573f Fix a minor bug in FindwxWidgets.cmake version.h path search. 2014-09-30 18:43:20 -04:00
Brian Sidebotham 91f85dd06d * Merge Trunk 2014-09-30 20:55:36 +01:00
Brian Sidebotham d4b94b9be2 * Intermediate changes 2014-09-30 20:55:18 +01:00
jean-pierre charras e617c5e6b1 Pcbnew: fix some issues when using python scripting (remove outdated SEG_ZONE item, fix broken access to netclass, track width and via size lists, add missing access to zones)
Update listPcb.py to show how to access zones.
2014-09-30 20:23:27 +02:00
Andrew Zonenberg 45a8e4da74 pns_router: Support for blind/buried vias. 2014-09-30 16:46:19 +02:00
jean-pierre charras 927d11f78c Eeschema: fix Bug #1375581 (libraries setup empty after clicking "print" icon) 2014-09-30 10:12:00 +02:00
Brian Sidebotham 2c476bc780 * Merge Trunk 2014-09-29 20:47:45 +01:00
Brian Sidebotham f13edb6ab9 * Intermediate changes before TRUNK merge 2014-09-29 20:47:25 +01: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
Wayne Stambaugh 1b6cfcab42 Update kicad-install.sh to install wxWidgets 3.0 on Debian based distro builds. 2014-09-28 20:18:10 -04:00
Brian Sidebotham 230b60e697 * Merge changes from trunk 2014-09-28 21:37:53 +01:00
Brian Sidebotham a71823b4a5 * Missing changes 2014-09-28 21:37:35 +01:00
jean-pierre charras 24ed7f50f5 Pcbnew: fix Bug #1370321 (Change Segment function applies last netclass used).
Also update main toolbar track width and via size info in pns router mode, when starting a track, and other very minor update issue.
2014-09-28 16:44:47 +02:00
jean-pierre charras b653da5e29 change name TEXTE_MODULE::MirrorWithModule to TEXTE_MODULE::MirrorTransformWithModule, because it is a function specific to a footprint transform in modedit.
change also name TEXTE_MODULE::RotateWithModule to TEXTE_MODULE::RotateTransformWithModule for same reason.
Pcbnew: fix Bug #1374484 (text changes position when module is flipped and rotated). Fix also some bugs in modedit, in block commands.
2014-09-27 18:39:18 +02:00
Wayne Stambaugh 92d141a846 Fix FindPackageHandleStandardArgs.cmake for differences between CMake 2 and 3. 2014-09-26 21:08:44 -04:00
Wayne Stambaugh 5598113a45 Minor build bug fixes.
* Remove ${CMAKE_CURRENT_LIST_DIR} copied FindPackageHandleStandardArgs.cmake.
* Comment out debug messages in FindwxWidgets.cmake.
2014-09-26 20:28:12 -04:00
Wayne Stambaugh ed19967099 Force wxWidgets to version 3.0.0 or later and OSX build fixes.
* Add version detection to FindwxWidgets.cmake
* Convert commands and macro names to lower case in FindwxWidgets.cmake.
* Use find_package_handle_standard_args() to handle version comparison.
* Update FindPackageHandleStandardArgs.cmake from CMake 3.0.2 to get the
  latest bug fixes.
* Add an option to ignore building every OSX dependency from source and
  use find_package() the way it is supposed to work unless the developer
  specifically requests building everything from source.
2014-09-26 17:52:56 -04:00
jean-pierre charras 86042eee00 Eeschema: canvas background color: all frame are now using the same parameter.
fix recent bug which prevent eeschema to save color preferences.
fix few other minor issues.
2014-09-26 13:22:27 +02:00
jean-pierre charras 9bcdef85cd Eeschema: canvas background color: all frame are now using the same parameter.
fix recent bug which prevent eeschema to save color preferences.
fix few other minor issues.
2014-09-26 12:35:11 +02:00
jean-pierre charras ea06ad14ae Pcbnew: fix Bug #1373468 (Non Copper Zones Properties dialog "Layer selection" empty) (Linux specific) 2014-09-25 09:07:17 +02:00
jean-pierre charras 980ffac1c3 Pcbnew: add append board function, only available when Pcbnew is run in standalone mode (outside a project), to allow a basic panelization.
(this function is not compatible with a project, because it breaks the coherency with the schematic)
2014-09-24 18:56:20 +02: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
Brian Sidebotham 64bae1cf37 Intermediate Changes 2014-09-23 21:23:52 +01:00
jean-pierre charras dda896d530 dialog fp lib table: fix compatibility issue with wx 2.8 2014-09-22 11:37:22 +02:00
jean-pierre charras 6bae852cb9 Minor fixes: specctra export: skip malformed circles (having a radius = 0) in board outline creation, which can crash 3d-viewer or vrml export.
dialog_fp_lib_table: remember during a session the last open table (global or local).
drawing_tool: fix compil warning
Update demos.
2014-09-22 09:51:06 +02:00
Wayne Stambaugh 12f3fd35de Fix Pcbnew design rules dialog wxGrid tab traversal bug. (fixes lp:1060028)
* Set wxGrid tab behavior to leave grid when using the tab key.
* Lots of coding policy fixes.
2014-09-19 19:58:32 -04:00
jean-pierre charras 686253cbaa IO_MGR::PCB_FILE_T IO_MGR::GuessPluginTypeFromLibPath() : better test for KICAD type footprint libraries: previoulsy, just test if a library name ends with .pretty, which is not enough.
GitHub lib names also ends  by .pretty, so also test if a lib name does not start by http (which could be a GitHub lib name).
2014-09-18 12:29:52 +02:00
jean-pierre charras 93a3d4cb28 Eeschema: back to KICAD_KEEPCASE option, to find parts in lib, when using case sensitive option (default).
Schematic component properties dialog: add 2 helper buttons to manage the chip name (name of the corresponding part in lib)
- a browse button to chose an other chip name
- a test button, to know if the part exists. If not existing, list the parts found when searching using a case insensitive comparison.
2014-09-17 18:04:04 +02:00
Brian Sidebotham 24aa7aa580 Temporary changes 2014-09-16 20:34:52 +01:00
Tomasz Wlostowski 0cf334a072 pcbnew: bugfix for "PNS router allocates all memory" 2014-09-16 14:12:59 +02:00
jean-pierre charras d3f15f2146 Kicad manager: fix an issue when starting eeschema from its button: if the library editor was previously running, and if the quasimodal field editor dialog was called, eeschema did not start on Windows, or started but sometimes did not load the schematic project on Linux.
Enhancement : if a tool is running but is iconized, clicking on its button bring the window on screen. This was already the case on Linux, but on Windows, the iconized frame was staying iconized.
2014-09-16 11:25:49 +02:00
jean-pierre charras fe4c01a6f2 Kicad manager: fix an issue when starting eeschema from its button: if the library editor was previously running, and if the quasimodal field editor dialog was called, eeschema dis not start on Windows, or started but dis not load the schematic project on Linux.
Enhancement: if a tool is running but is iconized, clicking on its button bring the window on screen.
2014-09-16 10:34:51 +02:00
jean-pierre charras 3a5097f0d7 Fix a compatibility issue on wxGTK 2.8, on Linux ( Bug #1369290 ) 2014-09-15 20:12:52 +02:00
Maciej Suminski d3f6e3d623 pcbnew: Fixes crash when a module is changed after modification in the module editor. 2014-09-15 16:21:48 +02:00
jean-pierre charras 587e34ee22 Remove debug message. 2014-09-15 14:06:00 +02:00
jean-pierre charras 04e01711b1 Fix a compatibility issue on wxGTK 2.8, on Linux ( Bug #1369290 ) 2014-09-15 13:59:40 +02:00
jean-pierre charras efd4c123eb Fix bug #1369281 ( Pcbnew, initial save broken ) 2014-09-14 19:12:56 +02:00
unknown c1e0a8d067 Patch for the Python footprint wizard helpers. This adds a few more drawing functions, such as for circles, and also uses a matrix-based transform stack with greatly simplifies constructing footprints consisting of regularly spaced elements (e.g. in lines, grids, circles, or some list of points that you specify).
This fixes bug #1366299
2014-09-14 18:29:10 +02:00
jean-pierre charras 1edd8c8ac8 Eeschema: remove the compil option KICAD_KEEPCASE. Eeschema is now always case sensitive when seraching components in libs.
However to be compatible with old versions of Eeschema, when a search in library fails, a case insensitive search is made.
Therefore, this version should be compatible with sch files created by previous Eeschema versions compiled with KICAD_KEEPCASE = OFF
2014-09-14 17:43:18 +02:00
jean-pierre charras aa9de21cd7 Ref and Value for footprints: use now the layer color, not a specific color: this is needed by the fact these fields can be on an other layer than silk screen, and therefore must have the corresponding color
Also do not allow copper layers, solder paste and solder mask: put Ref or Value on these layers has no sense, and can create serious issues on the board.
2014-09-14 17:34:37 +02:00
Lorenzo Marcantonio 260ca0e79f Added support for decoupling stored text from shown text in EDA_TEXT
Factored out text ellipsing support to max 15 character (for generating menu items)
2014-09-13 20:15:45 +02:00
Paulo Henrique Silva 3132690c0b Fix slow opengl canvas on Mac OS 10.9. 2014-09-13 19:31:40 +02:00
Lorenzo Marcantonio 1247264458 Added layer change to the module text dialog (both user text and reference/value)
Since reference and value are not anymore always on silk changed the label on the corresponding options in the plot dialog
The 'proper Gerber extensions' was renamed in dialog as 'Protel Gerberl extensions': I don't know if it was a typo/misunderstanding or what but the proper extension is gbr; the set of alternative extensions seems to be the one used by Protel/Altium.
2014-09-13 08:15:16 +02:00
Lorenzo Marcantonio 0da38e5b62 More work on module texts, and especially on the collector
The members SetIgnoreMTextsOnCopper, SetIgnoreMTextsOnCmp,
SetIgnoreModulesOnCu, SetIgnoreModulesOnCmp in the collector guide are
renamed to the clearer SetIgnoreMTextsOnBack, SetIgnoreMTextsOnFront,
SetIgnoreModulesOnBack, SetIgnoreModulesOnFront

Modified the collector and drawing behaviour for text in modules as
discussed in the mailing list.

* Now module text on layers different than Silk should work! *

Still need UI support for setting the layer in the module editor.
2014-09-11 18:35:19 +02: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
Brian Sidebotham edb7cd60e5 * Fix error in BZR5125 - removed check for wxWidgets AUI library 2014-09-09 19:18:54 +01:00
Lorenzo Marcantonio c5681a3278 Backed out assembly plot patch 2014-09-09 18:55:27 +02:00
jean-pierre charras fb590c7231 Fix PCB Module Editor Help Error.
Remove a minor compil warning in shape_collisions.cpp
2014-09-09 18:46:12 +02:00
Lorenzo Marcantonio 032b7cb71b Implemented special rules for plotting assembly layers
- Reference is visible on silk and the corresponding assembly layer
- Reference is shown on assembly always on the component insertion point

Hidden references are not forced shown in assembly plots (there is
already a user option for that)
2014-09-08 19:57:39 +02:00
Maciej Suminski 9fca82c23f pcbnew: bugfix for crashes when canvas is switched while dragging items (GAL). 2014-09-08 14:09:20 +02:00
Maciej Suminski 16b2c40184 pcbnew: Fix crashes of tools that rely on BOARD data. 2014-09-08 14:07:10 +02:00
Maciej Suminski 9195409f5e pcbnew: GAL updates the worksheet layout when it is reloaded. 2014-09-08 14:06:38 +02:00
Maciej Suminski 2c1cef339f pcbnew: Worksheet layout texts are propetly rotated in GAL. 2014-09-08 14:06:01 +02:00
jean-pierre charras ded4bf6477 Pcbnew: fix Bug #1366701 (Module position file (.pos) generation fails for F.Cu layer) 2014-09-08 13:07:54 +02:00
Dick Hollenbeck 3e861db371 Lock file improvements. 2014-09-07 15:01:26 -04:00
jean-pierre charras da4055ae88 Kicad: refinements in project_template.cpp.
Eeschema: schematic libraries in a sub path of standard libraries paths are now better handled.
2014-09-07 18:56:55 +02:00
jean-pierre charras fc6d73813e Kicad: more understandable dialog when creating a project from template. Fix also a bug when copying and renaming template files.
Pcbnew: dialog to create new .pretty lib: fix an issue which prevent to open a full disk directory (at least on Windows)
2014-09-06 21:55:20 +02:00
Moses McKnight 6da5e2cdd0 Configuration file consolidation patch from Moses McKnight.
* Create GetNewConfig() and GetKicadConfigPath() to unify configuration file
  creation and location.
* Move Windows configuration out of the registry into configuration files.
* Move Linux configuration files from $HOME to $HOME/.config/kicad to eliminate
  configuration file pollution in the users $HOME folder.
* Fix a bug in the configuration file where the Eeschema hot keys are saved.
2014-09-05 17:12:38 -04:00
Wayne Stambaugh 5c954998bb Add forgotten Boost MinGW64 interlock patch file. 2014-09-04 10:08:06 -04:00
jean-pierre charras e5e388f2b4 Help files: can now be html or pdf files: Kicad search first for a .html help file, and if not found in a path, search for the corresponding .pdf file.
Therefore our .pdf files can be replaced at any time  by .html corresponding files in kicad doc/help sub directories.
2014-09-02 18:44:53 +02:00
jean-pierre charras aff8c27942 Fix bug #1364174 (Component Library Editor: Bug when decreasing "Number of Units") 2014-09-02 13:47:57 +02:00
jean-pierre charras 06f59a94ed eeschema: Find Replace: fix a bug in replace command: sometimes, the string to replace was found, but not replaced if this string contained lower case letters. 2014-09-01 17:28:29 +02:00
Maciej Suminski c13cdb0964 Fixed line width settings in the module editor (GAL). 2014-09-01 13:48:51 +02:00
Maciej Suminski b86ac3b3ab GAL module editor selects the front silkscreen layer by default. 2014-09-01 13:48:10 +02:00
jean-pierre charras 3814cdaff1 Pcbnew: Minor fix in hotkeys. Demos: add an example to use a local fp-lib-table and local libs, and update schematics and boards. 2014-08-31 18:19:07 +02:00
Wayne Stambaugh ec9cd765bc Fix default menu alt key accelerator bug. (fixes lp:1035151)
* Add hot key handled return indicator to DRAW_FRAME::GeneralControl() and
  DRAW_FRAME::OnHotKey() and all classed derived from DRAW_FRAME.
* Add code to all GeneralControl() and OnHotKey() functions to return true if
  hot key was handled.
* Call event skip in DRAW_PANEL::OnKeyEvent() when key event is not handled to
  allow default menu event handler to function properly.
2014-08-29 16:23:40 -04:00
jean-pierre charras 020a0ae477 All: Fix crash on close Kicad, when a quasi modal dialog is open, and Kicad is closed from the Kicad project manager. 2014-08-29 19:49:49 +02:00
jean-pierre charras 3d83434275 Very minor fixes. 2014-08-29 08:47:05 +02:00
jean-pierre charras 49aff8bcf7 LibEdit: fix bug #1362580 (EESchema crashes on new library save). 2014-08-29 08:46:14 +02:00
Wayne Stambaugh 3cbf8a7205 Fix back annotate field visibility bug in Eeschema. (fixes lp:1304835)
*  Fix Eeschema back annotation bug where footprint field visibility setting was ignored.
*  Replace two confusing and ambiguous dialogs with a simple single choice dialog.
2014-08-28 19:44:28 -04:00
jean-pierre charras 8d23b26f2a Eeschema, Libedit: fix crash in undo/redo commands (due to double deletion) (bug #1358217 ) 2014-08-26 17:16:30 +02:00
jean-pierre charras d8c3ccb424 Pcbnew, Eeschema: release lock file when these editors are closed (Until now, the lock file was released when the full Kicad application was closed, not when the editor was closed).
Should fix Bug #1360470  and Bug #1359502 .
2014-08-26 12:54:22 +02:00
Maciej Suminski b30e0dd869 Boost 1.56 compatibility fix. 2014-08-26 11:16:56 +02:00
jean-pierre charras 858e222ea7 all: fix Bug #1361233 (a template.pro copy file overwrite silently the current project file when a group info is not found, which is a bug, because this group could be just a new group, not yet used) 2014-08-26 09:40:31 +02:00
jean-pierre charras 09870e9661 Eeschema: add dialog libedit options and move options relative to libedit from eeschema options to this dialog.
Ensure some values initialized by the schematic editor and used by libedit are also initialized in libedit even if the schematic editor was not started.
Remove useless commands (save/load project config) in libedit, because now they have no sense.
2014-08-25 19:59:41 +02:00
jean-pierre charras ed4fee7649 Eeschema: add dialog libedit options and move options relative to libedit from eeschema options to this dialog.
Ensure some values initialized by the schematic editor and used by libedit are also initialized in libedit even if  the schematic editor was not started.
Remove useless commands (save/load project config) in libedit, because now they have no sense.
2014-08-25 18:31:32 +02:00
jean-pierre charras 7bf06a3879 .pro file: Settings for schematic editor and library list are now stored in 2 independant sections [schematic_editor] and [eeschema].
This fixes Bug #1360219 (Lost settings in eeschema) and keep separation between code relative to lib management and code relative to preferences.
2 or 3 minor settings could be lost in some designs, but they are very easy to reenter.
2014-08-25 09:30:17 +02:00
Wayne Stambaugh 0b69ed3a5c Fix Eeschema sheet issues. Should close out bug lp:593782
* Refresh canvas when user cancels edits so that the discarded sheet is
  cleared from the schematic.
* Add file name validation to the sheet properties dialog to prevent
  illegal file name characters from being entered into the text control.
* Rename FOOTPRINT_NAME_VALIDATOR to FILE_NAME_CHAR_VALIDATOR for clarity.
2014-08-24 18:49:31 -04:00
jean-pierre charras 27b9d013fd 3D-viewer: fix Bug #1360784 (3D viewer displays only first wrl shape) 2014-08-24 15:29:59 +02:00
jean-pierre charras 6270af66e4 Rework on env. variable KISYS3DMOD. Until now, was used in different files using different ways, so no consistency between files.
Fix also an incorrect default 3d path read from KISYS3DMOD, when the path was defined without trailing directory separator.
code cleanup.
2014-08-24 09:49:42 +02:00
jean-pierre charras 5a38d2b657 Rework on env. variable KISYS3DMOD. Until now, was used in different files using different ways, so no consistency between files.
code cleanup.
2014-08-24 09:05:07 +02:00
Wayne Stambaugh f0391648e3 Fix compiler warning from last commit. 2014-08-23 15:36:22 -04:00
Wayne Stambaugh d04fd426dc Fix Eeschema context menu orientation rotate entries.
* Use clockwise and counterclockwise in menu strings which is less ambiguous than + and -.
* Moved the rotate hot key R to the rotate clockwise menu entry string.
2014-08-23 11:43:26 -04:00
Wayne Stambaugh a27845e948 Fix MinGW 64 bit build buigs.
* Patch Boost interlocked.hpp from version 1.56.
* Fix segfault in Eeschema when auto save event occurs before root sheet is initialized.
* Add assertion when SCH_SHEET_PATH::BuildSheetList is called with NULL pointer.
2014-08-23 11:22:50 -04:00
Wayne Stambaugh 547524cd0a Fix bug in FindwxWidgets.cmake.
* Fix C flag parser when there is more than one flag defined after includes when
   wx-config --cflags is called.
2014-08-22 16:40:17 -04:00
jean-pierre charras a26449b3ef 3d-viewer: code cleaning; bitmap2component: minor fix and code cleanup 2014-08-22 12:24:14 +02:00
unknown eec819a274 Bitmap2component: old .emp output format removed (patch from Cirilo Bernardo) 2014-08-21 16:57:25 +02:00
jean-pierre charras 4c20fb4c4b 3d-viewer: code cleaning. 2014-08-21 13:59:57 +02:00
jean-pierre charras 5e032ef08a 3d-viewer: code cleaning and minor bug fix. 2014-08-20 19:53:09 +02:00
unknown 259425a21a All: Fix an issue due to duplicate ID used in menus and toolbars between a frame and its parents, related to wxUpdateUIEvent events loop.
wxUpdateUIEvent events are be sent to parent frames, when opening a menu in a child frame, if a child frame and its parents share same ID for menuitems (or tools)
The wrong menuitem can be used in some cases ( because there are more than one menuitem with the same identifier), by a wxUpdateUIEvent event function executed in a parent frame.
3D viewer: Add patch from Mario Luzeiro, fix some issues, and clean code.
2014-08-20 11:53:17 +02:00
jean-pierre charras d089ff5215 3d-viewer: Fix some issues and clean code. 2014-08-20 10:39:19 +02:00
Dick Hollenbeck bad00e7b46 uncork the hold on use of latest code in kicad-install.sh 2014-08-19 13:07:38 -05:00
Dick Hollenbeck e66e4ad42c remove PART_LIBS sorting. 2014-08-19 12:26:20 -05:00
jean-pierre charras fafd19c616 Add patch from Mario Luzeiro to 3D viewer. Fix a serious issue due to duplicate ID used in menus and toolbars between sub-applications, related to wxUpdateUIEvent events loop.
wxUpdateUIEvent events can be sent to parent frames, when opening a menu in a child frame, if parent and child frame share same ID fro menuitems (or tools)
The wrong menuitem can be used in some cases ( because there are more than one menuitem with the same identifier), by a wxUpdateUIEvent event function run in a parent frame.
2014-08-19 16:51:15 +02:00
jean-pierre charras 1222924607 Eeschema: Fix some issues (all connections showed as not connected, DRC and NETLIST errors if all sheets in a hierarchy were not open) due to the fact the pointer of a schematic component to its part lib was calculated too late (or never calculated). 2014-08-18 18:39:51 +02:00
jean-pierre charras 188954f2d4 Eeschema: fix incorrect value of m_Flags member (must be 0) of schematic components after loading a schematic file.
Previously,  m_Flags was set to IS_CHANGED, which is incorrect.
2014-08-18 10:04:26 +02:00
Dick Hollenbeck 49538cafb9 https://lists.launchpad.net/kicad-developers/msg14286.html 2014-08-17 18:00:49 -05:00
Dick Hollenbeck 9de02e88a3 open pcbnew with filename even when previously loaded with no filename. 2014-08-17 17:58:45 -05:00
Andrew Zonenberg 87a5fa18d1 Fix uninitialized member in DRC_ITEM constructor. 2014-08-16 14:12:11 -04:00
Wayne Stambaugh cb91e0953d Coding policy fixes and comment out debugging output. 2014-08-16 14:01:00 -04:00
Dick Hollenbeck 5f70ec63b1 unused 2014-08-15 07:44:03 -05:00
Dick Hollenbeck 26c731ff42 abandoned 2014-08-14 09:05:07 -05:00
Andrew Zonenberg 484bc8344c Fix a c_str() to wxString conversion memory overflow bug. 2014-08-13 16:57:22 -04:00
Dick Hollenbeck 7e483f69bd Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
     get disassociated from their true PROJECT.
  *) Allow loading eeschema library editor from kicad.exe
  *) Allow loading pcbnew library editor from kicad.exe
  *) Rename LIB_COMPONENT to LIB_PART.
  *) Add class PART_LIBS, and PART_LIB.
  *) Make PART_LIBS non-global, i.e. PROJECT specific.
  *) Implement "data on demand" for PART_LIBS
  *) Implement "data on demand" for schematic SEARCH_STACK.
  *) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
  *) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
     a weak pointer.
  *) Remove all chdir() calls so projects don't need to be CWD.
  *) Romove APPEND support from OpenProjectFiles().
  *) Make OpenProjectFiles() robust, even for creating new projects.
  *) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
     and save them in the .eeschema config file, not in the project file.
  *) Fix bug with wxDir() while accessing protected dirs in kicad.exe
  *) Consolidate template copying into PROJECT class, not in kicad.exe source.
  *) Generally untangle eeschema, making its libraries not global but rather
     held in the PROJECT.
2014-08-13 15:28:54 -05:00
Wayne Stambaugh c63459653a CvPcb: fix broken event ID for configuration button on toolbar.
* Remap configuration button on toolbar to launch footprint library table
  editor.
* Remove legacy footprint library path dialog from CVPCB_MAINFRAME.
* Remove unused event ID ID_CVPCB_CREATE_CONFIGWINDOW.
* Minor coding policy fixes.
2014-08-13 15:26:31 -04: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
Tomasz Włostowski adbf343fef bugfix: SIGABRT after starting a track with PNS and switching canvases a few times 2014-08-13 17:25:54 +02:00
Wayne Stambaugh fc13e5d651 Footprint text properties dialog improvements and coding policy fixes.
* Improve footprint text properties layout.
* Use wxStdDialogButtonSizer instead of manually laid out buttons to improve
  platform UI consistency.
2014-08-13 09:15:15 -04:00
jean-pierre charras 5b28980a05 Pcbnew, Cvpcb: fix Bug #1355883 . Due to a missing call to a delete operator in CMP_READER class (also creates memory leak). 2014-08-12 19:52:12 +02:00
jean-pierre charras 3a62a59514 3d viewer: fix a (minor) bug when run from cvpcb or modedit: the footprint is now centered on Z axis
Better setup for lights, which gives a better rendering
2014-08-12 18:03:50 +02:00
Andrew Zonenberg afd89c358e 1) EDA_DRAW_FRAME::m_showOriginAxis is never initialized in the constructor
2) LIB_RECTANGLE and related classes sscanf data read from a file using "%s"
without field limits, which can cause problems with malformed/really long
inputs.

3) If some of the optional fields in a lib line are missing, "tmp" can remain
uninitialized.
2014-08-12 09:39:44 -05:00
Andrew Zonenberg ff79e4d2ff 3D viewer: Parallelized 3D model vertex normal calculations to use all available CPU cores for significant speedup. 2014-08-12 10:51:10 +02:00
Andrew Zonenberg 48c9a64612 Merged with lp:kicad 2014-08-12 04:17:19 -04:00
Maciej Suminski b649578734 FIxed invisible layers problem after changing the number of layers (GAL). 2014-08-12 10:17:16 +02:00
Andrew Zonenberg 61052a8279 Fixed code style issue in existing code 2014-08-12 04:12:03 -04:00
unknown 84a985f8af Pcbnew: Commit patch (with very minor changes) about SVG file export with the layers ordered from bottom to top. ( bug 1286646 ), from Thiadmer Riemersma. 2014-08-10 16:15:02 +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
Maciej Suminski 468e9e4ac9 Initalize fields in TOOL_EVENT constructors. 2014-08-08 14:34:44 +02:00
Maciej Suminski ca399b6401 Buried/blind vias indicate the layers they go through (GAL). 2014-08-06 13:53:02 +02:00
Maciej Suminski 490a73b62a Fixed filled arcs drawing (GAL). 2014-08-06 13:51:46 +02:00
Maciej Suminski bcdd3d7bb9 Items are either dragged by their origin or moved by a vector (depending on the number of selected items) (GAL). 2014-08-06 09:35:03 +02:00
Maciej Suminski 1b058cae1e Disable highlight mode in the module editor (GAL). 2014-08-06 09:33:10 +02:00
Dick Hollenbeck 0c493d8035 KIWAY support in 5054 is stable enough to use in view of all other new features. 2014-08-05 22:46:11 -05:00
unknown 2f0ffdc7b5 3d-viewer: fix compil warning, by Mario Luzeiro, with some coding style fixes.
common.cpp: remove useless  warning on wxWidgets < 3.0 about --with-gtkprint build option: on  wxWidgets < 3.0 on Linux the print function does not work even with this build option.
2014-08-05 11:39:42 +02:00
unknown af657fc87d 3d-viewer: fix compil warning, by Mario Luzeiro, with some coding style fixes. 2014-08-05 08:39:04 +02:00
Maciej Suminski 242d42cf1d Changed 'line width change' & 'change arc posture' to TOOL_ACTIONs. 2014-08-04 14:23:19 +02:00
jean-pierre charras cdffdc398e Fix wx28 compatibility. 2014-08-04 15:06:32 +02:00
unknown 4a96813d42 Anti-aliasing patch for the 3D-Viewer from Martin Janitschke 2014-08-04 14:21:28 +02:00
jean-pierre charras ff6d09d22c Fix some case sensitive filename issues. 2014-08-04 14:17:33 +02:00
jean-pierre charras 5f63becff1 3D viewer: move helper functions from 3d_draw.cpp to 3d_draw_helper_functions.cpp. Add comments in .h sources. Better management of background color. coding style fixes. 2014-08-04 13:28:29 +02:00
Maciej Suminski 64a9ebc70e Selected items do not disappear after rendering backend switch. 2014-08-04 10:43:26 +02:00
Maciej Suminski fa08d9fdcf Fixed module anchor drawing (GAL). 2014-08-04 10:42:20 +02:00
Maciej Suminski 03a17a284b bugfix: modules are not selectable in the high contrast mode (GAL). 2014-08-04 10:06:24 +02:00
unknown 3f8c091092 export IDF without empty PLACEMENT section 2014-08-03 09:48:41 +02:00
Brian Sidebotham 56f44e2f12 * Merge in changes from TIP 2014-08-02 22:29:06 +01:00
Brian Sidebotham dbd4ba8469 * Update from TIP 2014-08-02 22:25:05 +01:00
Andrew Zonenberg 90ce21fa51 Added comment to ifdef for USE_OPENMP 2014-08-02 16:20:23 -04:00
Andrew Zonenberg b6e85e0f82 Fixed a few code style issues, added #ifdef USE_OPENMP 2014-08-02 16:17:11 -04:00
Andrew Zonenberg 60330de551 3D model vertex normals are now calculated in parallel 2014-08-02 15:20:25 -04:00
jean-pierre charras 764369439e Add comments. Fix bug #1351507 (pad color does not reflect, whether the pad is on front or back layer) and bug #1351388 (Adding a keepout area appears on the opposite layer than selected) 2014-08-02 12:29:10 +02:00
unknown d9c76c0d49 3D viewer bug fixes 2014-08-02 09:46:47 +02:00
Brian Sidebotham 7b936f4d0c 3D-Viewer now requires GLEW include - add GLEW_INCLUDE_DIR 2014-08-01 22:27:20 +01:00
Maciej Suminski 94a46bf2df Fixed pcbnew crash when a locked footprint is dragged from an edge of the screen. 2014-08-01 11:28:08 +02:00
unknown 73005087d5 3d_viewer fix translation and rotation issues (patch from Mario Luzeiro) 2014-07-31 09:01:30 +02:00
Michael Narigon 34b645daed warnings 2014-07-30 22:04:34 -05:00
Dick Hollenbeck 3aa390b57a WTF 2014-07-30 21:56:25 -05:00
jean-pierre charras 01a8442b35 3d viewer: minor code cleaning (remove useless #include )
dialog_track_via_size: set minimal size  and make dialog resizable.
Update demo file.
2014-07-30 17:39:55 +02:00
jean-pierre charras 459ea885cd Add patch for 3D viewer enhancements (better render + better vrml reader + x3d reader bug fix) from Mario Luzeiro, with few coding style issues fixed. 2014-07-30 11:34:48 +02:00
unknown 7a4ea8955e 3D viewer enhancements (better render + better vrml reader) from Mario Luzeiro 2014-07-30 11:01:25 +02:00
jean-pierre charras 1540368422 Minor fixes and changes:
Remove a minor warning message in Debug mode for 2 dialogs.
Pcbnew: update Gerber X2 file format (File Attribute) to very last X2 specification
Eeschema: Fix a minor bug in block selection (sometimes the last selected component was select instead of items in selected area)
and better drag behavior when draging an item by the drag hotkey.
2014-07-29 18:38:27 +02:00
Dick Hollenbeck 57e537699e remove un-used member 2014-07-28 09:13:59 -05:00
Dick Hollenbeck 64e38bd741 KICAD_MANAGER_FRAME::SetProjectFileName() uses PROJECT::SetProjectFullName()
and forces absolute path.
2014-07-28 09:06:08 -05:00
jean-pierre charras 281ce25dd2 cvPcb: Remove a debug message displayed when saving .cmp file. 2014-07-28 14:16:14 +02:00
Maciej Suminski 6ba1410054 Fixed vanishing pads issue in the pad properties dialog (GAL). 2014-07-28 14:01:29 +02:00
Maciej Suminski f51ad438b3 wxWidgets 2.8 compatibility fix. 2014-07-28 13:59:50 +02:00
Andrew Zonenberg 59be0f6ef7 1) Pad properties dialog can trigger divide-by-zero when "0" is entered as the pad size
2) PNS router incorrectly detects collisions with blind/buried vias that don't actually intersect the active layer
3) PNS router silently converts blind/buried vias to through-board vias when shoved
2014-07-28 11:32:15 +02:00
jean-pierre charras 33605eaaec Eeschema fixes: fix Bug #1348983 save cmp file crashes cvpcb when eeschema is opened (backannotation crashes). Happens only when some footprint names are not set (blank names).
Also fix incorrect backannotation when footprint names contain spaces (put spaces in names is always a bad idea)
* Fix minor Bug #1349058 Choose component dialog: Search field loses focus after entering a character and internationalize the dialog.
* Fix a subtle bug which prevent eeschema to read the project config file when launched from kicad manager, and when kicad.pro is not found.
2014-07-28 11:24:15 +02:00
Andrew Zonenberg e6fba84e13 Push-and-shove router now handles existing blind/buried vias properly. Can't yet create new ones. 2014-07-27 15:01:06 -04:00
Andrew Zonenberg 8c1dd1392e Fixed divide-by-zero in D_PAD::ViewGetLOD() 2014-07-27 15:00:39 -04:00
jean-pierre charras 37757b5283 * Fix Bug #1348607 and a possible crash in libedit dialog component properties after moving up the first user field (which in not possible now).
* better info message in pcbnew when trying to delete a footprint in legacy library
2014-07-25 19:49:14 +02:00
jean-pierre charras 6cc3addc68 Fix overflow in track len calculations and display (Bug #1347878), in high-light tool. 2014-07-24 19:36:26 +02:00
Maciej Suminski 893618bf3f Fixed a hot key conflict. 2014-07-24 13:09:16 +02:00
jean-pierre charras 13b0784cd5 Fix overflow in track len calculations and display (Bug #1347878). 2014-07-24 08:43:23 +02:00
Andrew Zonenberg c1f11a1bd1 Draw VIAs only if a layer they penetrate is visible. 2014-07-23 11:27:52 -05:00
unknown bde2a0a1be Pcbnew: fix issue for "one file per layer" option in "Export SVG file" 2014-07-23 15:01:23 +02:00
Maciej Suminski 1d378cfcd1 View is automatically centered when a module editor or viewer are opened (GAL). 2014-07-23 12:06:24 +02:00
jean-pierre charras 4fc4ea6147 Make some system error messages not translatable. Better comments in some dialogs. 2014-07-23 12:48:30 +02:00
jean-pierre charras 580a1a6aa0 ModEdit: fix some issues due to the fact legacy footprint libraries cannot handle 32 copper layers, and are therefore no more editable:
* in file/library save as..., remove option to save a lib under the legacy format (which is not possible and creates an error message)
* if the current loaded lib is a legacy lib, when the user try to save or delete a footprint, displays a message which explains what the user should do.
* add a suitable dialog to select/create a .pretty folder library (a file dialog or a dir dialog coming from wxWidgets is not friendly usable.)
2014-07-23 12:28:48 +02:00
Maciej Suminski e46780f89f Modules loaded by the module editor are placed in the world origin (GAL). 2014-07-22 09:50:40 +02:00
jean-pierre charras 38027eb998 3d viewer: Add high quality mode option is realistic mode (Shows holes in copper zones, but with longer calculation time)
Gal: fix a very minor issue: the keys to switch between copper layers are now - and + (according to the doc and the normall mode), instead of - and =
2014-07-21 18:26:18 +02:00
Maciej Suminski 2f7b9bcd71 Fixed bug: module editor doesn't respect global "per module" solder mask clearance (GAL). 2014-07-21 13:17:11 +02:00
Maciej Suminski 0ec256ccb4 Fixed bug: solder paste clearance is not displayed (GAL). 2014-07-21 12:54:58 +02:00
unknown cfed0a7202 Add interactive router doc, from Tomasz Wlostowski (see github.com/twlostow/kicad-dev/blob/junk/Documentation/interactive_router)
Remove the outdated pns_router.txt file.
2014-07-21 13:15:54 +02:00
jean-pierre charras cab7e67b59 fix Bug #1345193: Drill Map coordinates alway 0 when using Gerber format (due to a missing plotter initialization). 2014-07-21 11:42:36 +02:00
Maciej Suminski a57f7ae8cd Fix OpenGL canvas freeze under Windows. 2014-07-20 21:14:42 +02:00
Maciej Suminski aad359fcf9 Fixed Mac OS build. 2014-07-20 20:58:33 +02:00
jean-pierre charras af1317f6b4 Fix crash in Pcbnew and Gerbview when selecting (in layers manager) "always hide all layers but active" from popup menu 2014-07-20 19:46:11 +02:00
jean-pierre charras 680ca22279 Fix crash in Pcbnew and Gerbview when seceting (in layers manager) "always hide all layers but activer" 2014-07-20 19:41:12 +02:00
jean-pierre charras 2196ed21c9 Apply a workaround to fix a wxWidgets bug in versions 3.0.x relative to mouse wheel event (Windows specific).
Therefore wxWidgets 3.0.1 can be used without need to patch it.
(This bug is fixed in wxWidgets 3.1)
2014-07-20 17:23:48 +02:00
unknown d6fbfbc001 Pcbnew: fix bug when generating drill files for blind/buried vias. 2014-07-20 16:46:59 +02:00
jean-pierre charras 4c77724134 Very minor fixes. *.kicad_pcb files update to current Pcbnew version. 2014-07-20 12:41:14 +02:00
Dick Hollenbeck 6da86c12de KIWAY::player_destroy_handler() skips on the wxWindowDestroyEvent, just in case 2014-07-17 09:10:15 -05:00
jean-pierre charras 9ecb10996c Fix wx28 compil issue, and a compil warning. 2014-07-15 20:13:08 +02:00
jean-pierre charras 197371de5f dialog non copper zones: better look. dialog copper zones: fix a minor bug. 2014-07-15 18:53:13 +02:00
Maciej Suminski a525c890fb Alternative way to handle mouse buttons (GAL). 2014-07-15 17:34:53 +02:00
Maciej Suminski 0adb6fa943 Module editor does not ask for permission to modify a locked module. 2014-07-15 17:33:19 +02:00
Maciej Suminski f24075bbf5 Fixed offset of dragged items when the moving tool is invoked by the hotkey (GAL). 2014-07-15 16:33:46 +02:00
Maciej Suminski 2c5b79456e Fixed crash in pad properties dialog with wxWidgets 2.8. 2014-07-15 16:02:08 +02:00
Maciej Suminski 568fc74a3c Clicking on the Selection Tool toolbar button deactivates the current tool (GAL). 2014-07-15 11:50:00 +02:00
Maciej Suminski a1e08ae568 Drawing tools reset its state on layer change. 2014-07-15 11:41:55 +02:00
Maciej Suminski 8d91587863 PNS settings dialog size corrected. 2014-07-15 10:57:51 +02:00
jean-pierre charras a82127277c Gerbview: fix scaling error in x.6 file format. Minor cleaning code.
Better separation between Pcbnew code and Gerber code.
Update export to Pcb code (uses now the version 4  kicad_pcb file format).
2014-07-14 20:59:41 +02:00
Dick Hollenbeck c5e14ef180 wxJoin version dependency change 2014-07-14 10:03:51 -05:00
Maciej Suminski 3aef4252ab Refinement to commit #4993. 2014-07-14 16:43:21 +02:00
Maciej Suminski ef9b0678c6 Fixed Python scripting enabled builds. 2014-07-14 15:14:37 +02:00
Maciej Suminski 91e9df59d4 Fixed layers order after changing the active layer. 2014-07-14 11:36:34 +02:00
Maciej Suminski f45836bfc6 Merged module-editor branch (http://www.ohwr.org/projects/cern-kicad/wiki/ModuleEditor). 2014-07-14 11:06:59 +02:00
Maciej Suminski c3ed210e5d Increase panning area in GAL view. 2014-07-14 09:43:20 +02:00
Kirill Mavreshko ae44fb62fc bugfix: pcbnew crashes when you try to save a file 2014-07-14 09:41:02 +02:00
jean-pierre charras 7d1c1f3085 Gerber files generation: fix a rounding issue when drawing circles. (explains bug Bug #1339086 ).
Gerbview: allows x.7 format (recently indroduced in Gerber format)
Also minor coding style fixes.
2014-07-14 09:36:37 +02:00
Kirill Mavreshko 7161c5bdd5 bugfix: pcbnew crashes when you try to save a file 2014-07-13 19:08:42 +02:00
Maciej Suminski 3f8f6caf1b Increase panning area in GAL view. 2014-07-11 17:04:35 +02:00
jean-pierre charras 49884da3e6 Gerber files generation: fix a rounding issue when drawing circles. (explains bug Bug #1339086 ).
Gerbview: allows x.7 format (recently indroduced in Gerber format)
Also minor coding style fixes.
2014-07-09 18:31:39 +02:00
Maciej Suminski 14cfd173e6 Fixed the Module viewer crash when there is no footprint loaded. 2014-07-09 16:57:01 +02:00
Maciej Suminski 78853febbe Zone fill/unfill actions in context menu (GAL). 2014-07-09 16:57:01 +02:00
Maciej Suminski 898e4e269e Fixed the only-type condition for empty selection case. 2014-07-09 16:50:31 +02:00
Maciej Suminski e6c1254dc8 "Create corner" context menu entry for draw segments and zone outlines (GAL). 2014-07-09 16:50:31 +02:00
Maciej Suminski ff30ced4f4 Cursor position is frozen when a context menu is displayed (GAL). 2014-07-09 16:50:31 +02:00
Maciej Suminski 4068d6c858 Selection tool uses the real drag origin to compute offset when dragging items. 2014-07-09 16:50:31 +02:00
Maciej Suminski b8fd1de71c Added module texts to the preferred types list in SELECTION_TOOL. 2014-07-09 16:50:31 +02:00
Maciej Suminski 433e17a582 Support for "locked" property for modules (GAL). 2014-07-09 16:50:31 +02:00
Maciej Suminski c1eda6b88c Some of the Tool Actions need to be run in immediate mode - fixed. 2014-07-09 16:50:31 +02:00
Maciej Suminski 49dd416c53 Dragged items offset is cleared when dragging is finished. 2014-07-09 16:50:31 +02:00
Maciej Suminski f32419f7e6 New pads in the module editor does not show up in the center of the edited module. 2014-07-09 16:50:31 +02:00
Maciej Suminski 327f307a7f FIx layer switching after via placement in PNS router. 2014-07-09 16:50:31 +02:00
Maciej Suminski 0953d5730b Clear selection before opening the module editor. 2014-07-09 16:44:23 +02:00
Maciej Suminski f2b5cf7d94 Fixed module editor crash when pcbnew is started from the main launcher. 2014-07-09 16:44:23 +02:00
Maciej Suminski 0163b589b4 Workarounded restoring focus to GAL canvas after layer switching. 2014-07-09 16:44:22 +02:00
Maciej Suminski b1837615aa Added event queue to handle events at the end of the event processing cycle. 2014-07-09 16:25:50 +02:00
Maciej Suminski 81ad03cf91 Code formatting. 2014-07-09 16:25:50 +02:00
Maciej Suminski db0d708300 Simplified code for switching layers in GAL view. Tools are notified of layer change event. 2014-07-09 16:25:50 +02:00
Maciej Suminski c0a96141df Added AF_NOTIFY flag for TOOL_ACTIONs. 2014-07-09 15:10:32 +02:00
Maciej Suminski b2d0737329 Fixed continous line drawing.
Outline mode can be set up on any layer.
2014-07-09 15:10:32 +02:00
Maciej Suminski d7c3c7828b wxWidgets 2.8 compatibility fixes. 2014-07-09 15:10:32 +02:00
Maciej Suminski 5275d4b58f Fixed minor bugs introduced with outline mode display for module texts and edges. 2014-07-09 15:10:32 +02:00
Maciej Suminski 778011a893 Ratsnest is recalculated after global deletion of tracks and after importing a netlist. 2014-07-09 15:10:32 +02:00
Maciej Suminski 7614b93bf8 Tool indicator is resetted on canvas switch. 2014-07-09 15:10:32 +02:00
Maciej Suminski 587f22e10b Outline display mode for module edges & texts in the module editor. 2014-07-09 15:10:32 +02:00
Maciej Suminski 3b5ece39a1 Modules inserted from the module editor are instantly visible in GAL.
Ratsnest is updated after exporting changes from the module editor to the layout editor.
2014-07-09 15:10:32 +02:00
Maciej Suminski 65c116621d Added support for changing the cursor size. 2014-07-09 15:10:32 +02:00
Maciej Suminski 15f5c228cc Fixed autozooming with empty board/module. 2014-07-09 15:10:32 +02:00
Maciej Suminski 31e25ac4cf Fixed module viewer crash. 2014-07-09 15:10:32 +02:00
Maciej Suminski 2b0e27f132 Introduced SELECTION_CONDITIONS to determine which menu entries should be visible in the SELECTION_TOOL context menu, depending on the selection. 2014-07-09 15:10:32 +02:00
Maciej Suminski bfa15d8db0 Moved SELECTION out of SELECTION_TOOL class. 2014-07-09 15:10:32 +02:00
Maciej Suminski d21271b432 Pad Enumeration tool support for SMD pads. 2014-07-09 15:10:32 +02:00
Maciej Suminski 709dfcc16e Added settings dialog for Pad Enumeration tool. 2014-07-09 15:10:32 +02:00
Maciej Suminski 2bcbb67528 Initial version of the Pad Enumeration tool. 2014-07-09 15:02:56 +02:00
Maciej Suminski cf79b4c64f Removed redundant accessor calls in MODULE_TOOLS. 2014-07-09 15:02:56 +02:00
Maciej Suminski ed88c40be5 Moved module editor-specific tools to a separate class (MODULE_TOOLS). 2014-07-09 15:02:56 +02:00
Maciej Suminski 0b9387fb12 Added support for graphics on Edge.Cuts layer in modules. Tested functionality that works fine:
- zone filling algorithm
- printing
- plotting (pdf & gerbers)
- SVG export
- Specctra export
- 3D viewer
2014-07-09 15:02:56 +02:00
Maciej Suminski a6484f1acb Drawing tools used to crash when the drawing tool was interrupted - fixed. 2014-07-09 15:02:56 +02:00
Maciej Suminski b42091bc06 Fixed anchor placement tool in module editor (GAL). 2014-07-09 15:02:56 +02:00
Maciej Suminski 5f297726ca Module anchors are visible in GAL canvas. 2014-07-09 15:02:56 +02:00
Maciej Suminski 6f772c90d9 Renamed "Placement" context menu to "Align/distribute". 2014-07-09 15:02:56 +02:00
Maciej Suminski b076f3fe4e Fixed grid drawing when the grid origin has negative coordinates. 2014-07-09 15:02:56 +02:00
Maciej Suminski 84fa537b22 Changes in display options are handled by PCBNEW_CONTROL (GAL). 2014-07-09 15:02:56 +02:00
Maciej Suminski 2b1d6b303a Added support for module edge splitting with double click. 2014-07-09 15:02:56 +02:00
Maciej Suminski 47f1fec31d DXF drawing placement tool for GAL. 2014-07-09 15:02:56 +02:00
Maciej Suminski 445d935880 Created dialog_dxf_import.h. Cleaned up some unnecessary stuff and fixed file open dialog DIALOG_DXF_IMPORT. 2014-07-09 15:02:56 +02:00
Maciej Suminski 72c70148e8 Fixed a few memory leaks and Valgrind warnings. 2014-07-09 15:02:56 +02:00
Maciej Suminski da67880907 DXF files import is supported by module editor. 2014-07-09 15:02:56 +02:00
Maciej Suminski b2a601756e Refactored DXF import routines:
- DIALOG_DXF_IMPORT works with PCB_BASE_FRAME instead of PCB_EDIT_FRAME
- imported items are not immediately added to a BOARD
- imported items are held in a list, instead of vector
- imported items are instantly visible in GAL view
- added DIALOG_DXF_IMPORT::GetImportedItems()
- code formatting
2014-07-09 15:02:56 +02:00
Maciej Suminski 4ac277028b Code formatting. 2014-07-09 14:41:52 +02:00
Maciej Suminski 77d8b2d84e Context menu for the Placement Tool. 2014-07-09 14:23:13 +02:00
Maciej Suminski f0ff744e97 Initial version of the Placement Tool. 2014-07-09 14:23:13 +02:00
Maciej Suminski e3c4f425dc Fixed wrong reference point for copied items in subsequent module editor invocations (GAL). 2014-07-09 14:23:13 +02:00
Maciej Suminski ac8ee56e51 Pasted module texts are rotated in the right way. 2014-07-09 14:23:13 +02:00
Maciej Suminski 5941f196c3 Reference point is selected for copied items. Enabled autopanning for copy & paste operations (module editor/GAL). 2014-07-09 14:23:13 +02:00
Maciej Suminski 95a4f61eee wxWidgets 2.8 compatibility fix. 2014-07-09 14:23:13 +02:00
Maciej Suminski 5e48a79639 Copy & paste for module editor (GAL). 2014-07-09 14:22:29 +02:00
Maciej Suminski ae431bbb05 Added MODULE::Add( BOARD_ITEM* )/Remove( BOARD_ITEM* )/Delete( BOARD_ITEM* ).
Removed MODULE::AddPad().
2014-07-09 14:22:29 +02:00
Maciej Suminski 456eeaba10 Routines for handling clipboard with TOOL_MANAGER. 2014-07-09 14:01:07 +02:00
Maciej Suminski d73ab976df Added support for placing the footprint anchor. 2014-07-09 14:01:06 +02:00
Maciej Suminski 637919a699 Added support for pads, texts and graphics removal in module editor (GAL). 2014-07-09 14:01:06 +02:00
Maciej Suminski 5dc1f92608 Added pad placement tool for module editor (GAL). 2014-07-09 14:01:06 +02:00
Maciej Suminski 67136d21b1 MInor fixes. 2014-07-09 14:01:06 +02:00
Maciej Suminski ad000aefa4 Fixed the legacy module editor. 2014-07-09 14:01:06 +02:00
Maciej Suminski 99043b777d Adapted graphics tools to cooperate with module editor. 2014-07-09 14:01:06 +02:00
Maciej Suminski ba320ac7c3 Added "edit modules" mode for DRAWING_TOOL. 2014-07-09 14:01:06 +02:00
Maciej Suminski fc44f34ade Fixed DRAWING_TOOL::PlaceTextModule() method. 2014-07-09 14:01:06 +02:00
Maciej Suminski d085ace884 Created a header file for DialogEditModuleText class. 2014-07-09 14:01:06 +02:00
Maciej Suminski b05885c2f1 Refactored drawing tools: lines, circles and arcs. 2014-07-09 14:01:06 +02:00
Maciej Suminski 69c73b0ebc Updated POINT_EDITOR to handle module edges. 2014-07-09 13:50:27 +02:00
Maciej Suminski 26323007b5 Added a handler for not implemented toolbar buttons functionality in GAL. 2014-07-09 13:50:27 +02:00
Maciej Suminski 94cc845b3f Added AF_ACTIVATE flag for TOOL_ACTIONs.
Reworked the way of processing events in TOOL_MANAGER class.
Added GetCommandStr() for TOOL_EVENT class.
2014-07-09 13:50:27 +02:00
Maciej Suminski 34fbde42fc Improved way of translating wxEvent commands to TOOL_ACTIONs. 2014-07-09 13:50:27 +02:00
Maciej Suminski f8f6fd41ad Introduced a new type of action: TA_ACTIVATE to distinguish events activating tools from common tool actions. 2014-07-09 13:50:27 +02:00
Maciej Suminski 74522d5b3c Corrected names of common tool actions. 2014-07-09 13:50:27 +02:00
Maciej Suminski e3015930f1 Module editor: modules are shown in GAL mode when loaded from file/library. 2014-07-09 13:50:27 +02:00
Maciej Suminski 9ee8d1a2a7 Module editor loads the last edited footprint in GAL mode. 2014-07-09 13:50:27 +02:00
Maciej Suminski 6d1417bafa SELECTION_TOOL in edit module mode does not try to select MODULEs. 2014-07-09 13:50:27 +02:00
Maciej Suminski 8e90a6167b Rotate support for pads. 2014-07-09 13:50:27 +02:00
Maciej Suminski 583de985c7 Added required resets for tools. 2014-07-09 13:50:27 +02:00
Maciej Suminski 5d1ec2b204 Restored invocation of SELECTION_TOOL commands with TOOL_ACTIONs. 2014-07-09 13:50:27 +02:00
Maciej Suminski 5703b7e8bf Implemented stacking for TOOL_STATEs. 2014-07-09 13:50:27 +02:00
Maciej Suminski 5f806cfa18 Minor fixes to the Tool Framework. 2014-07-09 13:50:27 +02:00
Maciej Suminski f7ecc749f6 Restored std::map in TOOL_MANAGER. 2014-07-09 13:50:27 +02:00
Maciej Suminski 5ce29330b1 Restored support for custom angle rotation. 2014-07-09 13:50:27 +02:00
Maciej Suminski 6e0bd1eedc Adapted tools to PCB_BASE{_EDIT}_FRAME. 2014-07-09 13:50:27 +02:00
Maciej Suminski b0f3e79e54 Created a common interface for edit frames. 2014-07-09 13:50:27 +02:00
Maciej Suminski eee2779f6b Moved some layout editor specific tool actions to another class (PCB_EDITOR_CONTROL). 2014-07-09 13:50:27 +02:00
Maciej Suminski 8898b34755 Code formatting. 2014-07-09 12:10:28 +02:00
Maciej Suminski 1617f15b51 FOOTPRINT_EDIT_FRAME undo buffer handles operations done with GAL editor. 2014-07-09 12:10:27 +02:00
Maciej Suminski 7ade7db078 SELECTION_TOOL got a new mode to edit MODULEs. 2014-07-09 12:10:27 +02:00
Maciej Suminski d98a5c4efe Unconditionally initialize the Tool Framework in FOOTPRINT_EDIT_FRAME. 2014-07-09 11:59:24 +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
Maciej Suminski 2ee890d74b Minor changes. 2014-07-09 11:59:24 +02:00
Maciej Suminski a6dac245c0 Removed TOOL_ACTIONs: selectionSingle, selectionClear. SELECTION_TOOL methods are called directly instead. 2014-07-09 11:59:24 +02:00
Maciej Suminski dfc052d537 Added an alternative way to reach tools in the Tool Framework. 2014-07-09 11:59:24 +02:00
Maciej Suminski b5b20ef4bd Added layer widget to the module editor. 2014-07-09 11:59:23 +02:00
Maciej Suminski dca4667e66 PCB_LAYER_WIDGET became able to cooperate with PCB_BASE_FRAME. 2014-07-09 11:59:23 +02:00
Maciej Suminski 0306ec7efe {Set,Get}ActiveLayer moved from PCB_EDIT_FRAME to PCB_BASE_FRAME. 2014-07-09 11:50:27 +02:00
Maciej Suminski 5a428e1957 Moved layers visibility synchronization to PCB_DRAW_PANEL_GAL::SyncLayersVisibility(). 2014-07-09 11:24:56 +02:00
Maciej Suminski a24576f3ce Initial version of the GAL-based Module Editor. 2014-07-09 11:22:43 +02:00
Maciej Suminski 8a5fedb728 Code formatting and cleaning. 2014-07-09 11:22:43 +02:00
Maciej Suminski 7645ed8601 Grid offset is recomputed only when settings are changed. 2014-07-09 11:22:43 +02:00
Maciej Suminski 1f7ce5416c Next/previous footprint toolbar buttons are handled in the Module Viewer using GAL canvas. 2014-07-09 11:22:43 +02:00
Maciej Suminski 553996e7be bugfix: pads edited with properties dialog were not refreshed.
bugfix: changing track width/via size using the dropdown menu when custom size was enabled did not change anything.
2014-07-09 11:22:43 +02:00
Maciej Suminski 5134781a38 GAL view in pad properties dialog - initial version. 2014-07-09 11:22:43 +02:00
Maciej Suminski 0a6de2e13f FOOTPRINT_VIEWER_FRAME handles events from toolbar buttons and hot keys. 2014-07-09 11:22:43 +02:00
Maciej Suminski 2f7706e8cd Reduced number of switched events, allowing to use VIEW_CONTROLS, even if there is no extra event dispatcher. 2014-07-09 11:22:43 +02:00
Maciej Suminski 0fc93666c6 Rework to support multiple views with OpenGL GAL canvas. 2014-07-09 11:22:42 +02:00
Maciej Suminski 60b0a4e0be Alternative approach to handling events and commands by TOOL_DISPATCHER.
Event handlers are (dis)connected depending on the active view.
TOOL_DISPATCHER inherits from wxEvtHandler, so now it receives events directly instead of being fed by external handlers.
2014-07-09 11:22:42 +02:00
Maciej Suminski 3fd26b6dd2 TOOL_ACTIONs are automagically registered by TOOL_MANAGER upon its construction. 2014-07-09 11:22:42 +02:00
Maciej Suminski f5325f8d79 Removed a redundant pointer to EDA_EDIT_FRAME. 2014-07-09 11:22:42 +02:00
Maciej Suminski e46c5cb778 Fixed toolbar buttons for zooming in GAL canvas. 2014-07-09 11:22:42 +02:00
Maciej Suminski 8059f4ddd4 Added autozooming and display of the last chosen module for module viewer using GAL. 2014-07-09 11:22:42 +02:00
Maciej Suminski 13e67e1f3c Fixed VIEW::SetViewport(). 2014-07-09 11:22:42 +02:00
Maciej Suminski cc733a4966 Initial version of GAL-based module viewer in pcbnew. 2014-07-09 11:22:42 +02:00
Maciej Suminski a68165d2a0 Minor changes (removed an unnecessary event handler and two function calls that had no real influence). 2014-07-09 10:57:32 +02:00
Maciej Suminski f56e2e1454 Fixed switching between GAL canvases error. 2014-07-09 10:57:32 +02:00
Maciej Suminski 9a47f4c645 Created a specialization of EDA_DRAW_PANEL_GAL: PCB_DRAW_PANEL_GAL.
Moved View related routines & fields from PCB_{BASE,EDIT}_FRAME & BOARD to PCB_DRAW_PANEL_GAL.
2014-07-09 10:57:32 +02:00
Maciej Suminski 2f6c5f3156 Removed EDA_DRAW_FRAME::SetGalCanvasActive() [it may be misleading], added EDA_DRAW_PANEL_GAL::GetBackend(). 2014-07-09 10:34:00 +02:00
Dick Hollenbeck 853abdac24 kicad.exe work:
*) re-enable the MacOpen() support.
*) fix path truncation bug.
*) open *.kicad_pcb and *.sch files in the same process if they are part of the 
   the currently open project, even from the tree view.
2014-07-08 19:52:46 -05:00
Dick Hollenbeck acbe6290c5 switch back to original sexpr usage of PTREE, add new DSNLEXER constructor, enforce accessors in kicad.exe 2014-07-07 14:49:14 -05:00
Maciej Suminski 0304598a71 Fixed vertical alignment for strings that contain a newline character at the end (GAL). 2014-07-07 13:09:44 +02:00
Maciej Suminski fb0045a898 Bugfix: Bottom layer not correctly handled in (PNS) Interactive router. 2014-07-07 10:48:47 +02:00
Dick Hollenbeck a3b421b02c backanno 2014-07-07 01:04:53 -05:00
Dick Hollenbeck c1814ad98e netlist_stuff 2014-07-07 00:59:58 -05:00
Dick Hollenbeck 86132ad16b add aDocName to NETLIST::Format() 2014-07-06 23:41:29 -05:00
Dick Hollenbeck 84a14c3a51 back annotation when CVPCB and EESCHEMA are running under KICAD 2014-07-06 23:12:04 -05:00
Dick Hollenbeck d6a8696a99 typo on B_CrtYd, F_CrtYd, B_Fab, F_Fab 2014-07-06 11:59:26 -05:00
jean-pierre charras adf1553b20 Update demo files 2014-07-06 12:50:32 +02:00
Dick Hollenbeck 7cc5985c7a fix Inner1.Cu in pcb_parser.cpp, start cvpcb work. 2014-07-05 15:52:24 -05:00
Dick Hollenbeck 611592029f fix Inner1.Cu in pcb_parser.cpp, start cvpcb work. 2014-07-05 15:42:59 -05:00
Lorenzo Marcantonio e2e4fc4830 Added missing support for reading the *.CrtYd layer token 2014-07-05 14:35:18 +02:00
jean-pierre charras 9a7116d4ab Update old demo board files. Minor code cleaning. 2014-07-04 21:36:43 +02:00
jean-pierre charras f71418ace9 Pcbnew: fix read .kicad_pcb file error when an outdated plot parameter is found. Now outdated plot parameters are just ignored 2014-07-04 17:54:14 +02:00
jean-pierre charras ab58dbfced Pcbnew: Rework on Gerber ouput: allows choice between format 4.5 and 4.6. Fix a minor issue in Gerber layers attributes.
fix print issue when printing each layer on a separate page.
2014-07-04 16:22:38 +02:00
jean-pierre charras 5a4c16dcfb Pcbnew, Gerbview : fix crash when updating the layer manager. 2014-07-04 15:53:41 +02:00
Lorenzo Marcantonio 89f14906a4 - Added the courtyard/fabrication layer to the layer combo and layer
panel
- Corrected handling of scrollability in layer panel (fixes 1336996)
2014-07-04 10:55:51 +02:00
jean-pierre charras eb396a5e88 Fix footprint wizard issues. Fix export vrml incorrect Z position of items. 2014-07-02 15:08:28 +02:00
jean-pierre charras 39216b4b3a Fix Bug #1336614 (Vias missing from drill export) 2014-07-02 09:05:29 +02:00
jean-pierre charras 74df72e9a9 Fix Bug #1336534 pcbnew 3D viewer wrong vertical model offset. 2014-07-02 08:45:42 +02:00
jean-pierre charras 8a1fd49377 Minor fixes in Gerber files, in file attribute for copper layers. 2014-07-01 21:20:38 +02:00
jean-pierre charras dc38c50258 Fix Bug #1335914 (Export SVG menu) hangs pcbnew permanently.
Also a minor cosmetic enhancement in SVG export and plot dialogs.
2014-06-30 21:19:58 +02:00
Dick Hollenbeck 4d9f87bf0b fix BUG parsing the kicad_pcb (layers ..) declaration section. First non-cu was being dropped. 2014-06-30 13:45:43 -05:00
jean-pierre charras c6af2a7974 Fix a double minor bug about layers occupied by SMD pads and CONN pad:
The default layer stack between these 2 types was swaped in pad definition, and also in the dialog pad properties.
This double swap creates no bug, but creates bugs in the footprint wizards (SMD or CONN pads do not have the right layer stack)
FYI, the CONN pad type should be removed soon.
2014-06-30 20:14:06 +02:00
jean-pierre charras a543f99eb3 Enable technical layers when starting Pcbnew with no board.
Use format 4.6 (full resolution of Pcbnew) in Gerber files to avoid the creation of self-intersecting polygons.
2014-06-30 17:46:47 +02:00
Dick Hollenbeck e460b4a524 fix export_gencad.cpp 2014-06-30 10:03:20 -05:00
jean-pierre charras 516c386a51 Update complex_hierarchy.kicad_pcb file, used in qa tests, which was created by a test version of Pcbnew, and was not currently readable. 2014-06-30 14:18:52 +02:00
jean-pierre charras b50872edca Gerber output: Some changes after evaluation of Gerber files by Ucamco (the manager of GERBER format):
* default file ext is now .gbr (the "official extension")
* some outdated commands remoded.
* mainly use mm and 4.5 format instead of inches and 3.4 format. this is mandatory,
  because the 3.4 format (comming from old pcbned internal units) creates truncations in coordinates.
  (with serious issues in polygons which can appear self-intersecting afer truncation)
2014-06-30 12:00:21 +02:00
Dick Hollenbeck d6d786eed8 1) Add 32 Cu Layers and provisions for additional future 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.  LAYER_NUM is only advisory and
   can safely be replaced with int.
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-30 01:59:52 -05:00
Dick Hollenbeck 60140dfbcf merge 2014-06-30 01:44:46 -05:00
Dick Hollenbeck 1e7495e634 merge 2014-06-30 00:46:18 -05:00
Dick Hollenbeck 575f13d887 fix VIA::IsOnLayer() 2014-06-29 23:40:16 -05:00
Dick Hollenbeck 3aa880dedb fix pcb_parser for new board, coding standards 2014-06-29 16:50:06 -05:00
Dick Hollenbeck 06bf0821b9 fix LSET() constructors, formatting 2014-06-29 15:33:29 -05:00
Dick Hollenbeck add4d5eb6f re-work the LSET(int,...) constructor 2014-06-29 13:09:32 -05:00
Dick Hollenbeck 0a1665d5aa class_marker IsOnLayer() 2014-06-29 08:12:30 -05:00
Dick Hollenbeck ad750defb6 LAYER_ID work 2014-06-29 08:05:51 -05:00
jean-pierre charras 33776f2868 Fix Pl_Editor scrollbars incorrect position. 2014-06-29 11:24:42 +02:00
jean-pierre charras 9c8d221f41 Make gerbview compilable and working (does not use now layers and layer masks from Pcbnew).
Export to Pcbnew is broken, but it is a very rarely used feature. It will be fixed later.
2014-06-27 19:09:25 +02:00
jean-pierre charras 013296cb1a Make gerbview compilable and working (does not use now layers and layer masks from Pcbnew).
Export to Pcbnew is broken, but it is a very rarely used feature. It will be fixed later.
2014-06-27 19:07:42 +02:00
jean-pierre charras d4a7685761 Pspice netlist generator: add option to use net numbers as net names (feature removed a long time ago, but needed by Oscad team)
Note these options are saved in project config.
2014-06-26 21:20:05 +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 b76d0c533b add lset.cpp 2014-06-24 13:31:41 -05:00
Dick Hollenbeck ab51a49c5a fix zones 2014-06-24 13:30:39 -05:00
jean-pierre charras 96b6e1a5cb Make dialog pns properties resizable. DXF import: add very basic polyline import. 2014-06-24 20:04:16 +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
Maciej Suminski 95a6e8deb2 Dragging items by their origin is optional (activated by dragging elements with Ctrl held). 2014-06-23 16:12:59 +02:00
Kirill Mavreshko b4e0a5cbbf Fixes bug #1332438: PNS router crashes when you another track while routing in "shove" mode 2014-06-23 08:50:53 +02:00
jean-pierre charras 4cd4990bc2 Fix compil issue with KICAD_SCRIPTING_WXPYTHON option ON.
Minor enhancements.
2014-06-20 19:29:35 +02:00
jean-pierre charras 7c99a242cf Remove 2 global variables: g_DrawBgColor and g_ShowPageLimits.
They are now member of EDA_DRAW_FRAME.
This change could fix Bug #1330781 (Background color change in Eeschema affects background color in Pcbnew)
Show page limits has meaning only for the schematic editor,  the board editor and the page layout editor.
Draw background color selection exists only in eeschema and  page layout editor.
In pcbnew, only a black background is allowed.
A side effect is now the user should set the background color in schematic editor, and the library editor (2 different options).
The default is still the white color.
2014-06-20 13:13:04 +02:00
Lorenzo Marcantonio 94d78047e3 Fixes 1332429 2014-06-20 10:55:30 +02:00
unknown 1a47508832 Gerber X2 patch (Support for the "file function" attribute) from Thiadmer Riemersma, committed in rev 4948: minor fix for better compatibility with older versions of Pcbnew 2014-06-19 09:12:48 +02:00
jean-pierre charras 9ee8dac056 Pcbnew, python console: make it not dockable (workaround to avoid the fact accelerator keys which are used in the main menu are not sent to the console, in docked mode).
Minor cosmetic enhancement.
2014-06-19 08:26:53 +02:00
jean-pierre charras a2abb20793 Pcbnew, python console: make it not dockable (workaround to avoid the fact hot keys which are used in the main menu are not sent to the console, in docked mode)
Minor cosmetic enhancement.
2014-06-18 18:33:16 +02:00
jean-pierre charras ba2c763222 better management of Python console. 2014-06-18 13:44:17 +02:00
jean-pierre charras 688dbe5de1 Minor cosmetic enhancement, and try to fix an issue with accelerator keys and the Python scripting console 2014-06-17 20:31:27 +02:00
Dick Hollenbeck 2ff53e95bd fix some bugs in FOOTPRINT_VIEWER_FRAME, get rid of statics 2014-06-16 14:00:26 -05:00
Bernhard Stegmaier b22aba2010 Fixes 2014-06-16 11:42:27 -05:00
Bernhard Stegmaier a457dffd8f OSX drawing artifacts 2014-06-16 11:32:23 -05:00
jean-pierre charras f43cf03789 Fix specctra export crash, when a non copper zone was found on the board to export. 2014-06-16 14:04:55 +02:00
unknown a91eabb805 Apply vrml_layer_pth, from Cirilo Bernardo 2014-06-16 14:02:15 +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
Lorenzo Marcantonio bb79ec84bc In KIFACE_I::end_common save the 'common' configuration variables loaded in KIFACE_I::begin_common (the background color and the page border flag) 2014-06-12 20:34:16 +02:00
Lorenzo Marcantonio bee6b9f9b7 Fixes #1186269
- Refactored the common part of cursor key movement and crosshair update
  in the various GeneralControl
- Add x10 movement with the keyboard (CTRL modifier)
- Avoid fixup of the cursor position by dummy mouse movements generated
  by cursor warping (original analysis and idea Chris Gibson)
- Do key handling in a way to permit sub-pixel cursor movement
2014-06-12 18:12:14 +02:00
Jean-Samuel Reynaud 00e18d2144 pcbnew crashed on start compiled with KICAD_SCRIPTING_WXPYTHON=ON 2014-06-12 08:57:00 -05:00
Dick Hollenbeck 21b70093b0 refinements 2014-06-11 00:57:26 -05:00
Dick Hollenbeck 1385e39d89 Save the footprint editor's last footprint in the PROJECT RString facility. 2014-06-11 00:18:41 -05:00
Dick Hollenbeck 3d311f831e *) Remove more wxString static constructors which were crashing in PAGE_INFO assignment
to a new BOARD in the footprint editor.  This is PAGE_INFO::A4 and company.
   
*) Remove static storage of the BOARD in the module editor.
2014-06-11 00:00:30 -05:00
jean-pierre charras 737ef50cc0 Plot SVG: fix issue with arcs (bug #1328155 ) both in Pcbnew and Eeschema. 2014-06-10 18:21:38 +02:00
Dick Hollenbeck 8cb3423262 Remove class RETAINED_PATH, put is main member function into SEARCH_STACK.
Change class PROJECT to use a generalized wxString in place of the
RETAINED_PATH items, so that new session and project specific strings
of any purpose can be saved there, for the life of a session.
2014-06-10 10:56:43 -05:00
unknown 53cd19a69b VRML export rewritten 2014-06-08 12:35:42 +02:00
jean-pierre charras bd174ebffe Page layout editor: fix bad initialization on startup, which can crash pl_editor when trying to edit an item.
Minor other fixes.
2014-06-07 18:20:23 +02:00
Maciej Suminski e7aa963011 Fixed layers switching in GAL. 2014-06-06 14:59:55 +02:00
Maciej Suminski f5de166a7e Removed an unused parameter from TOOL_BASE::getModel<T>() method. 2014-06-06 14:59:25 +02:00
jean-pierre charras 2099dd70c2 Pcbnew: fix an issue (crash) with very old .brd files. 2014-06-06 12:32:01 +02:00
jean-pierre charras 335f5a57e5 Pcbnew: fix an issue with very old .brd files. 2014-06-06 12:30:07 +02:00
Tomasz Wlostowski 4121c27269 Clang-alike lightweight RTTI for pcbnew + type casting cleanup. 2014-06-06 11:44:21 +02:00
unknown 7a110d0ce3 IDF tools: code cleanup and debugging 2014-06-05 20:37:04 +02:00
Bernhard Stegmaier 60a86853ec Removed a few warnings. 2014-06-05 12:40:26 +02:00
Maciej Suminski afbe21fe70 Single items are dragged by their origin in GAL canvas. 2014-06-05 09:55:53 +02:00
Maciej Suminski fe341876eb bugfix #1326155: pcbnew shows strange ratsnest lines in OpenGL mode. 2014-06-05 09:55:35 +02:00
Maciej Suminski 9305f77fdc Fixed: Modules become invisible after reloading a netlist, until GAL view is refreshed. 2014-06-05 09:54:47 +02:00
Maciej Suminski 517bfa3570 Minor code cleaning. 2014-06-04 18:01:01 +02:00
Maciej Suminski 35e343597b Grid in GAL takes into account grid offset. 2014-06-04 17:56:44 +02:00
Maciej Suminski 0d734e8841 Placing the grid origin is possible with GAL. 2014-06-04 17:46:43 +02:00
Dick Hollenbeck 20f512e516 Fix off by one error in libpart editor when displaying duplicate pins, unit numbers.
Fix segfault when deleting last user path from eeschema libpaths and then pressing cancel.
2014-06-04 20:06:52 -05:00
jean-pierre charras e140f79aba Fix some compil warnings and Debug assertions. 2014-06-04 20:48:49 +02:00
jean-pierre charras f76041e956 Fix some compil warnings and Debug assertions 2014-06-04 19:34:23 +02:00
Dick Hollenbeck 431675933a remove global g_UserLibDirBuffer which was a project specific global, and no longer used with FP_LIB_TABLE support. 2014-06-03 10:59:52 -05:00
Dick Hollenbeck 093f810df3 wxFrame GetParent() strategy is obsolete, use Kiway().Player() 2014-06-03 10:31:58 -05:00
Maciej Suminski 3480c41caa PNS router handles net class settings (dependent on the selected start item). 2014-06-03 16:09:27 +02:00
Maciej Suminski 79631def2c Improved ratsnest updating in GAL. 2014-06-03 16:08:23 +02:00
Maciej Suminski 2af3e5f6e9 bugfix #1325743: cvpcb crashes when opening any netlist. 2014-06-03 09:32:57 +02:00
jean-pierre charras 563502b8fa Minor fixes ( including Bug #1325561 ) 2014-06-02 18:35:49 +02:00
jean-pierre charras 44014b2196 Minor fixes. 2014-06-02 18:16:06 +02:00
jean-pierre charras ea755a10db .kicad_mod files: always save the "last edited date" because only the footprint editor changes this parameter. Usefull to know if/when a footprint was actually modified.
Also fix a minor issue in footprint editor which always set the "modified" flag even when no change was made.
2014-06-02 12:46:29 +02:00
Maciej Suminski fa846932c1 bugfix 1325375: pcbnew crash while append a board 2014-06-02 11:41:54 +02:00
jean-pierre charras 9cfd1dc4ea Suppress compil warnings 2014-06-01 20:22:51 +02:00
unknown 8e3b896bf7 idf tools: code cleanup and debugging 2014-06-01 18:55:53 +02:00
Tomasz Wlostowski a90680aa15 router: fix segfault on route-undo-route 2014-06-01 18:44:38 +02:00
jean-pierre charras 218cb8e7c1 Pcbnew: fix Bug #1325311 ("New Board" warning refusal broken) 2014-06-01 16:58:17 +02:00
jean-pierre charras 59dfc053c2 Cosmetic enhancements: fix incorrect icons. 2014-05-31 17:49:15 +02:00
Maciej Suminski 2619ceae03 PNS formatting code. 2014-05-31 16:04:25 +02:00
Maciej Suminski b1a19b1225 Setting proper tool for submenus of CONTEXT_MENU class. 2014-05-31 16:04:10 +02:00
Maciej Suminski 3ef78c66bf Brighter colors for pad net labels. 2014-05-31 11:50:01 +02:00
Maciej Suminski 0e69277074 Fix for vertical/horizontal (using Ctrl/Shift + mousewheel) panning in GAL canvas. 2014-05-31 11:48:27 +02:00
Maciej Suminski 4f678a919c Fixed invisible buttons in PNS settings dialog (at least for some GTK themes). 2014-05-30 15:31:30 +02:00
unknown 764c18bde1 OSX install script fixes. 2014-05-29 20:35:49 +02:00
jean-pierre charras 70ce6d2825 Idf tools: Minor change for OSX compatibility (some from a patch from stegmaier@sw-systems.de) 2014-05-29 18:17:08 +02:00
unknown 3af4bf66a2 Idf tools: Minor change for OSX compatibility 2014-05-29 18:04:54 +02:00
jean-pierre charras 771ac33c80 Pcbnew: fix a minor bug: in zones with no net, only the zone clerance was used to created clearence, regardless the pad or footprint local clerance.
Very minor other fixes.
2014-05-29 13:48:14 +02:00
Maciej Suminski 707f5cd6e6 bugfix 1324144: broken PNS dragging 2014-05-28 19:21:12 +02:00
unknown 47c1edd7ca Add patch about idf export (from cirilo_bernardo), with a fix for Windows. 2014-05-28 14:24:44 +02:00
Maciej Suminski b9246dd463 bugfix #1323135: PNS creates vias with giant holes. 2014-05-28 13:16:15 +02:00
unknown 6652bcdc5f Add patch about idf export (from cirilo_bernardo) 2014-05-28 08:26:46 +02:00
Dick Hollenbeck e585f2d205 A hopeful fix for bug lp:1322354 2014-05-27 23:33:00 -05:00
Dick Hollenbeck c8479cdd2b remove unused single_top.c function. 2014-05-27 23:30:38 -05:00
Dick Hollenbeck b9b80b48b7 change to fatal error in kicad/kicad.cpp Kiface() stub. 2014-05-27 00:05:41 -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
unknown 3802629adc Fix kicad_plugin.cpp coding style fully broken by commit 4887 (patch from Orson, AKA maciej suminski). 2014-05-26 08:21:25 +02:00
Bernhard Stegmaier 0d5c7f4461 mac fixes 2014-05-25 11:02:52 -05:00
Maciej Suminski 3087c05a5d Bugfix #1322914: pcbnew crashes when opening a file 2014-05-25 17:36:24 +02:00
Tomasz Wlostowski c87baa9d22 router: fix segfault when trying to shove a line that forms a closed loop. 2014-05-23 11:57:43 +02:00
Wayne Stambaugh 0db76ecb14 Add gerber file attributes to road map. 2014-05-22 16:10:49 -04:00
Wayne Stambaugh 012b508622 Add DRC and website improvements to road map. 2014-05-22 15:50:49 -04:00
Maciej Suminski 537a97cf52 Ratsnest is computed for legacy boards in GAL view. 2014-05-22 19:34:28 +02:00
Maciej Suminski dd1fcd0588 Fix for context menu hanging up in GAL. 2014-05-22 17:59:36 +02:00
Tomasz Wlostowski b688f9bc20 math_util: speed up rescaling on 64-bit platforms by using native 128-bit types 2014-05-22 15:07:28 +02:00
Maciej Suminski 655721d9ae Added missing changes required for updating footprints with the module editor. 2014-05-22 15:01:58 +02:00
Maciej Suminski 957f959e90 Fixed bug 1321936: changing a footprint for a set of modules relocates them in GAL canvas.
Changes introduced by the module editor are updated in GAL canvas.
2014-05-22 12:06:45 +02:00
Maciej Suminski 69816d8704 The GAL view uses colors settings from the legacy canvas.
Minor refactoring of PAINTER & RENDER_SETTINGS classes.
2014-05-21 23:13:30 +02:00
Lorenzo Marcantonio 07877f9044 Replaced the display line clipper with the way simpler (and faster) Cohen-Sutherland one.
A couple of trivial accessors made inline
2014-05-21 19:02:32 +02:00
Dick Hollenbeck f7c1372d58 set( wxWidgets_CONFIG_OPTIONS --static=no ) for platforms using wx-config 2014-05-21 08:36:59 -05:00
Dick Hollenbeck 2fa082f698 fix bug lp:1319839 2014-05-21 01:06:52 -05: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
Dick Hollenbeck f49e9a285f fix compiler warnings 2014-05-19 17:27:09 -05:00
jean-pierre charras cfa67aa218 Pcbnew: plot dialog: remove obscure and useless option about texts which are not value or reference.
cosmetic enhancement in dialog.
page layout: fix bug Bug #1320839 (canvas refresh countinously called when moving an item)
2014-05-19 20:24:07 +02:00
Wayne Stambaugh 4e9582c3ab Add road map to developer's documentation.
- Create KiCad road map document.
- Add road map to developer's documentation.
- A separate road map build command to CMake so the road map can be built
  separately for use in websites.
- Update .bzrignore to ignore road map files generated by Doxygen.
2014-05-18 19:37:45 -04:00
Maciej Sumiński c97afea468 Upstream merge. 2014-05-18 17:32:35 +02:00
Maciej Sumiński 46020e20de Merged the new Interactive Push and Shove router.
Do not pay attention to add/remove files - it seems there may be a bug in git-bzr-ng plugin. I have checked them, they stayed exactly the same as before.
2014-05-18 17:16:59 +02:00
jean-pierre charras d54ade9403 Rework on DXF export. 2014-05-17 21:29:15 +02:00
Lorenzo Marcantonio 073a9e1724 TRACK::GetTrack can now be told to confine search to the netlist and/or force the sequential (restartable) algorithm
Reworked the collinear track routines. Cleanup should be faster given the above modification.
2014-05-17 19:36:02 +02:00
jean-pierre charras 41e41b95f8 Plot DXF: better generation of filled zone polygons. 2014-05-16 21:03:45 +02:00
Lorenzo Marcantonio 645e17684d Pull unfilled polygon drawing thru the line clipper; GTK mess up even in this case and the sheet border lines glitch on the screen at high zoom otherwise in pcbnew. 2014-05-16 19:43:27 +02:00
Maciej Suminski 51ee6916ec Removed header files from CMakeLists.txt. 2014-05-16 16:01:03 +02:00
Lorenzo Marcantonio 6d17ad712c Made the project default text size apply to all text things in eeschema, instead of the hardcoded value 2014-05-16 15:57:53 +02:00
Maciej Suminski ad1b138f28 Reformatted PNS code to conform the coding policy. 2014-05-16 13:37:31 +02:00
Maciej Suminski ebf35fd43a Workaround for Mac OS, fixes focus after a mouse click. 2014-05-15 17:08:15 +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 b2a5b2f329 Scripting fix. 2014-05-15 10:11:17 +02:00
jean-pierre charras bb0804ec29 DXF export: fix incorrect export of polygons having thick outline (like zones): Thick segments of outline were drawn like lines with no thickness.
Fix ( workaround only) crash (Windows only) when a quasi modal frame (like footprint viewer) was called from a dialog (like the component properties dialog in schematic editor).
Very minor other fixes.
2014-05-15 08:32:24 +02:00
Maciej Suminski 7a526261fb PNS router deselects all items when started. 2014-05-14 19:15:25 +02:00
Maciej Suminski f04997797b Fixed freezing of GAL canvas if user chooses Cancel in the on close dialog.. 2014-05-14 19:04:21 +02:00
Maciej Suminski 0d9373ca6c Undo/report support for track dragging (PNS). 2014-05-14 18:45:59 +02:00
Maciej Suminski d7ac368260 PNS routing settings are stored between router invocations. 2014-05-14 16:53:49 +02:00
Maciej Suminski f31dd1cdaf PNS debug output is enabled with PNS_DEBUG define. 2014-05-14 16:40:56 +02:00
Maciej Suminski def53707d5 TOOL_MANAGER is no longer static. Reworked autoregistration of TOOL_ACTIONs. 2014-05-14 16:29:53 +02:00
Maciej Suminski ae4f41c328 Added missing dialog files for pcbnew. 2014-05-14 16:28:39 +02:00
Tomasz Włostowski 061660e9e4 Long-awaited new version of the P&S router 2014-05-14 15:53:54 +02:00
Tomasz Włostowski e9afb10a9d Switching top layer should update the layer widget 2014-05-14 13:54:59 +02:00
Tomasz Włostowski dd5558f653 geometry: GetShape()->Shape() in indexed shape containers 2014-05-14 13:53:02 +02:00
Tomasz Włostowski 5a51d11b78 geometry: get rid of useless vertex references in SEG class 2014-05-14 13:52:29 +02:00
Tomasz Włostowski 5bf50ee910 VIEW: added CalculateExtents() method 2014-05-14 13:48:29 +02:00
Maciej Suminski 922bf1ddea Fixed freezing of GAL canvas if user chooses Cancel in the on close dialog. 2014-05-14 12:08:29 +02:00
Maciej Suminski 0ae6b4412e Added a missing file. 2014-05-14 11:47:17 +02:00
Maciej Suminski cce6e27096 Various fixes to geometry & math library. 2014-05-14 11:45:01 +02:00
Maciej Suminski d27ea7895d Moved background color settings from GAL to RENDER_SETTINGS. Added RENDER_SETTINGS::TranslateColor() to convert between EDA_COLOR_T and COLOR4D. 2014-05-14 10:35:12 +02:00
Maciej Suminski 2cba91f974 Holding shift always activates extend current selection mode (in GAL canvas). 2014-05-14 09:56:35 +02:00
Maciej Suminski 27bb059aaf Via holes were always visible in GAL canvas - fixed. 2014-05-14 09:48:29 +02:00
Maciej Suminski 129e26d512 Disable autopanning when GAL panel does not have focus. 2014-05-14 09:42:16 +02:00
Lorenzo Marcantonio a1087801af Various fixes to pin drawing code
- Better shape to the 60617 pin markers
- Made the markers' size proportional to the pin text
- Added the missing implementation in the pin plot routines
2014-05-13 21:24:12 +02:00
Maciej Suminski 562beafcde Fixed modification point for EDIT_TOOL when the tool is not active. 2014-05-13 11:22:51 +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 5af454c28b Fixed namecase for private fields in BOARD_DESIGN_SETTINGS class.
Moved a few one-liners of BOARD_DESIGN_SETTINGS class to the header file.
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 7ec1313cbc Custom width settings taken into account in wxUpdateUIEvent handlers. 2014-05-13 11:22:51 +02:00
Maciej Suminski 917e47397d Custom track/via size settings nicely cooperate with other options. 2014-05-13 11:22:51 +02:00
Maciej Suminski ffe212ea5e Initial support for custom track width & via size. 2014-05-13 11:22:51 +02:00
Maciej Suminski 4577aed921 Minor reorganization of handling custom events with CONTEXT_MENU. 2014-05-13 11:22:51 +02:00
Maciej Suminski 3f2fc34075 WX_UNIT_TEXT can handle default value. 2014-05-13 11:22:51 +02:00
Maciej Suminski e2feefc08c Fixed custom event handlers for CONTEXT_MENU.
Moved menuCopy to CONTEXT_MENU copy constructor.
2014-05-13 11:22:51 +02:00
Maciej Suminski 05ee03d6b0 Recursive copy constructor for CONTEXT_MENU. 2014-05-13 11:22:51 +02:00
Maciej Suminski 089e99b99e Fixing memory leaks. 2014-05-13 11:22:51 +02:00
Maciej Suminski 9325a9e74d Fixed rotation/flip point. 2014-05-13 11:22:51 +02:00
Maciej Suminski a0801e2d8e Pad properties are back. 2014-05-13 11:22:51 +02:00
Maciej Suminski 929008c6c3 SELECTION_TOOL updates dragging offset after rotating/flipping.
Cursor position is saved as a field in order to avoid drifting of items while they are being dragged and rotated/flipped.
2014-05-13 11:22:51 +02:00
Maciej Suminski 761375ddef More compatibility fixes. 2014-05-13 11:22:51 +02:00
Maciej Suminski 3eaef97a7d Added WX_UNIT_TEXT - wxWidget control for inputing sizes using different units (mm, inch, internal units). 2014-05-13 11:22:51 +02:00
Maciej Suminski 2f5103bc67 Fixed jumpy zoom when hotkeys and scroll wheel were used alternatively. 2014-05-13 11:22:51 +02:00
Maciej Suminski 50193f1751 Resolved HOME hot key conflict between menu entry (Zoom Page) and event assigned to the hot key in the ACTION_MANAGER.
Conflicts:
	pcbnew/menubar_pcbframe.cpp
2014-05-13 11:22:51 +02:00
Maciej Suminski 6b222d19d5 Added preference for selecting tracks/vias/graphics if there is a module present in the selection point. 2014-05-13 11:22:51 +02:00
Maciej Suminski 7fd9fc4911 Ratsnest lines are highlighted together with all items in the same net. 2014-05-13 11:22:51 +02:00
Maciej Suminski 8bb5eaa434 Better way of adding CONTEXT_MENU entries. 2014-05-13 11:22:50 +02:00
Maciej Suminski 1cbf03cb60 Ratsnest was not refreshed on board reload - fixed. 2014-05-13 11:22:50 +02:00
Maciej Suminski 009d28d48c Merged lp:~cern-kicad/kicad/drawing_tool branch. 2014-05-13 10:19:37 +02:00
Maciej Suminski 402c7d21cb Fixed ifdefs in rtree.h. 2014-05-13 10:01:06 +02:00
Lorenzo Marcantonio 73a8cd6180 Added eeschema option for the default pin length 2014-05-12 18:57:46 +02:00
Maciej Suminski d6fd8b2e23 Upstream merge. 2014-05-12 17:17:51 +02:00
Maciej Suminski 2ed804b8ef Upstream merge. 2014-05-12 17:17:51 +02:00
Lorenzo Marcantonio 7dc8fc1f29 More refactoring of the track cleanup code
Algorithm is still the same... now need to know what it really meant to do
2014-05-10 14:48:17 +02:00
Lorenzo Marcantonio f9ba502b72 More refactoring of the track cleanup code
Algorithm is still the same... now need to know what it really meant to do
2014-05-10 14:48:17 +02:00
Dick Hollenbeck 9fe5ce67e6 Modular-Kicad milestone B), minor portion:
*)  Implement a framework for "Data Load On Demand".

*)  Implement FP_LIB_TABLE* PROJECT::PcbFootprintLibs(), which is the first
    prototype.

This allows the project specific footprint tables to be part of the Module Editor
when invoked from Eeschema.
2014-05-09 13:35:48 -05:00
Dick Hollenbeck e45aadd11b Modular-Kicad milestone B), minor portion:
*)  Implement a framework for "Data Load On Demand".

*)  Implement FP_LIB_TABLE* PROJECT::PcbFootprintLibs(), which is the first
    prototype.

This allows the project specific footprint tables to be part of the Module Editor
when invoked from Eeschema.
2014-05-09 13:35:48 -05:00
jean-pierre charras dc745aa62e Fix an annoying behavior of new quasi modal frames on Windows (when closing them, the caller frame was no more on top ) 2014-05-09 20:06:18 +02:00
jean-pierre charras 963029262b Fix an annoying behavior of new quasi modal frames on Windows (when closing them, the caller frame was no more on top ) 2014-05-09 20:06:18 +02:00
Dick Hollenbeck c855824337 Try some new Mac support ideas. 2014-05-09 09:27:21 -05:00
Dick Hollenbeck ecbe6e0856 Try some new Mac support ideas. 2014-05-09 09:27:21 -05:00
marco. 0166c95efd OSX: fix incorrect path to launch pl_editor.
fix also a bug in python script round_value_robin.py.
2014-05-09 08:32:05 +02:00
unknown 190461f8ed OSX: fix incorrect path to launch pl_editor.
fix also a bug in python script round_value_robin.py.
2014-05-09 08:32:05 +02:00
Dick Hollenbeck 223e372628 peggable checkout version in scripts/kicad-install.sh 2014-05-08 17:29:22 -05:00
Dick Hollenbeck 8c2da5f51c peggable checkout version in scripts/kicad-install.sh 2014-05-08 17:29:22 -05:00
Lorenzo Marcantonio e4508a65ff Missing const caused unpickability of tracks 2014-05-06 17:14:47 +02:00
Lorenzo Marcantonio e797c489d1 Missing const caused unpickability of tracks 2014-05-06 17:14:47 +02:00
Dick Hollenbeck b933ef8565 Allow building of a STABLE or TESTING version using kicad-install.sh. 2014-05-06 00:23:57 -05:00
Dick Hollenbeck 279f6e2bcf Allow building of a STABLE or TESTING version using kicad-install.sh. 2014-05-06 00:23:57 -05:00
Dick Hollenbeck 8434498394 Fix new bug which crashed pcbnew running under kicad.exe while adding a new module in mod editor 2014-05-05 23:58:33 -05:00
Dick Hollenbeck 0e8a72dbf0 Fix new bug which crashed pcbnew running under kicad.exe while adding a new module in mod editor 2014-05-05 23:58:33 -05:00
Dick Hollenbeck 3b0712873a Modular-Kicad milestone B), glamorous portions:
*) Eeschema can now show the footprint editor.

*) Eeschema can now invoke the footprint picker from the library part field editor.

*) KIWAY_PLAYER::ShowModal() takes aResultantFocusWindow that tells what window
   to give the focus to.  Required since frames are often near the top of the
   hierarchy and they are invoked by a peer, not a parent.
2014-05-05 12:28:40 -05:00
Dick Hollenbeck 55e61bc6e3 Modular-Kicad milestone B), glamorous portions:
*) Eeschema can now show the footprint editor.

*) Eeschema can now invoke the footprint picker from the library part field editor.

*) KIWAY_PLAYER::ShowModal() takes aResultantFocusWindow that tells what window
   to give the focus to.  Required since frames are often near the top of the
   hierarchy and they are invoked by a peer, not a parent.
2014-05-05 12:28:40 -05:00
jean-pierre charras 45e006aee8 Kicad: fix crash on exit, when Libedit was called during a session. It fixes also a crash if Libedit was called, closed and reopened.
Happens only if eeschema was called from the Kicad manager.
2014-05-05 17:15:54 +02:00
jean-pierre charras c7dc319737 Kicad: fix crash on exit, when Libedit was called during a session. It fixes also a crash if Libedit was called, closed and reopened.
Happens only if eeschema was called from the Kicad manager.
2014-05-05 17:15:54 +02:00
Maciej Suminski a4cdf25f83 Upstream merge. 2014-05-05 10:51:31 +02:00
Maciej Suminski 9536ed811d Upstream merge. 2014-05-05 10:51:31 +02:00
jean-pierre charras d9c3de9bbd footprint editor: fix crashes. In this fix, I removed the assumption the parent frame is the board editor.
However, this assumption is still present here and there  in the moduleframe code.
2014-05-05 09:46:07 +02:00
jean-pierre charras fc26cdfb74 footprint editor: fix crashes. In this fix, I removed the assumption the parent frame is the board editor.
However, this assumption is still present here and there  in the moduleframe code.
2014-05-05 09:46:07 +02:00
Dick Hollenbeck fb346a0c10 Quasimodo is not a monster, he is your friend. 2014-05-04 19:19:16 -05:00
Dick Hollenbeck 74cb23a958 Quasimodo is not a monster, he is your friend. 2014-05-04 19:19:16 -05:00
Dick Hollenbeck 7a0093b0c4 typeinfo.h missing in Debug build for wx2.8 2014-05-04 15:27:29 -05:00
Dick Hollenbeck bb374d2616 typeinfo.h missing in Debug build for wx2.8 2014-05-04 15:27:29 -05:00
Dick Hollenbeck 80a402a369 wx 2.8 now builds, but the quasi-modal support seems broken on 2.8. Wanted others to be able to build at least. 2014-05-04 14:57:44 -05:00
Dick Hollenbeck 19dd876684 wx 2.8 now builds, but the quasi-modal support seems broken on 2.8. Wanted others to be able to build at least. 2014-05-04 14:57:44 -05:00
Dick Hollenbeck a2227a75b4 Modular-Kicad milestone B), minor portions:
*) KIWAY_PLAYER::IsModal() is now a retained state, controlled by SetModal()

*) Fully re-work the KIWAY_PLAYER::ShowModal() to use a nested event loop.

*) Add support to DIALOG_SHIM for a "quasi-modal" dialog presentation and mode.
   See top of dialog_shim.cpp about that for benefits and need.

*) You can now pick footprint from the schematic component field dialog, although
   if you do this before you open the BOARD, you will only get the global footprint
   libraries, not also the project specific ones.  Opening the BOARD first avoids this
   problem.

This is the first example of cross KIFACE invocation, it is also the first
instance of using a TOP_FRAME other than FRAME_PCB as the first thing. It works,
but it's missing support for opening the project specific table because
historically the FRAME_PCB did that. This is now starting to expose all the near
term needs for KIWAY_PLAYER <-> PROJECT interaction, independence and out of
sequence usage.

A fix for this will be coming in a few days.

However it mostly starts to show why the KIWAY is terribly useful and important.
2014-05-04 13:22:27 -05:00
Dick Hollenbeck fef168aaed Modular-Kicad milestone B), minor portions:
*) KIWAY_PLAYER::IsModal() is now a retained state, controlled by SetModal()

*) Fully re-work the KIWAY_PLAYER::ShowModal() to use a nested event loop.

*) Add support to DIALOG_SHIM for a "quasi-modal" dialog presentation and mode.
   See top of dialog_shim.cpp about that for benefits and need.

*) You can now pick footprint from the schematic component field dialog, although
   if you do this before you open the BOARD, you will only get the global footprint
   libraries, not also the project specific ones.  Opening the BOARD first avoids this
   problem.

This is the first example of cross KIFACE invocation, it is also the first
instance of using a TOP_FRAME other than FRAME_PCB as the first thing. It works,
but it's missing support for opening the project specific table because
historically the FRAME_PCB did that. This is now starting to expose all the near
term needs for KIWAY_PLAYER <-> PROJECT interaction, independence and out of
sequence usage.

A fix for this will be coming in a few days.

However it mostly starts to show why the KIWAY is terribly useful and important.
2014-05-04 13:22:27 -05:00
Maciej Suminski fa5a6e5dd2 Clearing m_hiddentItems to avoid PNS crashes. 2014-05-04 20:20:49 +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
Lorenzo Marcantonio 85c5aa22c6 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
Dick Hollenbeck 19c184df97 Change order of headers for wx 2.8, use wxWindowDisabler not ENABLE_DISABLE. 2014-05-03 19:44:57 -05:00
Dick Hollenbeck f16f248bf9 Change order of headers for wx 2.8, use wxWindowDisabler not ENABLE_DISABLE. 2014-05-03 19:44:57 -05:00
Dick Hollenbeck 991926d320 Modular-Kicad milestone B), major portions:
*) Rework the set language support, simplify it by using KIWAY.  Now any major
   frame with a "change language" menu can change the language for all KIWAY_PLAYERs
   in the whole KIWAY.  Multiple KIWAYs are not supported yet.

*) Simplify "modal wxFrame" support, and add that support exclusively to
   KIWAY_PLAYER where it is inherited by all derivatives.  The function
   KIWAY_PLAYER::ShowModal() is in the vtable and so is cross module capable.

*) Remove the requirements and assumptions that the wxFrame hierarchy always
   had PCB_EDIT_FRAME and SCH_EDIT_FRAME as immediate parents of their viewers
   and editors. This is no longer the case, nor required.

*) Use KIWAY::Player() everywhere to make KIWAY_PLAYERs, this registers the
   KIWAY_PLAYER within the KIWAY and makes it very easy to find an open frame
   quickly.  It also gives control to the KIWAY as to frame hierarchical
   relationships.

*) Change single_top to use the KIWAY for loading a KIFACE and instantiating
   the single KIWAY_PLAYER, see bullet immediately above.

*) Add KIWAY::OnKiwayEnd() and call it from PGM_BASE at program termination, this
   gives the KIFACEs a chance to save their final configuration dope to disk.

*) Add dedicated FRAME_T's for the modal frames, so m_Ident can be tested and
   these modal frames are distinctly different than their non-modal equivalents.
   KIWAY_PLAYER::IsModal() is !not! a valid test during the wxFrame's constructor,
   so this is another important reason for having a dedicated FRAME_T for each
   modal wxFrame.

On balance, more lines were deleted than were added to achieve all this.
2014-05-03 12:40:19 -05:00
Dick Hollenbeck 25d1ab4008 Modular-Kicad milestone B), major portions:
*) Rework the set language support, simplify it by using KIWAY.  Now any major
   frame with a "change language" menu can change the language for all KIWAY_PLAYERs
   in the whole KIWAY.  Multiple KIWAYs are not supported yet.

*) Simplify "modal wxFrame" support, and add that support exclusively to
   KIWAY_PLAYER where it is inherited by all derivatives.  The function
   KIWAY_PLAYER::ShowModal() is in the vtable and so is cross module capable.

*) Remove the requirements and assumptions that the wxFrame hierarchy always
   had PCB_EDIT_FRAME and SCH_EDIT_FRAME as immediate parents of their viewers
   and editors. This is no longer the case, nor required.

*) Use KIWAY::Player() everywhere to make KIWAY_PLAYERs, this registers the
   KIWAY_PLAYER within the KIWAY and makes it very easy to find an open frame
   quickly.  It also gives control to the KIWAY as to frame hierarchical
   relationships.

*) Change single_top to use the KIWAY for loading a KIFACE and instantiating
   the single KIWAY_PLAYER, see bullet immediately above.

*) Add KIWAY::OnKiwayEnd() and call it from PGM_BASE at program termination, this
   gives the KIFACEs a chance to save their final configuration dope to disk.

*) Add dedicated FRAME_T's for the modal frames, so m_Ident can be tested and
   these modal frames are distinctly different than their non-modal equivalents.
   KIWAY_PLAYER::IsModal() is !not! a valid test during the wxFrame's constructor,
   so this is another important reason for having a dedicated FRAME_T for each
   modal wxFrame.

On balance, more lines were deleted than were added to achieve all this.
2014-05-03 12:40:19 -05:00
jean-pierre charras 5688a87212 Eeschema: fix unwanted creation of noname.pro (or other useless config file), when opening eeschema. Fix also an issue when saving the config (from save config menu) which saved the config file in an unknow folder. 2014-05-02 19:56:24 +02:00
jean-pierre charras c698a1da24 Eeschema: fix unwanted creation of noname.pro (or other useless config file), when opening eeschema. Fix also an issue when saving the config (from save config menu) which saved the config file in an unknow folder. 2014-05-02 19:56:24 +02:00
john.j. 32c676540d Fix issue in bga footprint wizard. 2014-05-02 08:28:40 +02:00
unknown 0ff0b9b835 Fix issue in bga footprint wizard. 2014-05-02 08:28:40 +02:00
Maciej Suminski c3b448b633 Upstream merge. 2014-05-01 15:55:50 +02:00
Lorenzo Marcantonio fca1ba6755 Virtual split of TRACK/VIA::HitTest 2014-05-01 08:50:11 +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
jean-pierre charras 7b843ecac8 Plots function: fix a bug about virtual PLOTTER::Text, which was not virtual for derived classes due to a missing parameter in ::Text in these classes. Noticeable only in SVG plot.
SVG plot, fix a missing reinitialization in plot lines, which could define a filled polyline, instead of a simple polyline
(these fixes solve Bug #1313084 )
2014-04-28 18:13:18 +02:00
Dick Hollenbeck a990c9f047 Reverse Marco's patch, pending a proper review of my last patch from an English speaking Mac developer. 2014-04-28 04:23:39 -05:00
Marco Serantoni 76771b856d [MacOSX] Fixing issue with kiface libs, now are symbolic linked to the owner bundle 2014-04-27 16:30:49 +02:00
Marco Serantoni d2083b0671 [MacOSX] Fix for name collision with OSX headers, Maciej, Tomasz or others feel free to rework if you want/like 2014-04-27 16:28:37 +02:00
unknown 4456840a1f 3D viewer: Commit patch to enable the rendering of wrl files generated with Meshlab. See https://bugs.launchpad.net/kicad/+bug/804778 2014-04-27 15:49:41 +02:00
jean-pierre charras 834699accb Pcbnew: fix bug #1313076 (Filled Zones on technical layers) does not show up on 3D rendering 2014-04-27 13:30:45 +02:00
Lorenzo Marcantonio 29c8ec4220 Fixed bug in via cleanup control flow 2014-04-26 13:23:00 +02:00
Lorenzo Marcantonio c2af94ac03 Reworked the endpoint designator constants FLG_BEGIN and FLG_END in a
ENDPOINT_T enum type
2014-04-25 19:13:33 +02:00
jean-pierre charras 802a59dc52 eeschema: fix the very minor bug #1298094. But it was due to a bad bounding box calculation, which is now fixed. 2014-04-25 18:49:32 +02:00
Lorenzo Marcantonio 948f22de6d Removed the ugly bit stuffing for the bottom via layer number
(just replaced it with a member)
2014-04-25 10:03:50 +02:00
Dick Hollenbeck c0879414a5 SEGVIA -> VIA for swig 2014-04-25 01:43:14 -05: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
jean-pierre charras 9c1f6b7307 Pcbnew: fix Bug #1304418 . Fix also a related issue which crashes Pcbnew in some corner cases.
(for instance, when a footprint from the currently edited board is loaded in the footprint editor, and when the board is cleared or reloaded)
In footprint editor, the net names are no more shown od modifiable (becuase the footprint editor does not know anything about net names.
This change should allow the changes planned in pcbnew.
2014-04-24 20:54:49 +02:00
Dick Hollenbeck b427aa49c1 single_top w/o kiface whines and exits gracefully. 2014-04-24 13:31:11 -05:00
Dick Hollenbeck 1e68c5f8b3 comment fix, simplified unhandled IO_ERROR exception report in single_top.cpp. 2014-04-24 12:25:57 -05:00
Dick Hollenbeck 8f0a773bc4 Add custom target on linux to make build-dir symlinks. 2014-04-24 12:21:34 -05:00
Dick Hollenbeck 8416c5d655 Add diagnostic message for missing *.kiface, which is now a fatal installation bug. 2014-04-24 06:30:14 -05:00
Andrey Fedorushkov 32a9a4a400 fix not correct build if BUILD_GITHUB_PLUGIN=ON in linux rpm-based distro 2014-04-24 09:44:27 +04:00
John Beard 38f36ae45c Add John Beard's patch: new and useful footprint wizards (SIP/SIP, SOIC/SSOP/TSSOP/MSOP and BGA).
Add Python utility tools to make wizard scripts more easy to write.
2014-04-23 18:36:31 +02:00
Dick Hollenbeck 61fe97e666 the boost site is getting slower, somebody might need supply a better host and offer bandwidth there for downloading the boost tar. 2014-04-23 08:53:07 -05:00
Dick Hollenbeck 99a19d27cb KIWAY::Player() wxASSERT 2014-04-22 11:16:34 -05:00
Dick Hollenbeck 59d7303b03 KIWAY::Player() wxASSERT 2014-04-22 11:10:07 -05:00
Dick Hollenbeck 01f7a53195 remove KIWAY_EXPRESS::kiway_express() typo, add comments. 2014-04-22 10:26:59 -05:00
Dick Hollenbeck 8afe4599d0 Teach cvpcb about new KIWAY based cross-probing, factor out MAIL_T into mail_type.h 2014-04-22 10:16:19 -05:00
Dick Hollenbeck 7a129e167b Functional
*) void KIWAY::ExpressMail( FRAME_T aDestination, MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource=NULL );
*) virtual void KiwayMailIn( KIWAY_EXPRESS& aEvent );
*) enum MAIL_T expansion into the brave new world if cross KIWAY_PLAYER communications.

Let the KIWAY_PLAYING begin.....
through well conceived mail from one KIWAY_PLAYER to another.
Get thinking now.  Add a new MAIL_T value, then send ExpressMail(), 
and receive it in KiwayMailIn(), it's that easy.
2014-04-21 09:49:33 -05:00
Dick Hollenbeck 1648d7fd43 Get cross-probing working under the Kiway. 2014-04-21 01:51:33 -05:00
Dick Hollenbeck e47a2bc5d4 happy Easter 2014-04-21 01:28:17 -05:00
Dick Hollenbeck a985255f95 add back missing pcbnew cross probing event handlers. eeschema launches kiface versions of pcbnew & cvpcb if not single. 2014-04-19 23:35:34 -05:00
Dick Hollenbeck f9f3ff22dc hook top frame with KIWAY::playerDestroyHandler() 2014-04-19 14:44:59 -05:00
Dick Hollenbeck ea66e572a0 KIWAY::dso_full_path() was more incomplete. 2014-04-19 13:58:32 -05:00
Dick Hollenbeck 0d6560a218 *) Switch kicad.exe to using KIFACE modules for all major top level windows.
Eeschema, Pcbnew, and Cvpcb all run under the same process now,
    FOR THE VERY FIRST TIME!

*)  Added KIWAY::PlayerCreate(), PlayerClose(), and PlayersClose().

*)  Factored FRAME_T into <frame_type.h> from ID_DRAWFRAME_TYPE.

*)  Found that the following command line is helpful for collecting all the *.kiface
    files into the <build>/kicad/ directory so that kicad can find them.

      $ cp `find . -name '*.kiface'` kicad/

    Maybe somebody will want to rework how the CMake files are organized so all
    the binaries can go into the same place.  See python-a-mingw-us.

*)  This might fix the problem on the Mac where child process windows were not
    coming to the front.  See ->Raise() in kicad/mainframe.cpp.

*)  You can set USE_KIFACE to 0 in kicad/mainframe.cpp to chain load child exes
    instead of using the KIFACE modules directly, i.e. revert.
2014-04-19 13:47:20 -05:00
Nick Østergaard ee3e97e6ca Fix vertical offset for multiline text in VRML exporter. 2014-04-19 18:05:58 +02:00
Dick Hollenbeck 5f65d0da93 *) Add KIFACE_I::StartFlags() and IsSingle() so a KIFACE implementation can know
if it is running under single_top.cpp or under a project manager.

*)  Test Kiface().IsSingle() when adding menus, some operations are not permitted
    when running under a project manager and the KIWAY_PLAYER is pegged to a
    specific project.

*)  Implemented KIWAY::KiFACE() so it loads *.kiface files.  They still have to be
    in the same directory as the main *.exe launcher, so this presents some difficulty
    when the binaries are not yet installed but rather the *.kiface files are still
    in their original build directories.  For today, I simply copied _pcbnew.kiface
    to build/kicad/.

*)  Add a test case to kicad/mainframe.cpp just to get an early peek at loading
    _pcbnew.kiface under the C++ project manager.  Got that working for one
    specific invocation just for proof of concept.  Surprise, it works.
2014-04-17 21:05:40 -05:00
Maciej Suminski e52d93429b The kicad.exe project manager was not finding the kicad.pro file because it did
not know where the template directory was.
2014-04-17 17:02:36 -05:00
Maciej Suminski e7ea0480e4 Upstream merge. 2014-04-16 11:26:41 +02:00
Maciej Suminski bff37e504e wxWidgets 2.8 compatibility fixes. 2014-04-15 16:36:23 +02:00
Dick Hollenbeck 8e6713ca02 Don't know how it ever worked before, supporting project template kicad.pro 2014-04-15 00:55:15 -05:00
Dick Hollenbeck 4a7ba86996 PROJECT::configCreate() logic changes. 2014-04-15 00:34:28 -05:00
Dick Hollenbeck c39385a5cd improve help file finding after kiway breakage. 2014-04-14 13:49:52 -05:00
Lorenzo Marcantonio d2e56665f5 - Began rework/cleanup of the board cleanup routine
- Set the modified flag even for null segment removal
2014-04-13 20:24:44 +02:00
Dick Hollenbeck 95ea4f6cc5 remove a static wxString constructor which was out of sequence with another dependent one, at least with one toolchain. 2014-04-13 07:48:58 -05:00
Dick Hollenbeck 953bf1d923 kicad-install.sh: only install global fp-lib-table if non-existent 2014-04-11 08:36:20 -05:00
Nick Østergaard a54df13036 bzr email happiness 2014-04-11 08:30:30 -05:00
Dick Hollenbeck 36bdbde68c oops, wx2.8 compatibility fixes 2014-04-10 16:31:55 -05:00
Dick Hollenbeck 359f05ad76 oops, wx2.8 compatibility fixes 2014-04-10 16:24:15 -05:00
Dick Hollenbeck f687f9ef85 catch some IO_ERRORs 2014-04-10 16:20:01 -05:00
Maciej Suminski 5efdac01c1 Fix MinGW OpenMP link error. 2014-04-09 20:55:34 -04:00
Maciej Suminski 3f8d9da31f Key events are handled by wxEVT_CHAR instead of wxEVT_KEY_[UP|DOWN]. Fixed issue of chars that require modifiers (e.g. ? is Shift+/ on US keyboard layout). 2014-04-09 17:33:22 +02:00
Maciej Suminski 50b202fe99 Hot keys specific to a tool have priority over global hot keys (TOOL_ACTION scope: AS_GLOBAL/AS_CONTEXT is finally handled properly). 2014-04-09 17:05:05 +02:00
Maciej Suminski 371b2f7c0e Fixed vias layer order. 2014-04-09 17:01:22 +02:00
Maciej Suminski e6fd3934d1 Fixed ratsnest update after removing items. 2014-04-09 16:57:22 +02:00
Dick Hollenbeck 4011953455 Jettison FP_LIB_TABLE::ConvertFromLegacy() into a static function, where it
was used locally.  Then comment it out in favor of a newer strategy for
filling in nicknames in cvpcb. 

Add MODULE* FootprintLoadWithOptionalNickname( const FPID& aFootprintId )
        throw( IO_ERROR, PARSE_ERROR );
from code found elsewhere.
2014-04-09 08:33:04 -05:00
Dick Hollenbeck d053e5615b More migration towards single process, extend PROJECT::Config*() in proper direction, cleanups. 2014-04-07 23:55:53 -05:00
Maciej Suminski 85365b0dbc Upstream merge. 2014-04-07 18:00:13 +02:00
Maciej Suminski 82661dc3a6 GAL defaults to Cairo, so KiCad does not fail on completely OpenGL incapable systems.
Board is cached in GAL only when the canvas is activated.
2014-04-07 16:04:54 +02:00
Maciej Suminski 89161331e4 Fixed refreshing issues (DRC, new items after reloading netlist and probably many other places). 2014-04-07 15:35:50 +02:00
Maciej Suminski c5b65e1ec4 Fixed outline breaking for zones (points were not always created in the double click point). 2014-04-07 14:30:38 +02:00
Dick Hollenbeck 94bc435599 Enhance scripts/library-repos-install.sh to create library-repos-install.bat and add that. 2014-04-07 07:28:44 -05:00
Maciej Suminski cc445391e9 Items that may be modified using EDIT_POINTs used to stay selected after pressing ESC (only EDIT_POINTs got away) - fixed. 2014-04-07 13:59:27 +02:00
Maciej Suminski 7dc08c8718 Fixed switching back to selection tool using the right toolbar buttons in pcbnew (GAL). 2014-04-07 13:50:18 +02:00
Maciej Suminski 6fa2f060fa Formatted ttl library to comply with KiCad coding policy. 2014-04-07 13:32:09 +02:00
Dick Hollenbeck 35b554d9d9 make kicad-install.sh executable 2014-04-06 14:21:10 -05:00
Dick Hollenbeck a196db3811 use proper schematic parts library 2014-04-06 14:12:37 -05:00
Dick Hollenbeck 8bfcb00aab kicad-install.sh uses https protocol. 2014-04-06 13:50:59 -05:00
Dick Hollenbeck c0ed226682 remove a warning message 2014-04-04 13:43:12 -05:00
jean-pierre charras 5768efe881 Pcbnew: commit forgotten change. 2014-04-04 20:35:07 +02:00
jean-pierre charras fe37c549f7 Footprint Editor: minor cosmetic enhancement (which could avoid a report like bug #1302255) 2014-04-04 20:28:35 +02:00
Maciej Suminski a0fb4ed0c1 Bruteforce module update after a netlist reload. 2014-04-04 17:42:35 +02:00
Maciej Suminski a6917280fe Added net highlighting. 2014-04-04 17:40:00 +02:00
Maciej Suminski 9a84944fba Corrected zone display settings for GAL. 2014-04-04 16:58:44 +02:00
Dick Hollenbeck 6beacd6e95 Rework FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(), fix up comments and warnings. 2014-04-04 09:57:26 -05:00
Maciej Suminski 4741d5607c Elements visibility are updated in the GAL. 2014-04-04 16:48:45 +02:00
Maciej Suminski b3318dad5d High contrast color got blueish by accident - fixed. 2014-04-04 15:49:37 +02:00
Maciej Suminski 89da70fe94 Edit->Global Deletions & Edit->Cleanup Tracks and Vias work in GAL, without toggling between canvases. 2014-04-04 15:43:30 +02:00
Maciej Suminski 8b8e8d8f7f Fixed crashes related to ratsnest on canvas change. 2014-04-04 13:03:41 +02:00
Maciej Suminski 14687a45a7 Fixed occasional crashes on undo/redo while dragging. 2014-04-04 12:56:50 +02:00
Maciej Suminski 024bf9dd84 Fixed GAL canvas freeze when ordered twice to change to the same GAL canvas (e.g. double F11). 2014-04-04 12:01:30 +02:00
Maciej Suminski ba275918e3 Renamed [class_]drawpanel_gal.[cpp|h] to [class_]draw_panel_gal.[cpp|h] to follow current naming scheme. 2014-04-04 11:56:04 +02:00
Maciej Suminski 4c5afc46af Added possibility of switching tools by the right toolbar buttons, without deactivating the current tool first (previously tools did not switch if there was one active). 2014-04-04 11:50:15 +02:00
Maciej Suminski bad6cdaa06 TEXTE_MODULE relative position is updated when absolute position is changed (and viceversa). 2014-04-04 09:01:17 +02:00
jean-pierre charras ede0464cbd Cmakefiles: do not create map files on Windows, because creating map file generates hundred of useless warnings.
In PATCH_COMMAND, use patch instead of bzr patch if patch or patch.exe is found (mandatory to build Kicad on msys2 because 'bzr patch' does not work when using msys2)
2014-04-04 07:55:28 +02:00
jean-pierre charras 229613ef26 Cmakefiles: do not create map file on Windows, because creating map file generates hundred of useless wranings.
In PATCH_COMMAND, use patch instead of bzr patch if patch or patch.exe is found (mandatory to use msys2 because bzr patch does not work when using msys2)
2014-04-03 13:55:02 +02:00
Maciej Suminski a01a7b911c Fix Clang build error when OpenMP is not found. 2014-04-03 06:54:08 -04:00
Maciej Suminski 1ef68d73e5 Fixed missing transitions for EDIT_TOOLs. 2014-04-03 10:24:27 +02:00
Maciej Suminski d876807966 Fixed cancelling dialogs in DRAWING_TOOL. 2014-04-03 09:48:06 +02:00
jean-pierre charras 9b99ac2a53 All: add 2 hotkeys to simulate a mouse left click (key return) and left dclick (key end) 2014-04-03 09:40:55 +02:00
Maciej Suminski b6aa832f83 Converted std::bind1st to boost::bind. 2014-04-02 16:30:48 +02:00
Maciej Suminski 5de41eabd1 Added EC_SNAPLINE to make possible snapping EDIT_LINES by their ends rather than by its center. 2014-04-02 15:57:21 +02:00
Maciej Suminski 23392ce8c9 Upstream merge. 2014-04-02 15:38:59 +02:00
Maciej Suminski 1828edbabe Refactoring EDIT_POINTS, part 3: constraints split to EDIT_POINTs and EDIT_LINEs. 2014-04-02 09:31:35 +02:00
Maciej Suminski 0379247fd4 Refactoring EDIT_POINTS, part 2: replaced index numbers with constants. 2014-04-01 17:41:24 +02:00
Maciej Suminski 6b90eb3a64 Refactoring EDIT_POINTS, part 1: separated functions that operate on EDIT_POINTS and EDIT_LINES. 2014-04-01 17:18:43 +02:00
Maciej Suminski e79934b03d If tool was previously active and it is called again, it is brought to the top of the active tool stack.
It fixes issue of dragging of items that have EDIT_POINTs, when dragging was activated by hovering over an item and using hot key.
2014-04-01 14:35:09 +02:00
Maciej Suminski 79d353671b Fixed autopanning for POINT_EDITOR. 2014-04-01 14:13:00 +02:00
Maciej Suminski a55d25803e Activation of any drawing/placement tool clears current selection. 2014-04-01 14:06:19 +02:00
Maciej Suminski 1fa49ce7f0 Fixed drifting for items dragged using EDIT_TOOL. 2014-04-01 13:30:31 +02:00
Wayne Stambaugh 4eec9fd013 Fix OpenMP link error on MinGW. 2014-03-31 22:38:19 -04:00
jean-pierre charras 4426d4c539 Pcbnew: bug fix: sometimes (depending on a previous command) pcbnew could create an usual zone instead of a keepout zone when the" create keepout zone" tool is activated 2014-03-31 20:14:01 +02:00
jean-pierre charras 4e18b14f14 Finishing dialog_freeroute_exchange.cpp changes to run freeroute.jar if found in kicad binaries.
Very minor other fix
2014-03-29 21:00:14 +01:00
Lorenzo Marcantonio 121494d3d9 Removed relic empty if 2014-03-29 18:34:13 +01:00
Lorenzo Marcantonio 6d0c5555ea Indentation was completely broken (editor tabbing issue, maybe?) 2014-03-29 12:22:20 +01:00
jean-pierre charras beb33c7522 Eeschema: fix Bug #1298868 (Can't create new schematic from main toolbar icon) - Fix a bug I created in rev 4773 2014-03-28 14:23:26 +01:00
jean-pierre charras 36e62b1047 Eeschema: fix Bug #1298868 (Can't create new schematic from main toolbar icon) 2014-03-28 14:08:48 +01:00
cdelbegu 44e1f4fa2d Pcbnew - GAL: fix bug #1296811 (The grid can't be enable/disable via the layer manager) 2014-03-28 14:06:30 +01:00
Jean-Samuel Reynaud 47b5bdcd47 Fix a mismatch between method signature in scripting/python_scripting.cpp and scripting/python_scripting.h 2014-03-28 07:27:58 -05:00
jean-pierre charras 0449258761 Fix (temporary fix) a bug I created in dialog_freeroute_exchange.cpp in bzr rev 4769 2014-03-27 19:28:10 +01:00
jean-pierre charras 34c593916c Pcbnew: Fix bug #1296649 (Text on flipped modules incorrectly placed).
Dialog Freeroute: if freeroute.jar is find in kicad binaries, it is run as a standard java application, not as web applcation
Very minor other fixes
FPC_(SMD_type)_footprintwizard.py wizard finished.
2014-03-27 18:45:05 +01:00
Maciej Suminski 39bca76df7 >Added handled hotkeys:
- resetting relative coordinates
- switching units
- not official: changing transparency for layers (works only for main layers, does not work on vias/pads/etc.)
2014-03-24 18:28:21 +01:00
Maciej Suminski 60e9546b62 PCB_EDIT_FRAME::SetHighContrastLayer() went public.
Refactored code that handled zooming events.
Added PCB_RENDER_SETTINGS::Get/SetSketchMode().
PCBNEW_CONTROL reacts to hot keys changing display modes (sketch via/tracks, high contrast).
2014-03-24 17:20:23 +01:00
Maciej Suminski dc9298730d Added PCBNEW_CONTROLS for handling miscellaneous hot keys (trying to be compatible with the default hot key settings). Currently there are a lot of stubs to be filled out (in pcbnew_controls.cpp).
Handled actions:
- switching layers
- switching grids
- changing track width & via size
2014-03-24 08:45:05 +01:00
jean-pierre charras f1ee6de025 Eeschema: does not close when the schematic file given in command line to run Eeschema is not found (i.e. when starting a new project). Otherwise one cannot start a new schematic project. 2014-03-23 07:44:15 +01:00
Marco Serantoni 2db6c2c929 [MacOSX] forgot pl_editor, thanks Jean-Paul for pointing it 2014-03-23 02:50:33 +01:00
Marco Serantoni 1c232f5608 [MacOSX] Support for kiface in bundles, workaround for some cairo issues 2014-03-22 12:35:33 +01:00
jean-pierre charras 262ec8920a Minor fixes for Windows: move resources from dso to .exe, to have the application icon in executable, and therefore shown in shortcuts.
pcb_calculator: minor coding style fix.
2014-03-22 09:28:39 +01:00
Maciej Suminski 3a43f0527f Changed void BASE_SCREEN::GetGrids( GRIDS& aList ) to const GRIDS& BASE_SCREEN::GetGrids().
Refactored:
- EDA_DRAW_FRAME::SetNextGrid() & SetPrevGrid()
- PCB_BASE_FRAME::SetFastGrid1() & SetFastGrid2()
Removed a warning from RN_DATA::updateNet(int).
2014-03-21 18:00:11 +01:00
Dick Hollenbeck 4a39fcdd8f single_top.c logic, improved OpenProjectFiles() documentation. 2014-03-21 11:59:19 -05:00
Maciej Suminski c7116e9d03 FIxed too late deletion of TOOLs. 2014-03-21 17:55:46 +01:00
Dick Hollenbeck 8fc1e38271 Enable GITHUB as default, include typeinfo into kiway_holder.cpp 2014-03-21 07:20:54 -05:00
jean-pierre charras ab30fba0ab CvPcb: Fix crashes when starting cvPcb (could be Windows Specific) and after closing the footprint viewer. 2014-03-21 12:50:04 +01:00
Maciej Suminski 87c9423f0f PCB_EDIT_FRAME::SetActiveLayer() & GetActiveLayer() made public. 2014-03-21 11:17:47 +01:00
Maciej Suminski 0694f2fa1c TOOL_EVENTs autoregister themselves in ACTION_MANAGER.
ROUTER_TOOL events have temporarily changed their hotkeys assignment.
2014-03-21 10:40:50 +01:00
Dick Hollenbeck a7f1939203 simplify and fix the technique used to get the project fp-lib-table 2014-03-20 20:24:35 -05:00
Wayne Stambaugh 34dda6a1b0 Fix windows build error for missing path separator definitions.
* Use wxFileName::GetPathSeparator() instead of redefining them.
2014-03-20 14:07:19 -04:00
Dick Hollenbeck 223419a8f6 documentation clarity 2014-03-20 11:32:34 -05:00
Dick Hollenbeck 141f3fed45 some doxygen fixes, comment fixes 2014-03-20 09:18:32 -05:00
Maciej Suminski 426844896e Minor fixes (check for net codes size for ratsnest, cursor coordinates are not always shown as if the cursor was snapped). 2014-03-20 11:31:32 +01:00
Maciej Suminski dbc4a8f292 GAL zooms in and out using the default hot keys (F1/F2).
Screen size is saved in VECTOR2I instead of VECTOR2D.
2014-03-20 08:47:31 +01:00
Dick Hollenbeck 95aa19198c * KIWAY Milestone A): Make major modules into DLL/DSOs.
!   The initial testing of this commit should be done using a Debug build so that
    all the wxASSERT()s are enabled.  Also, be sure and keep enabled the
    USE_KIWAY_DLLs option.  The tree won't likely build without it.  Turning it
    off is senseless anyways.  If you want stable code, go back to a prior version,
    the one tagged with "stable".

*   Relocate all functionality out of the wxApp derivative into more finely
    targeted purposes:
    a) DLL/DSO specific
    b) PROJECT specific
    c) EXE or process specific
    d) configuration file specific data
    e) configuration file manipulations functions.

    All of this functionality was blended into an extremely large wxApp derivative
    and that was incompatible with the desire to support multiple concurrently
    loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
    An amazing amount of organization come from simply sorting each bit of
    functionality into the proper box.

*   Switch to wxConfigBase from wxConfig everywhere except instantiation.
*   Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
    PGM_SINGLE_TOP,
*   Remove "Return" prefix on many function names.
*   Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
*   Fix building boost for use in a DSO on linux.
*   Remove some of the assumptions in the CMakeLists.txt files that windows had
    to be the host platform when building windows binaries.
*   Reduce the number of wxStrings being constructed at program load time via
    static construction.
*   Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
    these functions are useful even when the wxConfigBase comes from another
    source, as is the case in the KICAD_MANAGER_FRAME.
*   Move the setting of the KIPRJMOD environment variable into class PROJECT,
    so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
*   Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
    its child wxFrames and wxDialogs now have a Kiway() member function which
    returns a KIWAY& that that window tree branch is in support of.  This is like
    wxWindows DNA in that child windows get this member with proper value at time
    of construction.
*   Anticipate some of the needs for milestones B) and C) and make code
    adjustments now in an effort to reduce work in those milestones.
*   No testing has been done for python scripting, since milestone C) has that
    being largely reworked and re-thought-out.
2014-03-20 01:47:30 -05:00
Dick Hollenbeck 6bfff89fe5 merge tip in, resolve. 2014-03-20 01:24:33 -05:00
Dick Hollenbeck 2c67c3ff80 * KIWAY Milestone A): Make major modules into DLL/DSOs.
!   The initial testing of this commit should be done using a Debug build so that
    all the wxASSERT()s are enabled.  Also, be sure and keep enabled the
    USE_KIWAY_DLLs option.  The tree won't likely build without it.  Turning it
    off is senseless anyways.  If you want stable code, go back to a prior version,
    the one tagged with "stable".

*   Relocate all functionality out of the wxApp derivative into more finely
    targeted purposes:
    a) DLL/DSO specific
    b) PROJECT specific
    c) EXE or process specific
    d) configuration file specific data
    e) configuration file manipulations functions.

    All of this functionality was blended into an extremely large wxApp derivative
    and that was incompatible with the desire to support multiple concurrently
    loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
    An amazing amount of organization come from simply sorting each bit of
    functionality into the proper box.

*   Switch to wxConfigBase from wxConfig everywhere except instantiation.
*   Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
    PGM_SINGLE_TOP,
*   Remove "Return" prefix on many function names.
*   Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
*   Fix building boost for use in a DSO on linux.
*   Remove some of the assumptions in the CMakeLists.txt files that windows had
    to be the host platform when building windows binaries.
*   Reduce the number of wxStrings being constructed at program load time via
    static construction.
*   Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
    these functions are useful even when the wxConfigBase comes from another
    source, as is the case in the KICAD_MANAGER_FRAME.
*   Move the setting of the KIPRJMOD environment variable into class PROJECT,
    so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
*   Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
    its child wxFrames and wxDialogs now have a Kiway() member function which
    returns a KIWAY& that that window tree branch is in support of.  This is like
    wxWindows DNA in that child windows get this member with proper value at time
    of construction.
*   Anticipate some of the needs for milestones B) and C) and make code
    adjustments now in an effort to reduce work in those milestones.
*   No testing has been done for python scripting, since milestone C) has that
    being largely reworked and re-thought-out.
2014-03-19 19:42:08 -05:00
maciej. 898ed7445f GAL: fix zooming using mouse wheel with wxWidgets 3.0. 2014-03-19 21:07:49 +01:00
jean-pierre charras 0f09c15f11 Pad editor dialog: Better tests and error messages about issues in pad settings. Fis also an other hard to translate error messge. 2014-03-19 21:06:09 +01:00
Maciej Suminski 093e311a8d Fixed a few ratsnest glitches in GAL. 2014-03-19 15:33:13 +01:00
Maciej Suminski bf418eb1ee Cursor coordinates are updated in GAL canvases. 2014-03-19 14:26:02 +01:00
Maciej Suminski 2d8dc04693 Fixed undo for MARKER_PCBs. 2014-03-19 13:46:52 +01:00
Maciej Suminski ef1ed9646a DRC markers are drawn in GAL canvases. 2014-03-19 13:42:46 +01:00
Maciej Suminski e1ce30d89d Fixed mouse wheel handling for GAL canvases with wx3.0. 2014-03-19 11:57:59 +01:00
Maciej Suminski 696a8a89fe Changed cast from float to double in RN_POLY::HitTest. 2014-03-19 11:16:01 +01:00
jean-pierre charras 152c97a34f kicad-install.sh: fix bad url for legacy libraries. Add the same script hich does not need a bazaar account to download Kicad (using https instead of ssh to create branches) 2014-03-18 19:52:29 +01:00
Maciej Suminski c11b0bc8a6 Break points for zones are not added in the same place as existing points. 2014-03-18 17:02:10 +01:00
Maciej Suminski e6a7ff3c34 Isolated EDIT_CONSTRAINTs to different .cpp/.h files. 2014-03-18 16:55:06 +01:00
Maciej Suminski 6a1d344541 Instant dragging (without prior selection). 2014-03-18 16:25:46 +01:00
Maciej Suminski 9783aaf3e6 Splitting DRAWSEGMENTs with POINT_EDITOR. 2014-03-18 15:46:38 +01:00
Maciej Suminski 17ec7ace4c Breaking outlines for zones using POINT_EDITOR. 2014-03-18 14:52:22 +01:00
Maciej Suminski dbcc18ab31 Enabled autopanning while drawing zones. 2014-03-18 14:01:09 +01:00
Maciej Suminski 342fd6e19e EC_CONVERGING handles colinear lines properly. 2014-03-18 13:57:10 +01:00
Maciej Suminski 4d6f628a1f Minor fixes to zone drawing tool. 2014-03-18 11:33:49 +01:00
jean-pierre charras 89be32714b 3D viewer: fix 3D grid artifact ( bug 1293873 ) 2014-03-18 11:31:13 +01:00
Maciej Suminski 1ff99b47c8 Fixed triple click bug while drawing zones with DRAWING_TOOL. 2014-03-18 11:09:43 +01:00
Maciej Suminski 48161dcc4a Yet another approach to EC_LINE and EC_CONVERGING edit constraints. 2014-03-18 11:05:24 +01:00
Maciej Suminski f6959c039c Comments. 2014-03-18 11:04:52 +01:00
unknown b436924380 Warning removal, patches from Camille 019 2014-03-16 18:40:23 +01:00
jean-pierre charras 91c53a947a bitmap2component: add management of image resolution: Is read from file, when exists, and can be modified in bitmap2component.
It also fix issue #747631
2014-03-16 15:10:42 +01:00
Orson 59a0ced0a6 Corrected the error message about required OpenGL version for GAL. Fixed pcb_calculator .desktop file. 2014-03-14 21:32:25 +01:00
Maciej Suminski 40ee66f8c5 ZONE_CONTAINERs are drawn as outlines while being edited using the POINT_EDITOR. 2014-03-14 16:05:30 +01:00
Maciej Suminski 19a87ac780 Added EC_CONVERGING for zone areas modification. 2014-03-14 15:37:55 +01:00
Maciej Suminski d6c1670cd7 Templated EDIT_POINT_CONSTRAINT.
Removed EDIT_CONSTRAINT::Update() - replaced with resetting constraints.
EDIT_CONSTRAINT is stored in EDIT_POIN using boost::shared_ptr instead of pointer.
Added EDIT_LINE::GetEnd() & GetOrigin(). Overridden ApplyConstraint() for EDIT_LINE.
Side EDIT_POINTS for zones are drawn as circles.
2014-03-14 15:15:38 +01:00
jean-pierre charras ab27f56cc7 Doc update 2014-03-14 08:37:04 +01:00
Marco Serantoni bc707ced58 [MacOSX] Pcbnew crash on editing dimension's line width 2014-03-14 02:10:27 +01:00
Marco Serantoni dcea11e5cb [MacOSX] New OSX build enviroment now supported 2014-03-14 02:07:44 +01:00
Marco Serantoni ec5a767542 [MacOSX] New OSX enviroment seems to be more picky about options, this fixes the linker part 2014-03-14 00:44:46 +01:00
Maciej Suminski e76c330aaf Fixes build error with the choosy CLANG (Thanks to Maciej Suminski) 2014-03-13 18:50:52 +01:00
Maciej Suminski 85e8b8bd87 Yet another approach to 45 degree constraints. 2014-03-13 11:48:19 +01:00
jean-pierre charras d00fae588a Footprint Editor: fix a crash when the dialog to set pad properties is called from the main toolbar (i.e. to define the default setting for new pads, and not to edit an existing pad) 2014-03-13 08:15:19 +01:00
Maciej Suminski 527011208c Pcbnew: GAL canvas selection tool bug fixes.
* Fix Python scripting error causing pcbnew_wrap.cxx to fail to build.
* Fix OpenGL canvas ratsnest missing connections in copper zones.
2014-03-12 20:55:59 -04:00
Maciej Suminski 52791f2375 Changed cast from float to double in RN_POLY::HitTest. 2014-03-12 22:42:08 +01:00
Maciej Suminski f9d5f584cb Fixed 45 degree mode toggle. 2014-03-12 17:50:24 +01:00
Maciej Suminski a377c9c1bc Fixed erroneous hit testing for polygons in ratsnest for GAL. 2014-03-12 17:11:52 +01:00
Maciej Suminski afc56d3f6f Moved panning boundaries and scale limits from VIEW to VIEW_CONTROL. 2014-03-12 17:09:53 +01:00
Maciej Suminski c7fa57faf6 Changed the way of handling BOX2 traits (used std::numeric_limits). 2014-03-12 17:09:37 +01:00
Maciej Suminski 1e04f3b948 Removed excessive variable (m_Corners) from MARKER_BASE. 2014-03-12 15:53:20 +01:00
Maciej Suminski c7e3887ba4 Fixed erroneous hit testing for polygons in ratsnest for GAL. 2014-03-12 15:00:14 +01:00
Maciej Suminski 55f9aaabd7 Workarounded SWIG problems (does not support nested C++ classes, more on the subject: http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_nested_classes). 2014-03-12 14:58:49 +01:00
Maciej Suminski e5b0c720ed Switched order of EDIT_POINTs for DIMENSION, so in case when feature lines are of 0 length, then still can be stretched. 2014-03-12 10:53:42 +01:00
Maciej Suminski e6571f6862 Added new constraint for EDIT_POINTs (EPC_LINE).
Dimensions have EDIT_POINTs.
Different handling of 45 degree mode in POINT_EDITOR.
2014-03-12 10:46:11 +01:00
Maciej Suminski 66fcb84f92 Minor fix to SEG class. 2014-03-12 10:05:09 +01:00
Maciej Suminski f0251ebdb6 Merge selection tool branch. 2014-03-11 20:45:01 -04:00
Maciej Suminski d2ed2efc85 Workarounded SWIG problems (does not support nested C++ classes, more on the subject: http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_nested_classes). 2014-03-11 14:50:53 +01:00
Maciej Suminski 54bf21768c Added a few settings to make the layer settings more similar to KiCad defaults (moved vias to VIA_THROUGH_VISIBLE, added a few rules for required layers). 2014-03-11 10:58:58 +01:00
Marco Serantoni 5feddb8cac [MacOSX] fixes some interations with KicadOSXBuilder 2014-03-10 23:37:59 +01:00
Maciej Suminski 5ac6579a87 Cursor snaps to EDIT_POINTs.
Added POINT_EDITOR::isModified().
2014-03-10 16:25:40 +01:00
Maciej Suminski ecb3aebce3 Fixed a bug caused by removed VIEW_ITEMs that were marked for updating. 2014-03-10 16:01:15 +01:00
Maciej Suminski c4dbdbf9d3 Removed unnecessary casting. 2014-03-10 10:18:48 +01:00
jean-pierre charras 4fd3dbb5a5 Finishing work on a better 3D viewer. this also fix bugs like Bug #1129630 . 2014-03-09 19:43:53 +01:00
jean-pierre charras f24bc87a84 Pcbnew: fix Bug #1289416 (Broken setting of layer list in D_PAD:: ViewGetLayers() for GAL). 2014-03-08 20:07:35 +01:00
jean-pierre charras 63401f3d95 Rework on 3D viewer (work in progress): Disable or enable layers, grid or 3D footprint shapes should be now faster. 2014-03-08 20:04:23 +01:00
Wayne Stambaugh c89d52ee1a Pcbnew: make block rotate honor the rotation angle setting. (fixes lp:1281605)
* Make block rotate command honor the rotation angle setting.  Thank you
  Umesh Mohan <mohan.umesh@gmail.com> for the patch.
* Change block rotate undo command from UR_ROTATE to UR_CHANGED so consecutive
  rotations do not lead to round errors and for proper undo in case the user
  changes the rotation angle setting between block rotations.
2014-03-07 17:34:54 -05:00
Brian Sidebotham 8145a8c067 Changes 2014-03-07 17:52:43 +00:00
Maciej Suminski 3927c667cc Added documentation. Moved some functions from .h to .cpp files. 2014-03-07 10:26:33 +01:00
Cirilo Bernardo 04f8d12ae5 KiCad: improve gerber file extension wildcard so gerbers show up correctly in the file tree pane. 2014-03-06 16:44:48 -05:00
Wayne Stambaugh 339dd0daf2 Coding policy fixes. 2014-03-06 13:38:39 -05:00
Maciej Suminski 88a0311afe Added EDIT_LINEs for dragging zone outlines. 2014-03-06 17:34:04 +01:00
Maciej Suminski 8c43c216bb 45 degrees mode for POINT_EDITOR. 2014-03-06 14:41:25 +01:00
Maciej Suminski 2889a7a13a Undo/redo support for POINT_EDITOR. 2014-03-06 12:36:20 +01: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
Maciej Suminski 5ed0980dd5 Merged upstream. 2014-03-06 09:42:16 +01:00
Maciej Suminski 3cb168be5a Removed warnings. 2014-03-06 09:14:06 +01:00
jean-pierre charras a1b065c190 Fix a minor bug I created in commit 4733 2014-03-05 18:57:13 +01:00
jean-pierre charras 764b5c11bf Minor code cleanup in 3d viewer (remove dead or useless code). Some minor other fixes. 2014-03-05 18:40:23 +01:00
Maciej Suminski b8e3ff8ca3 Fixed undo while PNS is active. 2014-03-05 16:44:08 +01:00
Maciej Suminski c557e52dab Squashed memory leaks. 2014-03-05 14:57:14 +01:00
Maciej Suminski 505b38416d Removed a few memory leaks. 2014-03-03 17:15:41 +01:00
Martin Janitschke b33fa0cc13 Pcbnew: add option to merge non-plated through holes to drill file. (fixes lp:1133330) 2014-03-03 09:28:05 -05:00
Maciej Suminski 36813fe8ab Pcbnew: fixed SIGFPE arithetic exception. (fixes lp:128339, 1285969, and 1286426) 2014-03-02 20:18:26 -05:00
Martin Janitschke 7c3918da2a Pcbnew: fix global deletion bug and minor dialog changes. (fixes lp:1263795)
* Handle different item global deletions correctly.  No more removing of text
  if graphics is selected.
* Layer settings are always obeyed for modules, zones, text, and graphics.
* Text will be removed from copper layers if all layers are selected or
  according to the current layer.
* Added check boxes for "normal" and "locked" footprints to be consistent
  with the naming for the track deletion options.
2014-03-01 12:20:22 -05:00
jean-pierre charras 47e5026cfe 3D viewer: fix mirroring issue for texts in flipped footprints. 2014-02-28 18:46:18 +01:00
Fabrizio Tappero 9c71f62e1c Commit patch about cvpcb, pcbnew and layout editor menu items, with 3 menu labels modified in Eeschema. 2014-02-28 18:31:00 +01:00
Maciej Suminski 24c9b705a3 Zones are supported by POINT_EDITOR. 2014-02-28 18:24:29 +01:00
Maciej Suminski d1ffaf0deb Circles are supported by POINT_EDITOR. 2014-02-28 18:24:13 +01:00
Maciej Suminski 3c656691cf Fixed POINT_EDITOR crash on GAL change / board reload. 2014-02-28 17:20:10 +01:00
Maciej Suminski f87f12e222 Added TOOL_ACTION for updating EDIT_POINTS.
EDIT_POINTs show up when there is only one item selected (now after deselection as well).
2014-02-28 16:53:28 +01:00
Maciej Suminski c5c83bd271 Added TOOL_MANAGER & ACTION_MANAGER::RunAction( const TOOL_ACTION aAction ).
Selection clearing is invoked using TOOL_ACTION object rather than its name.
2014-02-28 15:46:05 +01:00
jean-pierre charras 4a461cd09b 3D viewer: shows now the texts of footprints (ref, value and others) when visible.
Fix also other very minor issues.
Realistic mode shows or not the copper thickness (depending on selected option in preferences) to speed up the screen redraw.
2014-02-28 11:51:47 +01:00
Maciej Suminski 41397f5b5b Fixes ratsnest crashing on zones with negative net codes. 2014-02-28 11:12:55 +01:00
Marco Serantoni 9413b30567 Fix for bug #1285878, build fails with clean repository and high parallelism due missing dependance between router and pcbcommon 2014-02-27 23:56:16 +01:00
jean-pierre charras 2c69b7f512 Fix Bug #1275544 (Page size dialog: page size drop-down doesn't handle mouse-click event) 2014-02-27 20:53:04 +01:00
Martin Janitschke 29e7638a3c make microwave toolbar accessible from menu (Bug #1285425 ) 2014-02-27 19:48:18 +01:00
Maciej Suminski 94cfed4b9e Initial version of POINT_EDITOR. 2014-02-27 17:29:08 +01:00
Maciej Suminski 235da6084b SELECTION_TOOL emits event notifying about selecting/deselecting/clearing selection. 2014-02-27 17:27:58 +01:00
Maciej Suminski e6598e9d41 Added VIEW::ToWorld( double ).
TOOL_EVENT message is supposed to contain string as parameter.
Added missing header for class_drawsegment.h (KiROUND).
Renamed SELECTION_TOOL::containsSelected() to SELECTION_TOOL::selectionContains().
2014-02-27 16:13:27 +01:00
jean-pierre charras 031202a837 Fix wx28 compatibility issue. 2014-02-27 09:05:28 +01:00
Marco Serantoni fb6099abd9 [MacOSX] Fixing some refresh issues when changing component on cvpcb 2014-02-27 01:57:18 +01:00
Marco Serantoni e009721982 [MacOSX] Avoid race between cmake -E copy_directory, which triggers a build error when using an high parallelism 2014-02-26 21:46:25 +01:00
jean-pierre charras fbecc0d9ce * fp_lib_table.cpp: fix an issue on Windows in ConvertFromLegacy: sometimes, because the comparison was case sensitive, lib nicknames were not found, although libs exist ( for instance if a path was given like f:\mypath instead of F:\mypath)
* getpart.cpp: fix a potential bug on a translatable string with has requirements in spelling.
* fix bug  #1066179
* kicad: fix erroneous labels in sub menus.
2014-02-26 15:06:24 +01:00
Maciej Suminski a42a83a394 Minor changes to BRIGHT_BOX class. 2014-02-25 18:08:33 +01:00
Maciej Suminski c5a3c1082a Removed a few RecacheAllItems() calls, some of them changed to specific type recaching (using TYPE_COLLECTOR & VIEW_ITEM::ViewUpdate() ).
Removed OPENGL_GAL::SetStrokeColor().
2014-02-25 14:28:09 +01:00
Maciej Suminski f7d00a393b Renamed BOARD_CONNECTED_ITEM::GetNet() -> GetNetCode()
Renamed BOARD_CONNECTED_ITEM::SetNet() -> SetNetCode()
Added BOARD_CONNECTED_ITEM::GetNet() for accessing NETINFO_ITEM* of a given item.
Fixed module editor crash when launched to edit a module from a PCB.
Replaced some BOARD::FindNet( item->GetNet() ) calls with BOARD_CONNECTED_ITEM::GetNet().
2014-02-25 11:47:27 +01:00
Maciej Suminski 75026d8754 Renamed BOARD_CONNECTED_ITEM::GetNet() -> GetNetCode()
Renamed BOARD_CONNECTED_ITEM::SetNet() -> SetNetCode()
Added BOARD_CONNECTED_ITEM::GetNet() for accessing NETINFO_ITEM* of a given item.
Fixed module editor crash when launched to edit a module from a PCB.
Replaced some BOARD::FindNet( item->GetNet() ) calls with BOARD_CONNECTED_ITEM::GetNet().
2014-02-25 11:40:34 +01:00
jean-pierre charras 19e4cb409b Viewlib: ensure in wxListBoxes the lib and the component are always shown as selected when a lib and component are specified (when called by the get component dialog for instance) 2014-02-24 20:07:24 +01:00
Maciej Suminski d583280bb0 Minor code cleaning and optimizations. 2014-02-24 14:31:55 +01:00
Maciej Suminski de637d2b8d Fixed a missing group clearing and update for restored VIEW_ITEMs.Fixed a missing group clearing and update for restored VIEW_ITEMs. 2014-02-24 12:56:47 +01:00
HennerZeller 992cc5f166 Eeschema: * Preselect the currently chosen component in the browser when pressing the thumbnail view.
* Various smallish documentation updates in the component chooser area.
2014-02-24 11:52:08 +01:00
Maciej Suminski 1c253bfba0 Some variables initialized to NULL. 2014-02-24 11:17:49 +01:00
Henner Zeller c7e794dcaf Eeschema: component selection dialog improvements.
* Pressing 'Enter' while the focus is in the tree did not work due to the
  double-click wxWidgets workaround.  Make it work.
* More clearly document what is happening and how it can be tested.
2014-02-23 20:27:07 -05:00
Nick Ostergaard bcf970e6b2 Remove duplicate comments from CMakeList.txt. 2014-02-23 20:02:41 -05:00
Martin Janitschke c436f453ac Fix 3D viewer crash bug. (fixes lp:673603 and lp:804778) 2014-02-23 19:53:55 -05:00
Henner Zeller df8b7c53fb Eeschema: fix build error when using wxWidgets 2.8 and other minor fixes.
* Fix string concatenation for _( "Unit" ) + wxT( " " ). This failed
  compiling against wxWidgets 2.8 (thanks Cirilo Bernardo ).
* Base the indentation on a measured observation with explanation
  (98%-ile of name-length found in library). The previously chosen 24
  character indentation was too wide for most.
* Don't use a #define spilling into the global namespace, but use
  a locally defined constant for COLUMN_DESCR_POS.
2014-02-23 09:15:01 -05:00
Blair Bonnett 64da190e37 Build documentation updates and comment spelling fixes. 2014-02-22 18:17:36 -05:00
jean-pierre charras c5a2028ae3 Eeschema: Remove usage of tabs in dialog_choose_component.cpp strings, because it does not work very well on Linux, and does not work on Windows.
This is replaced by the right number of space, using a fixed font (like in CvPcb)
Fix mismatch between icons and the actual rotation of components (CW instead of CCW) (bug 1022154 )
2014-02-22 18:50:20 +01:00
jean-pierre charras b4d1813d86 Eeschema: Remove usage of tabs in dialog_choose_component.cpp strings, because they do not work very well on Linux, and do not work on Windows.
Fix incorrect rotation of components (CCW instaed of CW)
2014-02-22 13:39:59 +01:00
Marco Serantoni d475c544c8 [MacOSX] Fixing resize issue in layer setup dialog 2014-02-21 17:38:29 +01:00
Maciej Suminski 5ac699776d Revisiting GAL:
- VIEW_ITEM::ViewUpdate() does not update items immediately. Now it marks them to be updated and the real update occurs on the next rendering frame.
- VIEW::InvalidateItem() made private.
- VIEW_LAYER::enabled -> visible
- Some functions moved to header files.
2014-02-21 16:57:18 +01:00
Maciej Suminski 151826b206 Upstream merge. 2014-02-21 11:05:28 +01:00
Maciej Suminski 8a8e5d8d14 Quick fix for unsupported pad types in PNS router. 2014-02-21 09:53:10 +01:00
Fabrizio Tappero 28e6356250 Patch from Fabrizio Tappero: better kicad and eeschema menu entries and labels, which minor fixes. 2014-02-21 08:54:13 +01:00
Wayne Stambaugh b26d1b614e Eeschema: minor component selection dialog improvements.
* Manually change fbp file minor version number so dialog could be edited
  with latest release version of wxFormBuilder.
* Give component view panel more weight for improved component view size.
* Add padding around dialog button sizer.
2014-02-20 19:29:31 -05:00
Wayne Stambaugh 949118a030 Minor coding policy fixes. 2014-02-20 19:06:37 -05:00
Marco Serantoni 932c92af55 [MacOSX] New reorg for building system, typos and path refines 2014-02-19 22:39:21 +01:00
Brian Sidebotham 0c9f1ef3e4 Merge in tip changes 2014-02-19 19:41:29 +00:00
Brian Sidebotham 4a15b358ab Merge in changes 2014-02-19 19:41:13 +00:00
Henner Zeller bd52f00601 Eeschema: component selection dialog improvements.
* Improve component chooser redraw to fit in wxWidgets redraw strategies.
* Use LIB_COMPONENT::Draw and LIB_COMPONENT::GetBoundingBox for drawing the
  component
* Make resize redrawing work properly.
2014-02-19 11:44:48 -05:00
Maciej Suminski 87785441bc Removed some excessive variables. 2014-02-19 15:20:42 +01:00
Maciej Suminski 57c69b41db Continous mode for drawing tools (i.e. they do not finish after adding a single object). 2014-02-19 13:51:32 +01:00
unknown 34ad638924 GLM (tool for opengl) update to 0.9.4.6 2014-02-19 11:51:33 +01:00
Henner Zeller 392e3a0a2b Eeschema component selection dialog improvements.
* Allow to select units in components that have more than one right in the
  component chooser dialog.
* Keep chosen unit in history.
* Show preview of current component unit as thumbnail image next to the
  description box.
* Fixes lp:1280567
2014-02-18 16:41:27 -05:00
Marco Serantoni 7da13137da [MacOSX] Fix for bugs #1258081 and #1267772 2014-02-18 21:30:17 +01:00
jean-pierre charras fd2afec6f5 Remove some fully outdated code (#pragma, from Henner Zeller's report, and some other things) 2014-02-18 12:41:53 +01:00
Marco Serantoni fcd17a59ee [MacOSX] Fix some small issues, this should be the least for scripting 2014-02-17 19:58:03 +01:00
unknown 40b30d43d3 GLM (tool for opengl) update to 0.9.4.6 2014-02-17 19:42:52 +01:00
Maciej Suminski a802ca87e0 Added TOOL_ACTION for PNS router activation.
Most of the GAL tools are activated by corresponding buttons on the right toolbar.
Removed menu entry for PNS router (as it is activated as the usual "Add track" tool).
2014-02-17 18:21:00 +01:00
Maciej Suminski e14d9aaf8f Fixed wrongly formulated assert. 2014-02-17 17:20:44 +01:00
Maciej Suminski 05de84d542 Undo/redo support. 2014-02-17 14:53:01 +01:00
Maciej Suminski 6e52e19367 Small leak fix. 2014-02-17 14:36:51 +01:00
Maciej Suminski f82e07849b Improved way of drawing 45-degree lines. 2014-02-17 11:33:03 +01:00
Maciej Suminski 9b1eb35472 Pcbnew: fix OpenGL PNS router track not shown bug. (fixes lp:1275319) 2014-02-15 18:54:51 -05:00
Marco Serantoni 0e42a2ffd0 [MacOSX] wxPython patch revised for http://trac.wxwidgets.org/ticket/15957 2014-02-15 19:09:14 +01:00
Marco Serantoni fb9e5b94ca [MacOSX] support for plugins in the bundle 2014-02-15 11:01:27 +01:00
Cirilo Bernardo d5064b98a4 Export VRML and IDF maintenance.
Fix minor bug in eeschema (opening a relative path does not work) (patch from HennerZeller).
2014-02-15 08:39:06 +01:00
Brian Sidebotham d5a029ffad * Commit before merge... 2014-02-14 23:45:58 +00:00
Marco Serantoni 1c5a997f82 [MacOSX] Reorg and preparation to include scripts into Bundles 2014-02-14 22:09:48 +01:00
Henner Zeller 60b1671485 Eeschema: Better naming for private struct: public fields uppercase.
* make some more fields 'const' that can.
* Instead of previous/next _visible_ element, Go through
      previous and next element. Otherwise the cursor stops moving
      if the item is only partially visible.
2014-02-14 18:16:59 +01:00
Maciej Suminski c1c8f54e8b Added a few asserts. Made some steps idiotproof. 2014-02-14 15:52:13 +01:00
Maciej Suminski 9d3f7230ee New items are created using pointers (instead of copying automatic variables when drawing is finished). 2014-02-14 15:13:42 +01:00
Maciej Suminski b1fb59ad13 Refactorization: moved drawing 45 degree multiple line to a function. 2014-02-14 14:24:12 +01:00
Maciej Suminski 3ecae4fa52 GAL::GetGridPoint() returns point in world coordinates. 2014-02-14 14:16:08 +01:00
Maciej Suminski a7cb90deb8 Some more minor refactorization. 2014-02-14 11:35:48 +01:00
Maciej Suminski b7d4377621 Refactoring: zones and keepout areas are drawn using the same function. 2014-02-14 10:47:43 +01:00
Maciej Suminski 2b62a85263 Refactoring: made VIEW, VIEW_CONTROLS, BOARD and PCB_EDIT_FRAME fields in DRAWING_TOOL. 2014-02-14 09:49:49 +01:00
Henner Zeller 31fea1e766 PATCH: making component choosing (much!) more usable 2014-02-14 09:07:20 +01:00
Henner Zeller 4340ceeb8b PATCH: making component choosing (much!) more usable 2014-02-14 09:05:04 +01:00
Maciej Suminski 597e98dbf4 Cursor is in world coordinates. 2014-02-13 20:23:28 +01:00
Maciej Suminski f9f0b46b63 Small GAL refactorization, mostly correcting constness. 2014-02-13 19:31:27 +01:00
jean-pierre charras 63eac42d07 Fix a minor error in class D_PAD: void D_PAD::Flip( int Y ) changed to virtual void D_PAD::Flip( const wxPoint& aCentre ) (as defined in BOARD_ITEM)
Scripting: fix compatibility current pcbnew version in 2 examples and the default extension of board files  in board.i (was .kicad_brd, now is .kicad_pcb)
2014-02-13 18:27:48 +01:00
Maciej Suminski 3106d25361 Added keepout areas drawing tool. 2014-02-13 16:24:33 +01:00
Maciej Suminski fce753ba24 Added zone drawing tool. 2014-02-13 16:10:32 +01:00
Maciej Suminski 042b6a1002 Changed PCB_EDIT_FRAME::setTopLayer() to PCB_EDIT_FRAME::SetTopLayer() and changed to public (as it had exactly the same functionality). 2014-02-13 15:57:57 +01:00
Maciej Suminski 45c5a3de7f Placing modules with a minor bug. 2014-02-13 12:46:39 +01:00
Miguel Angel Ajo 3329ed26f3 switching to the new python scripting console icon 2014-02-12 22:19:12 +01:00
Miguel Angel Ajo 4da4a558a9 Enforces python2.6 / 2.7, thanks to orsonmmz 2014-02-12 22:17:19 +01:00
Maciej Suminski ba1867fe0e Merged fix from the selection_tool branch. 2014-02-12 18:04:27 +01:00
Maciej Suminski ec763dfede NETINFO_ITEM for orphaned items now have empty netname and net code = 0 (to avoid problems).
Fixed case for the footprint legacy plugin when added module's do not have set parent (BOARD).
Added copyright notice for pcbnew/class_netinfolist.cpp (feel free to correct, it is just copied from corresponding header file).
2014-02-12 18:01:03 +01:00
Fabrizio Tappero b4f6cc45f2 Some icons update 2014-02-12 14:56:52 +01:00
jean-pierre charras 29a1bdb32a Fix issues in print mirror. (include some changes coming from Cirilo Berdarno's patch)
gr_basic.cpp: rewrite the function which draws the outlines of a thick segment.
2014-02-12 11:03:34 +01:00
Nick Østergaard f214a57629 Fix wrong numbering in the QFP footprint wizard python script 2014-02-12 08:59:56 +01:00
Fabrizio Tappero b954478621 Update icon_bitmap2component. 2014-02-12 08:53:55 +01:00
Marco Serantoni 73898d5954 [MacOSX] Refines in building system, now bundles lib migration supports symbolic links 2014-02-12 00:13:14 +01:00
Henner Zeller 3132c70e54 * Apply Henner Zeller's patch to add connecting line from reference and labels to component position whilst moving to help identify which component the reference or label belongs too 2014-02-11 21:54:30 +00:00
Fabrizio Tappero 7061d6c2a5 Icon update, and an other very minor fix. 2014-02-11 19:32:09 +01:00
Maciej Suminski 87d3458ea9 Added PCB_TARGET placing tool. 2014-02-11 17:15:33 +01:00
Maciej Suminski e43b5f7c0f Small fix for crippled polylines containing 0 points. 2014-02-11 15:01:49 +01:00
Maciej Suminski c09e8ade2a Fixed ratsnest related segfaults on BOARD destruction. 2014-02-11 14:39:14 +01:00
Maciej Suminski ae5fa23285 Added DIMENSION drawing tool. 2014-02-11 14:38:44 +01:00
Maciej Suminski e6a01e5a41 Fixed ratsnest related segfaults on BOARD destruction. 2014-02-11 14:26:33 +01:00
Maciej Suminski 46db6ac182 Removed redundant fields DIMENSION::m_arrowD1O, m_arrowD2O, m_arrowG1O, m_arrowG2O (==m_crossBarO/F).
Added DIMENSION::SetOrigin(), DIMENSION::SetEnd(), DIMENSION::GetOrigin(), DIMENSION::GetEnd(), DIMENSION::GetHeight().
Fixed flipping for DIMENSION class.
Added an information that helps to understand roles of the points in the DIMENSION class.
Some minor changes to PCB_PAINTER (mainly using const COLOR4D& for taking the result of GetColor() function).
2014-02-11 13:22:30 +01:00
Lorenzo Marcantonio 29dcb49c62 - Do not autonumber NPTH pads on add in module editor (keep the number blank)
Factored out the next-pad-number function
2014-02-10 18:19:15 +01:00
Maciej Suminski 2aef11a5fc Made rotate & flip tool actions generic.
Drawing tool reacts to rotate & flip events while placing a text.
2014-02-10 17:08:55 +01:00
Maciej Suminski 4b27778451 Basic text placing tool. 2014-02-10 15:40:25 +01:00
jean-pierre charras 8c5292207f Use environment KISYS3DMOD to know the default path for 3D shapes in footprint editors dialogs, and build short 3D file names.
This value is now shown in these dialogs.
2014-02-10 11:01:11 +01:00
Maciej Suminski 02316e02c3 Drawing arcs - version 1 2014-02-10 10:58:58 +01:00
jean-pierre charras 81c84fcac5 fix linux compil. 2014-02-10 10:58:17 +01:00
jean-pierre charras c935624779 Use environment KISYS3DMOD to know defaut path for 3D shapes in footprint editors dialogs. 2014-02-10 10:30:08 +01:00
Miguel Angel Ajo 26ca1ad03d Fix py26 testing for OSX, assertIsNotNone unavailable for py26 2014-02-10 10:15:48 +01:00
jean-pierre charras 788b38c09b Cosmetic enhancement: better icon for bitmap2component. 2014-02-09 21:06:05 +01:00
Miguel Angel Ajo bbcd2c61d6 BOARD saving test 2014-02-09 00:21:47 +01:00
Marco Serantoni 9263a4e798 [MacOSX] Setting Set3DShapesPath 2014-02-08 18:33:21 +01:00
Marco Serantoni 2acaa2871d [MacOSX] Fixing build system, sorry guys, refining build system and make building smoother. 2014-02-08 16:15:06 +01:00
jean-pierre charras e7d2b9b456 Add the environment variable KYSYS3DMOD to define a default path for 3D models.
If it is not defined by user, it is set to a legacy 3D files path.
The default value needs to be fixed on MACOSX.
This change could be better, but it is compatible with environment variables and the old way ( defined search paths) to find 3D shape files.
3D shapes files names can  also include an environment variable definition, like libraries names.
However using KYSYS3DMOD in these names is not required.
If the 3D filename is a legacy name, KYSYS3DMOD is automatically used as default path.
2014-02-08 12:54:24 +01:00
jean-pierre charras fff54d759e Add the environment variable KYSYS3DMOD to define a default path for 3D models. 2014-02-08 11:44:55 +01:00
jean-pierre charras 6a9771f24b main CMakeLists: build lib-wxpython only if KICAD_SCRIPTING_WXPYTHON is ON 2014-02-08 08:42:41 +01:00
Miguel Angel Ajo 8df3326df1 More BOARD unit tests 2014-02-08 01:02:29 +01:00
Marco Serantoni a2483d48f3 [MacOSX] Fixing qa, thanks Miguel Angel for the feedback 2014-02-08 00:40:11 +01:00
Marco Serantoni bbff6c0d30 [MacOSX] Adding patches for wxPython && http://trac.wxwidgets.org/ticket/15957 2014-02-07 23:00:19 +01:00
Maciej Suminski 222017758c Moved PCB_VISIBLE size check to .cpp. 2014-02-07 20:54:58 +01:00
Maciej Suminski 9ef713dfa8 Right click on an item when there is nothing selected - enables the context menu. 2014-02-07 20:44:34 +01:00
jean-pierre charras d6f348f41e Remove duplicate icon apply.svg (use ckecked_ok.svg instead which is the same icon).
Add a workaround to fix a new bug in wxWidgets 3.0 ( Windows specific ) which shows icons only with a size = 16x16 in menus which have attribute wxITEM_CHECK
2014-02-07 20:32:08 +01:00
Marco Serantoni c441c287b0 [MacOSX] Fixing minor issue for wxPython 2014-02-07 20:19:53 +01:00
Maciej Suminski 63e4defd2a Corrected bounding box for arcs (DRAWSEGMENT). 2014-02-07 19:55:40 +01:00
Marco Serantoni eb34364d89 [MacOSX] Automating building for OSX with KICAD_SCRIPTING, see Documentation/compiling/mac-osx.txt 2014-02-07 19:53:54 +01:00
Maciej Suminski 0dadf3bc7c Corrected bounding box for arcs (DRAWSEGMENT). 2014-02-07 19:51:04 +01:00
Henner Zeller 34f6ca1b20 * Bring CvPcb footprint window to the front when it has been obscured by another window 2014-02-07 18:38:41 +00:00
Brian Sidebotham 159017ed62 * Add Henner's patch (with minimal changes) to ensure CVpcb footprint view window is always brought into view, even after being hidden by another window 2014-02-07 18:36:12 +00:00
Brian Sidebotham 742ee5320e * Fix Project templates location under Linux, preserve Windows location 2014-02-07 18:19:53 +00:00
Brian Sidebotham 775ce3993c * Fix linux location for system project templates 2014-02-07 18:17:58 +00:00
jean-pierre charras d68940c4d2 Minor fixes. 2014-02-07 17:09:15 +01:00
Cirilo Bbernardo 87d2caa4c6 IDF export: fix incorrect rotation of flipped items. 2014-02-07 17:01:46 +01:00
Maciej Suminski 25dfbcd39f Upstream merged. 2014-02-07 09:52:47 +01:00
Maciej Suminski d124cf45f3 Reverted changes introduced by the revision 4655. 2014-02-06 21:34:03 +01:00
Maciej Suminski 61a76b2955 Merged fix for wrong snapping. 2014-02-06 17:31:24 +01:00
Maciej Suminski 0f026bbe1d Fixed snapping item in a wrong spot bug. 2014-02-06 17:29:13 +01:00
Maciej Suminski 45f55fb8c5 Actually added files for drawing tools. Added possibility of drawing circles. 2014-02-06 17:12:37 +01:00
jean-pierre charras 544f987fa0 add missing svg file 2014-02-06 16:54:55 +01:00
Fabrizio Tappero c407654224 Fix issues in icons with texts, from Fabrizio Tappero. 2014-02-06 16:49:37 +01:00
jean-pierre charras f366f26523 Fix some incorrect icons (which were using a not supported font for texts). Add ps_router icon from Konstantin Baranovskiy. 2014-02-06 15:13:31 +01:00
Maciej Suminski b21ce73c37 Initial version of the drawing tool. 2014-02-06 15:09:38 +01:00
Maciej Suminski 363709e7a9 Added TOOL_INTERACTIVE::Activate().
Removed an unnecessary header from class_board_item.h.
2014-02-06 14:45:33 +01:00
Maciej Suminski 5c9e7d9b9b Merged the lp:~cern-kicad/kicad/selection_tool branch. 2014-02-06 12:48:18 +01:00
Maciej Suminski 8944e92456 Fixed included headers. 2014-02-06 12:38:47 +01:00
Maciej Suminski b9df36eca5 GAL::GetGridPoint() takes a const reference. 2014-02-06 12:38:06 +01:00
Maciej Suminski 81f84748b3 Modifiers (Shift/Ctrl/Alt) are set also while moving the mouse cursor. 2014-02-06 10:43:19 +01:00
Fabrizio Tappero 26041d52c7 New other icons from Fabrizio Tappero, and some svg file fixes 2014-02-06 09:29:45 +01:00
Fabrizio Tappero 02bac313a8 New other icons from Fabrizio Tappero, and some svg file fixes. 2014-02-06 09:28:29 +01:00
Fabrizio Tappero c84f6331b0 New icons from Fabrizio Tappero 2014-02-05 15:36:57 +01:00
Maciej Suminski 1d4c6ad40e Minor optimizations. 2014-02-05 14:51:19 +01:00
Maciej Suminski 468e14f003 Merged ratsnest_threadsafe branch. 2014-02-05 11:55:04 +01:00
Maciej Suminski 3a15f5ad28 Initialized value to suppress Valgrind warnings. 2014-02-05 11:33:45 +01:00
Maciej Suminski 17c030aa98 Fixed removal of items in the KiCad-default style. 2014-02-05 11:08:34 +01:00
Maciej Suminski 857956e42e Fixed bug introduced in the last commit. 2014-02-05 10:47:55 +01:00
Maciej Suminski d7517e472b Some items were still marked as selected after undoing an operation. 2014-02-05 10:30:50 +01:00
Cirilo Bernardo f57eaf45fa Apply IDF tools patch from Cirilo Bernardo 2014-02-05 10:29:01 +01:00
Cirilo Bernardo fbe8484225 Apply IDF tools patch from Cirilo Bernardo 2014-02-05 10:27:21 +01:00
Maciej Suminski a9031edc0d Grip margin is relative to the world's zoom. 2014-02-05 10:17:14 +01:00
Maciej Suminski f922533978 Added possibility for editing pads properties. 2014-02-05 09:05:27 +01:00
Miguel Angel Ajo b39408b14a Adding a first BOARD class tester, very basic 2014-02-04 22:16:32 +01:00
Maciej Suminski 8df0f769f7 Added KiCad-style modification methods (hover over an item and press a hot key, without selecting first).
Modification point is selected basing on the number of selected items.
Rotation angle setting (Preferences->General) is taken into account while rotating.
2014-02-04 17:27:00 +01:00
Maciej Suminski 625dcddb27 Added 2 tool actions:
- pcbnew.InteractiveSelection.Single for selecting a single item
- pcbnew.InteractiveSelection.Clear for clearing the selection
Made SELECTION_TOOL::clearSelection private.
2014-02-04 16:03:56 +01:00
Maciej Suminski 106fa9bbd8 Edit tool may still be activated if it was invoked with no selected items. 2014-02-04 14:21:29 +01:00
Maciej Suminski 347649e855 Protection against non consecutive net codes. 2014-02-04 13:40:39 +01:00
Maciej Suminski 0b9a8709f8 Modifiers (Alt/Shift/Control) are properly set for events when autopanning is active. 2014-02-04 13:38:18 +01:00
Maciej Suminski 82ca611ed3 SELECTION_TOOL::SELECTION::Clear made private, as there was no chance to call it outside the SELECTION_TOOL class. 2014-02-04 11:37:54 +01:00
Maciej Suminski b317894ea0 Snapping settings are valid while autopanning. 2014-02-04 09:44:16 +01:00
Dick Hollenbeck ec9c949c9b Windows name export tweak 2014-02-03 23:05:07 -06:00
Dick Hollenbeck 142782b402 remove wxApp()::FindLibraryPath() usages from Pcbnew. Use environment variable substitution. 2014-02-03 15:39:42 -06:00
Dick Hollenbeck 33e26b278d KIWAY in progress... 2014-02-03 13:26:18 -06:00
Maciej Suminski f87b6962e0 Enabled PNS for selected items. 2014-02-03 18:09:17 +01:00
Maciej Suminski f6aa447036 Ratsnest lines for zones are removed when a zone is dragged. 2014-02-03 17:40:39 +01:00
Dick Hollenbeck 2eb99fefdf Initial KIWAY (modular-kicad) work. Various tweeks. 2014-02-03 09:21:04 -06:00
Dick Hollenbeck 4f26386e8d Initial KIWAY (modular-kicad) work. Various tweeks. 2014-02-03 09:10:37 -06:00
Maciej Suminski 3f5c3d4349 Minor changes (fix cvpcb build issue, wx2.8 compatibility, some other stuff). 2014-02-03 16:02:54 +01:00
Maciej Suminski 63bc40b58e Takes into account hidden module text settings. 2014-02-03 07:22:31 -06:00
Maciej Suminski fff616c8dc Moved netnames (GAL specific layers) to a separate enum, to avoid saving/reading their settings from files.
Added a check for the number of PCB_VISIBLE elements.
Worksheet & general purpose overlay layers are visible by default.
2014-02-03 14:14:53 +01:00
Maciej Suminski 2fe85cf43d Minor changes. 2014-02-03 13:26:25 +01:00
Maciej Suminski 864c86062d Changed ROUTER_PREVIEW_ITEM layer. 2014-02-03 13:09:10 +01:00
Maciej Suminski db252ea88c Changed BOARD_DESIGN_SETTINGS::m_VisibleElements from int to long, to assure at least 32 bits length (without depending on the platfrom int size). 2014-02-03 13:08:01 +01:00
Maciej Suminski 44861f5889 Fixed tracks of 0 width causing division by 0 error. 2014-02-03 13:05:27 +01:00
Miguel Angel Ajo 15bfac3f4e Moved QA to root. 2014-02-02 22:50:45 +01:00
Dick Hollenbeck 741bfb685b Another attempt at wxFrame::SaveSettings() standard infrastructure. 2014-02-02 14:18:10 -06:00
jean-pierre charras 8afe2dfbce Eeschema: Fix bug #1271155 relative to Grid selection in Eeschema. 2014-02-02 20:51:50 +01:00
Cirilo Bernardo 5a6665ec08 Dxf import fix (patch from Cirilo Bernardo, with a minor change) 2014-02-02 10:07:02 +01:00
jean-pierre charras 9ef5627880 Kicad manager: code cleaning (better use of wxaui manager). Fix a very minor bug. 2014-02-02 10:02:29 +01:00
jean-pierre charras 6f10d16824 Kicad manager: code cleaning. Fix a very minor bug. 2014-02-01 19:27:18 +01:00
Carl Poirier 1490099ddd Parallelized the RN_DATA::Recalculate() function. 2014-01-31 18:27:06 +01:00
Maciej Suminski 0c67e26e9c Added the dynamic ratsnest for the tracks that are currently routed with the PNS router. 2014-01-31 18:05:11 +01:00
Maciej Suminski 3e2e11fb42 Undo/redo buffer fixed once again.. 2014-01-31 16:08:20 +01:00
Maciej Suminski 24ba75ba92 Minor change to clearing selection handling. 2014-01-31 14:52:01 +01:00
Maciej Suminski 630a3fb1b9 Safer RN_NET::GetNodes() 2014-01-31 14:41:15 +01:00
Maciej Suminski 7f3bf1bef7 Added missing operators==/!= for RN_NODE_PTR.
Moved ClearSimple() functions back to the header file.
2014-01-31 13:19:59 +01:00
Maciej Suminski 7f4648149b Ratsnest is updated after backend switch. 2014-01-31 13:14:18 +01:00
Maciej Suminski 3827f495ca Ratsnest color is saved in RENDER_SETTINGS. Temporary ratsnest is drawn using a brightened color. 2014-01-31 11:16:01 +01:00
Maciej Suminski 5fea60d20f Fixed undo/redo while routing with the PNS error. 2014-01-30 17:11:40 +01:00
Maciej Suminski 510fee1358 Another way of handling items for the ratsnest (clearer and now finally supports undo/redo of the PNS created tracks). 2014-01-30 15:46:39 +01:00
Maciej Suminski bbb3972fb7 Undo buffer for the PNS router. Still, it has a bug - it crashes when an undo/redo operation is performed while routing a track. 2014-01-30 11:32:08 +01:00
Maciej Suminski a73e386505 Added a new tool event: TA_UNDO_REDO, sent after undo/redo operation is issued. 2014-01-30 11:18:58 +01:00
jean-pierre charras fa8cbd983b 3d-frame: is now derived from EDA_BASE_FRAME. Remove duplicate code and some useless includes 2014-01-30 09:18:47 +01:00
jean-pierre charras f43ed90921 Add specific bitmaps in export IDF and export DSN menus.
Add missing calls to Show( false ) to some main frames (Kicad, eeschema, gerbview), to force config saving when closing these windows.
Code cleanup and minor coding style fixes in footprint_wizard_frame.
2014-01-29 19:39:16 +01:00
Dick Hollenbeck 2ac58935b5 Make option KICAD_KEEPCASE actually functional for Eeschema, and make the setting default ON.
The desire is to migrate designs *away from* case independence, and to create
designs which use literally (case specific) interpreted component names. But for
backwards compatibility, you may turn OFF this option if you really must.
(Remember that with KiCad using text data files, typically you would be better
off simply doctoring those files into a case literal state with a text editor
and move forward into the brave new world of case specificity. Also, BOM
generators may not work properly when you have this option turned OFF, the xml
export's referential integrity is broken on library part name. Hence the default
is ON now, as of 29-Jan-2014.
2014-01-29 12:02:02 -06:00
jean-pierre charras ce6b907fe3 Add specific bitmaps in export IDF and export DSN menus.
Add missing calls to Show( false ) to some main frames (Kicad, eeschema, gerbview), to force config saving when closing these windows.
Code cleanup and minor coding style fixes  in footprint_wizard_frame
2014-01-29 18:01:42 +01:00
unknown 690a001648 Pcbnew: export IDF fixes 2014-01-29 17:42:21 +01:00
Maciej Suminski 57bfaca131 PNS_ITEM::m_parent: BOARD_ITEM->BOARD_CONNECTED_ITEM 2014-01-29 15:35:25 +01:00
Maciej Suminski af350eb1e6 RN_DATA::GetNets() -> RN_DATA::GetNet() with an assert to check if someone calls it for the unconnected net.
Only items that belong to a net are removed from ratsnest.
2014-01-29 15:24:19 +01:00
Maciej Suminski b52e5fabda Ratsnest lines are drawn using a more transparent color.
BOARD::chainMarkedSegments() uses a safer method for gettings pads.
2014-01-29 14:51:50 +01:00
Maciej Suminski bec24b6c7f Ratsnest is updated after rotation, flip, undo/redo operations.
Fixed crashes of ratsnest when a pointer for an item has changed after undo/redo operations.
Vias are properly removed from ratsnest (pcbnew/class_board.cpp).
2014-01-29 10:17:14 +01:00
Maciej Suminski 83f7c7e35e Added RN_DATA::Add()/Remove() methods.
RN_DATA::Update()/AddSimple() take BOARD_ITEM* as the parameter (instead of being split to versions with BOARD_CONNECTED_ITEM* and MODULE*), to make the code look clearer.
2014-01-28 16:30:58 +01:00
Maciej Suminski 2b8f9fc621 Added BOARD_[CONNECTED_]ITEM::IsConnected() for checking if a BOARD_ITEM is BOARD_CONNECTED_ITEM as well. 2014-01-28 16:23:08 +01:00
Dick Hollenbeck 784e43f2e8 Add option --remove-orphaned-libraries to scripts/library-repos-install.sh 2014-01-28 08:23:01 -06:00
Maciej Suminski c3c7b2e9cc Merged the netnames branch. 2014-01-28 11:59:04 +01:00
Maciej Suminski 7f6bc781aa Upstream merge. 2014-01-28 10:43:55 +01:00
Maciej Suminski 15b8d3d20a Added NETINFO_MAPPING, to ease saving nets with consecutive net codes (without modifying the net codes during the run time).
Now, nets are saved with consecutive net codes (both modern & legacy plugins).
Zones are saved together with their nets, without depending on the fact if there are any pads with such net. Therefore validation of zone net names was removed (pcbnew/class_board.cpp).

Performed tests:
- Changed a pad's net name from empty to existent - ok, name was changed.
- Changed a pad's net name from empty to nonexistent - ok, error message is displayed, net name stays empty.
- Changed a pad's net name from existent to empty - ok, net name became empty
- Changed a pad's net name from existent to nonexistent - ok, error message is displayed, net name is not changed.

- Drawn a zone that belongs to a net, then modified schematics so the net does not exist anymore. After reloading the net list, all pads/tracks are updated. Zones still belongs to the net that does not exist in the schematic (but still exists in .kicad_pcb file). After running DRC, the zone becomes not filled.
- Undo & redo affects assignment of a polygon to a specific net (you may change net of a polygon, refill it and undo/redo the changes).

- KiCad s-expr & legacy, Eagle, P-CAD boards seem to load without any problem (they also contain correct net names assigned to the appropriate pads). All types of board file formats were loaded, then saved in sexpr format and reopened with a KiCad built from the master branch (without my modifications).
- A few boards were also saved using the legacy format and were opened with the master KiCad without any issues.

- Change a net name for a pad, restore with undo/redo - ok
- Remove everything, restore with undo - ok
- Remove everything, reload netlist - ok

Differences observed between files saved by the master branch KiCad and this one:
- list of nets are not saved in any particular order, so net codes may differ
- the default net class does not contain the unconnected net
2014-01-28 10:19:51 +01:00
Dick Hollenbeck c63fa6ff31 Add EDA_BASE_FRAME::Show() and call SaveSettings() only from there for all derived wxFrames. Remove calls to SaveSettings() elsewhere. 2014-01-27 19:29:26 -06:00
Marco Serantoni 786bb81c4d [MacOSX] KICAD_BUILD_DYNAMIC stabilized and almost working 2014-01-27 23:24:04 +01:00
jean-pierre charras 6181e9e46e Bitmap2component: fix Bug #1273082 (patch from Wesley Dungan) 2014-01-27 18:22:49 +01:00
Dick Hollenbeck 9bce766331 Report findings of possible github zipfile caching in a comment, improve a Sprintf() setup. 2014-01-27 09:51:14 -06:00
Maciej Suminski a10d918cac Thread-safe version of Delaunay triangulation. 2014-01-27 11:42:47 +01:00
jean-pierre charras e07b4cbe86 github_plugin.cpp: in error message relative to"cannot get zip archive...", line 496, make the sentence relative to http GET command not translatable
inside the full translated message.
2014-01-27 09:48:17 +01:00
Dick Hollenbeck 9afc4a0db6 Remove g_LibraryNames and all supporting infrastructure from pcbnew. FP_LIB_TABLE is now local to major wxFrames. 2014-01-27 01:23:02 -06:00
Dick Hollenbeck 6617ce58f3 Use factored SelectLibrary() from base class. Spelling and comments. 2014-01-27 00:41:40 -06:00
Maciej Suminski 8e6019748a GAL takes into account hidden module text settings. 2014-01-26 22:02:48 +01:00
Maciej Suminski e537480f1e Fixes crash when there are no edges for a given net in the ratsnest. 2014-01-26 22:01:42 +01:00
jean-pierre charras fe97521bda Pcbnew: fix Bug #1272926 (Texts are now not accepted on edge cuts layer) 2014-01-26 18:30:20 +01:00
jean-pierre charras 3354bdde05 Pcbnew: fix bug #1272714 . Code cleanup: use 2 different enums for pad shapes and pad drill shapes. Remove never used pad shape. 2014-01-26 15:20:58 +01:00
Marco Serantoni 179bb920b8 [MacOSX] adding multiprocess building and initial support for KICAD_BUILD_DYNAMIC 2014-01-26 14:09:36 +01:00
Cirilo Bernardo 4f29440f5f add patch from Cirilo Bernardo (about IDF export) , and minor fixes. 2014-01-25 15:36:56 +01:00
jean-pierre charras f7ca6e4bf9 add patch from Cirilo Bernardo, and minor fixes. 2014-01-25 13:23:29 +01:00
Marco Serantoni dc2592238e [MacOSX] Adding wx-widgets building with patches for OSX preparing for dynamic.. 2014-01-24 22:09:31 +01:00
Marco Serantoni 7e9ab70384 [MacOSX] Fixing in the case -arch are not set with cairo 2014-01-22 19:01:36 +01:00
Dick Hollenbeck f3256a918d Increase boost download TIMEOUT to 10 minutes, offer a LOG_DOWNLOAD option for capturing download problems. 2014-01-22 07:44:02 -06:00
Dick Hollenbeck 33dcef695e fix 2014-01-21 09:25:43 -06:00
Dick Hollenbeck d11d92504a tugs and bugs 2014-01-21 00:59:32 -06:00
Dick Hollenbeck aa451fb4d1 freerouter does not understand "mixed" layers, export mixed as signal 2014-01-20 13:11:42 -06:00
Dick Hollenbeck bf30114db8 use changed URL to library repo. 2014-01-20 13:10:45 -06:00
Dick Hollenbeck 8dc7189653 Add EDA_APP::setLanguageId() accessor and fix FindwxWidgets.cmake for windows cross on linux. 2014-01-20 03:33:17 -06:00
jean-pierre charras 294463208b Code cleanup and minor fix in viewlib. 2014-01-19 17:36:12 +01:00
jean-pierre charras a094f7d5b5 Fix some issues in modview, relative to few incorrect use of some wxAuiManager functions.
Fix not working + and - keys in layers manager.
Fix typo errors and modify some messages to make translator's life more easy.
2014-01-19 14:12:57 +01:00
maciej. 76aa0ba756 Fix compile errors when wx3.x is built with --enable-stl 2014-01-18 03:07:05 -06:00
Dick Hollenbeck a3211b2b9e disable deprecation warnings in Debug build, change message in fp_lib_table.cpp 2014-01-18 03:04:12 -06:00
Wayne Stambaugh bcf79484f0 CvPcb: fix no footprints shown in list when no legacy libraries are defined in project file. 2014-01-17 15:26:27 -05:00
Maciej Suminski 441e03172c Added iterators for NETINFO_LIST (as net codes for existing net codes may be not consecutive). 2014-01-16 16:47:31 +01:00
Maciej Suminski af7520ccb9 wxWidgets 2.8 fix 2014-01-16 14:36:09 +01:00
Maciej Suminski 8a4e723504 NETINFO_ITEMs are not stored in a vector anymore, instead they are held in a unordered_map. Now, the net codes may be not consecutive. There is another way for assigning net codes (using a static int that holds a possible empty net code and a function that makes sure it is not used [getFreeNetCode()]).
Removed some unused fields (NETINFO_ITEM::m_NbNodes, m_NbLink, m_NbNoconn, m_Flag).
2014-01-16 14:20:51 +01:00
Maciej Suminski d62b47a0df BOARD_CONNECTED_ITEMs do not store net code anymore (m_NetCode field), instead net info is stored using a pointer to NETINFO_ITEM.
GetNet() refers to the net code stored in the NETINFO_ITEM. SetNet() finds an appropriate NETINFO_ITEM and uses it.
Removing GetNet() & SetNet() (and the whole net code idea) requires too many changes in the code (~250 references to the mentioned functions).
BOARD_CONNECTED_ITEMs by default get a pointer to NETINFO_ITEM that stores unconnected items. This requires for all BOARD_CONNECTED_ITEMs to have a parent (so BOARD* is accessible). The only orphaned item is BOARD_DESIGN_SETTINGS::m_Pad_Master, but it does not cause any issues so far.
Items that do not have access to a BOARD (do not have set parents) and therefore cannot get net assigned, by default get const static NETINFO_LIST::ORPHANED.

Performed tests:
- loaded .kicad_pcb, KiCad legacy board, Eagle 6.0 board, P-CAD board - all ok
- load a simple project, reload netlist after changing connections in eeschema - ok
- save & reload a board - ok, but still contain empty nets
- remove everything, restore with undo - ok
- remove everything, reload netlist - ok
- changing net names (all possibilites: empty->existing, empty->not existing, existing->empty, existing->not existing) - all ok
- zones: when net is changed to a net that does not have any nodes besides the zone itself, it does not get filled
2014-01-15 18:03:06 +01:00
Maciej Suminski 3017b61711 Added NETINFO_LIST::UNCONNECTED constant. 2014-01-15 09:34:16 +01:00
Maciej Suminski 78732f13f7 Removed:
- ZONE_CONTAINER::m_Netname field
- ZONE_CONTAINER::SetNetName()
- ZONE_CONTAINER::SetNet() [it uses the one in BOARD_CONNECTED_ITEM]
- ZONE_CONTAINER::GetNetName() [instead BOARD_CONNECTED_ITEM::GetNetname is used]
- ZONE_CONTAINER::SetNetNameFromNetCode()

Performed tests:
- Drawn a zone that belongs to a net, then modified schematics so the net does not exist anymore. After reloading the net list, all pads/tracks are updated. Zones still belongs to the net that does not exist in the schematic (but still exists in .kicad_pcb file). After running DRC, the zone becomes not filled.
- Undo & redo affects assignment of a polygon to a specific net (you may change net of a polygon, refill it and undo/redo the changes).
2014-01-14 11:41:06 +01:00
Maciej Suminski 654e7e556e Removed D_PAD::SetNetname() function and D_PAD::m_Netname, D_PAD::m_ShortNetname fields.
D_PAD::GetNetname() and D_PAD::GetShortNetname() were moved to BOARD_CONNECTED_ITEM. Now they use the net name stored in NETINFO_ITEM.
Moved some one-line functions from class_board_connected_item.cpp to class_board_connected_item.h.
Added a copyright notice, moved Doxygen comments from class_board_connected_item.cpp to class_board_connected_item.h.

I have some doubts if changes introduced pcbnew/dialogs/dialog_pad_properties.cpp do not break anything, but I could not find a test case that breaks the pcbnew.

Performed tests:
- changed pad's net name from empty to existent - ok, name was changed
- changed pad's net name from empty to nonexistent - ok, error message is displayed, net name stays empty
- changed pad's net name from existent to empty - ok, net name became empty
- changed pad's net name from existent to nonexistent - ok, error message is displayed, net name is not changed
- (re)reading netlists, including net changes - fine, changes are applied, but empty nets are still kept
- loaded pcbnew/pcad2kicadpcb_plugin/examples/CK1202_V1.pcb to test P-CAD import plugin - ok, net names are correct
- imported an Eagle 6.0 board (Arduino Uno; http://arduino.cc/en/uploads/Main/arduino_Uno_Rev3-02-TH.zip) then saved in .kicad_pcb format and reloaded - ok, net names are correct
- saved demos/video/video.kicad_pcb in legacy format and then loaded it again - ok, net names are correct
2014-01-14 10:41:52 +01:00
jean-pierre charras 5954910913 Fix some issues in modview, relative to some a bad use of some wxAuiManager functions. 2014-01-13 16:09:52 +01:00
jean-pierre charras f0412874c0 Update demo files. A minor code cleaning. 2014-01-10 21:12:36 +01:00
Maciej Suminski bf80cc770e Changed the way of looking up NETINFO_ITEM using net names (using boost::unordered_map). Added a hash function (wxString) for that. Introduced NETINFO_ITEM::GetNetItem( wxString ). BOARD::FindNet() uses the map.
Net codes are updated upon net list update. (BOARD::ReplaceNetlist())
Added in some places (mostly class_board.cpp) pad->SetNet() calls to synchronize net codes.
On creation of NETINFO_LIST, the first NETINFO_ITEM is added (the unconnected items net).
Removed COMPONENT_NET::m_netNumber, as it was not used anywhere.
Added an assert to D_PAD::GetNetname(), checking if net code and net name is consistent for unconnected pads. Added an assert for NETINFO_LIST::AppendNet() to assure that appended nets are unique.

It seems that at this point:
- Updating net lists works fine. The only difference between the file ouput is that after changes it contains empty nets as well.
- Nets are not saved in the lexical order. Still, net names and net codes are properly assigned to all items in the .kicad_pcb file. It is going to be addressed in the next commit. I believe it should not create any problems, as pads are sorted by their net names anyway (NETINFO_LIST::buildPadsFullList())

Performed tests:
- Created a blank PCB, saved as pic_programmer.kicad_pcb (from demos folder). Updated net lists. .kicad_pcb file (comparing to the results from master branch) differ with net order (as mentioned before), net codes and timestamps.
- Removed some of components from the above .kicad_pcb file and updated net lists. Modules reappeared. .kicad_pcb file differs in the same way as described above.
- Trying to change a pad net name (via properties dialog) results in assert being fired. It is done on purpose (as there is a call to GetNetname() and net name and net code do not match). This will not happen after the next commit.
- Prepared a simple project (starting with schematics). Imported net list, changed schematic, reimported net list - changes are applied.
- Eagle & KiCad legacy boards seem to load without any problem.
2014-01-10 18:04:07 +01:00
Maciej Suminski 386d1fc257 Made two functions immune to empty containers. 2014-01-10 17:19:33 +01:00
Brian Sidebotham 51e3d8943f * Fix FindwxWidgets.cmake for V3.0 wxWidgets using 'win32' style find. i.e. for MinGW native build without msys or cygwin 2014-01-09 23:13:22 +00:00
Dick Hollenbeck edc5783411 file maintenance, update some scripts 2014-01-09 09:01:59 -06:00
Maciej Suminski 487b609e76 Removed NETINFO_ITEM::SetNet() and NETINFO_ITEM::SetNetname() methods.
NETINFO_ITEM::m_Net and NETINFO_ITEM::m_Netname are const.

Changes to be verified:
- pcbnew/minimun_spanning_tree.cpp: It segfaults is m_Size == 0
- pcbnew/exporters/export_gencad.cpp: I removed the SetNetname() call, as it changes only the unconnected net and in the next line it returns if the net is unconnected. Still, I wonder if name for the unconnected net matters. What about tests that check if a net name is empty to decide if it is unconnected net or not.
2014-01-09 15:51:47 +01:00
jean-pierre charras d3f0151ad4 Code cleanup: Pcbnew: move files relative to export functions to the new folder exporters
Pcbnew, Eeschema: remove include file <protos.h> from a lot of files which do not need it.
2014-01-08 20:29:46 +01:00
Dick Hollenbeck a8bc07c832 Add KICAD_REPO_NAME to the about dialog and build_version.cpp 2014-01-08 08:47:39 -06:00
jean-pierre charras f905b4697e Code cleanup: Pcbnew: move files relative to exort functions to the new folder exporters
all: remove include <protos.h>  from a lot of  files which do not need it.
2014-01-08 15:18:51 +01:00
Maciej Sumiński e9d3f787db merge Orson's patch with changes 2014-01-07 20:02:03 -06:00
Dick Hollenbeck a2a723ddf6 Fix option description, add mark_as_advanced(), and add a comment to KICAD_SKIP_BOOST 2014-01-07 20:00:47 -06:00
Maciej Sumiński c1e68436f1 Remove assembly language files, and make building Boost optional.
https://lists.launchpad.net/kicad-developers/msg11965.html
2014-01-07 19:52:19 -06:00
Dick Hollenbeck 1c0f034bca Make KiCad compile with minimal warnings against SVN HEAD of wxWidgets as of today. 2014-01-07 19:34:04 -06:00
jean-pierre charras 710e6a56c4 Move files relative to export code to subdir exporters. 2014-01-07 21:41:32 +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
Cirilo Bernardo b02f12f440 Commit patch about new better vrml export. patch to fix mirrored page layout when print mirrored is enabled ( page layout should not be mirrored) 2014-01-07 20:27:51 +01:00
Maciej Suminski 8f054a606f Fixed snapping and ratsnest update for EDIT_TOOL. 2014-01-07 17:23:17 +01:00
Maciej Suminski 84412ce135 Delaunau triangulation algorithm was bailing out if run on an emprty container. 2014-01-07 15:52:10 +01:00
Maciej Suminski 6ad9d013e2 Safer way for syncing pads in Push and Shover router. 2014-01-07 14:23:46 +01:00
Maciej Suminski 75db0cebb7 Fixed Push and Shove and ratsnest cooperation (tracks added by PNS are taken into account while calculating ratsnest). 2014-01-07 14:22:37 +01:00
Maciej Suminski 69cf8aa325 Fixed snapping for Push and Shove router. 2014-01-07 14:21:37 +01:00
Maciej Suminski 3fe183c472 Tools have possibility to react to GAL switching or model (board) reload. 2014-01-07 14:16:47 +01:00
Maciej Suminski aaf857e894 Items removed from board are removed from ratsnest as well. Corrected the way of items removal from ratsnest. 2014-01-07 14:15:40 +01:00
Maciej Suminski bc71a2c007 Removed TOOL_STATE.idle field, as it was redundant. 2014-01-07 14:11:53 +01:00
Maciej Suminski 7784365b39 Fixed bounding box for module texts. 2014-01-07 14:09:27 +01:00
Marco Serantoni 290a60a462 [MacOSX] Fixing STL && single processor building in pixman 2014-01-07 00:20:52 +01:00
jean-pierre charras 714d5b28d2 Better vrml export, from Cirilo Bernardo. 2014-01-06 21:14:24 +01:00
Maciej Suminski 537d82fb98 Upstream merge. 2014-01-06 10:29:31 +01:00
Marco Serantoni 54bbba6c86 [MacOSX] fixes some corner case compiling on x86 in boost 2014-01-04 14:40:22 +01:00
Marco Serantoni 2c39ea00e2 [MacOSX] Added support in boost context for PPC processors, now is possible again compile kicad testing for PPC ( https://svn.boost.org/trac/boost/ticket/8266 ) 2014-01-04 03:13:18 +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 6b08cb4ca1 comment out broken tool_modview.cpp's useless footprint select button. somebody needs to fix this. 2014-01-03 17:19:54 -06:00
Dick Hollenbeck cbcf666470 force switch to boost::context, add --force option to bzr clean-tree 2014-01-03 17:17:50 -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
Cirilo Bernardo 6e56aa2ff0 IDF3 wxDateTime patch to fix MinGW builds for missing localtime_r(). 2014-01-03 08:31:50 -05:00
Cirilo Bernado deb3d54c01 Adds basic IDF3 export (board and cutouts / holes only) 2014-01-02 10:28:10 +01:00
Cirilo Bernardo 0b853c5af2 Adds basic IDF3 export (board and cutouts / holes only) 2014-01-02 10:26:03 +01:00
Dick Hollenbeck c264823731 8 bit string relief via class UTF8 2014-01-01 20:17:07 -06:00
Dick Hollenbeck f346727214 FIX: only invoke fp-lib-table options editor when table not empty. 2013-12-31 10:59:33 -06:00
Dick Hollenbeck bfc72b0183 Add bzr clean-tree to download_boost.cmake 2013-12-31 10:58:05 -06:00
Marco Serantoni 54fe3eeeee [MacOSX] Reorganize OSX Library PATH, first the USER's one then the SYSTEM's one 2013-12-31 15:28:34 +01:00
Marco Serantoni 4d139b590f [MacOSX] Adding better support for Retina Display (NSHighResolutionCapable) 2013-12-31 12:03:02 +01:00
Marco Serantoni 6d2db4783e [MacOSX] Manage older OpenSSL API (needed for OSX 10.6) and probably older linuxes 2013-12-31 11:48:16 +01:00
Marco Serantoni 7ffd6db5b4 [MacOSX] Manage older OpenSSL API (needed for OSX 10.6) and probably older linuxes 2013-12-31 11:45:17 +01:00
Marco Serantoni b08c85f67c [MacOSX] Removing freetype dependecy for Cairo (uses cocoa font management) 2013-12-31 11:44:16 +01:00
Marco Serantoni 2d53c8eef5 [MacOSX] disable -fvisibility due compiler blames.. 2013-12-31 11:42:25 +01:00
Dick Hollenbeck 52d3535160 minor tidying 2013-12-31 00:25:53 -06:00
Dick Hollenbeck f9ab5d2c61 Add -fvisibility options to significantly reduce binary sizes.
Switch to boost::context for all platforms, almost.
Please try your platform by commenting out fcontext.s in common/CMakeLists.txt.
2013-12-30 11:53:12 -06:00
Marco Serantoni cae7a6ffb8 [MacOSX] fixes issues with previous OSX compilers gcc-4.2 and makes a better general beaviour of KICAD_BUILD_STATIC 2013-12-30 16:53:09 +01:00
Marco Serantoni 6e586d6996 Fixing typo 2013-12-30 01:36:57 +01:00
Marco Serantoni ea4bec99d0 [MacOSX]/All purpose - Support for static linking 2013-12-30 01:27:03 +01:00
jean-pierre charras 7fa0aa8f4f eeschema: fix compil issue. Boost build: boost lib context built only on OSX (does not build on mingw, and not needed) 2013-12-29 23:05:06 +01:00
Marco Serantoni 573b7424dc [MacOSX]/All purpose - Starting support to static linking 2013-12-29 20:38:12 +01:00
Marco Serantoni 66e8017d74 [MacOSX] fixes a missing feature in boost and fixes static build with x86/i386 involved
(https://svn.boost.org/trac/boost/ticket/8266)
2013-12-29 20:36:30 +01:00
jean-pierre charras 612e2ddb4a fix bugs 1264240, 1264247, 1264239, 1264233 (clang report errors) 2013-12-29 16:12:27 +01:00
jean-pierre charras a455ab4a90 Fix bugs 1264236, 1264238, 1264254 2013-12-29 12:01:54 +01:00
jean-pierre charras 46e82e4e18 Move HitTestForCorner and HitTestForEdge code from class_zone to polygon/PolyLine.cpp, to avoid redundant code.
Fix bug 1264248.
Fix a very minor issue in RemoveTrailingZeros, for countries where the separator in floating numbers is a comma.
2013-12-29 11:15:06 +01:00
Marco Serantoni 5418a083d9 Shows the current BZR version in version.h, not the last in the repository (Nick Østergaard) 2013-12-28 12:29:20 +01:00
jean-pierre charras ca60f0863a Dialog fp plugin option: Fix compil issue under gcc 4.4 (does not happen with 4.6 and later) about an overloaded function. 2013-12-27 12:44:40 +01:00
jean-pierre charras f9cc325bd8 Pcbnew, 3D viewer: fix incorrect position of multiline texts. 2013-12-27 08:24:36 +01:00
Dick Hollenbeck 517ca83fbc Hide m_galCanvas and m_galCanvasActive behind accessors. Fix DLIST concatonation API corner case. 2013-12-26 16:36:43 -06:00
fabrizio. 9be908ce79 Update freedesktop files according to http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html 2013-12-24 13:11:18 -06:00
Dick Hollenbeck b9c56b2fc4 FIX: avoid use of wxFileName::GetModificationTime() when it can fail. 2013-12-24 13:09:41 -06:00
Dick Hollenbeck 81ef4cd422 add mime type application/x-pcbnew-pcb, extend Desktop Exec to support a file to open on command line 2013-12-24 13:07:17 -06:00
Dick Hollenbeck 69dccf19c1 Update resources/linux/mime with zip from Fabrizio 2013-12-24 12:46:56 -06:00
Marco Serantoni fdd9b79879 [MacOSX] Thanks for the hint, nullset@freenode, Merry Xmas ! 2013-12-24 19:16:56 +01:00
Baranovskiy Konstantin 065966291c Fix worksheet multiple line text plotting bug. (fixes lp:1261906) 2013-12-23 11:25:13 -05:00
Dick Hollenbeck 860d26e451 kicad-install.sh: abort on first failure. 2013-12-23 09:39:40 -06:00
Marco Serantoni d6292053f3 [MacOSX] Fixing Zone visualization and removing not working code 2013-12-23 16:14:22 +01:00
jean-pierre charras c5031d3f62 specctra_export.cpp: Fix a conversion error from mils to mm I made i n may last commit, which set min dist to find a segment end for internal outlines holes to 1 mil instead of 10 mils. 2013-12-23 09:07:08 +01:00
Marco Serantoni 0dd18c2549 [MacOSX] Cleanup 2013-12-22 20:52:52 +01:00
jean-pierre charras d337d340ee Fix broken download_boost.cmake. Fix minor other issues:
dialog fp lib table display not updated (Windows specific) when an option is changed from the lib table option editor
overloaded function in dialog_fp_lib_table.cpp not compiled with gcc 4.4.7 (try to fix Bug #1262002).
specctra_export.cpp: set min dist to find segment ends when building the board outline to 2 microns (should break anything, but should be enough to fix rounding issues when creating/importing board outlines with arcs)
2013-12-22 20:02:04 +01:00
Marco Serantoni 057a947a4b [MacOSX] Fixing crash/missing refresh in pcb text 2013-12-22 18:39:37 +01:00
Marco Serantoni f3cfea9521 [MacOSX] Fixing crash when changing module text properties - bug #1230090 2013-12-22 18:29:57 +01:00
Maciej Suminski 578ecc6f45 Merge zone outline drawing fix request. 2013-12-22 11:30:46 -05:00
Maciej Suminski 702a90addc Merge aligned text fix request. 2013-12-22 11:07:47 -05:00
Marco Serantoni 2441a7a046 [MacOSX] Treats LLVM as GCC + adds support for boost multiple processor(ppc/intel) and address(32/64 bit) 2013-12-22 15:55:05 +01:00
Maciej Suminski ff6a7e648f OpenGL canvas rats nest merge request. 2013-12-20 15:58:18 -05:00
Maciej Suminski 3dc9f295a4 Fixed cursor force position option. 2013-12-20 16:07:58 +01:00
Maciej Suminski c79962635e Ratsnest is updated, when there are tracks added using the P&S router. 2013-12-20 15:18:41 +01:00
Maciej Suminski 5fe20bbc70 Fixed broken search filters. 2013-12-20 11:54:48 +01:00
Maciej Suminski fe5c5953fc Upstream merge. 2013-12-20 10:15:00 +01:00
jean-pierre charras dd3da8428c Undo the change in specctra_export I erroneously committed, which is not fully tested. 2013-12-19 12:43:16 +01:00
jean-pierre charras 50f6186ebc Dxf export: fix an issue in exported arcs. Update libdfx.
Pcbnew:, libedit, Save lib as...: the new .pretty lib format is the default, instead of legacy .mod format. The legacy format is still selectable in the file selection dialog.
2013-12-19 12:33:57 +01:00
Maciej Suminski 84c496e138 Upstream merge 2013-12-19 11:15:27 +01:00
Maciej Suminski d613da8b8d Module texts are undo/redoable. 2013-12-19 10:10:42 +01:00
Baranovskiy Konstantin de65a7a1da Fix border and title block line thickness plotting bug. (fixes lp:1261899) 2013-12-18 13:11:15 -05:00
Wayne Stambaugh 51d9765826 CvPcb: reload footprint list when footprint library table is changed. (fixes lp:1261911) 2013-12-18 11:36:07 -05:00
Maciej Suminski 7ce91d4e38 Fixed zone area removal (& undoing) using the EDIT_TOOL. 2013-12-18 17:16:15 +01:00
Maciej Suminski fb78432367 Made pads & module texts unselectable 2013-12-18 16:26:21 +01:00
Wayne Stambaugh 75777f4a4e Pcbnew: rotate footprint hot key fixes (fixes lp:1066182).
* Change general properties dialog to allow for entry of arbitrary rotation
  angles for greater than 0 to 90.
* Move global rotation angle variable into PCB_EDIT_FRAME object where it is
  used and add accessors.
* Change rotate footprint undo operation from UR_ROTATE_XXXX to UR_CHANGE.
* Create function to remove trailing zeros from floating point wxString
  objects.
2013-12-18 09:48:59 -05:00
Maciej Suminski f4de2877f3 Added possibility of removing selected items while dragging. 2013-12-18 15:38:38 +01:00
Maciej Suminski fd0a3348ea More elegant way of handling interruption of current modifications. 2013-12-18 15:11:12 +01:00
Maciej Suminski c1d6e44413 Speed optimization during selection of multiple items.
Removed debug output.
2013-12-18 15:09:09 +01:00
Maciej Suminski 873235304e SELECTION_TOOL uses ITEMS_PICKED_LIST to store selected items.
Modifications done using the EDIT_TOOL are saved using the default KiCad's undo buffer.
If there is only one item selected, info about the item is displayed in the bottom status bar.
2013-12-18 14:33:34 +01:00
Maciej Suminski e4efe212d6 Added MODULE::RunOnChildren(). 2013-12-18 13:39:11 +01:00
Maciej Suminski 32065b339a Added const modifiers where applicable (PICKED_ITEMS_LIST).
Added PICKED_ITEMS_LIST::FindItem().
2013-12-18 13:27:18 +01:00
Maciej Suminski 4a0407fb69 Removed some debug logs. 2013-12-18 12:46:18 +01:00
Wayne Stambaugh ca11fcb5c9 Pcbnew: change general properties dialog rotation angle to text edit control. 2013-12-17 16:38:20 -05:00
Wayne Stambaugh 8fe06e12b9 Merge changes from testing head. 2013-12-16 16:41:32 -05:00
Wayne Stambaugh 8f6d69e57e Pcbnew: fix 45 degree rotation angle undo and global variable elimination. 2013-12-16 16:40:03 -05:00
Maciej Suminski 60e3b01ace Fixed drawing of rotated texts that are not horizontally center aligned. 2013-12-16 10:36:33 +01:00
jean-pierre charras bb8741c74f Pcbnew: remove broken patch for" Bug #1255059".
Minor change: Eeschema+Pcbnew: display timestamp in edit dialogs (for footprints, sheets, components)
2013-12-14 20:03:38 +01:00
Wayne Stambaugh efd9963750 Pcbnew: minor Geda and KiCad plugin improvements.
* Make GPCB_PLUGIN::EnumerateFootprints() read the directory contents
  instead of loading the entire cache.
* Make KICAD_PLUGIN::EnumerateFootprints() read the directory contents
  instead of loading the entire cache.
2013-12-13 18:16:40 -05:00
Wayne Stambaugh 2d9385b43a Make old behavior the default in EnumerateFootprint() changes. 2013-12-13 18:14:30 -05:00
Wayne Stambaugh 30a08e2bed Pcbnew: minor Geda and KiCad plugin improvements.
* Make GPCB_PLUGIN::EnumerateFootprints() read the directory contents
  instead of loading the entire cache.
* Make KICAD_PLUGIN::EnumerateFootprints() read the directory contents
  instead of loading the entire cache.
2013-12-13 18:01:42 -05:00
Dick Hollenbeck 031ab96f12 github_plugin.cpp was erroneously affected by rev 4552 patching. 2013-12-13 10:39:46 -06:00
Povilas Kanapickas 7f12513c7e Remove some uses of using namespace std. 2013-12-13 10:27:30 -06:00
Dick Hollenbeck 5c28285cdf kicad-install.sh and library-repos-install.sh utilize /etc/profile.d/kicad.sh for setting environment variables globally 2013-12-13 09:35:05 -06:00
Wayne Stambaugh 6c4518b015 Pcbnew: Geda plugin fixes.
* Prevent cache from being reloaded on every footprint file read.
* Fix a bug forming wxFileName in GPCB_FP_CACHE::Load().
* Fix invalid file name time stamp debug assertion.
* Use FPID to set loaded footprint name.
* Remove file name <> from exception strings per UIPolicy.
2013-12-12 12:42:38 -05:00
Dick Hollenbeck 7ba078b620 remove USE_FP_LIB_TABLE code, make it the norm. Add lazy loading support to FOOTPRINT_INFO. 2013-12-12 10:01:03 -06:00
Wayne Stambaugh b85a713395 Fix footprint viewer perspective save bug. 2013-12-11 15:08:13 -05:00
Dick Hollenbeck ed42092464 Add strtok_r.c 2013-12-10 17:52:51 -06:00
Dick Hollenbeck e842d711c6 FIX: make LEGACY_PLUGIN re-entrant. extern "C" strtok_r() put conditionally into libcommon. 2013-12-10 17:41:34 -06:00
Marco Mattila 40d0a14560 Fix wxWidgets 2.8 validator bug in footprint name entry dialog. (fixes lp:1259204) 2013-12-10 14:24:10 -05:00
Maciej Suminski 4940bff891 Commit merge request lp:197913. 2013-12-10 12:14:30 -05:00
Maciej Suminski 3701e13186 Commit merge request lp:197858 (fixes lp:1249736). 2013-12-10 08:43:04 -05:00
Dick Hollenbeck dbd72122e1 dialog perfection does not come easily. 2013-12-09 16:48:09 -06:00
Dick Hollenbeck bb872dd583 spinners initial values and limits. 2013-12-09 16:39:12 -06:00
Wayne Stambaugh 74e43871d4 Fix frame perspective configuration entry name in basicframe.cpp. 2013-12-09 15:27:49 -05:00
Dick Hollenbeck 3582df6a0b molding mercury. 2013-12-09 13:06:47 -06:00
Dick Hollenbeck d8b270ca4d move ${Boost_LIBRARIES} into cvpcb, pcbnew, _pcbnew and out of github, because worker threads used regardless of github 2013-12-09 12:48:42 -06:00
Dick Hollenbeck dba4fccec9 *) Change FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE*, const wxString*)
To use multiple working threads.  This entailed adding KiCad typedefs:
*) Add typedefs for MUTEX and MUTLOCK which mask the actual choices for the project.
*) Add FOOTPRINT_LIST::DisplayErrors( wxWindow* ) which is a single strategy for
   showing aggregated load errors.  Although what's there is only scaffolding
   and needs a volunteer who knows HTML pretty well.
*) Ensure all callers of ReadFootprintFiles() use the new DisplayErrors() function.   
*) Push utf8.cpp and utf8.h into common library for open use.
2013-12-09 12:09:58 -06:00
Maciej Suminski 7e60cc530a Comments. 2013-12-09 11:07:30 +01:00
Maciej Suminski a3909d4f71 Added removal of BOARD_ITEMs for the TOOL_FRAMEWORK. 2013-12-09 11:01:05 +01:00
Maciej Suminski d8acd1c718 Moved Init() & Reset() from TOOL_INTERACTIVE to TOOL_BASE.
Added REASON enum for Reset() function, so tools will know why a reset occured.
Fixed SELECTION_TOOL (it was bailing out, when a new board was loaded and some items were still selected).
Added removal of VIEW_ITEM groups after changing layers and removing items.
2013-12-09 10:42:38 +01:00
Dick Hollenbeck 7717aa9279 fixes, a couple more unit tests. 2013-12-08 09:25:11 -06:00
Wayne Stambaugh 8316477638 Enable building the footprint library table as the default. 2013-12-08 09:06:55 -05:00
scrizt aef48d2716 Allow spoke width to equal minimum zone width in pcbnew (fix bug #1255059) 2013-12-08 12:00:20 +02:00
Dick Hollenbeck 5df7288678 complete class UTF8.cpp 2013-12-08 00:48:25 -06:00
Dick Hollenbeck 2f327f068d Documentation/guidelines/UIpolicies.txt should not speak of the unspeakable use of <> in quoted strings. 2013-12-07 22:49:44 -06:00
Dick Hollenbeck 7d58d82656 common/gal/stroke_font.cpp was segfaulting in wx 2.8 when drawing multi-line string. 2013-12-07 22:47:37 -06:00
Dick Hollenbeck e2b7ba4b19 eeschema/dialogs/dialog_lib_new_component.cpp was not expanding part name field nor setting initial focus. 2013-12-07 22:46:25 -06:00
Wayne Stambaugh 4f2921f384 Pcbnew: footprint viewer wxAUI improvements.
* Make the tool bar dockable.
* Enable the overflow control in the tool bar in case the it does not fit in
  it's parent window.
* Fix some wxAuiPaneInfo usage issues.
* Remove unused wxAuiPaneInfo objects.
* Move perspective saving and loading into EDA_BASE_FRAME object in preparation
  for extending this to all frame windows.
2013-12-06 19:33:16 -05:00
Dick Hollenbeck 03a4f5c4ea Move "code costly" functions in experimental class UTF8 to be not "inlined", prefering compactness. 2013-12-06 14:22:10 -06:00
jean-pierre charras 4374e25219 Plot functions: some enhancements in mirror mode (Pcbnew specific): boards are mirrored horizontally, and the page layout is no more mirrored, and therefore is always readable. 2013-12-06 19:31:15 +01:00
maciej. 72e567f503 Bug fix: pcbnew hangs up on polygon movement 2013-12-06 15:34:39 +01:00
Maciej Suminski 6d0a35323b Removed unnecessary parts. 2013-12-06 15:01:36 +01:00
Dick Hollenbeck a0623d9584 UTF8::uni_iter made leaner. 2013-12-06 07:32:33 -06:00
Maciej Suminski aebb8b3ff9 Fixed an infinite loop in the destructor of ACTION_MANAGER; 2013-12-06 13:57:56 +01:00
Dick Hollenbeck 391ff6699a sketch out class UTF8::uni_iter, add tools/make-UTF8.sh 2013-12-06 06:51:39 -06:00
Maciej Suminski b8b96f77a2 Corrected drawing of zone outlines. 2013-12-06 11:25:23 +01:00
Maciej Suminski afe2bbaca7 Corrected polygon outline width. 2013-12-06 10:00:51 +01:00
Dick Hollenbeck 6274740de9 add a concept of an 8 bit string class for testing and experimentation. 2013-12-05 14:36:18 -06:00
Orson 45cd2756a6 merge lp:~cern-kicad/kicad/bugfix_1256302 from Orson 2013-12-05 13:04:06 -06:00
Dick Hollenbeck a2f6faf161 Switch STROKE_FONT::Draw() to take "const wxString&" rather than "wxString" by value. 2013-12-05 12:59:27 -06:00
Dick Hollenbeck ed29423b78 merge lp:~cern-kicad/kicad/bugfix_1256302 from Orson 2013-12-05 12:55:07 -06:00
Maciej Suminski dffacc18ec DIfferent handling of italic texts, depending on the mirroring setting. 2013-12-05 17:00:29 +01:00
Maciej Suminski 24550f3f38 Tilda handling for STROKE_FONT class. 2013-12-05 16:58:32 +01:00
Maciej Suminski 6be27ae2ea Glyphs and their bounding boxes are held in vectors instead of deque.
Moved scaling of font glyphs to the moment when they are created (eliminated a few multiplications unnecessary variables).
Changed some magic numbers into constants.
2013-12-05 16:29:54 +01:00
Maciej Suminski ca11855f12 Changed std::wstring to wxString. 2013-12-05 16:00:24 +01:00
Maciej Suminski 0e7db24049 Fixed SetCurrentContext() assert, that was firing on closure of pcbnew, when the OpenGL backend was active. 2013-12-05 14:54:30 +01:00
Maciej Suminski fc2d8e91c9 Changed selection rules (pads&modules can be selected depending on the 'modules front/back' visibility instead of corresponding copper layers).
Fixed comments.
2013-12-05 14:52:08 +01:00
Maciej Suminski c5a1df6216 ClearHotKey() function. 2013-12-05 14:48:44 +01:00
Maciej Suminski d7fc8db02c Removed warning. 2013-12-05 13:46:13 +01:00
Maciej Suminski aa7168708c Merged upstream 2013-12-05 13:24:27 +01:00
Dick Hollenbeck 7985a4b16b From kicad-install.sh, issue instructional aid on setting KIGITHUB if not already set. 2013-12-04 16:19:55 -06:00
Maciej Suminski 27c7eb5dce The Selection Tool displays information about selected items. ClearSelection() made public. 2013-12-04 10:58:51 +01:00
Dick Hollenbeck 879a6225c2 Add a test script for plugin testing, and some asserts, no bugs fixed. 2013-12-03 12:37:21 -06:00
Maciej Suminski 24a317ce28 The Selection Tool is always active. Removed entries for toolbar menu and hotkeys for the tool. 2013-12-03 17:11:22 +01:00
Maciej Suminski 7d788109fe Merged upstream 2013-12-03 16:43:53 +01:00
Maciej Suminski 07a5774a1e Renamed MOVE_TOOL to EDIT_TOOL. 2013-12-03 16:09:03 +01:00
Maciej Suminski b582162cb5 Split rotate and flip operations into separate functions.
Added Properties action (display properties windows)
2013-12-03 15:57:09 +01:00
Maciej Suminski ad3cb1f36a Added TOOL_MANAGER::RunAction() function. 2013-12-03 15:41:41 +01:00
Maciej Suminski bec2e9b178 Added some comments & asserts. 2013-12-03 15:17:43 +01:00
Maciej Suminski 7678983e38 Fixed non ASCII characters drawing using GAL. 2013-12-03 11:00:52 +01:00
jean-pierre charras ab36d23595 Pcbnew: fix issue in modedit, undo command: moved fields were not drawn afetr undo (due to incorrect flags state)
Fix incorrect initialization of lib names column in EDA_LIST_DIALOG. (Only the row 0 was initialized)
2013-12-03 09:50:58 +01:00
Dick Hollenbeck c6d7ee7e19 Fix important informational comment in library-repos-install.sh 2013-12-02 14:08:13 -06:00
Dick Hollenbeck 81bdafcf55 *) update scripts/kicad-install.sh to use Github plugin for system footprints.
*) Add scripts/library-repos-install.sh for downloading *.pretty libraries and possibly using them.
*) Remove template/fp-* files, they are now at https://github.com/KiCad/kicad-library/template/*
   so they can be maintained by the library team.  However note that it is possible to break
   kicad-install.sh with uncoordinated changes to that github repo.

It is best to delete your ~/kicad_sources/kicad-lib.bzr directory before running kicad-install.sh
at this or any newer version relative to an older library repo.
2013-12-02 12:21:06 -06:00
Maciej Suminski 0e514e93c4 Pcbnew: fixed disappearance of selected items after GAL switching. 2013-12-02 13:04:26 -05:00
Robert Yates 697d95cc86 Boost::Context support for ARM platform. 2013-12-02 10:59:09 -05:00
Maciej Suminski 08fd9d8cbd Overridden ViewUpdate() for MODULE class, so it handles its pads, drawings and texts. 2013-12-02 14:35:05 +01:00
Maciej Suminski 2b0f3350e3 Fixed disappearance of selected items after GAL switching. 2013-12-02 11:34:07 +01:00
Dick Hollenbeck 4a297e7812 library repo name has changed at launchpad, and will soon be switched to github. 2013-12-02 00:59:06 -06:00
Wayne Stambaugh 56e2df79f6 Pcbnew: footprint library table fixes.
* Replace illegal file system characters when reading legacy libraries to
  prevent FPID parsing errors and allow saving to PRETTY file format.
* Create validator to filter illegal file system characters from footprint
  name text edit controls to prevent issues when saving to PRETTY file format.
* Add missing source file licenses and some minor coding policy fixes.
2013-11-29 13:29:41 -05:00
Maciej Suminski 4876dbea24 Storing the selected item position from a context menu. 2013-11-29 16:45:39 +01:00
Maciej Suminski e76a151ee7 Added a missing file 2013-11-29 16:13:09 +01:00
Maciej Suminski 3ce3d22b97 Moved the SELECTION_TOOL out of the KIGFX namespace. 2013-11-29 09:37:23 +01:00
jean-pierre charras 48f9ea2287 eeschema, Pcbnew: fix Bug #1255822 (incorrect position of multiline texts when plotting them) 2013-11-29 09:13:43 +01:00
Dick Hollenbeck a105a1ea4d *.kicad_mod omits (at 0 0) for brevity. 2013-11-28 10:40:23 -06:00
Dick Hollenbeck 224594625a API Documentation improvements, especially noticable when viewing doxygen output. 2013-11-28 09:41:10 -06:00
Maciej Suminski af976b2d36 Automatic unregistration of tool actions during ACTION_MANAGER destruction. 2013-11-28 15:24:19 +01:00
Maciej Suminski c21ae6efca Double click support for the Tool Framework. 2013-11-28 15:19:50 +01:00
Dick Hollenbeck 183afdd089 Even more clarification on "Github" plugin usage 2013-11-27 14:15:11 -06:00
Dick Hollenbeck 1b93203f7c Better GITHUB class header documentation, better eeschema library field dialog stretching and title. 2013-11-27 14:06:41 -06:00
jean-pierre charras cd9da9dd64 Pcbnew: fix Bug #1255568 (relative to .pos file creation). Minor compil warnings fixes 2013-11-27 20:38:59 +01:00
Jon Neal 18dd52385f FIX: Red Hat (and derivatives such as Fedora) support in kicad-install.sh 2013-11-27 08:13:06 -06:00
jean-pierre charras f068c0d94f Pcbnew: Autoplace functions: renamed spread footprint functions. Rewritten.
Now footprints, after loaded by reading a netlist are grouped by sheets by the footprints spread function, and the grouping is better.
Rename 2 files. Fix minor issues. Clean code
2013-11-27 14:20:42 +01:00
Robert Yates 838d5957cf Boost::Context support for ARM platform. 2013-11-27 09:48:31 +01:00
Maciej Suminski 06f4662ea0 Profile counter simplified, so it should be more portable. 2013-11-27 09:46:59 +01:00
Dick Hollenbeck 251f0c7f9b Ensure a unique FootprintEnumerate() return list in GITHUB_PLUGIN when using COW. 2013-11-27 00:51:49 -06:00
Dick Hollenbeck b0c739e7ee *) Implement "Copy On Write" (COW) support in GITHUB_PLUGIN. See class header
comment for GITHUB_PLUGIN which should flow into Doxygen output.
*) Rewrote: 
        PCB_BASE_FRAME::Save_Module_In_Library(): now uses fp-lib-table and PROPERTIES.  
        PCB_EDIT_FRAME::ArchiveModulesOnBoard(): now can archive to any writable library type.
        PCB_BASE_FRAME::SelectLibrary(): is now generic for selecting a library, not just the active library.
2013-11-27 00:04:04 -06:00
Dick Hollenbeck 56615d1653 FIX: work around for wx 2.8 bug affecting wxListCtrl column resizing. 2013-11-26 11:08:07 -06:00
Dick Hollenbeck 96c2bee8c3 PLUGINs which implement FootprintLibOptions() should call base class's implementation too. 2013-11-26 11:06:54 -06:00
Andrey Fedorushkov d8954ca3cf eeschema: fix parts range 1 to 26 in component 2013-11-26 13:15:20 +04:00
Maciej Suminski c6efc451e6 Added ratsnest for GAL 2013-11-25 16:50:03 +01:00
jean-pierre charras 18616d7782 Fix bugs in autoplac.cpp 2013-11-25 12:29:16 +01:00
Andrey Fedorushkov 1b58582e25 pcbnew: fix error build autoplace.cpp in linux gcc-4.8.2
template: add file fp-lib-table.for-eagle
2013-11-25 10:10:24 +04:00
jean-pierre charras 5f01f123de All: GetBoundingBox returns now a const EDA_RECT.
Pcbnew: Code cleaning and bug fix in autoplace functions
Dialog exchange footprints has now a separate button to update the .cmp file, only on request.
2013-11-24 18:48:14 +01:00
jean-pierre charras 78670eebb0 Pcbnew: Fix a crash on exit when an item was previously deleted. Fix not working footprint exchange functions 2013-11-22 20:47:10 +01:00
jean-pierre charras 44bb2e6d4d Pcbnew: Code cleaning and some minor fixes. 2013-11-20 18:26:47 +01:00
Dick Hollenbeck d0c50d5654 Add template fp-lib-table for eagle-6.4.0 2013-11-20 10:38:06 -06:00
Dick Hollenbeck 8df7407b80 FIX: regression loading of SMD pads within EAGLE_PLUGIN::FootprintLoad().
FIX: unique renaming of eagle footprints by substituting illegal : and / with URL encoding technique.
ADD: window resize border to DisplayError() windows.
2013-11-20 10:35:03 -06:00
Wayne Stambaugh 53f33d3941 Pcbnew: minor target properties dialog improvements.
* Make spacing between controls and dialog frame consistent.
* Use default size to allow wxWigdets to determine optimal dialog size.
* Set OK button as default so return key works properly.
2013-11-20 11:03:09 -05:00
Wayne Stambaugh f472b6deb1 Pcbnew: fix assertion when deleting BOARD_ITEM not linked to list. (fixes lp:1252696) 2013-11-19 16:51:33 -05:00
Dick Hollenbeck abfeab02d7 FIX: wx 2.8 convert to UTF8 differently than 2.9 caused problems in DIALOG_FP_PLUGIN_OPTIONS. 2013-11-19 14:38:29 -06: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
Dick Hollenbeck 83a002ff91 Add a place-holder Description to fp-lib-table rows 2013-11-19 12:08:24 -06:00
Dick Hollenbeck f3ad2463e2 *) Switch to later environment variable expansion in fp-lib-table.
*) Save library nickname in APP so upon module editor re-entry last is re-used.
*) Fix bug editing fp-lib-table Description field.
2013-11-19 11:24:45 -06:00
Carl Poirier 468d50317d update fp-lib-table to footprint library renaming efforts. 2013-11-19 11:24:19 -06:00
jean-pierre charras 5a50b968d5 Eeszchema: Minor fixes.
Code cleanup: remove m_Son member in EDA_ITEM which was never used.
2013-11-19 17:27:13 +01:00
Dick Hollenbeck 9546c59fab more useable, in the face of wx 2.8 vs. 3.0 differences. 2013-11-18 16:42:01 -06:00
Dick Hollenbeck b177716b65 Work around wx 2.8 bug in wxListControl not honoring omissing of wxHSCROLL. 2013-11-18 16:03:34 -06:00
Dick Hollenbeck 300a047ffe more EDA_LIST_DIALOG usability enhancements, compiler warning, coding standards 2013-11-18 13:27:27 -06:00
jean-pierre charras cf7dbf6f94 Fix some minor issues 2013-11-18 18:52:18 +01:00
Dick Hollenbeck 7cf3467851 Show the "Description" field from fp-lib-table in pcbnew's module editor 'set current library' dialog. 2013-11-18 10:04:23 -06:00
jean-pierre charras 25bfd82240 Fix a compatibility issue for wxWidgets 3.0, when moving cursor by arrow keys.
Fix a very minor bug (2 duplicate lines when copying version informations to the clipboard)
2013-11-17 17:48:47 +01:00
Dick Hollenbeck 6aabb9bc38 EDA_LIST_DIALOG_BASE is used multiple times for different numbers of
columns.  DIALOG_SHIM would resize each separate usage to the same
size.  DIALOG_SHIM now supports and alternate m_hash_key in lieu
of the class name, optionally.
2013-11-17 00:04:20 -06:00
Baranovskiy Konstantin 94db11a8f6 Fix justification of vertically aligned multi-line text. 2013-11-16 20:31:07 -05:00
Wayne Stambaugh 4c8bff9f71 Eeschema: update component editor new component dialog with revise unit nomenclature. 2013-11-16 20:13:26 -05:00
Dick Hollenbeck 53e8c9b2c2 fix link error with multiply used edaapl.cpp 2013-11-15 09:12:07 -06:00
Dick Hollenbeck 593aa2dc12 Show KISYSMOD in DIALOG_FP_LIB_TABLE even if it has not been referenced by a URI. 2013-11-15 08:36:11 -06:00
Dick Hollenbeck 7196e7bc98 Show KIPRJMOD in DIALOG_FP_LIB_TABLE even if it has not been referenced by a URI. 2013-11-15 08:11:46 -06:00
Dick Hollenbeck c1429f2824 Allowing pre-setting CMAKE_CXX_FLAGS on first CMake invocation 2013-11-15 08:10:29 -06:00
jean-pierre charras 9f9f2ed380 Minor code cleaning: Remove unused file, remove obsolete or useless defines 2013-11-15 10:28:31 +01:00
jean-pierre charras 568a43b917 Minor fix about version information when BUILD_GITHUB_PLUGIN is on 2013-11-15 08:24:10 +01:00
Dick Hollenbeck 1ba6c82f44 TODO.txt 2013-11-14 16:52:28 -06:00
Maciej Sumiński b1facf3e90 add boost dependency on BZip2 by adding find_package( BZip2 REQUIRED ) 2013-11-14 16:51:11 -06:00
jean-pierre charras ccab3ff5ce rtree.h: suppress compil warnings about not initialized vars.
Pcbnew: add WIN32_LEAN_AND_MEAN define in github_plugin.cpp. Note: this define is already in use in avhttp build (Windows specific)
2013-11-14 19:00:57 +01:00
Wayne Stambaugh 0d6efaab94 Minor copy version information improvements.
* Add build type (debug/release) for wxWidgets library  versions greater
  than 2.8.
* Add build type (debug/release) for KiCad.
* Add missing build options.
2013-11-14 09:21:32 -05:00
Wayne Stambaugh b08fa18d7d Update TODO.txt to reflect completed FP_LIB_TABLE items. 2013-11-13 15:57:51 -05:00
Dick Hollenbeck b9bd421184 format string concatenation bug 2013-11-13 13:59:47 -06:00
Dick Hollenbeck d624dcebf2 half way point for Carl's *.mod file renaming work 2013-11-13 13:58:50 -06:00
Maciej Suminski 89b80b2bcd Merged rtree.h, to avoid code duplication.
Fixes the case, when waste is never greater then the worst case and seeds assignment does not occur.
2013-11-13 17:03:22 +01:00
Maciej Suminski 521d73ac5a Fix wx2.8 strings compatibility. (fixes lp:1250876) 2013-11-13 10:27:14 -05:00
Maciej Suminski fc4f9195b6 Fixed wx2.8 strings compatibility. 2013-11-13 15:52:06 +01:00
Dick Hollenbeck 179807922d change 2013-11-12 14:58:33 -06:00
Dick Hollenbeck 943b0678e3 Completion of DIALOG_FP_PLUGIN_OPTIONS 2013-11-12 14:49:17 -06:00
Maciej Suminski e8e6b1f7c4 Commit Launchpad merge request 194664.
* Modify error handling for OpenGL backend.
* Correct Doxygen comments notation.
2013-11-12 14:29:01 -05:00
Brian Sidebotham f10865e5c4 Although CMake keeps time stamps to remember how far it got in an ExternalProject_Add()
build, it throws the time stamps away when there are edits to the CMakeLists.txt portion
pertaining to the external project.  Only a 'make clean' would remove the untarred tree.
This patch removes the need to do a make clean when changing the ExternalProject_Add()
text pertinent to patching.

Fixes bug 1250222 in KiCad-Winbuilder
2013-11-12 12:44:30 +00:00
Dick Hollenbeck dc138512b9 wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser() now returns empty string on abort.
GITHUB_PLUGIN uses redirected URL to remove one HTTP hit time.
2013-11-11 19:14:17 -06:00
Wayne Stambaugh 5821d4bc48 Footprint library table fixes.
* Pcbnew: catch exceptions when saving changes to footprint library table.
* Pcbnew: update footprint viewer library list if open when footprint library
  table changes.
* CvPcb: update library list when footprint library table changes.
* Minor coding policy fixes.
2013-11-11 20:05:23 -05:00
Dick Hollenbeck 76fed4f995 *) Add PLUGIN::FootprintLibOptions( PROPERTIES* ), and extend DIALOG_FP_PLUGIN_OPTIONS to use it.
*) Move button handlers to LEFT MOUSE CLICK from COMMAND events, so wxGrid focus is not lost.
*) Sketch out the concept of COW support for the GITHUB_PLUGIN in its @todo.
2013-11-11 18:17:27 -06:00
Wayne Stambaugh 1f1a88534e Escape " character to fix warning in TokenList2DsnLexer.cmake 2013-11-11 16:39:02 -05:00
Dick Hollenbeck c7bb62290f error: 'uintptr_t' was not declared in this scope.
https://svn.boost.org/trac/boost/ticket/8973
https://svn.boost.org/trac/boost/changeset/84950#file0
2013-11-11 08:50:45 -06:00
Maciej Suminski d250ae5d81 Corrected Doxygen comments notation. 2013-11-11 13:47:08 +01:00
Maciej Suminski 5235d7e5eb Modified error handling for OpenGL backend, now error messages should be visible. 2013-11-11 10:48:49 +01:00
jean-pierre charras a3c02bc377 Pcbnew: fix a build issue when BUILD_GITHUB_PLUGIN is enabled. 2013-11-11 09:01:04 +01:00
Dick Hollenbeck b3b9e96c9a Support only one boost build subset, regardless of BUILD_GITHUB_PLUGIN.
This is so builders with multiple out of source build trees can all use
the same common boost install directory.  And the build system will not
vascillate between the fuller and lesser subsets of boost.
2013-11-10 18:47:54 -06:00
jean-pierre charras 5cea94089a All: under mingw32+msys: fix an issue when using Cmake version >= 2.8.5 which uses by default a response file.
This response file is not expanded under mingw3 2 (mingw/gcc bug?), and the list of include paths, found in this file, is not taken in account.
Now, under mingw32+msys, when not cross-compiling, the response file is disabled.
Cvpcb, Pcbnew: fix a list of libs  which should be added only when cross-compiling:
Previously, they were always added, which creates an issue with mingw/msy/ gcc  2.8.
Now they are added only when cross-compiling (this issue was noticeable only with msys+mingw version  2.8)
2013-11-10 20:15:09 +01:00
Dick Hollenbeck 683a655fa7 python in kicad-install.sh, if user enables it 2013-11-10 00:31:13 -06:00
Wayne Stambaugh 73ca1ed754 Eeschema multiple unit component nomenclature improvements (fixes 1226874).
* Replace all occurrences of the word "part" with "unit" when referring to
  multiple unit components for improved consistency.
* Replace "shared by" with "common to" when referring to objects (lines, arcs,
  pins, etc.) that are common to all units.
* Improve wording in library component properties dialog.
2013-11-09 11:30:49 -05:00
Brian Sidebotham c1466216fd * Remove erroneous comment about requiring perl for OpenSSL build 2013-11-08 17:54:00 +00:00
Brian Sidebotham 60dacd55a4 * Build OpenSSL from source using the OpenSSL-CMake project on Windows with MinGW when no specifying OPENSSL_ROOT_DIR 2013-11-08 07:06:14 +00:00
Colin Cooper 253b62a0e5 kicad-install.h checks if bzr id set 2013-11-07 12:15:58 -06:00
Dick Hollenbeck 9b3d826bc1 switch to static linking of libstdc++ on windows 2013-11-07 08:26:32 -06:00
jean-pierre charras 35b1b13f27 Eeschema: Disable a debug option I enabled and forgot to remove. 2013-11-06 20:36:46 +01:00
Maciej Sumiński bb0f4b9ac3 Patches one by Lorenzo, one by Orson 2013-11-06 11:17:42 -06:00
Dick Hollenbeck eb125838fd add fix_eagle_package_name() and apply it in two places to re-spell eagle package names 2013-11-06 10:53:44 -06:00
Wayne Stambaugh b35fbc0a77 Set project footprint library table path environment variable before loading table. 2013-11-06 11:10:44 -05:00
Dick Hollenbeck 0d69a817e6 kicad-install.sh needed libcairo2-dev prerequisite 2013-11-06 08:37:39 -06:00
jean-pierre charras 99b640584f page layout editor: Add missing Info.plist for OSX.
Mingw, all: remove static link of libgcc, which can create issues when using dll version of wxWidgets.
Therefore libgcc_s_dw2-1.dll should be in the paths for executables.
2013-11-06 08:33:49 +01:00
Dick Hollenbeck 3a821bf8e6 add libglew-dev prerequisite for debian systems, it pulls in libgl1-mesa-dev and libglu1-mesa-dev on its own 2013-11-06 00:14:15 -06:00
Edwin van den Oetelaar 056800997a Running a very common Ubuntu 12.4.3 building from repo could not find the GLEW library. 2013-11-06 00:11:58 -06:00
Wayne Stambaugh a3f0e450ab Eeschema: fix bug loading grid size from previous session. (fixes lp:1239445) 2013-11-05 16:14:09 -05:00
Maciej Suminski bae5780dc3 Fixes missing worksheet layout when there is no PCB loaded and all random brightness changes for the Cairo rendering backend. 2013-11-05 15:22:49 -05:00
jean-pierre charras 44d9607461 Pcbnew: Fix incorrect bounding box calculation of texts. Only noticeable with boards conveted from Eagle, which are using other text justification than center.
Eagle plugin: filter and replace not allowed chars in FPID(-':' and '/')  by _ or -, if they are used in Eagle footprint names (otherwise, boards converted and saved under kicad_pcb format are not readable by Pcbnew).
2013-11-05 18:12:27 +01:00
jean-pierre charras db5409dfc7 Disable patch from Baranovskiy Konstantin about vertical justification of multiline texts, because it does not work for rotated/mirrored texts 2013-11-04 18:20:54 +01:00
jean-pierre charras f956fbd8ac painter: better size of pad nums and pad netnames in opengl mode 2013-11-04 18:18:19 +01:00
Dick Hollenbeck 96912e6b8c filter better the unsupported layers coming into EAGLE_PLUGIN::Load() 2013-11-03 20:09:28 -06:00
Wayne Stambaugh fe54ceacab Fix debug builds on wxWidgets 2.8. 2013-11-03 13:15:46 -05:00
jean-pierre charras e9f41a3b98 Opengl display: fix incorrect text size of pad num and pad netname. 2013-11-03 15:06:16 +01:00
Dick Hollenbeck 1e9cbe8055 Orson's changes 2013-11-02 15:06:13 -05:00
Dick Hollenbeck 5f329b472b make PROPERTIES::Value() not inline 2013-11-02 14:49:46 -05:00
Dick Hollenbeck 42ef7f6215 *) Start removing some of the problematic "<%s>.." format strings, which won't
pass into an HTML rendering panel and otherwise look goofey.
*) Implement BOARD::Move() can call it from EAGLE_PLUGIN::Load().
*) When USE_FP_LIB_TABLE, tolerate blank nicknames in FPIDs coming from eeschema.
   See the switch for this in pcbnew/netlist.cpp as ALLOW_PARTIAL_FPID.
*) Add an assert and a try catch block to figure out that View does not
   like some eagle pcb board.  bitset::set() is getting a -1 value and firing
   an exception.
2013-11-01 19:24:38 -05:00
jean-pierre charras 9e61c6ce1b Footprint wizards: fix issues. 2013-11-01 21:51:37 +01:00
jean-pierre charras 8caef8f8b1 Make footprint wizards compatible with FPID changes (MODULE::SetLibRef changed to MODULE::SetFPID) 2013-11-01 16:29:50 +01:00
jean-pierre charras a7c553b442 Pcbnew, compiled with python support: Under windows, force python environment, if the folder python27_us is found in Kicad bin folder (<kicad>/bin, and if python27_us environment is not fully set (i.e. if python27_us is not in the path, or if PYTHONPATH id not defined.) 2013-11-01 14:02:10 +01:00
Orson 28b9317640 Fix redraw issue in modedit a modview, with GAL 2013-11-01 13:56:20 +01:00
Maciej Suminski c94603f103 Added some comments and missing parameter names for pcb_painter.h. 2013-11-01 10:06:50 +01:00
Dick Hollenbeck 53e04ce7a6 cvpcb was not filtering on the current library when USE_FP_LIB_TABLE.
<%s> being replaced with '%s' because the former in invisible in html panels.
Cure some compiler warnings.
2013-10-31 16:30:57 -05:00
Dick Hollenbeck 0ca123d255 add --uninstall-libraries to kicad-install.sh 2013-10-31 14:12:14 -05:00
Wayne Stambaugh 1173eff777 Shorten footprint library table environment variable KICAD_PRJ_PATH to KIPRJMOD. 2013-10-31 09:08:36 -04:00
jean-pierre charras b8d81d263c Pcbnew: fix a crash when a non ascii char (i.e. a char having a code > 127) is found in a text (see Bug #1246340).
Could be only a temporary fix (tested only with French non ascii chars).
2013-10-30 21:07:52 +01:00
Dick Hollenbeck e4825ee2fc more fp_lib_table dialog work 2013-10-30 10:33:51 -05:00
Dick Hollenbeck 07d31b9cfd merge lp:~cern-kicad/kicad/pcbnew_segfix from Orson 2013-10-30 07:46:36 -05:00
jean-pierre charras 629c932952 Add undo command to dxf file import. Change improper use of __WXDEBUG__ to DEBUG in class_board_connected_item.cpp. 2013-10-30 13:14:45 +01:00
Maciej Suminski c8fc149ae5 Fixed segfault occurring on rendering backend switch when pcbnew is run from the main KiCad dialog. 2013-10-30 11:50:09 +01:00
Dick Hollenbeck 416c44615a memory leak, comments 2013-10-30 00:14:11 -05:00
Dick Hollenbeck c1ec14bcac merge in a year's worth of CERN work 2013-10-29 19:10:24 -05:00
Maciej Suminski edc43c19cd Fix colorized framebuffer output on some GPUs. 2013-10-29 17:53:47 +01:00
Maciej Suminski f615c462a2 Changed the used framebuffer object extension from ARB_framebuffer_object to EXT_framebuffer_object (compatibility reasons). 2013-10-29 17:28:29 +01:00
Maciej Suminski e13f862145 Merged upstream. 2013-10-28 21:34:06 +01:00
Maciej Suminski c7bc1e151c GAL is not activated by default. Late OpenGL backend initializatization. 2013-10-28 16:51:56 +01:00
jean-pierre charras 3e3869ed80 dxf import: minor enhancements in dialog. Update libdfxw from git, and uncrustify it. add a test dfx file 2013-10-28 09:06:38 +01:00
Wayne Stambaugh f0b2565f12 Eeschema find/replace bug fixes and improvements (fixes 1208616).
* Fix replace bug to handle case sensitivity properly.
* Fix replace bug where the item index was getting updated incorrectly.
* Fix replace infinite loop bug on replace all.
* Make find/replace view update code a separate function.
* Rearrange find/replace trace string to add tracing to EDA_ITEM::Replace().
* Add IsComplexHierarchy method to SCH_SHEET_LIST for future find/replace
  improvements.
2013-10-27 14:21:53 -04:00
jean-pierre charras 2229b5ff77 Fix typo 2013-10-26 20:17:44 +02:00
jean-pierre charras 6a9ed328a4 Pcbnew, dxf import: Add dialog to choose the board import layer, and the position of dxf coordinates origin 2013-10-26 09:03:06 +02:00
jean-pierre charras 7e3551d371 Add patch from Baranovskiy Konstantin about vertical justification of multiline texts.
Fix issues created by this patch.
Note, this fix slightly changes the vertical position of these texts.
This is not really a  problem in eeschema, but in pcbnew this is perhaps  more annoying, if the verical multiline text is critical.
Fix a very minor issue  for vertical justification of single line texts in dxf import.
2013-10-25 14:16:18 +02:00
jean-pierre charras 40eb9c9cc2 Pcbnew: First work to add a DXF file import to create board outlines. The DXF import is based on DXF lib import/export from LibreCad. 2013-10-24 20:47:07 +02:00
jean-pierre charras 55e9b4d1b6 Add a DXF file import to create board outlines 2013-10-24 18:44:38 +02:00
Dick Hollenbeck e8ad48adf4 more DIALOG_FP_PLUGIN_OPTIONS work, make PROPERTIES a map instead of a hashtable for alphabetical iteration. 2013-10-24 08:58:05 -05:00
Dick Hollenbeck 75f2e5446e script improvements 2013-10-24 08:57:01 -05:00
Dick Hollenbeck 1731e89508 *) Factor out Cut, Copy, and Paste for wxGrid into class common/GRID_TRICKS.
*) Use it on 3 grids total in DIALOG_FP_PLUGIN_OPTIONS and DIALOG_FP_LIB_TABLE.
*) Fix bug when pasting "(fp_lib_table" text into FP_LIB_TABLE.
2013-10-23 13:56:03 -05:00
Dick Hollenbeck 2033181bd8 fixes 2013-10-23 06:40:17 -05:00
Dick Hollenbeck c4d29b4258 Grab pending (unsaved) wxGridCellEditor cell text and stuff into fp_lib_table. 2013-10-22 14:29:37 -05:00
Dick Hollenbeck 5862306295 When pasting into a fp_lib_table with no initial rows, start at column zero, not -1. 2013-10-22 09:29:48 -05:00
Dick Hollenbeck 1c3f23ba1d Distro specific architecture in scripts/kicad-install.sh. 2013-10-22 09:28:30 -05:00
Camille 019 712392b118 Tidy up the gcc 4.7.0 - 2 optimization setting methodology. 2013-10-22 09:26:26 -05:00
jean-pierre charras 27c00853a3 Pcbnew: fix bug 1199340 2013-10-20 17:39:15 +02:00
jean-pierre charras 503ee825c9 All: fix bug making IsOK dialog always returns false, regardless the button clicked. 2013-10-19 15:22:24 +02:00
jean-pierre charras b0e2908c9b pl_editor: add a PPI (pixel per inch) setup option for bitmaps. 2013-10-19 12:29:54 +02:00
jean-pierre charras 6bb62a7196 Remove duplicate files.
Page layout editor: Add bitmap items to the page layout existing items.
Now a bitmap image can be added to a page layout description. Currently the bitmap is expected having a 300 ppi definition.
Note: not all plotters can plot a bitmap, and in this case the bounding box is plotted instead of the bitmap
2013-10-18 19:38:03 +02:00
Wayne Stambaugh 9e9450e272 Fix bug due to change in the default global footprint library table file name. 2013-10-18 12:06:18 -04:00
jean-pierre charras 7acc3e67ce page layout editor: now one can add a bitmap to the page layout 2013-10-18 17:42:48 +02:00
Wayne Stambaugh 612ba67c10 Minor message box improvements
* Create a generic yes/no/cancel dialog from DIALOG_EXIT.
* Make DIALOG_EXIT return wxID_YES instead of wxID_OK so it is consistent
  with the standard message dialogs.
* Add missing license to confirm.h and confirm.cpp.
* Change Eeschema message dialog when loading a schematic if the current
  schematic is modified to be more consistent with the exit dialog.
* Change Pcbnew message dialog when loading a board if the current board
  is modified to be more consistent with the exit dialog.
* Remove some Eeschema block debug logging code left over from my last
  commit.
2013-10-18 09:32:22 -04:00
Dick Hollenbeck a44e2c821e fix template files installation 2013-10-18 08:18:45 -05:00
jean-pierre charras 7622d6c985 Remove duplicate files 2013-10-18 12:33:50 +02:00
Andrey Fedorushkov 5c4a3a08e0 fix auto install template files 2013-10-18 10:01:59 +04:00
Dick Hollenbeck 939ef4ad59 Add support for building *.deb file using CPack, install ~/fp-lib-table either from kicad-install.sh or from make install_user_configuration_files 2013-10-17 14:03:36 -05:00
Dick Hollenbeck 4e4f422814 .bzrignore was ignored. 2013-10-17 14:02:11 -05:00
Dick Hollenbeck b8c228114b add {Get,Set}ModuleLibraryNickname to EDA_APP, reformatting 2013-10-17 14:01:35 -05:00
Dick Hollenbeck 37c3ef503f fix expansion of dialog on stretching and initial view 2013-10-17 13:59:54 -05:00
Dick Hollenbeck e8ee26344f fix formatting goofs 2013-10-17 13:47:46 -05:00
Dick Hollenbeck 8609dfe283 Throw exception if accessing a GITHUB library from build not supporting GITHUB. 2013-10-17 13:46:20 -05:00
Dick Hollenbeck 1eab1f7a88 add script to build KiCad on Ubuntu/Debian/Mint linux 2013-10-17 10:33:46 -05:00
Wayne Stambaugh 25a1277247 Add PDF output to Pcbnew plot dialog. (fixes 1p:1188972) 2013-10-15 14:22:35 -04:00
Wayne Stambaugh efb96bcce9 Eeschema block end handler code improvements.
* Merge HandleBlockEnd() and HandleBlockEndByPopUp() into as single block
  end function HandleBlockEnd().
* Replace all instances of HandleBlockEndByPopUp() with HandleBlockEnd().
* Change block hot keys to send command events instead of directly calling
  end block handler.
2013-10-15 12:18:30 -04:00
Maciej Suminski bd03ca1fce Hides the GAL subwindow in cvpcb module view frame. 2013-10-15 15:15:29 +02:00
Brian Sidebotham bec78be1a1 Temporarily disable Boost.Context library build as it breaks MinGW builds by bringing in a dependency on MASM (The Microsoft Assembler) 2013-10-15 11:42:26 +01:00
Maciej Suminski 5249b1a6da Renamed TOOL_MOUSE_BUTTONS constants to avoid name conflict with Windows MB_RIGHT constant. 2013-10-15 10:41:00 +02:00
Maciej Suminski 853b32df30 Merge 2013-10-14 20:41:56 +02:00
Maciej Suminski bc305859b2 Mainly case changes. 2013-10-14 20:40:36 +02:00
Dick Hollenbeck 3869cf4e10 Planning for PCB_BASE_FRAME::Save_Module_In_Library and PCB_EDIT_FRAME::ArchiveModulesOnBoard rewrites 2013-10-14 11:54:00 -05:00
jean-pierre charras 082b8326de Pcbnew: Fix issue when displaying net names and/or pad numbers including the "<" char in drc dialog, because drc dialog uses an wxHtmlWindow to display drc messages, and the "<" char has a special meaning and is not allowed in texts (now replaced by the" &lt;" sequence in messages displayed in html)
Eeschema: replace "<" and ">" by "(" and ")" in autogenerated net names, to avoid other issues in html messages.
Very minor other fixes.
2013-10-14 18:03:38 +02:00
Wayne Stambaugh 62764cd618 Fix Pcbnew block rotate hot key and minor code cleaning. 2013-10-14 11:29:16 -04:00
Maciej Suminski 0ac3e1fbf2 Namespace KiGfx->KIGFX.
template<> -> template <>
Some more reformatting according to uncrustify results.
2013-10-14 16:13:35 +02:00
Maciej Suminski 7c52014712 Fixed unnecessary comment 2013-10-14 14:45:01 +02:00
Maciej Suminski f1c3ea1c3c Fixed unnecessary comment 2013-10-14 14:42:35 +02:00
Maciej Suminski 22045b61ea Converted tabs to spaces. Removed trailing whitespaces. 2013-10-14 13:43:57 +02:00
Maciej Suminski ac489ece7b Merged 'development' 2013-10-14 11:41:43 +02:00
Maciej Suminski 4b6c6a5c98 Merged 'testing' 2013-10-14 11:40:14 +02:00
Maciej Suminski 75bb84704d Added error messages for OpenGL framebuffer errors. This should eliminate quiet segfaults in case of drivers that cannot handle multiple attachment points for framebuffers. 2013-10-14 11:39:21 +02:00
Maciej Suminski 31dbe2d2f4 Marked pnsrouter as dependent on boost 2013-10-14 08:37:58 +02:00
Wayne Stambaugh c674314859 Fix bug when creating initial global footprint library table on Windows. 2013-10-13 20:14:52 -04:00
Dick Hollenbeck afd6f292e7 *) Switch over to FP_LIB_TABLE::Footprint*() functions.
*) Set environment variable KISYSMOD before loading FP_LIB_TABLE so that
   FP_LIB_TABLE::ROW::SetFullURI() can do substitution up front.
*) De-emphasize the lib path in some of the footprint frames but keep it
   so the footprint editor can export a current library to another.
   You can even export a GITHUB library to a pretty library for local 
   installation.
*) Start the PLUGIN options editor.
*) Enhance cursor positioning in DIALOG_FP_LIB_TABLE.
2013-10-13 16:33:58 -05:00
jean-pierre charras 7f64899591 specctra_export.cpp: fix a bug in my export function to 3D viewer which generates bad shapes for holes generated by outlines
inside the main board outlines.
specctra_export.cpp: always approximate arcs in outlines by 36 segm for 360 degrees,
even for arc angle which differs from 90 degrees.
90 degrees is the default when creating an arc, but the arc value can be edited and have any value between 0 and 360 degrees.
Previously, 9 segments were used regardless the arc angle.
2013-10-13 18:47:11 +02:00
Wayne Stambaugh 8580d87ef7 Footprint library table improvements.
* Add save table and set project path environment variable code to
  FP_LIB_TABLE object.
* Add code to Pcbnew and CvPcb to set project path environment variable.
* Create empty footprint table in Pcbnew when new board created.
* Save current project specific footprint library table to path on file save
  as or empty project path.
* Fix a bug in Pcbnew in file save function that would silently overwrite
  an existing board file.
* Disable selecting the current library in the module editor when there are
  no libraries defined.
* Catch exceptions and report errors when writing footprint library tables.
* Fix Boost build CMakeFile to fix bug when bootstrapping a Boost build in
  MSys.
2013-10-13 12:29:20 -04:00
jean-pierre charras a8e57e10e8 Remove wxUSE_UNICODE definition from CMakeLists.txt, because this define comes from wxWidgets and should not be made inside kicad
Remove KICAD_GOST option because it is  now useless: the 2 GOST options are now selectable at run time and are:
* specific page layouts (now user definable, and the GOST page layouts are available in template folder)
* notation for multiple parts per package (made in eeschema, preference menu)
2013-10-11 18:24:43 +02:00
Maciej Suminski 2e2bea3b0c Fixed IDs for the push and shove router menu 2013-10-11 14:26:09 +02:00
Maciej Suminski c33564c6df Removed unused variable. 2013-10-08 10:17:49 +02:00
Brian Sidebotham 7c340f6b19 * Fix building of Github plugin support for Windows using Mingw-w64
* Pre-built binaries for OpenSSL can be used from the LuaDist project: https://github.com/LuaDist/openssl/releases
* Building of Boost libraries fixed for Mingw-w64 for github plugin
2013-10-07 20:49:44 +01:00
jean-pierre charras 602aa1682c 3D-viewer: minor fixes and enhancements 2013-10-07 18:39:39 +02:00
jean-pierre charras 28f55e2abf 3D-viewer: minor fixes and enhancements 2013-10-07 16:50:23 +02:00
jean-pierre charras 5614ba009a Pcbnew: 3D view: Better 3D rendering (fix some artifact issues). Add a realistic rendering mode. 2013-10-07 13:51:08 +02:00
Wayne Stambaugh 191cc6d16d Fix footprint library editor bug.
* Don't convert footprint library path to wxFileName.  This removes a '/'
  from the GIT_HUB_PLUGIN uri which causes wxUri to choke and the incorrect
  plug in is selected.
2013-10-05 19:41:40 -04:00
Dick Hollenbeck ec7f26f54b FP_LIB_TABLE::ROW::SetFullURI() does environment variable substitution up front.
We can now remove a few calls to FP_LIB_TABLE::ExpandSubstitutions( const wxString& aString )
since its being done in above function.

DIALOG_FP_LIB_TABLE now handles table to copy cut copy paste from global to
project and reverse.  Fixed a problem with cursor position management when
switching between tables.
2013-10-05 05:34:55 -05:00
Dick Hollenbeck 248788f381 Put FP_LIB_TABLE::Footprint*() functions on stage, but comment out lazy plugin lookup trick in FindRow() until these new API functions are used. 2013-10-04 23:53:15 -05:00
Dick Hollenbeck d82c3b9ab1 DIALOG_FP_LIB_TABLE: disable row resizing, get rid of tooltips on grids 2013-10-04 23:41:15 -05:00
Dick Hollenbeck bf97bf891b AutoSizeColumns(), and search for "(fp_lib_table" not "(fp_lib_table " 2013-10-04 23:21:58 -05:00
Dick Hollenbeck a90975d11c FP_LIB_TABLE::ROW::SetType() ensures sensible value of "KiCad" if nothing good comes in. 2013-10-04 17:40:25 -05:00
Dick Hollenbeck e0a0f596e2 Add keyboard support to DIALOG_FP_LIB_TABLE grid interface:
CTL+X, CTL+V, CTL+A, CTL+C
2013-10-04 17:23:53 -05:00
Dick Hollenbeck bf26962f72 CTL_OMIT_PATH patch 2013-10-04 17:23:04 -05:00
Dick Hollenbeck d77f95af15 Rebase a subset of Footprint*() PLUGIN API onto FP_LIB_TABLE 2013-10-04 14:09:10 -05:00
Dick Hollenbeck 205aa43379 Fix FP_LIB_TABLE::ROW operator=(), was not copying "description" field.
Remove tooltips from fp_lib_table wxGrid, were annoying and munging wxGrid's grid.
Change initial size of DIALOG_FP_LIB_TABLE.
2013-10-04 10:58:32 -05:00
jean-pierre charras ab8016abc4 3D viewer: Preference menu: fix a bug which displays incorrectly the actual display options state (always shown off) when starting the 3D viewer 2013-10-04 16:52:09 +02:00
jean-pierre charras 229879345e 3D board display: better rendering of the board: the board polygon outlines (generated by the specctra function which calclaltes outlines) is now used to create the 3D body of the board,
in pcbnew and cvpcb.
2013-10-04 16:32:59 +02:00
jean-pierre charras 7a2593832d Fix Cmakelists issues 2013-10-04 14:48:50 +02:00
jean-pierre charras 79443fdbe5 Move specctra.cpp, specctra_import.cpp and specctra_keywords.cpp compilation to pcbcommon lib because they containt functions used by the 3D viewer in Cvpcb and Pcbnew. 2013-10-04 14:22:33 +02:00
jean-pierre charras dd64b2f284 3D board display: better rendering of the board: the board polygon outlines (generated by the specctra function) is now used to create the 3D body of the board. 2013-10-04 10:42:09 +02:00
Brian Sidebotham 964933db00 Removed some Microsoft Visual C centric definitions in CMakeModules/config.h.cmake which were tripping up the mingw-w64 build 2013-10-03 23:53:42 +01:00
Dick Hollenbeck e45ed220f9 DIALOG_FP_LIB_TABLE does not use wxSplitterWindow, it would not obey.
Paste popup menu in this dialog now allows pasting a (fp_lib_table)
s-expression element holding (lib) elements.  This provides an 
opportunity for GITHUB library publishers to put the table description
into their README.md file as a (fp_lib_table) element where it can
be quickly copied to clipboard and pasted into the fp lib table dialog.
This is a paste operation, and overwrites from the initial cursor position.
2013-10-03 17:12:56 -05:00
Dick Hollenbeck 8234966a3a if https:// GET fails, report the URL 2013-10-03 10:12:25 -05:00
Dick Hollenbeck 44ca3530b0 throw better IO_ERROR message on bad GITHUB URL, improved formatting and comments. 2013-10-03 08:40:00 -05:00
Dick Hollenbeck 65b0343be1 fix: https://answers.launchpad.net/kicad/+question/233824 2013-10-02 15:25:44 -05:00
Maciej Suminski 3c738faed6 Renamed WORKSHEET_ITEM to WORKSHEET_VIEWITEM. 2013-10-02 14:26:14 +02:00
Maciej Suminski 54946f46f7 Fixed memory leak caused by ViewUpdate() with VIEW_ITEM::GEOMETRY/LAYER parameters. 2013-10-02 13:57:21 +02:00
Maciej Suminski ff3c2bb66b Worksheet is not selectable anymore. 2013-10-02 12:02:25 +02:00
Maciej Suminski 460dcfc621 Removed SELECTION layer. 2013-10-02 11:39:08 +02:00
Maciej Suminski 24af7490bb Added missing ViewUpdate flag 2013-10-02 11:25:04 +02:00
Maciej Suminski 0b7305a823 Fixed reset for the selection tool. 2013-10-02 11:21:17 +02:00
Maciej Suminski 2ee858072f Moved VIEW_GROUP creation to the selection tool. In this way selected items are always drawn on overlay, not only when dragged. 2013-10-02 10:21:05 +02:00
Maciej Suminski 86000832fe Added typedefs for VIEW_GROUP iterators. Fixed improper order of layer drawing for VIEW_GROUP items. 2013-10-02 10:19:48 +02:00
Maciej Suminski 87a9964c78 VIEW_GROUP now does not change depth during drawing. Introduced functions for manipulating stored items.
FIxed problem of overlay being covered by other layers while panning.
Few minor fixes.
2013-10-01 16:55:33 +02:00
Maciej Suminski e013f3e8c2 Comments, refactoring 2013-10-01 10:21:32 +02:00
Dick Hollenbeck 8c87d71e74 Make environment variable wxGrid/table read-only in the fp lib table dialog.
Fix throwing of IO_ERROR in plugin.cpp by converting function name to wxString.GetData().
Switch to const PROPERTIES* in GITHUB PLUGIN functions.
2013-09-30 16:26:49 -05:00
Maciej Suminski d2618caabc Added missing file 2013-09-30 16:28:21 +02:00
Maciej Suminski 43b5aa4c8d Fixed Mac OS build & removed one warning. 2013-09-30 09:45:42 +02:00
jean-pierre charras 25b20c5564 Gerbview: fix incorrect printing of negative objects, when using black and white option
Enhancement in Excellon file reader: accept Feed Rate and Spindle Speed definitions in Tool information line (but does not use them)
Eeschema: better name for m_SheetList (changed to m_SheetPath) member of class NETLIST_OBJECT.
2013-09-30 08:36:40 +02:00
Maciej Sumiński a6a1af9d75 Restored previous version of math_utils.h. WARNING: Mac OS build is probably broken now. 2013-09-29 21:29:28 +02:00
Maciej Sumiński d895a90bdc Fixed selection disambiguation menu for wx2.8 2013-09-29 21:23:45 +02:00
jean-pierre charras d368739731 Gerbview: fix incorrect printing of negative objects, when using black and white option.
Eeschema: better name for m_SheetList (changed to m_SheetPath) member of  class NETLIST_OBJECT.
2013-09-29 20:24:38 +02:00
Maciej Sumiński 6409f7f96b wxWidgets 2.8 compatibility fix (removed wx/kbdstate.h) 2013-09-29 14:25:04 +02:00
Maciej Sumiński 53fef8d4c4 Fixed menu entry ids for the p&s router context menu. 2013-09-29 13:56:32 +02:00
Maciej Sumiński e1290101aa Fixed strings for wxWidgets 2.8 2013-09-29 12:57:20 +02:00
Wayne Stambaugh 473a724b9a Fix wxWidgets 2.8 compile error. 2013-09-28 18:53:55 -04:00
Maciej Suminski 35721397bd Moved common actions to a separate file. 2013-09-27 20:52:34 +02:00
jean-pierre charras 1ae681454a Eeschema: fix isssues in net names selection for not named nets (i.e. nets without labels) 2013-09-27 19:58:58 +02:00
Maciej Suminski 6b74b5771a Even more code comments and reformatting. 2013-09-27 18:51:21 +02:00
Maciej Suminski 3f320e4d68 Some more comments and code formatting. 2013-09-27 16:23:43 +02:00
jean-pierre charras f2e5da63e3 Eeschema: netlist generation: fix bad choice for the "best net name" when selecting a net name between labels connected to the same net.
Code cleanup and remove unused file.
2013-09-27 14:30:35 +02:00
Maciej Suminski 6e0c7a938c Added missing header 2013-09-27 14:29:07 +02:00
Maciej Suminski 5e3030ee89 Merge kicad-pns-mac 2013-09-27 12:06:59 +02:00
Maciej Suminski 936e0be090 Uncrustified the push&shove source, fixed some warnings. 2013-09-27 10:00:26 +02:00
Maciej Sumiński 5598acb617 Uncrustifying push&shove router 2013-09-26 23:53:54 +02:00
Wayne Stambaugh 5927f026b3 Footprint viewer improvements and code cleaning.
* Use wxAuiManager perspective to save and load window settings which should
  allow us to start using more advanced wxAui features like detachable tool
  bars and windows.
* Remove sash size change events, event handler, and sash width clamping code
  since it didn't work all that well anyway.
* Disable the close button on the footprint view pane.
* Update the footprint list box selection when iterating the list using the
  tool bar arrow buttons.
* Merge code from modview.cpp into modview_frame.cpp and remove modview.cpp.
2013-09-26 13:22:35 -04:00
Maciej Suminski 87b3f2e499 Added Init() to TOOL_INTERACTIVE, allowing to set up things that are needed to be initialized only once.
TOOL_ACTIONs can be run from CONTEXT_MENU after adding them.
Move tool actions are available to be run from CONTEXT_MENU displayed after right mouse button click on selected items.
Added some asserts to check the code.
2013-09-26 18:38:58 +02:00
Dick Hollenbeck 5f0679bf6e comment/doc cleanups 2013-09-26 10:02:46 -05:00
Maciej Suminski e6c20adc5a Fixed premature highlighting of options in CONTEXT_MENU. 2013-09-26 14:29:47 +02:00
Maciej Suminski 12b8714aff Different way of handling CONTEXT_MENU in the selection tool. Removed some unnecessary lines. 2013-09-26 14:09:56 +02:00
Maciej Suminski 61066fa608 Added functions for handling hotkeys, interface for adding TOOL_ACTIONs to CONTEXT_MENU.
Less objects are allocated dynamically.
CONTEXT_MENU is being run using its copy (it saves a hassle of following the lifetime of object).
2013-09-26 14:09:18 +02:00
Maciej Suminski 7b7a331645 Added some const modifiers. 2013-09-26 11:22:59 +02:00
Dick Hollenbeck 4f7c7eb174 Make pretty prettier by striving for single line module pads. Add slick std::string based strprintf(), twice. 2013-09-26 00:29:54 -05:00
jean-pierre charras a0fbe422c7 Eeschema: Rework on netlist generator: code cleaning and enhancement.
Mainly, fix an annoying issue about not named nets:
now, these nets are named from the component references and pin names which are connected.
therefore, unless the net or the footprint references are modified, the net name is not modified between 2 netlist calculations.

Netlist generation code still needs some code enhancement (mainly removing the global g_NetObjectslist variable).
2013-09-25 21:37:28 +02:00
Dick Hollenbeck f72394cc6b Make PLUGIN::Footprint*() API functions take 'const' PROPERTIES*.
Add const PROPERTIES* to FootprintDelete().
Add {Get,Set}Properties() to FP_LIB_TABLE::ROW.
Touch up fp table dialog.
2013-09-25 14:17:06 -05:00
jean-pierre charras daeeee5617 Eeschema: Rework on netlist generator: code clenenig and enhancement.
Fix an annoying issue about not named nets:
now, these nets are named from the component references and pin names which are connected.
therefore, unless the net or the footprint references are modified, the net name is not modified between 2 netlist calculations.
2013-09-25 21:09:57 +02:00
Wayne Stambaugh 4afae65110 Fix debug build error in pcbnew/dialogs_fp_lib_table.cpp. 2013-09-25 09:51:54 -04:00
Dick Hollenbeck 98eaacdd6b turn off new linker map generation in pcbnew 2013-09-24 16:26:23 -05:00
Dick Hollenbeck 74ce031e62 Set PROPERTIES* into FP_LIB_TABLE::ROW, which is a parsed (binary) form of the 'options'.
Write parser and formatter for options.  Write dialog verification used before saving
FP_LIB_TABLEs, triggered from OK button in table editor.
Switch PROPERTY's value column to std::string from wxString.
Add event handler to fp lib table dialog for upcoming options dialog.
2013-09-24 16:23:13 -05:00
Wayne Stambaugh 85777d6569 Pcbnew footprint library plug in fixes and minor code cleaning.
* When loading footprint do not retest every footprint in cache.  Only test
  the footprint being loaded.  Fixes long load times on libraries with a lot
  of parts.
* Fix footprint name bug where file extension was added to the end of the
  footprint name.
* Fix bug in path equivalence test due to Posix path separators in footprint
  library table.  Convert paths to native separator before comparison.
* Fix a bug in FOOTPRINT_VIEWER_FRAME::OnActivate() which cause the footprint
  list to always get reloaded when using footprint library tables.
* Remove some unnecessary debugging messages.
* Add a few Doxygen comments to FP_CACHE in kicad_plugin.cpp.
2013-09-24 14:45:57 -04:00
Maciej Suminski d1578e4e1a Fixed cvpcb build. 2013-09-24 16:12:02 +02:00
Maciej Suminski 1624320749 Added protection from redrawing while GAL backend is being switched. 2013-09-24 16:00:21 +02:00
Maciej Suminski c4ad58f2a8 Added rotate & flip to the pcbnew.InteractiveMove tool, hotkeys for them and undoing all the operations on cancelling the tool. 2013-09-24 15:49:43 +02:00
Maciej Suminski 1de8eba49e Added functions for refreshing the layer set occupied by a VIEW_ITEM. 2013-09-24 15:48:04 +02:00
Maciej Suminski 96d162c907 Added possibility to cancel a tool that is not on the top of the tool stack. 2013-09-24 15:47:07 +02:00
Dick Hollenbeck 7125da8a45 Set FPID on GITHUB_PLUGIN::FootprintLoad() 2013-09-23 10:57:15 -05:00
Dick Hollenbeck ecca7434e1 GITHUB_PLUGIN now builds under the scripting DSO on linux.
Enhance IO_MGR::GuessPluginTypeFromLibPath() to support the GITHUB plugin.
Build boost with -fPIC on Linux unconditionally, in preparation for
DLL/DSO build of kicad.
Add python script to test back to back reads of GITHUB plugin.
2013-09-23 10:19:39 -05:00
Maciej Suminski 7837dfa3ac Fixed build for Mac OS 2013-09-23 17:02:25 +02:00
Maciej Suminski 171857a7a8 FIxed TOOL_EVENT::Modifier() (now it returns value for current modifier, not only if there is one active or not). 2013-09-23 10:02:01 +02:00
Wayne Stambaugh 076c2c762a Pcbnew footprint library table fixes.
* Make footprint editor work properly with library table.
* Fix bug in Eagle plugin when comparing file timestamps.
* Fix bug in footprint viewer when error occur loading footprints from
  the selected library.
* Fix error message display by in footprint viewer on library load error.
2013-09-22 13:20:46 -04:00
Dick Hollenbeck de4cceb245 unique FPL_CACHE class names 2013-09-21 23:38:22 -05:00
Dick Hollenbeck 153aee8eda GITHUB_PLUGIN now works and can be used under Linux immediately.
Other platforms to follow as volunteers test support and get openssl in 
place.
2013-09-21 22:57:40 -05:00
Dick Hollenbeck 0a3e76a74d OOPS, add missing file for Windows GITHUB_PLUGIN 2013-09-21 22:24:11 -05:00
Wayne Stambaugh 0f4ba09545 Pcbnew footprint library table fixes.
* Make footprint viewer work properly with library table.
* Fix bug in Eagle plugin when enumerating footprints.
* Add missing P-CAD plugin from footprint library table editing dialog.
* Fix bug in FOOTPRINT_INFO::LoadLibraries when error occur loading footprints
  from libraries.
2013-09-21 20:28:02 -04:00
Build System 5e53232f0c Fixes typo in doxygen-python, and fixes unitest TestCase().discover on python < 2.7 2013-09-22 02:34:15 +04:00
Miguel Angel Ajo be7d0c8feb missing QA tests for the python scripting QA 2013-09-22 00:27:41 +02:00
Miguel Angel Ajo 48334f6650 scripting QA tests, initial implementation 2013-09-22 00:04:59 +02:00
Miguel Angel Ajo 45de27baba Scripting build tools moved and renamed 2013-09-22 00:03:02 +02:00
Dick Hollenbeck 87e378c14d BUILD_GITHUB_PLUGIN will build GITHUB_PLUGIN on Linux now. Don't know if the parser works yet, but the FootprintEnumerate() function worked in testing. 2013-09-21 14:20:31 -05:00
jean-pierre charras e9713bb291 Pcbnew: Block selection enhancement, from Bug #593997 (whishlist)
1. block created from-left-to-right selects only 100%inside selection objects (as it now does)
2.block created from-right-to-left selects all overlapping objects inside selection
From the patch sent by mathieulj (mathieulj), and some fixes and code cleaning.
2013-09-21 20:09:41 +02:00
jean-pierre charras d5ecafd5af Fix some minor issues in hotkey dialogs 2013-09-21 19:09:08 +02:00
Dick Hollenbeck 3053d45b15 temporarily disable GITHUB_PLUGIN 2013-09-21 11:07:26 -05:00
Dick Hollenbeck b2267ec703 temporarily disable GITHUB_PLUGIN 2013-09-21 11:06:15 -05:00
Dick Hollenbeck 579f28862b BUILD_GITHUB_PLUGIN issues. 2013-09-21 09:48:37 -05:00
Dick Hollenbeck 95b67c8bf8 remove some headers, no good for my head 2013-09-21 02:45:25 -05:00
Dick Hollenbeck 4a2f86932a Early GITHUB_PLUGIN hopefull-ness 2013-09-21 02:30:23 -05:00
Build System a602c1b2fe Adds target to build doxygen-python documentation, that take
pcbnew.py + doxygen-xml files, and build .i files with docstrings,
those .i files are included back again to build a pcbnew.py with
extended documentation from C++, finally we take the final pcbnew.py
to build the doxygen-python documentation
2013-09-20 21:01:21 +04:00
Maciej Suminski 7db595da31 Added missing files 2013-09-20 18:21:01 +02:00
Maciej Suminski 8e472c736a Merged upstream. 2013-09-20 17:54:35 +02:00
Maciej Suminski a991cb4470 Changed the way of refreshing canvases (both standard & GAL). 2013-09-20 17:29:32 +02:00
Dick Hollenbeck 4f78403463 BOM generators now report count of "interesting" components, rather than total components 2013-09-20 10:11:45 -05:00
Maciej Suminski b39d562aea Restored previous function names. 2013-09-20 16:32:11 +02:00
Maciej Suminski c00533a150 Merged kicad-gal 2013-09-20 15:48:27 +02:00
Maciej Suminski d4d801204f Added cursor for the move tool 2013-09-20 15:01:08 +02:00
jean-pierre charras 0ae31f3ecb Pcbnew: better dialogs to select the active layer or a layer pair. Add an option (hotkey+popup menu) to place a via and select the new active layer
(useful for boards having more than 2 layers)
Eeschema:fix compatibility with old schematic files, when they  contain ERC markers.
Pcbnew: better test for allowed layers when creating/editing Dimensions and some other Graphic items
Drc:  fix comments and messages for some drc tests.
Fix minor bugs in cleanup dialog options and plot solder mask function (thanks to Lorenzo to locate these bugs)
2013-09-20 12:52:33 +02:00
Dick Hollenbeck 1e8430d53d Lorenzo's help enabled a fix to UTF8 support in csv.writer in python bom generators. 2013-09-19 18:50:30 -05:00
Maciej Suminski 2c03bf4109 Removed TA_ActivateTool (now tools are invoked by sending TA_Action event, with the tool name as string parameter).
Developed TOOL_Action class & added ActionManager. Hot keys registered by tools are processed.
Selection & move tool can be invoked by a hot key.
2013-09-19 17:02:57 +02:00
Maciej Suminski eb784536af Moved GalLayersOrder from layers_id_colors_and_visibility.h to PCB_BASE_FRAME. 2013-09-19 09:55:37 +02:00
Maciej Suminski fd973478dd Merged kicad-pns-tom. 2013-09-19 09:33:07 +02:00
jean-pierre charras c7531d6c38 Fix minor bugs in cleanup dialog options and plot solder mask function (thanks to Lorenzo to locate these bugs) 2013-09-18 21:22:25 +02:00
jean-pierre charras bb39956057 Fix minor bugs in cleanup dialog options and plot solder mask function (thanks to Lorenzo to locate these bugs) 2013-09-18 21:21:11 +02:00
tomasz.wlostowski@cern.ch 979f549e99 A very short insturction for the P&S Router. 2013-09-18 20:11:21 +02:00
tomasz.wlostowski@cern.ch 0d4b71ef3c Merged Orson's latest changes. 2013-09-18 20:10:55 +02:00
tomasz.wlostowski@cern.ch 87dccc9f81 P&S router: some missing files 2013-09-18 19:56:37 +02:00
tomasz.wlostowski@cern.ch db62d672d2 Initial version of the P&S router. Buggy and crappy. 2013-09-18 19:55:16 +02:00
Maciej Suminski 9ec4520c45 Added missing files 2013-09-18 19:51:57 +02:00
tomasz.wlostowski@cern.ch 74f42a6241 geometry/rtree.h: fix compiler warnings 2013-09-18 19:37:56 +02:00
Maciej Suminski 9b16651607 Added limits for VIEW scale values & panning area. 2013-09-18 17:36:54 +02:00
Maciej Suminski 56c78d44bf Moved Type() method from EDA_ITEM to VIEW_ITEM. 2013-09-18 17:04:07 +02:00
Maciej Suminski dcb5d8f25c Merged Tom's branch 2013-09-18 16:59:08 +02:00
tomasz.wlostowski@cern.ch 75b59d8fa4 PCB_EDIT_FRAME: public SetTopLayer() method 2013-09-18 13:37:20 +02:00
tomasz.wlostowski@cern.ch 1112d279c5 PCB_PAINTER: fix segfault when item has no net assigned 2013-09-18 13:16:57 +02:00
tomasz.wlostowski@cern.ch 88ee288465 VIEW_CONTROLS: added ForceCursorPosition() and ShowCursor() methods 2013-09-18 13:15:42 +02:00
Wayne Stambaugh 5202ec58c7 Fix std::string to wxString conversion bug in Pcbnew. (fixes lp:1226670) 2013-09-18 07:15:17 -04:00
tomasz.wlostowski@cern.ch dea793209d VIEW: added GetTopLayer() method 2013-09-18 13:14:57 +02:00
tomasz.wlostowski@cern.ch 23298886a1 geometry: killed compiler warnings 2013-09-18 13:14:13 +02:00
tomasz.wlostowski@cern.ch d8480e4674 gal: make the cursor a bit bigger and hidden by default 2013-09-18 13:13:03 +02:00
Wayne Stambaugh 6fb731189c Fix two more FPID empty string parsing bugs. 2013-09-17 11:51:05 -04:00
Wayne Stambaugh 028b0bd3f3 Fix board parsing error when module name is empty. (fixes lp:1226546) 2013-09-17 10:03:16 -04:00
Maciej Suminski 3f6fa86190 Fixed random color of worksheet border. 2013-09-17 14:46:48 +02:00
Maciej Suminski 300c066b68 The last fix to selection rules. 2013-09-17 13:47:33 +02:00
Maciej Suminski 867067aa9c Selection in high contrast mode selects only items that are shown as active. 2013-09-17 11:32:47 +02:00
Maciej Suminski c5c65d366d Selection box color is put into render settings. Selection layer is removed from active layers. 2013-09-17 11:23:00 +02:00
Maciej Suminski f53dafd496 Modules are marked to be on copper layer too. 2013-09-17 11:21:42 +02:00
Maciej Suminski 3d0753c920 Added get functions for high contrast mode fields. 2013-09-17 11:19:15 +02:00
Wayne Stambaugh 0224bc2f58 Fix but reading empty footprints in netlist. (fixes lp:1226283)
* Remove fp_lib token from board and s-expr netlist file format.
* Fix a bunch of Doxygen warnings.
* Remove some extra debug log messages.
2013-09-16 20:52:08 -04:00
Wayne Stambaugh 7de43e4aec Fix broken CvPcb footprint preview. (fixes lp:1226272) 2013-09-16 19:56:45 -04:00
Maciej Suminski ab21124b71 Reenabled snapping for tools. 2013-09-16 16:46:02 +02:00
Maciej Suminski 8e0674b724 Unified marking of selected items. 2013-09-16 16:18:43 +02:00
Maciej Suminski 373c8d6441 Changed to worksheet border color to match the rest of the worksheet layout. 2013-09-16 15:19:48 +02:00
Maciej Suminski 7207de9bea Fixed bounding box for dimension. 2013-09-16 14:44:03 +02:00
Maciej Suminski 8a1c97ea56 More careful check on the net number while drawing net labels for tracks. 2013-09-16 11:08:31 +02:00
Maciej Suminski 573f9841df Better way of marking 'brightened' mode for items. 2013-09-16 11:00:59 +02:00
Maciej Suminski 86f520f76e Sorted out headers. 2013-09-16 09:52:47 +02:00
Maciej Suminski 9fbf45ebfc Fixed drawing outlined track segments. 2013-09-16 09:51:53 +02:00
Maciej Suminski e0f3e2900b Changed alignment. 2013-09-16 09:51:24 +02:00
Wayne Stambaugh ce409e3699 CvPcb footprint library table implementation.
* Add code to CvPcb to handle assigning component footprints from the
  footprint library table instead of the search path method.
* Add code to CvPcb to allow editing of the footprint library table.
* CvPcb footprint and component panes display fully qualified FPID names.
* Make CvPcb library pane display footprint library table nicknames instead
  of library file names.
* Add code to FP_LIB_TABLE object to test the paths in the table against the
  list of libraries loaded from the project file.
* Add code to FP_LIB_TABLE to convert assigned footprints in a NETLIST from
  legacy format to footprint library table format.
* Split out COMPONENT_NET, COMPONENT, and NETLIST objects from netlist_reader
  files and create new pcb_netlist files.
* Fix minor wxListView scroll bar sizing issues.
* Add new token and code to save and load FPID nickname in board file.
* Add new token and code to save and load FPID nickname in s-expression net
  list file.
* Add WX_STRING_REPORT object to dump strings to a wxString object.
2013-09-14 16:33:22 -04:00
Maciej Suminski b907e74d37 Added more required layers for pads (adhesive, solder paste & solder mask) 2013-09-13 17:45:40 +02:00
tomasz.wlostowski@cern.ch 886a3e937a Merged Orson's branch 2013-09-13 15:45:03 +02:00
tomasz.wlostowski@cern.ch 299f424345 geometry: r-tree based shape index 2013-09-13 15:43:33 +02:00
Maciej Suminski 9adbdd803a Added missing functions for checking type of keyboard event 2013-09-13 15:31:19 +02:00
Maciej Suminski 782867f7b3 Caps for lines are drawn only when segments are wider than 1.0 2013-09-13 15:30:45 +02:00
tomasz.wlostowski@cern.ch 00ecafe94f common/profile.h: fix incorrect #endif 2013-09-13 15:28:51 +02:00
tomasz.wlostowski@cern.ch 228a9451f7 polygon: added poly2tri library.
Requied for constrained Delaunay triangulation (P&S/ratsnest) and zone tesselation (GAL).
2013-09-13 15:28:20 +02:00
tomasz.wlostowski@cern.ch 7b0531fdd1 SEG: added SquaredLength() method 2013-09-13 15:25:03 +02:00
Maciej Suminski 4c2e3b9a59 Removed unnecessary debug message 2013-09-13 15:05:57 +02:00
Lorenzo Marcantonio 87290e5248 Add missing file 2013-09-13 12:59:47 +02:00
jean-pierre charras 50242fd54d Pcbnew: Fix Bug #1224656 2013-09-13 11:58:51 +02:00
jean-pierre charras bc8a3c7bf3 Add export netlist IPC-D-356 from Lorenzo Marcantonio, with very minor fixes. 2013-09-13 11:57:31 +02:00
Lorenzo Marcantonio l. 1883370387 Add export netlist IPC-D-356 from Lorenzo Marcantonio, with very minor fixes. 2013-09-13 11:49:55 +02:00
Maciej Suminski e00c8e92cb Removed VIEW_LAYER.isDirty flag. 2013-09-13 11:38:16 +02:00
Maciej Suminski 42860b5d02 Changed VIEW::PrepareTargets() to more appropriate name VIEW::ClearTargets(). Added SELECTION layer to always-on-top list. 2013-09-13 11:28:47 +02:00
Maciej Suminski f9cc914960 Mouse movement events are sent during autopanning, as the cursor position changes in the world coordinates (even if it stays still in the screen coordinates). It allows tools to update their state, as if the mouse was moved. 2013-09-13 10:26:08 +02:00
Maciej Suminski d9ff4b851a Currently selected layer is displayed on the top. 2013-09-12 18:24:53 +02:00
Maciej Suminski 82fe1a4972 Merged Tom's branch 2013-09-12 17:42:28 +02:00
tomasz.wlostowski@cern.ch ac871702ce added note why there's no P&S sources yet... 2013-09-12 11:49:24 +02:00
tomasz.wlostowski@cern.ch f85bf48a4b EDA_DRAW_PANEL_GAL: redraw stuff in a single place, with "coalescing"
Redraws can be requested way too often than it is required. This commit adds redraw timeout:
- if the view became dirty and there has been no redraw for longer than certain time, it is redrawed immediately
- otherwise, we wait for the next frame

This in general improves smoothness of rendering.
2013-09-12 11:40:16 +02:00
tomasz.wlostowski@cern.ch 660d4cc6c9 CONTEXT_MENU: null pointer check bugfix. 2013-09-12 11:36:19 +02:00
tomasz.wlostowski@cern.ch c3759d870c COLOR4D: added Saturate(), FromHSV(), ToHSV() methods.
Used in highlighting/routing code.
2013-09-12 11:35:42 +02:00
Maciej Suminski bfdad27893 Fixed rollback of traces movement. 2013-09-12 10:54:11 +02:00
Maciej Suminski 8f5e6badc4 Removed selection disambiguation in case when there is a choice between a footprint and a smaller component (smaller components have priority). 2013-09-12 10:46:22 +02:00
Maciej Suminski 382c6bd201 Move tool is activated when drag event starts nearby selected items. 2013-09-12 10:24:23 +02:00
Maciej Suminski b04de0cada Fixed memory leaks in containers. 2013-09-12 09:44:57 +02:00
Maciej Suminski d13355f7fe Removed some potential memory leaks. 2013-09-11 19:37:52 +02:00
jean-pierre charras c029dc398b Eeschema: fix compatibility with old schematic files, which can contain markers.
Pcbnew: better test for allowed layers when creating/editing Dimensions and some other Graphic items
Drc: fix comments and messages for some drc tests.
To do: fix issues in active layer selection when creating a track and layer pair selection dialog
2013-09-11 17:30:21 +02:00
Maciej Suminski f179183dea Removed some dead code. 2013-09-11 16:38:40 +02:00
Maciej Suminski 90a3b97c2f Added drawing of worksheet layout. 2013-09-11 14:42:12 +02:00
Maciej Suminski e2f5b2779f Changed lifetime of RENDER_SETTINGS (now they are accessible right after PAINTER object is created). 2013-09-11 12:09:22 +02:00
Maciej Suminski afe2e27b0a Moved GetColor() from PAINTER to RENDER_SETTINGS. Fixed recaching of custom items. 2013-09-11 11:39:46 +02:00
Maciej Suminski c5d3376c26 Changed some 'magic numbers' into constants. Added const modifier in appropriate spots. 2013-09-11 11:34:10 +02:00
Maciej Suminski cd56848326 Added one more function to convert colors. 2013-09-11 11:11:27 +02:00
Maciej Suminski 7d4aed1099 Fixed COLOR4D( EDA_COLOR_T aColor ) and added asserts. 2013-09-11 10:30:39 +02:00
tomasz.wlostowski@cern.ch 9eb3916852 Merged kicad-gal-orson 2013-09-10 19:32:19 +02:00
tomasz.wlostowski@cern.ch fa817b7475 pcbnew: start integrating P&S router 2013-09-10 19:26:44 +02:00
tomasz.wlostowski@cern.ch b73474bda6 VIEW_GROUP: added FreeItems() method 2013-09-10 19:25:02 +02:00
tomasz.wlostowski@cern.ch f14db7c78c TOOL_MANAGER: open menu on right mouse button when requested 2013-09-10 19:23:15 +02:00
tomasz.wlostowski@cern.ch 9daa1ab52a TOOL_DISPATCHER: improve mouse handling 2013-09-10 19:22:38 +02:00
Maciej Suminski 6d15131231 Some more missing D()->DBG() changes. 2013-09-10 17:07:46 +02:00
Maciej Suminski 08e797551b Modified default grid/origin settings. 2013-09-10 14:35:10 +02:00
Maciej Suminski 082f3f9bb4 Added const modifiers where applicable. 2013-09-10 14:31:52 +02:00
Maciej Suminski 5659dd479e PCB items are refreshed on GAL switching (changes made using default renderer are displayed by GAL). 2013-09-10 13:57:28 +02:00
tomasz.wlostowski@cern.ch 6ac8188f7f common: minimum version of the shape library 2013-09-10 13:43:09 +02:00
Maciej Suminski 4f0aa1c07c Changed D() macro to DBG() because of conflict with glm::D().
Added const to GetColor() and GetType() functions in WS_DRAW_ITEM.
2013-09-10 10:47:42 +02:00
Maciej Suminski 87da6a8ad3 Fixed hanging up of menu loop when user never moves mouse cursor into popup menu area. 2013-09-09 17:12:03 +02:00
tomasz.wlostowski@cern.ch b0357ce9a7 PCB_PAINTER: added public GetLayerColor() method 2013-09-09 17:08:52 +02:00
tomasz.wlostowski@cern.ch b0694e0333 EDA_DRAWPANEL_GAL: set focus on mouse enter to catch all key events 2013-09-09 17:07:03 +02:00
tomasz.wlostowski@cern.ch da2f63bf31 math/vector2d.h: removed unused code, correct rounding in Resize() 2013-09-09 16:56:18 +02:00
tomasz.wlostowski@cern.ch 20eedfd7dc math/math_util.h: fixed signedness bug in rescale() 2013-09-09 16:55:01 +02:00
tomasz.wlostowski@cern.ch 6639c2d8db math/box2.h: normalize on construction, minor compilation warning fix 2013-09-09 16:53:33 +02:00
Maciej Suminski d0749a3a52 Small refactoring. 2013-09-09 14:31:27 +02:00
Maciej Suminski 8a4417ec46 Fixed color for drawing polygons on overlay. 2013-09-09 14:31:13 +02:00
Maciej Suminski cba1e0bf91 Stops autopanning on left mouse button release. 2013-09-09 13:57:56 +02:00
Maciej Suminski 5e3ab406e2 Enabled snapping for the move tool. 2013-09-09 11:45:20 +02:00
Maciej Suminski 0dc587e2ef Tools are enabled to switch snapping cursor to grid. 2013-09-09 10:54:11 +02:00
Maciej Suminski dbbe628b8c Modified interfaces for [WX_]VIEW_CONTROLS. 2013-09-09 10:53:46 +02:00
Maciej Suminski d2c47a74f2 Parts of MODULEs are not selectable in multiple selection mode. 2013-09-09 10:10:02 +02:00
Maciej Suminski 31f7ecc16a First version of the move tool. 2013-09-09 09:34:52 +02:00
Wayne Stambaugh 230c5f8f5a Convert footprint definitions from wxString to FPID.
* Use FPID instead of wxString in MODULE object.
* Use FPID instead of wxString when loading and saving files.
* Use FPID in COMPONENT object.
* Add wxString helper functions and comparison operators to FPID.
* Add fp_lib token to pcb and netlist file formats.
* Add code to load and save FPIDs to pcb file format.
* Fix segfault when deleting invalid footprint library tables in Pcbnew
  in non footprint library table build.
* Fix bug when counting the number of mod files in
  EDA_APP::SetFootprintLibTablePath();
2013-09-08 14:31:21 -04:00
Maciej Suminski f1b0ffd3d7 Changed focus owner of LayerWidget to EDA_DRAW_PANEL_GAL to make keyboard events work (apparently everything works fine, to be tested more extensively).
Removed unnecessary event hook from EDA_DRAW_PANEL_GAL.
2013-09-06 17:53:01 +02:00
Maciej Suminski c012554daa Starts the GAL by default. 2013-09-06 17:06:33 +02:00
Maciej Suminski 8658d90663 Some more spots where the GAL refresh was required. 2013-09-06 17:06:02 +02:00
Maciej Suminski d213a26057 Smarter selection algorithm (does not allow to select both whole MODULE and its parts at the same time).
Cancel event works better (selection box does not appear after cancelling the selection tool).
Removed blinking selection box effect.
Model is accessed in more appropriate way (getModel() method).
2013-09-06 16:04:12 +02:00
Maciej Suminski f2b4c7a18b Added a few comments. 2013-09-06 16:01:46 +02:00
Wayne Stambaugh 9ab7c18f46 Footprint library table ground work.
* Remove defined CMAKE_INSTALL_PREFIX for Windows from main CMakeList.txt.
* Move footprint library path detection code from pcbnew.cpp to EDA_APP
  object.
* Add CMAKE_INSTALL_PREFIX to config.h.cmake.
* Simplify and fix search path list code.
* Add CMAKE_INSTALL_PREFIX to the list of search paths in case KiCad was
  installed using `make install`.
* Add default global footprint library table to CMake install.
* Add method to set footprint library table to PCB_BASE_FRAME object.
* Remove unused function EDA_APP::GetLibraryFile().
* Minor FP_LIB_TABLE object improvements.
2013-09-06 08:17:33 -04:00
Maciej Suminski ab4cb862b0 Solved refreshing issues. 2013-09-06 11:31:16 +02:00
Maciej Suminski f04df9d79c Fixed hotkeys for switching rendering backends. 2013-09-06 10:19:53 +02:00
Maciej Suminski f93d297cb5 Some comments. 2013-09-04 16:25:57 +02:00
Maciej Suminski bf3690d841 More effective way of updating bounding boxes. IsCached() method made public. Removed some of unused fields from the layer description structure. 2013-09-04 16:23:26 +02:00
Maciej Suminski 000f1122b1 Moved selection marking boxes to a different layer. 2013-09-04 16:18:37 +02:00
Maciej Suminski 44bafd1c8f Improved selection rules. Added some comments to the selection tool. 2013-09-04 10:56:06 +02:00
jean-pierre charras 36ae78ff94 pcbnew: fix wxWidgets 2.8 compatibility issue (temporary fix, still have a minor cosmetic issue), and add missing file. 2013-09-03 21:37:52 +02:00
Maciej Suminski 55744d1e9a Fixed Cairo's render target setting. 2013-09-03 17:46:05 +02:00
jean-pierre charras ede208f3cb Pcbnew: use pcb layer box selector in dialog graphic item properties and pcb text properties. 2013-09-03 14:48:38 +02:00
Maciej Suminski 2a45987d46 Module texts are now moveable, rotatable and flippable. 2013-09-03 14:15:37 +02:00
Maciej Suminski 8a0157069b Support for trapezoidal pads. 2013-09-03 13:51:53 +02:00
jean-pierre charras b7b972d8ad Rework on layer box selector, to use it in dialogs (currently the active layer selector, the layer pair selector and the dimension editor dialog.
This rework solves Bug #1214545.
Work in progress: many dialogs do not yet use the layer box selector.
2013-09-02 17:49:29 +02:00
jean-pierre charras 902e5ccee5 pcb layer box selector: ajust size when modifying the layer names, to show the full name. 2013-09-02 17:26:52 +02:00
Maciej Suminski f4ec1e729e Allow invoking GAL tools, only if GAL is active. 2013-09-02 16:44:13 +02:00
Maciej Suminski ee3f47ae51 Added autopanning to the selection tool. 2013-09-02 16:29:10 +02:00
Maciej Suminski 8e88a621ba Corrected behaviour of drag panning while autopanning is enabled. 2013-09-02 16:26:42 +02:00
Maciej Suminski e8083ae808 Added some comments and changed names of classes to match the coding rules. 2013-09-02 14:21:12 +02:00
Maciej Suminski fef50dd81e Changed way of naming VIEW_ITEM update flags to be more explicit.
VIEW_ITEMs save the layer numbers they use, it allowed to speed up removal of items.
2013-09-02 11:49:46 +02:00
jean-pierre charras 047749a8dc minor changes and refinement in class pcb layer box 2013-09-02 11:06:17 +02:00
jean-pierre charras 684bfad0af Cleaning code for PCB_LAYER_BOX_SELECTOR class, and use it in edit dimension dialog. 2013-09-01 20:38:11 +02:00
Dick Hollenbeck 93eeb75c8f Use via layers which are determined in only one place, this is a cheap trick to support blind vias in the export. 2013-09-01 12:59:28 -05:00
Dick Hollenbeck e3c104d69e Add <aliases> and <alias> to generic netlist XML format, required by new bom_csv_grouped_by_value.py support. 2013-09-01 12:52:46 -05:00
Dick Hollenbeck 0ba6f998c8 Clarify, extend, and rename ky*.py to kicad_netlist_reader.py.
Significantly enhance the bom_csv_grouped_by_value.py BOM generator.
IMO it at this moment, the best BOM production tool for KiCad.
2013-09-01 12:49:01 -05:00
Brian Sidebotham b6110bfcc3 * Fix Bug 1219239 - EESCHEMA crashes when editing a template field in libedit through the context menu 2013-08-31 16:53:46 +01:00
jean-pierre charras eb1f89d02e add missing files 2013-08-30 21:37:56 +02:00
jean-pierre charras 6c14eee672 Pcbnew: Redesign layer selection and layer pair selection (give them a look near the Layer selector in toolbarr) 2013-08-30 21:28:31 +02:00
Maciej Suminski d0fc362ec6 Fixed warning. 2013-08-30 14:43:18 +02:00
Maciej Suminski 01d4080e47 Added selection box for DIMENSION. 2013-08-30 14:02:57 +02:00
Maciej Suminski fb9a4c2bfc Added stacking for tools. 2013-08-30 10:37:26 +02:00
Maciej Suminski 424aa28e1f Added SELECTION_TOOL::GetSelection() 2013-08-30 10:23:18 +02:00
Maciej Suminski 89849cdfa7 Unified Set/GetPosition() for BOARD_ITEMs. 2013-08-29 12:06:06 +02:00
Maciej Suminski edea2f9112 Reduced displayed events information. 2013-08-29 12:03:57 +02:00
jean-pierre charras 51eaeccf03 Pl_Editor: fix some minor issues. 2013-08-29 09:20:09 +02:00
jean-pierre charras 90029a4e1f Pcbnew: enhancements for blind/buried vias placement ( separate keys to add a buried via or a through via), and save" blind/buried vias allowed" option in .kicad_pcb file
Minor code cleaning.
Allows compiling under wxMSW-2.8.12, only for test purposes, because there are serious bugs for Kicad under wxWidgets version < 2.9.3.  (compil warning generated for these versions)
2013-08-28 19:32:49 +02:00
jean-pierre charras 90b820a52c Pcbnew: enhancements for blind/buried vias palcement, and save blind/buried vias allowed option in .kicad_pcb file 2013-08-28 18:14:39 +02:00
Maciej Suminski bd8998d1da Fixed cursor drawing for OpenGL. 2013-08-28 17:06:07 +02:00
Maciej Suminski 6fe086ab6d Added cursor snapping. 2013-08-28 16:25:42 +02:00
jean-pierre charras 0b48116119 Add missing file 2013-08-28 09:29:48 +02:00
jean-pierre charras 9af4ea4014 Add pl_editor_doc.icns, from Orson. Fix Bug #1217504 (bad look of Module Properties Dialog, 3D fields).
Add Dick's workaround in plot_board_layers.cpp to try to avoid crash in solder mask calculations, due to a bug in boost::polygon, in resize function.
2013-08-28 09:23:14 +02:00
Maciej Suminski 215f35e237 Added mouse cursor drawing.
Added flipping mode.
2013-08-27 18:08:32 +02:00
Maciej Suminski 32e962e8ee Merged upstream and Mac OS X build fixes. 2013-08-27 11:03:06 +02:00
Maciej Suminski a7e963bd6f Fixed GLEW library detection for Mac OS X. 2013-08-27 10:32:39 +02:00
Maciej Suminski 379f04af80 Added missing Mac OS X icons for the pagelayout_editor. 2013-08-27 10:14:26 +02:00
Dick Hollenbeck a7e32b03b9 switch to newer boost version. 2013-08-26 15:19:04 -05:00
Dick Hollenbeck 0c2e03ae32 enhanced beautification, better formatting, upgrade to 0.60 uncrustify.cfg 2013-08-26 15:15:00 -05:00
Maciej Suminski 9b52e9dd89 Fix for wxWidgets 2.9.5 2013-08-26 14:23:17 +02:00
Maciej Suminski 6ee32b9912 Fixed the 64 bit build. 2013-08-26 14:08:32 +02:00
Maciej Suminski 3962464190 Fixed linking errors for apps other than pcbnew. 2013-08-26 10:43:22 +02:00
jean-pierre charras c40f5917c1 Pcbnew: speedup netlist read, when some footprints are not found, by caching the non-existent footprint names, which are searched only once in libs.
When a non existent footprint is used by many components, this footprint was previoulsy searched in libs for each component, which is very time consumming.
2013-08-24 15:03:59 +02:00
jean-pierre charras 8cca89ffbe Pcbnew: read netlist enhancements: add option to remove single pads nets, add enforce tests to report non existing netnames in zones.
Fix also some very minor errors in comments.
2013-08-24 10:08:55 +02:00
jean-pierre charras 3d40bd7e16 Pcbnew: add more test when reading a netlist file: verify if all pads found in netlist are found in corresponding footprints (no missing pads). 2013-08-23 11:22:19 +02:00
Maciej Suminski b03f97b991 Removed some unnecessary stuff and added some comments to WX_VIEW_CONTROLS. 2013-08-23 10:56:52 +02:00
jean-pierre charras 4428d69a63 Pcbnew: Fix a bug when reading a netlist which forces pcbnew to read lib files to find a footprint even if the right footprint is already loaded (which explains the long time to load netlists)
Netlist dialog: add option to report only most important messages. Useful for large boards.
class REPORTER: add features to allow a basic message filtering (flags to report all/warning/error messages)
Fix Bug #1214599 ( tools are deselected on Move command )
2013-08-23 08:38:57 +02:00
Maciej Suminski 961a8c2eca Added autopanning functionality to WX_VIEW_CONTROLS. 2013-08-22 18:42:53 +02:00
Maciej Suminski 875c0f7062 Modified InvokeTool(), so besides resetting the tool, it also send an ActivateTool event.
Added generation of CancelTool event upon ESC key press.
Minor bugfix.
2013-08-22 15:07:34 +02:00
Maciej Suminski 1057d5a5be Changed reaction of SELECTION_TOOL to ToolCancel event (first event clears selection, second one deactivates the tool). 2013-08-22 15:05:37 +02:00
Maciej Suminski 6b3742b76b Mark layers as dirty on VIEW_ITEM removal. 2013-08-22 15:04:14 +02:00
Maciej Suminski 89a138c09e Added handling keyboard events for the Tool framework. 2013-08-21 17:37:27 +02:00
Dick Hollenbeck 0be3992913 Lay basis for a more full featured usage of boost, including compiled libraries such as unit_test_framework, system, etc. Move headers now into boost_root/include/boost/. 2013-08-20 13:03:21 -05:00
Lorenzo Marcantonio e04860d61b Fixed issues when opening a pagelayout from the command line 2013-08-20 15:44:42 +02:00
Maciej Suminski 5adba827a6 Added VIEW_GROUP for grouping items to be displayed on a single layer. 2013-08-20 15:07:38 +02:00
Maciej Suminski 61ba40aa7e Added InvokeTool() and FindTool() functions. 2013-08-20 14:49:08 +02:00
Maciej Suminski 43ae1cb98d Smarter way of the overlay rendering (overlay is always refreshed, while cached&noncached targets only if the viewport or items have changed). 2013-08-19 11:02:38 +02:00
Maciej Suminski e87eea7abc Reformatting. 2013-08-19 09:47:36 +02:00
Maciej Suminski e697a2c41c Functions for direct item drawing. 2013-08-19 09:44:50 +02:00
jean-pierre charras f2055f6c5d Pl_Editor: fix crash on Linux when closing Pl_Editor 2013-08-19 09:08:13 +02:00
jean-pierre charras d04ab1fe75 Pl_Editor: fix minor issues in multi-lines texts
Others: fix very minor issues.
2013-08-18 17:49:04 +02:00
Brian Sidebotham 87eb527d67 * Fix the last parts of Bug 1204712 by removing DateAndTime from library file and documentation file formats. They weren't being loaded anyway. 2013-08-16 23:31:37 +01:00
Wayne Stambaugh 33b8142b71 Fix layer alignment target default size. 2013-08-16 14:41:09 -04:00
Wayne Stambaugh 2afe1eab7a Fix MinGW build issue for missing isinf() in PolyLine.cpp. 2013-08-16 10:25:34 -04:00
Marco Mattila 7e1aef2200 Pcbnew: fix filleting of zones with parallel adjacent edges 2013-08-16 14:51:35 +03:00
Lorenzo Marcantonio ddff71c11b - Rogue int as LAYER_MSK (will break with more than 32 layers)
- Comment fix
2013-08-15 17:20:25 +02:00
Maciej Suminski aabd2a46d0 Build fix. 2013-08-15 16:23:54 +02:00
Maciej Suminski 9bd7ba36ac Added resetting of tools after loading a new board. 2013-08-15 10:20:49 +02:00
Wayne Stambaugh 761023f6bc Eeschema bus label test bug fixes. (fixes lp:1209424)
* Use a regular expression to enforce more stringent bus label testing.
* Add validator to edit label dialog to prevent space character from being
  used in labels.
2013-08-13 19:04:41 -04:00
jean-pierre charras 336d1b23f9 Pcbnew: fix Bug #1211468
Pl_Editor: fix copyright in files. Enhancement when creating new items.
2013-08-13 19:51:22 +02:00
Maciej Suminski 1b7593f403 Fixed win32 builds. 2013-08-10 11:14:16 +02:00
Dick Hollenbeck 31461a9b53 REMOVE: vias from specctra DSN export which are not in a netclass. Use only netclass based via sizes in freerouter.
Some of the vias in the class-less list were setting the drill hole size to zero and this made no sense to freerouter.
2013-08-09 14:05:04 -05:00
Dick Hollenbeck cc7a070b63 User longer, more dis-ambiguating text for Show button 2013-08-09 14:03:26 -05:00
jean-pierre charras 6e102489dd Replace the wxFilePickedCtrl in Option Page dialog by an usual wxButton + wxTextCtrl, because under wxWdgets 2.8.12 the look and the behavior is very different between Windows and Linux. 2013-08-09 19:36:45 +02:00
jean-pierre charras 5817c99a4a Replace the wxFilePickedCtrl in Option Page dialog by an usual wxButton + wxTextCtrl, because under wxWdgets 2.8.12 the look and the behavior is very different between Windows and Linux. 2013-08-09 18:19:52 +02:00
Maciej Suminski 723424df07 Added some comments. 2013-08-09 15:21:31 +02:00
Maciej Suminski d73d153665 Added selection boxes for texts. 2013-08-09 15:04:10 +02:00
Maciej Suminski 6af09fedda Added the additive mode for the selection area. 2013-08-09 10:18:48 +02:00
jean-pierre charras 1293c026f7 Eeschema: fix Bug #1210120 2013-08-09 08:51:14 +02:00
Maciej Suminski 2cb6e59dfd Multiple items selection tool. 2013-08-08 19:42:19 +02:00
Maciej Suminski 80901c69cf Reformatting. 2013-08-08 19:41:20 +02:00
Dick Hollenbeck d0a69ac7b7 EHNANCE: add a "Show" button to the two text field properties
dialogs which allow editing of component properties.  The button
is active when the table row cursor is on the DATASHEET field only.
When active, and your datasheet is a URI, then your default
browser will be launced to show that datasheet if it can find it.
This incentivizes use of http:// links for datasheets.
2013-08-08 11:12:41 -05:00
Dick Hollenbeck 92baa531f3 ENHANCE: specctra export Edge.Cuts "endpoint mismatch error message" was not showing exact coordinates with sufficient resolution 2013-08-08 11:11:50 -05:00
Dick Hollenbeck e5a94ff994 FIX: removed unwanted indent in *.kicad_pcb files ahead of "placed" and "locked" 2013-08-08 11:09:49 -05:00
Maciej Suminski 12e10fd43a Reformatting. 2013-08-08 14:59:59 +02:00
Maciej Suminski 282995eaee Fixed disambiguation menu issue. 2013-08-08 14:50:32 +02:00
Maciej Suminski 402f3c6f2c Added brightened mode for selecting items using disambiguation menu. 2013-08-08 12:30:00 +02:00
Maciej Suminski cc5c038362 Added selection box for modules. 2013-08-08 11:53:29 +02:00
Maciej Suminski 16437e5d45 Added general purpose overlay layer and moved selection box to it. 2013-08-08 11:43:56 +02:00
Maciej Suminski 8c37e70889 Different approach to item recaching. 2013-08-07 17:20:01 +02:00
jean-pierre charras 69c880e088 Eeschema: fix a crash when plotting a schematic.
Pcbnew: footprint wizard dialogs: minor fixes, and fixes a not working parameters dialog under Windows, due to an incorrect Printf format.
remove scripts/packagesrc.sh, fully outdated (still refers svn repo)  and not commented.
2013-08-07 15:22:59 +02:00
jean-pierre charras 45155ff0af merge with trunk 2013-08-07 12:13:54 +02:00
Maciej Suminski ee80c7f674 Some more reformatting and adding copyright notices. 2013-08-07 11:20:12 +02:00
Maciej Suminski 62ea71fcae Fixed layers caching settings. Added some comments. 2013-08-07 10:52:50 +02:00
Maciej Suminski e050133c07 Simplified color computation. 2013-08-07 09:51:39 +02:00
Maciej Suminski 8ab98ae60b Removed frame limiter. 2013-08-07 09:37:28 +02:00
Dick Hollenbeck 6196921ae1 REMOVE: check for repeat_item->Flags() == 0 in eeschema/hotkeys.cpp 2013-08-06 18:23:50 -05:00
Carl Poirier 3f8343b341 REMOVE: USE_PCBNEW_NANOMETERS by making it the only way to go in pcbnew, effectively removing the deci-mils build. 2013-08-06 18:21:40 -05:00
Dick Hollenbeck 4c6f7bc158 FIX: insert key must repeat text labels 2013-08-06 17:59:07 -05:00
Maciej Suminski bc69429a56 Added GetTarget() for GALs. 2013-08-06 14:57:48 +02:00
Maciej Suminski 7d5a456344 Code reformatting. 2013-08-06 10:30:09 +02:00
Maciej Suminski f193e389ec Moved highlighted flag from VIEW_ITEM to EDA_ITEM. Added brightened and selected flag to EDA_ITEM. 2013-08-06 09:31:08 +02:00
Dick Hollenbeck c0832a0342 BUG FIX: eeschema as segfaulting on the 'Insert' key because the m_itemToRepeat
was simply a pointer to an object on the display list.  At times this object
would disappear from the display list, in the test case because of a concatonation
of two wires, and if you then tried to clone the non-existent object you'd get a 
crash.  This was not merely a bug, but a naive design choice. IMO.
Now the item to repeat is cloned, so will never also be on the display list.
2013-08-05 16:02:41 -05:00
Dick Hollenbeck 7377cb541f formatting and fix selection clarification bug in pcbnew, could not move reference text when hidden under another footprint 2013-08-05 15:47:34 -05:00
Dick Hollenbeck c58bd957a5 add Brian to about dialog, scoot Wayne up, alphabetize the rest 2013-08-05 15:45:22 -05:00
Camille Delbegue 2134e7de04 Remove a Clang warning and add a missing dependency to boost in cmake file. 2013-08-05 17:53:13 +02:00
Dick Hollenbeck e8dc730526 1) Remove requirement to define KICAD_TESTING_BRANCH. Instead the KICAD_STABLE_BRANCH
must be defined if that is the build type wanted. This only affects a text string
anyways, is not particularly important other than telling user from which code
branch  the source came.  

2) Change name of "testing" to "product" in that same description within
common/build_version.cpp.  "testing" made it sound frightenly unusable.
2013-08-05 10:38:50 -05:00
Maciej Suminski 8753bef2fa Moved VIEW_ITEM::ViewGetRequiredLayers() functionality to the VIEW class. Now required layers are set per layer basis instead of per item. 2013-08-05 16:28:58 +02:00
jean-pierre charras e89db97dd4 Pcbnew: footprint wizard dialogs: minor fixes, and fixes a not working parmeters dialog under Windows, due to an incorrect Printf format. 2013-08-05 15:43:15 +02:00
Maciej Suminski d15f0e91e2 Upstream merge. 2013-08-05 14:46:05 +02:00
Maciej Suminski 2c2e506edf Fixed bounding box for TEXTE_PCB class. 2013-08-05 14:06:01 +02:00
Brian Sidebotham c99243ffc5 * Added modified CMake FindPython... modules to support using Python-a-mingw-us distribution when building Windows scripting support using MinGW 2013-08-04 21:31:14 +01:00
Dick Hollenbeck 790e0ef36c ReturnStringFromValue() refinements 2013-08-03 15:20:55 -05:00
Dick Hollenbeck 1b5a1b74fa fix interface mapping slip-up in wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const 2013-08-03 13:57:15 -05:00
jean-pierre charras d68c727b0f Pcbnew: add hotkey Z to reset grid origin.
Save grid origin in .kicad_pcb files only if not 0,0 (to keep compatibility with previous versions of pcbnew, mainly the stable version)
Very minor other fixes (set modify flag when grid origin is moved from the dialog grid)
2013-08-03 18:16:57 +02:00
Dick Hollenbeck 76a604bc35 split expression into two lines for verification while using debugger that GetScreen() is a virtualized call. 2013-08-03 01:36:51 -05:00
Dick Hollenbeck efb34166ea *) retain grid origin in the BOARD and save it in legacy and kicad board files.
*) add hotkey for setting the grid origin as 'S', in board editor, module editor.
*) re-position the function interface for cursor movement from BASE_SCREEN into
   class EDA_DRAW_FRAME.  This is a prelude to getting rid of BASE_SCREEN or
   splitting it up.
2013-08-03 00:15:23 -05:00
Maciej Suminski 096dd7a09b Merge. 2013-08-02 19:23:35 +02:00
Maciej Suminski df6cacf64b Windows build fix. 2013-08-02 19:21:22 +02:00
tomasz.wlostowski@cern.ch d1a0bfcc39 pcbnew: fixed missing Select Tool icon warning 2013-08-02 19:18:58 +02:00
tomasz. fdf9898eb2 pcbnew: removed printf() causing a bug 2013-08-02 17:57:28 +02:00
tomasz. 8ea0f7ae5b Merged Orson's changes 2013-08-02 17:28:09 +02:00
tomasz. 31389c4063 pcbnew: tool initialization should belong to PCB_EDIT_FRAME to avoid linking errors on cvpcb. 2013-08-02 17:25:53 +02:00
tomasz. 69a44d5f13 pcbnew: hooked Tool Framework into the edit panel. Added a sample selection tool (not fully functional). 2013-08-02 16:53:50 +02:00
tomasz. 4c777e92f3 PCB painter: improve label highlighting 2013-08-02 16:53:04 +02:00
tomasz. 09182d814d View: various fixes, added VIEW::IsDirty() 2013-08-02 16:51:38 +02:00
tomasz. cc6ca277e3 Added COROUTINE and DELEGATE class examples. 2013-08-02 16:50:29 +02:00
tomasz. ca138b8e92 Increased number of layers in the view (for overlay objects) 2013-08-02 16:49:07 +02:00
tomasz. 241061025b Added core tool framework files + boost::context assembly stuff (initial, very buggy and unfinished work). 2013-08-02 16:46:53 +02:00
Maciej Suminski e4315f0664 Added missing header. 2013-08-02 16:45:30 +02:00
Maciej Suminski 2fd2c1dc03 Upstream merge. 2013-08-02 15:57:24 +02:00
Maciej Suminski 19b344806d Fixed the tesselator, so now it works with Windows. 2013-08-02 10:55:40 +02:00
Maciej Suminski 5e474cf87f Modified usage of wxStandardPaths to make it compatible with newer versions of wxWidgets. 2013-08-02 10:35:58 +02:00
Maciej Suminski ebc2a4269e Modified way of handling OpenGL framebuffer errors.
Now it is more verbose and the status is checked at the right moment (previously it was fine with Linux, but on Windows it showed errors).
2013-08-02 10:34:23 +02:00
jean-pierre charras 744dd80eaf Minor fixes. Minor code cleaning. Pcbnew: better iniatilization of members in DRAWSEGMENT, TRACK, EDGE_MOD (not bugs: just useful when using python scripting). 2013-07-31 18:41:32 +02:00
Maciej Suminski 8d7054a592 Added drawing of solderpaste layer for pads. 2013-07-31 14:51:20 +02:00
Maciej Suminski f5b0c19830 Added missing outline for polygon segments. 2013-07-31 13:35:02 +02:00
Maciej Suminski 8fda1d2264 Fixed drawing of polygon segments (eg. microwave extension traces). 2013-07-31 11:36:46 +02:00
Maciej Suminski 544726e4f3 New display style for grid (dotted). 2013-07-31 10:28:23 +02:00
Maciej Suminski d34df18f2c Fixed grid line drawing in OpenGL backend for some drivers. 2013-07-31 09:01:25 +02:00
Maciej Suminski 190ed58568 Code refactoring. 2013-07-30 18:29:54 +02:00
Maciej Suminski 790a1f8563 Made GAL backends settings more consistent. Fixed grid line width in the OpenGL backend. 2013-07-30 17:09:06 +02:00
Maciej Suminski 1ce21605a5 Merge removal of the shaderless OpenGL backend. 2013-07-30 14:05:32 +02:00
Maciej Sumiński 6dda8d4a7e Fixed smudging in the Cairo backend. 2013-07-30 13:58:03 +02:00
Maciej Suminski f9d74ccb70 Removed shaderless OpenGL backend. 2013-07-29 16:38:07 +02:00
Maciej Suminski bd182aad9f Fixed top layer pads netnames issue. 2013-07-29 14:20:40 +02:00
Maciej Suminski be012cac94 Added initialization of variable, preventing unconditional jumps. Fixed typos in comments. 2013-07-29 14:12:27 +02:00
jean-pierre charras 4a7f92fb4f Minor code cleaning. Pcbnew: better iniatilization of members in DRAWSEGMENT, TRACK, EDGE_MOD (useful when using python scripting). 2013-07-29 09:33:56 +02:00
Dick Hollenbeck b1ed22f7ed minor tweaks to debug statements and cmake 2013-07-28 11:30:39 -05:00
Ben Harris 1760a28ea7 fix FP_CACHE::Load() 2013-07-28 11:30:02 -05:00
Dick Hollenbeck 17b1c04f45 add script which converts footprint libraries from one format to another 2013-07-28 11:28:17 -05:00
Dick Hollenbeck 234c4a3814 $ iconv -f LATIN1 -t UTF-8 pic_sockets.sch -o /tmp/pic_sockets.sch
convert to UTF-8, eeschema cannot load LATIN1 strings anymore.
2013-07-28 10:21:43 -05:00
Dick Hollenbeck bd0c713691 AUTHORS.txt LATIN1 to UTF-8 via: $ iconv -f LATIN1 -t UTF-8 AUTHORS.txt > /new/AUTHORS.txt
All source files are supposed to be UTF-8 now.  Although not a source file, my editor
was tripping on this file when grepping.
2013-07-28 09:47:13 -05:00
matheiulj d786ac91df Fix pad bounding box calculation bug. (fixes lp:1202828) 2013-07-26 17:29:16 -04:00
Wayne Stambaugh cb52b9d0fe Fix minor debug build error. 2013-07-26 16:25:21 -04:00
Maciej Suminski ee1b8e2a80 Added display of soldermask for pads. 2013-07-26 18:15:11 +02:00
Maciej Suminski 862d5a4bf2 Added scalar addition and subtraction operators. 2013-07-26 18:12:22 +02:00
jean-pierre charras a82bc9d1a2 Commit missing file 2013-07-26 15:20:08 +02:00
jean-pierre charras 3b246ca483 Pl_Editor: add undo/redo commands. 2013-07-26 14:50:29 +02:00
Maciej Suminski 2ee99f74c4 Fixed profiling timers for compilation under Win32 (and hopefully Mac OS too). 2013-07-26 14:35:31 +02:00
Maciej Suminski 1fa882db53 Moved multilayer pad netnames to the top. 2013-07-26 12:15:28 +02:00
Maciej Suminski 9dd6b6a8ee Fixed recaching after changing display properties. 2013-07-26 10:05:57 +02:00
jean-pierre charras 1ef311cd01 Pl_Editor: title block texts can be multiline (use" \n" : a '\' followed by a 'n' to create a new line inside a text)
Very minor code cleaning.
2013-07-25 20:58:46 +02:00
Maciej Suminski c9199ea80a Fixed high contrast mode in OpenGL. Split display settings loading into more appropriate places. 2013-07-25 18:04:15 +02:00
Maciej Suminski 4076f99332 Added a layer compositor for the Cairo backend. 2013-07-25 14:40:04 +02:00
jean-pierre charras 71a40b0d09 Very minor code cleaning 2013-07-24 20:34:28 +02:00
Baranovskiy Konstantin eaea2ea12b Add GOST page layout description files in template 2013-07-24 17:57:38 +02:00
jean-pierre charras ee749988f1 Pl_Editor: fix a very minor issue when displaying the page size in status bar. 2013-07-24 17:19:37 +02:00
jean-pierre charras 28cd996394 Pl_Editor: add some hot keys. Fix some rounding issues. 2013-07-24 17:11:35 +02:00
Maciej Suminski 27113348b9 Fixed blending function for OpenGL compositing. Corrected documentation, removed unnecessary functions. 2013-07-24 15:06:59 +02:00
Maciej Suminski 67c0cd2205 Header containing GLSL source code is generated only after change of any of shader source files. 2013-07-24 14:22:00 +02:00
jean-pierre charras 99535864e4 Pl_Editor: bug fixes (default values not saved, and duplicate item names, when adding items) 2013-07-23 18:45:23 +02:00
Maciej Suminski 618a5f0e75 OpenGL multitarget rendering (compositing). 2013-07-23 18:39:07 +02:00
jean-pierre charras fff2f017d8 Fix an issue in Debug mode 2013-07-23 12:35:58 +02:00
Camille Delbegue 9076bfc9f7 Pl_Editor: Fix wx28 compatibility 2013-07-23 08:18:59 +02:00
jean-pierre charras ec7ee344b5 Bug #1202761 (Off centre zoom ) 2013-07-22 20:38:04 +02:00
jean-pierre charras b65c7df0a3 Initial release of pl_editor, the page layout and title block editor. 2013-07-22 18:46:44 +02:00
jean-pierre charras d7f569ae78 Fix GOST compatibility. 2013-07-22 18:45:22 +02:00
Maciej Suminski a8f4791395 Changed rendering order of cached & noncached layers. 2013-07-22 13:14:53 +02:00
Maciej Suminski 5242fff9d7 Code refactorization. VBO_CONTAINER is split to [NON]CACHED_MANAGER, GPU_MANAGER and VERTEX_MANAGER. 2013-07-22 10:41:12 +02:00
jean-pierre charras c328d6b118 pl_editor: add config options 2013-07-21 16:15:07 +02:00
jean-pierre charras 1f3f11ca0d Add margin values control in pl_editor, and remove margin definition from class PAGE_INFO. 2013-07-20 21:36:19 +02:00
Thiadmer Riemersma f2003d8dda Eeschema: fix subtle find bug when at the end of the search list. (fixes lp 1199689) 2013-07-20 13:13:40 -04:00
jean-pierre charras 50743cf3ba Initial release of pl_editor, the page layout and title block editor. 2013-07-19 20:27:22 +02:00
Maciej Suminski 4d7db7171c Fixed comments. 2013-07-19 09:35:25 +02:00
Maciej Sumiński 92ccc2018e Headers containing shader program sources are generated using CMake. 2013-07-17 23:55:59 +02:00
Maciej Suminski bbc0e8eb74 Refactorization of VBO_CONTAINER. 2013-07-17 18:49:38 +02:00
Maciej Suminski 99e8814028 Fixed wrong memory freeing. 2013-07-17 14:16:37 +02:00
Maciej Suminski 861ea0592e Different approach to coloring netname labels. 2013-07-17 14:02:08 +02:00
Maciej Suminski f4114d22c5 Display preferences for showing netnames applies to the GAL backend. 2013-07-17 13:38:56 +02:00
Maciej Suminski cc901496e9 Restored missing Refresh() on switching the high contrast mode. 2013-07-17 10:26:29 +02:00
Maciej Suminski c5ca075e24 Added an interface for highlighting. 2013-07-17 10:21:46 +02:00
Maciej Suminski b0c1b97ff3 Fixed stroked circles width issue with OpenGL shaders. 2013-07-17 10:21:29 +02:00
Maciej Suminski aa6a5ab671 Moved bottom netnames layer over bottom tracks & pads. Changed int to LAYER_NUM where applicable. 2013-07-16 15:45:21 +02:00
Maciej Suminski fef47b0b67 Fixed OpenGL tracks transparency & netnames issue. 2013-07-16 15:44:08 +02:00
Maciej Suminski 7739cfef2f Added support for multiple active layers (colored ones in the high contrast mode).
Added separate layers for pad netnames (now these are divided into multilayer/top/bottom pads).
More appropriate layers are selecting a copper layer in the high contrast mode (now it shows the copper layer itself, vias & multilayer pads and netnames).
2013-07-16 13:40:53 +02:00
Maciej Suminski 0544134ae3 Moved rendering order settings to a more appropriate place. 2013-07-16 10:49:56 +02:00
Maciej Suminski 07e4fc31b4 1 pixel wide outlines for the Cairo and the OpenGL with shaders backends, but it breaks displaying outline in the shaderless OpenGL backend. 2013-07-16 09:27:28 +02:00
Maciej Suminski cbec733deb Refactored code responsible for high contrast mode. Now it allows to have more than one layer on the top.
Selecting layer using the dropdown list on the toolbar influences the layer displayed in high contrast mode.
2013-07-16 09:26:29 +02:00
Maciej Suminski 20c86db71f 1 pixel wide lines using OpenGL shaders. 2013-07-16 08:49:12 +02:00
Maciej Suminski 64122ae057 Stroked lines in Cairo GAL are always drawn at least 1 pixel wide. 2013-07-16 08:48:21 +02:00
Maciej Suminski 9374d642bf Fixind GLM headers problem. 2013-07-16 08:42:44 +02:00
Wayne Stambaugh ba16d9e763 Eeschema find bug fixes. (fixes lp:1199689)
* Force search when wrap past end of list option changes state.
* Fix SCH_FIELD::Matches() for bug in user defined fields which have an ID
  of -1.
* Minor improvements to the find data names to improve source code readability.
2013-07-14 14:08:20 -04:00
Maciej Suminski 58280f749a Fixed multiline vertical strings drawing bug. 2013-07-09 10:00:23 +02:00
Dick Hollenbeck 34e6314a3e dialog information hiding, initial Fit() 2013-07-09 00:48:26 -05:00
Dick Hollenbeck 8c2d3d12fc comment improvements 2013-07-09 00:22:08 -05:00
Dick Hollenbeck e44fa93776 wxStandardPaths().GetExecutablePath(); is not wx 2.9.5 compatible, formatting improvements 2013-07-09 00:20:07 -05:00
Dick Hollenbeck e135b7f669 treat chars as unsigned when hashing 2013-07-09 00:18:03 -05:00
Maciej Suminski 6c3534bd35 Dynamic color setting for netnames. 2013-07-08 20:42:46 +02:00
Maciej Suminski 32db0d469a Dynamic font scaling for pads netnames. 2013-07-08 20:04:43 +02:00
Maciej Suminski b7747bc224 wxWidgets 2.8 compatibility fix.
Scripting engine build fix.
2013-07-08 17:14:16 +02:00
Maciej Suminski 89637b89b8 Separate layers for each copper layer netnames. 2013-07-08 16:46:04 +02:00
Maciej Suminski b7447ff05e Remove updating of non-cached layers. 2013-07-08 15:24:44 +02:00
Maciej Suminski 36f1147da1 Upstream merge. 2013-07-08 15:05:12 +02:00
Maciej Suminski 46eabaa44e Fixed 'disappearing via' issue. 2013-07-08 14:06:45 +02:00
Maciej Suminski fb1f4ad8e5 Lighter pads & tracks net names color. Proper rotation of text on symmetrical pads. 2013-07-08 13:57:09 +02:00
Maciej Suminski 3841b0ac3a Showing net names on pads. 2013-07-08 11:30:50 +02:00
Maciej Suminski 032ef3a74c Showing net names on tracks. 2013-07-08 09:57:23 +02:00
Maciej Suminski 5a0869f2e2 Added 'required layers' option for drawn items. 2013-07-08 09:28:58 +02:00
Maciej Sumiński d51b8a8744 Removed some more KICAD_GAL ifdefs. 2013-07-07 20:02:06 +02:00
Maciej Sumiński 180c72ef83 Added possibility to change zoom using toolbar in GAL. 2013-07-07 19:30:44 +02:00
Maciej Sumiński d81a351c73 Removed drawing hatch lines for polygons. 2013-07-07 18:55:23 +02:00
Maciej Sumiński 07781d34be Removed KICAD_GAL CMake option. 2013-07-07 02:30:28 +02:00
jean-pierre charras 28d702f6a9 Eeschema: fix a *very subtle* bug noticeable only in complex hierachies, for multiple parts per package:
sometimes, the modified flag was set for these components just when switching from a sheet to an other sheet.
Pcbnew: fix Bug #1197414 (dragged track segments does not show clearance area)
2013-07-05 19:48:01 +02:00
Maciej Suminski b5aadfc3f9 Fixed segmentation fault when there was no board loaded. 2013-07-05 15:48:45 +02:00
Maciej Suminski eb041ee2d3 Removed most of deprecated OpenGL calls. Items used to be drawn in immediate mode now are drawn using vertex arrays. 2013-07-05 14:01:33 +02:00
Maciej Suminski 408fb4f159 Removed pointers where they were not necessary. 2013-07-05 09:31:04 +02:00
Maciej Suminski e29a829a70 Added implementation of level of details per layer and item type pairs basis (items on every layer have a possibility to define the minimum VIEW scale to be shown). 2013-07-04 18:45:00 +02:00
Maciej Suminski 9c4e02379a Added the 'cached' parameter for VIEW_LAYER. The parameter decides if items drawn on the layer should be cached or drawn in immediate mode.
Removed m_useGroups from VIEW, as now groups are enabled per layer.
2013-07-04 17:02:20 +02:00
Maciej Suminski aff3787b34 Fixed drawing circles and semicircles using display lists. 2013-07-04 16:27:27 +02:00
Maciej Suminski af5a695c85 Added functions for changing settings of used font in GAL. 2013-07-04 14:24:41 +02:00
Maciej Suminski 073eb024fe Reduced frame limit. 2013-07-04 14:21:40 +02:00
Maciej Suminski 84392f1723 Moved STROKE_FONT from PAINTER to GAL. 2013-07-04 11:37:43 +02:00
Maciej Suminski fe6c901a9f Shaders can handle integer parameters (uniforms). 2013-07-03 13:08:43 +02:00
jean-pierre charras 26bd37e086 Eeschema: fix bug Bug #1197103 and an other very minor bug. 2013-07-03 09:27:52 +02:00
Maciej Suminski 97f914ccb3 Fixed stroked semicircles Z coordinate in shaderless OpenGL backend. 2013-07-02 18:11:57 +02:00
Maciej Suminski 68961c82fd Added possibility to change display modes of zones. 2013-07-02 14:02:42 +02:00
Maciej Suminski 0f5aa0630a Fixed stroke semicircles drawing using shaderless OpenGL backend. 2013-07-02 09:27:12 +02:00
Dick Hollenbeck 9d6ec5a265 dsnlexer.cpp's isNumber() was recently stupid-ized, un-stupid-ize it. 2013-07-01 09:37:03 -05:00
Maciej Suminski 6dc79cf193 Headers are regenerated only if shaders' source code was modified. 2013-07-01 15:47:44 +02:00
Maciej Suminski 9e4fe8b410 Faster polylines drawing using OpenGL backend.
Fixed drawing of lines' caps.
2013-07-01 15:23:43 +02:00
unknown 4360860bee Removed different styles of line caps and line joins, leaving only round caps & joins.
Fixed drawing stroked semicircles using OpenGL backend.
2013-07-01 14:39:27 +02:00
Maciej Suminski 8a44751b61 Mirrored text display bugfix. 2013-07-01 14:06:38 +02:00
Maciej Suminski a73216fc95 Changed std::map to boost::unordered_map for storing memory chunks and groups information. 2013-07-01 13:20:48 +02:00
Dick Hollenbeck caf5fc8d8d DSNLEXER::NextTok() organizes the specctraMode code better, into one if block mostly.
This keeps it out of the KiCad mode path, making that leaner and less confusing about
what is supported in KiCad mode.  Within KiCad mode, treat quoted vs. non-quoted tokens
as the two general categories, with non-quoted having sub-categories.  Eliminate  
an unimplemented, unused function declaration in DSNLEXER.
 
Improve the output formatting of THROW_PARSE_ERROR().
2013-07-01 01:47:36 -05:00
Dick Hollenbeck 44d31a1897 Speed up DSNLEXER::findToken() to such an extent that it resulted in an approximate 13% reduction
in *.kicad_pcb file loading times.
2013-06-30 20:05:40 -05:00
Maciej Sumiński 00847a8aed Colors are stored as unsigned bytes instead of floats. 2013-06-30 22:45:31 +02:00
Karl Thorén ee8901d9dd All: Fix bug #1196277 (pcbnew does not save all parts of the title block to the kicad_pcb file) 2013-06-30 19:40:33 +02:00
Maciej Sumiński 27a6f8afd6 Shaders are built-in instead of being loaded from external files. 2013-06-30 19:31:16 +02:00
Maciej Sumiński 335bf72060 More debug information in case of failure compilation of shaders. 2013-06-30 15:37:46 +02:00
Maciej Sumiński 5eb38ec232 Made shaders compatible with Intel GPUs. 2013-06-30 15:37:35 +02:00
jean-pierre charras 5c247857d3 Replace in EDA_TEXT::Draw the parameter EDA_DRAW_PANEL* aPanel by EDA_RECT* aClipBox, which is the actual parameter used by Draw.
This change make more easy to  use this function when a EDA_DRAW_PANEL canvas is not used to draw texts.
Remove dead code in worksheet.cpp.
2013-06-29 11:52:22 +02:00
Wayne Stambaugh a56d3235e3 Prevent GTK printing build error on Linux
* Do not fail to build when wxWidgets is built with either --with-gnomeprint
  or --with-gtkprint are not configured.  Only display warning.
* Move warning code from include/common.h to common/common.cpp so it only
  shows the warning once instead of every source file that includes common.h
2013-06-28 12:29:39 -04:00
jean-pierre charras 820153c7d4 Gerbview: remove fully outdated code (about reading DCode files) and fix erroneous comments. 2013-06-28 12:49:43 +02:00
Maciej Suminski bc8ea55092 VBO_CONTAINER: Changed new[]/delete[] pairs to realloc(), possibly reducing memory fragmentation and the container shrinking time. 2013-06-28 10:47:41 +02:00
jean-pierre charras ccbc4882fd Pcbnew: fix bug Bug #1194219 (Solder mask clearance ignored for oval pads )
When KISYSMOD is not defined , in GetAllFiles, skip hidden directories
Gerbview: fix a collision name for GetLayout method.
Eeschema: fix potential crash when editing a pin electrical type (The user was able to enter a non existing type)
2013-06-28 08:31:24 +02:00
Dick Hollenbeck 0a11144cad fix legacy board file footprint name setting in MODULE 2013-06-27 16:34:01 -05:00
Dick Hollenbeck 770d72c538 remove dialog_netlist.h 2013-06-27 15:34:30 -05:00
Dick Hollenbeck cec229bf83 WTF 2013-06-27 15:33:28 -05:00
Wayne Stambaugh ce94880a52 Pcbnew: fix bug reading legacy board format. (fixes lp:1195368) 2013-06-27 16:27:29 -04:00
jean-pierre charras 10352b1df5 Minor fixes. Gerbview: fix a collision name for GetLayout method. 2013-06-27 21:12:01 +02:00
Maciej Suminski 3f1da8b2c0 Minor code cleaning. 2013-06-27 17:31:10 +02:00
Maciej Suminski 649a7fa305 Proper handling of toggling outline display of items. 2013-06-27 17:23:54 +02:00
Maciej Suminski 628c069a39 Faster circles & semicircles drawing for the shaderless OpenGL backend. Removed unnecessary variables and computations. 2013-06-27 16:05:15 +02:00
Maciej Suminski 332a7b4bd9 Groups are stored in map instead of deque, so it allows easier adding & removing. 2013-06-27 11:54:49 +02:00
Maciej Suminski 58de62aacc High contrast mode with showing the selected layer on the top. 2013-06-26 16:31:52 +02:00
Maciej Suminski 1367d33cd8 Small speed up for the color change function (OpenGL_GAL). 2013-06-26 10:43:58 +02:00
Alexander Lunev b66d6e2d8c pcad2kicadpcb: check for file format 2013-06-25 11:05:51 -05:00
Dick Hollenbeck e513380a85 Add script to make a footprint library table from the KiCad Bazaar library repository, either in s-expr or CSV format. Add also the generation of such tables as of today. 2013-06-25 10:56:12 -05:00
Maciej Suminski db74de74f5 Added possibility to change cached layer color (for the purpose of high contrast display). 2013-06-25 17:12:54 +02:00
Maciej Suminski 0bac4a1e07 Fixed warning about a not initialized variable. 2013-06-25 16:54:30 +02:00
Maciej Suminski 0baa580b8d Added zoom in, zoom out & fit on screen view commands handling in GAL. 2013-06-25 09:15:57 +02:00
Maciej Suminski fbc3d63c24 Draw the origin marker in OpenGL with shaders GAL. 2013-06-24 16:02:18 +02:00
Maciej Suminski 978b548c64 Small improvements to SHADER class. 2013-06-24 15:40:31 +02:00
Maciej Suminski ef865aab68 Grid settings apply to GAL based rendering. 2013-06-24 14:33:02 +02:00
Maciej Suminski 322c71d2cc Fixed hotkeys for switching GAL backends. 2013-06-24 13:46:24 +02:00
Maciej Suminski 81c674387e Added convertsion from wxColour to COLOR4D. 2013-06-24 10:32:08 +02:00
Maciej Suminski 08c54e8acf Passing COLOR4D parameter using constant reference. 2013-06-24 10:21:34 +02:00
Maciej Suminski f7d85691c2 Added conversion from EDA_COLOR_T to COLOR4D. 2013-06-24 10:12:36 +02:00
Dick Hollenbeck 4fad477d1a add CTL_OMIT_INITIAL_COMMENTS and CTL_FOR_BOARD PCB_IO::Format()ing flags 2013-06-24 00:30:22 -05:00
Dick Hollenbeck 9d86345ea5 fix copy constructor with new MODULE::m_initial_comments member handling 2013-06-23 17:41:35 -05:00
Dick Hollenbeck 1f9ee2e45e Support for 'initial single line comments' in the pretty footprint format.
This is limited to round tripping the lines of commented text in the
loading and saving to disk through PCBIO::Format() and PCBIO::Parse().
No editing of the comments is given.
2013-06-23 14:18:33 -05:00
Maciej Suminski 26f6e259e6 Shows single layer pads with proper colors. 2013-06-21 12:02:17 +02:00
Maciej Suminski 145a3f20de Changed atan2() to VECTOR2D::Angle() 2013-06-21 09:01:40 +02:00
Alexander Lunev 2b25beb074 Fix an issue with setting the Reference and Value of a module.
The bug was revealed on re-opening the saved version of a file imported by pcad2kicadpcb.
2013-06-20 15:53:23 -05:00
Maciej Suminski 8552a6e29d Fixed some minor rendering issues, mostyl for shaderless OpenGL GAL. 2013-06-20 16:37:21 +02:00
Maciej Suminski fd6ab6003d Bug fixes:
- VBO_CONTAINER::allocate() was returning wrong value in case of error
- framelimiter had wrong formula for computing destined period between frames
- removed _padding field from VBO_VERTEX, as it was not speeding up, but wasting memory
2013-06-20 13:16:12 +02:00
Maciej Suminski 929a849b99 Added a framerate limiter.
Now it does not use all the CPU power while panning even on simple boards.
2013-06-20 09:58:18 +02:00
jean-pierre charras 781cc00aca Pcbnew: netlist dialog: add silent mode option, and tool tip to the 2 options (dry run and silent mode)
dialog_display_info_HTML_base: derived now from dialog_shim.
2013-06-19 18:11:12 +02:00
Maciej Suminski bb9ee216e8 Changed order of used headers, so there is no need to include again 'wx/wx.h' needed by layers_id_color_and_visibility.h 2013-06-19 12:07:25 +02:00
Maciej Suminski 83f5bd60c1 Moved fields containing information about currently used color, shader and transformation for vertices from VBO_ITEM to VBO_CONTAINER (OPENGL_GAL). 2013-06-19 10:50:46 +02:00
jean-pierre charras 3b423cb12d Pcbnew fix Bug #1192203 (I hope ...)
Bitmap2component: add export for .kicad_mod new footprint file format, and export polygon descr for page layout description (.kicad_wks file)
2013-06-18 19:27:47 +02:00
Maciej Suminski 4de43d7c5f Removed unnecessary functions from VBO_VERTEX. 2013-06-18 17:53:12 +02:00
Maciej Suminski 1fc0113b06 Removed unnecessary casting from VIEW_ITEM to EDA_ITEM. Added Type() function to VIEW_ITEM. 2013-06-18 17:01:23 +02:00
Maciej Suminski cd517f67db Added VBO_CONTAINER as a faster storage for vertices (OPENGL_GAL), tuned for exchanging data with GPU.
Removed a few unnecessary variables and fields from OPENGL_GAL.
Added function GAL::ClearCache() for freeing memory used by cached items.
Fixed a few memory leaks (tesselator, PAINTER's settings & VIEW_ITEM's groups).
Changed a few functions into inlines.
2013-06-18 16:20:29 +02:00
Maciej Suminski 876bf75d89 Added GAL_TYPE_NONE as an indicator of GAL uninitialized state. 2013-06-18 16:19:30 +02:00
jean-pierre charras 4536e27426 Eeschema: Fix wx28 compatibility issue. 2013-06-17 21:01:47 +02:00
jean-pierre charras b4d0cd7467 Eeschema: Add dialog and utilities (help files ...) to create BOMs from generic netlist, using python scripts or xsltproc+style sheet.
Remove dead code relative to old BOM generation.
Rename witha  more explicit name bom-example?.py , fix some issues and move them from script/bom-in-python/ky to script/bom-in-python
Rename ki.py utility to more explicit  ky_generic_netlist_reader.py
2013-06-15 20:02:52 +02:00
Wayne Stambaugh 60eb4b006d Pcbnew netlist read performance improvements.
* Do not search for footprint when no footprint is defined for a component
  in the netlist.
2013-06-15 12:55:51 -04:00
jean-pierre charras 26b7bdc35c Eeschema: add dialog and utilities to create BOMs from generic netlist 2013-06-14 16:59:52 +02:00
Dick Hollenbeck 2810f5a5fe fix error message in legacy_plugin 2013-06-13 11:17:25 -05:00
Dick Hollenbeck dea9dd2361 better error reporting and parsing of bad legacy footprint libs 2013-06-13 11:09:35 -05:00
Dick Hollenbeck 64f8e0b8e1 various 2013-06-13 06:43:29 -05:00
Alexander Lunev a3f2980d80 Fix pcad2kicad issue, from A. Lunev, and a minor code cleaning in component_references_lister.cpp. 2013-06-12 21:43:22 +02:00
jean-pierre charras 179ada1c70 Eeschema: fix Bug #1189893 (ps plot file opened twice) 2013-06-11 16:27:07 +02:00
jean-pierre charras 39993e27e4 Fix issue in auto panning while moving in EDA_DRAW_PANEL::OnMouseLeaving() 2013-06-10 15:23:58 +02:00
Dick Hollenbeck 00adc67d2a Rename invoke_a_dialog.h. Code an alternate implementation for std::string BOARD_ITEM::FormatInternalUnits( int aValue ), for verification. 2013-06-10 07:24:01 -05:00
Dick Hollenbeck 36aca68e40 fix autopan non-response problem when dragging block to right or bottom 2013-06-09 13:14:01 -05:00
jean-pierre charras b1489cbe40 Remove a useless message shown only in debug mode, about page layout file not found 2013-06-09 18:50:57 +02:00
jean-pierre charras 92ac2ac47e Cvpcb: Bug fix: Select previous free component crashes Cvpcb when no previous free component found, and both Select next and previous free component where not working very well. 2013-06-09 18:36:54 +02:00
jean-pierre charras a287f89304 Custom page layout: add support for poly-polygons (useful for logos) 2013-06-08 20:19:09 +02:00
Wayne Stambaugh 98eb5e75e5 CvPcb focus and status bar improvements.
* Fixed status bar update bug that caused the selected footprint information
  to be overwritten.
* Remove unnecessary SetFocus() calls in list control OnChar() handlers.
2013-06-08 12:06:26 -04:00
Dick Hollenbeck 515f5fbe5e *) Introduce "invoke_a_dialog.h" to information hide between top frame
and various DIALOG classes called from top frames.  See comments in
   {eeschema,pcbnew}/invoke_a_dialog.h.
*) Move some dialog classes into *.cpp files from *.h files.
*) void SCH_EDIT_FRAME::OnErc( wxCommandEvent& event ) was opening the modeless
   ERC dialog more than once if icon was clicked more than once.
*) Remove BOM stuff.
2013-06-07 15:56:55 -05:00
jean-pierre charras 0c5d9fa20c Fix compil issue on wxWidgets 2.8.12, created by my last commit. 2013-06-07 19:35:09 +02:00
jean-pierre charras ee6cd0883d Plot files : fix Bug #1188664 (full filename instead of short file name, and swapping between sheet path and file name) 2013-06-07 18:37:44 +02:00
Wayne Stambaugh ecbe947bc6 CvPcb pin count filtering improvement. (fixes lp:1188325)
* Add option to MODULE::GetPadCount() to exclude non-plated through holes.
2013-06-07 09:17:52 -04:00
Wayne Stambaugh 9929919b59 Fix CvPcb library filtering bug. (fixes lp:1188321) 2013-06-07 08:15:32 -04:00
jean-pierre charras aaab12d37e Mainly for testing purposes: page layout: if the environment variable KICAD_WKSFILE points a S expr page layout descr, this descr is used instead of internal descr.
Therefore one can use a custom page layout and title block.
Eeschema, dialog edit component: minor enhancement (the last selected notebook page is remembered during a session)
2013-06-07 13:09:18 +02:00
jean-pierre charras c8c05cb4ee page layout: if the environment variable KICAD_WKSFILE points a S expr page layout descr, this descr is used instead of internal descr. Mainly for testing purposes.
Eeschema, dialog edit component: minor enhancement (the last selected notebook page is remembered during a session)
2013-06-07 11:49:36 +02:00
jean-pierre charras 7432d4de29 Page layout: add comments, and fix a very minor issue.
Eeschema, dialog netlist: fix a bug when removing a plugin panel, when is is not the last.
dialog netlist:Add a predefined command string for python scripts, when creating a new netlist plugin entry.
2013-06-06 20:03:29 +02:00
Wayne Stambaugh 7f18b883ab CvPcb filtering and other minor improvements.
* Change filtering from single selection to logically and each filter type.
* Remove clear filtering button and logic.
* Filter buttons now behave as true toggle buttons.
* Improve list control pane focus following when using arrow keys to change
  list pane.
* Remove unused parameters from list box constructors.
* Make tab key behave like right arrow key when moving focus to next list
  pane.
* Make list pane focus wrap around to next or previous control.
* Simplify component list filtering code.
* Improve status bar updating.
* Tell Bazaar to ignore .downloads-by-cmake instead of downloads-by-cmake.
2013-06-06 11:37:48 -04:00
Maciej Suminski e7b7e0e687 Removed some debug messages. 2013-06-06 11:54:37 +02:00
Maciej Suminski 8742dae4a4 Removed indices storing from VBO_ITEM as they are always consecutive numbers. Removed storing pointers to VBO_ITEMs that have to be drawn - instead they are memcpied to mapped GPU memory.
Some functions of VBO_ITEM became inline.
2013-06-06 11:52:39 +02:00
Dick Hollenbeck 142306e238 fix libeditframe.cpp, which in release build would not show multipart text in listbox. dialog uses DIALOG_SHIM. 2013-06-05 14:23:55 -05:00
jean-pierre charras 66f5b3d3cc Fix a minor issue in page layout default descr. 2013-06-05 17:32:24 +02:00
Dick Hollenbeck 0f1f0f92f1 downloads-by-cmake now configurable, fix wx2.8 compiler errors 2013-06-05 09:24:03 -05:00
jean-pierre charras 1ec4986422 Add info and comments about page layout description using S expressions 2013-06-05 15:21:14 +02:00
jean-pierre charras 91c3f3bc83 All: use a S expression to describe the page layout (title block and grid references). Work in progress.
This should  allow users to define their own page layout.
2013-06-05 14:03:16 +02:00
Maciej Suminski 8e1fe5d766 Changed data structure in VBO_ITEM. 2013-06-05 10:48:30 +02:00
Maciej Suminski e9ebdf2583 Upstream merge. 2013-06-05 10:01:53 +02:00
Dick Hollenbeck 3bddb98de9 Fix wierd ConfigBaseWriteDouble's Printf( wxT("%12f"), aValue ); format string
which was creating silly strings like 

  PcbTextThickness="    0.300000"

in kicad.pro files.
2013-06-04 09:44:21 -05:00
Dick Hollenbeck 94338e072f comment 2013-06-04 09:44:08 -05:00
Maciej Suminski 04b4f236be Switching to OpenGL using shaders backend on the fly (changed keyboard shortcuts: different backends are available using Alt+F9..F12). 2013-06-04 16:18:33 +02:00
Maciej Suminski 28511cf4fe Introducing shaders.
Shader's parameters are stored in VBO_ITEM. Changed VBO_ITEM data structure. Added UseShader() function for selecting shader for a given VBO_ITEM.
Added one main vertex & fragment shader program to be used for with all kinds of items (type of shader is selected using attributes that are stored in VBO). Currently available shaders are: at-least-1px-width line, filled circle and stroked circle.
Removed unnecessary param (aDepthOffset) from a few functions (OPENGL_GAL::drawSemiCircle(), OPENGL_GAL::drawLineCap()). Removed function OPENGL_GAL::DrawRoundedSegment(). Changed some asserts to debug info or error log.
2013-06-04 15:58:53 +02:00
Dick Hollenbeck 0390fbf978 speedups 2013-06-03 08:09:37 -05:00
Maciej Suminski ad5d10a8ba Display linking errors in debug mode for shaders. Added SHADER::GetAttribute() function for getting shaders attribute location. 2013-06-03 10:54:24 +02:00
Dick Hollenbeck f280c7374c include only the boost headers in the scratch repo 2013-05-31 23:04:56 -05:00
Dick Hollenbeck 387d0c4e01 *) Refinements to ExternalProject_Add( boost )
*) Enhancements to make_lexer().
*) Support multi-threaded build.
*) Switch to "bzr patch" from patch.exe for Windows users.
2013-05-31 16:36:40 -05:00
Dick Hollenbeck 70b8e6b6e2 add copyright message to download_boost.cmake 2013-05-31 16:26:08 -05:00
Dick Hollenbeck 2fc698846b *) Refinements to ExternalProject_Add( boost )
*) Enhancements to make_lexer().
*) Support multi-threaded build.
*) Switch to "bzr patch" from patch.exe for Windows users.
2013-05-31 16:22:34 -05:00
Michal Jahelka a23dcccce5 Add filtering footprint list by library to CvPcb
* Add third list control with library names.
* Add button to toolbar to select filter by library name.
* Add bitmap for filter by library name toolbar button.
* Remove custom UI colors from list controls.
2013-05-31 13:33:46 -04:00
Dick Hollenbeck 5c98951954 add support for exponents in dsnlexer.cpp's DSN_NUMBER token 2013-05-31 09:24:56 -05:00
Dick Hollenbeck 96f8f6066d remove boost and make it an external project, so the procedure for upgrading is better documented 2013-05-30 23:46:02 -05:00
Dick Hollenbeck d8f87cca3c factor out isNumber() in dsnlexer.cpp, add support for numbers with exponents, leave commented out for further testing 2013-05-30 20:20:37 -05:00
Dick Hollenbeck 0eae829b11 factor out isNumber() in dsnlexer.cpp, add support for numbers with exponents, leave commented out for further testing 2013-05-30 19:49:22 -05:00
Dick Hollenbeck 6231ce5959 fix buggy double2str() 2013-05-30 16:46:14 -05:00
jean-pierre charras 57b30ad254 Pcbnew: Fix Bug #1185556. fix issue about Solder Paste Ratio value which was accepting only one digit in mantissa in 3 dialogs (now 6 digits in all dialogs).
fix potential issue in .kicad_pcb file creation, in some places where a %g or %.16g format was used:
al least under Mingw/gcc4.7.2, the floating number was written using scientific notation, not accepted by the S-expr reader.
2013-05-30 21:32:00 +02:00
jean-pierre charras 5e8c38d293 Kicad template selector dialog: add an info line showing the template path in use. Fix very minor bug #1185462 2013-05-29 20:37:22 +02:00
jean-pierre charras da6f4024ff Fix issue created by the template selector change, on Linux. 2013-05-29 20:00:40 +02:00
jean-pierre charras 43afa81a8c Kicad template selector dialog: add info line showing the template path in use. 2013-05-29 14:03:03 +02:00
Wayne Stambaugh 5560cb54e2 More Pcbnew footprint library table work in progress.
* Add footprint library table loading to footprint editor.
* Overload FOOTPRINT_INFO::ReadFootprintFiles() to read footprints from the
  footprint library tables.
* Fix a bug in FP_LIB_TABLE::IsEmpty() when the table has a fallback table.
* Add code to FOOTPRINT_EDIT_FRAME to use footprint library tables.
* Add an optional build time version of PCB_EDIT_FRAME::loadFootprints() to
  populate netlist footprints from footprint library table.
* Remove adding footprints to board whenever GetModuleLibrary() is called and
  move loading locally as required.
* Add missing source file license comments and coding policy fixes.
2013-05-28 12:54:59 -04:00
jean-pierre charras 4e94d8e793 Dialog page setting: replace wxStaticBoxSizer by wxBoxSizer + static text,
because under Linux and wxWidgets 2.9, wxStaticBoxSizer are very ugly (text not readable in this dialog)
(Does not happen with wxWidgets 2.8)
Eeschema hotkeys: remove duplicate keys in key editor.
2013-05-28 11:49:53 +02:00
jean-pierre charras 2043001b0a eeschema: fix Bug #1184318 (Eeschema-Libedit: Reference moving+zooming issue)
and fix a minor issue in netlist dialog.
2013-05-28 10:05:10 +02:00
jean-pierre charras ea04a4af7d eeschema: netlist dialog: fix a very minor issue. 2013-05-27 15:59:10 +02:00
jean-pierre charras b750414561 Pcbnew: fix bug Bug #1184362 (Pcbnew losing user (custom) sheet size )
Fix minor issues in print/plot: filename not printed, sheetname incorrect in eeschema
2013-05-27 11:17:37 +02:00
Maciej Suminski e8acd2919b Added tesselation of polygons for VBO based rendering (OpenGL GAL). 2013-05-27 09:37:49 +02:00
Dick Hollenbeck 8ccf0320b4 1) Add "rules" to base of tree for copying into BZR_HOME/rules.
File "rules" has instructional text as comments near top.

2) Convert all text files in repo to LF line ending form.
   Any checkout done with "rules" in play will convert the working
   tree to native line ending, while keeping repo as LF line ending.
2013-05-25 23:36:44 -05:00
jean-pierre charras 94dccc9128 Pcbnew! fix Bug #1184030
very minor other chnages.
2013-05-25 18:10:19 +02:00
jean-pierre charras da51dbe1e0 Cvpcb fix bug #1183796 and fix bug when a fp lib is not found : the name of the missing file was not displayed in message window. 2013-05-25 17:02:16 +02:00
jean-pierre charras 29613e2974 Netlist reader: fix issue when reading an ORCADPCB2 netlist (which fixes also bug 1184023) and fix a Cvpcb crash when trying to read an unknown netlist format. 2013-05-25 12:41:24 +02:00
jean-pierre charras 38a5e9af4b 3D viewer: fix Bug #1183581 (pcbnew 3D viewer: recent UI inconsistency )
Pcbnew: fix bug in drag module: connected tracks were not dragged.
worksheet: code cleaning.
2013-05-25 11:01:44 +02:00
Dick Hollenbeck dc9122c5b6 remove "~" from empty *.lib component fields, replace with "", doctor old *.lib fields to blank if that was the intention 2013-05-24 18:58:29 -05:00
Dick Hollenbeck c4c58e1279 copyright and formatting 2013-05-24 16:30:27 -05:00
jean-pierre charras 8bafc54cdc Fix bug #1183802 : incorrect sheet Id (company name displayed instead of Id) 2013-05-24 16:06:58 +02:00
jean-pierre charras 7080828fe2 More about worksheet code. 2013-05-24 10:59:40 +02:00
Lorenzo Marcantonio 26f2c04f13 Make title block date field modifiable by hand. 2013-05-23 14:45:23 -04:00
jean-pierre charras 82cc923356 Worksheet code: more cleanup, and fix compil issue with wxWidgets 2.8 2013-05-23 18:38:17 +02:00
Dick Hollenbeck a9a009029f fix license text in COPYRIGHT.txt, remove duplicate Documentation/copyright.txt 2013-05-23 08:43:42 -05:00
jean-pierre charras b454998677 worksheet code cleaning and fix plot sheet filenames bug (mainly under Linux) (Bug #1182891 ) 2013-05-22 17:43:22 +02:00
jean-pierre charras 3f38a6d89a worksheetcode cleaning and fix plot sheet filename bug under Linux. 2013-05-22 17:08:57 +02:00
jean-pierre charras 001723e077 Worksheet code: cleanup and remove useless parameters. 2013-05-22 10:45:25 +02:00
jean-pierre charras 568ae2ec7e Remove duplicate code to draw and to plot title blocks (more than 1500 duplicate lines). Note: this is a work in progress.
Code cleanup
2013-05-21 09:44:46 +02:00
jean-pierre charras 26a3029a88 Remove duplicate code to draw and to plot title blocks. 2013-05-21 09:18:25 +02:00
Wayne Stambaugh c9be8bfdd4 Pcbnew footprint library table work in progress.
* Add code for loading, modifying, and saving the global and project
  footprint library tables.
* Add code to load MODULE objects using the footprint library table to
  the footprint viewer.
* Add static methods to FP_LIB_TABLE to support loading footprint library
  tables.
2013-05-20 10:49:20 -04:00
jean-pierre charras a8a640811b Code cleaning and move worksheet code specific to title block and frame references shape in title_block_shapes.h and title_block_shapes_gost.h 2013-05-19 21:35:49 +02:00
jean-pierre charras 6b0980d964 Gerbview: fix bug #1176538 (incorrect flashed items size, when defined by aperture macros) 2013-05-18 18:56:03 +02:00
jean-pierre charras 172bbc8f9c Eeschema: fix Bug #1180902 (Libedit creates empty svg images) 2013-05-18 11:38:23 +02:00
jean-pierre charras 0f885e7f31 3D viewer: Add more options, to show/hide technical layers. 2013-05-16 21:04:21 +02:00
Maciej Suminski d45008a847 Different way of rendering groups (with a single DrawElements call) in OpenGL GAL. 2013-05-16 18:43:25 +02:00
Maciej Suminski 7a8e1fc6b4 Different way of measuring render time. 2013-05-16 17:17:35 +02:00
Dick Hollenbeck 7a5f5cb009 compiler warning from mailing list 2013-05-16 09:40:46 -05:00
Maciej Suminski 7a1718d0f5 Changed functions for adding vertices in VBO mode to make code easier to read and understand. 2013-05-16 14:47:34 +02:00
Maciej Suminski 2579fd524d Fixed time measuring functions (only for profiling in debug) 2013-05-16 13:46:00 +02:00
Maciej Suminski 733e5a55e3 Faster way of caching items for OPENGL GAL. 2013-05-16 10:35:16 +02:00
Maciej Suminski c9f9c4ddbc Added functionality for transformation of VBO vertices, extended functions like translate, rotate, scale using glm library. Removed D() macro, as it was not used, but in conflict with glm library. Added VBO_ITEMs for circles, semicircles. Now almost everything is drawn using VBO (besides polygons and grid). 2013-05-15 16:48:10 +02:00
Maciej Suminski c91b4ffbc4 Layer depth is set during items caching (so now they are rendered on proper layers). 2013-05-15 16:47:17 +02:00
Maciej Suminski a43dd351df Assured that there are no excessive initializations 2013-05-15 16:47:01 +02:00
Dick Hollenbeck 0ef043f0f8 replace BOM dialog with a pointer to FAQ https://answers.launchpad.net/kicad/+faq/2265 2013-05-15 05:32:41 -05:00
Maciej Suminski 1a4c6781d8 All kind of items are loaded on SetBoard() again. 2013-05-15 09:17:48 +02:00
Maciej Suminski 806dd7d8ec Items are not recached until GAL is changed (earlier it was done on every rendering backend switch). 2013-05-15 09:17:42 +02:00
Maciej Suminski e1ecd301a7 Added some debug informations. 2013-05-15 09:17:36 +02:00
jean-pierre charras ac1386a5a2 Pcbnew: fix bug 1179877, due a bad default copy constructor, after my changes about CPOLYGONS_LIST class.
More about CPOLYGONS_LIST work.
2013-05-14 20:47:01 +02:00
Maciej Suminski 135149e2d3 Fixed build for eeschema. 2013-05-14 10:46:43 +02:00
Maciej Suminski c55e063745 Removed double freeing of some of Cairo paths. 2013-05-14 10:42:56 +02:00
Maciej Suminski 1b1216e53d Modified SetOffset (VBO_ITEM/OpenGL GAL) function. 2013-05-14 10:41:05 +02:00
Maciej Suminski a6c8beb73b Drawing tracks using PushVertices, added some comments, fixed formatting. 2013-05-14 10:38:25 +02:00
Dick Hollenbeck 6fa4f1e6ac remove non-UTF8 encoded characters from source tree & format fix 2013-05-13 12:30:27 -05:00
Maciej Suminski 32784ea191 Added possibility of adding multiple vertices to VBO_ITEM at once 2013-05-13 11:14:35 +02:00
Maciej Suminski bce9f685ea Fixed Cairo issues and some possible memory leaks 2013-05-13 10:55:35 +02:00
Wayne Stambaugh f78497bf4f Decouple PLOT_CONTROLLER from UI dependencies. 2013-05-10 15:22:29 -04:00
Maciej Suminski e8f33ac903 Fixed memleak, removed excessive recaching, still there is a problem with Cairo caching 2013-05-10 16:05:40 +02:00
Wayne Stambaugh b5bb56426a Fix footprint library search path bug. (fixes lp:1178427 2013-05-09 21:51:55 -04:00
jean-pierre charras 2554575656 More work on CPOLYGONS_LIST class.
Pcbnew: fix minor bug about  plot line width.
2013-05-09 21:08:12 +02:00
Wayne Stambaugh cf86e18f5c Footprint library table work, minor fixes, and code cleaning.
* Fix a bug when full file name and path are passed to FOOTPRINT_INFO::
  ReadFootprintFiles() which I created in bug fix lp:593989.
* Fix a wxString debug assertion in EDA_APP::InitEDA_Appl() when the KICAD
  environment variable is defined as an empty string.
* Add error dialog when libraries cannot be found in system search path
  when loading footprint using the select footprint dialog.
* Add footprint library name column to the EDA_LIST_DIALOG when selecting
  footprints from the list.
* Allow reading all columns from the selected row in EDA_LIST_DIALOG.
* Remove redundant sort from EDA_LIST_DIALOG constructor
* Add library name member variable and accessors to FOOTPRINT_INFO.
* Make headers translatable for Eeschema select component from list dialog.
* Add some helper methods to FPID for identifying the FPID type and validity.
* Remove a bunch of trailing whitespace and add missing license comments.
2013-05-08 16:47:23 -04:00
jean-pierre charras 2e6969fe96 More work on CPOLYGONS_LIST class. 2013-05-08 20:20:58 +02:00
jean-pierre charras 6fcd9eb8a6 Eechema: fix bug : when saving the schematic project, the lib cache was saved under the current sheet opened, not the root sheet.
Pcbnew: clamp default plot line width between 0.02 and 2 mm. the other bug (saving this parameter in internal units instead of mm is not fixed)
2013-05-07 20:32:06 +02:00
Lorenzo Marcantonio 69b7c2a1b6 Removed some spurious float casts
(explanation: float is implicitly promoted to double anyway, it's only useful
for storage; also a fp variable forces conversion of other int in the expression
without needing a cast)
Typo fixes in some comments 'floatting' -> 'floating' :D
2013-05-07 19:31:52 +02:00
Wayne Stambaugh 2be09ba9e2 Fix bug when footprint library file names contain dots. (fixes lp:593989) 2013-05-06 13:57:18 -04:00
Lorenzo Marcantonio 8430508272 Closes bug 1176915
Mass parameters in gerbers can't use scientific notation (altough some software 
allow it), so the %g format was not correct.
2013-05-06 19:47:01 +02:00
jean-pierre charras 7e2779784b Eeschema: fix incorrect move command for bitmap items. 2013-05-06 15:38:14 +02:00
Lorenzo Marcantonio af5a9a8de9 Removed Show code from BOARD_ITEM derived classes (as requested by Dick) 2013-05-05 12:23:18 +02:00
Lorenzo Marcantonio e5dae4b149 Fixed LAYER_NUM usage in the specctra code.
A specctra layer is not a LAYER_NUM, so that's probably why it was difficult to use.
2013-05-05 12:11:30 +02:00
Lorenzo Marcantonio d00c83cde9 Migrated the interfaces accepting angles to the double type
The plan goes like this:
- eeschema still uses int in decidegrees
- all the other things internally use double in decidegrees (or radians
  in temporaries)
- in pcbnew UI the unit is *still* int in decidegrees

The idea is to have better precision everywhere while keeping the user with int i
angles. Hopefully, if a fractional angle doesn't come in from the outside, everything
should *look* like an integer angle (unless I forgot something and it broke)

When the time comes, simply updating the UI for allowing doubles from the user should
be enough to get arbitrary angles in pcbnew.
2013-05-05 09:17:48 +02:00
Lorenzo Marcantonio cb49ca5ae2 More int casts to rounding conversions 2013-05-04 13:57:09 +02:00
jean-pierre charras b2a76062c7 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 ea990230ca 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 91674347b5 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 19845828ef Fix compil issue in Debug mode. 2013-05-02 20:42:08 +02:00
Lorenzo Marcantonio 78e41187b3 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 226b3d64be fix compiler warnings 2013-05-02 09:12:55 -05:00
jean-pierre charras fc8e0bfb75 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 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
Lorenzo Marcantonio 0e903dba5b 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 000ec33af2 remove temporary debug printf()s I no longer need. 2013-05-01 10:49:34 -05:00
Dick Hollenbeck 9634fa5c07 fix 2 corner case bugs in specctra import 2013-05-01 10:48:00 -05:00
Dick Hollenbeck a26e59d8ed pass round boards to freerouter via specctra_export 2013-05-01 08:36:26 -05:00
Dick Hollenbeck d55ab920d2 fix goofy text messages, period after newline 2013-04-30 14:51:33 -05:00
Maciej Suminski e9e4ed4230 Improved recaching (all items when a board is loaded), still needs some fixing (mem leak). 2013-04-30 17:55:24 +02:00
Dick Hollenbeck 63985f67cf wxString::Format() fix 2013-04-30 10:52:18 -05:00
Dr. Thomas Spindler f8f35a8cd0 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
Maciej Suminski 191cb40e79 Introduction of VBO. Now only tracks are rendered in a very simple way. 2013-04-30 15:59:32 +02:00
Lorenzo Marcantonio f50f31e5a3 Added include guard to math_for_graphics.h 2013-04-30 15:27:08 +02:00
Wayne Stambaugh 218fb338ab 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 625e8b0680 merge with upstream 2013-04-29 12:56:12 -04:00
Felix Morgner bb6fffa5a9 * 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 f92cfcaee6 fix compiler warnings, comments, debug crash, and conceptual issues in specctra 2013-04-29 11:35:07 -05:00
Felix Morgner 3a9f3f89c1 merge with upstream 2013-04-28 18:47:58 -04:00
Wayne Stambaugh 4a9681d5c7 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 6b500d606c Converted macros to inline template function 2013-04-28 17:43:26 +02:00
Lorenzo Marcantonio 3b1ddd952f 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 3c5c795c1f Message fix: SMD is an acronym, should be upper case 2013-04-28 15:34:59 +02:00
jean-pierre charras 2080739f76 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 6c2c647703 merge with upstream 2013-04-27 17:58:38 -04:00
Dick Hollenbeck ec497d5d9a Fix SVG plot with filename containing & character. 2013-04-26 21:12:57 -05:00
Felix Morgner 8ddbf84cbb merge with upstream 2013-04-26 11:24:44 -04:00
Wayne Stambaugh 81271ad41a 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 24f95c66db resaved some files as UTF-8 to silence clangs warnings about illegal character encodings. 2013-04-25 18:31:14 -04:00
Felix Morgner 5c0b735d82 made changes compliant to style guide. 2013-04-25 13:27:43 -04:00
Felix Morgner d3bf8c6b51 merge with upstream 2013-04-25 13:22:52 -04:00
Maciej Suminski 0cd108b55d Upstream merge. 2013-04-25 18:42:27 +02:00
Maciej Suminski 3ff70deab0 Changed non-shader primitives to GL_TRIANGLES. 2013-04-25 18:30:53 +02:00
Wayne Stambaugh 61b4f8a9eb 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 d8ba7b3af8 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
Maciej Suminski 790e4c6af7 Fixed tracks drawing using Cairo backend with caching turned on. 2013-04-25 10:26:32 +02:00
Maciej Suminski b70adc5f99 Fixed color issue for stroked fonts with OpenGL backend and caching turned on. 2013-04-25 10:00:25 +02:00
jean-pierre charras 00ee6c7b3b Pcbnew, dialog SVG export: Fix Pcbnew crash when opening the dialog. 2013-04-25 09:05:33 +02:00
Maciej Suminski dd8601cbf8 Added caching of multilayer items (storing multiple group ids for items). 2013-04-24 11:28:11 +02:00
Maciej Suminski 10dd5023e2 Removed BeginLayer and EndLayer functions. Resolved Cairo layers drawing problem in a different way. 2013-04-24 09:48:34 +02:00
Maciej Suminski bb3f3d063f wxWidgets 2.8 compatibility fix. 2013-04-23 18:20:45 +02:00
Maciej Suminski 4868af8b62 Changed view control settings to KiCad default (panning, zooming, etc.) 2013-04-23 12:07:14 +02:00
Maciej Suminski ced0d8add9 Modified shaders' source path. 2013-04-23 09:52:51 +02:00
Felix Morgner d7d7b16334 Updated the pcbnew Info.plist to associate .kicad_pcb files with pcbnew. 2013-04-22 12:20:34 -04:00
Maciej Suminski f24048e8da Drawing SMD pads with colors defined by "Pads Front"/"Pads Back" color settings. 2013-04-22 12:13:48 +02:00
Maciej Suminski 0a55a2b672 Fixed wheel scroll event on Windows 2013-04-22 11:08:02 +02:00
Maciej Suminski 1944fea398 Modified way of switching canvas 2013-04-22 11:07:38 +02:00
Felix Morgner 3815087b29 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 d3f28fb71c Fix KiCad crash when no template is selected on new project from template. (fixes lp:1170973) 2013-04-21 15:44:57 -04:00
Maciej Suminski ad4a72ff11 Cairo now renders layers properly (colors are not saturated after layer composition), but slower. 2013-04-19 18:19:50 +02:00
Maciej Suminski 062fc2d200 Some cleanup. 2013-04-19 18:19:20 +02:00
jean-pierre charras 74c64958f4 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 97ccebf355 Fixes to scripting after refactoring & interface cleanups, 2013-04-18 23:23:11 +02:00
Miguel Angel Ajo c597e75b73 Support to enable color from PLOT_CONTROLLER into plotters that start in B/W 2013-04-18 23:21:26 +02:00
Dick Hollenbeck a20c89288f hide pageFmts[] since it is no longer NULL terminated and not global 2013-04-18 13:54:03 -05:00
Dick Hollenbeck 1f3b3d681c fix some compiler warnings 2013-04-18 12:03:47 -05:00
Dick Hollenbeck fb57b54be8 fix Lorenzo's bug introduced in rev. 4082 2013-04-18 12:03:25 -05:00
Maciej Suminski 5d704c9692 Turned on group recaching on GAL change. 2013-04-18 17:10:02 +02:00
Maciej Suminski a96c5379b3 Fixed non-GAL build. 2013-04-18 11:46:23 +02:00
Maciej Suminski e4bac0d91a Fixed resize issue (moved GAL panel into pane).
Tidied up event handlers.
2013-04-18 11:20:19 +02:00
Stefan Helmert 5da0a971d5 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
Maciej Suminski 9af45c05bb Fix for drawing polygons. 2013-04-17 13:59:46 +02:00
Maciej Suminski e799d7a06c Fixed drawing of PCB_TARGET items. 2013-04-17 13:12:54 +02:00
Maciej Suminski fde71bdf33 Removed unnecessary calls to cairo drawing functions. 2013-04-17 12:50:38 +02:00
Maciej Suminski 16a28348b4 Added const(..)& in GAL methods' parameters and change iterators to constant iterators. 2013-04-17 12:48:37 +02:00
Maciej Suminski 520be6f67b Added GAL::DrawSegment for drawing rounded segments (used for drawing tracks). 2013-04-17 12:38:00 +02:00
Maciej Suminski 6cf04e6820 Fixed drawing arcs in Cairo GAL. 2013-04-17 12:33:11 +02:00
Maciej Suminski 188ea1f59f More accurate rendering display of ZONE_CONTAINERs. 2013-04-17 12:30:21 +02:00
Maciej Suminski 71a1ad6ff5 Fixed drawing polygons using Cairo-based GAL. 2013-04-16 14:55:21 +02:00
jean-pierre charras c4dc992c03 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
Maciej Suminski 4eadf2ef47 Removed flickering in Cairo-based rendering backend. 2013-04-16 11:43:13 +02:00
Maciej Suminski bee0d69289 Cleanup 2013-04-16 11:16:27 +02:00
Maciej Suminski 01ebf03110 Inverted Y display axis while using Cairo-based rendering backend. 2013-04-15 17:59:38 +02:00
Maciej Suminski 820e6e5e16 Introduced Cairo-based rendering backend using GAL.
Moved switching canvas routines to pcbnew, as they are used only there right now (otherwise libgal would have to be linked to every Kicad application).
2013-04-15 17:57:03 +02:00
Maciej Suminski 5b9057823a Introduced SetGAL() functions that will allow changing GAL backend for rendering on the fly. 2013-04-15 16:03:05 +02:00
Lorenzo Marcantonio 70dc51d1f9 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 2cad7a52ad 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
Matthew Beckler 088832b8f6 Match 'new char[]' with proper delete[] char* rather than delete char*. 2013-04-13 23:07:04 -05:00
Dick Hollenbeck 35e1c65996 move project templates from source tree to library tree 2013-04-13 16:30:21 -05:00
Maciej Suminski e1fcd31381 Fixed text display using Cairo. 2013-04-12 16:41:31 +02:00
Maciej Suminski e3cb0aa36f Tesselation error fix.
Added missing callback function (combine callback).
2013-04-12 10:37:06 +02:00
Wayne Stambaugh b1144a864f wxWidgets 2.8.12 build fix 2013-04-12 09:30:18 +02:00
Maciej Suminski 3412e82799 Copyright change 2013-04-12 09:16:52 +02:00
Dick Hollenbeck d23724f59e use lower case library names in *.pro & *.sch files, to match actual filenames in the template file set. Noticed on linux. 2013-04-11 14:04:30 -05:00
Lorenzo Marcantonio 65b7f23d46 Set grid color for module editor and viewer (closes #1167884)
Also removed EDA_DRAW_FRAME::OnGrid which was totally dead (empty and unused)
2013-04-11 20:29:56 +02:00
Dick Hollenbeck d5fff4a6da revert text strings for clarity 2013-04-11 13:00:36 -05:00
jean-pierre charras e07590f930 All: fix a minor issue in drawtext.cpp
Pcbnew: load footprint from modview: Because modview allows user to choose the footprint library, the selected library is forced when the footprint is loaded.
I am not sure this is 100% better, but this new behavior has some advantages, mainly in the footprint editor (you can load a footprint outside the selected library)
2013-04-11 19:40:20 +02:00
Maciej Suminski 877dd3f79a Added multiline strings and text overbars rendering using GAL. 2013-04-11 14:21:59 +02:00
Maciej Suminski 53ec1efc1d Copyright notices fix. 2013-04-11 10:04:38 +02:00
Dick Hollenbeck e5740af069 2.9 wx rat race 2013-04-10 16:06:49 -05:00
Dick Hollenbeck 297a54fa3e Make project templates work with KICAD_PTEMPLATES env var. 2013-04-10 15:31:40 -05:00
jean-pierre charras 3e4a79d063 Pcbnew: fix Bug #1167364
pcb_calculator: fix bug Bug #1167345
2013-04-10 21:20:35 +02:00
Lorenzo Marcantonio b1c710a214 Made overbar position independant of pen size for text, to fix graphics glitches with halo text.
Slightly retuned for compensating the new position.
2013-04-10 21:09:59 +02:00
Dick Hollenbeck cca97586a9 revert to using quotes around variable text which may be blank 2013-04-10 10:08:01 -05:00
Maciej Suminski 07cd3bcb56 Upstream merged 2013-04-10 15:03:35 +02:00
Maciej Suminski 80999ba0a4 Temporarily disabled display of netlabels on pads due to performance drop. 2013-04-10 13:47:19 +02:00
Maciej Suminski 0d85444062 Fix for compatibility with wxWidgets 2.8 & 2.9 at the same time. 2013-04-10 10:09:23 +02:00
jean-pierre charras 0d41a7a523 All: fix some issues in messages to translate. Remove fully outdated files 2013-04-10 09:23:20 +02:00
Maciej Suminski ccd2ebefd3 Removed OpenGL different drawing modes, as they were not used.
Removed DRAW_MODE_NORMAL, DRAW_MODE_PREPARE_EDGES, DRAW_MODE_DRAW_EDGES modes.
2013-04-10 09:09:48 +02:00
Lorenzo Marcantonio 4cbbce3aa6 Removed ugly usage of an extra layer slot for the layer count in gerbview
Fixed layer picker for exporting to pcbnew
Realigned pcb layer name with class BOARD
2013-04-10 09:03:19 +02:00
Lorenzo Marcantonio 66453e3d92 Fixed pad preview color 2013-04-09 21:20:21 +02:00
Lorenzo Marcantonio 42709330e0 Better strings for the translators (converted concatenations to formats) 2013-04-09 19:49:01 +02:00
Lorenzo Marcantonio 20eaf66d5b Hunted down hardcoded pixel size thresholds for drawing
Dynamic contrast for netname and pin numbers ('halo' text)
Handle netname drawing even on diagonal tracks
2013-04-09 19:16:53 +02:00
Lorenzo Marcantonio b525e3be55 Factored out text anchor drawing
More layer classification cleanup
2013-04-09 18:00:46 +02:00
Maciej Suminski 5fda7bf32f Netnames and pad numbers are displayed on pads (using GAL) 2013-04-09 16:12:20 +02:00
Maciej Suminski d400a25075 Modified CMakeLists.txt in order to compile Kicad with KICAD_GAL=ON for Windows
Added settings that allow to use M cross environment (http://mxe.cc) to crosscompile Kicad for Windows.
2013-04-09 16:12:18 +02:00
Maciej Suminski ef5693080f Fixed line style used for displaying texts. 2013-04-09 16:12:17 +02:00
Maciej Suminski 70769d5d46 Fixed drawing of circles in certain circumstances using OpenGL. 2013-04-09 16:12:16 +02:00
Lorenzo Marcantonio 0de48234bc Printf was missing a GetChars 2013-04-09 04:31:36 +02:00
Wayne Stambaugh 477069c063 Fix compile bug in ptree.cpp with wxWidgets 2.9.x and MinGW. 2013-04-08 20:16:53 -04:00
Dick Hollenbeck 6bf3d7cdc3 Implement "KiCad s-epression" support for boost::property_tree's ptree, the 8
bit string version of property_tree. The ram resident structure of the ptree is
mostly compatible with one created using the xml_parser from
boost::property_tree, with slight differences in the way atoms are stored. The
result is you can use Format() to convert from xml to s-expression, but not the
other way around. You can write a simple s-expression beautifier in just a few
lines of code.

The main value however is the s-expression parser, i.e. Scan(), which is an
alternative to crafting a custom recursive descent parser for a particular
grammar. The tipping point depends on whether you want to read only a small
portion of a much larger document. If so, then using the ptree will likely be a
"faster to code" route. Documentation on how to navigate a ptree can be found on
the boost website and there are a number of examples in the
pcbnew/eagle_plugin.cpp file in this project. Powerful path navigation support
makes it easy to extract a subset of a ptree.
2013-04-08 16:04:45 -05:00
Maciej Suminski 05e3ae645d Fixed distorted polygons' corner display 2013-04-08 11:01:49 +02:00
Maciej Suminski 664692b2e6 Added outline display mode for pads, vias & tracks 2013-04-08 10:54:31 +02:00
Maciej Suminski 850c0a8473 Added high contrast display mode using GAL rendering.
New methods in VIEW class: SetTopLayer(), EnableTopLayer() for managing the top layer display.
New method in PCB_RENDER_SETTINGS class: LoadDisplayOptions() for applying display settings like high-contrast, outline display of items, etc.
2013-04-08 10:50:47 +02:00
jean-pierre charras 7bb04c8f63 Make some messages translatable.
Make dialog footprint wizard list resizable.
2013-04-08 09:13:26 +02:00
Marco Mattila e04b6a04a6 Use the boundary of the object and not just the boundary of the text in SCH_TEXT hit testing. 2013-04-07 21:49:13 +03:00
Lorenzo Marcantonio b739b2b075 Support for a visibility flag and color selection to NPTH holes
(when disabled they are shown as standard holes, a lot less distracting
than the previous fixed yellow color)
2013-04-07 18:20:46 +02:00
Lorenzo Marcantonio 204d085b64 More cleanup on layer code usage
Better description for entities on right click menu and panel
Typo fixes and some comment reformats
2013-04-07 13:55:18 +02:00
Lorenzo Marcantonio 9ebb4afacc Removed arbitrary MAX_LAYER_ROWS limit (only used in one assertion, anyway) 2013-04-06 18:46:03 +02:00
Lorenzo Marcantonio 150cfebb59 Fixed some tab-induced disalignments
Charras beat me on fixing the include/sch_item_struct.h include issue from 4069
2013-04-06 14:28:02 +02:00
jean-pierre charras ca4a3651c0 Gerbview, layer manager: add option (popup menu) to always keep layers not visible but the active layer, even when the active layer is changed.
Pcbnew: fix swig warning for operator EDA_COLOR_T::++  (changed to function EDA_COLOR_T:: NextColor)
2013-04-06 14:01:53 +02:00
Lorenzo Marcantonio 74a57d4ea8 Cleanup of the eeschema 'layers' i.e. entitity colours. This also fixes
the spurious warning about stuff that couldn't be seen when changing
colours.
NOTE that the 'net name' layer is present and configurable but non used 
anywhere!
2013-04-06 07:01:48 +02:00
Lorenzo Marcantonio 00f0e27851 Factored layer utility functions: classification, layer flip and mask flip 2013-04-05 21:04:58 +02:00
Lorenzo Marcantonio db09deedf7 New color palette 2013-04-05 19:23:56 +02:00
Lorenzo Marcantonio 90f2e67ed8 Typo fix 2013-04-05 17:09:04 +02:00
Maciej Suminski 52ec277592 Fixed bug of displaying stroked rectangles on wrong layer depth. 2013-04-05 15:10:58 +02:00
Maciej Suminski 84239542b7 Fixed code formatting. 2013-04-05 15:10:31 +02:00
Lorenzo Marcantonio 63e987edd0 Removed the default generation of phantom text by the postscript plot driver.
It crashes Adobe's own implementation of postscript!
2013-04-05 10:55:46 +02:00
jean-pierre charras 752e4a4a58 All: change some texts and messages hard to translate, or not translatable (and some incorrect messages).
Pcbnew, layer manager: add option (popup menu) to always keep copper layers not visible but the active layer, even when the active layer is changed.
Usefull for multilayer ( more than 4 layers) PCBs.
2013-04-05 09:38:00 +02:00
Lorenzo Marcantonio d12a45923b More work on EDA_COLOR_T and layers.
In particular the new mechanism for handling extended color palettes is in place,
included renaming the ini keys and saving the color name instead of its index; this means better forward compatibility with palette changes.

Since ini keys are changed, colors will be reset
2013-04-04 23:35:01 +02:00
Maciej Suminski 6d088b4365 Added setting active layer in PAINTER's render settings according to the PCB layer widget. 2013-04-04 14:17:40 +02:00
Maciej Suminski ccc0fb06c9 Added missing CMakeModules (Cairo & GLEW). 2013-04-04 11:52:16 +02:00
Maciej Suminski 329eae1f74 Added GetSettings() method for obtaining current rendering settings used by PAINTER class. 2013-04-04 11:23:23 +02:00
Maciej Suminski 826d5a8954 Added GetMinDepth()/GetMaxDepth() methods (useful for displaying things on the top or on the bottom). 2013-04-04 11:21:35 +02:00
Maciej Suminski 18374e53a0 common/painter.cpp: Removed unnecessary header inclusion, added variable initialization
common/view/view.cpp: Added line to comply with coding style
2013-04-04 11:18:47 +02:00
jean-pierre charras a47d36e399 Pcbnew: fix Bug #1163201. Fix Bug #1162779. Fix incorrect comment in CMakeLists.txt. 2013-04-03 18:16:26 +02:00
Maciej Suminski 2e5bd2fad1 Added painting of DIMENSION & PCB_TARGET items. Removed unnecessary header inclusion. 2013-04-03 11:19:13 +02:00
Maciej Suminski 39086ffb3f Added loading layer visibility settings when loading a board. Minor code cleaning. 2013-04-03 11:19:08 +02:00
Lorenzo Marcantonio 41d254fb48 Meaningful tooltip for ECO layers 2013-04-02 19:11:42 +02:00
Lorenzo Marcantonio 23981977f3 Fixed idiotic merge error in busentry handling 2013-04-02 18:04:12 +02:00
Maciej Suminski 4e4776c370 Showing module's value and reference text on proper layers. 2013-04-02 11:03:15 +02:00
Maciej Suminski a97c9a1b96 Added possibility to show/hide layers using right sidebar (PCB layer widget) in the GAL rendered view. 2013-04-02 11:02:35 +02:00
Maciej Suminski e262b32198 Introduction of Graphics Abstraction Layer based rendering for pcbnew.
New classes:
    - VIEW - represents view that is seen by user, takes care of layer ordering & visibility and how it is displayed (which location, how much zoomed, etc.)
    - VIEW_ITEM - Base class for every item that can be displayed on VIEW (the biggest change is that now it may be necessary to override ViewBBox & ViewGetLayers method for derived classes).
    - EDA_DRAW_PANEL_GAL - Inherits after EDA_DRAW_PANEL, displays VIEW output, right now it is not editable (in opposite to usual EDA_DRAW_PANEL).
    - GAL/OPENGL_GAL/CAIRO_GAL - Base Graphics Abstraction Layer class + two different flavours (Cairo is not fully supported yet), that offers methods to draw primitives using different libraries.
    - WX_VIEW_CONTROLS - Controller for VIEW, handles user events, allows zooming, panning, etc.
    - PAINTER/PCB_PAINTER - Classes that uses GAL interface to draw items (as you may have already guessed - PCB_PAINTER is a class for drawing PCB specific object, PAINTER is an abstract class). Its methods are invoked by VIEW, when an item has to be drawn. To display a new type of item - you need to implement draw(ITEM_TYPE*) method that draws it using GAL methods.
    - STROKE_FONT - Implements stroke font drawing using GAL methods.
                          
Most important changes to Kicad original code:
    * EDA_ITEM now inherits from VIEW_ITEM, which is a base class for all drawable objects.
    * EDA_DRAW_FRAME contains both usual EDA_DRAW_PANEL and new EDA_DRAW_PANEL_GAL, that can be switched anytime.
    * There are some new layers for displaying multilayer pads, vias & pads holes (these are not shown yet on the right sidebar in pcbnew)
    * Display order of layers is different than in previous versions (if you are curious - you may check m_galLayerOrder@pcbnew/basepcbframe.cpp). Preserving usual order would result in not very natural display, such as showing silkscreen texts on the bottom.
    * Introduced new hotkey (Alt+F12) and new menu option (View->Switch canvas) for switching canvas during runtime.
    * Some of classes (mostly derived from BOARD_ITEM) now includes ViewBBox & ViewGetLayers methods.
    * Removed tools/class_painter.h, as now it is extended and included in source code.
                         
Build changes:
    * GAL-based rendering option is turned on by a new compilation CMake option KICAD_GAL.
    * When compiling with CMake option KICAD_GAL=ON, GLEW and Cairo libraries are required.
    * GAL-related code is compiled into a static library (common/libgal).
    * Build with KICAD_GAL=OFF should not need any new libraries and should come out as a standard version of Kicad
                            
Currently most of items in pcbnew can be displayed using OpenGL (to be done are DIMENSIONS and MARKERS).
More details about GAL can be found in: http://www.ohwr.org/attachments/1884/view-spec.pdf
2013-04-02 08:54:03 +02:00
jean-pierre charras f4d6430eb0 Eeschema: Minor changes in dialogs to ensure a better likeness between dialogs on Linux and Windows (mainly, remove some useless wxStaticBoxSizer in dialogs)
Update Clipper version.
2013-04-01 14:41:46 +02:00
Lorenzo Marcantonio e18404eea1 Removed unused width attribute from schematic line 2013-04-01 13:59:19 +02:00
jean-pierre charras fd1cd36f63 Minor changes in dialogs to ensure a better likeness between dialogs on Linux and Windows (mainly, remove some wxStaticBoxSizer in dialogs) 2013-04-01 13:42:09 +02:00
jean-pierre charras 92e0eb628c Minor changes in dialogs to ensure a better likeness between dialogs on Linux and Windows (mainly, remove some wxStaticBoxSizer in dialogs) 2013-04-01 12:50:01 +02:00
Lorenzo Marcantonio f37812f898 Refactoring: split in two the SCH_BUS_ENTRY class 2013-04-01 12:35:20 +02:00
Lorenzo Marcantonio 0dd413a711 Removed unused defines 2013-04-01 07:53:38 +02:00
Lorenzo Marcantonio cc0524a21a Converted the IS_BUS/IS_WIRE define to an enum 2013-04-01 07:47:44 +02:00
Lorenzo Marcantonio 8175163296 Better type safety to DANGLING_END_ITEM (SCH_ITEM* instead of void*) 2013-04-01 07:26:53 +02:00
Lorenzo Marcantonio c32f56ffaa Removed the long time dead SCH_POLYLINE class (schematic level polyline) 2013-03-31 22:40:22 +02:00
Lorenzo Marcantonio 86851d39a4 Hide the anchor for hidden text (suggested by Sergey Borshch) 2013-03-31 20:57:31 +02:00
Lorenzo Marcantonio 9fd79dfa91 Implemented the LAYER_NUM typedef (LAYER was already taken as a class name...) to represent a layer number. 2013-03-31 15:27:46 +02:00
jean-pierre charras 8e09679437 Minor cosmetic fixes (mainly on Linux) in dialogs. 2013-03-31 14:44:23 +02:00
Wayne Stambaugh 29bf40dc96 Fix build errors in layer mask changes. 2013-03-30 19:41:08 -04:00
Lorenzo Marcantonio 27ee815742 Minor flags and layer mask cleanup 2013-03-30 20:55:26 +01:00
Lorenzo Marcantonio c650c378c0 Fixed the logic for "do you want to make the footprint visible" requester
(meaning was inverted)
2013-03-30 18:49:58 +01:00
Lorenzo Marcantonio e0303a4558 - New typedef LAYER_MSK to encapsulate a layer bitmap
- Renamed ReturnMaskLayer to GetLayerMask (since it's a plain getter)
2013-03-30 18:24:04 +01:00
jean-pierre charras 1702ab3a00 pcbnew: fix some cosmetic issues mainly on Linux ( these issues could be very dependant on wxWidgets/Gtk versions) 2013-03-30 15:06:05 +01:00
jean-pierre charras 9c60e618c0 pcbnew: fix some cosmetic issues (could be very dependant on wxWidgets/Gtk versions) 2013-03-30 14:36:19 +01:00
jean-pierre charras 51291b0965 Fix many issues in config functions, mainly a rounding issue when a double is stored in wxConfig file (was stored only using 4 digits in mantissa)
Remove dead or obsolete code.
2013-03-30 10:28:59 +01:00
Wayne Stambaugh 45fc0125a7 Fix field position bug in edit component dialog when OK button cancelled due to empty field. 2013-03-29 20:06:08 -04:00
jean-pierre charras d0724de1de Fix rounding issue when a double is stored in a wxConfig file (wxWidgets 2.9.4 store only 4 digits in mantissa).
A new inline function ConfigBaseWriteDouble( config, key,  double_value )  is used instead of config->Write(  key, double_value ) which store 12 digits
2013-03-29 11:14:32 +01:00
Wayne Stambaugh bf56b2b35d Fix a GOST compile error. 2013-03-28 16:49:17 -04:00
Lorenzo Marcantonio 675f8d4a0b Typedef STATUS_FLAGS to encapsulate EDA_ITEM bitmapped flags 2013-03-28 20:12:46 +01:00
Wayne Stambaugh cd18ff1762 Fix X3D patch commit coding policy issues. 2013-03-28 12:51:22 -04:00
Maciej Suminski ef2c94069f Added template RTREE and class VIEW_RTREE (R-tree for fast spatial indexing of VIEW items; for future usage in GAL) 2013-03-28 17:48:29 +01:00
Maciej Suminski ad4bf38e7a Added class COLOR4D that contains color representation with 4 components (RGBA) (for future usage in GAL) 2013-03-28 17:42:15 +01:00
Maciej Suminski 7e0a44e4af Added template MATRIX3x3 for handling general 3x3 matrices (for future usage in GAL) 2013-03-28 17:38:33 +01:00
Maciej Suminski 30e1aaec26 Replacement of classes BOX2 and VECTOR2 with their extended versions
include/vector2d.h: Removed old version
include/math/math_util.h: rescale() for VECTOR2
include/math/vector2d.h: New version of VECTOR2
include/math/box2.h: New version of BOX2
common/drawframe.cpp: Refactorization of code, so it is compatible with new classes
include/plot_common.h, pcbnew/basepcbframe.cpp: Changed header inclusion path
CMakeLists.txt: Added definition to turn on WX_COMPATIBILITY for replacement classes
2013-03-28 17:30:09 +01:00
jean-pierre charras 3c037a3c31 Pcbnew, Module Editor: fix bug Bug #1161114 (pad not visible after undoing a move pad) 2013-03-28 10:40:29 +01:00
Lorenzo Marcantonio 4865a68fa0 Extremely trivial stuff (mostly cosmetics) 2013-03-28 07:40:19 +01:00
Andrey Fedorushkov 5a5b90984a all: new Russian GOST patch - author Konstantin Baranovskiy
pcbnew: fix print format in THROW_IO_ERROR
        fix properties file export_vrml.cpp
2013-03-28 00:38:20 +04:00
jean-pierre charras e90fc3a9b2 Better fix for bug #1155888 2013-03-27 20:36:10 +01:00
jean-pierre charras 5874ac0f6f Commit patch for x3d file reader (with minor changes). Commit other minor patches and fixes 2013-03-27 19:34:23 +01:00
Lorenzo Marcantonio aae87178a7 Renamed global variables:
Drc_On => g_Drc_On
Route_Layer_TOP => g_Route_Layer_TOP
Route_Layer_BOTTOM => g_Route_Layer_BOTTOM
Track_45_Only_Allowed => g_Track_45_Only_Allowed
2013-03-27 19:32:12 +01:00
Dick Hollenbeck 0cbe14c12e reference a test program in a comment 2013-03-27 09:01:50 -05:00
Dick Hollenbeck 50682ef2dc remove interrim fix, no longer needed 2013-03-27 08:33:24 -05:00
Lorenzo Marcantonio ccd0ab78f3 Removed unused define TEXT_VTAB_HEIGHT 2013-03-26 21:02:23 +01:00
jean-pierre charras cc46ee0ec9 Pcbnew: Fix Bug #1160396 2013-03-26 19:15:30 +01:00
Wayne Stambaugh a6232e2c92 Fix field text position access bug in Eeschema. (fixes lp:1160214) 2013-03-26 13:25:18 -04:00
jean-pierre charras f824c83842 Pcbnew: fix an issue when texts in footprints have a size = 60 mils (default size for texts). After saving and reading the .kicad_pcb file, the size was not correct. 2013-03-26 18:05:47 +01:00
jean-pierre charras 00bdc80087 Pcbnew: Fix a collision name between 2 methods: EDA_ITEM::GetFlags() and ZONE_CONTAINER::GetFlags(), which creates a very strange behavior when creating/edition zones.
ZONE_CONTAINER::GetFlags() is now named  ZONE_CONTAINER::GetLocalFlags().
2013-03-26 10:58:40 +01:00
jean-pierre charras 8cb20938f4 Pcbnew: fix issue in zone keepout dialog: layers not displayed on Linux, and minor changes 2013-03-25 20:11:22 +01:00
jean-pierre charras 019d1364d3 Pcbnew: fix issue in zone keepout dialog: layers not displayed on Linux, and minor changes 2013-03-25 19:48:07 +01:00
Wayne Stambaugh db5d90ce9f Fix SCH_FIELD get reference designator text bug. (fixes lp:1159401) 2013-03-25 13:09:55 -04:00
jean-pierre charras 8d61cd0e5b Pcbnew: fix issue in zone keepout dialog: layers not displayed on Linux 2013-03-25 18:02:29 +01:00
jean-pierre charras 372ce6595a Very minor changes in dialog zones. 2013-03-25 14:37:48 +01:00
Andrey Fedorushkov 2b9297020b eeschema: fix build when KICAD_GOST ON (insert in bzr4019) 2013-03-24 00:37:48 +04:00
jean-pierre charras 21d1402c03 Pcbnew, ModEdit: fix issue when setting anchor position, and minor code cleaning. 2013-03-23 14:30:00 +01:00
Wayne Stambaugh 25e7abec0d Encapsulation, bug, context menu string, and, coding policy fixes.
* Complete encapsulation of the ZONE_CONTAINER class.
* Fixed a bug in the EDA_TEXT::Format() default effects behavior due to
  improper conversion to internal units and missing test for default
  thickness.
* Improved grammar of some Pcbnew context menu strings.
* Moved some more cleverly hidden BOARD object methods into class_board.cpp.
* Lots of coding policy and documentation fixes.
2013-03-20 10:50:12 -04:00
Dick Hollenbeck 25b65b2e3b Consistent with my email posting from a day or two ago, remove the translated
standard layer name support from BOARD::GetLayerName().  This function evolved
in a contorted direction over time, and was being asked to return one of 3
different kinds of layer names, even though it only took a boolean to control
that choice.  

Users are better served by forcing them to get to know the concise new 
English Standard layer names.  This is because these concise names show up
in the "pretty" footprint/module files as the standard representation of
both feature and copper layers.

Change the name of BOARD::GetDefaultLayerName() to GetStandardLayerName().
Drop boolean argument to both BOARD::GetStandardLayerName() and 
BOARD::GetLayerName().
2013-03-19 23:46:32 -05:00
Carl Poirier 8421cacef4 Add library column to component and module select dialog. 2013-03-18 21:25:19 -04:00
Wayne Stambaugh 7d0ec1a138 More encapsulation work.
* Complete encapsulation of the MODULE class.
* Complete encapsulation of the EDA_TEXT class.
* Encapsulate most of the ZONE_CONTAINER class.
* Add pcbcommon library as a dependency for reSWIGging the scripting
  support.  This should cover most dependency cases.
2013-03-18 15:36:07 -04:00
Miguel Angel Ajo da9e6b1679 checkcoding.py refactor from Edwin van den Oetelaar, some extra refactorings by me, improvement suggestions from Carl Poirier 2013-03-18 12:22:31 +01:00
jean-pierre charras 3e8bd5592b Pcbnew: fix Bug #1156193 . Fix compil issues when KICAD_SCRIPTING_WXPYTHON is not enabled and KICAD_SCRIPTING is enabled 2013-03-17 20:04:42 +01:00
Miguel Angel Ajo f227383341 ReloadPlugins() python function, and mtime stored in the KICAD_PLUGINS dictionary 2013-03-17 03:03:18 +01:00
Miguel Angel Ajo 1cf52baaa0 New register() method in plugins, used by the loader to handle runtime plugin reloading 2013-03-17 02:18:09 +01:00
Miguel Angel Ajo 31a693cb8d Refactoring python to wxArrayString, and better exception error reporting 2013-03-17 02:14:46 +01:00
Miguel Angel Ajo f83a200e5e Fix wxString.Print call to be compatible with wx2.8, thanks to Барановский Константин and Edwin van den Oetelaar for submiting same patch, same hour, are you twins? ;) 2013-03-17 00:51:43 +01:00
jean-pierre charras b992feeaf6 Pcbnew: designe rule dialog: fix incorect size of track list grid 2013-03-16 12:12:18 +01:00
Miguel Angel Ajo 9a8baa00f2 Allow plugins to be reloaded without closing/opening pcbnew, next step is plugin editor, just a few lines away... 2013-03-16 04:27:48 +01:00
Miguel Angel Ajo ecc6a69f4f Also check coding style of new files, not only modified ones 2013-03-16 00:28:35 +01:00
Miguel Angel Ajo 6c614e2996 tool for checking coding style 2013-03-16 00:21:53 +01:00
Miguel Angel Ajo 155ea57c36 LOCALE_IO toggle implementation for locale switches on scripting; code cleanups to comply with kicad coding style policy 2013-03-15 17:35:24 +01:00
Miguel Angel Ajo cefd3cd5e2 Fixed wxGrid re-creation and missing icon for dialog 2013-03-15 15:50:54 +01:00
Miguel Angel Ajo df93154dee wxT added to the locales fix, message box on python exceptions inside wizard, added some missing copyright notices 2013-03-15 14:27:18 +01:00
Miguel Angel Ajo 1477210b67 Fix for locales that set , as a decimal point (which is incompatible with python scripting), also fixed the m_Reference encapsulation in module to Reference() 2013-03-15 01:56:36 +01:00
Dick Hollenbeck 76e21c28a4 EAGLE_PLUGIN now establishes (trace_min), (via_min_size), (via_min_drill), and Default Net's (clearance)
by groking the eagle *.brd info.  This makes it more probable that fewer DRC errors come about on first 
DRC attempt.
2013-03-14 17:54:47 -05:00
jean-pierre charras ea5a03f93c 3D viewer: fix very minor issues (better rendering of 3D view). 2013-03-14 17:11:05 +01:00
jean-pierre charras 155a53dc57 Very minor fixes, mainly for the stable version 2013-03-13 20:15:09 +01:00
jean-pierre charras 53e98dede8 Last (minor) fixes for the stable version 2013-03-13 20:06:46 +01:00
Wayne Stambaugh 42d7bf6c8e Pcbnew encapsulation and code cleaning.
* Encapsulate most of the MODULE class.
* Start encapsulating the DIMENSION class.
* Lay some groundwork for EDA_TEXT encapsulation.
* Move cleverly hidden MODULE functions into class_module.cpp.
* Use std::swap to exchange TEXTE_PCB values for undo/redo.
* Remove unused members from MODULE class.
* The usual coding policy and documentation fixes.
2013-03-13 14:53:58 -04:00
Dick Hollenbeck 8287775bac EAGLE_PLUGIN cu layer map fix broke footprint library loading 2013-03-13 11:38:54 -05:00
Dick Hollenbeck 22c85e78ff EAGLE_PLUGIN cu layer map fix 2013-03-13 11:17:16 -05:00
jean-pierre charras 1be0b66d53 Pcbnew: fix a bug in autoplac.cpp 2013-03-12 17:37:41 +01:00
jean-pierre charras c8ed3280f3 Pcbnew: Fix many minor issues in print dialog, mainly in modedit. 2013-03-12 16:17:44 +01:00
Miguel Angel Ajo 742e1a7e44 Reverted back the ( i ) parameters for python, applied the PyGILState_Ensure from Dick into his PyLOCK class 2013-03-12 01:37:45 +01:00
jean-pierre charras 93a8e7b395 Pcbnew: print dialog: code cleanup and bug fixes (added some fixes from Sergey A. Borshch) 2013-03-11 20:30:58 +01:00
Dick Hollenbeck 2a2a530c62 improvements to python's GIL acquisition and release, but not done yet, since I think the GIL needs to be acquired even when not involving wxPython. 2013-03-11 03:09:48 -05:00
jean-pierre charras a88d067abf Kicad manager: fix bug: .kicad_pcb files not saved in zip file 2013-03-10 20:55:21 +01:00
jean-pierre charras 9d40727b4c Pcbnew: fix issues: Ensure pads type connector have a drill size= 0, like SMD pads. Ensure keepout zones have no net. 2013-03-10 14:59:47 +01:00
Miguel Angel Ajo ccd9500bfb Project templates now can find the system templates from KICAD environment variable 2013-03-10 02:35:24 +01:00
jean-pierre charras 5fc382df85 Pcbnew: Partial merge from pcad2kicad (from Alexander Lunev). Fix an old bug related to pads with offset: sometimes the connection to a zone was not detected. 2013-03-09 20:36:31 +01:00
jean-pierre charras 8306f4c65c Pcbnew: fix bug in export vrml (bad Z position of 3D shapes). Very minor code cleaning. 2013-03-08 08:29:30 +01:00
Wayne Stambaugh 2ab86e7400 Documentation and coding policy fixes.
* Fix all Doxygen warnings except polygon files.
* Add footprint library table tasks to TODO.txt.
* Add definition to drag.h to prevent nesting.
* Coding policy fixes.
2013-03-07 12:12:59 -05:00
Baranovskiy Konstantin 9a131706d7 Width factor for DXF plotting text used an inverted aspect ratio. 2013-03-07 08:15:35 -06:00
jean-pierre charras 1ae31edb9a Gerbview: Minor fixes 2013-03-06 20:32:59 +01:00
jean-pierre charras 46f106b6cd Pcbnew: fix Bug #1148785 (pcbnew crashes when using only one layer in autorouter ) , and a minor bug in dialog cleanup. 2013-03-06 10:04:27 +01:00
jean-pierre charras c1fbc8ef8b Pcbnew, module edit dialogs: fix some "cosmetic" issues. 2013-03-04 20:59:12 +01:00
jean-pierre charras 88e50d9da4 Refinements 2013-03-04 20:31:09 +01:00
jean-pierre charras 248343c0a3 Refinements 2013-03-04 20:15:23 +01:00
jean-pierre charras c1f6576f07 Dialog edit module: remove some wxStaticBoxSizer sizers. 2013-03-04 19:49:32 +01:00
jean-pierre charras 9f3cea6755 Still fix very minor issues in dialog_edit_module_for_BoardEditor.cpp 2013-03-04 17:57:24 +01:00
jean-pierre charras 7ff61616dc Still fix minor issues in dialog_edit_module_for_BoardEditor.cpp (noticeable only for non English users) 2013-03-04 17:39:08 +01:00
Wayne Stambaugh fa869a9690 Minor Pcbnew dialog spacing and consistency fixes. (fixes lp:1143465)
* Fix spacing and consistency issues and debug warning due to improper flex
  grid sizer in module editor module properties dialog.
* Fix spacing and consistency issues in Pcbnew module properties dialog.
* Fix spelling error in DRC dialog message box text.
2013-03-04 11:04:53 -05:00
jean-pierre charras fa73d54456 Pcbnew: fix strange things in module edit dialogs. 2013-03-04 13:08:35 +01:00
Andrey Fedorushkov 02b5b477da pcbnew: fix build in linux gcc-4.5.2 2013-03-02 20:32:05 +04:00
jean-pierre charras e4f72171f5 Eeschema: fix broken mirroring for texts and labels in block mirror X and Y (this fixes Bug #1135505)
Pcbnew: add in module popup menu an option to edit the footprint in Modedit (like in Eeschema for components)
minor icons enhancements.
2013-03-01 20:59:29 +01:00
Wayne Stambaugh 35bec26ff3 Update coding policy to remove support for MSVC. 2013-03-01 08:32:55 -05:00
Dick Hollenbeck 807ac4e3e5 Debug build fix 2013-02-28 22:20:29 -06:00
Dick Hollenbeck 43eaba0bb0 parse *.kicad_pcb files with numeric net_names 2013-02-28 10:17:24 -06:00
Dick Hollenbeck 9191f28aeb specctra_export to handle Edge Cuts graphics in modules 2013-02-27 09:54:29 -06:00
jean-pierre charras a9fbce5c72 CMakeLists.txt: use elseif token instead of elif which create strange issues with some cmake versions.
Fix minor issues in nsis config files
2013-02-27 13:46:40 +01:00
jean-pierre charras 3313b34a01 CMakeLists.txt: use elseif token instead of elif which create issues with some cmake version.
Fix minor issues in nsis config files
2013-02-27 08:19:42 +01:00
jean-pierre charras 7a5386a1a1 Minor fixes and cleanup 2013-02-26 12:25:30 +01:00
jean-pierre charras 4343eb5b8d Fix Bug #1132416. Minor update in templates. 2013-02-24 18:31:18 +01:00
Baranoviskiy Konstantin af433f8031 Remove redundant Eeschema plot submenu on platforms that do not support plot to clipboard. 2013-02-23 15:08:28 -05:00
Wayne Stambaugh facde96ec2 Add build option to use footprint library table. 2013-02-23 14:30:43 -05:00
Anton Blanchard cd664e8b9b Fixes segfault in Pcbnew module editor when clicking delete tool where there is no object. 2013-02-22 18:29:44 -05:00
Wayne Stambaugh 348b7de4ab Fix Eeschema plot dialog escape key handling bug on some Linux distros. 2013-02-22 16:59:53 -05:00
Wayne Stambaugh 0e4bb20e3c Minor dialog and footprint ID class fixes.
* Make Pcbnew net list dialog honor escape key on Linux.
* Make Pcbnew swap layers dialog honor escape key on Linux.
* Layout and UI policy fixes for Pcbnew swap layer and net list dialogs.
* Layout and UI policy fixes for Eeschema plot dialog.
* Rename fpip.h to fpid.h.
* Fix FPID class compiler errors.
* Restore fpid.cpp to Pcbnew static library source list.
2013-02-22 15:03:00 -05:00
Dick Hollenbeck 74540cb49a wxID_CANCEL, 5 pixel border around sizers, resizable search combobox, dialog_shim usage on a few dialogs 2013-02-22 07:47:35 -06:00
jean-pierre charras 41c5e68e6c Pcbnew: Very minor fix in plot dialog. 2013-02-22 09:04:15 +01:00
Baranovskiy Konstantin e37372f45f Eeschema border and title block DXF plot color bug fix. 2013-02-21 18:45:46 -05:00
jean-pierre charras 72e845b2f1 Pcbnew: plot Dialog: add a popup menu (try mouse right click in plot dialog) to selected/unselect groups of layers to plot.
All: For new zoom centering option: use Shift+Ctrl key instead of Alt key to select the new zoom centering, because Alt key has a special function under Windows.
2 very minor other changes.
2013-02-21 21:53:50 +01:00
Baranovskiy Konstantin 55526a100a DXF plot layer color bug fix. (fixes lp:1126403) 2013-02-20 15:26:34 -05:00
jean-pierre charras ee2ed120bd Eeschema: Fix Bug #1130262 (Inverted pins are plotted with erroneous line width) 2013-02-20 12:46:38 +01:00
Wayne Stambaugh 0564cbc70c Minor dialog spacing, grammar, and sizer fixes. 2013-02-19 14:43:48 -05:00
jean-pierre charras 77945c4eb8 Pcbnew: Export vrml: fix an issue for 3D shapes having a local offset defined: the local offset was not correctly scaled. 2013-02-19 10:21:55 +01:00
Wayne Stambaugh 8cd77e78f9 Minor dialog spacing, grammar, and UI policy fixes. 2013-02-18 15:14:53 -05:00
Emmeran 13972e0678 Adds zooming method for zooming relative to the crosshair instead of centering
the crosshair after zooming.

This method is only used when the ALT key is held while using the mousewheel or
if it's permanently enabled in the options dialog next to the middle mouse
button panning option.
2013-02-18 09:57:39 -06:00
Dick Hollenbeck e6df9921b1 fp lib table work 2013-02-15 19:09:53 -06:00
Dick Hollenbeck f77c10ac96 typos and tooltip 2013-02-15 18:13:35 -06:00
Jacobo Aragunde Perez af9ee9f4e7 Plot dxf format: fix issue for some non latin1 chars. 2013-02-15 12:53:16 +01:00
Antia Puentes a379e5d67c Commit patch from Antia Puentes relative to bug Bug #1125047 : PcbNew: Insert a footprint in the board, from the Library Browser, by double clicking on it, with a change to avoid the button release event (from the double click) to be seen by the main window. 2013-02-14 22:20:56 +01:00
marco. 34f7cbc6f9 MacOSX: now autoplace is drawn correctly 2013-02-14 20:57:19 +01:00
marco. 3217bb59a7 MacOSX: Now Arcs are shown in edit mode 2013-02-14 20:56:45 +01:00
Wayne Stambaugh 8289899df8 Add CheckCXXSymbolExists.cmake to fix configure bug using CMake versions prior to 2.8.6. (fixes lp:1124854) 2013-02-14 13:39:36 -05:00
jean-pierre charras 0a34f97624 Remove outdated (and/or erroneous) documentation. 2013-02-14 18:57:12 +01:00
Dick Hollenbeck 49bca46a5c -fPIC only for non-MINGW. See http://mingw.5.n7.nabble.com/Option-fPIC-not-supported-td18480.html 2013-02-14 09:31:56 -06:00
Dick Hollenbeck fdc8a1345d typo 2013-02-14 08:50:32 -06:00
Dick Hollenbeck e4d09b96bc add -fPIC for all builds, even cross comiling to Windows from Linux, even non Debug and Release builds 2013-02-14 07:12:54 -06:00
jean-pierre charras 89f590a1fc Pcbnew: Pcad2kicad: remove dead code. 2013-02-13 18:19:46 +01:00
Antia Puentes fa0a51411a Eeschema: force file ext in"Sheet Save As" command (Bug #1122212 ) 2013-02-13 18:18:23 +01:00
Wayne Stambaugh 330b8bff30 Fix bug caused by setting default drill size in D_PAD (fixes lp:1123392).
* Add check for pad type and force drill size to zero if pad is surface
  mount in PCB_PARSER.
* Modify the D_PAD SetAttribute method to clear drill size if pad type is
  set to surface mount.
2013-02-12 20:01:22 -05:00
Dick Hollenbeck e1addadb4d fix compiler warnings on gcc 4.6.3, Debug build 2013-02-12 11:41:13 -06:00
Emmeran 6a54a198ca converted linux to dos file endings for wxfb files 2013-02-12 05:30:28 +01:00
Emmeran 95213372fe moved changes to dialogs into fbp files 2013-02-12 05:18:22 +01:00
Emmeran 226b877ab9 tabs converted to spaces except wxstruct.h 2013-02-12 04:56:46 +01:00
Wayne Stambaugh 001afa4960 Pcbnew pad properties dialog assertion and layout fixes.
* Fixed spacing issue in pad properties dialog.
* Remove wxSHAPED flag from pad drawing panel to prevent assertion in
  wxSizer.
* Used sane default pad size and drill size settings to prevent wxRound
  assertions.
* Add license to class_board_design_settings.cpp.
2013-02-11 20:07:04 -05:00
jean-pierre charras e206a1b4c5 Eeschema: All fixed fields are now always saved in libraries. Therefore the footprint field can be set in lib (size, visibility) and imported in schematic with its predefined attributes, even if the footprint text is not set. 2013-02-11 19:50:55 +01:00
Wayne Stambaugh 4d465ec8a0 Configuration and compile documentation improvements.
* Improve the stable and testing build version option logic.
* Use CMake FindPythonInterp to configure the Python interpreter.
* Use Python interpreter to determine the system Python module install
  path if not already defined on the command line.
* Add header symbol checks for asinh(), acosh(), and atanh().
* Add test source to check for isinf() which can be defined as a C++template.
* Replace conditional compile on windows systems for aXXXh() with CMake
  configuration tests.
* A few minor MSVC compile fixes.
* Fix incorrect python environment string in fixswigimports.py
* Create a separate document for KiCad CMake build options.
* Create a separate how to compile KiCad on Windows document.
2013-02-10 19:41:49 -05:00
jean-pierre charras 00fafe7d58 eeschema, libedit l fix a bug in lib_arc.cpp which creates incorrect arc start and arc end parameters after rotation or mirror.
the Bug #1121079 is due to this bug, but Bug #1121079 itself cannot be fixed because this is the data inside the lib which is broken.
2013-02-10 19:02:45 +01:00
jean-pierre charras 93a5b4a07f Upgrade boost to version 1.53.0 and clipper to 5.03 2013-02-10 14:52:01 +01:00
jean-pierre charras 42c2399af7 Pcbnew: Try to find a better workaround for zone fiill bug (crash or bad fil areasl in very rare cases).
pcbnew+Eeschema: Fix a very minor bug: filename not displayed in frame reference.
2013-02-09 21:03:20 +01:00
Wayne Stambaugh 3af054c702 Improve Eeschema find dialog behavior.
* Remove ignore mouse events before creating find dialog for true mode-less
  behavior as was originally intended.
2013-02-07 15:36:35 -05:00
Wayne Stambaugh 6582cea862 Improve zone context menu descriptions, fixes lp:1116483 2013-02-07 12:56:41 -05:00
jean-pierre charras f2ebfdf34e Pcbnew: rework on connection calculation: fix an issue for "composite" pads (complex pad build by association of some basic pads):
sometimes connections where not seen.
2013-02-07 18:40:50 +01:00
Jacobo Aragunde Perez da757938e6 Commit patch for bug 1116059 (Inconsistency between confirmation dialogs) 2013-02-07 18:35:37 +01:00
Dick Hollenbeck eed97c549d plotter output file being left open fix. 2013-02-06 09:21:37 -06:00
jean-pierre charras d958f92ccc Kicad manager: fix a minor issue noticeable on Kubuntu 12.04 (bad size of buttons area) 2013-02-06 14:15:40 +01:00
jean-pierre charras 410644343d Eeschema, Libedit: fixes color artifacts when moving/placing a pin.
Very minor other fixes.
2013-02-06 12:54:51 +01:00
jean-pierre charras 02bacd668e Very minor changes (tooltips update, to synchronize them with the doc update) 2013-02-04 09:52:56 +01:00
Andreas Beutling 7ceb3d11f2 fix some errors in common_plotHPGL_functions.cpp 2013-02-03 18:53:48 -06:00
Emmeran 0bdf5bac72 added option to allow zooming around the crosshair instead of the center; can be enabled via options or by holding alt while using the mousewheel 2013-02-02 20:10:48 +01:00
jean-pierre charras 619125f9ab Changes for CvPcb to eeschema stuff file: the stuff file generation from CvPcb is removed. Eeschema now imports footprints names from the .cmp usual file created by CvPcb or by Pcbnew (Why to use 2 file formats for the same thing?) .
Pcbnew: in netlist dialog: The user now can choose between the netlist and the .cmp file to import footprints names.
Therfore no need to delete the .cmp file when exists to use only the netlist.
This is useful for users who use CvPcb only once to fill footprints fields in schematic, and after edit/modify the footprints fields in schematic outside CvPcb.
2013-02-02 18:39:59 +01:00
Jacobo Aragunde Perez 638decafae Commit fixes for bugs #1108773 and #1110651 and a bug fix improvement for #1101718 and #1102381. 2013-02-01 08:58:49 +01:00
Jacobo Aragunde Perez 85562b45e8 Commit patch to fix bug 1108838 (+ fix a very minor fix in eeschema, when loading a new component) 2013-01-30 17:15:45 +01:00
jean-pierre charras eacc8b93f0 Pcbnew: Workaround to fix a crash when filling zone in Pcbnew nanometers (see Bug #1106451 ). Also happens with one of my boards.
Could be a bug inside boost::polygon. This is a workaround, because one never knows if this kind of bug is fixed.
However it fixes this issue for the 2 boards.
2013-01-27 14:54:43 +01:00
jean-pierre charras 8fb8b4335a Fix bug in TestSegmentHit( wxPoint aRefPoint, wxPoint aStart, wxPoint aEnd, int aDist ), when aDist = 0. (fix Bug #1106744 ) 2013-01-27 11:06:09 +01:00
jean-pierre charras 78a8be0e8e Pcbnew: fix a very old bug in DRC, pad to pad drc tests: sometimes a test between a rectangular pad and an oval pad was skipped.
Segment Hit Test: enhanced detection near segment ends (noticeable for instance when clicking on short tracks in Pcbnew.
Remove duplicate code about segment hit test.
remove unused file.
2013-01-26 18:49:48 +01:00
jean-pierre charras 5d5a50dde9 Eeschema: fix a bug which crashes Eeschema (when a label is being created, and its type is changed by popup menu, for instance to a text, before it was put on schematic)
remove unused file and minor coding style fix
2013-01-25 18:29:54 +01:00
acobo Aragunde Perez 2bea1c677c Eeschema: Add "append schematic" feature. Fix bug 1101718 <Empty plot filename> 2013-01-24 19:46:42 +01:00
Jacobo Aragunde Perez a641ebb344 Eeschema: Add "append schematic" feature. Fix bug 1101718 <Empty plot filename> 2013-01-24 18:46:37 +01:00
Dick Hollenbeck 72690e769c fix intermittent build problem involving out of sequence python invocation 2013-01-23 10:35:40 -06:00
Dick Hollenbeck 017fe9c4d4 fix compiler warnings with gcc 4.6.3 on x86_64 linux 2013-01-23 10:13:42 -06:00
Jacobo Aragunde Perez 03ffc93786 Eeschema: hotkey enhancement while moving a block or an item. 2013-01-21 21:16:04 +01:00
jean-pierre charras 9ededca9d7 Gerbview: Fix a minor but annoying issue in gerbview config: colors setup is broken when running a testing version after an old gerbview version (due to a bug of this old version which breaks the color config) 2013-01-21 21:02:07 +01:00
Jacobo Aragunde Perez 2f3c5e7a1e Eeschema: fix Bug #1102381 <eeschema: -cache.lib file not created the first time you save a schematic> 2013-01-21 20:58:02 +01:00
Dick Hollenbeck 273244a196 merge in branch fp-lib-table 2013-01-20 21:27:01 -06:00
Dick Hollenbeck 8fd0c322cd more fp lib table work 2013-01-20 21:12:16 -06:00
jean-pierre charras ac64da651d Pcbnew: fix a minor bug I created in rev 3912.
Still try to find a better fix for Bug #1100876, however I am thinking the bug is not in Kicad:
looks like a buggy version of wxWidgets is used, which sends sometimes an unwanted wxCommandEvent event,
when an event::Check() is called inside a function called by a  wxUpdateUIEvent event.
2013-01-19 16:01:17 +01:00
jean-pierre charras 7b8c89149b Pcbnew: Fix Bug #1097345 <module editor "change body item width (current)" does nothing.> 2013-01-19 13:58:54 +01:00
jean-pierre charras 81f9f743d3 Pcbnew: fix bug Bug #1101399 (Custom page size gets reset after restarting pcbnew) (bug also in eeschema)
Try to find a better fix for Bug #1100876
2013-01-19 10:58:25 +01:00
jean-pierre charras 129f93b8d3 Try to fix Bug #1100876< Modes (track/footprint) not available.>
It could be a race condition when setting the tools state on and off in PCB_EDIT_FRAME::OnSelectAutoPlaceMode( wxCommandEvent& aEvent ) on some Linux/wxWidgets versions
(does not happen on my computer)
2013-01-18 15:12:57 +01:00
Jacobo Aragunde Perez 5aaa55c898 Add patch from Jacobo Aragunde Perez <Log of opened and closed applications in KiCad launcher> 2013-01-18 11:44:35 +01:00
Jacobo Aragunde Perez 295b5b5dea Add patch from Jacobo Aragunde Perez <Log of opened and closed applications in KiCad launcher> 2013-01-18 11:42:23 +01:00
Dick Hollenbeck 07273ac439 fix goof-ed preprocessor test 2013-01-18 00:13:31 -06:00
Dick Hollenbeck 00d865c173 Enhance DIALOG_SHIM to optionally call SetFocus() after the derived class's constructor has been called, for wx 2.8 and wxGTK 2013-01-18 00:04:25 -06:00
jean-pierre charras 24f73eb87c Pcbnew: fix a minor bug: shape 3D filename not displayed in msg panel when clicking on a footprint. 2013-01-17 18:34:03 +01:00
jean-pierre charras 968a0c9204 Scripting: fix erroneous extension for S exp board files, which prevent to open a .kicad_pcb file from a python script
Make scripting version compilable on platforms where the python executable is not python2:
Just define it by -DPYTHON_EXECUTABLE=<python executable filename> when running cmake (there was already a partial fix for this)
2013-01-16 20:15:56 +01:00
jean-pierre charras cfa75bb828 Scripting: fix erroneous extension for Sexp board files
Make scripting version compilable on platforms where the python executable is not python2 (define it by -DPYTHON_EXECUTABLE=<python executable filename>)
2013-01-16 13:38:30 +01:00
jean-pierre charras de78b60dda Pcbnew: store in configuration the default line width (now in mm), under a new keyword, to avoid a strange behavior of pcbnew in decimils version (old pcbnew versions), after running pcbnew in nanometers. 2013-01-15 10:31:11 +01:00
jean-pierre charras 8d22086097 AUTHORS.txt: add some contributor names (I certainly forgot some other contributors, and I apologize).
Demos: convert .brd files to .kicad_pcb files and fix 2 broken files
2013-01-14 13:16:23 +01:00
jean-pierre charras a864ab6f9e Kicad manager: fix a recent bug: project tree not updated when kicad is launched by a command line with a project name to open.
Pcbnew: export vrml:
* move dialog functions to a new file: dialog_export_vrml.cpp (to be consistent with other dialogs).
* fix some coding style issues
* added patch from Cirilo Bernardo.
2013-01-13 19:41:15 +01:00
jean-pierre charras 7819efacf6 Kicad manager: fix a recent bug: project tree not updated when kicad is launched by a command line with a project name to open.
pcbnew: export vrml:
* move dialog functions in a new file: dialog_export_vrml.cpp.
* fix coding style issues
* patch add from cirilo Bernardo.
2013-01-13 17:55:07 +01:00
Dick Hollenbeck 8d5479ca1c pcbnew/CMakeLists.txt formatting and librt fix 2013-01-12 18:34:16 -06:00
Heikki Pulkkinen 3e18fa422c protect data in class_track.h, switch to using member accessors 2013-01-12 18:04:00 -06: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
jean-pierre charras 5c2efcbf3e 3D viewer: allows import of models created with openscad and convertedvia meshconv to wrl (thanks to Georg Gast <georg@schorsch-tech.de>)
Export VRML: fix scaling issue for pcbnew - nanometers.
2013-01-12 11:35:08 +01:00
Miguel Angel Ajo 0fedf6b3eb MacOSX compilation fixes 2013-01-10 23:10:05 +01:00
jean-pierre charras 4cb0cf6402 Commit missing files. 2013-01-10 13:20:16 +01:00
jean-pierre charras ccfd2369b9 EDA_LIST_DIALOG: add a filter option to select names to display is list, from a kamil zorychta's patch <kamil.zorychta@gmail.com>
Use wxFormBuilder to create EDA_LIST_DIALOG_BASE, like other dialogs.
Minor code cleanup (remove unused functions and coding style fixes) and minor bug fixes.
2013-01-10 13:18:43 +01:00
Wayne Stambaugh 8a5ea7ec0d Pcbnew BOARD object encapsulation improvements. 2013-01-09 13:52:44 -05:00
jean-pierre charras 8b6d5cb42f Pcbnew: Enhancement in connections calculations:
Until now, 2 tracks were seen as connected only if one end of the first track is *exactly* on one end of the other track.
Now the 2 ends are seen as connected when they are "near" i.e. the distance between the 2 ends is < track width/2
2013-01-08 18:58:06 +01:00
jean-pierre charras 518fdb93e5 Pcbnew: Fix unwanted selection clarification popmenu in board editor after double clicking on a DRC Unconnected error
(For DRC clearance error, it was fixed  in bzr 3838, but forgotten for DRC Unconnected error)
2013-01-07 21:52:15 +01:00
jean-pierre charras 0cb7b84880 Pcbnew: Fix Bug #1096766 ( Can't create filled zones after keepout zones) 2013-01-07 08:46:01 +01:00
jean-pierre charras 2dd5bcea2f Gerbview: add option to show negative objects. 2013-01-06 14:31:49 +01:00
Dick Hollenbeck f1af605d6c when linking a DSO, require all symbols to be resolved 2013-01-04 17:02:10 -06:00
jean-pierre charras 840e38de59 Pcbnew: fix link issue (undefined Read_GPCB_Descr symbol) in scripting mode. 2013-01-04 23:00:05 +01:00
Jacobo Aragunde Perez 3821472ad8 Prevent Pcbnew from opening the same file twice. 2013-01-04 18:47:59 +01:00
Jacobo Aragunde Perez f914cd0dec Eeschema:commit patch <Prevent Eeschema from opening the same file twice> with a small fix for windows. 2013-01-04 13:06:50 +01:00
Wayne Stambaugh 16402d8180 Remove unused Geda footprint import source code file. 2013-01-03 16:51:26 -05:00
Wayne Stambaugh ade6ec3256 Doxygen warning fixes. 2013-01-03 15:21:40 -05:00
jean-pierre charras 7dbcbf6d15 Kicad manager: cleanup code, remove dead or not working code. Fix minor isssues 2013-01-03 20:25:12 +01:00
Dick Hollenbeck 7ae228d70e add eagle *.lbr lib path extension for future use 2013-01-03 10:33:22 -06:00
jean-pierre charras ab55b61970 Kicad: Fix a compil issue under Linux, and minor code cleaning, about wxFileWatcher 2013-01-02 23:12:16 +01:00
jean-pierre charras 5436798e51 Kicad: Fix compil issue under Linux, and minor code cleaning, about wxFileWatcher 2013-01-02 22:49:56 +01:00
jean-pierre charras 2fc643de36 Eeschema, Libedit: Fix potential issues when using some hot keys. 2013-01-02 09:34:46 +01:00
jean-pierre charras 9c62d2dfb7 Eeschema, Libedit: fix potential bugs. 2013-01-02 08:55:48 +01:00
Dick Hollenbeck 45bd443184 1) Implement EAGLE_PLUGIN::FootprintLoad(), FootprintEnumerate(), and IsFootprintWritable().
2) Add PCAD_PLUGIN to _pcbnew.so for scripting, fixing a linking bug.
2013-01-01 22:05:48 -06:00
jean-pierre charras dd3b684ce6 Eeschema: fix Bug #1095005 2013-01-01 21:52:37 +01:00
Brian Sidebotham aaf6cce614 switch a template's board format to kicad_pcb format 2013-01-01 14:48:32 -06:00
Brian Sidebotham 08f8703898 Fixes a bug in the template file copying mechanism. The previous code failed to honour sub-directorys and flattened the whole tree whilst copying files.
I have fixed this so that sub-directories that are not the meta directory will get copied verbatim into the new project directory.
2013-01-01 14:39:25 -06:00
jean-pierre charras 8c75adb8c1 Kicad manager:
* Use the recent wxFileSystemWatcher to automatically update the tree project when a file is created/deleted/renamed in the project directory
(and if the file type is usually shown by the manager.)
Needs wxWidgets 2.9.4 or more recent.
* Also code cleanup, dead code or useless code removed.
2013-01-01 16:57:48 +01:00
jean-pierre charras 6f72aaecca Kicad: files watcher: fix Linux specific issues 2013-01-01 15:06:49 +01:00
jean-pierre charras 45b01a5c9c Kicad manager: first use of wxFileSystemWatcher (only with wxWidgets >= 2.9.2) to monitor files list. 2012-12-31 09:12:29 +01:00
Wayne Stambaugh 6789e62210 Fix Pcbnew s-expr file parser bug. 2012-12-30 10:40:05 -05:00
Antia Puentes f4af52f94d Eeschema: Allow to edit an schematic item while dragging 2012-12-29 13:55:36 +01:00
Alexander Lunef 40f4304b2f Pcbnew: Add pcad2kicad pcb plugin, to import PCAD boards ( .pcb ASCII data file PCad 2000 format ) from Alexander Lunef 2012-12-29 10:54:25 +01:00
Wayne Stambaugh 7c86749ca6 Add Pcbnew GEDA PCB module plugin support.
* Create new GEDA PCB plug in.
* Add support for opening GEDA PCB footprints with module editor.
* Make import footprint file dialog remember last selected footprint
  type during current session.
* Update module editor file import to use new GEDA PCB plug in.
* Let IO_MGR know about GEDA PCB plug in.
* Create a WHITESPACE_FILTER_READER to simplify parsing GEDA PCB footprint
  files.
2012-12-28 15:52:12 -05:00
jean-pierre charras d2126bafff Eeschema: fix incorrect hotkey commands while moving/dragging a component. 2012-12-28 16:56:41 +01:00
jean-pierre charras 8653e362b2 Pcbnew: board editor: allows pad edition by hotkey 'E' (was accessible only by mouse button right click)
All: minor code cleaning and very minor bug fixes.
2012-12-27 17:42:41 +01:00
marco. c39ca125d4 MacOSX: deleted obsolete code 2012-12-23 11:57:02 +01:00
marco. 6c867989ca MacOSX: fixing possible crash 2012-12-23 11:55:24 +01:00
marco. 9ba242bc1f MacOSX: refresh overlay with new-deleted objects 2012-12-23 11:53:54 +01:00
jean-pierre charras 97749ed192 Eeschema: fix bug 1092864 2012-12-21 19:57:56 +01:00
jean-pierre charras d919d71054 Eeschema: fix bug 1092834 (Hotkey 'G' Drag label not working) 2012-12-21 13:56:17 +01:00
jean-pierre charras 143debdd61 Pcbnew: Rework on recovery files menu 2012-12-21 08:58:51 +01:00
Dick Hollenbeck 75072f4330 extend fp_lib_table on multiple row paste 2012-12-20 23:29:40 -06:00
jean-pierre charras bde103f5be Pcbnew: fix issue when loading a recovery backup board file.
Because now there are 2 formats, board backup files extensions are .brd-bak or .kicad_pcb-bak instead of the old .000 extension, depending on the initial file format.
2012-12-20 21:20:56 +01:00
jean-pierre charras 96f302c958 Pcbnew: fix bug: missing call to SetFileFormatVersionAtLoad after loading a board, in legacy format. 2012-12-20 19:05:18 +01:00
Dick Hollenbeck 09b1748bc4 fix a fairly serious bug which would leave SOLDERMASK_LAYER_FRONT layer turned off in PADs, when loading *.kicad_pcb files 2012-12-20 00:56:17 -06:00
jean-pierre charras a674dd6581 Pcbnew: class DIMENSION: code cleaning 2012-12-19 20:31:36 +01:00
jean-pierre charras ea603c4deb Pcbnew: fix minor bugs. Fix bug 1091593 and 1091693 . Minor code cleaning 2012-12-18 18:50:00 +01:00
Wayne Stambaugh 63b884558a Doxygen warning fixes. 2012-12-18 08:54:44 -05:00
jean-pierre charras 87e5b6b874 Pcbnew: allows pcbnew to open a .kicad_pcb or a .brd file, from the command line. 2012-12-16 14:48:54 +01:00
jean-pierre charras 4352eddadb eeschema: make new netlist format (S expr netlist format) the default for Pcbnew netlists in dialog netlist.
Also move netlist_control.* to dialogs/dialog_netlist.*, to be consistent with other file dialogs.
2012-12-16 12:36:18 +01:00
jean-pierre charras 3c315005ee Pcbnew: add a dialog to load a legacy file in "old" projects, when the .kicad_pcb file is not existing, and the correspoinding .brd file exists.
Fix also an issue in pcb_parser when a netclass name is just a number (like a track width as name)
2012-12-15 14:39:36 +01:00
jean-pierre charras 4b14415596 3d viewer: code cleaning. Display options are now stored in config. 2012-12-15 09:52:02 +01:00
Wayne Stambaugh 97ea4e83f7 Fix angle scaling error in Pcbnew s-expr file format parser. (fixes the arc bug part of lp:1090524) 2012-12-14 16:37:59 -05:00
Dick Hollenbeck cd62be66e7 fix bug 2012-12-14 13:58:50 -06:00
Dick Hollenbeck 1b4f7d6ce5 fix pcbnew file save as problem, if previous file by same basename did not exist. Show default file ext. 2012-12-14 13:42:38 -06:00
jean-pierre charras 760d02e4d2 Kicad manager: shows *.kicad_pcb files the project tree. 2012-12-14 20:37:51 +01:00
Dick Hollenbeck a564d2f865 minor file save as fixes, move legacy header into its plugin 2012-12-14 12:14:28 -06:00
Dick Hollenbeck 79b4846200 Switch over to *.kicad_pcb format as the default BOARD format.
Add KiCadPcbFileExt global.
2012-12-14 10:54:54 -06:00
Wayne Stambaugh 312254bc8a Fix minor version information text formmatting error. 2012-12-12 11:52:24 -05:00
jean-pierre charras b4f0230658 Pcbnew: fix Bug #1089120. Also change "Length Die" expression to "Length Pad To Die" in code 2012-12-12 12:57:17 +01:00
Dick Hollenbeck a9ccf49580 allow . in layer names 2012-12-10 23:39:36 -06:00
Wayne Stambaugh 2f41c40163 Fix FreeRoute launcher Java executable path error on Windows (fixes lp:1087589) 2012-12-10 21:44:20 -05:00
jean-pierre charras 1886082fce Eeschema: Erc dialog: enhancement. Now not modal.
Pcbnew: Drc dialog: fix a old very minor bug.
Added: single click on an item in marker list moves the board  graphic cursor on the corresponding marker location on the board
Double clicking is not modified.
2012-12-10 20:08:09 +01:00
jean-pierre charras 4a26d543d5 Pcbnew: Add a minimal test for illegal chars in footprints libname (like space and dir separtor)
Also a minor cosmetic enhancement
2012-12-10 12:18:42 +01:00
Dick Hollenbeck ee48de6744 note that the clipboard format is spreadsheet compatible 2012-12-09 14:53:46 -06:00
Dick Hollenbeck f477464f77 embellish fp_lib_table editor with beginnings of cut, copy, paste 2012-12-09 14:51:42 -06:00
Dick Hollenbeck 9a806749ea change spelling to jive with my email on developers list 2012-12-08 23:34:12 -06:00
Dick Hollenbeck 063907211e more fp_lib_table work, enhance parser 2012-12-08 17:58:03 -06:00
jean-pierre charras 926dec84a5 Eeschema: fix compil issue with wxWidgets 2.8.12 2012-12-08 20:36:28 +01:00
jean-pierre charras ba05519662 Eeschema: Add hotkey 'U' to edit reference. Better filtering for hotheys V, F, U: now the corresponding field is selected without selection list between component and the field. 2012-12-08 18:24:49 +01:00
jean-pierre charras 1671432ac1 All: Fix an usually unwanted behavior in kicad: When closing a dialog (mainly ERC, DRC and recently a component selection by the library viewer on a double click) the mouse release left button event (which is seen by the parent after closing the dialog, becuse it is actually made in the parent) generate an unwanted command (item selection, component place ...)
This event can be now skipped if needed by calling  EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent() from the dialog.
Very minor other fixes
2012-12-07 11:05:19 +01:00
jean-pierre charras 14fcf7f933 Try to fix an unwanted left mouse release button event, when closing a dialog on a click or double click,
and therefore when the mouse butoon is released in the parent window
Minor other fixes.
2012-12-06 22:53:00 +01:00
marco. 3e7c4a7624 MacOSX: fixes refresh of lines and outlines when drawing 2012-12-06 19:10:58 +01:00
marco. b18e3f5372 MacOSX: Fixes the append always beaviour of cvpcb when reading netlists 2012-12-06 19:10:00 +01:00
marco. 52541cc10c MacOSX: cleanups 3817 & completes 3820 2012-12-06 19:08:34 +01:00
Marco Mattila c648806703 Update board modified state when (un)locking a module in pcbnew. 2012-12-06 12:13:19 +02:00
Dick Hollenbeck 151f81aa95 merge patch with refinement 2012-12-04 13:12:50 -06:00
Dick Hollenbeck 79015495b1 Prevent the double click from being as a single click in the parent
window which would cause the part to be parked rather than staying
in drag mode.
2012-12-04 13:09:53 -06:00
Antia Puentes c971460467 In eeschema, when inserting a component into the schematic using the
Library Browser tool, you have to select it in the components listbox
and then press the "Insert component into schematic" button to close the
window and return to the schematic.

The attached patch enables the selection and insertion of a component in
schematic by double clicking on it in the Library Browser component
listbox. As the double clicking should have effect only if the Library
Browser was launched to load a component in schematic, the patch checks
for NULL the m_Semaphore variable, used two distinguish the mode in
which the Library Browser is running (modal, used when inserting a
component in schematic, or non-modal).
2012-12-04 13:04:04 -06:00
Marco Mattila 275f02adc3 Fix BOM-by-reference generator to print the separator character instead of the ascii code 2012-12-03 17:06:49 +02:00
jean-pierre charras ac41e7009e Pcbnew: plot solder mask layer with min width value specified: algorithm modified to reduce artifacts. 2012-12-03 15:27:34 +01:00
jean-pierre charras affbb8a8e0 Pcbnew: minor coding style fixes. Very minor fixes. Minor enhancements. Fix bug #1085523 2012-12-02 12:38:00 +01:00
jean-pierre charras 8f52ba14db Pcbnew: minor enhancements. 2012-12-01 21:03:33 +01:00
jean-pierre charras 91d5bb5812 Eeschema: dialog ERC: minor enhancements and code cleaning. 2012-11-30 13:28:23 +01:00
Marco Mattila 6559d6a582 Fix pcbnew zone corner filleting 2012-11-30 07:51:47 +02:00
Heikki Pulkkinen 23c1c4a067 Pcbnew: commit patch from Heikki Pulkkinen (via displayed with its right size and clearance during track creation/edition) 2012-11-29 20:27:08 +01:00
Wayne Stambaugh 84c7b07e02 Pcbnew print fixes and improvements.
* Fix offset errors when scale factor greater is than one.
* Changed behavior of fit in page when not drawing border and
  title block to fit board outline in page.
* Fix offset errors when mirroring (still not 100% correct on MSW with
  wxWidgets 2.9.4).
* Lots of the usual code cleaning and simplifying.
2012-11-28 20:50:58 -05:00
jean-pierre charras 70ca712c81 Pcbvew: fix a strange bug which swap x and y values for pad offsets when reading a s expr *.kicad_pcb board file. 2012-11-28 19:04:57 +01:00
Dick Hollenbeck 6ad94a4912 merge in evolving fp lib_table work 2012-11-28 09:24:53 -06:00
Lorenzo Marcantonio cace69a6f2 Added warning about gcc 4.7.1 miscompile in COMPILING.txt 2012-11-28 08:38:02 +01:00
jean-pierre charras efdf28f67e Polyline.cpp: fix a bad wxASSERT test which generate error messages in Debug mode when there is no error, in DEBUG mode, when filling zones with holes. 2012-11-27 21:12:39 +01:00
Dick Hollenbeck 5155c35a71 reverse throw() clauses to quiet SWIG errors 2012-11-27 13:57:38 -06:00
Dick Hollenbeck b065b37a1e richio improvements, fix dangling open file 2012-11-27 08:25:50 -06:00
Dick Hollenbeck 9ae4e60911 start using FILE_LINE_READER( const wxString& ) 2012-11-27 08:14:15 -06:00
Dick Hollenbeck 98086a8891 Change READ_LINE classes to use less virtual functions, and READ_LINE::ReadLine() to return char*
which can eliminate a subsequent call to READ_LINE::Line() for a small performance gain.
2012-11-27 07:50:01 -06:00
Dick Hollenbeck e5c1959dcd Fix dangling open file introduced as recent workaround 2012-11-27 06:42:28 -06:00
Dick Hollenbeck 7f84f6aeb1 Another constructor for FILE_LINE_READER which enables more consistent file open strategies, and only call setvbuf() when the file is at position 0 2012-11-27 06:33:12 -06:00
jean-pierre charras 2d1a7e099b Csv Boom file: fix a minor error in commit 3818 2012-11-26 20:14:38 +01:00
jean-pierre charras 978ae91841 Eeschema: Fixes and enhancements in BOM list generation and BOM code:
* remove useless spaces in csv bom file format.
 * remove KICAD_GOST conditionnal compilation and merge KICAD_GOST code with the "normal" code.
 * Csv file format created by KICAD_GOST code is now available for everybody through the BOM dialog options (as it should).
 * fix coding style issues.
2012-11-26 18:28:54 +01:00
marco. c00a93e94f MacOSX: a strange bug with setvbuf in FILE_LINE_READER disalign the netlist reader. 2012-11-25 13:17:02 +01:00
marco. 126a7c103c MacOSX: Crash in pcbnew during edit footprint and changing layer from dialog (Fixes: #764678) 2012-11-25 09:08:25 +01:00
marco. dd5661e5a8 MacOSX: now editing Text on PCBNEW works nicelly as expected. 2012-11-25 00:23:36 +01:00
marco. b95ab35534 MacOSX: Fixes Crash when adding text on pcbnew (bug #891347) 2012-11-24 23:03:30 +01:00
Marco Mattila cbb28977a2 Fix saving of local thermal parameters in pcbnew legacy_plugin. 2012-11-24 18:02:10 +02:00
jean-pierre charras 932c5e9989 Pcbnew: fix bug1082146 (Keep-out areas get destroyed by "export settings to other zones" )
Eeschema: fix bug 1082107 (error message" component not found" when no component selected from select component dialog box)
2012-11-23 10:18:52 +01:00
jean-pierre charras 22645084bb Pcbnew: fix bug1082146 (Keep-out areas get destroyed by "export settings to other zones" )
Eeschema: fix bug 1082107 (error message" component not found" when no component selected from select component dialog box)
2012-11-23 10:10:37 +01:00
jean-pierre charras bf3b8f567a BOM list code cleanup. 2012-11-22 21:33:52 +01:00
marco. eb3ba80643 MacOSX: disabling BufferedBitmap of OSX in gerbview, not supported nor accelerable and bitmap becomes too large in case of retina display to be usable 2012-11-20 20:19:24 +01:00
jean-pierre charras 31332c3973 polygon: update clipper lib. 2012-11-20 12:42:39 +01:00
jean-pierre charras 1dd0adf7e0 Eeschema: item drag command: Fix issue for overlapping items (from a Younes Manton's idea)
Added: display info when clicking on labels.
2012-11-20 12:35:09 +01:00
marco. b5302db70e MacOSX: problems with cvpcb after multiline patch:
1) OSX compiler is really choosy (class_components_listbox.cpp)
2) Old OSX code maked an endless loop (listboxes.cpp)
2012-11-19 22:34:25 +01:00
Dick Hollenbeck 2aa27122b0 Eliminate many assumptions in Pcbnew's library manager, pertaining to locality of libraries and
their type, by using the more abstract PLUGIN::Footprint*() functions.

This is an intermediate phase only, other changes will be necessary as library table support comes in.
Encapsulate usage of library path searching, since that will go away as library table support comes in.
Add FOOTPRINT_EDIT_FRAME::{get,set}LibPath() and FOOTPRINT_EDIT_FRAME::{get,set}LibNickName() functions
to provide this encapsulation.
2012-11-19 10:19:38 -06:00
jean-pierre charras cb62f5c8ba Try to fix a compil issue with some wxWidget versions. 2012-11-19 15:32:34 +01:00
jean-pierre charras b080f860c9 Pcbnew: enhanced dialog for SVG export 2012-11-16 15:13:31 +01:00
Dick Hollenbeck e435a104c9 Add *.kicad_mod as default import footprint extension. Turn on all Cu layers for thru hole pads in case loading non-wildcard s-expression footprint files. 2012-11-15 10:46:43 -06:00
Dick Hollenbeck a93637b14f remove -std=c++0x compiler option since nobody is ready for it, and accordingly back into auto_ptr from unique_ptr 2012-11-15 10:04:10 -06:00
jean-pierre charras 4794d3774a Pcbnew: fix incorrect filenames when plotting layers 2012-11-15 11:47:23 +01:00
jean-pierre charras 3688bae75f Fix compil issue under MinGW: for an obscure reason the option -std=c++0x creates error in wxWidget code:
some functions used in wxWidgets ( like _strdup and few other) are not defined when this option is set. 
but the equivalent option -std=gnu++0x works fine so it is used under mingw instead of  -std=c++0x.
(Under Linux/OSX  the option -std=c++0x is used)
2012-11-14 21:07:09 +01:00
Dick Hollenbeck 9bbff22d96 1) Switch to boost hashtable support from wx macros which did not handle std::string.
This required the additional compiler command line option "-std=c++0x".

2) Switch to unique_ptr from auto_ptr which is C++ deprecated.

3) Change to new English layer names per mailing list discussion, see class_board.cpp.

4) When saving to *.kicad_pcb or *.kicad_mod, identify opportunities to use wildcard
   layer sets, for pads so far.

5) Switch to two std::string hashtables in pcb_parser.cpp, away from one wxString based one
   for layer names and layer sets mapping. One hashtable holds the mask, the other the index.
   Layer sets are only in the mask table.

6) Move "LOCALE_IO toggle" into PCB_IO::Format() since it is a public API function and
   caller should find it as convenient as possible to use.  LOCALE_IO should handle
   nesting OK in the case where public Format() is called from one of the Footprint*()
   functions.

7) Drop support for "export module to new library".  Creating new libraries will have to
   be handled in concert with library table entries, and we've talked recently about
   creating a better footprint library manager, one that resides in a DLL/DSO.  So
   this kind of functionality needs to be handled in there in the near future.

8) Change name of exported PCB_IO module/footprint to *.kicad_mod and not *.emp.
2012-11-14 01:15:59 -06:00
jean-pierre charras 89a40eeb80 pcbnew: fix minor issues.
pcb_calculator: fix a compil warning (gcc 4.7)
2012-11-12 17:19:10 +01:00
Dick Hollenbeck 4612ef9d50 switch to new s-expression format for footprint exports, use english layernames for naked footprints, dodge conflict with pythons HAVE_GETC_UNLOCKED 2012-11-10 00:39:18 -06:00
Dick Hollenbeck d378dcc734 footprint save to use untranslated (English) layer names 2012-11-09 13:00:00 -06:00
Dick Hollenbeck 272936ef21 populate PCB_PARSER::m_layerMap with English layernames so footprints
can be parsed, since they do not have an overriding layer name map
like a BOARD does.

Avoid doubly looking up hashtable entries in m_layerMap.

Minor code reformatting.
2012-11-09 00:58:00 -06:00
Dick Hollenbeck b4ab7ef7ea remove old sourceforge mailing list export file 2012-11-08 13:45:14 -06:00
jean-pierre charras 96a77d7618 Pcbnew: Add a min width parameter to plot solder mask layers.
* If this param is set to 0, the previous behavior is used.
* Else the solder mask is plotted as polygon, with shapes near than  this min width value are  merged.
Pcbnew in nanometer version: fix a serious rounding issue due to the fact dialogs were using 4 digits for mantissa.
* This is not enough for nanometer coordinates ( 8 are needed to display a value in inches),
*  so sometimes after closing a dialog, some coordinates were modified, although no new value was entered.
Minor other bug fixed.
2012-11-06 18:58:53 +01:00
jean-pierre charras 703293fa30 Add a min width parameter to plot solder mask layers. 2012-11-05 21:20:34 +01:00
jean-pierre charras 31e58d87d4 Eeschema: fix an old bug: sometimes E hotkey (and some other' hot keys) was editing a previously selected item, not the item under the mouse cursor
Templates: remove useless backup files
2012-10-31 21:27:31 +01:00
Dick Hollenbeck e0cc8a2f11 implement move up, move down in lib table editor 2012-10-31 09:41:47 -05:00
Dick Hollenbeck dd519d68ea remove unused #include <wxfstream.h> from several places 2012-10-29 16:56:18 -05:00
Dick Hollenbeck e21bd2479e add new templates to template/CMakeLists.txt, group all templates into one installation COMPONENT 2012-10-29 16:55:05 -05:00
Hans Henry von Tresckow df810f744c TI Stellaris Launchpad Boosterpack Template.
Here is a first cut at the 40pin booster pack template. I made 2
versions, BoosterPack40, which has the optional J5 connector and is
2"x1.7" and BoosterPack40_min, which is 2"x1.35" and leaves the
switches accessible.
2012-10-29 15:48:33 -05:00
Marco Mattila efa0286f26 Do not force vias to be substracted from silkscreen in pcbnew gerber plot 2012-10-28 22:51:47 +02:00
Dick Hollenbeck 4e61451c9c 128 pixel icons from Frabrizio's script and tar file. 2012-10-28 14:10:07 -05:00
Dick Hollenbeck 7c5e42b4d0 switch from STREAM_OUTPUTFORMATTER to FILE_OUTPUTFORMATTER mostly throughout,and minor richio factoring 2012-10-25 10:41:20 -05:00
Wayne Stambaugh 58ae2e1920 Add missing scripting build flags to EDA_BASE_FRAME::CopyVersionInfoToClipboard. 2012-10-25 10:27:35 -04:00
Dick Hollenbeck d32333a012 streamline the FILE_OUTPUTFORMATTER API for ease of use 2012-10-25 02:10:59 -05:00
Dick Hollenbeck 9cd011abbb add class FILE_OUTPUTFORMATTER and use it in PCB_IO, since it is about 8-10 faster than STREAM_OUTPUTFORMATTER 2012-10-25 00:52:55 -05:00
Dick Hollenbeck ea4b3877e2 move wxString constructor outside loop for speed 2012-10-24 13:59:37 -05:00
Dick Hollenbeck 28222961dd fix ownership issue in wxFFile vs. FILE_LINE_READER 2012-10-24 13:42:39 -05:00
Dick Hollenbeck 5634bc3381 move PCB_PARSER into PCB_IO as a member 2012-10-24 13:20:33 -05:00
Dick Hollenbeck 484eb55ae8 DSN_LEXER underneath PCB_PARSER does not own the LINE_READER it receives, fix memory leak 2012-10-24 12:38:10 -05:00
Wayne Stambaugh 1e772280b9 Fix compile error against wxWidgets 2.8 brach. 2012-10-23 13:20:22 -04:00
jean-pierre charras 6abf0e9f94 Eeschema: Bug fix (move component field was not undoable)
Minor enhancement in popup menus for wire and bus.
Kicad: stm32f0discovery template: very minor fix.
2012-10-23 18:37:19 +02:00
Dick Hollenbeck 28f238e36b pcbnew import footprint fixed for legacy nanometer format 2012-10-22 15:41:26 -05:00
Kerusey Karyu c771811498 Fix error in stm32f100-discovery-shield.brd 2012-10-21 10:40:10 +02:00
Kerusey Karyu 945fef938c Add stm32f100-discovery-shield template 2012-10-20 18:16:34 +02:00
jean-pierre charras 292c1f0912 Kicad: bug fix in menubar when changing the selected locale.
fctsys.h: remove useless define.
Fix minor issues and add minor enhancements.
2012-10-18 21:31:40 +02:00
Dick Hollenbeck 9e41a8127d more fp_lib_table work 2012-10-18 10:28:50 -05:00
Wayne Stambaugh f3cc32f9e2 Put KiCad on a diet to remove the uncessary slices of pi. (fixes 1066194) 2012-10-17 16:59:05 -04:00
Dick Hollenbeck 58299fc921 more fp_lib_table work 2012-10-17 10:12:17 -05:00
jean-pierre charras f03b9048fe Fix a minor compatibility issue in .pro file for new boards, between decimils and nanometers versions of Pcbnew. 2012-10-17 12:57:21 +02:00
Dick Hollenbeck 69dbeab90f decouple wxGridTableBase from FP_LIB_TABLE, this was poor information hiding 2012-10-16 20:00:25 -05:00
Dick Hollenbeck fb43f4ad6f fp_lib_table dialog work 2012-10-16 01:56:57 -05:00
Dick Hollenbeck 0e1e7f53b1 remove one-ness bug from CMakeLists.txt 2012-10-16 00:28:39 -05:00
Wayne Stambaugh e7925279ab Only use -O1 GCC optimization level for versions 4.7 and above for now. 2012-10-15 21:42:50 -04:00
Dick Hollenbeck 80693fa7c1 add dialog for fp_lib_table 2012-10-15 17:37:08 -05:00
Dick Hollenbeck ae19bbfa33 add dialog for fp_lib_table 2012-10-15 17:30:01 -05:00
Wayne Stambaugh b1ea9d0eb5 Minor FP_LIB_ID object changes. 2012-10-15 16:48:01 -04:00
jean-pierre charras 2dc8c27ec2 Kicad manager: project_template.cpp: accepts lower and upper case HTML keywords (compatibility with libreoffice) 2012-10-15 19:55:04 +02:00
Dick Hollenbeck 0dc4d9c19e Commit Dick's changes to the FP_LIB_TABLE object. 2012-10-15 12:19:42 -04:00
Wayne Stambaugh 012fa536e1 Merge changes from testing branch. 2012-10-15 09:40:40 -04:00
Dick Hollenbeck 26eab9c767 make nanometers the default board internal units within Pcbnew 2012-10-15 00:21:31 -05:00
Wayne Stambaugh 77e1a4c03c Initial commit of footprint library table code. 2012-10-14 21:38:32 -04:00
jean-pierre charras 819404614a missing files 2012-10-14 19:00:47 +02:00
Brian Sidebotham 9823666ca9 Commit patch from Brian Sidebotham: Project template in Kicad manager 2012-10-14 18:57:11 +02:00
jean-pierre charras 621a43c4ad Eeschema: always stores sheet filename in unix-like notation, and fix a bug when editing sheet file name.
Pcbnew: add PDF format  for drill map generation.
Plotter classes: tweaking code.
2012-10-13 20:54:33 +02:00
Andrey Fedorushkov cedcd2bace eeschema: fix segfault when edit text and empty editing text 2012-10-13 22:33:58 +04:00
marco. eee9738755 OSX: Corrected issue with Menus, workaround/fix for an issue with Mountain Lion 2012-10-13 20:23:03 +02:00
Wayne Stambaugh fc9c8cc0ec Fix footprint library file extension bug in CvPcb and Pcbnew due to s-expression changes, fixes lp:1064593. 2012-10-09 15:18:12 -04:00
Wayne Stambaugh 87e773b6f6 Add Boost version to EDA_BASE_FRAME::CopyVersionInfoToClipboard(). 2012-10-09 11:31:55 -04:00
Wayne Stambaugh c11f3407b8 Check for getc_unlocked() and fall back to getc() in richio if it's not available. 2012-10-09 10:31:36 -04:00
Dick Hollenbeck bb383e22b3 optimize isSpace for negative 8 bit bytes 2012-10-08 15:01:17 -05:00
Dick Hollenbeck 56796a950c *) Use fgetc() technique to avoid strlen() in FILE_LINE_READER::ReadLine(),
which was having difficulty with embedded nuls in files coming from PCAD.

*) Make dsnlexer.cpp's isSpace() treat nuls as whitespace.
2012-10-08 14:34:46 -05:00
Dick Hollenbeck 44c25d14ec eeschema erc dialog extends from DIALOG_SHIM 2012-10-08 14:34:04 -05:00
Dick Hollenbeck b97ece7f58 minor. 2012-10-08 14:30:38 -05:00
Wayne Stambaugh 7d08facb45 Convert footpint library log functions to trace functions to reduce debug output. 2012-10-07 18:26:17 -04:00
Dick Hollenbeck fdc7e9a818 Commit Dick's INPUTSTREAM_LINE_READER patch. 2012-10-07 17:26:41 -04:00
Wayne Stambaugh 1468a4ae31 Pcbnew s-experssion footprint library implementation.
* Add footprint methods to PCB_IO.
* Add FP_CACHE and FP_CACHE_ITEM for handling new footprint library design.
* Add code to save legacy libraries in new format.
* Change behavior of BOARD_ITEM::GetLayerName() to return the default layer
  name when the item does not have a BOARD as a parent.
* Minor changes to the module output formatter when writing to module library
  files (no BOARD as parent).
* Add new (and some that I forgot along the way) CMake flags to
  EDA_BASE_FRAME::CopyVersionInfoToClipboard().
* Add -Wno-narrowing to GCC flags to stop GCC 4.7 from complaining about
  a conversion from int to unsigned in the Boost polygon library.
* Add INPUT_STREAM_READER to richio.cpp to allow using any object derived
  from wxInputStream as a LINE_READER (needs to be validated).
2012-10-07 11:37:25 -04:00
jean-pierre charras 8031e512e6 Dialog drill file: remove precision choice, because only one choice was acceptable
(the option with the smallest number of digits for coordinates created unacceptable truncation coordinates in Excellon drill files)
2012-10-05 21:04:17 +02:00
jean-pierre charras c41bb774e4 Pcbnew: drill files creation: better dialog to create driil files, map files and report file. Code cleaning 2012-10-05 14:25:12 +02:00
jean-pierre charras 5951a7f9bc Pcbnew: fix an issue when collecting vias (for instance when left clicking on a via, it was not always detected)
This bug was mainly noticeable when using buried vias (some were never detected)
Minor other fixes (typos, strings hard to translate ...)
2012-10-04 19:47:28 +02:00
jean-pierre charras 7c0af1bf9d More dialogs derived from DIALO_SHIM 2012-10-04 08:57:15 +02:00
jean-pierre charras bae892dfe5 Pcbnew: make all dialogs derived from DIALOG_SHIM. 2012-10-03 13:25:30 +02:00
jean-pierre charras c169de804d Pcbnew: Make scripting version compilable under Windows 2012-10-01 08:04:06 +02:00
jean-pierre charras 0e941708f4 Make scripting version compilable under Windows 2012-09-30 19:50:17 +02:00
jean-pierre charras 6bb4dea501 Eeschema: fix a bug in my previous commit 2012-09-28 20:45:04 +02:00
jean-pierre charras 143af26952 Eeschema: code cleanup, remove dead code and some global and useless variables 2012-09-28 19:47:41 +02:00
jean-pierre charras 63257245e8 Eeschema: fix Bug #1057225 2012-09-27 20:18:56 +02:00
marco. 0355119044 [MacOSX] Updated Icons - Document ones still missing :( 2012-09-27 19:20:44 +02:00
Felix Morgner 21dbfef350 Added support for multi-selection and multi-editing in cvpcb. 2012-09-26 15:57:58 -05:00
Felix Morgner 4fec212627 fixed code to better comply with the coding style guidelines 2012-09-26 19:22:48 +02:00
Felix Morgner 99c1d45fa0 Added mutli-selection to cvpcb 2012-09-26 17:36:48 +02:00
marco. 92f8f006fa MacOSX - Fixed some issues launching bundles/binaries 2012-09-26 00:33:42 +02:00
jean-pierre charras 5fa61ecd25 Finishing code cleaning in plot functions. 2012-09-25 09:49:29 +02:00
jean-pierre charras 2d49ced742 Pcbnew: fix compil warning and a minor bug in plot negative (frame fer plotted in white therefore not visible).
minor code cleaning
2012-09-24 18:03:03 +02:00
jean-pierre charras c646c2f806 convert_from_iu: erroneous definition of MILS_PER_IU, MM_PER_IU (and therefore Iu2Mils)
only for Pcbnew in Decimils version. These definitions are provided, but not yet used in code.
2012-09-24 08:46:20 +02:00
jean-pierre charras cc47e88b9e Pcbnew, plot functions: fix bug in SVG plotter, fix a minor other bug when using PS plotter (trcak width fine adjust not working)
and plot code cleaning continued
2012-09-24 08:39:59 +02:00
jean-pierre charras 160560c916 pcb_calculator: fix compil issue about isinf (under mingw) 2012-09-22 17:45:15 +02:00
jean-pierre charras fb193c1232 pcb_calculator: fix compil issue about isinf. 2012-09-22 14:13:57 +02:00
jean-pierre charras 6454d91923 Cvpcb: remove macros MAX, MIN, ABS (forgotten file in my last commit) 2012-09-22 13:29:30 +02:00
jean-pierre charras b660b033ad All: remove macros MAX, MIN, ABS from macros.h and replace these macros by std::max, std::min and std::abs (mainly found in old code). 2012-09-22 13:19:37 +02:00
Dick Hollenbeck 210a7036db switch all <math.h> includes to <cmath> includes on an attempt to dodge some abiguous references to atan2() 2012-09-21 12:02:54 -05:00
jean-pierre charras eb94e66c9d Pcbnew: some code cleanup in plot functions. 2012-09-21 10:20:38 +02:00
jean-pierre charras b1c9c54221 Fix incorrect titles in SVG export dialog 2012-09-20 21:15:14 +02:00
jean-pierre charras 9e0960615a dcsvg (and therefore KicadSVGFileDC) is now unused. Use SVG plotter only to export a board SVG file.
SVG export does not use no more wxWidgets wxDC.
In pcbnew SVG files can be created by plot menu (in B&W) or export SVG menu (B&W or Color).
Export SVG menu is more suitable to create a view of a board, and plot menu is better to create a B&W document of silkscreen layers.
(In the future, the 2 menus could be merged, because they are not very different).
Note: pcbnew plot code is cleaned, mainly in dialog files, but still needs more cleanup.
2012-09-20 20:58:41 +02:00
Craig Southeren 436c17f60b This fixes a MSVC compile error caused by a static scalar initialiser. 2012-09-20 08:54:35 -05:00
Craig Southeren 534c8a8944 Fix MSVC compile errors caused by struct forward declared as class 2012-09-20 08:38:50 -05:00
Dick Hollenbeck 136d84ef3c fmin() was giving grief to MSVC, switch to std::min() 2012-09-20 08:22:33 -05:00
Dick Hollenbeck 44ced95e66 This change fixes a compile error on MSVC 2012-09-20 08:15:12 -05:00
jean-pierre charras 5179ed926b eeschema: plot functions: code cleaning.
SVG plotter: fix issues in draw arc and draw rectangle.
2012-09-18 16:50:30 +02:00
jean-pierre charras c3ecce2ec6 Eescheam: plot HPGL: add comments and minor fix. 2012-09-18 10:39:56 +02:00
jean-pierre charras 5590e1ebf5 eeschema: plot dialog: minor fix 2012-09-17 21:28:17 +02:00
jean-pierre charras 0037e153a0 Eeschema: Plot dialogs: unify 5 dialogs (which means 5 duplicate code) to only one plot dialog (like in Pcbnew)
remove duplicate code and clean it.
Simplify HPGL dialog: plot offet removed and replaced by only one option:
plot origin to center of sheet or not (some HPGL  plotters have the plot origin to center of the paper area,
and others have this origin at the bottom left corner)
This is surely enough.
2012-09-17 20:39:42 +02:00
Marco Mattila 3ed33e3912 Move pcbnew pcb edge layer plot checkbox to common plot options 2012-09-17 21:14:41 +03:00
jean-pierre charras 996bf80d1f Add missing files 2012-09-17 19:56:40 +02:00
jean-pierre charras 16064881be Eeschema: Plot dialogs: unify 5 dialogs (which means 5 duplicate code) to only one plot dialog (like in Pcbnew)
clean duplicate code.
Simplify HPGL dialog: plot offet removed and replace by only one option (plot origin to center of sheet or not)
This is surely enought.
2012-09-17 19:42:27 +02:00
jean-pierre charras a9744e3f84 Pcbnew: added: SVG plotter. Need refinements, but works.
Mainly to plot drill maps, but can be used to plot boards, for documentation.
The print svg still exists, but the plot SVG has more options (mirroring, holes in pads),
however  print svg allows color print, and full board printing, and plot does not.
2012-09-15 14:13:03 +02:00
jean-pierre charras a2b9241ea3 Pcbnew: fix minor issue when loading a foorprint: if the footprint name has lower case letters, the name was asked twice 2012-09-13 14:15:24 +02:00
jean-pierre charras 819589cf05 All: fix most of Doxygen warnings. 2012-09-12 19:28:55 +02:00
jean-pierre charras 3ff16a0b14 Pcbnew: fix compil error I created in my previous commit.
All: fix some Doxygen warnings
2012-09-12 13:11:30 +02:00
jean-pierre charras 93ebdb2cd0 All: better code to handle opened frames libview, libedit, modview, modedit.
Other minor fixes.
2012-09-12 11:53:11 +02:00
jean-pierre charras b810135e4e Code cleaning, minor fixes and minor coding style fixes. wxWidgets 2.9.4 compatibility fix( deprecated function MakeModal ) 2012-09-11 21:03:21 +02:00
jean-pierre charras bb6795ddf1 Pcbnew: drag functions: serious cleanup and better code. Use now the connectivity functions to find tracks connected to pads,
and therefore  tracks are now dragged when a end point is inside a pad, not necessary on the pad position.
However, drag functions still need more cleanup.
2012-09-11 09:33:17 +02:00
jean-pierre charras 3668f4ccc3 Pcbnew: cleanup functions: now, cleanup uses same algorithm as connectivity calculations to detect pads connections, and is faster.
therefore tracks which have a end point inside a pad, but not necessaryexactly  to the pad position are seen as connected, and are no more removed.
Side effect: reconnect to pads option is removed, because it is useless.
TODO: use this algorithm in drag functions.
Minor other fixes
2012-09-07 21:29:44 +02:00
Dick Hollenbeck 5aec46049d apply DIALOG_SHIM to dialog_lib_edit_text_base and make dialog_lib_edit_pin_base apportion more width for pin name 2012-09-07 11:15:18 -05:00
Lorenzo Marcantonio 7d154606be Substituted the few remaining uses of long instead of time_t 2012-09-05 14:13:33 +02:00
jean-pierre charras 61c3339d09 The last one compil error fix. 2012-09-02 19:53:34 +02:00
jean-pierre charras 05dc1bbf3d fix compil errors 2012-09-02 18:38:52 +02:00
Lorenzo Marcantonio a66e910827 Another fix for wx2.9 compilation (same issue as before, another call...) 2012-09-02 17:46:19 +02:00
Lorenzo Marcantonio 34c74d17b4 Probable fix for compilation under wx 2.9 (doesnt hurt anyway) 2012-09-02 16:13:50 +02:00
Lorenzo Marcantonio e771112259 Enforced EDA_COLOR_T type and minor const-ification 2012-09-02 14:06:47 +02:00
Lorenzo Marcantonio 3157b4d188 Enforced EDA_COLOR_T type and minor const-ification 2012-09-02 13:01:12 +02:00
Lorenzo Marcantonio 082d901d60 Encapsulated drawmode as an enum for type checking 2012-09-01 15:38:27 +02:00
jean-pierre charras f301b196ab Modedit: very minor enhancements. 2012-08-31 21:19:48 +02:00
Marco Mattila eaf4919ef8 Take pad clearance into account in intersection detection during pcbnew zone filling. 2012-08-31 21:43:09 +03:00
jean-pierre charras e6dd5128fa Pcbnew: fix bug: deleting a cutout in a zone was not undoable. 2012-08-31 17:59:14 +02:00
jean-pierre charras 92b43c7407 Fix 0 length segment in outline zone creation, that breaks zone chamfer option. 2012-08-31 15:58:23 +02:00
jean-pierre charras 37ee239449 Pcbnew: in SVG export, add option to export only the board area, not the full page.
dialog plot functions: fix compil warnings with wxWidgets 2.8
2012-08-31 09:43:37 +02:00
Lorenzo Marcantonio ba6da604cc Refactored PCB plot infrastructure
Removed filename from the BASE_SCREEN class
Scripting support for board plot
2012-08-30 21:25:12 +02:00
Lorenzo Marcantonio 137066e53c Fully encapsulated with accessors PCB_PLOT_PARAMS 2012-08-30 20:06:13 +02:00
Lorenzo Marcantonio 7cef5395b3 Minor plot driver enhancements 2012-08-29 22:13:47 +02:00
Lorenzo Marcantonio 715af96184 Removed g_pcb_plot_options from gerbview (which has no plotting anyway...) 2012-08-29 20:43:51 +02:00
Lorenzo Marcantonio b44d719446 Removed PCB_BASE_FRAME::m_printBorderAndTitleBlock (all dead code) 2012-08-29 20:34:34 +02:00
Lorenzo Marcantonio c7e3e31db6 const-ifiation of member 2012-08-29 19:35:23 +02:00
Lorenzo Marcantonio 94fdc674aa Added 'parachute' std::exception handling to python interface 2012-08-29 19:32:14 +02:00
Lorenzo Marcantonio 0938f2cff6 Added MEASUREMENT sysvar to DXF driver, marks explicitly the file as metric 2012-08-29 19:31:00 +02:00
Lorenzo Marcantonio e7fd324a75 Fixed format string (spurious character was added) in HPGL driver 2012-08-29 19:29:45 +02:00
Lorenzo Marcantonio a2c75829f9 Fixed compilation with unicode (wxString to printf without GetChars) 2012-08-29 19:28:33 +02:00
Lorenzo Marcantonio fef8347176 Script plotting patch 2012-08-29 18:59:50 +02:00
jean-pierre charras 79d55c0460 Minor cosmetic enhancements.
Kicad manager: shows now svg files in tree files.
Pcbnew: fix incorrect printing (board out of page) when creating drill map in postscript format ( noticeable mainly for small boards)
2012-08-29 14:40:09 +02:00
Lorenzo Marcantonio 96bf0a5460 Missing a wxT in call to LogDebug 2012-08-29 13:28:37 +02:00
Dick Hollenbeck 5b9c354759 wxFileName::CreateTemporaryFile() is switching to /tmp directory when no preceding path is present 2012-08-28 10:41:08 -05:00
jean-pierre charras a4de3018d7 Pcbnew: Fix bug 1042394 and very minor code cleaning. 2012-08-28 08:51:18 +02:00
jean-pierre charras bff11cea90 3D viewer: code tweaking 2012-08-27 13:41:22 +02:00
jean-pierre charras 20acc9a918 3D viewer: fix a very minor issue, and more code cleaning. 2012-08-27 09:06:52 +02:00
jean-pierre charras 5542910960 3D viewer: fix very minor issue. Remove duplicate code 2012-08-26 20:10:28 +02:00
jean-pierre charras 31ff1bac4f 3D viewer:
*  serious code cleanup (remove duplicate code)
  *  shows (option in 3D preference menu) the copper items (tracks, zones...)  in 3D, using 35 microns copper thickness.
      However, because there are a lot more3D data to show (roughly 4 times more), this is slower.
2012-08-26 15:59:55 +02:00
Dick Hollenbeck 0c4c65d7a2 wxServer was a confusing define, since it is also a wxWidgets class, do not use it 2012-08-24 06:31:09 -05:00
Gregor Riepl 96771ccc03 The listener is opened on INADDR_ANY, so it will accept any network
connection, no matter if it is originating locally or from the outside
of the host. There is no check in place to discard non-local
connections. The only security against a malicious attack would be
provided by a local firewall, which is not guaranteed to be installed on
every workstation kicad is used on.

I tested this, and a host running eeschema accepts connections on TCP
port 4243 from other hosts on the internet.

A patch to remedy this potentially serious security hole is attached. It
creates the listener on localhost instead. A flag is provided to allow
the creation of sockets on 0.0.0.0 instead, if required. localhost is
the default.
2012-08-24 06:19:52 -05:00
Dick Hollenbeck 3a07ab1f09 *) 64 bit size_t is not compatible with %u printf format control. use "%zu"
where the 'z' prefix is for size_t arguments.

*) minor beautification
2012-08-24 06:14:10 -05:00
jean-pierre charras b19cc14ef2 3d-viewer and polygon functions: remove duplicate code about conversion from basic shapes to polygons. 2012-08-23 21:15:58 +02:00
Marco Mattila 2dbb428b23 Fix pcbnew thermal stub removal for pads with locally defined thermal properties. 2012-08-22 23:16:21 +03:00
jean-pierre charras 0ebc3f063e 3D-viewer: code cleanup.
Eeschema: annotate and netlist dialogs: enhancements.
Minor  coding policy fixes and  changes.
2012-08-21 12:45:54 +02:00
Dick Hollenbeck 898275fa43 work around wx2.8 wierdness 2012-08-16 10:34:41 -05:00
Dick Hollenbeck 367bfb4e14 fix problem with eeschema print dialog showing up on missing monitor 2012-08-15 12:55:48 -05:00
Dick Hollenbeck 6bb2fce7d9 legacy plugin fully support text horiz/vert justification, eagle plugin text fixes 2012-08-11 14:14:45 -05:00
jean-pierre charras abe5c08e20 3D-viewer: code cleaning. Added option in menu: show a 3D grid.
All: press ctrl+shift key when moving the mouse allows the graphic cursor to be moved outside the grid.
(useful to place graphic objects, texts in any position, regardless the current grid)
2012-08-11 14:52:13 +02:00
Dick Hollenbeck 7c3f47ec5a fixes for plugins 2012-08-11 00:50:17 -05:00
Miguel Angel Ajo f80357cb1a pcbnew: Show/Hide button for scripting console 2012-08-10 23:53:50 +02:00
Miguel Angel Ajo c7d6dad7e0 pcbnew: fix bug 1033510 that crashes pcbnew when no footprint wizard is selected 2012-08-06 22:41:41 +02:00
Miguel Angel Ajo ccb74b99d3 pcbnew: footprint wizards now can export the output module to the library or board 2012-08-05 00:15:57 +02:00
jean-pierre charras 9d5e271334 Pcbnew: fix a minor issue in non copper zones when creating the solid filled areas. 2012-08-04 18:33:04 +02:00
jean-pierre charras c82b878787 Remove Kbool from Kicad. Use Clipper instead.
Clipper is, by far, more easier to use than Kbool, and is currently actively maintained.
It is used only to normalize polygons, i.e. to convert self intersecting polygons to simple polygons,
which is not possible with boost::polygon.
2012-08-04 13:52:04 +02:00
jean-pierre charras c0992a9386 Remove Kbool from Kicad. Use Clipper instead, last changes 2012-08-04 13:47:24 +02:00
jean-pierre charras 1f277fd66d Remove Kbool from Kicad. Use Clipper instead. 2012-08-04 11:43:27 +02:00
jean-pierre charras 7fd24c7f03 Very minor fixes. 2012-08-03 17:43:15 +02:00
jean-pierre charras 4ff3a78de0 Eeschema: fix crash when changing a label type to an other label type during creation.
Pcbnew: code cleaning in polygon functions
2012-08-02 19:36:14 +02:00
jean-pierre charras 899d23d4fd Polygon code cleanup 2012-08-02 19:32:42 +02:00
Miguel Angel Ajo 4d2def3593 scripting + pcbnew: Merged with scripting branch, now it supports -DKICAD_SCRIPTING_WXPYTHON for full wx integration with python 2012-08-02 19:31:39 +02:00
Miguel Angel Ajo 89dd074841 pcbnew scripting: cleanup, renamed KICAD_SCRIPTING_EXPERIMENT to KICAD_SCRIPTING_WXPYTHON, now every flavour compiles 2012-08-02 19:24:53 +02:00
jean-pierre charras 3b56ea6732 Eeschema: fix crash when changing a label type to a global label during creation.
Pcbnew: code cleaning in polygons
2012-08-02 15:23:53 +02:00
Miguel Angel Ajo b0881d8ec5 scripting: fixed kicad compilation, cleanups 2012-08-02 09:47:30 +02:00
Miguel Angel Ajo 5140c348cd pcbnew: wxPyBeginBlockThreads before every python call 2012-08-01 14:50:21 +02:00
Miguel Angel Ajo beec323603 Double Python initialization fixed 2012-08-01 13:54:20 +02:00
jean-pierre charras ef39c5f38e PolyLine and math_for_graphics code cleanup: remove arc support in CPolyLine class:
This is an obscure legacy code from FreePCB, never used, never tested, never maintained.
2012-08-01 10:08:37 +02:00
jean-pierre charras 90a6daa722 Cleanup math_for_graphic code 2012-08-01 09:07:56 +02:00
Miguel Angel Ajo 474128a445 pcbnew scripting: fixed for coding style policy 2012-07-31 23:00:33 +02:00
jean-pierre charras dfdd2cfdbf Remove freepcb arc legacy code from PolyLine. 2012-07-31 19:51:58 +02:00
jean-pierre charras ae05cd80c3 Remove arcs support in zone outlines: this is a legacy code from FreePCB, never used, never tested, never maintained. 2012-07-31 15:12:51 +02:00
jean-pierre charras f96d557e73 Fix issues in zones creation (DRC and merging) I created in 3658.1 2012-07-30 09:40:25 +02:00
Miguel Angel Ajo 1c9433fb31 merged divertion 2012-07-30 00:24:40 +02:00
Miguel Angel Ajo a8e4f8b0ed pcbnew: scripting, Capacitive Touch Slider Wizard 2012-07-29 23:40:41 +02:00
jean-pierre charras 99b90d2fa3 More work on a better support of polygons in Kicad (code cleaning). 2012-07-25 20:46:25 +02:00
jean-pierre charras ef5f1b9e6b Start work on a better support of polygons in Kicad (code cleaning).
Some coding style policy fix.
2012-07-25 09:36:56 +02:00
Miguel Angel Ajo 9259b21ffa Footprint wizard converts from user units to internal units back and forth, so user can type in mm or mils now 2012-07-23 00:23:17 +02:00
Miguel Angel Ajo 894e6eb5ea .dso -> .pyd is the right extension for python .dll WIN32 2012-07-22 14:19:52 +02:00
Miguel Angel Ajo 5d0dee1364 Adam Vašíček patches for WIN32 compilation of kicad scripting 2012-07-22 14:15:38 +02:00
jean-pierre charras 4f01bedf97 Eeschema: fix a bug that crashes eeschema (only when compiled in debug mode) when creating a new wire, and when any wire orientation is allowed. 2012-07-21 18:52:29 +02:00
Marco Mattila 9e20800f8c Fix axis offset issue in pcbnew gerber circular interpolation. 2012-07-18 22:32:47 +03:00
Marco Mattila 9ec6139f9d Edit eeschema single part per line sorting code. 2012-07-17 22:13:35 +03:00
jean-pierre charras 9d8c684a4a Libedit and Modedit: fix minor, but annoying issues when editing items 2012-07-17 17:29:29 +02:00
Marco Mattila 5742bfb8cc Fix eeschema single part per line bom generation. 2012-07-16 21:49:04 +03:00
Miguel Angel Ajo 465dabd919 Fixes Win32 compilation that my previous commit broke, thanks to JP 2012-07-16 16:48:51 +02:00
jean-pierre charras aaabdeaed7 Pcbnew: Fix crash after opening footprint wizard 2012-07-16 15:34:08 +02:00
jean-pierre charras a3ea46d0e4 Fix compil issues under mingw 2012-07-16 11:19:23 +02:00
Miguel Angel Ajo 829e952e49 Python scripting and fixes for non-scripting compilation 2012-07-16 07:53:22 +02:00
Miguel Angel Ajo 863c1b4823 Merged with testing 2012-07-15 22:38:25 +02:00
Miguel Angel Ajo 2a9b8df888 Support for nanometer build, extra example 2012-07-15 22:01:05 +02:00
Marco Mattila 5a6c088bd9 Use circular interpolation for circles and arcs in pcbnew gerber plots. 2012-07-15 20:28:52 +03:00
jean-pierre charras f20bf0d217 Pcbnew: more about keepout areas: remove keepout for pads option and add keepout for copper zones option.
Export keepout to Specctra DSN file.
2012-07-14 18:27:25 +02:00
jean-pierre charras 018b080001 Pcbnew: Add keepout areas (Copper zones without tracks or/and vias).
This is *a work in progress*, so some features are missing, and/or could be modified.
Mainly keepout zones are not yet exported to autorouters, and pads are not taken in account.
Some code cleanup in polygon.*
2012-07-13 20:55:29 +02:00
jean-pierre charras 0bdec796be Eeschema: fix compatibility issue with wxWidgets 2.8.12 2012-07-12 17:01:14 +02:00
jean-pierre charras 8439dc450f Eeschema: fix compatibility issue with wxWidgets 2.8.12 2012-07-12 16:59:06 +02:00
l. 8234b9e184 All: Fix Assertion on sheet properties, in debug mode 2012-07-11 10:02:47 +02:00
jean-pierre charras 701140a6dd Eeschema: fix wrong bitmap size in hierarchy navigator tree 2012-07-10 14:26:26 +02:00
jean-pierre charras af0d21474d Pcbnew: commit Lorenzo Marcantonio's patch for THT thermals (added loading/saving using S. expr).
Fix incorrect import of smd pads from Gpcb.
Very minor change in dialog print.
2012-07-09 09:10:07 +02:00
Marco Mattila 096f4a1080 Add rotation field to pcbnew text item property dialog. 2012-07-09 01:02:00 +03:00
Dick Hollenbeck 1da099dd1f fix for bug 1022026 2012-07-07 13:27:44 -05:00
Miguel Angel Ajo 974fe74f66 Cleanup toward test-merge 2012-07-06 21:10:55 +02:00
Wayne Stambaugh 04a17d3347 Save and load print parameters and minor code cleaning in new Pcbnew file format. 2012-07-05 13:02:45 -04:00
jean-pierre charras 7f16520498 Eeschema: bug fix: when creating new connections, junctions were not always automatically added when needed.
Fix an other minor bug.
2012-07-05 13:37:48 +02:00
jean-pierre charras 0459b4dafa Pcbnew: fix incorrect detection of arcs having angles != 90 degrees 2012-07-05 11:29:42 +02:00
Marco Mattila b7c5649463 Add copy to text items in pcbnew. Automatically mirror text items added to back silkscreen (bug 1017446). 2012-07-04 22:50:47 +03:00
jean-pierre charras 1f1a7703d9 Pcbnew, gen Excellon files: fix truncation coordinates in decimal format, units = inches (old bug)
Coordinates were using always 3 digits (1/1000 inch  for mantissa). Uses now 4 digits max in inches and 3 digits max in mm
The resolution is therefore 1/10000 inch or 1/1000 mm. Note this is a limitation of Excellon format.
2012-07-03 15:46:58 +02:00
jean-pierre charras c7f6343bb4 Pcbnew: fix 2 minor issues, noticeable only in debug mode.
When reading board files, the net 0 was stored twice.
It creates only log messges in debug mode, because the list of nets is rebuild after reading files.
2012-06-30 10:20:04 +02:00
Miguel Angel Ajo 08af577218 code cleanup and comments 2012-06-27 23:19:19 +02:00
jean-pierre charras 20f0a5f884 Pcbnew: save/load .kicad_pcb files: fix 2 minor issues.
Use now English layers names to build filenames in plot functions (for techical layers), because translated names create sometimes problems in filenames.
(should do not change anything for English users)
Fix compil issue under wxGTK 2.8.12, created by my recent commit.
Minor changes to make translations easier.
2012-06-27 22:11:04 +02:00
jean-pierre charras 91b0191a02 Pcbnew: save/load .kicad_pcb files: fix 2 minor issues.
Use now English layers names to build filenames in plot functions (for techical layers), because translated names create sometimes  problems in filenames.
(should do not change anything for English users)
2012-06-27 22:07:37 +02:00
jean-pierre charras a6bc4a0dc6 Pcbnew: fix compil issue under wxGTK 2.8.12 2012-06-26 22:18:01 +02:00
jean-pierre charras 047bb44ef5 Pcbnew: minor changes in pcb-parser.cpp and kicad_plugin.cpp to make translations easier.
Code cleaning in autoroute functions.
2012-06-26 19:57:37 +02:00
Jean-Pierre Charras 1b08d1874f Commit JP's custom page size fix for Pcbnew s-expressions file format with minor changes. Thanks JP. 2012-06-25 19:52:57 -04:00
jean-pierre charras 0c946870c5 All: fix a truncation issue in ReturnValueFromString that creates sometimes a small error for values entered in dialogs.
Pcbnew: fix a compatibility issue with nano version for zones parameters.
2012-06-25 22:59:19 +02:00
Miguel Angel Ajo db427cb2cd merge with lp:kicad 2012-06-25 22:51:19 +02:00
Dick Hollenbeck f94a95ab5b use the same format string in the test program as in LEGACY_PLUGIN for record keeping purposes 2012-06-25 09:44:47 -05:00
Dick Hollenbeck e5452a7a39 remove "long double" dependency, mingw was falling over when using it. 2012-06-24 13:41:37 -05:00
Wayne Stambaugh 4019284e66 Minor Pcbnew s-expression improvements.
* Put text effects on a single line.
* Remove size token when defining drill sizes.
* Don't save net in pad definition when pad has no connection.
2012-06-23 21:19:41 -04:00
Dick Hollenbeck e06ce757b7 bzr add test program to verify new conversion strategy 2012-06-23 19:44:02 -05:00
Dick Hollenbeck 4b596cc5f3 legacy_plugin was not round tripping nanometers, add test program to verify new conversion strategy 2012-06-23 18:21:03 -05:00
jean-pierre charras 3a8bf14c9f Fix an issue (only found using gcc under mingw) in dsnlexer.cpp, using ::isspace( ) function that accepts only a 7 bit ASCII value under gcc/ mingw. 2012-06-20 22:33:05 +02:00
jean-pierre charras 025d550955 Pcbnew: small cosmetic enhancement: add a bitmap for zone duplicate command. 2012-06-20 11:57:36 +02:00
Moses McKnight 70c30bce74 Commit patches from Moses McKnight, to avoid duplicate junctions. 2012-06-20 11:52:29 +02:00
jean-pierre charras 52ee7c6e2a Pcbnew: fix incorrect arc export in SVG file export.
Very minor other fixes.
2012-06-19 21:25:41 +02:00
Dick Hollenbeck 0588092184 DIMENSION::m_Value not being saved in LEGACY_PLUGIN using scaling, DIMENSION::AdjustDimensionDetails() uses arrowz appropriate to build 2012-06-18 23:53:08 -05:00
Dick Hollenbeck 8975fd3cf4 a) (zone (fill (mode was wrong, b) put fill on one line 2012-06-18 23:23:42 -05:00
Dick Hollenbeck 5d415c4c4b parsing problem was unbalanced (smoothing) element 2012-06-18 23:08:00 -05:00
jean-pierre charras 1f50b2c767 Pcbnew: Fix an other compatibility issue in kicad nanometers. 2012-06-17 20:29:11 +02:00
jean-pierre charras 0028c05484 Pcbnew: fix issues in kicad nanometer in zone ediition and detection.
autoroute functions: code cleaning
2012-06-17 18:06:12 +02:00
Wayne Stambaugh 8c72db6631 Pcbnew s-expression file parser bug fixes and file size improvements.
* Use index when saving layers to handle translated layer names.
* Add LOCALE_IO switcher when loading s-expression format.
* Make SEGVIA default to through hole to improve file size.
* Don't save default orientation of 0 degrees in TEXTE_MODULE and TEXTE_PCB.
* Don't save default zone configuration parameters.
* Save multiple zone corners on a single line.
* Fixed missing ( check in graphic and module arc parsers.
* Consistency improvements for DRAWSEGMENT and EDGE_MODULE objects.
* Minor tweaks to D_PAD formatting.
2012-06-16 18:49:24 -04:00
jean-pierre charras d9ed8a3085 Pcbnew: automatic selection of plugin when loading a file with .kicad_pcb extension from history list.
Very minor other fixes
2012-06-14 21:10:32 +02:00
jean-pierre charras b59cebb2a7 fix incorrect use of KIROUND instead of KiROUND in parseBoardUnits( const char* aExpected ) (see comments in .h file)
very minor fix in pcb_parser.cpp
Fix scaling issue with nanometers in gpcb footprint import.
2012-06-14 08:29:54 +02:00
Andrey Fedorushkov 0c4a026e70 pcbnew: minor fix printf in pcb_parser 2012-06-14 09:34:18 +04:00
Wayne Stambaugh 3b2be428f4 Pcbnew s-expression file parser bug fixes.
* Change save order of drawings to match legacy file format object order.
* Set end point of SEGVIA to start point so the round trip back to legacy
  format is the same.
* Fixed bug saving and loading oval pad drill parameters.
* Fixed bug saving and loading rectangular pad deltas.
* Fixed missing layer for PCB_TARGET.
* Fixed EDA_TEXT italic bug.  Thanks Dick!
* Remove some left over debug logging statements.
2012-06-13 19:04:42 -04:00
Andrey Fedorushkov f7755bdcec pcbnew: show clearance when move or drag via 2012-06-13 17:32:43 +04:00
jean-pierre charras c4c2cd3acd Pcbnew: fix issue about order of tracks this order was modified when reading and writing a board, even without any change in board.
Fix compil warnings and wx28 compatibility.
code cleaning in autoroute functions.
2012-06-11 14:04:34 +02:00
jean-pierre charras 8b210d05ec fix compil warnings 2012-06-11 07:40:52 +02:00
Dick Hollenbeck a71857baaa Commit Dick's Pcbnew s-expression file parser bug fixes.
* Apply Dick's patch along with a few minor changes to fix some clashes with
  changes in my branch.  Thanks Dick!
* Added missing DRAWSEGMENT line angle.
* Fix thru hole pad layer mask issue.
2012-06-10 20:47:15 -04:00
jean-pierre charras 9fea98dd2f Pcbnew: Fix compil issues with wxWidgets 2.8.12
Some code cleaning in autoroute functions.
2012-06-10 18:21:18 +02:00
Dick Hollenbeck d3f9554841 CPolyPt constructors 2012-06-10 04:48:42 -05:00
Dick Hollenbeck b34d8e2150 There was no reason for insertBeforeMe on track loading.
Tracks should be loaded in the same order as they were saved, no exceptions.
This is for the version control system user.
But even with this objective now implemented in LEGACY_PLUGIN, the TRACKS
are still going through a food processor after they are loaded, and the poor
version control system user has no relief, even with this patch.

TRACKS are always modified after being loaded, and I think this needs to be fixed still.
2012-06-09 19:39:40 -05:00
Wayne Stambaugh a2753e85ad Added file include/convert_from_iu.h left out of last commit. 2012-06-09 14:00:30 -04:00
Wayne Stambaugh 2d0d805014 Add Pcbnew s-expression file parser.
* Add s-expression file parser object and keyword files.
* Fix minor issues with s-expression file formatting.
* Fix a minor bug the zone container fill state parsing in the legacy plugin.
* Move EDA_TEXT visibility definition to eda_text.h.
* Add minor BOARD_ITEM object improvements to support s-expression file
  parser.
2012-06-09 13:00:13 -04:00
jean-pierre charras de471744cd Fix some minor bugs in plot functions 2012-06-09 11:38:58 +02:00
jean-pierre charras 7f07b48e88 Pcbnew: Update incorrect or incomplete copyrights in many files.
Minor code cleaning in autoroute files.
2012-06-08 11:56:42 +02:00
Dick Hollenbeck fc9e25fce7 EAGLE_PLUGIN::Load() is now completed. 2012-06-06 21:23:47 -05:00
Dick Hollenbeck 4f471eb569 EAGLE_PLUGIN::Load() is now completed. 2012-06-06 20:49:43 -05:00
Ryan Bunch e07fd7ef82 allow comments in library files 2012-06-06 09:12:39 -05:00
jean-pierre charras f5047b29dd Pcbnew: move files relative to autoroute/autoplace to autorouter folder.
fix nanometer compatibility.
minor code and comments cleaning (although theses files need a lot of code cleaning)
2012-06-05 21:09:30 +02:00
jean-pierre charras be832f8855 Pcbnew: move files relative to autoroute/autoplace to autorouter folder.
fix nanometer compatibility.
minor code and comments cleaning (although theses files need a lot of code cleaning)
2012-06-05 21:07:33 +02:00
Marco Mattila 64c1ea5cec Add missing checks and undo support to pcbnew zone duplication. 2012-06-05 14:44:22 +03:00
Dick Hollenbeck 27d6310cbf EAGLE_PLUGIN: read a portion of the design rules and calculate
pad and via sizes from those settings when diameter is not given
in the local object.  Calculation algorithms are inferred from the
UI help of the Eagle program.

For edge connector type of footprints, some copper pads can be on the
back side even within packages.

Flipping of packages to back was not being done correctly, but I think this 
is working now.

There are still remaining issues with text positioning that I am working on.
2012-06-04 23:39:37 -05:00
Marco Mattila e7817f3e84 Add zone duplication to pcbnew. 2012-06-04 22:04:12 +03:00
Miguel Angel Ajo b5c0cada0d merges tip, conflict resolved 2012-06-03 22:21:53 +02:00
Miguel Angel Ajo 30e251bfba merge 1 with tip 2012-06-03 22:06:51 +02:00
jean-pierre charras e936d3c13a Appying lajos' patch to boost 1.49 2012-06-03 19:41:49 +02:00
jean-pierre charras 2475b2b6f7 Fix eagle_plugin issue (File not found) under Windows. 2012-06-03 17:47:53 +02:00
jean-pierre charras 20a6b7ea70 Eeschema: Fix incorrect display refresh when editing the reference of a component from the popup menu. 2012-06-03 13:16:08 +02:00
Marco Mattila 2455a6cc3b Do some ZONE_CONTAINED encapsulation. 2012-06-03 00:19:17 +03:00
Dick Hollenbeck 57acee0d4e EAGLE_PLUGIN: finish xpath error reporting mechanism for XML document traversal 2012-06-02 12:07:30 -05:00
jean-pierre charras a8c71d4a71 CvPcb: fix focus issue when the display footprint frame is shown (the footprint list loses the focus each time a new footprint is selected, therefore the keyboard cannot be used to select footprints) 2012-06-01 14:03:50 +02:00
Dick Hollenbeck 16e5866611 EAGLE_PLUGIN: load layer definitions, zone parameters, text positions.
Sketch for BOARD::Move().  Pass page_width and page_height to PLUGIN::Save().
2012-06-01 02:39:32 -05:00
jean-pierre charras d1b73df4e7 Cvpcb: code cleaning and minot fix 2012-05-31 19:41:37 +02:00
Dick Hollenbeck c5869705f4 EAGLE_PLUGIN add mechanical "hole" support for both MODULEs and BOARD 2012-05-31 10:18:55 -05:00
jean-pierre charras 808020b1eb Eeschema, Libedit: Fix bug that can crashes Eeschema: In libedit 2 mandatory fields could be deleted. Fixed now.
Very minor other fixes.
2012-05-31 15:47:02 +02:00
Dick Hollenbeck 69905af749 EAGLE_PLUGIN now positions text correct for most cases 2012-05-30 16:40:32 -05:00
Marco Mattila 7bdcad155a Add flip to pcbnew text fields. 2012-05-30 20:38:52 +03:00
Dick Hollenbeck b3fd915f59 add translation to static file filters, comments 2012-05-30 09:14:42 -05:00
Dick Hollenbeck b68fa7cdfd generalize the BOARD loading process PCB_EDIT_FRAME::LoadOnePcbFile() to use any supported PLUGIN 2012-05-29 16:01:17 -05:00
Marco Mattila ad86e50a69 Derive pcbnew find dialog from DIALOG_SHIM. 2012-05-29 23:43:17 +03:00
Dick Hollenbeck f2bd20ab34 Mostly EAGLE_PLUGIN work:
* Derive the pcbnew copper zone and non-copper zone dialog windows from DIAG_SHIM,
  which injects some template code.
* Update UIpolicies.txt to talk about DIALOG_SHIM support.
* Add zone support to eagle_plugin.
* Organize ZONE_CONTAINER class declaration for future privacy and accessors.
2012-05-29 13:10:56 -05:00
jean-pierre charras 52318f6988 Pcbnew: menu Edit/Reset modules fields size: Add dialog to select what modules are modified. 2012-05-29 14:25:10 +02:00
Marco Mattila fd8bfe0cb1 Move pcbnew find dialog into dialogs subdirectory and use wxFormBuilder for it. 2012-05-28 23:01:51 +03:00
Lorenzo Marcantonio 28bcad847e Rename BASE_SCREEN member m_NumberOfScreen to m_NumberOfScreens. 2012-05-26 20:19:12 -04:00
Lorenzo Marcantonio 5e436255af Remove unused definitions in bitmaps.h. 2012-05-25 11:00:51 -04:00
Andrey Fedorushkov d8c14403f2 eeschema: fix set bus width when define KICAD_GOST 2012-05-25 18:33:58 +04:00
jean-pierre charras e6ec9f0a32 Pcbnew: fix crash in legacy_plugin.cpp when reading old lib files.
fix a compil warning.
CvPcb: fix regressions :
 Shows now a void field instead of the dummy footprint name $nonane (whenthere is  no footprint selected in netlist).
 The active footprint selection changes only if a new component is selected from the component file,
 and does not change just when the next component is automatically selected, after a footprint selection.
 Speed up delete association and auto associe.
2012-05-25 08:58:52 +02:00
Lorenzo Marcantonio 925774760c Rationalize numeric time stamps to type time_t. 2012-05-24 21:52:04 -04:00
Dick Hollenbeck 6e78a592f2 more amazing free eagle_plugin work 2012-05-24 10:00:59 -05:00
brian. afdf5258f3 Commit patch from Brian Sidebotham (Bus width value option) 2012-05-24 08:51:52 +02:00
Dick Hollenbeck 76765f2269 more eagle plugin work 2012-05-23 20:18:30 -05:00
Andrey Fedorushkov 43caa734ac Pcbnew: fix control data valid in design rules when define USE_PCBNEW_NANOMETRES 2012-05-23 18:25:15 +04:00
jean-pierre charras cdd60c956e Libedit: fix minor bug: Copy doc not working in Properties dialog. 2012-05-23 12:06:33 +02:00
Dick Hollenbeck aac1010636 more eagle_plugin work 2012-05-22 12:51:18 -05:00
Dick Hollenbeck cb210042b8 fix bug added two revisions ago by me 2012-05-21 13:50:46 -05:00
jean-pierre charras 4812968129 Eeschema: Fix a minor issue in block command
Very minor code cleaning
2012-05-20 21:18:06 +02:00
Dick Hollenbeck 5cda6bc1a6 eagle plugin first work 2012-05-20 08:14:46 -05:00
jean-pierre charras 30c7e31839 Very minor fixes. 2012-05-19 21:04:03 +02:00
jean-pierre charras ea467e6730 Pcbnew: fix bug Bug #1001107 (Solder Mask Ratio Clearance bad value)
Because this bug could create bad values in footprint libraries, this parameter is now checked
when reading a footprint description in legacy format
2012-05-18 10:33:57 +02:00
jean-pierre charras 6d1fe6fe5e Fix 2 minor warning compil (unused variables) 2012-05-16 22:44:21 +02:00
jean-pierre charras 9e7cbed8c1 Fix compil issues with gcc 4.6 and boost 1.49 2012-05-16 18:59:47 +02:00
Dick Hollenbeck 879f85aa7c move boost update script to out of way place, fix bug in it 2012-05-16 07:01:40 -05:00
Miguel Angel Ajo 70df15175b Footprint wizard, plus fixes 2012-05-16 11:35:18 +02:00
Dick Hollenbeck ab001b902a bring in skeleton for eagle_plugin and update boost for use of RapidXML within property_tree 2012-05-15 21:27:27 -05:00
Dick Hollenbeck ffd57d88d7 move all hashtable declarations into include/hashtables.h, prepare for boost usage 2012-05-15 21:00:25 -05:00
Dick Hollenbeck 4a7b5304a0 update to boost 1.49.0 subset 2012-05-15 20:42:04 -05:00
Dick Hollenbeck 84c782fba7 try to delete a footprint library before exporting or creating, quietly 2012-05-15 08:58:55 -05:00
henner zeller 42f1b9e415 commit patch from henner zeller (make EDA_LIST_DIALOG resizable) 2012-05-14 17:23:20 +02:00
jean-pierre charras 40c5a46f38 Libedit: fix Bug #994014.
Pcbnew: fix Pcbnew name capitalization in messages.
About dialog: add a link to kicad-pcb.org
2012-05-13 17:31:58 +02:00
jean-pierre charras 9f41cac041 Remove PCB_INTERNAL_UNIT define because it is no more used in code.
3D viewer: fix incorrect scaling factor when using nanometers.
Very minor other fixes
2012-05-11 11:02:35 +02:00
Miguel Angel Ajo 4dc70b2fc8 wxGrid instead of list, now we do really have values... 2012-05-11 00:30:26 +02:00
Miguel Angel Ajo 4ead38a83d Cosmetic fixes, before moving to wxGrid 2012-05-10 22:49:07 +02:00
jean-pierre charras ff66db7b6f Gerbview: fix incorrect processing of ICI command in Excellon drill files. 2012-05-10 13:02:44 +02:00
Miguel Angel Ajo 351e08c8a9 Footprint wizard UI gets the module from python wizard, and show it 2012-05-10 10:53:05 +02:00
Miguel Angel Ajo eff5023287 * Read string array results from python methods~ 2012-05-10 08:44:08 +02:00
jean-pierre charras f6551172d2 Fix capitalization issues in title bar and config files (broken by bzr rev 3543) 2012-05-10 08:25:27 +02:00
Miguel Angel Ajo c051c1a4a9 footprint wizard UI and footprint wizard lists 2012-05-10 01:04:08 +02:00
Miguel Angel Ajo 23bec4b80b * Footprint wizard UI: Added to module editor.
* Footprint wizard C++ generic classes
* Footprint wizard C++ to python wrappers 
* Automatic plugin loader from ~/.kicad/plugins
* Python plugin architecture: Footprint wizards
2012-05-09 19:37:25 +02:00
Dick Hollenbeck 2e0941a1de Fix some comments. Enhance LEGACY_PLUGIN such that it can tolerate, then fix bad legacy footprint libraries containing duplicate footprint names.
This may have been an undocumented bug from more than a year ago, which manifested itself in *.mod files containing duplicate names.
LEGACY_PLUGIN loads those now quietly, but appends "_v2", "_v3", etc. to each succeeding duplicate sharing the same name.
2012-05-08 19:26:15 -05:00
Dick Hollenbeck 6824dc7199 this helps zooming on some window types 2012-05-08 16:09:18 -05:00
Dick Hollenbeck 40ccdd5763 Fix Pcbnew markers in nanometer build with proper scaling factor. Use double in Zoom() 2012-05-07 16:47:25 -05:00
Dick Hollenbeck fb9e1ea010 Make drawframe.cpp's StatusBar use field widths which are dynamically determined
base on expected text and current window font.

Expand the virtual world to 2.14 meters in the nanometer build of PCBNEW.
This seems to be holding up for now.
2012-05-06 18:32:01 -05:00
Dick Hollenbeck 86e04b4fb3 more nanometer work, see comment at line 66 of pcbnew/classpcb.cpp 2012-05-06 15:10:43 -05:00
jean-pierre charras fda7bbffc3 Gerbview: Fix a compil issue in my last commit. 2012-05-06 21:41:53 +02:00
jean-pierre charras ba96329648 Gerbview: Fix a compil issue in my last commit. 2012-05-06 21:29:52 +02:00
jean-pierre charras f0c50f007c Fix a grid selection issue when starting Eeschema or Gerbview:
Eeschema (also Libedit and Libview) now starts always to the default grid (50 mils)
Gerbview starts with the last selected grid, but the validity is tested.
In Pcbnew the grid value is always displayed, so it should always be good.
2012-05-06 20:04:14 +02:00
jean-pierre charras a3f83d771f Fix grid selection issue when starting Eeschema or Gerbview:
Eeschema (also Libedit and Libview) starts always to the default grid (50 mils)
Gerbview starts with the last selected grid, but the validity is tested.
In Pcbnew the grid value is always displayed, so it should always be good.
2012-05-06 18:55:51 +02:00
Miguel Angel Ajo edee5dc1ce KiCad scripting plugin architecture, footprint wizards first 2012-05-05 22:18:47 +02:00
Dick Hollenbeck 051a7e5733 move import directory to new branch kicad-contrib 2012-05-05 15:06:14 -05:00
Jerry Jacobs 1ad84c07d6 Cosmetic UI changes mostly for Mac OS X, see CHANGELOG.txt 2012-05-05 18:03:21 +02:00
Jerry Jacobs 5f5c504288 Cosmetic UI changes mostly for Mac OS X, see CHANGELOG.txt 2012-05-05 18:02:09 +02:00
Dick Hollenbeck 173c93969d Remove zip library by switching to wxZlibOutputStream for PDF plotter.
Delete LEGACY_PLUGIN cache after deleting library of same name.
Remove automatically generted freerouter help header.
Add Normalize() to BOX2.
Clamp some values in the virtual space of drawframe.cpp
2012-05-04 23:55:36 -05:00
jean-pierre charras f459e4f78d Commit missing files 2012-05-04 20:57:32 +02:00
jean-pierre charras 687a127b97 Gerbview: remove dependencies from Pcbnew.
Should allow Pcbnew code easier to change and Gerbview code more understandable and easier to maintain.
Code cleaning (remove dead code, add comments).
Minor other enhancements.
2012-05-04 20:16:13 +02:00
jean-pierre charras 4125ea7789 Gerbview: remove dependencies from Pcbnew.
Should allow Pcbnew code easier to change and Gerbview code more understandable and easier to maintain.
Code cleaning (remove dead code, add comments).
Minor other enhancements.
2012-05-04 19:44:42 +02:00
Lorenzo Marcantonio 2fe9a99b8f Commit patch from Lorenzo Marcantonio about plot functions enhancement.
Fix some warning compil issues.
Add zlib sources to avoid build issues under Windows (zlib not installed with mingw).
2012-05-03 22:17:34 +02:00
jean-pierre charras 684d98ecca Add missing files 2012-05-03 21:08:14 +02:00
jean-pierre charras 61acac28e1 Add patch from Lorenzo Marcantonio. Fix some warning issues, and zlib issue under Windows (zlib sources added) 2012-05-03 20:37:56 +02:00
Frank Bennett ebcb6d3b82 This import directory contains tools for importing
to Kicad from other EDA tools.

  edif2kicad        / EDIF to EEschema schematic import
    Tools with EDIF out writer:
       o OrCad
       o DataXpress
       o Viewlogic
       o IntuSoft ICAP
       o Protel nVisage
       o PADS ?
       o P-CAD ?
       o EDIF viewer (www.cimmetry.com)
       o EDIF translator (www.elgris.com/content/edif_overview.html)

  pcb123net2kicad   / converts a pcb123 netlist to Kicad default format
2012-05-02 13:58:54 -06:00
Miguel Angel Ajo f114e800a4 support for footprint library operations 2012-05-01 17:13:36 +02:00
jean-pierre charras d26e9ff2e1 Cvpcb: Fix Bug #992429 2012-05-01 12:43:16 +02:00
Miguel Angel Ajo f35037238c merged to testing, fixed some scripting imports 2012-04-30 18:05:22 +02:00
Dick Hollenbeck 3fa7c200b7 Add tools/parser_gen.cpp which is the beginnings of an s-expression parser
generation tool.  For now, it is just an s-expression beautifier using
our "non-specctra mode" version of s-expressions.
2012-04-29 21:57:48 -05:00
jean-pierre charras b322a885a2 Remove old function valeur_param(), that does not work in Kicad Nanometer 2012-04-27 16:41:51 +02:00
jean-pierre charras e96f1aeb3d Remove valeur_param(), that does not work in Kicad Nanometer 2012-04-27 16:15:11 +02:00
jean-pierre charras 9d6c1d12ed Fix some (not all) bad values displayed in NANOMETER mode. 2012-04-27 08:11:41 +02:00
jean-pierre charras cdaa5ceac7 missing change. 2012-04-27 00:04:09 +02:00
jean-pierre charras 8680e9f34a All: change MILS_TO_IU_SCALING_FACTOR constant to IU_PER_MILS ( and MM_TO_IU_SCALING_FACTOR to IU_PER_MM)
Also fix bug 985654.
2012-04-26 23:35:40 +02:00
jean-pierre charras 758f22161a All: change MILS_TO_IU_SCALING_FACTOR constant to IU_PER_MILS ( and MM_TO_IU_SCALING_FACTOR to IU_PER_MM)
Also fix bug 985654.
2012-04-26 23:34:20 +02:00
jean-pierre charras 3b671e09d1 All: change MILS_TO_IU_SCALING_FACTOR constant to MILS_PER_IU ( and MM_TO_IU_SCALING_FACTOR to MM_PER_IU)
Also fix bug 985654.
2012-04-26 22:21:31 +02:00
jean-pierre charras a00df5b330 commit missing files 2012-04-25 21:46:30 +02:00
jean-pierre charras fa3ebc4043 Define MM_TO_IU_SCALING_FACTOR (scaling factor from mm to internal units) only in convert_to_biu.h
Other scaling factors (MILS_TO_IU_SCALING_FACTOR and DECIMILS_TO_IU_SCALING_FACTOR)
also defined only in convert_to_biu.h.
Allows different scaling value for Gerbview.
Needs more tests.
2012-04-25 21:33:24 +02:00
Dick Hollenbeck e3b6385cd3 I was disappointed when I disassembled the code using the KiROUND() inline function
solution to see that it was not pre-computing constants when used in static initializers.

So we have two use cases, and need two solutions to be optimal, since the compiler 
is too stupid to do the right thing.

I think we need something else for compile time computable constants, to be optimal 
in both use cases.  There is quite a bit of code savings by using a macro for that 
situation from my testing.  To fully capitalize on this, we need to go back and make 
Mm2mils() and what not macros also, or have MACRO versions of them too.
2012-04-25 09:12:25 -05:00
Miguel Angel Ajo b939f3bc2f C++ plugin exceptions correctly handled now 2012-04-24 22:28:23 +02:00
Dick Hollenbeck a2f1482192 TODO 2012-04-24 09:23:41 -05:00
Dick Hollenbeck 2140efdce3 Somebody else spelled rectangle as badly as me, fix the mingw build 2012-04-23 21:39:56 -05:00
Dick Hollenbeck 33616f3051 * Add DRECT, DPOINT, and DSIZE (double rect, point, and size) using Torsten's vector2d.h
as a starting point
* Make double Distance() take double arguments and remove internal range checking.
* Start on EDA_DRAW_FRAME::AdjustScrollBars() and use "double" for most all calculations
  in anticipation of setting INT_MAX INT_MIN limits eventually.
2012-04-23 16:56:26 -05:00
Miguel Angel Ajo d719282aaf wxArrayString typemaps, class missing yet 2012-04-23 08:59:37 +02: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
Miguel Angel Ajo 5157657eba merged to last testing, also added automatic file extension detection on save/load 2012-04-22 13:14:58 +02:00
Miguel Angel Ajo aef92a345c Merged to testing, needs some fixes 2012-04-21 22:04:02 +02:00
Miguel Angel Ajo 42fad8a754 Exceptions handled on board Load/Save 2012-04-20 23:20:56 +02:00
Dick Hollenbeck a9d1f4788b todo 2012-04-19 15:28:54 -05:00
Dick Hollenbeck e594732646 missing include 2012-04-19 15:07:36 -05:00
Dick Hollenbeck c24863c078 // Dick Hollenbeck's KiROUND R&D
// This provides better project control over rounding to int from double
// than wxRound() did.  This scheme provides better logging in Debug builds
// and it provides for compile time calculation of constants.


#include <stdio.h>
#include <assert.h>
#include <limits.h>

//-----<KiROUND KIT>------------------------------------------------------------

/**
 * KiROUND
 * rounds a floating point number to an int using
 * "round halfway cases away from zero".
 * In Debug build an assert fires if will not fit into an int.
 */

#if defined( DEBUG )

// DEBUG: a macro to capture line and file, then calls this inline

static inline int KiRound( double v, int line, const char* filename )
{
    v = v < 0 ? v - 0.5 : v + 0.5;
    if( v > INT_MAX + 0.5 )
    {
        printf( "%s: in file %s on line %d, val: %.16g too ' > 0 ' for int\n", __FUNCTION__, filename, line, v );
    }
    else if( v < INT_MIN - 0.5 )
    {
        printf( "%s: in file %s on line %d, val: %.16g too ' < 0 ' for int\n", __FUNCTION__, filename, line, v );
    }
    return int( v );
}

#define KiROUND( v )    KiRound( v, __LINE__, __FILE__ )

#else

// RELEASE: a macro so compile can pre-compute constants.

#define KiROUND( v )  int( (v) < 0 ? (v) - 0.5 : (v) + 0.5 )

#endif


//-----</KiROUND KIT>-----------------------------------------------------------

// Only a macro is compile time calculated, an inline function causes a static constructor
// in a situation like this.
// Therefore the Release build is best done with a MACRO not an inline function.
int Computed = KiROUND( 14.3 * 8 );


int main( int argc, char** argv )
{
    for( double d = double(INT_MAX)-1;  d < double(INT_MAX)+8;  d += 2.0 )
    {
        int i = KiROUND( d );

        printf( "t: %d  %.16g\n", i, d );
    }

    return 0;
}
2012-04-19 01:55:45 -05:00
Dick Hollenbeck 9a6612c6ec use a block scope to invoke wxFFile's destructor before renaming temporary file 2012-04-18 07:24:40 -05:00
jean-pierre charras f3e171797c Make Gerbview working with USE_PCBNEW_NANOMETRES option ON 2012-04-18 09:07:13 +02:00
Dick Hollenbeck 47a41f9c66 PLUGIN API Doxygen comments 2012-04-17 09:54:48 -05:00
Dick Hollenbeck 72d4b2353b uncrustify math_for_graphics, add copyright legacy_plugin.h 2012-04-17 09:18:14 -05:00
Dick Hollenbeck 597833b55e touch ups 2012-04-17 01:13:22 -05:00
Dick Hollenbeck e88bc8e58b LEGACY_PLUGIN is now in full use:
*) for footprint access into *.mod files and 
*) BOARD save/load

The item_io.cpp and ioascii.cpp have been set off to the side for reference
as *.notused, for awhile.

The CMake options USE_NEW_PCBNEW_LOAD and USE_NEW_PCBNEW_SAVE are gone,
this is now the mandatory usage of the LEGACY_PLUGIN.  This should reduce
code maintenance for awhile until the s-expression plugin comes into 
play.  But at least for legacy format, there is not two code bodies
to maintain any more.

A new LEGACY_PLUGIN footprint library caching scheme is in place which 
needs some testing.  It should not be any faster, but might give better 
results in a networked environment if there is *.mod files on the server.
2012-04-16 22:12:53 -05:00
Dick Hollenbeck 51a83a7a66 cvpcb LEGACY_PLUGIN usage factoring 2012-04-16 21:58:03 -05:00
Dick Hollenbeck 3341669fc6 more footprint support for LEGACY_PLUGIN 2012-04-16 20:35:43 -05:00
Wayne Stambaugh bf5802f1f7 Removal of internal units.
* Remove internal units from BASE_SCREEN and it's derivatives.
* Remove internal units from EDA_DRAW_FRAME and it's derivatives.
* Use build time code to replace internal units conversions.
* Fix scaling bug in page layout sample window that I created in my
  last commit.
2012-04-16 19:31:29 -04:00
Wayne Stambaugh 6468805c27 More internal unit improvements.
* Move all convert from user to internal units into base_units.cpp.
* Remove internal units parameters from all moved conversion functions.
* Revise all source code that calls the moved conversion functions.
* Remove internal units from all dialog text control helper classes.
2012-04-16 13:39:32 -04:00
jean-pierre charras 5d5eb7d38c Fix a serious bug in EDA_RECT::Intersects
Kicad manager: code cleaning. Dead code removed and minor fixes. support of new .kicad_brd extension.
2012-04-16 14:56:01 +02:00
Dick Hollenbeck a42490e0f3 work on footprint plugin API 2012-04-15 22:18:41 -05:00
Wayne Stambaugh 8c0dc01fdd Pcbnew nanometer internal unit fixes.
* Scale page reference border and title block, grid sizes, and zoom factors
  correctly for nanometers.
2012-04-15 21:25:26 -04:00
lajos kamocsay add5321328 Commit patch fixing an issue in pan with middle mouse button (from lajos kamocsay)
Other minor fixes.
2012-04-15 12:33:35 +02:00
Miguel Angel Ajo 55c0eafd6f merged testing branch 2012-04-14 23:18:27 +02:00
Wayne Stambaugh 57d75a75a8 More internal unit improvements.
* Move all convert from internal to user units functions into separate file.
* Remove internal units parameter from all moved conversion functions.
* Revise all source code that calls the moved conversion functions.
* Compile these conversion routines separately for the appropriate pcb or
  schematic internal units.
* Move internal units specific status bar update code into the appropriate
  application for updating the status bar.
* Move millimeter user units rounding function to common.cpp.
2012-04-13 14:51:24 -04:00
jean-pierre charras b28e976e35 Eeschema: BOM list generation: some fixes and enhancements.
drawframe.cpp: commit a fix about scrollbars  from lajos kamocsay
2012-04-13 20:44:02 +02:00
Wayne Stambaugh bed96be750 Internal unit improvements and Pcbnew s-expression file format changes.
* Move EDA_TEXT object into separate header and source file.
* Compile EDA_TEXT class separately for BOARD_ITEM and SCH_ITEM units.
* Compile PAGE_INFO  class separately for BOARD_ITEM and SCH_ITEM units.
* Minor formatting tweaks to Pcbnew s-expression file.
* Move internal unit formatting functions into BOARD_ITEM and SCH_ITEM.
2012-04-12 17:31:31 -04:00
lajos kamocsay 38ea600803 Fix small issue when panning with middle button. 2012-04-12 09:58:12 +02:00
Dick Hollenbeck b4bb924eab fix comment 2012-04-11 18:51:16 -05:00
Dick Hollenbeck 1121b9cc3c * Coding standards, private functions are lowercase.
* Fix bug in PCBNEW dialog_pad_properties.cpp that I introduced several days ago.
  The m_Master_Pad stuff is stored in the PCB_EDIT_FRAME's BOARD_DESIGN_SETTINGS,
  not in the FOOTPRINT_EDIT_FRAME's BOARD_DESIGN_SETTINGS (i.e. not stored in 
  the module editor's dummy BOARD).  Now we properly initialize the
  DIALOG_PAD_PROPERTIES::m_Pad_Master reference to the correct master pad
  dope, instead of to the dummy module BOARD's master pad, which is not used.
2012-04-11 18:30:06 -05:00
jean-pierre charras 7bd6c82cf0 Eeschema: fix a bug in my previous commit. 2012-04-11 23:01:20 +02:00
jean-pierre charras f0dc54340d All: new middle mouse pan feature, from lajos kamocsay (and jp charras for some enhancements).
If enable in preference menu, allow the pan with drag mouse with middle button down.
both unlimited and limited pan is allowed.
2012-04-11 20:54:20 +02:00
Dick Hollenbeck 0df3793329 handle negative constants 2012-04-11 10:50:17 -05:00
lajos kamocsay a20372579c This is some boost weirdness. 2012-04-11 09:55:40 -05:00
Dick Hollenbeck a0c80381f2 improve comments in specctra stuff 2012-04-11 09:49:11 -05:00
jean-pierre charras 36dac0c14d Pcbnew nanometer: fix hatch lines issue in polyline.cpp
Some minor code cleaning.
2012-04-11 11:47:57 +02:00
Dick Hollenbeck e730219b31 add PCNBEW nanometer support to specctra round-tripper, use micro-meters to do it. 2012-04-10 11:28:26 -05:00
Dick Hollenbeck 6652845683 remove #include <auto_ptr.h> 2012-04-09 08:56:30 -05:00
jean-pierre charras 8f62c6aa05 Move AddMenuItem inline functions outside wxstruct.h in a new file (menu_helpers.h)
Enhancements in AddMenuItem (that accepts now a menu type)
Partial use of the Edwin van den Oetelaar's patch (patch not fully working or correct)
2012-04-09 11:16:47 +02:00
Miguel Angel Ajo a201522f6b lajos kamocsay compilation patches 2012-04-09 08:53:24 +02:00
Miguel Angel Ajo 0cdc5c59ab detect building status of the swig .py file (on parallel make builds). Fix unit conversion returns (From_xxx) to integer, what's all the wxPoint/wxRect/wx.. expect. Extended createPcb.py example 2012-04-09 08:19:57 +02:00
Alexander Zakamaldin f2f0f66a50 This bug is not evident for the first glance because most PS viewers fix this issue and print well.
But when using raw printing (for linux - 'lpr some_file.ps') the bug gets out.

Alexander.
2012-04-08 18:37:26 -05:00
Dick Hollenbeck 9e980d916f Add DMils2iu() for scaling deci-mils to internal units.
Instrument saveNETCLASS() with fmtBIU().
Can now round trip to mm board file using LEGACY_PLUGIN in DEBUG build.
2012-04-08 18:32:32 -05:00
Dick Hollenbeck 149f6d807d *) Change LEGACY_PLUGIN to respect saving and loading of UNDEFINED_DRILL_DIAMETER.
*) Allow building without defining 
        USE_NEW_PCBNEW_LOAD & USE_NEW_PCBNEW_SAVE.
	pcbnew/files.cpp would not link.
2012-04-08 14:01:54 -05:00
Miguel Angel Ajo 1f108b0b6c missing script 2012-04-08 17:00:15 +02:00
Miguel Angel Ajo 946ddbaa08 Fix units.i and add some extra wrappers wxSizeMM, wxSizeMils wxRectMM wxRectMils 2012-04-08 16:59:12 +02:00
Miguel Angel Ajo be15057977 Fixed wxSize bug, wxPoint(double,double) support, units. Fixed GetBoard wasn't accessible at every build. Extended example for board creation (now adds pads). Also fixed the _pcbnew loading from pcbnew which should only go to the internal _pcbnew and not the _pcbnew.so/dso. Right installation path for _pcbnew.so (in linux only) 2012-04-08 16:25:49 +02:00
Wayne Stambaugh 9c16a218c0 Pcbnew s-expression file format changes.
* Save dialog now supports saving boards to new file format.
* Add CMake option to build s-expression file save.
* Add check to main CMakeList.txt file to make sure nanometers are
  enables when the new file format is built.
* Minor tweaks to object format functions for improved output.
* Rename kicad_plugin.h/cpp to legacy_plugin.h/cpp.
2012-04-07 14:05:56 -04:00
jean-pierre charras 6976d2538f remove old xpm icons, no more used. 2012-04-07 16:34:56 +02:00
jean-pierre charras d739f03c5f Remove old xpm icons files 2012-04-07 13:09:57 +02:00
Miguel Angel Ajo 7c8bfab5ca TODO.txt updated 2012-04-06 22:42:39 +02:00
Miguel Angel Ajo 485ec24f61 Add method for MODULE in python that takes care of memory handling 2012-04-06 22:38:32 +02:00
Miguel Angel Ajo b54acf607a example for pcb creation in scripting 2012-04-06 21:48:00 +02:00
Miguel Angel Ajo 96c1a50e00 BOARD::Add now it's wrapped in python and clears the .thisown flag on python to avoid GC from deleting the object later (BOARD will do) 2012-04-06 21:46:45 +02:00
Dick Hollenbeck 1effb1fefc USE_NEW_PCBNEW_LOAD and USE_NEW_PCBNEW_SAVE are enabled by default.
This uses the new LEGACY_PLUGIN, so we can force more usage & testing of it
before ioascii.cpp and item_io.cpp are deleted, along with 
BOARD_ITEM::Save() and BOARD_ITEM::ReadDescr() associated functions.
2012-04-06 14:31:28 -05:00
Miguel Angel Ajo 173b869dcb Compilation cleanup, TODO.txt update about library creation 2012-04-06 20:13:03 +02:00
jean-pierre charras 571bca200b Pcbnew: fix Bug #975014 2012-04-06 20:03:16 +02:00
Miguel Angel Ajo 3f761c890c Added wxRect and wxSize wrappers to wx.i 2012-04-05 23:41:45 +02:00
jean-pierre charras 100ea3a59b Finish Pcb Calculator work 2012-04-05 20:56:06 +02:00
Dick Hollenbeck 3d6437863c todo 2012-04-05 13:29:42 -05:00
Dick Hollenbeck f8490ff4af Remove g_PcbPlotOptions, use wxformbuilder to subclass DIALOG_SHIM on several dialogs 2012-04-05 13:27:56 -05:00
Andrey Fedorushkov e4309287bf pcb_calc: fix build in linux distrib Mageia1 with wxgtk2.8-2.8.11-4.mga1 2012-04-04 21:08:16 +04:00
jean-pierre charras 70cf189132 pcb_calculator: fixes and enhancements (not finished) 2012-04-03 20:26:05 +02:00
jean-pierre charras 7ce97878e8 pcb_calculator: enhancement in Regulators page dialog:
* support for 3 terminal regulators
* add a data file management to store parameters for regulators ( name, vref value, Iadj value, type)
Needs some refinements, but it is already very useable.

 Commit dialog page setting patch from Alexander Zakamaldin
2012-04-02 20:11:00 +02: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
Alexander Zakamaldin 57ede4aff4 fix minor issue a page layout in GOST mode 2012-03-29 08:47:29 +04:00
jean-pierre charras 4882d5459a Libedit, dialog edit pin: fix wxDialogs tabbing order 2012-03-28 18:53:02 +02:00
jean-pierre charras e356e6dc6b Fix issues about translations:
Eeschema: one string with a bad char (\a, not useable in internationalized strings).
Dialog_page_settings: use not translated strings in code, so strings can be freely translated for the UI.
(Initial code was not working with existing translations)
Update 2 icons.
2012-03-27 18:41:13 +02: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
Alexander Zakamaldin 005a13fef3 Alexander's patches, with refinements from Dick 2012-03-26 16:52:53 -05:00
Alexander Zakamaldin 625e964c8d Alexander's patches, with refinements 2012-03-26 16:45:05 -05:00
Fabrizio Tappero acc07c338c Update icons 2012-03-24 16:38:55 +01:00
jean-pierre charras cf9864766b class EDA_RECT: is no more derived from EDA_ITEM, just from EDA_RECT (reason: does not use anything in EDA_ITEM)
issue in cast to wxRect fixed (EDA_RECT accepts negative size, but not wxRect, so the wxRectcast  is normalized now).
This fixes some bugs.
A minor other bug fix in Pcbnew.
2012-03-24 15:25:30 +01:00
Dick Hollenbeck b01bcda079 Backout my usage of DIALOG_EXTEND_WITH_SHIM in favor of wxFormbuilder's
subclass DIALOG_SHIM support.
Tried dialog_drc but it has nesting problems due to use of DRCLISTBOX, which
needs to be put into its own header file to untangle.
2012-03-22 13:36:20 -05:00
Dick Hollenbeck 31a84b84ec Add include/dialog_shim.h and common/dialog_shim.cpp for use by wxformbuilder's "subclass a wxDialog" support.
This works, but in my version of wxformbuilder there is a bug which does not properly show the 
subclass property, even though it is still in play.  This happens after saving then loading the *.fbp file.
So it is a nuisance bug, but does not affect functionality.
2012-03-22 02:02:49 -05:00
jean-pierre charras fda20d28d8 Pcbnew: Allows an offset for SMD type (and CONNECTOR type) pads. 2012-03-20 21:22:38 +01:00
Andrey Fedorushkov 00e6f01584 eeschema: add forgotten major fix in bzr3471 2012-03-20 19:19:07 +04:00
Andrey Fedorushkov b8a2c4e240 eeschema: fix sorting parts generate BOM "Single part per line" 2012-03-20 18:41:57 +04:00
jean-pierre charras f49c27798e Update some icons with new icons from Fabrizio Tappero.
Remove 2 duplicate icons.
Minor cosmetic enhancements and fixes in popup menus.
2012-03-20 15:17:58 +01:00
Miguel Angel Ajo 6d643f70b5 Fixed Board.Save, listPcb.py +x and updated TODO.txt 2012-03-20 07:34:23 +01:00
Dick Hollenbeck df494fc83e start toying with DIALOG_SHIM 2012-03-19 15:57:19 -05:00
Dick Hollenbeck 87aa22f13f quiet warnings, add Clamp() 2012-03-19 11:29:24 -05:00
Miguel Angel Ajo cd93e14d7d fixed DEBUG build dependency... 2012-03-19 16:39:50 +01:00
Miguel Angel Ajo 9ebe983eaa * cleanups: board.i board_item.i separated from pcbnew.i
* dlist.i empty list fixed (Segfault)
* units.i: FromMM FromMils ToMM ToMils
* added a little example (listPcb.py) that shows most items in a board
2012-03-19 12:21:29 +01:00
Miguel Angel Ajo 9398eb9767 std::vector and std::string items
DLIST iterator code, now we can do:

    for module in pcb.m_Modules:
    	print module.GetReference()

instead of:

    module = pcb.m_Modules

    while module:
	print module.GetReference()
	module = module.Next()

or even:
    module_list = list(pcb.m_Modules)
2012-03-19 09:36:38 +01:00
jean-pierre charras b5cac30abd Eeschema: fix a bug in bool SCH_LINE::MergeOverlap( SCH_LINE* aLine ): ends point of resulting segment incorrects.
remove unused icon files.
2012-03-19 08:48:29 +01:00
Miguel Angel Ajo 7a25604161 fixed ident tabs 2012-03-19 08:40:43 +01:00
Miguel Angel Ajo b28dbd31c3 Cast() method to cast down classes from BOARD_ITEM to all childs 2012-03-18 22:35:51 +01:00
Miguel Angel Ajo c0be31aeda Fixed some indent, and added some conditional compiles on pcbnew.cpp 2012-03-18 10:09:51 +01:00
Miguel Angel Ajo 06c570bab3 * More cleanup (common wrappers moved to scripting, instead of pcbnew/scripting)
* Added a first test 'testLoadSave.py'
2012-03-17 18:30:03 +01:00
Miguel Angel Ajo f422350605 pcbnew_scripting_helpers.cpp/h to handle generic scripting tools
CMakeLists.txt options to build scripting or scripting modules
2012-03-17 16:17:13 +01: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
Joe Ferner ffbbd64c73 Joe Ferner's merge 2012-03-16 22:01:53 -05:00
Dick Hollenbeck 5080d4cc3e cleanups 2012-03-16 21:11:44 -05:00
jean-pierre charras 6dc85d1c96 Eeschema: fix bug Bug #956818 2012-03-16 20:08:57 +01:00
Joe Ferner aad54ec406 Added a toolbar button to cvpcb to filter by pin/pad count. 2012-03-15 14:20:22 -04:00
Wayne Stambaugh 6375497825 Hit test method rationalization and other minor improvements.
* All objects derived from EDA_ITEM now have consistent hit test method
  definitions.
* Remove double function calls from all classes derived from SCH_ITEM.
* Lots of Doxygen comment fixes.
2012-03-15 10:31:16 -04:00
jean-pierre charras e56f76dbcf Update compiling.txt doc. 2012-03-15 09:56:55 +01:00
Andrey Fedorushkov 389656e58c all: add display distance to local coordinates in status bar 2012-03-13 13:33:39 +04:00
Dick Hollenbeck 72e9106481 todo 2012-03-12 10:18:32 -05:00
jean-pierre charras 396538e176 Eeschema: minor fixes:
* make 2 bitmaps more visible.
* fix incorrect screen redraw when rotating a component.
* netlist : the pcbnew advanced format can be now stored (persistant option) in project config.
2012-03-12 11:04:40 +01:00
Dick Hollenbeck 2e29b4f152 * Add PCB_EDIT_FRAME::syncLayerVisibilities(), PCB_LAYER_MANAGER::SyncLayerVisibilities().
* Save all visibilities, layer and render, in BOARD and restore on load.
2012-03-11 19:40:48 -05:00
Miguel Angel Ajo 970e033399 build _pcbnew DSO/DLL 2012-03-11 20:48:43 +01:00
Miguel Angel Ajo ec5757a4fa code cleanup, io_mgr and kicad_plugin included when enabled in cmake... 2012-03-11 20:07:10 +01:00
Miguel Angel Ajo 562d2461aa wxString, wxPoint and wxChar wrappers 2012-03-10 22:40:41 +01:00
jean-pierre charras 3976d5087e Pcbnew: Fix Bug #951414 (Windows specific)
Ckecks more pad parameters in pad editor dialog (previously not tested, so a pad could have some very incorrect parameters)
2012-03-10 14:00:31 +01:00
jean-pierre charras c047d7f484 Pcbnew: regression fix when using the new netlist format:
* when a footprint has  many pads having the same pad name, only the first pad was connected to the net
2012-03-10 08:58:21 +01:00
jean-pierre charras 909c2a6051 Dialog exit: better icon.
Pcbnew:
 * graphic_item_properties_base.fbp * dialog pad edit: make some strings more easier to translate.
 * global pad edition: fix a bug that change pad position instead of pad size (round pas only).
Eeschema:
 * fix a bug: new created wires were not alwaes shows until the screen was redrawn.
2012-03-09 19:58:58 +01:00
Marco Mattila 672b55fd05 Fix compilation issue with KicadSVGFileDC. 2012-03-08 22:47:09 +02:00
Marco Mattila a731a6b712 Add more pad local copper zone settings in pcbnew. Tune the pad properties dialog a little. 2012-03-08 22:44:03 +02:00
jean-pierre charras e90cc8adf5 All: added a standard exit dialog called by int DisplayExitDialog( wxWindow* aParent, const wxString& aMessage )
Called when closing pcbnew, cvpcb and eeschema.
Minor code cleaning: remove duplicate or not used strings (mainly file extensions and wildcards)
2012-03-08 18:47:23 +01:00
jean-pierre charras 5e5ec6f1a9 All: try to fix incorrect acs in plot SVG under wxWidgets 2.9:
wxWidgets 2.9 knows wxSVGFILEDC device context.
Unfortunately, arcs are drawn as pies (this is a feature, not a bug).
This is not correct for Kicad.
So Kicad has its own wxSVGFILEDC (named KicadSVGFileDC) that is basically the same as wxSVGFILEDC,
but with arcs drawn as arcs, not pies.
Note also under wxWidgets 2.8 does not know wxSVGFILEDC , so kicad had already its own SVG device context.
2012-03-07 21:18:00 +01:00
Dick Hollenbeck db7c8cfd92 remove clamping from PAGE_INFO setters 2012-03-06 14:10:12 -06:00
jean-pierre charras ed5585eb6c Libedit: fix bug (svg export does not work)
other minor fixes.
2012-03-06 15:08:59 +01:00
Miguel Angel Ajo 3dacab9691 wxPoint + more lists 2012-03-05 23:49:49 +01:00
Alexander Zakamaldin f13e020314 Problem with the Help link "getting started in kicad" 2012-03-01 09:53:34 -06:00
Miguel Angel Ajo b21dbd9561 Added a starting scripting dialog for tests 2012-03-01 08:21:53 +01:00
Dick Hollenbeck c41752fdf4 Load BOARD project settings before loading BOARD in case BOARD has
any configuration overrides.

Call SetDesignSettings() in PCB_BASE_FRAME::ReadSetup().
2012-02-29 09:25:38 -06:00
Miguel Angel Ajo d7692cd115 SWIG+Python initial scripting support added.
It does nothing but loading and initializing right now.
2012-02-28 22:30:46 +01:00
jean-pierre charras 75d2dc7311 Pcbnew: Hight contrast mode: commit last patch from Miguel Angel Ajo Pelayo, which also fixes an old bug.
All: prepare better compatibility with wxWidgets 2.9.4. Works fine with 2.8.x (I hope...)
2012-02-28 21:14:17 +01:00
Wayne Stambaugh 4a7394038f Minor Eeschema LIB_ITEM object improvements. 2012-02-27 18:02:08 -05:00
Wayne Stambaugh 07e5eee133 Fixes wxSingleChoiceDialog ambiguous constructor compile bug using wxWidgets 2.9.4 or greater. 2012-02-26 14:57:48 -05:00
jean-pierre charras 6219291ddc ModEdit (and ModView): make "invisible" texts visible. They are not visible in the board editor, but must be visible in the footprint editor.
Minor doc update.
2012-02-26 19:49:00 +01:00
Wayne Stambaugh aaa1cc3e02 Eeschema object list and other minor improvements.
* Convert Eeschema from manually linked list to DLIST for storing
  SCH_ITEM objects.
* Add helper functions to SCH_SCREEN for appending list of SCH_ITEM
  objects.
* Fix bug in wire editing code for accurate undo/redo behavior.
* Add member to DLIST to append another DLIST.
* Other minor code cleaning.
2012-02-26 13:39:39 -05:00
jean-pierre charras a1ff326181 Pcbnew: better icon for zone unfill. Minor code cleaning in 3D viewer 2012-02-25 20:55:40 +01:00
jean-pierre charras bfe4937162 Pcbnew: fix compil issue. 2012-02-25 08:55:14 +01:00
Marco Mattila b536b1cf82 Add module and pad local parameters for pad-zone connections (thermal, solid etc.) in pcbnew. 2012-02-25 01:23:46 +02:00
Simon Schubert bcd66579d9 Pcbnew: fix bad arcs in plot postscript (from Simon Schubert) 2012-02-24 18:17:03 +01:00
Marco Mattila 23aea616e0 Fix wxUniCharRef casting issue in eeschema single part per line BOM generation code (?). 2012-02-24 17:00:56 +02:00
Marco Mattila d57a12772a Add correct value sorting (1u < 1n) to bom exports. 2012-02-24 01:57:29 +02:00
jean-pierre charras 2ecda37806 Pcbnew: zone filling: fix broken thermal relief shape for oval pads. mainly noticeable for oval pads having very different X and Y sizes. 2012-02-23 15:59:57 +01:00
Marco Mattila 165cbf1149 Fix compiler warnings introduced in 3430. 2012-02-23 14:54:54 +02:00
Marco Mattila 39ba360861 Fix eeschema component drawing issue during copy. Add hotkey for block save. 2012-02-23 01:35:26 +02:00
Dick Hollenbeck 4154af55e1 Uncrustify 0.59 has some new options, it is still actively supported, now under GIT. 2012-02-22 16:00:55 -06:00
Marco Mattila 97884551f0 Make single part per line BOM generation compare all component fields. 2012-02-22 23:37:34 +02:00
jean-pierre charras 0a68744e2d Eeschema: Add better dialog to edit an existing field of the current edited component. 2012-02-22 15:04:48 +01:00
jean-pierre charras 718b25656c Libedit: Add better dialog to edit an existing field of the current edited component. 2012-02-21 18:47:30 +01:00
Dick Hollenbeck 76e2efedb2 remove unneeded debug printf 2012-02-21 09:58:24 -06:00
Dick Hollenbeck 30ecdbea6a fix infinite loop while generating drill file, bug introduced in 3419 2012-02-21 09:51:11 -06:00
jean-pierre charras 477e98dc6c Fix 2 minor bugs:
* Pcbnew: in hight contrast mode the 'V' hotkey did not always refresh the screen.
* Eeschema: incorrect print scale when the option 'Show page limits' is disable.
2012-02-20 19:46:56 +01:00
Dick Hollenbeck aaa62cddf3 update TODO.txt with personal items 2012-02-20 09:21:42 -06:00
Dick Hollenbeck b6cae6fe86 Miguel's changes 2012-02-20 08:43:49 -06:00
Dick Hollenbeck c2fa1b8816 * Remove virtual BOARD_ITEM::{Get,Set}Position() which in turn means all
derived classes' implementations of these functions become non virtual and
    can be truly _inlined_ for speed!  All GetPosition() in derived classes were also
    changed to return const wxPoint&, that is, a reference rather than a
    full copy of the position wxPoint. There was no need for polymorphism in
    {Get,Set}Position() since we never call these functions via generic pointer.
  * Remove BOARD::{Get,Set}Position() since they were only there to satisfy
    the pure virtuals established in BOARD_ITEM, which are now gone.
  * Added const wxPoint& CPolyLine::GetPos(), made CPolyLine::Get{X,Y}() inline.
  * Derive CPolyPt from wxPoint so we can return "const wxPoint&" fromt
    CPolyLine::GetPos().
2012-02-19 22:48:25 -06:00
Dick Hollenbeck 107ef8f102 see CHANGELOG.txt 2012-02-19 22:33:54 -06:00
jean-pierre charras f1e5be9a67 Fix @JP messages (no bugs, just comment lines)
Eeschema: Viewlib is now accessible from Libedit (to browse libs or load a component to edit)
Libedit: uses now the same dialog as the schematic editor to load a component
Some code cleaning.
2012-02-19 20:53:11 +01:00
Marco Mattila 9ef6ae5b49 Use wxStandardPaths to find out the path to binaries in linux. 2012-02-19 21:13:53 +02:00
Miguel Angel Ajo 6c0c4dbeb5 Added hotkey for high contrast mode as 'H' 2012-02-19 18:33:06 +01:00
Dick Hollenbeck 5208bf9976 * remove global g_Pad_Master global and put it into BOARD_DESIGN_SETTINGS
which is in turn already within BOARD.
  * encapsulate class D_PAD with accessors, making data private.
  * make D_PAD::GetBoundingRadius() do its longer calculation lazily, based on
    m_boundingRadius == -1.
2012-02-18 22:10:49 -06:00
Dick Hollenbeck 9e2eb0c856 see CHANGELOG.txt 2012-02-18 22:02:19 -06:00
jean-pierre charras 827352511a Layers manager: add in popup menu option to hide all coppers layers but active layer.
Design rules: increase number of vias and tracks sizes
Pcbnew: netlist reader: change from my recent commits to keep netnames in pads for footprints not in netlist
(allow an user to place some footprints by hand, set pads netnames and do not lost these netnames when loading a netlsit)
Fix other very minor issues.
2012-02-17 20:43:43 +01:00
jean-pierre charras ba689c10e3 Kicad project manager: add .cmp, .drl .pos and .rpt files management.
Code cleaning and other minor fixes.
2012-02-16 21:03:33 +01:00
Dick Hollenbeck 35ddad2193 wxWidgets Debug builds apparently have some tricky technique to validate
the match between wxString::Format() or wxString::Printf() format strings
with passed arguments, but does this at runtime, not compile time.
Fix some mismatches.  size_t is a 64 bit type on x86_64 whereas int and
unsigned are 32 bit types.  On 32 bit machines they are all 32 bits so
this error is probably not triggered.
2012-02-16 00:17:01 -06:00
jean-pierre charras 4082e12252 Cvpcb: fix compil error. 2012-02-15 17:28:33 +01:00
jean-pierre charras a7d7e8dcc6 Pcbnew: fix Bug #932509 2012-02-15 14:10:52 +01:00
jean-pierre charras 2153f4d1e2 Pcbnew: footprint placement file creation:
* Added a dialog to select options: one or 2 files, units (mm or inch), and force INSERT option.
 * code cleaning
 * Modify corresponding  icon in menu to show a footprint, not a schematic component.
2012-02-15 11:41:16 +01:00
jean-pierre charras 74aecb3e72 Icons for modedit and modview: remove unused or duplicate icons files and rename files. Tweak some icons. 2012-02-13 15:27:34 +01:00
jean-pierre charras 197ace9e44 Modedit: add dialog to edit footprint body items. Fix also minor issues about footprint body items edition. 2012-02-12 20:39:37 +01:00
Fabio Varesano 1393e5c38e there was a 0 more in the scale factor for
the millimeters. The attacched patch fixes this and also the comments 
on the generated file to have "Unit = mm" instead of Inches.
2012-02-11 12:54:36 -06:00
jean-pierre charras d7da6083e4 CvPcb: serious code cleaning. More comments. Remove useless files and some files renamed with a better name. 2012-02-11 10:04:26 +01:00
Dick Hollenbeck 2082fbba4f fix some warnings in Debug mode under wx 2.9.x 2012-02-10 16:26:42 -06:00
jean-pierre charras 72605c343b Modview: fix minor issues. 2012-02-10 16:31:11 +01:00
jean-pierre charras 623ae37f22 Pcbnew - ModView: add 3D view, and fix issues. 2012-02-10 09:49:43 +01:00
jean-pierre charras fa470d5c4a Pcbnew: Added: modview. This footprint viewer frame which has the same purpose as Viewlib in Eeschema.
this viewer is built using the new  FOOTPRINT_VIEWER_FRAME class.
2012-02-09 21:33:38 +01:00
Dick Hollenbeck 54e221cfad fix portion of bug 928330 mentioned in comment #2 2012-02-09 09:00:37 -06:00
Dick Hollenbeck b90d657cb8 fix bug 921553 2012-02-08 09:06:06 -06:00
Dick Hollenbeck 822e5db5dc fix 2012-02-07 11:36:24 -06:00
Dick Hollenbeck be57e57ee4 typos 2012-02-06 09:31:36 -06:00
jean-pierre charras 3da1b75c67 Pcbnew: fix Bug #927293. fix compil issue with wxWidgets 2.9.3 2012-02-06 10:10:32 +01:00
Dick Hollenbeck 398607a658 * move globals into BOARD:
bool g_Zone_45_Only, is now in BOARD::m_zoneSettings.m_Zone_45_Only
    ZONE_SETTINGS g_Zone_Default_Setting is now in BOARD::m_zoneSettings
  * Changed classs ZONE_SETTING to class ZONE_SETTINGS.
  * Changed ZONE_SETTINGS::Import() to operator << ( ZONE_CONTAINER )
  * Added BOARD::{Get,Set}ZoneSettings().
  * Added PCB_BASE_FRAME::{Get,Set}ZoneSettings().
  * Save/load BOARD::m_zoneSettings.m_Zone_45_Only to/from BOARD file.
  * Removed PCB_EDIT_FRAME::InstallDialogNonCopperZonesEditor() in favor of
    ::InvokeNonCopperZonesEditor() declared in zones.h
  * Added ::InvokeCopperZonesEditor() declared in zones.h
  * Removed dialog_copper_zones.h since DIALOG class is now declared in *.cpp.
  * Renamed to enum ZONE_EDIT_T in zones.h
  * SetVisibleAlls() is not called as it was in two previous cases for several
    reasons.  BOARD_DESIGN_SETTINGS constructor controls what is visible initially.
    and in the near future so will the *.brd file.  I believe the user should
    have visibility setting rentention accross editing sessions of zones,
    fields, etc.
  * BOARD_DESIGN_SETTINGS constructor initializes hidden text as not visible.
  * Added PCB_EDIT_FRAME::SyncRenderStates() and PCB_LAYER_WIDGET::syncRenderStates()
    so the checkboxes can be set after loading a BOARD file containing previous
    visibility settings.
2012-02-06 01:16:47 -06:00
Dick Hollenbeck e7b3ed2e88 merge 2012-02-06 01:14:51 -06:00
Dick Hollenbeck 6c04e60587 see CHANGELOG.txt 2012-02-05 23:44:19 -06:00
jean-pierre charras 08ef741770 Undo redo change and code cleanup. 2012-02-05 14:02:46 +01:00
jean-pierre charras 8e846082bb Pcbnew: Fix incorrect behavior of undo/redo command (this issue happens only when a new track is created, and an old redundant track is deleted)
Minor code cleaning
2012-02-04 21:30:00 +01:00
Dick Hollenbeck 716d21d88a get rid of some globals, share BOARD_DESIGN_SETTINGS from PCB_EDIT_FRAME with FOOTPRINT_EDIT_FRAME 2012-02-02 11:45:37 -06:00
Dick Hollenbeck cc46daa67f CHANGELOG.txt 2012-02-02 01:33:53 -06:00
Dick Hollenbeck 7b658917ab Remove:
-wxSize         g_ModuleTextSize;      /* Default footprint texts size */
  -int            g_ModuleSegmentWidth;
  -int            g_ModuleTextWidth;

and add similarly named variables to BOARD_DESIGN_SETTINGS, which are 
in a BOARD.
2012-02-02 01:25:21 -06:00
Dick Hollenbeck 1ca894584c put module text configuration variables into the BOARD 2012-02-02 01:23:00 -06:00
jean-pierre charras 2b3b2fc0cf commint forgotten file 2012-02-01 21:17:43 +01:00
jean-pierre charras f9e2f9dc77 Pcbnew and Cvpcb: more about new netlist support: see CHANGELOG (important changes).
Also commit updated icnos from Fabrizio.
2012-02-01 20:49:37 +01:00
Andrey Fedorushkov 9eb7cba156 revert my bug commit 3389 2012-02-01 15:53:32 +04:00
Andrey Fedorushkov c5f104a548 fix bug plot arc to dxf-format in back_silkscreen, comment and draw layers 2012-02-01 15:42:18 +04:00
Andrey Fedorushkov 0c00c88f11 fix DXF plot arc 2012-02-01 13:36:43 +04:00
Dick Hollenbeck f6f52d87e4 document KICAD_T enum better, remove PCB_ZONE_EDGE_T usages 2012-01-30 15:21:40 -06:00
Dick Hollenbeck 98b5cddab0 support new zone field ZPriority in kicad_plugin.cpp, enhance TESTLINE() so it does not match substrings 2012-01-30 09:53:28 -06:00
jean-pierre charras 60fb3fb7f7 Pcbnew: added a priority level for zones: a zone with a hight priority can be now inside an other low priority zone.
useful for complex zones.
fix in footprint copy.
minor enhancement in netlist/ Footprints Test.
2012-01-30 14:43:02 +01:00
jean-pierre charras e630672397 Pcbnew: Minor fix and enhancement. 2012-01-30 14:25:46 +01:00
jean-pierre charras ee8d721c3c Add priority level to zones. 2012-01-29 20:29:19 +01:00
jean-pierre charras c0d39da548 New netlist format: Cvpcb: code cleaning. Pcbew: minor enhancements 2012-01-28 20:25:59 +01:00
jean-pierre charras 72ab517400 Restore INSTALL.txt, erroneously removed.
Pcbnew: minor code change in netlist functions.
2012-01-27 19:56:06 +01:00
Dick Hollenbeck 499fc46eb1 kicad CMakeList.txt library dependency order 2012-01-27 09:40:04 -06:00
Alain Portal fb7b03a650 Fix build issues on RedHat based systems when using shared libraries. 2012-01-26 16:45:23 -05:00
marco. 96f435202c MacOSX: Handling exec 2012-01-26 20:48:45 +01:00
jean-pierre charras 7eb1a136f1 Pcbnew: First draft to use a new netlist format ( containing the same info as the intermediate netlist, but using S expressions)
* Eeschema can generate this netlist format.
*   Pcbnew can use (automatic identification) the current format or the new format.
*   Cvpcb does not use yet the new format.
2012-01-26 10:37:36 +01:00
Dick Hollenbeck 4cbb5c5e94 tune the order of link libraries, based on estimated dependency sequence 2012-01-25 08:56:52 -06:00
marco. bc48b8507b MacOSX: Gerbview mouse fixed 2012-01-24 20:07:35 +01:00
marco. a51dab7341 MacOSX: Fix in eeschema component move 2012-01-24 18:46:32 +01:00
Gerd v. Egidy ebb85aa232 bom-in-python script does not compile 2012-01-23 09:32:08 -06:00
Dick Hollenbeck 7fd0f0cab5 add tools directory, move container_test.cpp there on standby 2012-01-23 09:25:46 -06:00
Dick Hollenbeck 94097a6b22 * Switch to C++'s true and false and away from C" TRUE and FALSE.
* Enhance class PLUGIN's comments to improve their value as instructional.
  * Switch #includes from "file.h" to <file.h>, and fiddle with search paths
    by using include_directories(BEFORE ...)
  * dialog_page_settings did not have symmetrical space on its right border.
    And it now remembers it last position and size within a program session.
  * base_screen.cpp is now compiled twice, once for {pcbnew,cvpcb} and once
    for eeschema, in preparation for "compile time" support of internal units
    rather than "runtime" support.
2012-01-22 23:17:34 -06:00
Dick Hollenbeck 23172cce23 compile base_screen.cpp separately for {pcbnew,cvpcb} and eeschema, so we can diverge internal units at compile time, not runtime 2012-01-22 22:53:21 -06:00
Dick Hollenbeck 2b394c7ccb dialog_page_settings needed right border space, retain last dialog size and position 2012-01-22 22:45:57 -06: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
Dick Hollenbeck 3b8f191cc4 enhance comments since PLUGIN needs good documentation for others 2012-01-22 11:21:03 -06:00
Dick Hollenbeck e6c8515873 switch to C++'s false and true from C's FALSE and TRUE 2012-01-22 11:20:22 -06:00
jean-pierre charras 4565308d63 Eeschema: fix bug #919636
Pcbnew: 2 minor enhancements
2012-01-21 16:02:49 +01:00
jean-pierre charras ec307ef62c Pcbnew: fix a serious bug: crashes when attempt to modify a zone that had lost its net (after eeschema changes for instance) 2012-01-19 19:12:30 +01:00
Lorenzo Marcantonio 30fa7158c0 This moves the 'Place Junction' button near the 'No Connection' one, to
keep all the labelling tools together in the eeschema toolbar.
2012-01-18 09:06:48 -06:00
Dick Hollenbeck 708aef8522 towards making KICAD_GOST a runtime option, hoping for unified paper size 2012-01-18 09:02:50 -06:00
fabrizio. b594b4b28c Better icons in Eeschema from Fabrizio Tappero 2012-01-17 20:23:07 +01:00
Dick Hollenbeck b142b9defe set paper orientation into wxPrintData when possible 2012-01-17 09:34:05 -06:00
Alexander Zakamaldin 5cf2d4fabb This patch is intended for poedit to do it's job better. 2012-01-17 09:02:17 -06:00
Dick Hollenbeck a7b251450f portrait setting was being overwritten in dialog_page_settings.cpp, add updatePortrait(), improve comments 2012-01-17 08:58:58 -06:00
Dick Hollenbeck 6d39b53efb try and support Electra *.ses files 2012-01-16 15:43:07 -06:00
Dick Hollenbeck 4502149368 switch to comboboxes on page size dialogs, fix PLUGIN header 2012-01-16 14:49:34 -06:00
Dick Hollenbeck 2c84a28f6b switch to combobox on page size dialogs, fix PLUGIN header 2012-01-16 14:48:32 -06:00
Dick Hollenbeck 286c62d898 fix order of cvpcb link libraries, make some PAGE_INFO functions inline 2012-01-15 23:38:11 -06:00
Dick Hollenbeck b76d05f591 fix syntax error in kicad_plugin.cpp, carve out class_page_info.cpp, and add PAGE_INFO::Custom 2012-01-15 23:17:23 -06:00
Dick Hollenbeck 0025ac7d38 Add "portrait" support to the page size settings for all standard paper
sizes.  Tested with postscript output only.  Required minor file format changes
    to reflect the "portrait" setting.  common/dialogs/dialog_page_settings.cpp
    uses a checkbox but its name is "Landscape", which is inverted from portrait,
    but since it is the more common choice, I used that rather than portrait.
    The tooltip for that checkbox makes it clear.  No portrait mode is supported
    for "User" paper size.
2012-01-15 22:11:43 -06:00
Dick Hollenbeck 9147e66dce fix bug with user page size not taking effect immediately 2012-01-15 15:07:01 -06:00
Dick Hollenbeck f3132afe2a segment CHANGELOG.txt according to past years and current year 2012-01-14 20:11:35 -06:00
Dick Hollenbeck 81d6ebae24 commit CHANGELOG.txt before splitting into to years 2012-01-14 20:04:37 -06:00
Dick Hollenbeck 9431c2a60a changes 2012-01-14 19:31:39 -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
jean-pierre charras 742486dce6 Eeschema: Fix erroneous message [Read Only] after creating a new project, and obviously the corresponding schematic file does not yet exist (replaced by [no file]) 2012-01-14 12:52:46 +01:00
jean-pierre charras 3383d6c8a5 Code cleaning and better comments.
Gebview: fix issue in export to pcbnew (Track arc shapes are now exported, approximated by segments)
2012-01-13 19:35:46 +01:00
Dick Hollenbeck 5a9fcf6f11 fix windows version of GetRunningMicroSecs() 2012-01-13 11:11:34 -06:00
Dick Hollenbeck 3421863c01 add GetRunningMicroSecs() to libcommon for debug timing 2012-01-13 03:46:02 -06:00
marco. f40a92561c MacOSX: Grid now is displayed correctly 2012-01-10 23:27:31 +01:00
marco. 6b097a57bf MacOSX: Drag Modules and Tracks now works correctly 2012-01-10 22:55:07 +01:00
jean-pierre charras 1c98200721 Pcbnew: fix issue when KICAD_NANOMETER is defined: when zones use htcth to show zones areas, hatch lines were incorrectly calculated (hunded of thousand lines created)
Eeschema: fix issue in search: search not made in reference strings.
Minor fixes, code cleaning and comment enhancements.
2012-01-10 21:12:46 +01:00
marco. 54c20b57f2 MacOSX: Main issue catch! wxPen with size 0 draws NOTHING (8 months to spot it) 2012-01-10 20:52:48 +01:00
marco. 0404ddae29 MacOSX: compile error fix after r3329 2012-01-10 18:54:40 +01:00
Wayne Stambaugh 409d6e8ea2 Eeschema schematic object improvements.
* Remove unnecessary copy constructors from schematic and component
  library objects.
* Add comment to class definitions where the default copy constructor
  generated by the compiler was adequate.
* Add assignment operator to EDA_ITEM, SCH_ITEM, and all schematic
  objects where the default assignment operator generated by the
  compiler would not be adequate.
2012-01-09 15:26:55 -05:00
Andrey Fedorushkov d000d48653 fix build when defined KICAD_GOST 2012-01-09 23:13:20 +04:00
Dick Hollenbeck 78d921e731 ++all
* Carve out TITLE_BLOCK from BASE_SCREEN
  * Add include/hashtables.h and put class PROPERTIES in there.
    Change PROPERTIES to use "const char*" as the key instead of wxString.
++eeschema
  * Add shim class SCH_BASE_FRAME which introduces the data model SCH_SCREEN
    to the frame EESCHEMA frame class hierarchy and allows sharing of:
    SCH_SCREEN* GetScreen() const;                              // overload EDA_DRAW_FRAME
    void SetPageSettings( const PAGE_INFO& aPageSettings );     // overload EDA_DRAW_FRAME
    const PAGE_INFO& GetPageSettings () const;                  // overload EDA_DRAW_FRAME
    const wxSize GetPageSizeIU() const;                         // overload EDA_DRAW_FRAME
    const wxPoint& GetOriginAxisPosition() const;               // overload EDA_DRAW_FRAME
    void SetOriginAxisPosition( const wxPoint& aPosition );     // overload EDA_DRAW_FRAME
    const TITLE_BLOCK& GetTitleBlock() const;                   // overload EDA_DRAW_FRAME
    void SetTitleBlock( const TITLE_BLOCK& aTitleBlock );       // overload EDA_DRAW_FRAME
2012-01-09 11:32:27 -06:00
Dick Hollenbeck 67e28ade74 ++eeschema
Add shim class SCH_BASE_FRAME which introduces the data model SCH_SCREEN
    to the frame class hierarchy.
2012-01-09 11:24:01 -06:00
Dick Hollenbeck f694035366 CHANGELOG.txt 2012-01-09 02:37:16 -06:00
Dick Hollenbeck 0cad6e7913 carve out TITLE_BLOCK class from BASE_SCREEN, add hashtables.h for PROPERTIES 2012-01-09 02:35:06 -06:00
Александр Закамалдин 6d3fd3a01d Patch drifted with time, and a patch hunk was erroneously applied by the patch program,
rather than being rejected.
2012-01-07 15:49:24 -06:00
Александр Закамалдин 2caa72f063 This patch implements width tuning (width correction) for PS plotting of tracks, pads and vias.
This feature is very useful for electronics hobbyists who use DIY PCB technology 
(both toner transfer and photoresist methods).
Also width correction may be useful for PCB designers who take care of track width etching.
This patch also fixes some minor PS plotting issues.
2012-01-07 00:02:38 -06:00
jean-pierre charras c3c6b9ef6c Pcbnew: Now, archive modules function archives footprints with default orientation (0 degrees) and default side (Front layer) 2012-01-06 21:32:19 +01:00
jean-pierre charras 9cc4f5d0a6 Eeschema: add compil option in sch_field.cpp to go back to old behavior for field texts justifications (this option is not activated)
Note: only vertical texts have a modified behavior.
Minor other changes.
2012-01-06 20:00:59 +01:00
Dick Hollenbeck 148aecf963 improved comments 2012-01-05 12:16:21 -06:00
Dick Hollenbeck 00052a60c9 add container_test 2012-01-05 11:29:17 -06:00
Dick Hollenbeck 9d080b0868 Ki_PageDescr was re-written as a proper C++ class and renamed to PAGE_INFO.
It describes paper.  The m_Offset field was dropped since it was only used
    in HPGL plotting within EESCHEMA.  PAGE_INFO instance was moved out of
    BASE_SCREEN (which is on its way out) into both SCH_SCREEN and BOARD.


----------- This line and the following will be ignored --------------

modified:
  CMakeLists.txt
  common/CMakeLists.txt
  common/base_screen.cpp
  common/basicframe.cpp
  common/class_plotter.cpp
  common/common.cpp
  common/common_plotHPGL_functions.cpp
  common/common_plotPS_functions.cpp
  common/common_plot_functions.cpp
  common/dialogs/dialog_page_settings.cpp
  common/dialogs/dialog_page_settings.h
  common/dialogs/dialog_page_settings_base.cpp
  common/dialogs/dialog_page_settings_base.fbp
  common/dialogs/dialog_page_settings_base.h
  common/drawframe.cpp
  common/drawpanel.cpp
  common/pcbcommon.cpp
  common/projet_config.cpp
  common/worksheet.cpp
  cvpcb/class_DisplayFootprintsFrame.cpp
  cvpcb/class_footprints_listbox.cpp
  cvpcb/cvframe.cpp
  eeschema/dialogs/dialog_SVG_print.cpp
  eeschema/dialogs/dialog_SVG_print.h
  eeschema/dialogs/dialog_build_BOM.cpp
  eeschema/dialogs/dialog_plot_schematic_DXF.cpp
  eeschema/dialogs/dialog_plot_schematic_HPGL.cpp
  eeschema/dialogs/dialog_plot_schematic_PS.cpp
  eeschema/dialogs/dialog_print_using_printer.cpp
  eeschema/eeschema_config.cpp
  eeschema/files-io.cpp
  eeschema/libedit_plot_component.cpp
  eeschema/libeditframe.cpp
  eeschema/libeditframe.h
  eeschema/load_one_schematic_file.cpp
  eeschema/sch_screen.cpp
  eeschema/sch_sheet.h
  eeschema/schframe.cpp
  eeschema/viewlib_frame.cpp
  eeschema/viewlib_frame.h
  gerbview/dialogs/dialog_show_page_borders.cpp
  gerbview/dialogs/gerbview_dialog_display_options_frame.cpp
  gerbview/events_called_functions.cpp
  gerbview/gerbview.cpp
  gerbview/gerbview.h
  gerbview/gerbview_config.cpp
  gerbview/gerbview_frame.cpp
  gerbview/initpcb.cpp
  include/appl_wxstruct.h
  include/class_base_screen.h
  include/class_colors_design_settings.h
  include/class_pcb_screen.h
  include/class_sch_screen.h
  include/common.h
  include/pcbstruct.h
  include/plot_common.h
  include/wxBasePcbFrame.h
  include/wxEeschemaStruct.h
  include/wxstruct.h
  pcbnew/basepcbframe.cpp
  pcbnew/class_board.h
  pcbnew/class_pad.cpp
  pcbnew/class_pad.h
  pcbnew/class_track.h
  pcbnew/classpcb.cpp
  pcbnew/dialogs/dialog_SVG_print.cpp
  pcbnew/dialogs/dialog_gendrill.h
  pcbnew/dialogs/dialog_pad_properties.cpp
  pcbnew/export_gencad.cpp
  pcbnew/gen_drill_report_files.cpp
  pcbnew/gen_modules_placefile.cpp
  pcbnew/gendrill.cpp
  pcbnew/gendrill.h
  pcbnew/graphpcb.cpp
  pcbnew/initpcb.cpp
  pcbnew/io_mgr.h
  pcbnew/ioascii.cpp
  pcbnew/item_io.cpp
  pcbnew/kicad_plugin.cpp
  pcbnew/loadcmp.cpp
  pcbnew/minimun_spanning_tree.h
  pcbnew/moduleframe.cpp
  pcbnew/onleftclick.cpp
  pcbnew/pcbframe.cpp
  pcbnew/pcbnew_config.cpp
  pcbnew/pcbplot.h
  pcbnew/plotdxf.cpp
  pcbnew/plotgerb.cpp
  pcbnew/plothpgl.cpp
  pcbnew/plotps.cpp
  pcbnew/print_board_functions.cpp
  pcbnew/printout_controler.cpp
  pcbnew/printout_controler.h
  pcbnew/solve.cpp
  pcbnew/xchgmod.cpp
unknown:
  3239.patch
  3268.patch
  build/
  container_test.cpp
  debug/
  dick
  release/
  new/build/
  new/doxygen.sty
  pcbnew/basepcbframe.cpp.orig
  pcbnew/plotps.cpp.orig
pending merges:
  Dick Hollenbeck 2012-01-05 fix unreleased bug pertaining to "Sheet" line in a *.brd file
    Dick Hollenbeck 2012-01-05 [merge] merge in mainline into KICAD_PLUGIN work, which is for the PCBNEW nanometer support
    Dick Hollenbeck 2012-01-05 cannot use plugin until done
    Dick Hollenbeck 2012-01-05 finish up SCH_SHEET::{Set,Get}PageSettings() switch over
    Dick Hollenbeck 2012-01-04 remove page size globals from eeschema
    Dick Hollenbeck 2011-12-30 moving objects into BOARD which are saved in a *.brd file, for PLUGIN access
    Dick Hollenbeck 2011-12-22 [merge] merge in testing
    Dick Hollenbeck 2011-12-22 rename Ki_PageDescr to PAGE_INFO, encapsulate it in accessors, and move it into the BOARD
2012-01-05 10:40:36 -06:00
Dick Hollenbeck dac20005db fix unreleased bug pertaining to "Sheet" line in a *.brd file 2012-01-05 10:37:51 -06:00
Dick Hollenbeck dd091fc6b9 merge in mainline into KICAD_PLUGIN work, which is for the PCBNEW nanometer support 2012-01-05 10:30:58 -06:00
Dick Hollenbeck 90bb27ca66 cannot use plugin until done 2012-01-05 09:36:45 -06:00
Dick Hollenbeck 1393eb0f11 finish up SCH_SHEET::{Set,Get}PageSettings() switch over 2012-01-05 02:07:11 -06:00
Wayne Stambaugh 152b8d91e3 Eeschema schematic object improvements.
* Move SCH_ITEM::Place() code into SCH_EDIT_FRAME so schematic item
  objects no longer have any knowledge of the schematic frame window
  or undo/redo containers.
2012-01-04 17:08:46 -05:00
jean-pierre charras 5a96588eec Fix bug 910364: When a footprint saved in a .mod file is not on front layer and/or not with orientation 0 degree, the Module editor load it incorrectly.
note:  the Module editor save it with default orientation and layer, but the archive function does not, so some footprints can be not editable.
TODO: modify the Archive Function to use the default layer / orientation.
2012-01-04 20:10:33 +01:00
Dick Hollenbeck d3afe95ca8 remove page size globals from eeschema 2012-01-04 00:18:38 -06:00
Wayne Stambaugh b774d96fb0 Minor coding policy and code readability improvements. 2012-01-03 12:14:17 -05:00
Wayne Stambaugh 0ba26e1d8f Remove unused EDA_ITEM list from BASE_SCREEN. 2012-01-02 15:45:46 -05:00
Dick Hollenbeck 697f912307 moving objects into BOARD which are saved in a *.brd file, for PLUGIN access 2011-12-30 23:44:00 -06:00
jean-pierre charras 3f15b9c057 Eeschema: Fix issue in Search/ReplaceAll
Pcbnew: fix a very minor issue.
2011-12-30 20:04:40 +01:00
jean-pierre charras e420623fde Commit forgotten file 2011-12-30 13:44:02 +01:00
jean-pierre charras 5916688f35 Pcbnew: Fix error message in Module Editor after a global pad change.
Minor other enhancements and code cleaning.
2011-12-30 13:29:54 +01:00
Wayne Stambaugh 8985a1807b Encapsulation and other minor improvements.
* EDA_DRAW_PANEL completely encapsulated.
* Moved OSX m_overlay member from EDA_DRAW_PANEL to EDA_DRAW_FRAME where
  it is used.
* Doxygen comment warning fixes.
2011-12-29 15:11:42 -05:00
jean-pierre charras b7db108cd7 Pcbnew: fix potential bug in connections calculations (see Bug #909298 ). 2011-12-28 16:14:46 +01:00
Wayne Stambaugh 1cb1e88ef4 Fix wxWidgets 2.8 build error. 2011-12-28 09:15:00 -05:00
jean-pierre charras 375310f2ab 3D view: Fix Bug #908871
Eeschema: fix a minor issue.
2011-12-27 19:08:50 +01:00
jean-pierre charras 750dd6eeac Eeschema: fix bug that creates duplicate segments instead of breaking them at junctions points.
Duplicate segments where created in drag command and netlist calculations.
2011-12-23 09:16:36 +01:00
Dick Hollenbeck 929d5c7a3f merge in testing 2011-12-22 16:12:21 -06:00
Dick Hollenbeck 0d4598656b rename Ki_PageDescr to PAGE_INFO, encapsulate it in accessors, and move it into the BOARD 2011-12-22 15:57:50 -06:00
Guillaume Simard 1983b2db05 While working on the layer changing patch, I found that changing track
size while routing (W, Ctrl+W) didn't update the track in the display
window (you had to move the mouse to get a refresh).
2011-12-22 09:41:16 -06:00
Wayne Stambaugh c2e5fcaec8 More encapsulation improvements.
* EDA_DRAW_FRAME completely encapsulated.
* Encapsulate the the low hanging fruit in EDA_DRAW_PANEL.
2011-12-22 08:28:11 -05:00
jean-pierre charras 2df818b844 Fix issue in GPcb footprints import.
Better code in test connections in zones.
Very minor other fixes
2011-12-22 09:07:50 +01:00
Wayne Stambaugh 85d2f2f1d5 Eeschema find and replace improvements.
* Add check box and flag to ignore replacing the component reference
  designator field.
* Fix a resizing bug when switching between the find and replace modes of
  the find/replace dialog.
* Fix replace component reference designator field bug.
* Force rebuild of search list when schematic is modified and the replace
  dialog is closed.
* Prevent finding the next item when the find/replace dialog is closed.
* Respect warp mouse pointer setting when closing find/replace dialog.
* Fix duplicate mnemonic control accelerator keys in find/replace dialog.
2011-12-21 15:21:15 -05:00
Wayne Stambaugh 6c28cdc62c More encapsulation work and other minor improvements.
* EDA_RECT and EDA_ITEM completely encapsulated.
* Removed unnecessary EDA_ITEM member m_Selected and replaced functionality
  with SELECTED flag bit.
2011-12-21 08:42:02 -05:00
Wayne Stambaugh 98fa228302 Removed -static-libgcc linker flag that caused Pcbnew to crash on Windows when raising an exception in release builds using MinGW GCC 4.6.1 2011-12-21 08:19:14 -05:00
Wayne Stambaugh 81d3487244 Fix debug assertion on wxWidgets 2.9.3. 2011-12-20 10:23:47 -05:00
jean-pierre charras d41b81fc3b Pcbnew: Enhanced algorithm to calculate board connections:
* A track is seen connected to a pad if the track end is inside the pad shape.
* Pads inside pads are now seen connected, if the center of the pad is *inside* the other pad.
* this is made to be sure a large copper area is shared by the 2 pads,  and to keep algorithm fast.
2011-12-19 12:58:24 +01:00
jean-pierre charras ccb910eb62 Cvpcb: fix incorrect behavior when clicking on a component 2011-12-18 21:22:16 +01:00
jean-pierre charras e50d18bc1b Minor enhancement and minor code cleaning. 2011-12-18 18:57:05 +01:00
jean-pierre charras 018ffe7eac fix bug: EDA_ITEM::m_forceVisible not initialized in constructor. 2011-12-18 16:26:09 +01:00
jean-pierre charras a180518f4b Some demo files updated. 2011-12-18 10:06:22 +01:00
jean-pierre charras 2c150e4817 All: fix compatibility issues with wxWidgets 2.9.3
Minor cosmetic enhancements.
Pcbnew: more workd abput connection algorithms (work in progress)
2011-12-17 22:21:03 +01:00
Wayne Stambaugh 0e27f45ffd Encapsulate EDA_APP class. 2011-12-16 15:12:49 -05:00
Alexander Zakamaldin d463580560 fix 2011-12-16 12:15:24 -06:00
Dick Hollenbeck b3a6ddb6e9 improvements, hopefully 2011-12-16 11:03:25 -06:00
Wayne Stambaugh fac288cffa More encapsulation work and other minor improvements.
* EDA_DRAW_FRAME completely encapsulated except for DrawFrame member.
* Moved members specific to Pcbnew from EDA_DRAW_FRAME to PCB_BASE_FRAME
  or PCB_EDIT_FRAME as appropriate.
* Replace EDA_TOOLBAR with wxAuiToolBar as EDA_TOOL bar provided no
  additional functionality and made code less readable.
* Remove EDA_TOOLBAR class definition from wxstruct.h and delete file
  wineda_toolbar.cpp.
* Rename tool bar members to something more descriptive since the
  horizontal and vertical references wont mean anything once the
  tool bars are movable.
* Lots of dead code removal.
2011-12-16 08:32:23 -05:00
Dick Hollenbeck c9269232cf fix bugs in kicad_plugin.cpp.
KICAD_PLUGIN::Load() is solid now, except for missing globals, which
still need to get moved into the class BOARD.

Same for KICAD_PLUGIN::Save(), only missing globals, which once they
are in the BOARD class, will be added.
2011-12-15 20:39:59 -06:00
Dick Hollenbeck bbc626b750 plugin testing has started 2011-12-15 10:48:36 -06:00
Dick Hollenbeck a9e2399669 legacy pcbnew plugin touch ups 2011-12-14 20:24:52 -06:00
Guillaume Simard cc70c1a463 fix 2011-12-14 16:35:03 -06:00
Guillaume Simard 6767a0b2a3 Make CvPcb correctly preview the selected component footprint if one has already been assigned. 2011-12-14 15:23:32 -05:00
Wayne Stambaugh 95891006cd More EDA_DRAW_FRAME encapsulation work. 2011-12-14 15:03:15 -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
jean-pierre charras 02bb2111e2 Pcbnew: fix issue when creating new tracks: sometimes a ratsnest remains active although a track exists. 2011-12-14 12:31:49 +01:00
Dick Hollenbeck d5a1736346 minor 2011-12-14 01:03:55 -06:00
Dick Hollenbeck 74ccc4b558 ++common
* changed all the RotatePoint() functions in trigo.{h,cpp} to take a double as the
    angle, which is still in tenths of degrees for now.
  * EDA_TEXT::m_Orient is now double, still in tenths of degrees (for a short while),
    but the double means parsing files and saving them use a different format string.
++pcbnew
  * DRAWSEGMENT::GetStart() and GetEnd() do not operate for S_ARC like they used to.
    They are now simply accessors for m_Start and m_End.  Use DRAWSEGMENT::GetArcStart()
    and GetArcEnd() and GetCenter() for arcs.  specctra_export.cpp was the only
    source file dependent on the old behavior.
  * DIMENSION::m_Text is now contained, not dynamically allocated.
  * more kicad_plugin work.
2011-12-13 22:43:51 -06:00
Dick Hollenbeck 96bb90dee1 kicad_plugin 2011-12-13 22:29:25 -06:00
Guillaume Simard bced8c9774 Add undo/redo support for Pcbnew auto place, auto move, and auto route features. 2011-12-13 15:42:42 -05:00
jean-pierre charras b2c11207e4 pcbnew/class_track.h: remove duplicate class members. 2011-12-13 21:28:25 +01:00
Wayne Stambaugh a63a2006f0 Add Eeschema replace code.
* Enable replace toolbar button and menu entry.
* Improve find replace logging granularity.
* Fix find and replace dialog control hiding and disabling.
* Minor improvements to the SCH_FIND_REPLACE_DATA object.
* Move find collector list iterator into the collector object.
* Add visibility override flag to EDA_ITEM to temporarily show items that
  are hidden during find and replace.
2011-12-13 10:37:33 -05:00
Wayne Stambaugh 5465966c7b Fix infinite recursion bug in SCH_COMPONENT::SetTimeStamp(). 2011-12-12 15:59:43 -05:00
Wayne Stambaugh d9af562f8f Fix a minor bug in my last commit that caused the debug build to fail. 2011-12-12 10:16:05 -05:00
Wayne Stambaugh 768ec258f7 Encapsulate LABEL_OBJECT class and message panel window member of EDA_DRAW_FRAME. 2011-12-12 09:02:37 -05:00
Dick Hollenbeck 0498f2657c kicad_plugin work, and accessors along with making some fields protected or private 2011-12-12 02:39:41 -06:00
Dick Hollenbeck b979d1e0b9 plugin work, accessors 2011-12-12 02:37:05 -06:00
Dick Hollenbeck dc982a2824 ++PCBNew
* added BOARD::GetPad(int), made BOARD::m_NetInfo private, and contained
    within the BOARD, not dynamically allocated and owned via pointer.
  * added BOARD::GetPadCount()
  * changed NETINFO_LIST::GetCount() to GetNetCount()
  * added BOARD::GetNetCount()
  * more kicad_plugin work.
2011-12-09 23:47:13 -06:00
Dick Hollenbeck 4c2a1dd5d1 more kicad_plugin work, make BOARD::m_NetInfo private 2011-12-09 23:33:24 -06:00
jean-pierre charras 2600bb31c0 Pcbnew: GPcb footprint import: fix incorrect pad size. 2011-12-09 18:43:34 +01:00
Wayne Stambaugh 9461f16281 Encapsulate SCH_EDIT_FRAME and LIB_EDIT_FRAME classes. 2011-12-09 11:37:11 -05:00
jean-pierre charras 4cb29f6104 Pcbnew: GPcb module import: fix incorrect position and size of texts. 2011-12-09 17:17:38 +01:00
jean-pierre charras a67ff643f3 Pcbnew: fix bad initialization of default track width and vias sizes when starting pcbnew with no board loaded. 2011-12-09 11:36:00 +01:00
Wayne Stambaugh d8ad2cceb0 Encapsulate LIB_PIN class and begin encapsulating SCH_EDIT_FRAME class. 2011-12-08 16:05:43 -05:00
jean-pierre charras 37c3e32119 Pcbnew: bug fix: some Global Design Rules not copied to the board after change. 2011-12-08 20:55:10 +01:00
jean-pierre charras ac74985685 All: fix hotkey issue with wxWidgets-2.9.3 (Window only): hotkey events called twice.
* Fix compil issue about automatically created pcb_plot_params.h :
     pcb_plot_params.* moved from pcbnew to common because item_io.cpp (using this file) is compiled in common.
2011-12-08 19:23:44 +01:00
Wayne Stambaugh 1047e60e35 Encapsulate SCH_POLYLINE, SCH_SHEET, and SCH_TEXT classes. 2011-12-08 10:45:01 -05:00
Marco Mattila eb52f4ba63 Fix thermal relief gap calculation for circular pads in pcbnew. 2011-12-08 01:58:43 +02:00
marco. a089ae7ac3 OSX: PCB Calculator correction 2011-12-07 22:06:02 +01:00
Wayne Stambaugh 9dce6fba09 Encapsulate SCH_JUNCTION, SCH_LINE, and SCH_NO_CONNECT classes. 2011-12-07 15:19:29 -05:00
Wayne Stambaugh 16131a500d Encapsulate SCH_FIELD class. 2011-12-07 13:47:59 -05:00
jean-pierre charras bcbde5d813 All: fix a collision name between accessor function GetTimeStamp and GetTimeStamp in common.cpp.
In common.cpp GetTimeStamp is renamed GetNewTimeStamp (a better name).
Pcbnew: prepare work to calculate connections between pads that inteserct and therefore can be connected without any track (composite pads).
2011-12-07 16:49:32 +01:00
Wayne Stambaugh c7fe98db2f Encapsulate SCH_BUS_ENTRY class. 2011-12-07 09:08:52 -05:00
Dick Hollenbeck b6dcf9b7f4 Collect all the PCBNew Save() and ReadDesc...() functions into new file item_io.cpp,
which should eventually go away in favor of kicad_plugin.cpp.
Add CMake options USE_NEW_PCBNEW_LOAD and USE_NEW_PCBNEW_SAVE, which should not be
used yet, and both default to OFF accordingly.
2011-12-06 23:39:18 -06:00
Dick Hollenbeck c4979318d2 more plugin work 2011-12-06 23:28:49 -06:00
Wayne Stambaugh 539f4e1ed7 Encapsulate DANGLING_END_ITEM class. 2011-12-06 16:02:21 -05:00
Wayne Stambaugh 68d752bb13 Zero memory to duplicate behavior changed when C malloc() was replaced by C++ new(). 2011-12-06 09:46:48 -05:00
jean-pierre charras e8c3ca2929 Pcbnew: remove global variables (g_TabOneLayerMask and g_ViaType_Name) 2011-12-06 09:35:13 +01:00
Dick Hollenbeck 241fdb4de4 fix compile of kicad_plugin.cpp with wxWidgets 2.9.x 2011-12-06 00:19:36 -06:00
Dick Hollenbeck fafd74ca6f Fix problem with BOARD bounding box in saved *.brd files,
and TEXTE_MODULE size in kicad_plugin.
Link in io_mgr and kicad_plugin but do not call them yet
2011-12-05 11:22:19 -06:00
Dick Hollenbeck 680a4407f4 fix formatting problems that came about from incompatible tabbing in Lorenzo's patch 2011-12-05 01:03:57 -06:00
Dick Hollenbeck 40ee72653e ++PCBNew
* Removed Pcb_Frame argument from BOARD() constructor, since it precludes
    having a BOARD being edited by more than one editor, it was a bad design.
    And this meant removing m_PcbFrame from BOARD.
  * removed BOARD::SetWindowFrame(), since BOARD::m_PcbFrame gone.
  * Removed the global BOARD_DESIGN_SETTINGS which was in class_board.cpp
  * Added BOARD_DESIGN_SETTINGS to the BOARD class, a full instance
  * A couple of dialogs now only change BOARD_DESIGN_SETTINGS when OK is pressed,
    such as dialog_mask_clearance, dialog_drc, etc.
  * Removed common/pcbcommon.cpp's int g_CurrentVersionPCB = 1 and replaced it
    with build_version.h's #define BOARD_FILE_VERSION, although there may be a
    better place for this constant.
  * Made the public functions in PARAM_CFG_ARRAY be type const.
    void SaveParam(..) const and void ReadParam(..) const
  * PARAM_CFG_BASE now has virtual destructor since we have various ways of
    destroying the derived classes and boost::ptr_vector must be told about this.
  * Pass const PARAM_CFG_ARRAY& instead of PARAM_CFG_ARRAY so that we can use
    an automatic PARAM_CFG_ARRAY which is on the stack.
  * PCB_EDIT_FRAME::GetProjectFileParameters() may no longer cache the array,
    since it has to access the current BOARD and the BOARD can change.
    Remember BOARD_DESIGN_SETTINGS are now in the BOARD.
  * Made the m_BoundingBox member private, this was a brutally hard task,
    and indicative of the lack of commitment to accessors and object oriented
    design on the part of KiCad developers.  We must do better.
    Added BOARD::GetBoundingBox, SetBoundingBox(), ComputeBoundingBox().
  * Added PCB_BASE_FRAME::GetBoardBoundingBox() which calls BOARD::ComputeBoundingBox()
2011-12-05 00:28:17 -06:00
Dick Hollenbeck b26580d5df ++PCBNew
* Removed Pcb_Frame argument from BOARD() constructor, since it precludes
    having a BOARD being edited by more than one editor, it was a bad design.
    And this meant removing m_PcbFrame from BOARD.
  * removed BOARD::SetWindowFrame(), and BOARD::m_PcbFrame
  * Removed the global BOARD_DESIGN_SETTINGS which was in class_board.cpp
  * added BOARD_DESIGN_SETTINGS to the BOARD class, a full instance
  * a couple dialogs now only change BOARD_DESIGN_SETTINGS when OK is pressed,
    such as dialog_mask_clearance, dialog_drc, etc.
  * Removed common/pcbcommon.cpp's int g_CurrentVersionPCB = 1 and replaced it
    with build_version.h's #define BOARD_FILE_VERSION, although there may be a
    better place for this constant.
  * Made the public functions in PARAM_CFG_ARRAY be type const.
    void SaveParam(..) const and void ReadParam(..) const
  * PARAM_CFG_BASE now has virtual destructor since we have various way of
    destroying the derived class and boost::ptr_vector must be told about this.
  * Pass const PARAM_CFG_ARRAY& instead of PARAM_CFG_ARRAY so that we can use
    an automatic PARAM_CFG_ARRAY which is on the stack.\
  * PCB_EDIT_FRAME::GetProjectFileParameters() may no longer cache the array,
    since it has to access the current BOARD and the BOARD can change.
    Remember BOARD_DESIGN_SETTINGS are now in the BOARD.
  * Made the m_BoundingBox member private, this was a brutally hard task,
    and indicative of the lack of commitment to accessors and object oriented
    design on the part of KiCad developers.  We must do better.
    Added BOARD::GetBoundingBox, SetBoundingBox(), ComputeBoundingBox().
  * Added PCB_BASE_FRAME::GetBoardBoundingBox() which calls BOARD::ComputeBoundingBox()
2011-12-05 00:15:33 -06:00
jean-pierre charras f311bb4d59 Pcbnew:
Enhanced algorithms to calculate board connections:
    Previously, a track was seen connected to a pad only if the track end is
    exactly on the pad position.
    Now a track is seen connected to a pad if the track end is inside the pad shape.
    Algorithm to calculate pads connections to track is still very fast.
    However some other functions (drag pads, track len calculation ...)
    still need the track end exactly on the pad position.
Dead code removal.
2011-12-04 18:57:03 +01:00
jean-pierre charras 2ae221d97f Pcbnew: fix Bug #899373 2011-12-03 15:04:17 +01:00
Dick Hollenbeck a37fdd9751 First working version of KICAD_PLUGIN::Load(), short of some globals and minor conflicts 2011-12-02 15:58:27 -06:00
Dick Hollenbeck 343e55b09a First working copy of KICAD_PLUGIN::Load() 2011-12-02 15:56:47 -06:00
Dick Hollenbeck 0fb4954f19 fix comments, add IO_MGR::Save() 2011-12-02 10:57:44 -06:00
Dick Hollenbeck 086c8decb0 fix warnings and comment 2011-12-02 10:55:31 -06:00
Dick Hollenbeck 0bdef38585 Improved PLUGIN documentation in io_mgr.h 2011-12-02 10:28:00 -06:00
Lorenzo Marcantonio 6418163d3c Update to the GENCAD import export 2011-12-02 09:09:57 -06:00
Dick Hollenbeck 05faa36962 KICAD_PLUG intermediate work, for eventual nanometer boards 2011-12-01 16:54:58 -06:00
Dick Hollenbeck 1b5edd6d4c KICAD_PLUG work 2011-12-01 16:50:41 -06:00
Wayne Stambaugh d9e0ab0241 Improve Eeschema find code and add initial replace plumbing.
* Replace Eeschema find code with a collector based implementation.
* Fixed a search bug when all subsequent searches of an item would ignore
  the remaining valid child items when an item had more than one child
  item that matched the search criteria.
* Add SCH_FIND_COLLECTOR class to find all items that meet the specified
  search criteria.
* Add SCH_FIND_COLLECT0R_DATA to keep track of information for all matching
  items.
* Use collector to iterate over the list of items that match the search
  criteria rather than trying to start at the last matched item.
* Remove unused searching methods from sheet path and sheet path list
  objects.
* Add replace and replace all functionality to Eeschema find dialog.
* Push matching methods down to EDA_ITEM class so they can be used by
  other derived objects.
* Add method to EDA_ITEM to test if item supports replacing.
* Add flag to find/replace data to support replace feature.
* Disable wild card matching check box when dialog is in replace mode as
  wild card replacement is not supported at this time.
* The usual Doxygen comment and coding policy fixes.
2011-12-01 11:49:28 -05:00
Dick Hollenbeck 6c2fcf7e78 KICAD_PLUGIN alternate nanometer board loader work 2011-12-01 00:06:08 -06:00
Dick Hollenbeck 3bb91baf11 KICAD_PLUGIN alternate nanometer board loader work 2011-12-01 00:04:23 -06:00
Marco Mattila 1ab12c2be4 Don't subtract soldermask from other than silkscreen layers when plotting gerbers from pcbnew. 2011-12-01 00:06:27 +02:00
Dick Hollenbeck b6508af0f4 KICAD_PLUGIN and nanometer intermediate checkin, work in progress... 2011-11-30 15:15:56 -06:00
jean-pierre charras 3a887850ee Pcbnew: Fix bug Bug #898178 2011-11-30 21:05:17 +01:00
jean-pierre charras 31bcc6eed9 Add Bulgarian language. Update translators list.
Pcbnew: prepare work on new algos for connections calculations.
2011-11-30 12:45:49 +01:00
Dick Hollenbeck 7a93d0b21c more KICAD_PLUGIN work progress 2011-11-30 01:43:46 -06:00
Dick Hollenbeck 8f79b14680 This patch restores some of the goodness in Vladimir's rev 3239, and in particular
the GetPosition() and SetPosition() changes.  It also starts towards making m_Orientation
and m_Thickness fields private with accessors, but does not complete this latter goal.
2011-11-29 11:25:30 -06:00
Dick Hollenbeck 701fa6b0a3 intermediate check in to show progress on new nanometer file loader PLUGIN 2011-11-28 21:08:14 -06:00
Dick Hollenbeck 2515a806ae initial work on PCBNew PLUGIN support, in preparation for nanometer board load and save 2011-11-27 22:32:29 -06:00
jean-pierre charras 5e3ca2e769 Pcbnew: Fix issue in Undo/Redo command: for very large boards ( > 20000 items) this command could take a long time. Now fast. 2011-11-27 13:29:01 +01:00
jean-pierre charras b707493f35 Update version number 2011-11-26 21:02:59 +01:00
Dick Hollenbeck 63399bbeea changes 2011-11-25 09:40:40 -06:00
Dick Hollenbeck dea21ba82e changes 2011-11-25 09:15:46 -06:00
Dick Hollenbeck 2fd8613777 add board internal units plan, first incomplete draft. 2011-11-25 02:03:55 -06:00
jean-pierre charras 778832a665 Fix a minor issue in my last commit 2011-11-24 22:07:03 +01:00
jean-pierre charras 683921f98d Eeschema: fix crash in intermediate netlist generation when a component has no pins (like logos or images).
Pcbnew: texts in dimensions can be now moved.
Gerbview: fix incorrect number of layers  in export to pcbnew function.
2011-11-24 20:57:41 +01:00
Dick Hollenbeck cc097762c7 Temporarily reverse out the evolving support for finer Board Internal Units (BIU)s. 2011-11-24 11:32:51 -06:00
Vladimir Uryvaev d4bfa450e0 Debug bug:) fix. Wayne found it. 2011-11-18 03:16:36 +04:00
Wayne Stambaugh 1ef58372a9 Added new find replace image to bitmap header file. 2011-11-17 13:39:18 -05:00
Vladimir Ur 2a69ffb406 Nanometric work
- D_PAD members converted;
- style improved;
- GetPosition made returning value, added SetPosition;
- highly experimental, test it please!
2011-11-17 21:47:27 +04:00
Fabrizio Tappero 69f8b30b25 Change find image, add new find replace image, and remove unused image cpp files. 2011-11-17 11:32:01 -05:00
Wayne Stambaugh 35749e57c4 Fix Eeschema find item bugs and other minor changes.
* Fix bug in hierarchical searches using sheet path pointers which are
  destroyed on every search.  Use human readable path as last sheet found
  in test to prevent comparison of deleted pointers.
* Fix a bug in SCH_COMPONENT::Matches() that would prevent searching for
  pins if the search all fields flags was not set.
* Fix a bug in SCH_COMPONENT::Matches() to use the sheet path to perform
  the comparison to the correct reference designator and unit number.
* Fix wrapping in sheet path and sheet path list MatchNextItem methods.
* Push search methods down to EDA_ITEM object so advanced searching can
  be performed on all items derived from EDA_ITEM.
* Add virtual method to EDA_ITEM object to test if item supports replacing
  text.
* Replace switch statement magic numbers in Eeschema socket connection code
  with Pcbnew for improved readability.
2011-11-16 20:06:08 -05:00
Dick Hollenbeck 169576703d fix compiler warning 2011-11-16 14:52:51 -06:00
Vladimir Ur 959e338698 D_PAD conversion: m_Pos converted
PCB_ITEM: GetPosition -- removed reference
load/save length in config
2011-11-16 21:04:12 +04:00
jean-pierre charras 38553be4de Pcbnew: fix a possible crash after a board cleanup 2011-11-15 20:21:16 +01:00
Vladimir Ur 09a61396ba Some code restyling: VECTOR_PCB is an array. Cleanup uncontrolled definitions of abs, max, etc. max is now overloaded function and MAX is a macro. 2011-11-15 22:26:06 +04:00
Vladimir Ur 4b9b2f4e66 Nanometric work. Design rules, D_PAD (except m_Pos) is now in new units. Metric files can be loaded w/o KICAD_NANOMETRE flag set but saved only with this flag, this could help to gain some compatibility during transition process. ifdef'd code is somewhat minimized by using transition macros. Some potential code bugs are commented. 2011-11-14 20:56:05 +04:00
jean-pierre charras 6f3aa6aca9 Very minor fix 2011-11-12 19:53:04 +01:00
jean-pierre charras 1259683846 Pcbnew: fix bad icon in ModEdit toolbar. 2011-11-12 11:51:20 +01:00
jean-pierre charras 790b6b54f5 Forgotten change. 2011-11-12 10:58:20 +01:00
jean-pierre charras 9cb27eb85c Some better icons.
Fix bug 880132 (Justify not correct)
Note: justifications are now always relative to the text, in libedit (as before) and schematic editor:
if rotated, justification is rotated, because in Pcbnew rotation can have any value.
2011-11-12 10:51:06 +01:00
Wayne Stambaugh 7a5e6a2d66 Remove message dialogs from COMPONENT_LIBRARY class.
* Move the component library save file creation and write error dialogs
  into the appropriate frame object.
* Change the save component library and document definitions take an
  OUTPUTFORMATTER object instead of a file name.
* Change the component alias save document definition function to take
  an OUTPUTFORMATTER object instead of a file handle.
2011-11-11 15:10:24 -05:00
Vladimir Ur 6ebb044d45 Metric KiCad work continues. Partially processed D_PAD class. It is still need to be tested including all these import and export procedures... 2011-11-11 21:44:20 +04:00
Wayne Stambaugh 77521c4b60 Fix write file bug when file is in the project path and no path is defined. 2011-11-11 11:08:58 -05:00
jean-pierre charras 4221c3619a Eeschema: bug 880132 : partial fix.
Pcbnew: remove useless code.
Doc: remobe obsolete reference to MINIZIP (which do not exist now)
2011-11-11 08:00:51 +01:00
Wayne Stambaugh fc7189e6f4 Fix for hidden find dialog when display settings change. 2011-11-10 12:01:33 -05:00
Wayne Stambaugh cc7e7fc5ca Memory allocation improvements and other minor fixes.
* Replace C malloc() and free() functions with C++ new and delete
  operators or the appropriate STL container.
* Add option to end mouse capture function to skip executing the end
  mouse capture callback.
* Lots of coding policy and Doxygen comment goodness.
2011-11-10 10:55:05 -05:00
jean-pierre charras 7bd8284661 Pcbnew: remove dead or obsolete code. Add or fix some comments.
Add minor enhancements.
2011-11-10 09:21:11 +01:00
Vladimir Ur 0fdf71a80e General design rules tab converted to nanoscale. A bit of refactorisation in via sizes. And build key is KICAD_NANOMETRE not KICAD_NANOMETRIC (as I stated in previous commit). 2011-11-09 21:35:16 +04:00
Vladimir Ur a273b7bdb5 Work on internal (nano)metric length units started.
Added configuartion option KICAD_NANOMETRIC for this.
* With option set to false: *
- it should work and compile as usual
- some values are saved with decimal point (which should be backward/forward compatible as old versions should just drop fractional part)
* With option set to true: *
- lengths in Global Design Rules should be settable 1nm steps.
FROM/TO_LEGACY_LU(_DBL) macros introduced for easy interconnection between old and new units.
2011-11-09 17:25:49 +04:00
Dick Hollenbeck 311a8186ff sweet editor, compiler warning 2011-11-08 15:14:39 -06:00
Wayne Stambaugh cd0b231656 Minor fixes, dead code removal, and coding policy fixes.
* Use version of DateAndTime that returns a wxString and delete the
  version that takes a char* as it is no longer required.
* Merge StrNumICmp() and StrLenNumICmp() into StrLenNumCmp() to create a
  single function for comparing strings with integers and remove a lot
  of duplicate code.
* Remove unused strupper from string.cpp.
* Use wxArrayString for sorting the EDA_LIST_DIALOG contents.
2011-11-08 11:37:25 -05:00
jean-pierre charras b88505dd85 Pcbnew: code cleaning in ratsnest.cpp. Add comments. 2011-11-08 17:18:46 +01:00
jean-pierre charras 619a82a61a Pcbnew: Fix a membar issue: Layer setup incorrect location (seems due to an error when using copy/paste editor command) 2011-11-07 21:34:35 +01:00
Wayne Stambaugh 393e020442 Fix cursor warping out of client when zooming bug.
* Modify algorithm to correctly calculate the virtual drawing size and
  offset required to place the drawing correctly under all conditions.
* Ignore default wxWidgets scroll keys on Windows in EDA_DRAW_PANEL key
  event handler.
2011-11-07 14:04:24 -05:00
jean-pierre charras 7c17187052 Pcbnew: Fix typo in 2 filenames. Add comments in ratsnest.cpp.
Fix bug 887202.
2011-11-07 19:04:19 +01:00
jean-pierre charras 936d831b82 Pcbnew: more work on a better algorithm to calculate the full ratsnest.
Lee algorithm replaced by a Minimun Spanning Tree algo (using Prim's algorithm ).
Tested on a 5350 pads board, it is more than 100 times faster.
Also fix a crash when clicking on tool  "delete selected items" (main horizontal toolbar),
and remove this tool (currently, no code in Pcbnew for this tool)
2011-11-06 17:16:19 +01:00
Dick Hollenbeck ed2141a6d6 Change various KiCad case utilization to precisely "KiCad" 2011-11-04 10:53:37 -05:00
jean-pierre charras 721cdc4831 Pcbnew: connect.cpp: enhanced ( faster and more powerful ) algorithm to calculate connections between pads.
Code cleaning.
2011-11-03 20:07:59 +01:00
Wayne Stambaugh 3541335a08 Use output formatter to save component library files and objects. 2011-11-01 11:06:26 -04:00
jean-pierre charras fcb482df41 Pcbnew: Fix bug I created in my previous commit.
More about code refactoring in connect.cpp: RecalculateAllTracksNetcode() is 50 times faster with a board using 27000 tracks
Use right icon in pcbnew for load board and new board.
2011-11-01 09:51:27 +01:00
Dick Hollenbeck 9f69193a62 formatting and compiler warnings 2011-11-01 03:06:33 -05:00
Dick Hollenbeck 9bf1f390b2 sweet editor now shows GAL canvas 2011-11-01 03:05:56 -05:00
Wayne Stambaugh 8cad403d23 Use line reader to load component library files and objects. 2011-10-31 16:49:48 -04:00
jean-pierre charras 9cd1fdd92c Fix minor issue under wxWidgets 2.9.3 in DRC dialog display.
More work about code refactoring in connect.cpp
2011-10-31 21:29:46 +01:00
jean-pierre charras d5ea4750e7 Pcbnew: starting work on better ratsnest and connections calculations algorithms.
This first draft should fix bug 851670 and is faster than existing alogorithm.
2011-10-31 14:44:13 +01:00
Dick Hollenbeck 0ee7234cf9 sweet editor work 2011-10-30 00:02:23 -05:00
jean-pierre charras 8a034512ea Pcbnew: fix minor issue: Footprint bounding box was too large for very small footprints (like SM0204) due to the minimal size value used in calculations. 2011-10-29 14:01:59 +02:00
Wayne Stambaugh bbda48f9e8 Unify Eeschema orient commands and other minor fixes.
* Create command event handler for orienting schematic items and block.
* Remove redundant orient item and block command handler code and IDs.
* Remove redundant cancel current command event table entry.
* Remove unnecessary schematic bitmap object virtual functions.
* Set path when saving schematic sheet files to prevent assertion in
  updated path and file write permission test function.
* Restore directory and file name write permission test function to it's
  previous behavior to prevent unexpected save results.
* Add an assertion to verify the path is not empty to directory and file
  write permission test function.
* Improve documentation for path and file write permission test function.
* Fix Doxygen link warnings.
2011-10-28 16:30:50 -04:00
Wayne Stambaugh a834c47be5 Fix schematic library pin editing bug. Fixes lp:809506
* Change edit pin per part flag to only have effect when editing
  component with multiple parts or alternate body styles.
* Move global edit pin pert part variable into library editor frame
  object.
* Note that this only fixes the bug when the component does not have
  multiple parts or alternate body styles.
2011-10-28 09:43:37 -04:00
jean-pierre charras 858636fd27 Fix erroneous test for non writable folder, when trying to save a schematic file with no path in name.
(seems wxFileName.IsDirWritable() fails under Windows when the path is empty (does not use the CWD).)
2011-10-27 20:38:31 +02:00
Wayne Stambaugh 60805606a0 Unify Eeschema drag item commands into a single event handler.
* Create command event handler for draggining all schematic items.
* Remove redundant delete item command handler code.
* Remove unused close current tool command ID from process special
  functions event handler.
2011-10-27 13:51:22 -04:00
Wayne Stambaugh 7195644360 Unify Eeschema edit item commands into a single event handler.
* Create command event handler for editing all schematic and child items.
* Remove unique edit schematic item command IDs.
* Unify find item, undo, and redo hot key commands.
2011-10-27 09:34:28 -04:00
Vladimir Ur 443b4a6fe1 PCBNEW favored module placed on OPPOSITE side selected layer become.
Now it select module from selected side if present. Especially handy in contrast view.
2011-10-27 17:01:32 +04:00
jean-pierre charras 32526511de Fix message in KiCad Dialog About (forgotten USE_BOOST_POLYGON_LIBRARY option removed). 2011-10-27 07:43:44 +02:00
Wayne Stambaugh b98b23a1a6 Factor Eeschema rotate item hot keys into a rotate event handler.
* Add a rotate event handler to schematic frame object.
* Remove unique rotate item command IDs.
* Use process event instead of post event to eliminate the need to clean
  up the command event client object from the heap.
* Unify find next item and next DRC error hot key commands.
* Unify move and rotate hot keys commands.
2011-10-26 16:46:04 -04:00
jean-pierre charras 2476bc7f62 bitmap2component: code cleanup. 2011-10-26 13:06:04 +02:00
jean-pierre charras 51a845470b bitmap2component: use BOOST:POLYGON instead of KBool, and minor enhancements. 2011-10-26 11:53:42 +02:00
jean-pierre charras 4cbcf56cee remove useless USE_BOOST_POLYGON_LIBRARY cmake option, and remove unused files.
BOOST POLYGON is always used in zone filling functions.
Kbool is still in use in other calculations.
2011-10-25 18:24:56 +02:00
Andrey Fedorushkov 14c1486062 Pcbnew: add send msg to Eeschema when move module 2011-10-24 19:23:06 +04:00
Wayne Stambaugh e21ebb7282 Factor Eeschema place item hot keys into select tool event handler. 2011-10-24 09:56:35 -04:00
Andrey Fedorushkov 8e584fc233 Eeschema:
* Fix bug in draw reference for multiunit component
* Code cleanup for drag item
2011-10-24 17:11:11 +04:00
jean-pierre charras 4e626d44b9 Make some messages translatable. 2011-10-22 20:21:57 +02:00
Wayne Stambaugh 609abb2f0c Complete Eeschema unified move code.
* Schematic fields now use unified move code.
* Move the unified move code into file schedit.cpp
* Remove old schematic field move code.
2011-10-22 08:31:44 -04:00
Wayne Stambaugh 7bbe2f784e Initial ground work to make schematic fields use unified move code.
* Remove external dependency for adding suffix to reference designator
  fields.
* Make schematic field get and set position methods transform coordinates
  relative to the parent component object that owns them.
* Make base text class get text method virtual so derived classes can
  change the base string according to their individual requirements.
* Fix a problem with default place schematic item add in last commit.
2011-10-21 14:17:51 -04:00
Wayne Stambaugh 78377058c9 More Eeschema schematic item move code unification.
* Tweak move item to support moving schematic sheet pin objects.
* Change schematic sheet pin set position to constrain position within
  the parent sheet.
* Schematic sheet pin moving now handled by unified move code.
* Remove old schematic sheet pin move code.
* Add custom client data object for passing hot key information to
  command event handlers.
* Fix a bug that prevented changes to schematic sheet pin objects from
  being undone.
2011-10-21 09:59:15 -04:00
Dick Hollenbeck 4c063574ae commit Brian's BOM generation scripts so they don't get lost 2011-10-20 10:49:07 -05:00
Dick Hollenbeck 15f0147ece coding standards cleanups 2011-10-20 09:46:06 -05:00
Vladimir Ur 6311e4e9ea Automatic footprint assignment now can be done without equ file, if conditions are met:
* symbol in sch library have only single footprint filter,
* footprint filter have no wildcards,
* according footprint exists in pcb lib.
This could remove need in long equ files for lots of ICs.
2011-10-20 15:28:37 +04:00
Dick Hollenbeck c5f24127a2 sweet editor using GAL, links but does not work 2011-10-19 23:08:15 -05:00
Wayne Stambaugh 30a4bd3902 Minor Eeschema fixes.
* Fix a set position method bug in schematic item that caused the fields
  to drawn in the wrong position.
* Group zoom hot keys to use the same command event in schematic and
  library editor frames.
2011-10-19 19:17:28 -04:00
Wayne Stambaugh 6a4e8aa909 Eeschema schematic item move code unification.
* Add get and set position methods to all schematic items.
* Encapsulate schematic item position members.
* Add swap data method to schematic items that lacked one.
* Remove global swap data function used by undo and redo functions.
* Unify as many schematic move methods as possible.
* Remove unnecessary place schematic item methods.
* All schematic items are now moved in the same event handler.
* Fixed bug in hierarchical sheet get menu item string method.
* Make no connect and junction items movable, fixes lp:804048
2011-10-19 16:32:21 -04:00
Fabrizio Tappero 341e3a507a icons update. 2011-10-19 20:55:21 +02:00
Wayne Stambaugh 1bd7fc8a4e Minor menu bar fixes.
* Fixed bug on Windows that prevented the menu short cuts from working
  properly.
* Fix duplicate menu short cut keys in KiCad, Pcbnew, and Eeschema.
* Add menu short cuts for all possible menu entries.
2011-10-18 15:59:19 -04:00
jean-pierre charras 1fde4ca807 Eeschema, Libedit: Use 16x16 icons in comboboxes inside the pin editor dialog. This gives a better look to this dialog. 2011-10-18 21:18:04 +02:00
jean-pierre charras 0409bc8d1b Fix very minor issues and code cleaning 2011-10-18 19:28:49 +02:00
jean-pierre charras 153b1bd0d2 Eeschema: Fix confusing labels in libedit (for pins and graphic items sharing).
Fix icons in macro menu.
2011-10-18 12:18:05 +02:00
jean-pierre charras 2db1e221d4 Eeschema: Fix icons in macro menu.
Fix confusing labels in libedit (for pins and graphic items sharing)
2011-10-18 12:16:27 +02:00
jean-pierre charras 8a82c61543 Icons update 2011-10-18 10:28:12 +02:00
Wayne Stambaugh 2c251196c6 Minor dialog fixes and code cleaning.
* Grammar and spelling fixes in Eeschema, CvPcb, and Pcbnew path and
  library dialog tool tips.
* Translate the French file name subrill.cpp to highlight.cpp.
* Lots of coding style policy fixes.
2011-10-17 16:01:27 -04:00
jean-pierre charras 13324c06b5 Replace icon_cvpcb.svg file (broken?)
Gerbview: very minor fix
2011-10-17 18:49:14 +02:00
jean-pierre charras 021a075fbe Gerbview: minor enhancement.
All: fix some strings very hard to translate in messages.
2011-10-16 10:02:36 +02:00
Wayne Stambaugh 121b65bfb8 More auto save improvements.
* Factor test for auto save file into base frame class.
* Added auto save feature to Eeschema for saving schematics, addresses
  launchpad question 173631.
* Add auto save interval control to Eeschema options dialog.
* Fix problem with subsequent auto saves in last commit.
2011-10-15 09:25:57 -04:00
jean-pierre charras 8e6ac6c5a9 CvPcb: make footprint filter case insensitive (Fix Bug #873417 ) 2011-10-14 18:44:15 +02:00
Wayne Stambaugh b7a8719617 Make CvPcb stay open on save the default behavior. Fixes 872265 2011-10-13 16:13:11 -04:00
Wayne Stambaugh 70569edb05 Pcbnew auto save improvements.
* Factor auto save common code into base frame class so all frame windows
  can take advantage of the shiny new auto save goodness.
* Use a timer instead of depending on mouse and keyboard events to trigger
  an auto save.
* Check for auto save file when opening a board and ask user if they
  wish to use the auto save file or the last saved board file.
* Protect all base frame public members.
2011-10-13 15:56:32 -04:00
jean-pierre charras 0dff6b9bd3 Pcbnew: Fix an issue when try to importing gpcb footprints 2011-10-13 20:37:43 +02:00
Wayne Stambaugh 31ed2c288c Factor bus label parsing function into net list object. 2011-10-12 11:34:52 -04:00
Wayne Stambaugh 4e55b6be65 More Eeschema net list object generation improvements.
* Add net list object creation functions to schematic sheet and label
  objects.
* Remove function to add schematic object net list items as it is no
  longer needed.
* Add license statements to all modified files that required one.
2011-10-12 10:03:43 -04:00
Andrey Fedorushkov 31a4334a5a cvpcb: add send message to eeschema when selecting item in list components 2011-10-12 17:09:12 +04:00
Wayne Stambaugh d5cbd5d186 Eeschema net list object generation improvements.
* Add net list object creation functions to schematic component object.
* Remove external variables used by the verify bus label and parse bus
  label functions.
* Remove redundant net list object include sheet path member assignment.
* Add license statements to all modified files that required one.
2011-10-11 16:23:56 -04:00
Wayne Stambaugh 2ba1984442 Eeschema net list object generation improvements.
* Define function to allow schematic objects to create their own net list
  objects.
* Add net list object creation functions to schematic line, junction, and
  no connect objects.
* Add license statements to all modified files that required one.
2011-10-11 09:38:13 -04:00
Wayne Stambaugh d4fb921b43 Eeschema ERC improvements and other minor fixes.
* Move the hierarchical label connected test into the NETLIST_OBJECT class.
* ERC pin type strings can now be translated.
* Remove unused EDA_DRAW_PANEL attribute from all ERC test functions.
* Add get marker count method to SCH_SCREENS object.
* Redundant header removal.
* Lots of coding style policy fixes.
2011-10-07 10:41:30 -04:00
Wayne Stambaugh 5602177d45 Minor copy version information to clipboard improvements.
* Add KiCad build option states to copy version information to clipboard
  function.
* Add a note to the main CMakeList.txt file to let developers know that
  new option states should be added to the copy version information to
  clipboard function.
2011-10-05 14:26:22 -04:00
Fabrizio Tappero and jean-pierre charras 22b42b2a41 Commit new icons from Fabrizio Tappero .
(With a minor change for icon_cvpcb.svg: better look on dark backgrounds)
Fix bug 668200.
2011-10-05 14:36:32 +02:00
jean-pierre charras 6a33eed0f4 Fix typo errors and make translations more easy. 2011-10-03 21:11:09 +02:00
Wayne Stambaugh 301ef32e17 Fix error when opening component library file names with dot. 2011-10-02 16:24:41 -04:00
Wayne Stambaugh c2f1113e5d Fix Pcbnew KICAD_T enum names for consistency. 2011-10-01 15:24:27 -04:00
Wayne Stambaugh 4b853dedb4 Application name capitalization fixes.
* Correct all user strings and comments for the correct capitalization of
  application names according to JP.  They are KiCad, Pcbnew, CvPcb,
  Eeschema, and GerbView.
* Add a note the the user interface policy about the correct capitalization.
2011-09-30 14:15:37 -04:00
Roman Bashkov 611a5155fc pcbnew:
* Add visible clearance when edit node or track segment,
  add parameter "show clearance for new or edited track with via area"
  in "Display options" menu.
2011-09-30 12:24:10 +04:00
Wayne Stambaugh c09bc26dc2 Minor PCBNew code fixes.
* Translate French code names and comments.
* Dead code removal.
* Hot key object and structure coding style policy fixes.
* Doxygen comment warning fixes.
2011-09-29 12:49:40 -04:00
Fabrizio Tappero eaf17c596a New icons 2011-09-28 21:12:10 +02:00
jean-pierre charras cac9951682 Pcbnew: Fix 2 minor bugs about pcb texts: flipped texts have an incorrect rotation angle,
and text dialog editor did not handle properly negative rotation angles values.
Eeschema: fix bug when rotating (only using the Rotate hotkey) a field.
2011-09-28 10:32:31 +02:00
jean-pierre charras 538b1ed314 Eeschema: fix bug when rotating (only using the Rotate hotkey) a field. 2011-09-28 09:38:58 +02:00
jean-pierre charras 25f95ec11f Pcbnew: Fix 2 minor bugs about pcb texts: flipped texts have an incorrect rotation angle,
and text dialog editor did not handle properly negative rotation angles values.
2011-09-28 08:10:15 +02:00
Wayne Stambaugh e6681f17e4 Fix PCBNew segfault when adding a module. 2011-09-27 16:43:18 -04:00
Wayne Stambaugh b9b341dce2 PCB common library global variable removal and other minor fixes.
* Move auto save time global variables into PCB_EDIT_FRAME object.
* Move footprint library name list global variable int PCB_EDIT_FRAME
  object.
* Improve library back up and temporary file error message strings and make
  them translatable.
* PCBNew string unification.
* Translate French code names and comments.
* Coding style policy and Doxygen comment fixes.
2011-09-26 16:32:56 -04:00
Wayne Stambaugh de96452c41 Minor common PCB library code fixes.
* More common header file compiler fixes.
* Translate French code naming and comments.
* Remove global variable ScreenPcb.
* Dead code removal.
2011-09-24 14:33:28 -04:00
jean-pierre charras 063c56be30 Use accelerators from hot keys in place menu, from the Fabrizio's idea 2011-09-24 19:15:29 +02:00
Marco Mattila 2d761f302b Fix drawsegment bounding box and hittest issues in pcbnew. 2011-09-24 01:40:36 +03:00
jean-pierre charras 8db19bbd6a Preparing hotkeys/shortcuts changes in place menu. 2011-09-23 22:00:30 +02: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
JP Charras and Fabrizio Tappero, fabrizio.tappero 846dca8c05 Update .cpp icon files not updated in previous commit.
Fix minor issues.
Fic compil issue in dimension.cpp with wxMSW 2.8.12 (wxMSW 2.8.12 only).
2011-09-22 21:16:55 +02:00
1760 changed files with 300337 additions and 164820 deletions
+3
View File
@@ -1,6 +1,7 @@
boost_root
.downloads-by-cmake
Build
build
common/netlist_keywords.*
common/netlist_lexer.h
common/pcb_plot_params_lexer.h
@@ -30,6 +31,8 @@ install_manifest.txt
Documentation/doxygen
Documentation/development/doxygen
*.bak
.*.swp
*.~*
common/pcb_plot_params_keywords.cpp
include/pcb_plot_params_lexer.h
pcbnew/specctra_keywords.cpp
+2
View File
@@ -0,0 +1,2 @@
[core]
excludesfile .bzrignore
+35 -17
View File
@@ -57,16 +57,33 @@ void S3D_MASTER::ObjectCoordsTo3DUnits( std::vector< S3D_VERTEX >& aVertices )
// adjust rotation
if( m_MatRotation.x )
RotatePoint( &aVertices[ii].y, &aVertices[ii].z, m_MatRotation.x * 10 );
{
double a = aVertices[ii].y;
double b = aVertices[ii].z;
RotatePoint( &a, &b, m_MatRotation.x * 10 );
aVertices[ii].y = (float)a;
aVertices[ii].z = (float)b;
}
if( m_MatRotation.y )
RotatePoint( &aVertices[ii].z, &aVertices[ii].x, m_MatRotation.y * 10 );
{
double a = aVertices[ii].z;
double b = aVertices[ii].x;
RotatePoint( &a, &b, m_MatRotation.x * 10 );
aVertices[ii].z = (float)a;
aVertices[ii].x = (float)b;
}
if( m_MatRotation.z )
RotatePoint( &aVertices[ii].x, &aVertices[ii].y, m_MatRotation.z * 10 );
{
double a = aVertices[ii].x;
double b = aVertices[ii].y;
RotatePoint( &a, &b, m_MatRotation.x * 10 );
aVertices[ii].x = (float)a;
aVertices[ii].y = (float)b;
}
/* adjust offset position (offset is given in UNIT 3D (0.1 inch) */
#define SCALE_3D_CONV ((IU_PER_MILS * 1000) / UNITS3D_TO_UNITSPCB)
aVertices[ii].x += m_MatPosition.x * SCALE_3D_CONV;
aVertices[ii].y += m_MatPosition.y * SCALE_3D_CONV;
aVertices[ii].z += m_MatPosition.z * SCALE_3D_CONV;
@@ -88,9 +105,9 @@ void TransfertToGLlist( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUni
ay = aVertices[1].y - aVertices[0].y;
az = aVertices[1].z - aVertices[0].z;
bx = aVertices[aVertices.size() - 1].x - aVertices[0].x;
by = aVertices[aVertices.size() - 1].y - aVertices[0].y;
bz = aVertices[aVertices.size() - 1].z - aVertices[0].z;
bx = aVertices[2].x - aVertices[0].x;
by = aVertices[2].y - aVertices[0].y;
bz = aVertices[2].z - aVertices[0].z;
nx = ay * bz - az * by;
ny = az * bx - ax * bz;
@@ -133,14 +150,14 @@ void TransfertToGLlist( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUni
glEnd();
}
VERTEX_VALUE_CTRL::VERTEX_VALUE_CTRL( wxWindow* aParent, wxBoxSizer* aBoxSizer )
S3DPOINT_VALUE_CTRL::S3DPOINT_VALUE_CTRL( wxWindow* aParent, wxBoxSizer* aBoxSizer )
{
wxString text;
wxFlexGridSizer* gridSizer = new wxFlexGridSizer( 0, 2, 0, 0 );
gridSizer->AddGrowableCol( 1 );
gridSizer->SetFlexibleDirection( wxHORIZONTAL );
gridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
gridSizer->AddGrowableCol( 1 );
gridSizer->SetFlexibleDirection( wxHORIZONTAL );
gridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
aBoxSizer->Add( gridSizer, 0, wxEXPAND, 5 );
@@ -169,15 +186,16 @@ VERTEX_VALUE_CTRL::VERTEX_VALUE_CTRL( wxWindow* aParent, wxBoxSizer* aBoxSizer )
}
VERTEX_VALUE_CTRL::~VERTEX_VALUE_CTRL()
S3DPOINT_VALUE_CTRL::~S3DPOINT_VALUE_CTRL()
{
// Nothing to delete: all items are managed by the parent window.
}
S3D_VERTEX VERTEX_VALUE_CTRL::GetValue()
S3DPOINT S3DPOINT_VALUE_CTRL::GetValue()
{
S3D_VERTEX value;
double dtmp;
S3DPOINT value;
double dtmp;
m_XValueCtrl->GetValue().ToDouble( &dtmp );
value.x = dtmp;
@@ -189,7 +207,7 @@ S3D_VERTEX VERTEX_VALUE_CTRL::GetValue()
}
void VERTEX_VALUE_CTRL::SetValue( S3D_VERTEX vertex )
void S3DPOINT_VALUE_CTRL::SetValue( S3DPOINT vertex )
{
wxString text;
@@ -207,7 +225,7 @@ void VERTEX_VALUE_CTRL::SetValue( S3D_VERTEX vertex )
}
void VERTEX_VALUE_CTRL::Enable( bool onoff )
void S3DPOINT_VALUE_CTRL::Enable( bool onoff )
{
m_XValueCtrl->Enable( onoff );
m_YValueCtrl->Enable( onoff );
+212 -175
View File
@@ -1,8 +1,33 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file 3d_canvas.cpp
*/
#include <fctsys.h>
#include <trigo.h>
#include <project.h>
#include <gestfich.h>
#include <wx/image.h>
@@ -14,7 +39,9 @@
#include <wx/clipbrd.h>
#include <wx/wupdlock.h>
#include <gestfich.h>
#ifdef __WINDOWS__
#include <GL/glew.h> // must be included before gl.h
#endif
#include <3d_viewer.h>
#include <3d_canvas.h>
@@ -22,34 +49,8 @@
#include <trackball.h>
#include <3d_viewer_id.h>
// -----------------
// helper function (from wxWidgets, opengl/cube.cpp sample
// -----------------
void CheckGLError()
{
GLenum errLast = GL_NO_ERROR;
for ( ; ; )
{
GLenum err = glGetError();
if ( err == GL_NO_ERROR )
return;
// normally the error is reset by the call to glGetError() but if
// glGetError() itself returns an error, we risk looping forever here
// so check that we get a different error than the last time
if ( err == errLast )
{
wxLogError(wxT("OpenGL error state couldn't be reset."));
return;
}
errLast = err;
wxLogError(wxT("OpenGL error %d"), err);
}
}
#include <textures/text_silk.h>
#include <textures/text_pcb.h>
/*
@@ -65,6 +66,9 @@ BEGIN_EVENT_TABLE( EDA_3D_CANVAS, wxGLCanvas )
// mouse events
EVT_RIGHT_DOWN( EDA_3D_CANVAS::OnRightClick )
EVT_MOUSEWHEEL( EDA_3D_CANVAS::OnMouseWheel )
#ifdef USE_OSX_MAGNIFY_EVENT
EVT_MAGNIFY( EDA_3D_CANVAS::OnMagnify )
#endif
EVT_MOTION( EDA_3D_CANVAS::OnMouseMove )
// other events
@@ -72,12 +76,29 @@ BEGIN_EVENT_TABLE( EDA_3D_CANVAS, wxGLCanvas )
EVT_MENU_RANGE( ID_POPUP_3D_VIEW_START, ID_POPUP_3D_VIEW_END, EDA_3D_CANVAS::OnPopUpMenu )
END_EVENT_TABLE()
// Define an invalid value for some unsigned int indexes
#define INVALID_INDEX GL_INVALID_VALUE
EDA_3D_CANVAS::EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList ) :
wxGLCanvas( parent, wxID_ANY, attribList, wxDefaultPosition, wxDefaultSize,
wxFULL_REPAINT_ON_RESIZE )
{
m_init = false;
m_reportWarnings = true;
m_shadow_init = false;
// set an invalide value to not yet initialized indexes managing
// textures created to enhance 3D rendering
m_text_pcb = m_text_silk = INVALID_INDEX;
m_text_fake_shadow_front = INVALID_INDEX;
m_text_fake_shadow_back = INVALID_INDEX;
m_text_fake_shadow_board = INVALID_INDEX;
// position of the front and back layers
// (will be initialized to a better value later)
m_ZBottom = 0.0;
m_ZTop = 0.0;
m_lightPos = S3D_VERTEX(0.0f, 0.0f, 30.0f);
// Clear all gl list identifiers:
for( int ii = GL_ID_BEGIN; ii < GL_ID_END; ii++ )
@@ -95,10 +116,15 @@ EDA_3D_CANVAS::~EDA_3D_CANVAS()
ClearLists();
m_init = false;
delete m_glRC;
// Free the list of parsers list
for( unsigned int i = 0; i < m_model_parsers_list.size(); i++ )
delete m_model_parsers_list[i];
}
void EDA_3D_CANVAS::ClearLists( GLuint aGlList )
void EDA_3D_CANVAS::ClearLists( int aGlList )
{
if( aGlList )
{
@@ -117,6 +143,19 @@ void EDA_3D_CANVAS::ClearLists( GLuint aGlList )
m_glLists[ii] = 0;
}
// When m_text_fake_shadow_??? is set to INVALID_INDEX, textures are no yet
// created.
if( m_text_fake_shadow_front != INVALID_INDEX )
glDeleteTextures( 1, &m_text_fake_shadow_front );
if( m_text_fake_shadow_back != INVALID_INDEX )
glDeleteTextures( 1, &m_text_fake_shadow_back );
if( m_text_fake_shadow_board != INVALID_INDEX )
glDeleteTextures( 1, &m_text_fake_shadow_board );
m_shadow_init = false;
}
@@ -130,7 +169,7 @@ void EDA_3D_CANVAS::OnChar( wxKeyEvent& event )
void EDA_3D_CANVAS::SetView3D( int keycode )
{
int ii;
double delta_move = 0.7 * g_Parm_3D_Visu.m_Zoom;
double delta_move = 0.7 * GetPrm3DVisu().m_Zoom;
switch( keycode )
{
@@ -151,22 +190,22 @@ void EDA_3D_CANVAS::SetView3D( int keycode )
break;
case WXK_HOME:
g_Parm_3D_Visu.m_Zoom = 1.0;
GetPrm3DVisu().m_Zoom = 1.0;
m_draw3dOffset.x = m_draw3dOffset.y = 0;
trackball( g_Parm_3D_Visu.m_Quat, 0.0, 0.0, 0.0, 0.0 );
trackball( GetPrm3DVisu().m_Quat, 0.0, 0.0, 0.0, 0.0 );
break;
case WXK_END:
break;
case WXK_F1:
g_Parm_3D_Visu.m_Zoom /= 1.4;
if( g_Parm_3D_Visu.m_Zoom <= 0.01 )
g_Parm_3D_Visu.m_Zoom = 0.01;
GetPrm3DVisu().m_Zoom /= 1.4;
if( GetPrm3DVisu().m_Zoom <= 0.01 )
GetPrm3DVisu().m_Zoom = 0.01;
break;
case WXK_F2:
g_Parm_3D_Visu.m_Zoom *= 1.4;
GetPrm3DVisu().m_Zoom *= 1.4;
break;
case '+':
@@ -179,59 +218,59 @@ void EDA_3D_CANVAS::SetView3D( int keycode )
case 'R':
m_draw3dOffset.x = m_draw3dOffset.y = 0;
for( ii = 0; ii < 4; ii++ )
g_Parm_3D_Visu.m_Rot[ii] = 0.0;
GetPrm3DVisu().m_Rot[ii] = 0.0;
trackball( g_Parm_3D_Visu.m_Quat, 0.0, 0.0, 0.0, 0.0 );
trackball( GetPrm3DVisu().m_Quat, 0.0, 0.0, 0.0, 0.0 );
break;
case 'x':
for( ii = 0; ii < 4; ii++ )
g_Parm_3D_Visu.m_Rot[ii] = 0.0;
GetPrm3DVisu().m_Rot[ii] = 0.0;
trackball( g_Parm_3D_Visu.m_Quat, 0.0, 0.0, 0.0, 0.0 );
g_Parm_3D_Visu.m_ROTZ = -90;
g_Parm_3D_Visu.m_ROTX = -90;
trackball( GetPrm3DVisu().m_Quat, 0.0, 0.0, 0.0, 0.0 );
GetPrm3DVisu().m_ROTZ = -90;
GetPrm3DVisu().m_ROTX = -90;
break;
case 'X':
for( ii = 0; ii < 4; ii++ )
g_Parm_3D_Visu.m_Rot[ii] = 0.0;
GetPrm3DVisu().m_Rot[ii] = 0.0;
trackball( g_Parm_3D_Visu.m_Quat, 0.0, 0.0, 0.0, 0.0 );
g_Parm_3D_Visu.m_ROTZ = 90;
g_Parm_3D_Visu.m_ROTX = -90;
trackball( GetPrm3DVisu().m_Quat, 0.0, 0.0, 0.0, 0.0 );
GetPrm3DVisu().m_ROTZ = 90;
GetPrm3DVisu().m_ROTX = -90;
break;
case 'y':
for( ii = 0; ii < 4; ii++ )
g_Parm_3D_Visu.m_Rot[ii] = 0.0;
GetPrm3DVisu().m_Rot[ii] = 0.0;
trackball( g_Parm_3D_Visu.m_Quat, 0.0, 0.0, 0.0, 0.0 );
g_Parm_3D_Visu.m_ROTX = -90;
trackball( GetPrm3DVisu().m_Quat, 0.0, 0.0, 0.0, 0.0 );
GetPrm3DVisu().m_ROTX = -90;
break;
case 'Y':
for( ii = 0; ii < 4; ii++ )
g_Parm_3D_Visu.m_Rot[ii] = 0.0;
GetPrm3DVisu().m_Rot[ii] = 0.0;
trackball( g_Parm_3D_Visu.m_Quat, 0.0, 0.0, 0.0, 0.0 );
g_Parm_3D_Visu.m_ROTX = -90;
g_Parm_3D_Visu.m_ROTZ = -180;
trackball( GetPrm3DVisu().m_Quat, 0.0, 0.0, 0.0, 0.0 );
GetPrm3DVisu().m_ROTX = -90;
GetPrm3DVisu().m_ROTZ = -180;
break;
case 'z':
for( ii = 0; ii < 4; ii++ )
g_Parm_3D_Visu.m_Rot[ii] = 0.0;
GetPrm3DVisu().m_Rot[ii] = 0.0;
trackball( g_Parm_3D_Visu.m_Quat, 0.0, 0.0, 0.0, 0.0 );
trackball( GetPrm3DVisu().m_Quat, 0.0, 0.0, 0.0, 0.0 );
break;
case 'Z':
for( ii = 0; ii < 4; ii++ )
g_Parm_3D_Visu.m_Rot[ii] = 0.0;
GetPrm3DVisu().m_Rot[ii] = 0.0;
trackball( g_Parm_3D_Visu.m_Quat, 0.0, 0.0, 0.0, 0.0 );
g_Parm_3D_Visu.m_ROTX = -180;
trackball( GetPrm3DVisu().m_Quat, 0.0, 0.0, 0.0, 0.0 );
GetPrm3DVisu().m_ROTX = -180;
break;
default:
@@ -248,50 +287,54 @@ void EDA_3D_CANVAS::OnMouseWheel( wxMouseEvent& event )
if( event.ShiftDown() )
{
if( event.GetWheelRotation() < 0 )
{
/* up */
SetView3D( WXK_UP );
}
SetView3D( WXK_UP ); // move up
else
{
/* down */
SetView3D( WXK_DOWN );
}
SetView3D( WXK_DOWN ); // move down
}
else if( event.ControlDown() )
{
if( event.GetWheelRotation() > 0 )
{
/* right */
SetView3D( WXK_RIGHT );
}
SetView3D( WXK_RIGHT ); // move right
else
{
/* left */
SetView3D( WXK_LEFT );
}
SetView3D( WXK_LEFT ); // move left
}
else
{
if( event.GetWheelRotation() > 0 )
{
g_Parm_3D_Visu.m_Zoom /= 1.4;
GetPrm3DVisu().m_Zoom /= 1.4;
if( g_Parm_3D_Visu.m_Zoom <= 0.01 )
g_Parm_3D_Visu.m_Zoom = 0.01;
if( GetPrm3DVisu().m_Zoom <= 0.01 )
GetPrm3DVisu().m_Zoom = 0.01;
}
else
g_Parm_3D_Visu.m_Zoom *= 1.4;
GetPrm3DVisu().m_Zoom *= 1.4;
DisplayStatus();
Refresh( false );
}
g_Parm_3D_Visu.m_Beginx = event.GetX();
g_Parm_3D_Visu.m_Beginy = event.GetY();
GetPrm3DVisu().m_Beginx = event.GetX();
GetPrm3DVisu().m_Beginy = event.GetY();
}
#ifdef USE_OSX_MAGNIFY_EVENT
void EDA_3D_CANVAS::OnMagnify( wxMouseEvent& event )
{
double magnification = ( event.GetMagnification() + 1.0f );
GetPrm3DVisu().m_Zoom /= magnification;
if( GetPrm3DVisu().m_Zoom <= 0.01 )
GetPrm3DVisu().m_Zoom = 0.01;
DisplayStatus();
Refresh( false );
}
#endif
void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
{
wxSize size( GetClientSize() );
@@ -303,12 +346,12 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
{
/* drag in progress, simulate trackball */
trackball( spin_quat,
(2.0 * g_Parm_3D_Visu.m_Beginx - size.x) / size.x,
(size.y - 2.0 * g_Parm_3D_Visu.m_Beginy) / size.y,
(2.0 * GetPrm3DVisu().m_Beginx - size.x) / size.x,
(size.y - 2.0 * GetPrm3DVisu().m_Beginy) / size.y,
( 2.0 * event.GetX() - size.x) / size.x,
( size.y - 2.0 * event.GetY() ) / size.y );
add_quats( spin_quat, g_Parm_3D_Visu.m_Quat, g_Parm_3D_Visu.m_Quat );
add_quats( spin_quat, GetPrm3DVisu().m_Quat, GetPrm3DVisu().m_Quat );
}
else if( event.MiddleIsDown() )
{
@@ -316,11 +359,11 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
/* Current zoom and an additional factor are taken into account
* for the amount of panning. */
const double PAN_FACTOR = 8.0 * g_Parm_3D_Visu.m_Zoom;
const double PAN_FACTOR = 8.0 * GetPrm3DVisu().m_Zoom;
m_draw3dOffset.x -= PAN_FACTOR *
( g_Parm_3D_Visu.m_Beginx - event.GetX() ) / size.x;
( GetPrm3DVisu().m_Beginx - event.GetX() ) / size.x;
m_draw3dOffset.y -= PAN_FACTOR *
(event.GetY() - g_Parm_3D_Visu.m_Beginy) / size.y;
(event.GetY() - GetPrm3DVisu().m_Beginy) / size.y;
}
/* orientation has changed, redraw mesh */
@@ -328,8 +371,8 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
Refresh( false );
}
g_Parm_3D_Visu.m_Beginx = event.GetX();
g_Parm_3D_Visu.m_Beginy = event.GetY();
GetPrm3DVisu().m_Beginx = event.GetX();
GetPrm3DVisu().m_Beginy = event.GetY();
}
@@ -471,7 +514,7 @@ void EDA_3D_CANVAS::DisplayStatus()
msg.Printf( wxT( "dy %3.2f" ), m_draw3dOffset.y );
Parent()->SetStatusText( msg, 2 );
msg.Printf( wxT( "View: %3.1f" ), 45 * g_Parm_3D_Visu.m_Zoom );
msg.Printf( _( "Zoom: %3.1f" ), 45 * GetPrm3DVisu().m_Zoom );
Parent()->SetStatusText( msg, 3 );
}
@@ -490,16 +533,48 @@ void EDA_3D_CANVAS::OnEraseBackground( wxEraseEvent& event )
// Do nothing, to avoid flashing.
}
typedef struct s_sImage
{
unsigned int width;
unsigned int height;
unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */
unsigned char pixel_data[64 * 64 * 4 + 1];
}tsImage;
GLuint load_and_generate_texture( tsImage *image )
{
GLuint texture;
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
glPixelStorei (GL_PACK_ALIGNMENT, 1);
glGenTextures( 1, &texture );
glBindTexture( GL_TEXTURE_2D, texture );
gluBuild2DMipmaps( GL_TEXTURE_2D, GL_RGBA, image->width, image->height,
GL_RGBA, GL_UNSIGNED_BYTE, image->pixel_data );
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
return texture;
}
/* Initialize broad parameters for OpenGL */
void EDA_3D_CANVAS::InitGL()
{
wxSize size = GetClientSize();
if( !m_init )
{
m_init = true;
g_Parm_3D_Visu.m_Zoom = 1.0;
m_text_pcb = load_and_generate_texture( (tsImage *)&text_pcb );
m_text_silk = load_and_generate_texture( (tsImage *)&text_silk );
GetPrm3DVisu().m_Zoom = 1.0;
m_ZBottom = 1.0;
m_ZTop = 10.0;
@@ -508,12 +583,12 @@ void EDA_3D_CANVAS::InitGL()
glEnable( GL_ALPHA_TEST );
glEnable( GL_LINE_SMOOTH );
// glEnable(GL_POLYGON_SMOOTH); // creates issues with some graphic cards
glShadeModel( GL_SMOOTH );
glEnable( GL_NORMALIZE );
glEnable( GL_COLOR_MATERIAL );
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
// speedups
glEnable( GL_DITHER );
//glEnable( GL_DITHER );
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_DONT_CARE );
glHint( GL_LINE_SMOOTH_HINT, GL_NICEST );
glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST );
@@ -521,90 +596,50 @@ void EDA_3D_CANVAS::InitGL()
// Initialize alpha blending function.
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
}
// set viewing projection
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
#define MAX_VIEW_ANGLE 160.0 / 45.0
if( g_Parm_3D_Visu.m_Zoom > MAX_VIEW_ANGLE )
g_Parm_3D_Visu.m_Zoom = MAX_VIEW_ANGLE;
if( Parent()->ModeIsOrtho() )
{
// OrthoReductionFactor is chosen so as to provide roughly the same size as
// Perspective View
const double orthoReductionFactor = 400 / g_Parm_3D_Visu.m_Zoom;
// Initialize Projection Matrix for Ortographic View
glOrtho( -size.x / orthoReductionFactor, size.x / orthoReductionFactor,
-size.y / orthoReductionFactor, size.y / orthoReductionFactor, 1, 10 );
}
else
{
// Ratio width / height of the window display
double ratio_HV = (double) size.x / size.y;
// Initialize Projection Matrix for Perspective View
gluPerspective( 45.0 * g_Parm_3D_Visu.m_Zoom, ratio_HV, 1, 10 );
}
// position viewer
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glTranslatef( 0.0F, 0.0F, -( m_ZBottom + m_ZTop) / 2 );
// clear color and depth buffers
glClearColor( g_Parm_3D_Visu.m_BgColor.m_Red,
g_Parm_3D_Visu.m_BgColor.m_Green,
g_Parm_3D_Visu.m_BgColor.m_Blue, 1 );
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
// Setup light sources:
SetLights();
CheckGLError();
}
}
/* Initialize OpenGL light sources. */
void EDA_3D_CANVAS::SetLights()
{
double light;
GLfloat light_color[4];
/* set viewing projection */
// activate light. the source is above the xy plane, at source_pos
GLfloat source_pos[4] = { m_lightPos.x, m_lightPos.y, m_lightPos.z, 0.0f };
GLfloat light_color[4]; // color of lights (RGBA values)
light_color[3] = 1.0;
GLfloat Z_axis_pos[4] = { 0.0, 0.0, 3.0, 0.0 };
GLfloat lowZ_axis_pos[4] = { 0.0, 0.0, -3.0, 0.5 };
/* activate light */
light = 1.0;
light_color[0] = light_color[1] = light_color[2] = light;
glLightfv( GL_LIGHT0, GL_POSITION, Z_axis_pos );
// Light above the xy plane
light_color[0] = light_color[1] = light_color[2] = 0.0;
glLightfv( GL_LIGHT0, GL_AMBIENT, light_color );
light_color[0] = light_color[1] = light_color[2] = 1.0;
glLightfv( GL_LIGHT0, GL_DIFFUSE, light_color );
light = 0.3;
light_color[0] = light_color[1] = light_color[2] = light;
glLightfv( GL_LIGHT1, GL_POSITION, lowZ_axis_pos );
glLightfv( GL_LIGHT1, GL_DIFFUSE, light_color );
glEnable( GL_LIGHT0 ); // White spot on Z axis
glEnable( GL_LIGHT1 ); // White spot on Z axis ( bottom)
light_color[0] = light_color[1] = light_color[2] = 1.0;
glLightfv( GL_LIGHT0, GL_SPECULAR, light_color );
glLightfv( GL_LIGHT0, GL_POSITION, source_pos );
light_color[0] = light_color[1] = light_color[2] = 0.2;
glLightModelfv( GL_LIGHT_MODEL_AMBIENT, light_color );
glLightModeli( GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE );
glEnable( GL_LIGHT0 ); // White spot on Z axis ( top )
glEnable( GL_LIGHTING );
}
/* Create a Screenshot of the current 3D view.
* Output file format is png or jpeg, or image is copied to the clipboard
*/
void EDA_3D_CANVAS::TakeScreenshot( wxCommandEvent& event )
{
wxFileName fn( Parent()->GetDefaultFileName() );
wxString FullFileName;
wxString file_ext, mask;
bool fmt_is_jpeg = false;
static wxFileName fn; // Remember path between saves during this session only.
wxString FullFileName;
wxString file_ext, mask;
bool fmt_is_jpeg = false;
// First time path is set to the project path.
if( !fn.IsOk() )
fn = Parent()->Prj().GetProjectFullName();
if( event.GetId() == ID_MENU_SCREENCOPY_JPEG )
fmt_is_jpeg = true;
@@ -613,23 +648,24 @@ void EDA_3D_CANVAS::TakeScreenshot( wxCommandEvent& event )
{
file_ext = fmt_is_jpeg ? wxT( "jpg" ) : wxT( "png" );
mask = wxT( "*." ) + file_ext;
FullFileName = Parent()->GetDefaultFileName();
fn.SetExt( file_ext );
FullFileName = EDA_FileSelector( _( "3D Image filename:" ), wxEmptyString,
fn.GetFullName(), file_ext, mask, this,
wxFD_SAVE, true );
FullFileName = EDA_FILE_SELECTOR( _( "3D Image File Name:" ), fn.GetPath(),
fn.GetFullName(), file_ext, mask, this,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT, true );
if( FullFileName.IsEmpty() )
return;
fn = FullFileName;
// Be sure the screen area destroyed by the file dialog is redrawn before making
// a screen copy.
// Without this call, under Linux the screen refresh is made to late.
wxYield();
}
struct vieport_params
struct viewport_params
{
GLint originx;
GLint originy;
@@ -637,6 +673,10 @@ void EDA_3D_CANVAS::TakeScreenshot( wxCommandEvent& event )
GLint y;
} viewport;
// Be sure we have the latest 3D view (remember 3D view is buffered)
Refresh();
wxYield();
// Build image from the 3D buffer
wxWindowUpdateLocker noUpdates( this );
glGetIntegerv( GL_VIEWPORT, (GLint*) &viewport );
@@ -654,7 +694,6 @@ void EDA_3D_CANVAS::TakeScreenshot( wxCommandEvent& event )
viewport.x, viewport.y,
GL_ALPHA, GL_UNSIGNED_BYTE, alphabuffer );
image.SetData( pixelbuffer );
image.SetAlpha( alphabuffer );
image = image.Mirror( false );
@@ -662,17 +701,15 @@ void EDA_3D_CANVAS::TakeScreenshot( wxCommandEvent& event )
if( event.GetId() == ID_TOOL_SCREENCOPY_TOCLIBBOARD )
{
wxBitmapDataObject* dobjBmp = new wxBitmapDataObject;
dobjBmp->SetBitmap( bitmap );
if( wxTheClipboard->Open() )
{
wxBitmapDataObject* dobjBmp = new wxBitmapDataObject( bitmap );
if( !wxTheClipboard->SetData( dobjBmp ) )
wxMessageBox( _( "Failed to copy image to clipboard" ) );
wxTheClipboard->Flush(); /* the data in clipboard will stay
* available after the
* application exits */
* available after the application exits */
wxTheClipboard->Close();
}
}
+232 -26
View File
@@ -1,9 +1,9 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -43,10 +43,15 @@
#endif
#include <3d_struct.h>
#include <modelparsers.h>
#include <class_module.h>
#include <CBBox.h>
class BOARD_DESIGN_SETTINGS;
class EDA_3D_FRAME;
class S3D_VERTEX;
class SHAPE_POLY_SET;
class REPORTER;
class VIA;
class D_PAD;
@@ -61,8 +66,14 @@ enum GL_LIST_ID
GL_ID_BOARD, // List id for copper layers
GL_ID_TECH_LAYERS, // List id for non copper layers (masks...)
GL_ID_AUX_LAYERS, // List id for user layers (draw, eco, comment)
GL_ID_3DSHAPES_SOLID, // List id for 3D shapes, non transparent entities
GL_ID_3DSHAPES_TRANSP, // List id for 3D shapes, transparent entities
GL_ID_3DSHAPES_SOLID_FRONT, // List id for 3D shapes, non transparent entities
GL_ID_3DSHAPES_TRANSP_FRONT,// List id for 3D shapes, transparent entities
GL_ID_3DSHAPES_SOLID_BACK, // List id for 3D shapes, non transparent entities
GL_ID_3DSHAPES_TRANSP_BACK, // List id for 3D shapes, transparent entities
GL_ID_SHADOW_FRONT,
GL_ID_SHADOW_BACK,
GL_ID_SHADOW_BOARD,
GL_ID_BODY, // Body only list
GL_ID_END
};
@@ -70,11 +81,37 @@ class EDA_3D_CANVAS : public wxGLCanvas
{
private:
bool m_init;
GLuint m_glLists[GL_ID_END]; // GL lists
bool m_reportWarnings; ///< true to report all warnings when building the 3D scene
///< false to report errors only
GLuint m_glLists[GL_ID_END]; ///< GL lists
wxGLContext* m_glRC;
wxRealPoint m_draw3dOffset; // offset to draw the 3D mesh.
double m_ZBottom; // position of the back layer
double m_ZTop; // position of the front layer
wxRealPoint m_draw3dOffset; ///< offset to draw the 3D mesh.
double m_ZBottom; ///< position of the back layer
double m_ZTop; ///< position of the front layer
GLuint m_text_pcb; ///< an index to the texture generated for pcb texts
GLuint m_text_silk; ///< an index to the texture generated for silk layers
// Index to the textures generated for shadows
bool m_shadow_init;
GLuint m_text_fake_shadow_front;
GLuint m_text_fake_shadow_back;
GLuint m_text_fake_shadow_board;
CBBOX m_boardAABBox; ///< Axis Align Bounding Box of the board
CBBOX m_fastAABBox; ///< Axis Align Bounding Box that contain the other bounding boxes
CBBOX m_fastAABBox_Shadow; ///< A bit scalled version of the m_fastAABBox
S3D_VERTEX m_lightPos;
/// Stores the list of parsers for each new file name (dont repeat files already loaded)
std::vector<S3D_MODEL_PARSER *> m_model_parsers_list;
std::vector<wxString> m_model_filename_list;
void create_and_render_shadow_buffer( GLuint *aDst_gl_texture,
GLuint aTexture_size, bool aDraw_body, int aBlurPasses );
void calcBBox();
public:
EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList = 0 );
@@ -90,16 +127,26 @@ public:
* @param aGlList = the list to clear.
* if 0 (default) all lists are cleared
*/
void ClearLists( GLuint aGlList = 0 );
void ClearLists( int aGlList = 0 );
// Event functions:
void OnPaint( wxPaintEvent& event );
void OnEraseBackground( wxEraseEvent& event );
void OnChar( wxKeyEvent& event );
void OnMouseWheel( wxMouseEvent& event );
#ifdef USE_OSX_MAGNIFY_EVENT
void OnMagnify( wxMouseEvent& event );
#endif
void OnMouseMove( wxMouseEvent& event );
void OnRightClick( wxMouseEvent& event );
void OnPopUpMenu( wxCommandEvent& event );
/**
* Function TakeScreenshot
*
* creates a screenshot of the current 3D view and save to file as png or jpeg or image
* is copied to the clipboard
*/
void TakeScreenshot( wxCommandEvent& event );
void OnEnterWindow( wxMouseEvent& event );
@@ -112,58 +159,217 @@ public:
/**
* Function CreateDrawGL_List
* Prepares the parameters of the OpenGL draw list
* creates the OpenGL draw list items (board, grid ...
* creates the OpenGL draw list items (board, grid ...)
* @param aErrorMessages = a REPORTER which will filled with error messages,
* if any
* @param aActivity = a REPORTER to display activity state
*/
void CreateDrawGL_List();
void CreateDrawGL_List( REPORTER* aErrorMessages, REPORTER* aActivity );
void InitGL();
void ReportWarnings( bool aReport ) { m_reportWarnings = aReport; }
void SetLights();
void SetOffset(double aPosX, double aPosY)
{
m_draw3dOffset.x = aPosX;
m_draw3dOffset.y = aPosY;
}
/** @return the INFO3D_VISU which contains the current parameters
* to draw the 3D view og the board
*/
INFO3D_VISU& GetPrm3DVisu() const;
private:
/**
* Function BuildBoard3DView
* return true if we are in realistic mode render
*/
bool isRealisticMode() const;
/**
* @return true if aItem should be displayed
* @param aItem = an item of DISPLAY3D_FLG enum
*/
bool isEnabled( DISPLAY3D_FLG aItem ) const;
/** Helper function
* @return true if aLayer should be displayed, false otherwise
*/
bool is3DLayerEnabled( LAYER_ID aLayer ) const;
/**
* @return the size of the board in pcb units
*/
wxSize getBoardSize() const;
/**
* @return the position of the board center in pcb units
*/
wxPoint getBoardCenter() const;
/**
* Helper function setGLTechLayersColor
* Initialize the color to draw the non copper layers
* in realistic mode and normal mode.
*/
void setGLTechLayersColor( LAYER_NUM aLayer );
/**
* Helper function setGLCopperColor
* Initialize the copper color to draw the board
* in realistic mode (a golden yellow color )
*/
void setGLCopperColor();
/**
* Helper function setGLEpoxyColor
* Initialize the color to draw the epoxy body board in realistic mode.
*/
void setGLEpoxyColor( float aTransparency = 1.0 );
/**
* Helper function setGLSolderMaskColor
* Initialize the color to draw the solder mask layers in realistic mode.
*/
void setGLSolderMaskColor( float aTransparency = 1.0 );
/**
* Function buildBoard3DView
* Called by CreateDrawGL_List()
* Populates the OpenGL GL_ID_BOARD draw list with board items only on copper layers.
* 3D footprint shapes, tech layers and aux layers are not on this list
* Fills aErrorMessages with error messages created by some calculation function
* display activity state
* @param aBoardList =
* @param aBodyOnlyList =
* @param aErrorMessages = a REPORTER to add error and warning messages
* created by the build process (can be NULL)
* @param aActivity = a REPORTER to display activity state
*/
void BuildBoard3DView();
void buildBoard3DView( GLuint aBoardList, GLuint aBodyOnlyList,
REPORTER* aErrorMessages, REPORTER* aActivity );
/**
* Function BuildTechLayers3DView
* Function buildTechLayers3DView
* Called by CreateDrawGL_List()
* Populates the OpenGL GL_ID_BOARD draw list with items on tech layers
* Populates the OpenGL GL_ID_TECH_LAYERS draw list with items on tech layers
* @param aErrorMessages = a REPORTER to add error and warning messages
* created by the build process (can be NULL)
* @param aActivity = a REPORTER to display activity state
*/
void BuildTechLayers3DView();
void buildTechLayers3DView( REPORTER* aErrorMessages, REPORTER* aActivity );
/**
* Function BuildFootprintShape3DList
* Function buildBoardThroughHolesPolygonList
* Helper funtion to build the list of the board through holes polygons
* @param allBoardHoles = the SHAPE_POLY_SET to populate
* @param aSegCountPerCircle = the number of segments to approximate a circle
* @param aOptimizeLargeCircles = true to use more than aSegCountPerCircle
* for large circles (a large circle dimatere is > 1mm )
*/
void buildBoardThroughHolesPolygonList( SHAPE_POLY_SET& allBoardHoles,
int aSegCountPerCircle, bool aOptimizeLargeCircles );
/**
* Function buildShadowList
* Called by CreateDrawGL_List()
*/
void buildShadowList( GLuint aFrontList, GLuint aBacklist, GLuint aBoardList );
/**
* Function buildFootprintShape3DList
* Called by CreateDrawGL_List()
* Fills the OpenGL GL_ID_3DSHAPES_SOLID and GL_ID_3DSHAPES_TRANSP
* draw lists with 3D footprint shapes
* @param aOpaqueList is the gl list for non transparent items
* @param aTransparentList is the gl list for non transparent items,
* @param aErrorMessages = a REPORTER to add error and warning messages
* created by the build process (can be NULL)
* @param aActivity = a REPORTER to display activity state
* which need to be drawn after all other items
*/
void BuildFootprintShape3DList( GLuint aOpaqueList,
GLuint aTransparentList);
void buildFootprintShape3DList( GLuint aOpaqueList,
GLuint aTransparentList,
REPORTER* aErrorMessages, REPORTER* aActivity );
/**
* Function BuildBoard3DAuxLayers
* Function buildBoard3DAuxLayers
* Called by CreateDrawGL_List()
* Fills the OpenGL GL_ID_AUX_LAYERS draw list
* with items on aux layers only
* @param aErrorMessages = a REPORTER to add error and warning messages
* created by the build process (can be NULL)
* @param aActivity = a REPORTER to display activity state
* which need to be drawn after all other items
*/
void BuildBoard3DAuxLayers();
void buildBoard3DAuxLayers( REPORTER* aErrorMessages, REPORTER* aActivity );
void Draw3DGrid( double aGriSizeMM );
void Draw3DAxis();
void draw3DGrid( double aGriSizeMM );
void draw3DAxis();
void Draw3DViaHole( const VIA * aVia );
void Draw3DPadHole( const D_PAD * aPad );
/**
* Helper function BuildPadShapeThickOutlineAsPolygon:
* Build a pad outline as non filled polygon, to draw pads on silkscreen layer
* with a line thickness = aWidth
* Used only to draw pads outlines on silkscreen layers.
*/
void buildPadShapeThickOutlineAsPolygon( const D_PAD* aPad,
SHAPE_POLY_SET& aCornerBuffer,
int aWidth,
int aCircleToSegmentsCount,
double aCorrectionFactor );
/**
* Helper function draw3DViaHole:
* Draw the via hole:
* Build a vertical hole (a cylinder) between the first and the last via layers
*/
void draw3DViaHole( const VIA * aVia );
/**
* Helper function draw3DPadHole:
* Draw the pad hole:
* Build a vertical hole (round or oblong) between the front and back layers
*/
void draw3DPadHole( const D_PAD * aPad );
/**
* function render3DComponentShape
* insert mesh in gl list
* @param module
* @param aIsRenderingJustNonTransparentObjects = true to load non transparent objects
* @param aIsRenderingJustTransparentObjects = true to load non transparent objects
* in openGL, transparent objects should be drawn *after* non transparent objects
*/
void render3DComponentShape( MODULE* module,
bool aIsRenderingJustNonTransparentObjects,
bool aIsRenderingJustTransparentObjects );
/**
* function read3DComponentShape
* read the 3D component shape(s) of the footprint (physical shape).
* @param module
* @return true if load was succeeded, false otherwise
*/
bool read3DComponentShape( MODULE* module );
/**
* function generateFakeShadowsTextures
* creates shadows of the board an footprints
* for aesthetical purpose
* @param aErrorMessages = a REPORTER to add error and warning messages
* created by the build process (can be NULL)
* @param aActivity = a REPORTER to display activity state
*/
void generateFakeShadowsTextures( REPORTER* aErrorMessages, REPORTER* aActivity );
DECLARE_EVENT_TABLE()
};
void CheckGLError(const char *aFileName, int aLineNumber);
#endif /* _3D_CANVAS_H_ */
+61 -55
View File
@@ -1,11 +1,7 @@
/**
* @file 3d_class.cpp
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -25,55 +21,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file 3d_class.cpp
*/
#include <fctsys.h>
#include <3d_viewer.h>
S3D_MATERIAL::S3D_MATERIAL( S3D_MASTER* father, const wxString& name ) :
EDA_ITEM( father, NOT_USED )
{
m_DiffuseColor.x = m_DiffuseColor.y = m_DiffuseColor.z = 1.0;
m_SpecularColor.x = m_SpecularColor.y = m_SpecularColor.z = 1.0;
m_AmbientIntensity = 1.0;
m_Transparency = 0.0;
m_Shininess = 1.0;
m_Name = name;
}
void S3D_MATERIAL::SetMaterial()
{
S3D_MASTER * s3dParent = (S3D_MASTER *) GetParent();
s3dParent->SetLastTransparency( m_Transparency );
if( ! s3dParent->IsOpenGlAllowed() )
return;
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
glColor4f( m_DiffuseColor.x * m_AmbientIntensity,
m_DiffuseColor.y * m_AmbientIntensity,
m_DiffuseColor.z * m_AmbientIntensity,
1.0 - m_Transparency );
#if 0
glColorMaterial( GL_FRONT_AND_BACK, GL_SPECULAR );
glColor3f( m_SpecularColor.x, m_SpecularColor.y, m_SpecularColor.z );
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
#endif
}
bool S3D_MASTER::IsOpenGlAllowed()
{
if( m_loadNonTransparentObjects ) // return true for non transparent objects only
{
if( m_lastTransparency == 0.0 )
return true;
}
if( m_loadTransparentObjects ) // return true for transparent objects only
if( m_lastTransparency != 0.0 )
return true;
return false;
}
#include "3d_viewer.h"
#include "3d_struct.h"
#include "modelparsers.h"
void S3D_MASTER::Insert( S3D_MATERIAL* aMaterial )
@@ -98,10 +54,18 @@ S3D_MASTER::S3D_MASTER( EDA_ITEM* aParent ) :
EDA_ITEM( aParent, NOT_USED )
{
m_MatScale.x = m_MatScale.y = m_MatScale.z = 1.0;
m_lastTransparency = 0.0;
m_3D_Drawings = NULL;
m_Materials = NULL;
m_parser = NULL;
m_ShapeType = FILE3D_NONE;
m_use_modelfile_diffuseColor = true;
m_use_modelfile_emissiveColor = true;
m_use_modelfile_specularColor = true;
m_use_modelfile_ambientIntensity = true;
m_use_modelfile_transparency = true;
m_use_modelfile_shininess = true;
}
@@ -114,12 +78,14 @@ S3D_MASTER:: ~S3D_MASTER()
{
next = m_3D_Drawings->Next();
delete m_3D_Drawings;
m_3D_Drawings = 0;
}
for( ; m_Materials != NULL; m_Materials = nextmat )
{
nextmat = m_Materials->Next();
delete m_Materials;
m_Materials = NULL;
}
}
@@ -150,19 +116,59 @@ void S3D_MASTER::SetShape3DName( const wxString& aShapeName )
return;
wxFileName fn = m_Shape3DName;
wxString ext = fn.GetExt();
m_Shape3DNameExtension = fn.GetExt();
if( ext == wxT( "wrl" ) || ext == wxT( "x3d" ) )
if( m_Shape3DNameExtension == wxT( "wrl" ) ||
m_Shape3DNameExtension == wxT( "x3d" ) )
m_ShapeType = FILE3D_VRML;
else if( ext == wxT( "idf" ) )
else if( m_Shape3DNameExtension == wxT( "idf" ) )
m_ShapeType = FILE3D_IDF;
else
m_ShapeType = FILE3D_UNKNOWN;
// Expand any environment variables embedded in footprint's m_Shape3DName field.
// To ensure compatibility with most of footprint's m_Shape3DName field,
// if the m_Shape3DName is not an absolute path the default path
// given by the environment variable KISYS3DMOD will be used
if( m_Shape3DName.StartsWith( wxT("${") ) )
m_Shape3DFullFilename = wxExpandEnvVars( m_Shape3DName );
else
m_Shape3DFullFilename = m_Shape3DName;
wxFileName fnFull( m_Shape3DFullFilename );
if( !( fnFull.IsAbsolute() || m_Shape3DFullFilename.StartsWith( wxT(".") ) ) )
{
wxString default_path;
wxGetEnv( KISYS3DMOD, &default_path );
if( !( default_path.IsEmpty() ) )
{
if( !default_path.EndsWith( wxT("/") ) && !default_path.EndsWith( wxT("\\") ) )
default_path += wxT("/");
m_Shape3DFullFilename = default_path + m_Shape3DFullFilename;
}
}
return;
}
const wxString S3D_MASTER::GetShape3DFullFilename()
{
return m_Shape3DFullFilename;
}
const wxString S3D_MASTER::GetShape3DExtension()
{
return m_Shape3DNameExtension;
}
STRUCT_3D_SHAPE::STRUCT_3D_SHAPE( EDA_ITEM* aParent ) :
EDA_ITEM( aParent, NOT_USED )
{
+918 -969
View File
File diff suppressed because it is too large Load Diff
+132 -125
View File
@@ -33,35 +33,28 @@
#include <3d_viewer.h>
#include <info3d_visu.h>
#include <3d_draw_basic_functions.h>
// Imported function:
extern void TransfertToGLlist( std::vector<S3D_VERTEX>& aVertices, double aBiuTo3DUnits );
extern void CheckGLError();
#include <modelparsers.h>
// Number of segments to approximate a circle by segments
#define SEGM_PER_CIRCLE 16
#define SEGM_PER_CIRCLE 24
#ifndef CALLBACK
#define CALLBACK
#endif
// Variables used to pass a value to call back openGL functions
static float s_textureScale;
static double s_currentZpos;
static double s_biuTo3Dunits;
bool s_useTextures;
// CALLBACK functions for GLU_TESS
static void CALLBACK tessBeginCB( GLenum which );
static void CALLBACK tessEndCB();
static void CALLBACK tessErrorCB( GLenum errorCode );
static void CALLBACK tessCPolyPt2Vertex( const GLvoid* data );
// 2 helper functions to set the current normal vector for gle items
static inline void SetNormalZpos()
{
glNormal3f( 0.0, 0.0, 1.0 );
}
static inline void SetNormalZneg()
{
glNormal3f( 0.0, 0.0, -1.0 );
}
void TransfertToGLlist( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits );
/* Draw3D_VerticalPolygonalCylinder is a helper function.
*
@@ -69,7 +62,7 @@ static inline void SetNormalZneg()
* from Z position = aZpos to aZpos + aHeight
* Used to create the vertical sides of 3D horizontal shapes with thickness.
*/
static void Draw3D_VerticalPolygonalCylinder( const CPOLYGONS_LIST& aPolysList,
static void Draw3D_VerticalPolygonalCylinder( const SHAPE_POLY_SET& aPolysList,
int aHeight, int aZpos,
bool aInside, double aBiuTo3DUnits )
{
@@ -94,42 +87,61 @@ static void Draw3D_VerticalPolygonalCylinder( const CPOLYGONS_LIST& aPolysList,
coords[3].z = coords[0].z;
// Draw the vertical polygonal side
int startContour = 0;
for( unsigned ii = 0; ii < aPolysList.GetCornersCount(); ii++ )
for( int idx = 0; idx < aPolysList.OutlineCount(); idx++ )
{
unsigned jj = ii + 1;
// Each polygon in aPolysList is a polygon with holes
const SHAPE_POLY_SET::POLYGON& curr_polywithholes = aPolysList.CPolygon( idx );
if( aPolysList.IsEndContour( ii ) || jj >= aPolysList.GetCornersCount() )
// Draw the outline of each simple polygon inside the polygon with holes:
for( unsigned ipoly = 0; ipoly < curr_polywithholes.size(); ipoly++ )
{
jj = startContour;
startContour = ii + 1;
const SHAPE_LINE_CHAIN& path = curr_polywithholes[ipoly]; // a simple polygon
for( int jj = 0; jj < path.PointCount(); jj++ )
{
const VECTOR2I& a = path.CPoint( jj );
const VECTOR2I& b = path.CPoint( jj + 1 );
// Build the 4 vertices of each GL_QUAD
coords[0].x = a.x;
coords[0].y = -a.y;
coords[1].x = coords[0].x;
coords[1].y = coords[0].y; // only z change
coords[2].x = b.x;
coords[2].y = -b.y;
coords[3].x = coords[2].x;
coords[3].y = coords[2].y; // only z change
// Creates the GL_QUAD
TransfertToGLlist( coords, aBiuTo3DUnits );
}
}
// Build the 4 vertices of each GL_QUAD
coords[0].x = aPolysList.GetX( ii );
coords[0].y = -aPolysList.GetY( ii );
coords[1].x = coords[0].x;
coords[1].y = coords[0].y; // only z change
coords[2].x = aPolysList.GetX( jj );
coords[2].y = -aPolysList.GetY( jj );
coords[3].x = coords[2].x;
coords[3].y = coords[2].y; // only z change
// Creates the GL_QUAD
TransfertToGLlist( coords, aBiuTo3DUnits );
}
}
void SetGLColor( EDA_COLOR_T color, double alpha )
{
double red, green, blue;
const StructColors &colordata = g_ColorRefs[ColorGetBase( color )];
red = colordata.m_Red / 255.0;
blue = colordata.m_Blue / 255.0;
green = colordata.m_Green / 255.0;
glColor4f( red, green, blue, alpha );
float red = colordata.m_Red / 255.0;
float blue = colordata.m_Blue / 255.0;
float green = colordata.m_Green / 255.0;
glColor4f( red, green, blue, (float)alpha );
}
void SetGLColor( S3D_COLOR& aColor, float aTransparency )
{
glColor4f( aColor.m_Red, aColor.m_Green, aColor.m_Blue, aTransparency );
}
void SetGLTexture( GLuint text_id, float scale )
{
glEnable( GL_TEXTURE_2D );
glBindTexture( GL_TEXTURE_2D, text_id );
s_textureScale = scale; // for Tess callback functions
}
@@ -141,9 +153,15 @@ void SetGLColor( EDA_COLOR_T color, double alpha )
* The top side is located at aZpos + aThickness / 2
* The bottom side is located at aZpos - aThickness / 2
*/
void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList,
int aZpos, int aThickness, double aBiuTo3DUnits )
void Draw3D_SolidHorizontalPolyPolygons( const SHAPE_POLY_SET& aPolysList,
int aZpos, int aThickness, double aBiuTo3DUnits,
bool aUseTextures,
float aNormal_Z_Orientation )
{
// for Tess callback functions:
s_biuTo3Dunits = aBiuTo3DUnits;
s_useTextures = aUseTextures;
GLUtesselator* tess = gluNewTess();
gluTessCallback( tess, GLU_TESS_BEGIN, ( void (CALLBACK*) () )tessBeginCB );
@@ -151,58 +169,63 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList,
gluTessCallback( tess, GLU_TESS_ERROR, ( void (CALLBACK*) () )tessErrorCB );
gluTessCallback( tess, GLU_TESS_VERTEX, ( void (CALLBACK*) () )tessCPolyPt2Vertex );
GLdouble v_data[3];
double zpos = ( aZpos + (aThickness / 2) ) * aBiuTo3DUnits;
g_Parm_3D_Visu.m_CurrentZpos = zpos;
v_data[2] = aZpos + (aThickness / 2);
GLdouble v_data[3];
double zpos = ( aZpos + (aThickness / 2.0) ) * aBiuTo3DUnits;
s_currentZpos = zpos; // for Tess callback functions
v_data[2] = zpos;
// Set normal to toward positive Z axis, for a solid object only (to draw the top side)
if( aThickness )
SetNormalZpos();
// Set normal toward positive Z axis, for a solid object on the top side
// gluTessProperty(tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_ODD);
//gluTessProperty( tess, GLU_TESS_BOUNDARY_ONLY, GL_FALSE );
gluTessProperty( tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_ODD );
glNormal3f( 0.0, 0.0, aNormal_Z_Orientation );
// Draw solid areas contained in this list
CPOLYGONS_LIST polylist = aPolysList; // temporary copy for gluTessVertex
SHAPE_POLY_SET polylist = aPolysList; // temporary copy for gluTessVertex
for( int side = 0; side < 2; side++ )
{
int startContour = 1;
for( unsigned ii = 0; ii < polylist.GetCornersCount(); ii++ )
for ( int idx = 0; idx < polylist.OutlineCount(); ++idx )
{
if( startContour == 1 )
gluTessBeginPolygon( tess, NULL );
SHAPE_POLY_SET::POLYGON& curr_polywithholes = polylist.Polygon( idx ); // a polygon with holes
for( unsigned ipoly = 0; ipoly < curr_polywithholes.size(); ipoly++ )
{
gluTessBeginPolygon( tess, NULL );
SHAPE_LINE_CHAIN& curr_poly = curr_polywithholes[ipoly]; // a simple polygon
gluTessBeginContour( tess );
startContour = 0;
}
v_data[0] = polylist.GetX( ii ) * aBiuTo3DUnits;
v_data[1] = -polylist.GetY( ii ) * aBiuTo3DUnits;
// gluTessVertex store pointers on data, not data, so do not store
// different corners values in a temporary variable
// but send pointer on each CPolyPt value in polylist
// before calling gluDeleteTess
gluTessVertex( tess, v_data, &polylist[ii] );
for( int ipt = 0; ipt < curr_poly.PointCount(); ipt++ )
{
v_data[0] = curr_poly.Point( ipt ).x * aBiuTo3DUnits;
v_data[1] = -curr_poly.Point( ipt ).y * aBiuTo3DUnits;
// gluTessVertex store pointers on data, not data, so do not store
// different corners values in a temporary variable
// but send pointer on each CPolyPt value in polylist
// before calling gluDeleteTess
gluTessVertex( tess, v_data, &curr_poly.Point( ipt ) );
}
if( polylist.IsEndContour( ii ) )
{
gluTessEndContour( tess );
gluTessEndPolygon( tess );
startContour = 1;
}
gluTessEndPolygon( tess );
}
if( aThickness == 0 )
break;
// Prepare the bottom side of solid areas
zpos = ( aZpos - (aThickness / 2) ) * aBiuTo3DUnits;
g_Parm_3D_Visu.m_CurrentZpos = zpos;
zpos = ( aZpos - (aThickness / 2.0) ) * aBiuTo3DUnits;
s_currentZpos = zpos; // for Tess callback functions
v_data[2] = zpos;
// Now;, set normal to toward negative Z axis, for the solid object bottom side
SetNormalZneg();
glNormal3f( 0.0, 0.0, -aNormal_Z_Orientation );
}
gluDeleteTess( tess );
@@ -211,22 +234,8 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList,
return;
// Build the 3D data : vertical side
Draw3D_VerticalPolygonalCylinder( polylist, aThickness, aZpos - (aThickness / 2), false, aBiuTo3DUnits );
}
/* draw the solid polygon found in aPolysList
* The first polygon is the main polygon, others are holes
* See Draw3D_SolidHorizontalPolyPolygons for more info
*/
void Draw3D_SolidHorizontalPolygonWithHoles( const CPOLYGONS_LIST& aPolysList,
int aZpos, int aThickness,
double aBiuTo3DUnits )
{
CPOLYGONS_LIST polygon;
ConvertPolysListWithHolesToOnePolygon( aPolysList, polygon );
Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, aThickness, aBiuTo3DUnits );
Draw3D_VerticalPolygonalCylinder( polylist, aThickness, aZpos - (aThickness / 2.0),
true, aBiuTo3DUnits );
}
@@ -240,7 +249,7 @@ void Draw3D_ZaxisCylinder( wxPoint aCenterPos, int aRadius,
int aZpos, double aBiuTo3DUnits )
{
const int slice = SEGM_PER_CIRCLE;
CPOLYGONS_LIST outer_cornerBuffer;
SHAPE_POLY_SET outer_cornerBuffer;
TransformCircleToPolygon( outer_cornerBuffer, aCenterPos,
aRadius + (aThickness / 2), slice );
@@ -248,42 +257,41 @@ void Draw3D_ZaxisCylinder( wxPoint aCenterPos, int aRadius,
std::vector<S3D_VERTEX> coords;
coords.resize( 4 );
CPOLYGONS_LIST inner_cornerBuffer;
SHAPE_POLY_SET inner_cornerBuffer;
if( aThickness ) // build the the vertical inner polygon (hole)
TransformCircleToPolygon( inner_cornerBuffer, aCenterPos,
aRadius - (aThickness / 2), slice );
if( aHeight )
{
// Draw the vertical outer side
Draw3D_VerticalPolygonalCylinder( outer_cornerBuffer,
aHeight, aZpos, false, aBiuTo3DUnits );
aHeight, aZpos, false, aBiuTo3DUnits );
if( aThickness )
// Draws the vertical inner side (hole)
Draw3D_VerticalPolygonalCylinder( inner_cornerBuffer,
aHeight, aZpos, true, aBiuTo3DUnits );
aHeight, aZpos, true, aBiuTo3DUnits );
}
if( aThickness )
{
// draw top (front) and bottom (back) horizontal sides (rings)
SetNormalZpos();
outer_cornerBuffer.Append( inner_cornerBuffer );
CPOLYGONS_LIST polygon;
outer_cornerBuffer.AddHole( inner_cornerBuffer.COutline( 0 ) );
ConvertPolysListWithHolesToOnePolygon( outer_cornerBuffer, polygon );
// draw top (front) horizontal ring
Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos + aHeight, 0, aBiuTo3DUnits );
Draw3D_SolidHorizontalPolyPolygons( outer_cornerBuffer, aZpos + aHeight,
0, aBiuTo3DUnits, false, 1.0f );
if( aHeight )
{
// draw bottom (back) horizontal ring
SetNormalZneg();
Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, 0, aBiuTo3DUnits );
Draw3D_SolidHorizontalPolyPolygons( outer_cornerBuffer, aZpos,
0, aBiuTo3DUnits, false, -1.0f );
}
}
SetNormalZpos();
}
@@ -301,20 +309,20 @@ void Draw3D_ZaxisOblongCylinder( wxPoint aAxis1Pos, wxPoint aAxis2Pos,
const int slice = SEGM_PER_CIRCLE;
// Build the points to approximate oblong cylinder by segments
CPOLYGONS_LIST outer_cornerBuffer;
SHAPE_POLY_SET cornerBuffer;
int segm_width = (aRadius * 2) + aThickness;
TransformRoundedEndsSegmentToPolygon( outer_cornerBuffer, aAxis1Pos,
TransformRoundedEndsSegmentToPolygon( cornerBuffer, aAxis1Pos,
aAxis2Pos, slice, segm_width );
// Draw the oblong outer cylinder
if( aHeight )
Draw3D_VerticalPolygonalCylinder( outer_cornerBuffer, aHeight, aZpos,
Draw3D_VerticalPolygonalCylinder( cornerBuffer, aHeight, aZpos,
false, aBiuTo3DUnits );
if( aThickness )
{
CPOLYGONS_LIST inner_cornerBuffer;
SHAPE_POLY_SET inner_cornerBuffer;
segm_width = aRadius * 2;
TransformRoundedEndsSegmentToPolygon( inner_cornerBuffer, aAxis1Pos,
aAxis2Pos, slice, segm_width );
@@ -326,24 +334,19 @@ void Draw3D_ZaxisOblongCylinder( wxPoint aAxis1Pos, wxPoint aAxis2Pos,
// Build the horizontal full polygon shape
// (outer polygon shape - inner polygon shape)
outer_cornerBuffer.Append( inner_cornerBuffer );
CPOLYGONS_LIST polygon;
ConvertPolysListWithHolesToOnePolygon( outer_cornerBuffer, polygon );
cornerBuffer.AddHole( inner_cornerBuffer.COutline( 0 ) );
// draw top (front) horizontal side (ring)
SetNormalZpos();
Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos + aHeight, 0, aBiuTo3DUnits );
Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos + aHeight, 0, aBiuTo3DUnits, false,
1.0f );
if( aHeight )
{
// draw bottom (back) horizontal side (ring)
SetNormalZneg();
Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, 0, aBiuTo3DUnits );
Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, 0, aBiuTo3DUnits, false,
-1.0f );
}
}
SetNormalZpos();
}
@@ -356,12 +359,12 @@ void Draw3D_ZaxisOblongCylinder( wxPoint aAxis1Pos, wxPoint aAxis2Pos,
void Draw3D_SolidSegment( const wxPoint& aStart, const wxPoint& aEnd,
int aWidth, int aThickness, int aZpos, double aBiuTo3DUnits )
{
CPOLYGONS_LIST cornerBuffer;
const int slice = SEGM_PER_CIRCLE;
SHAPE_POLY_SET cornerBuffer;
const int slice = SEGM_PER_CIRCLE;
TransformRoundedEndsSegmentToPolygon( cornerBuffer, aStart, aEnd, slice, aWidth );
Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits );
Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits, false, 1.0f );
}
@@ -371,11 +374,11 @@ void Draw3D_ArcSegment( const wxPoint& aCenterPos, const wxPoint& aStartPoint,
{
const int slice = SEGM_PER_CIRCLE;
CPOLYGONS_LIST cornerBuffer;
SHAPE_POLY_SET cornerBuffer;
TransformArcToPolygon( cornerBuffer, aCenterPos, aStartPoint, aArcAngle,
slice, aWidth );
Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits );
Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits, false, 1.0f );
}
@@ -398,11 +401,15 @@ void CALLBACK tessEndCB()
void CALLBACK tessCPolyPt2Vertex( const GLvoid* data )
{
// cast back to double type
const CPolyPt* ptr = (const CPolyPt*) data;
const VECTOR2I* ptr = (const VECTOR2I*) data;
glVertex3d( ptr->x * g_Parm_3D_Visu.m_BiuTo3Dunits,
-ptr->y * g_Parm_3D_Visu.m_BiuTo3Dunits,
g_Parm_3D_Visu.m_CurrentZpos );
if( s_useTextures )
{
glTexCoord2f( ptr->x * s_biuTo3Dunits * s_textureScale,
-ptr->y * s_biuTo3Dunits * s_textureScale);
}
glVertex3d( ptr->x * s_biuTo3Dunits, -ptr->y * s_biuTo3Dunits, s_currentZpos );
}
+21 -16
View File
@@ -36,27 +36,17 @@
* @param aZpos = z position in board internal units
* @param aThickness = thickness in board internal units
* @param aBiuTo3DUnits = board internal units to 3D units scaling value
* @param aUseTextures = true to use textxures for the polygons
* @param aNormal_Z_Orientation = the normal Z orientation to apply
* If aThickness = 0, a polygon area is drawn in a XY plane at Z position = aZpos.
* If aThickness > 0, a solid object is drawn.
* The top side is located at aZpos + aThickness / 2
* The bottom side is located at aZpos - aThickness / 2
*/
void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList,
int aZpos, int aThickness, double aBiuTo3DUnits );
/** draw the solid polygon found in aPolysList
* The first polygonj is the main polygon, others are holes
* @param aPolysList = the polygon with holes to draw
* @param aZpos = z position in board internal units
* @param aThickness = thickness in board internal units
* @param aBiuTo3DUnits = board internal units to 3D units scaling value
* If aThickness = 0, a polygon area is drawn in a XY plane at Z position = aZpos.
* If aThickness > 0, a solid object is drawn.
* The top side is located at aZpos + aThickness / 2
* The bottom side is located at aZpos - aThickness / 2
*/
void Draw3D_SolidHorizontalPolygonWithHoles( const CPOLYGONS_LIST& aPolysList,
int aZpos, int aThickness, double aBiuTo3DUnits );
void Draw3D_SolidHorizontalPolyPolygons( const SHAPE_POLY_SET& aPolysList,
int aZpos, int aThickness, double aBiuTo3DUnits,
bool aUseTextures,
float aNormal_Z_Orientation );
/** draw a thick segment using 3D primitives, in a XY plane
* @param aStart = YX position of start point in board units
@@ -125,5 +115,20 @@ void Draw3D_ZaxisOblongCylinder( wxPoint aAxis1Pos, wxPoint aAxis2Pos,
*/
void SetGLColor( EDA_COLOR_T aColor, double aTransparency = 1.0 );
/**
* Set the current 3D color from a S3D_COLOR color, with optional transparency
* @param aColor = a S3D_COLOR RGB color index
* @param aTransparency = the color transparency (default = 1.0 = no transparency)
*/
void SetGLColor( S3D_COLOR& aColor, float aTransparency );
/**
* Set a texture id and a scale to apply when rendering the polygons
* @param text_id = texture ID created by glGenTextures
* @param scale = scale to apply to texture coords
*/
void SetGLTexture( GLuint text_id, float scale );
#endif // _3D_DRAW_BASIC_FUNCTIONS_H_
+637
View File
@@ -0,0 +1,637 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014-2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file 3d_draw_board_body.cpp
*
*/
#include <fctsys.h>
#include <common.h>
#include <trigo.h>
#include <pcbstruct.h>
#include <drawtxt.h>
#include <layers_id_colors_and_visibility.h>
#include <wxBasePcbFrame.h>
#include <class_board.h>
#include <class_module.h>
#include <class_track.h>
#include <class_edge_mod.h>
#include <class_zone.h>
#include <class_drawsegment.h>
#include <class_pcb_text.h>
#include <colors_selection.h>
#include <convert_basic_shapes_to_polygon.h>
#define GLM_FORCE_RADIANS
#include <gal/opengl/glm/gtc/matrix_transform.hpp>
#include <gal/opengl/opengl_compositor.h>
#ifdef __WINDOWS__
#include <GL/glew.h> // must be included before gl.h
#endif
#include <3d_viewer.h>
#include <3d_canvas.h>
#include <info3d_visu.h>
#include <trackball.h>
#include <3d_draw_basic_functions.h>
#include <geometry/shape_poly_set.h>
#include <geometry/shape_file_io.h>
#include <CImage.h>
#include <reporter.h>
// An option for all operations on polygons:
// when useFastModeForPolygons = true, calculations can be *a lot* faster.
// but created polygons can be not stricty simple (can share edges)
// Although stricty simple are better for glu tesselation functions, I do not see
// any issue when allowing not stricty simple polygons.
// But I see *very* long calculations when setting useFastMode to false.
// So, be careful if changing thie option
bool useFastModeForPolygons = true;
/* returns the Z orientation parameter 1.0 or -1.0 for aLayer
* Z orientation is 1.0 for all layers but "back" layers:
* B_Cu , B_Adhes, B_Paste ), B_SilkS
* used to calculate the Z orientation parameter for glNormal3f
*/
GLfloat Get3DLayer_Z_Orientation( LAYER_NUM aLayer );
void EDA_3D_CANVAS::buildBoardThroughHolesPolygonList( SHAPE_POLY_SET& allBoardHoles,
int aSegCountPerCircle, bool aOptimizeLargeCircles )
{
// hole diameter value to change seg count by circle:
int small_hole_limit = Millimeter2iu( 1.0 );
int copper_thickness = GetPrm3DVisu().GetCopperThicknessBIU();
BOARD* pcb = GetBoard();
// Build holes of through vias:
for( TRACK* track = pcb->m_Track; track; track = track->Next() )
{
if( track->Type() != PCB_VIA_T )
continue;
VIA *via = static_cast<VIA*>( track );
if( via->GetViaType() != VIA_THROUGH )
continue;
int holediameter = via->GetDrillValue();
int hole_outer_radius = (holediameter + copper_thickness) / 2;
TransformCircleToPolygon( allBoardHoles,
via->GetStart(), hole_outer_radius,
aSegCountPerCircle );
}
// Build holes of through pads:
for( MODULE* footprint = pcb->m_Modules; footprint; footprint = footprint->Next() )
{
for( D_PAD* pad = footprint->Pads(); pad; pad = pad->Next() )
{
// Calculate a factor to apply to segcount for large holes ( > 1 mm)
// (bigger pad drill size -> more segments) because holes in pads can have
// very different sizes and optimizing this segcount gives a better look
// Mainly mounting holes have a size bigger than small_hole_limit
wxSize padHole = pad->GetDrillSize();
if( ! padHole.x ) // Not drilled pad like SMD pad
continue;
// we use the hole diameter to calculate the seg count.
// for round holes, padHole.x == padHole.y
// for oblong holes, the diameter is the smaller of (padHole.x, padHole.y)
int diam = std::min( padHole.x, padHole.y );
int segcount = aSegCountPerCircle;
if( diam > small_hole_limit )
{
double segFactor = (double)diam / small_hole_limit;
segcount = (int)(aSegCountPerCircle * segFactor);
// limit segcount to 48. For a circle this is a very good approx.
if( segcount > 48 )
segcount = 48;
}
// The hole in the body is inflated by copper thickness.
int inflate = copper_thickness;
// If not plated, no copper.
if( pad->GetAttribute () == PAD_ATTRIB_HOLE_NOT_PLATED )
inflate = 0;
pad->BuildPadDrillShapePolygon( allBoardHoles, inflate, segcount );
}
}
allBoardHoles.Simplify( useFastModeForPolygons );
}
void EDA_3D_CANVAS::buildBoard3DView( GLuint aBoardList, GLuint aBodyOnlyList,
REPORTER* aErrorMessages, REPORTER* aActivity )
{
BOARD* pcb = GetBoard();
// If FL_RENDER_SHOW_HOLES_IN_ZONES is true, holes are correctly removed from copper zones areas.
// If FL_RENDER_SHOW_HOLES_IN_ZONES is false, holes are not removed from copper zones areas,
// but the calculation time is twice shorter.
bool remove_Holes = isEnabled( FL_RENDER_SHOW_HOLES_IN_ZONES );
bool realistic_mode = isRealisticMode();
bool useTextures = isRealisticMode() && isEnabled( FL_RENDER_TEXTURES );
// Number of segments to convert a circle to polygon
// We use 2 values: the first gives a good shape (for instanes rond pads)
// the second is used to speed up calculations, when a poor approximation is acceptable (holes)
const int segcountforcircle = 18;
double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2.0) );
const int segcountLowQuality = 12; // segments to draw a circle with low quality
// to reduce time calculations
// for holes and items which do not need
// a fine representation
double correctionFactorLQ = 1.0 / cos( M_PI / (segcountLowQuality * 2.0) );
SHAPE_POLY_SET bufferPolys; // copper areas: tracks, pads and filled zones areas
// when holes are removed from zones
SHAPE_POLY_SET bufferPcbOutlines; // stores the board main outlines
SHAPE_POLY_SET bufferZonesPolys; // copper filled zones areas
// when holes are not removed from zones
SHAPE_POLY_SET currLayerHoles; // Contains holes for the current layer
SHAPE_POLY_SET allLayerHoles; // Contains holes for all layers
// Build a polygon from edge cut items
wxString msg;
if( !pcb->GetBoardPolygonOutlines( bufferPcbOutlines, allLayerHoles, &msg ) )
{
if( aErrorMessages )
{
msg << wxT("\n") << _("Unable to calculate the board outlines.\n"
"Therefore use the board boundary box.") << wxT("\n\n");
aErrorMessages->Report( msg, REPORTER::RPT_WARNING );
}
}
// Build board holes, with optimization of large holes shape.
buildBoardThroughHolesPolygonList( allLayerHoles, segcountLowQuality, true );
LSET cu_set = LSET::AllCuMask( GetPrm3DVisu().m_CopperLayersCount );
glNewList( aBoardList, GL_COMPILE );
for( LSEQ cu = cu_set.CuStack(); cu; ++cu )
{
LAYER_ID layer = *cu;
// Skip non enabled layers in normal mode,
// and internal layers in realistic mode
if( !is3DLayerEnabled( layer ) )
continue;
if( aActivity )
aActivity->Report( wxString::Format( _( "Build layer %s" ), LSET::Name( layer ) ) );
bufferPolys.RemoveAllContours();
bufferZonesPolys.RemoveAllContours();
currLayerHoles.RemoveAllContours();
// Draw track shapes:
for( TRACK* track = pcb->m_Track; track; track = track->Next() )
{
if( !track->IsOnLayer( layer ) )
continue;
track->TransformShapeWithClearanceToPolygon( bufferPolys,
0, segcountforcircle,
correctionFactor );
// Add blind/buried via holes
if( track->Type() == PCB_VIA_T )
{
VIA *via = static_cast<VIA*>( track );
if( via->GetViaType() == VIA_THROUGH )
continue; // already done
int holediameter = via->GetDrillValue();
int thickness = GetPrm3DVisu().GetCopperThicknessBIU();
int hole_outer_radius = (holediameter + thickness) / 2;
TransformCircleToPolygon( currLayerHoles,
via->GetStart(), hole_outer_radius,
segcountLowQuality );
}
}
// draw pad shapes
for( MODULE* module = pcb->m_Modules; module; module = module->Next() )
{
// Note: NPTH pads are not drawn on copper layers when the pad
// has same shape as its hole
module->TransformPadsShapesWithClearanceToPolygon( layer,
bufferPolys,
0,
segcountforcircle,
correctionFactor, true );
// Micro-wave modules may have items on copper layers
module->TransformGraphicShapesWithClearanceToPolygonSet( layer,
bufferPolys,
0,
segcountforcircle,
correctionFactor );
// pad holes are already in list.
}
// Draw copper zones. Note:
// * if the holes are removed from copper zones
// the polygons are stored in bufferPolys (which contains all other polygons)
// * if the holes are NOT removed from copper zones
// the polygons are stored in bufferZonesPolys
if( isEnabled( FL_ZONE ) )
{
for( int ii = 0; ii < pcb->GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = pcb->GetArea( ii );
LAYER_NUM zonelayer = zone->GetLayer();
if( zonelayer == layer )
{
zone->TransformSolidAreasShapesToPolygonSet(
remove_Holes ? bufferPolys : bufferZonesPolys,
segcountLowQuality, correctionFactorLQ );
}
}
}
// draw graphic items on copper layers (texts)
for( BOARD_ITEM* item = pcb->m_Drawings; item; item = item->Next() )
{
if( !item->IsOnLayer( layer ) )
continue;
switch( item->Type() )
{
case PCB_LINE_T: // should not exist on copper layers
( (DRAWSEGMENT*) item )->TransformShapeWithClearanceToPolygon(
bufferPolys, 0, segcountforcircle, correctionFactor );
break;
case PCB_TEXT_T:
( (TEXTE_PCB*) item )->TransformShapeWithClearanceToPolygonSet(
bufferPolys, 0, segcountLowQuality, correctionFactor );
break;
default:
break;
}
}
// bufferPolys contains polygons to merge. Many overlaps .
// Calculate merged polygons
if( bufferPolys.IsEmpty() )
continue;
// Use Clipper lib to subtract holes to copper areas
if( currLayerHoles.OutlineCount() )
{
currLayerHoles.Append(allLayerHoles);
currLayerHoles.Simplify( useFastModeForPolygons );
bufferPolys.BooleanSubtract( currLayerHoles, useFastModeForPolygons );
}
else
bufferPolys.BooleanSubtract( allLayerHoles, useFastModeForPolygons );
int thickness = GetPrm3DVisu().GetLayerObjectThicknessBIU( layer );
int zpos = GetPrm3DVisu().GetLayerZcoordBIU( layer );
float zNormal = 1.0f; // When using thickness it will draw first the top and then botton (with z inverted)
// If we are not using thickness, then the z-normal has to match the layer direction
// because just one plane will be drawn
if( !thickness )
zNormal = Get3DLayer_Z_Orientation( layer );
if( realistic_mode )
{
setGLCopperColor();
}
else
{
EDA_COLOR_T color = g_ColorsSettings.GetLayerColor( layer );
SetGLColor( color );
}
// If holes are removed from copper zones, bufferPolys contains all polygons
// to draw (tracks+zones+texts).
Draw3D_SolidHorizontalPolyPolygons( bufferPolys, zpos, thickness,
GetPrm3DVisu().m_BiuTo3Dunits, useTextures,
zNormal );
// If holes are not removed from copper zones (for calculation time reasons,
// the zone polygons are stored in bufferZonesPolys and have to be drawn now:
if( !bufferZonesPolys.IsEmpty() )
{
Draw3D_SolidHorizontalPolyPolygons( bufferZonesPolys, zpos, thickness,
GetPrm3DVisu().m_BiuTo3Dunits, useTextures,
zNormal );
}
}
if( aActivity )
aActivity->Report( _( "Build board body" ) );
// Draw plated vertical holes inside the board, but not always. They are drawn:
// - if the board body is not shown, to show the holes.
// - or if the copper thickness is shown
if( !isEnabled( FL_SHOW_BOARD_BODY ) || isEnabled( FL_USE_COPPER_THICKNESS ) )
{
// Draw vias holes (vertical cylinders)
for( const TRACK* track = pcb->m_Track; track; track = track->Next() )
{
if( track->Type() == PCB_VIA_T )
{
const VIA *via = static_cast<const VIA*>(track);
draw3DViaHole( via );
}
}
// Draw pads holes (vertical cylinders)
for( const MODULE* module = pcb->m_Modules; module; module = module->Next() )
{
for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() )
if( pad->GetAttribute () != PAD_ATTRIB_HOLE_NOT_PLATED )
draw3DPadHole( pad );
}
}
glEndList();
// Build the body board:
glNewList( aBodyOnlyList, GL_COMPILE );
if( isRealisticMode() )
{
setGLEpoxyColor( 1.00 );
}
else
{
EDA_COLOR_T color = g_ColorsSettings.GetLayerColor( Edge_Cuts );
SetGLColor( color, 0.7 );
}
float copper_thickness = GetPrm3DVisu().GetCopperThicknessBIU();
// a small offset between substrate and external copper layer to avoid artifacts
// when drawing copper items on board
float epsilon = Millimeter2iu( 0.01 );
float zpos = GetPrm3DVisu().GetLayerZcoordBIU( B_Cu );
float board_thickness = GetPrm3DVisu().GetLayerZcoordBIU( F_Cu )
- GetPrm3DVisu().GetLayerZcoordBIU( B_Cu );
// items on copper layers and having a thickness = copper_thickness
// are drawn from zpos - copper_thickness/2 to zpos + copper_thickness
// therefore substrate position is copper_thickness/2 to
// substrate_height - copper_thickness/2
zpos += (copper_thickness + epsilon) / 2.0f;
board_thickness -= copper_thickness + epsilon;
bufferPcbOutlines.BooleanSubtract( allLayerHoles, useFastModeForPolygons );
if( !bufferPcbOutlines.IsEmpty() )
{
Draw3D_SolidHorizontalPolyPolygons( bufferPcbOutlines, zpos + board_thickness / 2.0,
board_thickness, GetPrm3DVisu().m_BiuTo3Dunits, useTextures,
1.0f );
}
glEndList();
}
void EDA_3D_CANVAS::buildTechLayers3DView( REPORTER* aErrorMessages, REPORTER* aActivity )
{
BOARD* pcb = GetBoard();
bool useTextures = isRealisticMode() && isEnabled( FL_RENDER_TEXTURES );
// Number of segments to draw a circle using segments
const int segcountforcircle = 18;
double correctionFactor = 1.0 / cos( M_PI / (segcountforcircle * 2) );
const int segcountLowQuality = 12; // segments to draw a circle with low quality
// to reduce time calculations
// for holes and items which do not need
// a fine representation
double correctionFactorLQ = 1.0 / cos( M_PI / (segcountLowQuality * 2) );
// segments to draw a circle to build texts. Is is used only to build
// the shape of each segment of the stroke font, therefore no need to have
// many segments per circle.
const int segcountInStrokeFont = 8;
SHAPE_POLY_SET bufferPolys;
SHAPE_POLY_SET allLayerHoles; // Contains through holes, calculated only once
SHAPE_POLY_SET bufferPcbOutlines; // stores the board main outlines
// Build a polygon from edge cut items
wxString msg;
if( !pcb->GetBoardPolygonOutlines( bufferPcbOutlines, allLayerHoles, &msg ) )
{
if( aErrorMessages )
{
msg << wxT("\n") <<
_("Unable to calculate the board outlines.\n"
"Therefore use the board boundary box.") << wxT("\n\n");
aErrorMessages->Report( msg, REPORTER::RPT_WARNING );
}
}
// Build board holes, with no optimization of large holes shape.
buildBoardThroughHolesPolygonList( allLayerHoles, segcountLowQuality, false );
// draw graphic items, on technical layers
static const LAYER_ID teckLayerList[] = {
B_Adhes,
F_Adhes,
B_Paste,
F_Paste,
B_SilkS,
F_SilkS,
B_Mask,
F_Mask,
};
// User layers are not drawn here, only technical layers
for( LSEQ seq = LSET::AllTechMask().Seq( teckLayerList, DIM( teckLayerList ) ); seq; ++seq )
{
LAYER_ID layer = *seq;
if( !is3DLayerEnabled( layer ) )
continue;
if( layer == Edge_Cuts && isEnabled( FL_SHOW_BOARD_BODY ) )
continue;
if( aActivity )
aActivity->Report( wxString::Format( _( "Build layer %s" ), LSET::Name( layer ) ) );
bufferPolys.RemoveAllContours();
for( BOARD_ITEM* item = pcb->m_Drawings; item; item = item->Next() )
{
if( !item->IsOnLayer( layer ) )
continue;
switch( item->Type() )
{
case PCB_LINE_T:
( (DRAWSEGMENT*) item )->TransformShapeWithClearanceToPolygon(
bufferPolys, 0, segcountforcircle, correctionFactor );
break;
case PCB_TEXT_T:
( (TEXTE_PCB*) item )->TransformShapeWithClearanceToPolygonSet(
bufferPolys, 0, segcountLowQuality, 1.0 );
break;
default:
break;
}
}
for( MODULE* module = pcb->m_Modules; module; module = module->Next() )
{
if( layer == F_SilkS || layer == B_SilkS )
{
// On silk screen layers, the pad shape is only the pad outline
// never a filled shape
D_PAD* pad = module->Pads();
int linewidth = g_DrawDefaultLineThickness;
for( ; pad; pad = pad->Next() )
{
if( !pad->IsOnLayer( layer ) )
continue;
buildPadShapeThickOutlineAsPolygon( pad, bufferPolys,
linewidth, segcountforcircle, correctionFactor );
}
}
else
module->TransformPadsShapesWithClearanceToPolygon( layer,
bufferPolys, 0, segcountforcircle, correctionFactor );
// On tech layers, use a poor circle approximation, only for texts (stroke font)
module->TransformGraphicShapesWithClearanceToPolygonSet( layer,
bufferPolys, 0, segcountforcircle, correctionFactor, segcountInStrokeFont );
}
// Draw non copper zones
if( isEnabled( FL_ZONE ) )
{
for( int ii = 0; ii < pcb->GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = pcb->GetArea( ii );
if( !zone->IsOnLayer( layer ) )
continue;
zone->TransformSolidAreasShapesToPolygonSet(
bufferPolys, segcountLowQuality, correctionFactorLQ );
}
}
// bufferPolys contains polygons to merge. Many overlaps .
// Calculate merged polygons and remove pads and vias holes
if( bufferPolys.IsEmpty() )
continue;
// Solder mask layers are "negative" layers.
// Shapes should be removed from the full board area.
if( layer == B_Mask || layer == F_Mask )
{
SHAPE_POLY_SET cuts = bufferPolys;
bufferPolys = bufferPcbOutlines;
cuts.Append(allLayerHoles);
cuts.Simplify( useFastModeForPolygons );
bufferPolys.BooleanSubtract( cuts, useFastModeForPolygons );
}
// Remove holes from Solder paste layers and silkscreen
else if( layer == B_Paste || layer == F_Paste
|| layer == B_SilkS || layer == F_SilkS )
{
bufferPolys.BooleanSubtract( allLayerHoles, useFastModeForPolygons );
}
int thickness = 0;
if( layer != B_Mask && layer != F_Mask )
thickness = GetPrm3DVisu().GetLayerObjectThicknessBIU( layer );
int zpos = GetPrm3DVisu().GetLayerZcoordBIU( layer );
if( layer == Edge_Cuts )
{
thickness = GetPrm3DVisu().GetLayerZcoordBIU( F_Cu )
- GetPrm3DVisu().GetLayerZcoordBIU( B_Cu );
zpos = GetPrm3DVisu().GetLayerZcoordBIU( B_Cu )
+ (thickness / 2);
}
else
{
// for Draw3D_SolidHorizontalPolyPolygons, zpos it the middle between bottom and top
// sides.
// However for top layers, zpos should be the bottom layer pos,
// and for bottom layers, zpos should be the top layer pos.
if( Get3DLayer_Z_Orientation( layer ) > 0 )
zpos += thickness/2;
else
zpos -= thickness/2 ;
}
float zNormal = 1.0f; // When using thickness it will draw first the top and then botton (with z inverted)
// If we are not using thickness, then the znormal must face the layer direction
// because it will draw just one plane
if( !thickness )
zNormal = Get3DLayer_Z_Orientation( layer );
setGLTechLayersColor( layer );
Draw3D_SolidHorizontalPolyPolygons( bufferPolys, zpos,
thickness, GetPrm3DVisu().m_BiuTo3Dunits, useTextures,
zNormal );
}
}
+493
View File
@@ -0,0 +1,493 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file 3d_draw_helper_functions.cpp
*/
#include <fctsys.h>
#include <PolyLine.h>
#include <colors.h>
#include <colors_selection.h>
#include <class_pad.h>
#include <class_track.h>
#include <convert_basic_shapes_to_polygon.h>
#include <3d_viewer.h>
#include <3d_canvas.h>
#include <info3d_visu.h>
#include <3d_draw_basic_functions.h>
#define TEXTURE_PCB_SCALE 5.0
// -----------------
// helper function (from wxWidgets, opengl/cube.cpp sample
// -----------------
void CheckGLError(const char *aFileName, int aLineNumber)
{
GLenum errLast = GL_NO_ERROR;
for ( ; ; )
{
GLenum err = glGetError();
if ( err == GL_NO_ERROR )
return;
// normally the error is reset by the call to glGetError() but if
// glGetError() itself returns an error, we risk looping forever here
// so check that we get a different error than the last time
if ( err == errLast )
{
wxLogError(wxT("OpenGL error state couldn't be reset."));
return;
}
errLast = err;
wxLogError( wxT( "OpenGL error %d At: %s, line: %d" ), err,
GetChars( FROM_UTF8( aFileName ) ), aLineNumber );
}
}
INFO3D_VISU& EDA_3D_CANVAS::GetPrm3DVisu() const
{
return Parent()->GetPrm3DVisu();
}
wxSize EDA_3D_CANVAS::getBoardSize() const
{
// return the size of the board in pcb units
return GetPrm3DVisu().m_BoardSize;
}
wxPoint EDA_3D_CANVAS::getBoardCenter() const
{
// return the position of the board center in pcb units
return GetPrm3DVisu().m_BoardPos;
}
// return true if we are in realistic mode render
bool EDA_3D_CANVAS::isRealisticMode() const
{
return GetPrm3DVisu().IsRealisticMode();
}
// return true if aItem should be displayed
bool EDA_3D_CANVAS::isEnabled( DISPLAY3D_FLG aItem ) const
{
return GetPrm3DVisu().GetFlag( aItem );
}
// Helper function: initialize the copper color to draw the board
// in realistic mode.
void EDA_3D_CANVAS::setGLCopperColor()
{
glDisable( GL_TEXTURE_2D );
SetGLColor( GetPrm3DVisu().m_CopperColor, 1.0 );
}
// Helper function: initialize the color to draw the epoxy
// body board in realistic mode.
void EDA_3D_CANVAS::setGLEpoxyColor( float aTransparency )
{
// Generates an epoxy color, near board color
SetGLColor( GetPrm3DVisu().m_BoardBodyColor, aTransparency );
if( isEnabled( FL_RENDER_TEXTURES ) )
{
SetGLTexture( m_text_pcb, TEXTURE_PCB_SCALE );
}
}
// Helper function: initialize the color to draw the
// solder mask layers in realistic mode.
void EDA_3D_CANVAS::setGLSolderMaskColor( float aTransparency )
{
// Generates a solder mask color
SetGLColor( GetPrm3DVisu().m_SolderMaskColor, aTransparency );
if( isEnabled( FL_RENDER_TEXTURES ) )
{
SetGLTexture( m_text_pcb, TEXTURE_PCB_SCALE );
}
}
// Helper function: initialize the color to draw the non copper layers
// in realistic mode and normal mode.
void EDA_3D_CANVAS::setGLTechLayersColor( LAYER_NUM aLayer )
{
EDA_COLOR_T color;
if( isRealisticMode() )
{
switch( aLayer )
{
case B_Paste:
case F_Paste:
SetGLColor( GetPrm3DVisu().m_SolderPasteColor, 1 );
break;
case B_SilkS:
case F_SilkS:
SetGLColor( GetPrm3DVisu().m_SilkScreenColor, 0.96 );
if( isEnabled( FL_RENDER_TEXTURES ) )
{
SetGLTexture( m_text_silk, 10.0f );
}
break;
case B_Mask:
case F_Mask:
setGLSolderMaskColor( 0.90 );
break;
default:
color = g_ColorsSettings.GetLayerColor( aLayer );
SetGLColor( color, 0.7 );
break;
}
}
else
{
color = g_ColorsSettings.GetLayerColor( aLayer );
SetGLColor( color, 0.7 );
}
}
void EDA_3D_CANVAS::draw3DAxis()
{
if( ! m_glLists[GL_ID_AXIS] )
{
m_glLists[GL_ID_AXIS] = glGenLists( 1 );
glNewList( m_glLists[GL_ID_AXIS], GL_COMPILE );
glEnable( GL_COLOR_MATERIAL );
glBegin( GL_LINES );
SetGLColor( RED );
glNormal3f( 0.0f, 0.0f, 1.0f ); // Normal is Z axis
glVertex3f( 0.0f, 0.0f, 0.0f );
glVertex3f( -10.0f, 0.0f, 0.0f );
glVertex3f( 0.0f, 0.0f, 0.0f );
glVertex3f( 10.0f, 0.0f, 0.0f ); // X axis
SetGLColor( GREEN );
glVertex3f( 0.0f, 0.0f, 0.0f );
glVertex3f( 0.0f, -10.0f, 0.0f ); // Y axis
glVertex3f( 0.0f, 0.0f, 0.0f );
glVertex3f( 0.0f, 10.0f, 0.0f );
SetGLColor( BLUE );
glNormal3f( 1.0f, 0.0f, 0.0f ); // Normal is Y axis
glVertex3f( 0.0f, 0.0f, 0.0f );
glVertex3f( 0.0f, 0.0f, -10.0f );
glVertex3f( 0.0f, 0.0f, 0.0f );
glVertex3f( 0.0f, 0.0f, 10.0f ); // Z axis
glEnd();
glEndList();
}
}
// draw a 3D grid: an horizontal grid (XY plane and Z = 0,
// and a vertical grid (XZ plane and Y = 0)
void EDA_3D_CANVAS::draw3DGrid( double aGriSizeMM )
{
double zpos = 0.0;
EDA_COLOR_T gridcolor = DARKGRAY; // Color of grid lines
EDA_COLOR_T gridcolor_marker = LIGHTGRAY; // Color of grid lines every 5 lines
const double scale = GetPrm3DVisu().m_BiuTo3Dunits;
const double transparency = 0.3;
glNormal3f( 0.0, 0.0, 1.0 );
wxSize brd_size = getBoardSize();
wxPoint brd_center_pos = getBoardCenter();
brd_center_pos.y = -brd_center_pos.y;
int xsize = std::max( brd_size.x, Millimeter2iu( 100 ) ) * 1.2;
int ysize = std::max( brd_size.y, Millimeter2iu( 100 ) ) * 1.2;
// Grid limits, in 3D units
double xmin = (brd_center_pos.x - xsize / 2) * scale;
double xmax = (brd_center_pos.x + xsize / 2) * scale;
double ymin = (brd_center_pos.y - ysize / 2) * scale;
double ymax = (brd_center_pos.y + ysize / 2) * scale;
double zmin = Millimeter2iu( -50 ) * scale;
double zmax = Millimeter2iu( 100 ) * scale;
// Draw horizontal grid centered on 3D origin (center of the board)
for( int ii = 0; ; ii++ )
{
if( (ii % 5) )
SetGLColor( gridcolor, transparency );
else
SetGLColor( gridcolor_marker, transparency );
int delta = KiROUND( ii * aGriSizeMM * IU_PER_MM );
if( delta <= xsize / 2 ) // Draw grid lines parallel to X axis
{
glBegin( GL_LINES );
glVertex3f( (brd_center_pos.x + delta) * scale, -ymin, zpos );
glVertex3f( (brd_center_pos.x + delta) * scale, -ymax, zpos );
glEnd();
if( ii != 0 )
{
glBegin( GL_LINES );
glVertex3f( (brd_center_pos.x - delta) * scale, -ymin, zpos );
glVertex3f( (brd_center_pos.x - delta) * scale, -ymax, zpos );
glEnd();
}
}
if( delta <= ysize / 2 ) // Draw grid lines parallel to Y axis
{
glBegin( GL_LINES );
glVertex3f( xmin, -(brd_center_pos.y + delta) * scale, zpos );
glVertex3f( xmax, -(brd_center_pos.y + delta) * scale, zpos );
glEnd();
if( ii != 0 )
{
glBegin( GL_LINES );
glVertex3f( xmin, -(brd_center_pos.y - delta) * scale, zpos );
glVertex3f( xmax, -(brd_center_pos.y - delta) * scale, zpos );
glEnd();
}
}
if( ( delta > ysize / 2 ) && ( delta > xsize / 2 ) )
break;
}
// Draw vertical grid on Z axis
glNormal3f( 0.0, -1.0, 0.0 );
// Draw vertical grid lines (parallel to Z axis)
double posy = -brd_center_pos.y * scale;
for( int ii = 0; ; ii++ )
{
if( (ii % 5) )
SetGLColor( gridcolor, transparency );
else
SetGLColor( gridcolor_marker, transparency );
double delta = ii * aGriSizeMM * IU_PER_MM;
glBegin( GL_LINES );
xmax = (brd_center_pos.x + delta) * scale;
glVertex3f( xmax, posy, zmin );
glVertex3f( xmax, posy, zmax );
glEnd();
if( ii != 0 )
{
glBegin( GL_LINES );
xmin = (brd_center_pos.x - delta) * scale;
glVertex3f( xmin, posy, zmin );
glVertex3f( xmin, posy, zmax );
glEnd();
}
if( delta > xsize / 2.0f )
break;
}
// Draw horizontal grid lines on Z axis (parallel to X axis)
for( int ii = 0; ; ii++ )
{
if( (ii % 5) )
SetGLColor( gridcolor, transparency);
else
SetGLColor( gridcolor_marker, transparency );
double delta = ii * aGriSizeMM * IU_PER_MM * scale;
if( delta <= zmax )
{
// Draw grid lines on Z axis (positive Z axis coordinates)
glBegin( GL_LINES );
glVertex3f( xmin, posy, delta );
glVertex3f( xmax, posy, delta );
glEnd();
}
if( delta <= -zmin && ( ii != 0 ) )
{
// Draw grid lines on Z axis (negative Z axis coordinates)
glBegin( GL_LINES );
glVertex3f( xmin, posy, -delta );
glVertex3f( xmax, posy, -delta );
glEnd();
}
if( ( delta > zmax ) && ( delta > -zmin ) )
break;
}
}
// Draw 3D pads.
void EDA_3D_CANVAS::draw3DPadHole( const D_PAD* aPad )
{
// Draw the pad hole
wxSize drillsize = aPad->GetDrillSize();
bool hasHole = drillsize.x && drillsize.y;
if( !hasHole )
return;
// Store here the points to approximate hole by segments
SHAPE_POLY_SET holecornersBuffer;
int thickness = GetPrm3DVisu().GetCopperThicknessBIU();
int height = GetPrm3DVisu().GetLayerZcoordBIU( F_Cu ) -
GetPrm3DVisu().GetLayerZcoordBIU( B_Cu );
if( isRealisticMode() )
setGLCopperColor();
else
SetGLColor( DARKGRAY );
int holeZpoz = GetPrm3DVisu().GetLayerZcoordBIU( B_Cu ) - thickness / 2;
int holeHeight = height + thickness;
if( drillsize.x == drillsize.y ) // usual round hole
{
int hole_radius = ( drillsize.x + thickness ) / 2;
Draw3D_ZaxisCylinder( aPad->GetPosition(),
hole_radius, holeHeight,
thickness, holeZpoz, GetPrm3DVisu().m_BiuTo3Dunits );
}
else // Oblong hole
{
wxPoint ends_offset;
int width;
if( drillsize.x > drillsize.y ) // Horizontal oval
{
ends_offset.x = ( drillsize.x - drillsize.y ) / 2;
width = drillsize.y;
}
else // Vertical oval
{
ends_offset.y = ( drillsize.y - drillsize.x ) / 2;
width = drillsize.x;
}
RotatePoint( &ends_offset, aPad->GetOrientation() );
wxPoint start = aPad->GetPosition() + ends_offset;
wxPoint end = aPad->GetPosition() - ends_offset;
int hole_radius = ( width + thickness ) / 2;
// Draw the hole
Draw3D_ZaxisOblongCylinder( start, end, hole_radius, holeHeight,
thickness, holeZpoz, GetPrm3DVisu().m_BiuTo3Dunits );
}
}
void EDA_3D_CANVAS::draw3DViaHole( const VIA* aVia )
{
LAYER_ID top_layer, bottom_layer;
int thickness = GetPrm3DVisu().GetCopperThicknessBIU();
int inner_radius = (int)((float)aVia->GetDrillValue() * 1.01f) / 2.0f; // This add a bit more in order to correct a draw artifact while using tickness
aVia->LayerPair( &top_layer, &bottom_layer );
// Drawing via hole:
if( isRealisticMode() )
setGLCopperColor();
else
{
EDA_COLOR_T color = g_ColorsSettings.GetItemColor( VIAS_VISIBLE + aVia->GetViaType() );
SetGLColor( color );
}
int height = GetPrm3DVisu().GetLayerZcoordBIU( top_layer ) -
GetPrm3DVisu().GetLayerZcoordBIU( bottom_layer ) + thickness;
int zpos = GetPrm3DVisu().GetLayerZcoordBIU( bottom_layer ) - thickness / 2;
Draw3D_ZaxisCylinder( aVia->GetStart(), inner_radius, height,
thickness, zpos, GetPrm3DVisu().m_BiuTo3Dunits );
}
/* Build a pad outline as non filled polygon, to draw pads on silkscreen layer
* Used only to draw pads outlines on silkscreen layers.
*/
void EDA_3D_CANVAS::buildPadShapeThickOutlineAsPolygon( const D_PAD* aPad,
SHAPE_POLY_SET& aCornerBuffer,
int aWidth,
int aCircleToSegmentsCount,
double aCorrectionFactor )
{
if( aPad->GetShape() == PAD_SHAPE_CIRCLE ) // Draw a ring
{
TransformRingToPolygon( aCornerBuffer, aPad->ShapePos(),
aPad->GetSize().x / 2, aCircleToSegmentsCount, aWidth );
return;
}
// For other shapes, draw polygon outlines
SHAPE_POLY_SET corners;
aPad->BuildPadShapePolygon( corners, wxSize( 0, 0 ),
aCircleToSegmentsCount, aCorrectionFactor );
// Add outlines as thick segments in polygon buffer
const SHAPE_LINE_CHAIN& path = corners.COutline( 0 );
for( int ii = 0; ii < path.PointCount(); ii++ )
{
const VECTOR2I& a = path.CPoint( ii );
const VECTOR2I& b = path.CPoint( ii + 1 );
TransformRoundedEndsSegmentToPolygon( aCornerBuffer,
wxPoint( a.x, a.y ),
wxPoint( b.x, b.y ),
aCircleToSegmentsCount, aWidth );
}
}
GLfloat Get3DLayer_Z_Orientation( LAYER_NUM aLayer )
{
double nZ = 1.0;
if( ( aLayer == B_Cu )
|| ( aLayer == B_Adhes )
|| ( aLayer == B_Paste )
|| ( aLayer == B_SilkS )
|| ( aLayer == B_Mask ) )
nZ = -1.0;
return nZ;
}
+476 -91
View File
@@ -5,7 +5,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -28,6 +28,7 @@
#include <fctsys.h>
#include <kiface_i.h>
#include <pgm_base.h>
#include <macros.h>
#include <3d_viewer.h>
#include <3d_canvas.h>
@@ -44,7 +45,40 @@ INFO3D_VISU g_Parm_3D_Visu;
static const wxChar keyBgColor_Red[] = wxT( "BgColor_Red" );
static const wxChar keyBgColor_Green[] = wxT( "BgColor_Green" );
static const wxChar keyBgColor_Blue[] = wxT( "BgColor_Blue" );
static const wxChar keyBgColor_Red_Top[] = wxT( "BgColor_Red_Top" );
static const wxChar keyBgColor_Green_Top[] = wxT( "BgColor_Green_Top" );
static const wxChar keyBgColor_Blue_Top[] = wxT( "BgColor_Blue_Top" );
static const wxChar keySMaskColor_Red[] = wxT( "SMaskColor_Red" );
static const wxChar keySMaskColor_Green[] = wxT( "SMaskColor_Green" );
static const wxChar keySMaskColor_Blue[] = wxT( "SMaskColor_Blue" );
static const wxChar keySPasteColor_Red[] = wxT( "SPasteColor_Red" );
static const wxChar keySPasteColor_Green[] = wxT( "SPasteColor_Green" );
static const wxChar keySPasteColor_Blue[] = wxT( "SPasteColor_Blue" );
static const wxChar keySilkColor_Red[] = wxT( "SilkColor_Red" );
static const wxChar keySilkColor_Green[] = wxT( "SilkColor_Green" );
static const wxChar keySilkColor_Blue[] = wxT( "SilkColor_Blue" );
static const wxChar keyCopperColor_Red[] = wxT( "CopperColor_Red" );
static const wxChar keyCopperColor_Green[] = wxT( "CopperColor_Green" );
static const wxChar keyCopperColor_Blue[] = wxT( "CopperColor_Blue" );
static const wxChar keyBoardBodyColor_Red[] = wxT( "BoardBodyColor_Red" );
static const wxChar keyBoardBodyColor_Green[] = wxT( "BoardBodyColor_Green" );
static const wxChar keyBoardBodyColor_Blue[]= wxT( "BoardBodyColor_Blue" );
static const wxChar keyShowRealisticMode[] = wxT( "ShowRealisticMode" );
static const wxChar keyRenderShadows[] = wxT( "Render_Shadows" );
static const wxChar keyRenderRemoveHoles[] = wxT( "Render_RemoveHoles" );
static const wxChar keyRenderTextures[] = wxT( "Render_Textures" );
static const wxChar keyRenderSmoothNormals[] = wxT( "Render_Smooth_Normals" );
static const wxChar keyRenderUseModelNormals[] =wxT( "Render_Use_Model_Normals" );
static const wxChar keyRenderMaterial[] = wxT( "Render_Material" );
static const wxChar keyRenderShowModelBBox[] = wxT( "Render_ShowModelBoudingBoxes" );
static const wxChar keyShowAxis[] = wxT( "ShowAxis" );
static const wxChar keyShowGrid[] = wxT( "ShowGrid3D" );
static const wxChar keyShowGridSize[] = wxT( "Grid3DSize" );
@@ -97,16 +131,74 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
// Create the status line
static const int dims[5] = { -1, 100, 100, 100, 140 };
static const int status_dims[4] = { -1, 130, 130, 170 };
CreateStatusBar( 5 );
SetStatusWidths( 5, dims );
CreateStatusBar( DIM( status_dims ) );
SetStatusWidths( DIM( status_dims ), status_dims );
CreateMenuBar();
ReCreateMainToolbar();
// Make a EDA_3D_CANVAS
int attrs[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0 };
// Note: We try to use anti aliasing if the graphic card allows that,
// but only on wxWidgets >= 3.0.0 (this option does not exist on wxWidgets 2.8)
int attrs[] = { // This array should be 2*n+1
// Sadly wxwidgets / glx < 13 allowed
// a thing named "boolean attributes" that don't take a value.
// (See src/unix/glx11.cpp -> wxGLCanvasX11::ConvertWXAttrsToGL() ).
// To avoid problems due to this, just specify those attributes twice.
// Only WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_STEREO are such boolean
// attributes.
// Boolean attributes (using itself at padding):
WX_GL_RGBA, WX_GL_RGBA,
WX_GL_DOUBLEBUFFER, WX_GL_DOUBLEBUFFER,
// Normal attributes with values:
WX_GL_DEPTH_SIZE, 16,
WX_GL_STENCIL_SIZE, 1,
WX_GL_SAMPLE_BUFFERS, 1, // Enable multisampling support (antialiasing).
WX_GL_SAMPLES, 0, // Disable AA for the start.
0 }; // NULL termination
// Check if the canvas supports multisampling.
if( EDA_3D_CANVAS::IsDisplaySupported( attrs ) )
{
// Check for possible sample sizes, start form the top.
int maxSamples = 8; // Any higher doesn't change anything.
int samplesOffset = 0;
for( unsigned int ii = 0; ii < DIM( attrs ); ii += 2 )
{
if( attrs[ii] == WX_GL_SAMPLES )
{
samplesOffset = ii+1;
break;
}
}
attrs[samplesOffset] = maxSamples;
for( ; maxSamples > 0 && !EDA_3D_CANVAS::IsDisplaySupported( attrs );
maxSamples = maxSamples>>1 )
{
attrs[samplesOffset] = maxSamples;
}
}
else
{
// Disable multisampling
for( unsigned int ii = 0; ii < DIM( attrs ); ii += 2 )
{
if( attrs[ii] == WX_GL_SAMPLE_BUFFERS )
{
attrs[ii+1] = 0;
break;
}
}
}
m_canvas = new EDA_3D_CANVAS( this, attrs );
m_auimgr.SetManagedWindow( this );
@@ -130,6 +222,11 @@ EDA_3D_FRAME::EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent,
}
EDA_3D_FRAME::~EDA_3D_FRAME()
{
m_auimgr.UnInit();
}
void EDA_3D_FRAME::Exit3DFrame( wxCommandEvent& event )
{
Close( true );
@@ -149,16 +246,66 @@ void EDA_3D_FRAME::LoadSettings( wxConfigBase* aCfg )
{
EDA_BASE_FRAME::LoadSettings( aCfg );
INFO3D_VISU& prms = g_Parm_3D_Visu;
INFO3D_VISU& prms = GetPrm3DVisu();
aCfg->Read( keyBgColor_Red, &g_Parm_3D_Visu.m_BgColor.m_Red, 0.0 );
aCfg->Read( keyBgColor_Green, &g_Parm_3D_Visu.m_BgColor.m_Green, 0.0 );
aCfg->Read( keyBgColor_Blue, &g_Parm_3D_Visu.m_BgColor.m_Blue, 0.0 );
aCfg->Read( keyBgColor_Red, &GetPrm3DVisu().m_BgColor.m_Red, 0.4 );
aCfg->Read( keyBgColor_Green, &GetPrm3DVisu().m_BgColor.m_Green, 0.4 );
aCfg->Read( keyBgColor_Blue, &GetPrm3DVisu().m_BgColor.m_Blue, 0.5 );
aCfg->Read( keyBgColor_Red_Top, &GetPrm3DVisu().m_BgColor_Top.m_Red, 0.8 );
aCfg->Read( keyBgColor_Green_Top, &GetPrm3DVisu().m_BgColor_Top.m_Green, 0.8 );
aCfg->Read( keyBgColor_Blue_Top, &GetPrm3DVisu().m_BgColor_Top.m_Blue, 0.9 );
// m_SolderMaskColor default value = dark grey-green
aCfg->Read( keySMaskColor_Red, &GetPrm3DVisu().m_SolderMaskColor.m_Red, 100.0 * 0.2 / 255.0 );
aCfg->Read( keySMaskColor_Green, &GetPrm3DVisu().m_SolderMaskColor.m_Green, 255.0 * 0.2 / 255.0 );
aCfg->Read( keySMaskColor_Blue, &GetPrm3DVisu().m_SolderMaskColor.m_Blue, 180.0 * 0.2 / 255.0 );
// m_SolderPasteColor default value = light grey
aCfg->Read( keySPasteColor_Red, &GetPrm3DVisu().m_SolderPasteColor.m_Red, 128.0 /255.0 );
aCfg->Read( keySPasteColor_Green, &GetPrm3DVisu().m_SolderPasteColor.m_Green, 128.0 /255.0 );
aCfg->Read( keySPasteColor_Blue, &GetPrm3DVisu().m_SolderPasteColor.m_Blue, 128.0 /255.0 );
// m_SilkScreenColor default value = white
aCfg->Read( keySilkColor_Red, &GetPrm3DVisu().m_SilkScreenColor.m_Red, 0.9 );
aCfg->Read( keySilkColor_Green, &GetPrm3DVisu().m_SilkScreenColor.m_Green, 0.9 );
aCfg->Read( keySilkColor_Blue, &GetPrm3DVisu().m_SilkScreenColor.m_Blue, 0.9 );
// m_CopperColor default value = gold
aCfg->Read( keyCopperColor_Red, &GetPrm3DVisu().m_CopperColor.m_Red, 255.0 * 0.7 / 255.0 );
aCfg->Read( keyCopperColor_Green, &GetPrm3DVisu().m_CopperColor.m_Green, 223.0 * 0.7 / 255.0 );
aCfg->Read( keyCopperColor_Blue, &GetPrm3DVisu().m_CopperColor.m_Blue, 0.0 /255.0 );
// m_BoardBodyColor default value = FR4, in realistic mode
aCfg->Read( keyBoardBodyColor_Red, &GetPrm3DVisu().m_BoardBodyColor.m_Red, 51.0 / 255.0 );
aCfg->Read( keyBoardBodyColor_Green, &GetPrm3DVisu().m_BoardBodyColor.m_Green, 43.0 / 255.0 );
aCfg->Read( keyBoardBodyColor_Blue, &GetPrm3DVisu().m_BoardBodyColor.m_Blue, 22.0 /255.0 );
bool tmp;
aCfg->Read( keyShowRealisticMode, &tmp, false );
prms.SetFlag( FL_USE_REALISTIC_MODE, tmp );
aCfg->Read( keyRenderShadows, &tmp, false );
prms.SetFlag( FL_RENDER_SHADOWS, tmp );
aCfg->Read( keyRenderRemoveHoles, &tmp, false );
prms.SetFlag( FL_RENDER_SHOW_HOLES_IN_ZONES, tmp );
aCfg->Read( keyRenderTextures, &tmp, false );
prms.SetFlag( FL_RENDER_TEXTURES, tmp );
aCfg->Read( keyRenderSmoothNormals, &tmp, false );
prms.SetFlag( FL_RENDER_SMOOTH_NORMALS, tmp );
aCfg->Read( keyRenderUseModelNormals, &tmp, false );
prms.SetFlag( FL_RENDER_USE_MODEL_NORMALS, tmp );
aCfg->Read( keyRenderMaterial, &tmp, false );
prms.SetFlag( FL_RENDER_MATERIAL, tmp );
aCfg->Read( keyRenderShowModelBBox, &tmp, false );
prms.SetFlag( FL_RENDER_SHOW_MODEL_BBOX, tmp );
aCfg->Read( keyShowAxis, &tmp, true );
prms.SetFlag( FL_AXIS, tmp );
@@ -166,7 +313,6 @@ void EDA_3D_FRAME::LoadSettings( wxConfigBase* aCfg )
prms.SetFlag( FL_GRID, tmp );
aCfg->Read( keyShowGridSize, &prms.m_3D_Grid, 10.0 );
prms.SetFlag( FL_MODULE, tmp );
aCfg->Read( keyShowFootprints, &tmp, true );
prms.SetFlag( FL_MODULE, tmp );
@@ -204,25 +350,59 @@ void EDA_3D_FRAME::SaveSettings( wxConfigBase* aCfg )
{
EDA_BASE_FRAME::SaveSettings( aCfg );
INFO3D_VISU& prms = g_Parm_3D_Visu;
INFO3D_VISU& prms = GetPrm3DVisu();
aCfg->Write( keyBgColor_Red, g_Parm_3D_Visu.m_BgColor.m_Red );
aCfg->Write( keyBgColor_Green, g_Parm_3D_Visu.m_BgColor.m_Green );
aCfg->Write( keyBgColor_Blue, g_Parm_3D_Visu.m_BgColor.m_Blue );
aCfg->Write( keyShowRealisticMode, prms.GetFlag( FL_USE_REALISTIC_MODE ) );
aCfg->Write( keyShowAxis, prms.GetFlag( FL_AXIS ) );
aCfg->Write( keyShowGrid, prms.GetFlag( FL_GRID ) );
aCfg->Write( keyShowGridSize, prms.m_3D_Grid );
aCfg->Write( keyShowFootprints, prms.GetFlag( FL_MODULE ) );
aCfg->Write( keyShowCopperThickness, prms.GetFlag( FL_USE_COPPER_THICKNESS ) );
aCfg->Write( keyShowZones, prms.GetFlag( FL_ZONE ) );
aCfg->Write( keyShowAdhesiveLayers, prms.GetFlag( FL_ADHESIVE ) );
aCfg->Write( keyShowSilkScreenLayers, prms.GetFlag( FL_SILKSCREEN ) );
aCfg->Write( keyShowSolderMaskLayers, prms.GetFlag( FL_SOLDERMASK ) );
aCfg->Write( keyShowSolderPasteLayers, prms.GetFlag( FL_SOLDERPASTE ) );
aCfg->Write( keyShowCommentsLayer, prms.GetFlag( FL_COMMENTS ) );
aCfg->Write( keyShowEcoLayers, prms.GetFlag( FL_ECO ) );
aCfg->Write( keyShowBoardBody, prms.GetFlag( FL_SHOW_BOARD_BODY ) );
aCfg->Write( keyBgColor_Red, GetPrm3DVisu().m_BgColor.m_Red );
aCfg->Write( keyBgColor_Green, GetPrm3DVisu().m_BgColor.m_Green );
aCfg->Write( keyBgColor_Blue, GetPrm3DVisu().m_BgColor.m_Blue );
aCfg->Write( keyBgColor_Red_Top, GetPrm3DVisu().m_BgColor_Top.m_Red );
aCfg->Write( keyBgColor_Green_Top, GetPrm3DVisu().m_BgColor_Top.m_Green );
aCfg->Write( keyBgColor_Blue_Top, GetPrm3DVisu().m_BgColor_Top.m_Blue );
aCfg->Write( keySMaskColor_Red, GetPrm3DVisu().m_SolderMaskColor.m_Red );
aCfg->Write( keySMaskColor_Green, GetPrm3DVisu().m_SolderMaskColor.m_Green );
aCfg->Write( keySMaskColor_Blue, GetPrm3DVisu().m_SolderMaskColor.m_Blue );
aCfg->Write( keySPasteColor_Red, GetPrm3DVisu().m_SolderPasteColor.m_Red );
aCfg->Write( keySPasteColor_Green, GetPrm3DVisu().m_SolderPasteColor.m_Green );
aCfg->Write( keySPasteColor_Blue, GetPrm3DVisu().m_SolderPasteColor.m_Blue );
aCfg->Write( keySilkColor_Red, GetPrm3DVisu().m_SilkScreenColor.m_Red );
aCfg->Write( keySilkColor_Green, GetPrm3DVisu().m_SilkScreenColor.m_Green );
aCfg->Write( keySilkColor_Blue, GetPrm3DVisu().m_SilkScreenColor.m_Blue );
aCfg->Write( keyCopperColor_Red, GetPrm3DVisu().m_CopperColor.m_Red );
aCfg->Write( keyCopperColor_Green, GetPrm3DVisu().m_CopperColor.m_Green );
aCfg->Write( keyCopperColor_Blue, GetPrm3DVisu().m_CopperColor.m_Blue );
aCfg->Write( keyBoardBodyColor_Red, GetPrm3DVisu().m_BoardBodyColor.m_Red );
aCfg->Write( keyBoardBodyColor_Green, GetPrm3DVisu().m_BoardBodyColor.m_Green );
aCfg->Write( keyBoardBodyColor_Blue, GetPrm3DVisu().m_BoardBodyColor.m_Blue );
aCfg->Write( keyShowRealisticMode, prms.GetFlag( FL_USE_REALISTIC_MODE ) );
aCfg->Write( keyRenderShadows, prms.GetFlag( FL_RENDER_SHADOWS ) );
aCfg->Write( keyRenderRemoveHoles, prms.GetFlag( FL_RENDER_SHOW_HOLES_IN_ZONES ) );
aCfg->Write( keyRenderTextures, prms.GetFlag( FL_RENDER_TEXTURES ) );
aCfg->Write( keyRenderSmoothNormals, prms.GetFlag( FL_RENDER_SMOOTH_NORMALS ) );
aCfg->Write( keyRenderUseModelNormals, prms.GetFlag( FL_RENDER_USE_MODEL_NORMALS ) );
aCfg->Write( keyRenderMaterial, prms.GetFlag( FL_RENDER_MATERIAL ) );
aCfg->Write( keyRenderShowModelBBox, prms.GetFlag( FL_RENDER_SHOW_MODEL_BBOX ) );
aCfg->Write( keyShowAxis, prms.GetFlag( FL_AXIS ) );
aCfg->Write( keyShowGrid, prms.GetFlag( FL_GRID ) );
aCfg->Write( keyShowGridSize, prms.m_3D_Grid );
aCfg->Write( keyShowFootprints, prms.GetFlag( FL_MODULE ) );
aCfg->Write( keyShowCopperThickness, prms.GetFlag( FL_USE_COPPER_THICKNESS ) );
aCfg->Write( keyShowZones, prms.GetFlag( FL_ZONE ) );
aCfg->Write( keyShowAdhesiveLayers, prms.GetFlag( FL_ADHESIVE ) );
aCfg->Write( keyShowSilkScreenLayers, prms.GetFlag( FL_SILKSCREEN ) );
aCfg->Write( keyShowSolderMaskLayers, prms.GetFlag( FL_SOLDERMASK ) );
aCfg->Write( keyShowSolderPasteLayers, prms.GetFlag( FL_SOLDERPASTE ) );
aCfg->Write( keyShowCommentsLayer, prms.GetFlag( FL_COMMENTS ) );
aCfg->Write( keyShowEcoLayers, prms.GetFlag( FL_ECO ) );
aCfg->Write( keyShowBoardBody, prms.GetFlag( FL_SHOW_BOARD_BODY ) );
}
@@ -235,23 +415,23 @@ void EDA_3D_FRAME::Process_Zoom( wxCommandEvent& event )
case ID_ZOOM_PAGE:
for( ii = 0; ii < 4; ii++ )
g_Parm_3D_Visu.m_Rot[ii] = 0.0;
GetPrm3DVisu().m_Rot[ii] = 0.0;
g_Parm_3D_Visu.m_Zoom = 1.0;
GetPrm3DVisu().m_Zoom = 1.0;
m_canvas->SetOffset( 0.0, 0.0 );
trackball( g_Parm_3D_Visu.m_Quat, 0.0, 0.0, 0.0, 0.0 );
trackball( GetPrm3DVisu().m_Quat, 0.0, 0.0, 0.0, 0.0 );
break;
case ID_ZOOM_IN:
g_Parm_3D_Visu.m_Zoom /= 1.2;
GetPrm3DVisu().m_Zoom /= 1.2;
if( g_Parm_3D_Visu.m_Zoom <= 0.01 )
g_Parm_3D_Visu.m_Zoom = 0.01;
if( GetPrm3DVisu().m_Zoom <= 0.01 )
GetPrm3DVisu().m_Zoom = 0.01;
break;
case ID_ZOOM_OUT:
g_Parm_3D_Visu.m_Zoom *= 1.2;
GetPrm3DVisu().m_Zoom *= 1.2;
break;
case ID_ZOOM_REDRAW:
@@ -300,32 +480,33 @@ void EDA_3D_FRAME::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_RELOAD3D_BOARD:
m_reloadRequest = true;
NewDisplay();
return;
break;
case ID_ROTATE3D_X_POS:
g_Parm_3D_Visu.m_ROTX += ROT_ANGLE;
GetPrm3DVisu().m_ROTX += ROT_ANGLE;
break;
case ID_ROTATE3D_X_NEG:
g_Parm_3D_Visu.m_ROTX -= ROT_ANGLE;
GetPrm3DVisu().m_ROTX -= ROT_ANGLE;
break;
case ID_ROTATE3D_Y_POS:
g_Parm_3D_Visu.m_ROTY += ROT_ANGLE;
GetPrm3DVisu().m_ROTY += ROT_ANGLE;
break;
case ID_ROTATE3D_Y_NEG:
g_Parm_3D_Visu.m_ROTY -= ROT_ANGLE;
GetPrm3DVisu().m_ROTY -= ROT_ANGLE;
break;
case ID_ROTATE3D_Z_POS:
g_Parm_3D_Visu.m_ROTZ += ROT_ANGLE;
GetPrm3DVisu().m_ROTZ += ROT_ANGLE;
break;
case ID_ROTATE3D_Z_NEG:
g_Parm_3D_Visu.m_ROTZ -= ROT_ANGLE;
GetPrm3DVisu().m_ROTZ -= ROT_ANGLE;
break;
case ID_MOVE3D_LEFT:
@@ -354,68 +535,133 @@ void EDA_3D_FRAME::Process_Special_Functions( wxCommandEvent& event )
m_canvas->TakeScreenshot( event );
break;
case ID_MENU3D_BGCOLOR_SELECTION:
Set3DBgColor();
case ID_MENU3D_BGCOLOR_BOTTOM_SELECTION:
if( Set3DColorFromUser( GetPrm3DVisu().m_BgColor, _( "Background Color, Bottom" ) ) )
m_canvas->Refresh( true );
return;
case ID_MENU3D_BGCOLOR_TOP_SELECTION:
if( Set3DColorFromUser( GetPrm3DVisu().m_BgColor_Top, _( "Background Color, Top" ) ) )
m_canvas->Refresh( true );
return;
case ID_MENU3D_SILKSCREEN_COLOR_SELECTION:
Set3DSilkScreenColorFromUser();
return;
case ID_MENU3D_SOLDERMASK_COLOR_SELECTION:
Set3DSolderMaskColorFromUser();
return;
case ID_MENU3D_SOLDERPASTE_COLOR_SELECTION:
Set3DSolderPasteColorFromUser();
return;
case ID_MENU3D_COPPER_COLOR_SELECTION:
Set3DCopperColorFromUser();
break;
case ID_MENU3D_PCB_BODY_COLOR_SELECTION:
Set3DBoardBodyColorFromUser();
break;
case ID_MENU3D_REALISTIC_MODE:
g_Parm_3D_Visu.SetFlag( FL_USE_REALISTIC_MODE, isChecked );
GetPrm3DVisu().SetFlag( FL_USE_REALISTIC_MODE, isChecked );
GetMenuBar()->FindItem( ID_MENU3D_COMMENTS_ONOFF )->Enable( !isChecked );
GetMenuBar()->FindItem( ID_MENU3D_ECO_ONOFF )->Enable( !isChecked );
NewDisplay();
return;
case ID_MENU3D_FL_RENDER_SHADOWS:
GetPrm3DVisu().SetFlag( FL_RENDER_SHADOWS, isChecked );
NewDisplay();
return;
case ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES:
GetPrm3DVisu().SetFlag( FL_RENDER_SHOW_HOLES_IN_ZONES, isChecked );
NewDisplay();
return;
case ID_MENU3D_FL_RENDER_TEXTURES:
GetPrm3DVisu().SetFlag( FL_RENDER_TEXTURES, isChecked );
NewDisplay(GL_ID_BOARD);
NewDisplay(GL_ID_TECH_LAYERS);
return;
case ID_MENU3D_FL_RENDER_SMOOTH_NORMALS:
GetPrm3DVisu().SetFlag( FL_RENDER_SMOOTH_NORMALS, isChecked );
NewDisplay();
return;
case ID_MENU3D_FL_RENDER_USE_MODEL_NORMALS:
GetPrm3DVisu().SetFlag( FL_RENDER_USE_MODEL_NORMALS, isChecked );
NewDisplay();
return;
case ID_MENU3D_FL_RENDER_MATERIAL:
GetPrm3DVisu().SetFlag( FL_RENDER_MATERIAL, isChecked );
NewDisplay();
return;
case ID_MENU3D_FL_RENDER_SHOW_MODEL_BBOX:
GetPrm3DVisu().SetFlag( FL_RENDER_SHOW_MODEL_BBOX, isChecked );
NewDisplay();
return;
case ID_MENU3D_SHOW_BOARD_BODY:
g_Parm_3D_Visu.SetFlag( FL_SHOW_BOARD_BODY, isChecked );
GetPrm3DVisu().SetFlag( FL_SHOW_BOARD_BODY, isChecked );
NewDisplay();
return;
case ID_MENU3D_AXIS_ONOFF:
g_Parm_3D_Visu.SetFlag( FL_AXIS, isChecked );
GetPrm3DVisu().SetFlag( FL_AXIS, isChecked );
m_canvas->Refresh();
return;
case ID_MENU3D_MODULE_ONOFF:
g_Parm_3D_Visu.SetFlag( FL_MODULE, isChecked );
GetPrm3DVisu().SetFlag( FL_MODULE, isChecked );
m_canvas->Refresh();
return;
case ID_MENU3D_USE_COPPER_THICKNESS:
g_Parm_3D_Visu.SetFlag( FL_USE_COPPER_THICKNESS, isChecked );
NewDisplay(GL_ID_BOARD);
GetPrm3DVisu().SetFlag( FL_USE_COPPER_THICKNESS, isChecked );
NewDisplay( GL_ID_BOARD );
NewDisplay( GL_ID_TECH_LAYERS );
return;
case ID_MENU3D_ZONE_ONOFF:
g_Parm_3D_Visu.SetFlag( FL_ZONE, isChecked );
NewDisplay(GL_ID_BOARD);
GetPrm3DVisu().SetFlag( FL_ZONE, isChecked );
NewDisplay( GL_ID_BOARD );
return;
case ID_MENU3D_ADHESIVE_ONOFF:
g_Parm_3D_Visu.SetFlag( FL_ADHESIVE, isChecked );
NewDisplay(GL_ID_TECH_LAYERS);
GetPrm3DVisu().SetFlag( FL_ADHESIVE, isChecked );
NewDisplay( GL_ID_TECH_LAYERS );
return;
case ID_MENU3D_SILKSCREEN_ONOFF:
g_Parm_3D_Visu.SetFlag( FL_SILKSCREEN, isChecked );
NewDisplay(GL_ID_TECH_LAYERS);
GetPrm3DVisu().SetFlag( FL_SILKSCREEN, isChecked );
NewDisplay( GL_ID_TECH_LAYERS );
return;
case ID_MENU3D_SOLDER_MASK_ONOFF:
g_Parm_3D_Visu.SetFlag( FL_SOLDERMASK, isChecked );
NewDisplay(GL_ID_TECH_LAYERS);
GetPrm3DVisu().SetFlag( FL_SOLDERMASK, isChecked );
NewDisplay( GL_ID_TECH_LAYERS );
return;
case ID_MENU3D_SOLDER_PASTE_ONOFF:
g_Parm_3D_Visu.SetFlag( FL_SOLDERPASTE, isChecked );
NewDisplay(GL_ID_TECH_LAYERS);
GetPrm3DVisu().SetFlag( FL_SOLDERPASTE, isChecked );
NewDisplay( GL_ID_TECH_LAYERS );
return;
case ID_MENU3D_COMMENTS_ONOFF:
g_Parm_3D_Visu.SetFlag( FL_COMMENTS, isChecked );
NewDisplay(GL_ID_AUX_LAYERS);
GetPrm3DVisu().SetFlag( FL_COMMENTS, isChecked );
NewDisplay( GL_ID_AUX_LAYERS );
return;
case ID_MENU3D_ECO_ONOFF:
g_Parm_3D_Visu.SetFlag( FL_ECO, isChecked );
NewDisplay(GL_ID_AUX_LAYERS);
GetPrm3DVisu().SetFlag( FL_ECO, isChecked );
NewDisplay( GL_ID_AUX_LAYERS );
return;
default:
@@ -432,7 +678,7 @@ void EDA_3D_FRAME::On3DGridSelection( wxCommandEvent& event )
{
int id = event.GetId();
for( int ii = ID_MENU3D_GRID; ii < ID_MENU3D_GRID_END; ii++ )
for( int ii = ID_MENU3D_GRID_NOGRID; ii < ID_MENU3D_GRID_END; ii++ )
{
if( event.GetId() == ii )
continue;
@@ -443,27 +689,27 @@ void EDA_3D_FRAME::On3DGridSelection( wxCommandEvent& event )
switch( id )
{
case ID_MENU3D_GRID_NOGRID:
g_Parm_3D_Visu.SetFlag( FL_GRID, false );
GetPrm3DVisu().SetFlag( FL_GRID, false );
break;
case ID_MENU3D_GRID_10_MM:
g_Parm_3D_Visu.SetFlag( FL_GRID, true );
g_Parm_3D_Visu.m_3D_Grid = 10.0;
GetPrm3DVisu().SetFlag( FL_GRID, true );
GetPrm3DVisu().m_3D_Grid = 10.0;
break;
case ID_MENU3D_GRID_5_MM:
g_Parm_3D_Visu.SetFlag( FL_GRID, true );
g_Parm_3D_Visu.m_3D_Grid = 5.0;
GetPrm3DVisu().SetFlag( FL_GRID, true );
GetPrm3DVisu().m_3D_Grid = 5.0;
break;
case ID_MENU3D_GRID_2P5_MM:
g_Parm_3D_Visu.SetFlag( FL_GRID, true );
g_Parm_3D_Visu.m_3D_Grid = 2.5;
GetPrm3DVisu().SetFlag( FL_GRID, true );
GetPrm3DVisu().m_3D_Grid = 2.5;
break;
case ID_MENU3D_GRID_1_MM:
g_Parm_3D_Visu.SetFlag( FL_GRID, true );
g_Parm_3D_Visu.m_3D_Grid = 1.0;
GetPrm3DVisu().SetFlag( FL_GRID, true );
GetPrm3DVisu().m_3D_Grid = 1.0;
break;
default:
@@ -475,21 +721,24 @@ void EDA_3D_FRAME::On3DGridSelection( wxCommandEvent& event )
}
void EDA_3D_FRAME::NewDisplay( GLuint aGlList )
void EDA_3D_FRAME::NewDisplay( int aGlList )
{
m_reloadRequest = false;
m_canvas->ClearLists( aGlList );
m_canvas->CreateDrawGL_List();
// Rebuild the 3D board and refresh the view on reload request:
if( m_reloadRequest )
m_canvas->ReportWarnings( true );
m_canvas->Refresh( true );
m_canvas->DisplayStatus();
m_reloadRequest = false;
}
void EDA_3D_FRAME::OnActivate( wxActivateEvent& event )
{
// Reload data if 3D frame shows a footprint,
// Reload data if 3D frame shows a board,
// because it can be changed since last frame activation
if( m_reloadRequest )
NewDisplay();
@@ -500,30 +749,166 @@ void EDA_3D_FRAME::OnActivate( wxActivateEvent& event )
/* called to set the background color of the 3D scene
*/
void EDA_3D_FRAME::Set3DBgColor()
bool EDA_3D_FRAME::Set3DColorFromUser( S3D_COLOR &aColor, const wxString& aTitle,
wxColourData* aPredefinedColors )
{
S3D_COLOR color;
wxColour newcolor, oldcolor;
wxColour newcolor, oldcolor;
oldcolor.Set( KiROUND( g_Parm_3D_Visu.m_BgColor.m_Red * 255 ),
KiROUND( g_Parm_3D_Visu.m_BgColor.m_Green * 255 ),
KiROUND( g_Parm_3D_Visu.m_BgColor.m_Blue * 255 ) );
oldcolor.Set( KiROUND( aColor.m_Red * 255 ),
KiROUND( aColor.m_Green * 255 ),
KiROUND( aColor.m_Blue * 255 ) );
newcolor = wxGetColourFromUser( this, oldcolor );
wxColourData emptyColorSet; // Provides a empty predefined set of colors
// if no color set available to avoid use of an
// old color set
if( !newcolor.IsOk() ) // Happens on cancel dialog
return;
if( aPredefinedColors == NULL )
aPredefinedColors = &emptyColorSet;
newcolor = wxGetColourFromUser( this, oldcolor, aTitle, aPredefinedColors );
if( !newcolor.IsOk() ) // Cancel command
return false;
if( newcolor != oldcolor )
{
g_Parm_3D_Visu.m_BgColor.m_Red = (double) newcolor.Red() / 255.0;
g_Parm_3D_Visu.m_BgColor.m_Green = (double) newcolor.Green() / 255.0;
g_Parm_3D_Visu.m_BgColor.m_Blue = (double) newcolor.Blue() / 255.0;
NewDisplay();
aColor.m_Red = (double) newcolor.Red() / 255.0;
aColor.m_Green = (double) newcolor.Green() / 255.0;
aColor.m_Blue = (double) newcolor.Blue() / 255.0;
}
return true;
}
/* called to set the silkscreen color. Sets up a number of default colors
*/
bool EDA_3D_FRAME::Set3DSilkScreenColorFromUser()
{
wxColourData definedColors;
definedColors.SetCustomColour(0, wxColour( 241, 241, 241 ) ); // White
definedColors.SetCustomColour(1, wxColour( 180, 180, 180 ) ); // Gray
bool change = Set3DColorFromUser( GetPrm3DVisu().m_SilkScreenColor,
_( "Silk Screen Color" ),
&definedColors );
if( change )
NewDisplay( GL_ID_TECH_LAYERS );
return change;
}
/* called to set the soldermask color. Sets up a number of default colors
*/
bool EDA_3D_FRAME::Set3DSolderMaskColorFromUser()
{
wxColourData definedColors;
definedColors.SetCustomColour(0, wxColour( 20, 51, 36 ) ); // Green
definedColors.SetCustomColour(1, wxColour( 43, 10, 65 ) ); // Purple
definedColors.SetCustomColour(2, wxColour( 117, 19, 21 ) ); // Red
definedColors.SetCustomColour(3, wxColour( 54, 79, 116) ); // Light blue
definedColors.SetCustomColour(4, wxColour( 11, 11, 11 ) ); // Black
definedColors.SetCustomColour(5, wxColour( 241, 241,241) ); // White
bool change = Set3DColorFromUser( GetPrm3DVisu().m_SolderMaskColor,
_( "Solder Mask Color" ),
&definedColors );
if( change )
NewDisplay( GL_ID_TECH_LAYERS );
return change;
}
/* called to set the copper surface color. Sets up a number of default colors
*/
bool EDA_3D_FRAME::Set3DCopperColorFromUser()
{
wxColourData definedColors;
definedColors.SetCustomColour( 0, wxColour( 184, 115, 50 ) ); // Copper
definedColors.SetCustomColour( 1, wxColour( 233, 221, 82 ) ); // Gold
definedColors.SetCustomColour( 2, wxColour( 213, 213, 213) ); // Silver
definedColors.SetCustomColour( 3, wxColour( 160, 160, 160) ); // tin
bool change = Set3DColorFromUser( GetPrm3DVisu().m_CopperColor,
_( "Copper Color" ),
&definedColors );
if( change )
NewDisplay( GL_ID_BOARD );
return change;
}
/* called to set the board body color. Sets up a number of default colors
*/
bool EDA_3D_FRAME::Set3DBoardBodyColorFromUser()
{
wxColourData definedColors;
definedColors.SetCustomColour( 0, wxColour( 51, 43, 22 ) ); // FR4 natural, dark
definedColors.SetCustomColour( 1, wxColour( 109, 116, 75 ) ); // FR4 natural
definedColors.SetCustomColour( 2, wxColour( 78, 14, 5 ) ); // brown/red
definedColors.SetCustomColour( 3, wxColour( 146, 99, 47 ) ); // brown 1
definedColors.SetCustomColour( 4, wxColour( 160, 123, 54 ) ); // brown 2
definedColors.SetCustomColour( 5, wxColour( 146, 99, 47 ) ); // brown 3
definedColors.SetCustomColour( 6, wxColour( 63, 126, 71 ) ); // green 1
definedColors.SetCustomColour( 7, wxColour( 117, 122, 90 ) ); // green 2
bool change = Set3DColorFromUser( GetPrm3DVisu().m_BoardBodyColor,
_( "Board Body Color" ),
&definedColors );
if( change )
NewDisplay( GL_ID_BOARD );
return change;
}
/* called to set the solder paste layer color. Sets up a number of default colors
*/
bool EDA_3D_FRAME::Set3DSolderPasteColorFromUser()
{
wxColourData definedColors;
definedColors.SetCustomColour(0, wxColour( 128, 128, 128 ) ); // grey
definedColors.SetCustomColour(1, wxColour( 213, 213, 213 ) ); // Silver
definedColors.SetCustomColour(2, wxColour( 90, 90, 90 ) ); // grey 2
bool change = Set3DColorFromUser( GetPrm3DVisu().m_SolderPasteColor,
_( "Solder Paste Color" ),
&definedColors );
if( change )
NewDisplay( GL_ID_TECH_LAYERS );
return change;
}
BOARD* EDA_3D_FRAME::GetBoard()
{
return Parent()->GetBoard();
}
INFO3D_VISU& EDA_3D_FRAME::GetPrm3DVisu() const
{
// return the INFO3D_VISU which contains the current parameters
// to draw the 3D view of the board
return g_Parm_3D_Visu;
}
bool EDA_3D_FRAME::IsEnabled( DISPLAY3D_FLG aItem ) const
{
// return true if aItem must be displayed
return GetPrm3DVisu().GetFlag( aItem );
}
+156
View File
@@ -0,0 +1,156 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014-2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file 3d_class.cpp
*/
#include <fctsys.h>
#include <3d_struct.h>
#include <3d_material.h>
#include <info3d_visu.h>
#ifdef __WXMAC__
# ifdef __DARWIN__
# include <OpenGL/glu.h>
# else
# include <glu.h>
# endif
#else
# include <GL/glu.h>
#endif
S3D_MATERIAL::S3D_MATERIAL( S3D_MASTER* father, const wxString& name ) :
EDA_ITEM( father, NOT_USED )
{
m_Name = name;
m_AmbientColor.clear();
m_DiffuseColor.clear();
m_EmissiveColor.clear();
m_SpecularColor.clear();
m_Shininess.clear();
m_Transparency.clear();
m_ColorPerVertex = false;
}
void SetOpenGlDefaultMaterial()
{
glm::vec4 ambient( 0.2f, 0.2f, 0.2f, 1.0f );
glm::vec4 specular( 0.0f, 0.0f, 0.0f, 1.0f );
glm::vec4 emissive( 0.0f, 0.0f, 0.0f, 1.0f );
glm::vec4 diffuse( 0.0f, 0.0f, 0.0f, 1.0f );
GLint shininess_value = 0;
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
glMateriali ( GL_FRONT_AND_BACK, GL_SHININESS, shininess_value );
glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION, &emissive.x );
glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, &specular.x );
glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT, &ambient.x );
glMaterialfv( GL_FRONT_AND_BACK, GL_DIFFUSE, &diffuse.x );
}
bool S3D_MATERIAL::SetOpenGLMaterial( unsigned int aMaterialIndex, bool aUseMaterial )
{
if( aUseMaterial )
{
float transparency_value = 0.0f;
if( m_Transparency.size() > aMaterialIndex )
{
transparency_value = m_Transparency[aMaterialIndex];
}
else
{
if( m_Transparency.size() > 0 )
transparency_value = m_Transparency[0];
}
if( m_DiffuseColor.size() > aMaterialIndex )
{
glm::vec3 color = m_DiffuseColor[aMaterialIndex];
glColor4f( color.x, color.y, color.z, 1.0f - transparency_value );
}
else
{
if( m_DiffuseColor.size() == 0 )
{
glColor4f( 0.8f, 0.8f, 0.8f, 1.0f );
}
}
if( m_Shininess.size() > 0 )
{
glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, m_Shininess[0] );
}
// emissive
if( m_EmissiveColor.size() > aMaterialIndex )
{
glm::vec4 emissive;
emissive[0] = m_EmissiveColor[aMaterialIndex].x;
emissive[1] = m_EmissiveColor[aMaterialIndex].y;
emissive[2] = m_EmissiveColor[aMaterialIndex].z;
emissive[3] = 1.0f;
glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION, &emissive.x );
}
// specular
if( m_SpecularColor.size() > aMaterialIndex )
{
glm::vec4 specular;
specular[0] = m_SpecularColor[aMaterialIndex].x;
specular[1] = m_SpecularColor[aMaterialIndex].y;
specular[2] = m_SpecularColor[aMaterialIndex].z;
specular[3] = 1.0f;
glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, &specular.x );
}
// ambient
if( m_AmbientColor.size() > aMaterialIndex )
{
glm::vec4 ambient;
ambient[0] = m_AmbientColor[aMaterialIndex].x;
ambient[1] = m_AmbientColor[aMaterialIndex].y;
ambient[2] = m_AmbientColor[aMaterialIndex].z;
ambient[3] = 1.0f;
glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT, &ambient.x );
}
return (transparency_value != 0.0f);
}
else
{
if( m_DiffuseColor.size() > aMaterialIndex )
{
glm::vec3 color = m_DiffuseColor[aMaterialIndex];
glColor4f( color.x, color.y, color.z, 1.0 );
}
}
return false;
}
+83
View File
@@ -0,0 +1,83 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014-2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file 3d_material.h
*/
#ifndef STRUCT_3D_MATERIAL_H
#define STRUCT_3D_MATERIAL_H
#include <common.h>
#include <base_struct.h>
#define GLM_FORCE_RADIANS
#include <gal/opengl/glm/glm.hpp>
class S3D_MASTER;
class S3D_MATERIAL : public EDA_ITEM // openGL "material" data
{
public:
wxString m_Name;
// Material list
std::vector< glm::vec3 > m_AmbientColor;
std::vector< glm::vec3 > m_DiffuseColor;
std::vector< glm::vec3 > m_EmissiveColor;
std::vector< glm::vec3 > m_SpecularColor;
std::vector< float > m_Shininess;
std::vector< float > m_Transparency;
bool m_ColorPerVertex;
public:
S3D_MATERIAL( S3D_MASTER* father, const wxString& name );
S3D_MATERIAL* Next() const { return (S3D_MATERIAL*) Pnext; }
S3D_MATERIAL* Back() const { return (S3D_MATERIAL*) Pback; }
/**
* Initialize the material prms.
* @param aMaterialIndex = the index in list of available materials
* @param aUseMaterial = true to use the values found in the available material
* = false to use only the color, and other prms are fixed
* @return true if the material is transparency
*/
bool SetOpenGLMaterial(unsigned int aMaterialIndex, bool aUseMaterial);
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
/** Get class name
* @return string "S3D_MATERIAL"
*/
virtual wxString GetClass() const
{
return wxT( "S3D_MATERIAL" );
}
};
void SetOpenGlDefaultMaterial();
#endif
File diff suppressed because it is too large Load Diff
+107
View File
@@ -0,0 +1,107 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014-2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file 3d_mesh_model.h
* @brief
*/
#ifndef __3D_MESH_MODEL_H__
#define __3D_MESH_MODEL_H__
#include <memory>
#include <boost/shared_ptr.hpp>
#include <vector>
#define GLM_FORCE_RADIANS
#include <gal/opengl/glm/glm.hpp>
#include "3d_struct.h"
#include "3d_material.h"
#include "CBBox.h"
class S3D_MESH;
/** A smart pointer to an S3D_MESH object */
typedef boost::shared_ptr<S3D_MESH> S3D_MESH_PTR;
/** A container of smar S3D_MESH object pointers */
typedef std::vector<S3D_MESH_PTR> S3D_MESH_PTRS;
class S3D_MESH
{
public:
S3D_MESH();
~S3D_MESH();
void openGL_RenderAllChilds( bool aIsRenderingJustNonTransparentObjects,
bool aIsRenderingJustTransparentObjects );
S3D_MATERIAL *m_Materials;
// Point and index list
std::vector< S3D_VERTEX > m_Point;
std::vector< std::vector<int> > m_CoordIndex;
std::vector< std::vector<int> > m_NormalIndex;
std::vector< S3D_VERTEX > m_PerFaceColor;
std::vector< S3D_VERTEX > m_PerFaceNormalsNormalized;
std::vector< S3D_VERTEX > m_PerVertexNormalsNormalized;
std::vector< int > m_MaterialIndexPerFace;
std::vector< std::vector<int> > m_MaterialIndexPerVertex;
S3D_MESH_PTRS childs;
S3D_VERTEX m_translation;
glm::vec4 m_rotation;
S3D_VERTEX m_scale;
CBBOX &getBBox();
private:
std::vector< S3D_VERTEX > m_PerFaceNormalsRaw_X_PerFaceSquaredArea;
std::vector< std::vector< S3D_VERTEX > > m_PerFaceVertexNormals;
std::vector< S3D_VERTEX > m_PointNormalized;
std::vector< std::vector<int> > m_InvalidCoordIndexes; //!TODO: check for invalid CoordIndex in file and remove the index and the same material index
bool isPerFaceNormalsComputed;
void calcPerFaceNormals ();
bool isPointNormalizedComputed;
void calcPointNormalized();
bool isPerPointNormalsComputed;
void calcPerPointNormals();
bool isPerVertexNormalsVerified;
void perVertexNormalsVerify_and_Repair();
void calcBBox();
void calcBBoxAllChilds();
CBBOX m_BBox;
void openGL_Render( bool aIsRenderingJustNonTransparentObjects,
bool aIsRenderingJustTransparentObjects );
};
#endif
+119 -72
View File
@@ -1,9 +1,10 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras@wanadoo.fr
* Copyright (C) 2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras@wanadoo.fr
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -32,70 +33,32 @@
#include <macros.h>
#include <kicad_string.h>
#include <pgm_base.h>
#define GLM_FORCE_RADIANS
#include <gal/opengl/glm/gtc/matrix_transform.hpp>
#include <3d_viewer.h>
#include <info3d_visu.h>
#include "3d_struct.h"
#include "modelparsers.h"
S3D_MODEL_PARSER* S3D_MODEL_PARSER::Create( S3D_MASTER* aMaster,
S3D_MODEL_PARSER *S3D_MODEL_PARSER::Create( S3D_MASTER* aMaster,
const wxString aExtension )
{
if ( aExtension == wxT( "x3d" ) )
{
return new X3D_MODEL_PARSER( aMaster );
}
else if ( aExtension == wxT( "wrl" ) )
{
return new VRML_MODEL_PARSER( aMaster );
}
else
{
return NULL;
}
}
const wxString S3D_MASTER::GetShape3DFullFilename()
return NULL;
}
int S3D_MASTER::ReadData( S3D_MODEL_PARSER* aParser )
{
if( m_Shape3DFullFilename.IsEmpty() || aParser == NULL )
return -1;
wxString shapeName;
// Expand any environment variables embedded in footprint's m_Shape3DName field.
// To ensure compatibility with most of footprint's m_Shape3DName field,
// if the m_Shape3DName is not an absolute path the default path
// given by the environment variable KISYS3DMOD will be used
if( m_Shape3DName.StartsWith( wxT("${") ) )
shapeName = wxExpandEnvVars( m_Shape3DName );
else
shapeName = m_Shape3DName;
wxFileName fn( shapeName );
if( fn.IsAbsolute() || shapeName.StartsWith( wxT(".") ) )
return shapeName;
wxString default_path;
wxGetEnv( wxT( KISYS3DMOD ), &default_path );
if( default_path.IsEmpty() )
return shapeName;
if( !default_path.EndsWith( wxT("/") ) && !default_path.EndsWith( wxT("\\") ) )
default_path += wxT("/");
default_path += shapeName;
return default_path;
}
int S3D_MASTER::ReadData()
{
if( m_Shape3DName.IsEmpty() )
return 1;
wxString filename = GetShape3DFullFilename();
wxString filename = m_Shape3DFullFilename;
#ifdef __WINDOWS__
filename.Replace( wxT( "/" ), wxT( "\\" ) );
@@ -103,30 +66,114 @@ int S3D_MASTER::ReadData()
filename.Replace( wxT( "\\" ), wxT( "/" ) );
#endif
if( !wxFileName::FileExists( filename ) )
if( wxFileName::FileExists( filename ) )
{
wxLogDebug( wxT( "3D shape '%s' not found, even tried '%s' after env var substitution." ),
GetChars( m_Shape3DName ),
GetChars( filename )
);
return -1;
wxFileName fn( filename );
if( aParser->Load( filename ) )
{
// Invalidate bounding boxes
m_fastAABBox.Reset();
m_BBox.Reset();
m_parser = aParser;
return 0;
}
}
wxFileName fn( filename );
wxString extension = fn.GetExt();
S3D_MODEL_PARSER* parser = S3D_MODEL_PARSER::Create( this, extension );
if( parser )
{
parser->Load( filename );
delete parser;
return 0;
}
else
{
wxLogDebug( wxT( "Unknown file type '%s'" ), GetChars( extension ) );
}
wxLogDebug( wxT( "3D shape '%s' not found, even tried '%s' after env var substitution." ),
GetChars( m_Shape3DName ),
GetChars( filename ) );
return -1;
}
void S3D_MASTER::Render( bool aIsRenderingJustNonTransparentObjects,
bool aIsRenderingJustTransparentObjects )
{
if( m_parser == NULL )
return;
double aVrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB;
glScalef( aVrmlunits_to_3Dunits, aVrmlunits_to_3Dunits, aVrmlunits_to_3Dunits );
glTranslatef( m_MatPosition.x * SCALE_3D_CONV,
m_MatPosition.y * SCALE_3D_CONV,
m_MatPosition.z * SCALE_3D_CONV );
glRotatef( -m_MatRotation.z, 0.0f, 0.0f, 1.0f );
glRotatef( -m_MatRotation.y, 0.0f, 1.0f, 0.0f );
glRotatef( -m_MatRotation.x, 1.0f, 0.0f, 0.0f );
glScalef( m_MatScale.x, m_MatScale.y, m_MatScale.z );
for( unsigned int idx = 0; idx < m_parser->childs.size(); idx++ )
m_parser->childs[idx]->openGL_RenderAllChilds( aIsRenderingJustNonTransparentObjects,
aIsRenderingJustTransparentObjects );
}
CBBOX &S3D_MASTER::getBBox( )
{
if( !m_BBox.IsInitialized() )
calcBBox();
return m_BBox;
}
CBBOX &S3D_MASTER::getFastAABBox( )
{
if( !m_fastAABBox.IsInitialized() )
calcBBox();
return m_fastAABBox;
}
void S3D_MASTER::calcBBox()
{
if( m_parser == NULL )
return;
bool firstBBox = true;
for( unsigned int idx = 0; idx < m_parser->childs.size(); idx++ )
if( firstBBox )
{
firstBBox = false;
m_BBox = m_parser->childs[idx]->getBBox();
}
else
m_BBox.Union( m_parser->childs[idx]->getBBox() );
// Calc transformation matrix to apply in AABBox
float aVrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB;
glm::mat4 fullTransformMatrix;
fullTransformMatrix = glm::scale( glm::mat4(), S3D_VERTEX( aVrmlunits_to_3Dunits,
aVrmlunits_to_3Dunits,
aVrmlunits_to_3Dunits ) );
fullTransformMatrix = glm::translate( fullTransformMatrix, S3D_VERTEX( m_MatPosition.x * SCALE_3D_CONV,
m_MatPosition.y * SCALE_3D_CONV,
m_MatPosition.z * SCALE_3D_CONV) );
if( m_MatRotation.z != 0.0 )
fullTransformMatrix = glm::rotate( fullTransformMatrix, glm::radians(-(float)m_MatRotation.z), S3D_VERTEX( 0.0f, 0.0f, 1.0f ) );
if( m_MatRotation.y != 0.0 )
fullTransformMatrix = glm::rotate( fullTransformMatrix, glm::radians(-(float)m_MatRotation.y), S3D_VERTEX( 0.0f, 1.0f, 0.0f ) );
if( m_MatRotation.x != 0.0 )
fullTransformMatrix = glm::rotate( fullTransformMatrix, glm::radians(-(float)m_MatRotation.x), S3D_VERTEX( 1.0f, 0.0f, 0.0f ) );
fullTransformMatrix = glm::scale( fullTransformMatrix, S3D_VERTEX( m_MatScale.x, m_MatScale.y, m_MatScale.z ) );
// Apply transformation
m_fastAABBox = m_BBox;
m_fastAABBox.ApplyTransformationAA( fullTransformMatrix );
}
+61 -107
View File
@@ -1,7 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2014-2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 2004 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
@@ -32,71 +33,25 @@
#include <common.h>
#include <base_struct.h>
/* 3D modeling units -> PCB units conversion scale:
* 1 "3D model unit" wings3d = 1 unit = 2.54 mm = 0.1 inch = 100 mils
*/
#define UNITS3D_TO_UNITSPCB (IU_PER_MILS * 100)
#include <3d_material.h>
#include <3d_types.h>
#include <CBBox.h>
class S3D_MASTER;
class STRUCT_3D_SHAPE;
class S3D_MODEL_PARSER;
/* S3D_VERTEX manages a 3D coordinate (3 float numbers: x,y,z coordinates)*/
class S3D_VERTEX
{
public:
double x, y, z;
public:
S3D_VERTEX()
{
x = y = z = 0.0;
}
S3D_VERTEX( double px, double py, double pz)
{
x = px;
y = py;
z = pz;
}
};
class S3D_MATERIAL : public EDA_ITEM /* openGL "material" data*/
{
public:
wxString m_Name;
S3D_VERTEX m_DiffuseColor;
S3D_VERTEX m_EmissiveColor;
S3D_VERTEX m_SpecularColor;
float m_AmbientIntensity;
float m_Transparency;
float m_Shininess;
public:
S3D_MATERIAL( S3D_MASTER* father, const wxString& name );
S3D_MATERIAL* Next() const { return (S3D_MATERIAL*) Pnext; }
S3D_MATERIAL* Back() const { return (S3D_MATERIAL*) Pback; }
void SetMaterial();
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
};
/* Master structure for a 3D item description */
// Master structure for a 3D footprint shape description
class S3D_MASTER : public EDA_ITEM
{
public:
S3D_VERTEX m_MatScale;
S3D_VERTEX m_MatRotation;
S3D_VERTEX m_MatPosition;
STRUCT_3D_SHAPE* m_3D_Drawings;
S3D_MATERIAL* m_Materials;
S3DPOINT m_MatScale; ///< a scaling factor for the entire 3D footprint shape
S3DPOINT m_MatRotation; ///< a grotation for the entire 3D footprint shape
S3DPOINT m_MatPosition; ///< an offset for the entire 3D footprint shape
STRUCT_3D_SHAPE* m_3D_Drawings; ///< the list of basic shapes
S3D_MATERIAL* m_Materials; ///< the list of materiels used by the shapes
S3D_MODEL_PARSER* m_parser; ///< it store the loaded file to be rendered later
enum FILE3D_TYPE
{
@@ -106,13 +61,19 @@ public:
FILE3D_UNKNOWN
};
// Check defaults in S3D_MASTER
bool m_use_modelfile_diffuseColor;
bool m_use_modelfile_emissiveColor;
bool m_use_modelfile_specularColor;
bool m_use_modelfile_ambientIntensity;
bool m_use_modelfile_transparency;
bool m_use_modelfile_shininess;
private:
wxString m_Shape3DName; /* 3D shape name in 3D library */
FILE3D_TYPE m_ShapeType;
double m_lastTransparency; // last transparency value from
// last material in use
bool m_loadTransparentObjects;
bool m_loadNonTransparentObjects;
wxString m_Shape3DName; ///< The 3D shape filename in 3D library
FILE3D_TYPE m_ShapeType; ///< Shape type based on filename extension
wxString m_Shape3DFullFilename; ///< Full file path name
wxString m_Shape3DNameExtension; ///< Extension of the shape file name
public:
S3D_MASTER( EDA_ITEM* aParent );
@@ -122,32 +83,20 @@ public:
S3D_MASTER* Back() const { return (S3D_MASTER*) Pback; }
// Accessors
void SetLastTransparency( double aValue ) { m_lastTransparency = aValue; }
void SetLoadTransparentObjects( bool aLoad )
{ m_loadTransparentObjects = aLoad; }
void SetLoadNonTransparentObjects( bool aLoad )
{ m_loadNonTransparentObjects = aLoad; }
void Insert( S3D_MATERIAL* aMaterial );
/**
* Function IsOpenGlAllowed
* @return true if opengl current list accepts a gl data
* used to filter transparent objects, which are drawn after
* non transparent objects
*/
bool IsOpenGlAllowed();
void Copy( S3D_MASTER* pattern );
/**
* Function ReadData
* Select the parser to read the 3D data file (vrml, x3d ...)
* and build the description objects list
* @param aParser the parser that should be used to read model data and stored in
*/
int ReadData();
int ReadData( S3D_MODEL_PARSER* aParser );
void Render( bool aIsRenderingJustNonTransparentObjects,
bool aIsRenderingJustTransparentObjects );
/**
* Function ObjectCoordsTo3DUnits
@@ -173,6 +122,14 @@ public:
return m_Shape3DName;
}
/** Get class name
* @return string "S3D_MASTER"
*/
virtual wxString GetClass() const
{
return wxT( "S3D_MASTER" );
}
/**
* Function GetShape3DFullFilename
* @return the full filename of the 3D shape,
@@ -181,6 +138,12 @@ public:
*/
const wxString GetShape3DFullFilename();
/**
* Function GetShape3DExtension
* @return the extension of the filename of the 3D shape,
*/
const wxString GetShape3DExtension();
/**
* Function SetShape3DName
* @param aShapeName = file name of the data file relative to the 3D shape
@@ -189,6 +152,23 @@ public:
* (vrl, x3d, idf ) the type of file.
*/
void SetShape3DName( const wxString& aShapeName );
/**
* Function getBBox Model Space Bouding Box
* @return return the model space bouding box
*/
CBBOX &getBBox();
/**
* Function getFastAABBox
* @return return the Axis Align Bounding Box of the other bouding boxes
*/
CBBOX &getFastAABBox();
private:
void calcBBox();
CBBOX m_BBox; ///< Model oriented Bouding Box
CBBOX m_fastAABBox; ///< Axis Align Bounding Box that contain the other bounding boxes
};
@@ -212,30 +192,4 @@ public:
#endif
};
/**
* Class VERTEX_VALUE_CTRL
* displays a vertex for editing. A vertex is a triplet of values
* Values can be scale, rotation, offset...
*/
class VERTEX_VALUE_CTRL
{
private:
wxTextCtrl* m_XValueCtrl, * m_YValueCtrl, * m_ZValueCtrl;
public:
VERTEX_VALUE_CTRL( wxWindow* parent, wxBoxSizer* BoxSizer );
~VERTEX_VALUE_CTRL();
/**
* Function GetValue
* @return the vertex in internal units.
*/
S3D_VERTEX GetValue();
void SetValue( S3D_VERTEX vertex );
void Enable( bool enbl );
void SetToolTip( const wxString& text );
};
#endif // STRUCT_3D_H
+152 -53
View File
@@ -1,9 +1,9 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -51,15 +51,11 @@ void EDA_3D_FRAME::ReCreateMainToolbar()
m_mainToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
KiBitmap( import3d_xpm ), _( "Reload board" ) );
#if (defined(__WINDOWS__) || defined(__APPLE__ ) )
// Does not work properly under linux
m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
KiBitmap( copy_button_xpm ),
_( "Copy 3D Image to Clipboard" ) );
#endif
_( "Copy 3D image to clipboard" ) );
m_mainToolBar->AddSeparator();
@@ -138,47 +134,116 @@ void EDA_3D_FRAME::CreateMenuBar()
menuBar->Append( fileMenu, _( "&File" ) );
fileMenu->Append( ID_MENU_SCREENCOPY_PNG, _( "Create Image (png format)" ) );
fileMenu->Append( ID_MENU_SCREENCOPY_JPEG, _( "Create Image (jpeg format)" ) );
#if (defined(__WINDOWS__) || defined(__APPLE__ ) )
// Does not work properly under linux
fileMenu->AppendSeparator();
fileMenu->Append( ID_TOOL_SCREENCOPY_TOCLIBBOARD, _( "Copy 3D Image to Clipboard" ) );
#endif
AddMenuItem( fileMenu, ID_MENU_SCREENCOPY_PNG,
_( "Create Image (png format)" ),
KiBitmap( export_xpm ) );
AddMenuItem( fileMenu, ID_MENU_SCREENCOPY_JPEG,
_( "Create Image (jpeg format)" ),
KiBitmap( export_xpm ) );
fileMenu->AppendSeparator();
fileMenu->Append( wxID_EXIT, _( "&Exit" ) );
AddMenuItem( fileMenu, ID_TOOL_SCREENCOPY_TOCLIBBOARD,
_( "Copy 3D Image to Clipboard" ),
KiBitmap( copy_button_xpm ) );
fileMenu->AppendSeparator();
AddMenuItem( fileMenu, wxID_EXIT,
_( "&Exit" ),
KiBitmap( exit_xpm ) );
menuBar->Append( prefsMenu, _( "&Preferences" ) );
AddMenuItem( prefsMenu, ID_MENU3D_REALISTIC_MODE,
_( "Realistic Mode" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
_( "Realistic Mode" ),
KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
wxMenu * renderOptionsMenu = new wxMenu;
AddMenuItem( prefsMenu, renderOptionsMenu, ID_MENU3D_COLOR,
_( "Render Options" ), KiBitmap( tools_xpm ) );
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_SHADOWS,
_( "Render Shadows" ),
KiBitmap( green_xpm ), wxITEM_CHECK );
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES,
_( "Show Holes in Zones" ),
_( "Holes inside a copper layer copper zones are shown, "
"but the calculation time is longer" ),
KiBitmap( green_xpm ), wxITEM_CHECK );
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_TEXTURES,
_( "Render Textures" ),
_( "Apply a grid/cloud textures to board, solder mask and silk screen" ),
KiBitmap( green_xpm ), wxITEM_CHECK );
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_SMOOTH_NORMALS,
_( "Render Smooth Normals" ),
KiBitmap( green_xpm ), wxITEM_CHECK );
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_USE_MODEL_NORMALS,
_( "Use Model Normals" ),
KiBitmap( green_xpm ), wxITEM_CHECK );
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_MATERIAL,
_( "Render Material Properties" ),
KiBitmap( green_xpm ), wxITEM_CHECK );
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_SHOW_MODEL_BBOX,
_( "Show Model Bounding Boxes" ),
KiBitmap( green_xpm ), wxITEM_CHECK );
prefsMenu->AppendSeparator();
AddMenuItem( prefsMenu, ID_MENU3D_BGCOLOR_SELECTION,
_( "Choose background color" ), KiBitmap( palette_xpm ) );
// Add submenu set Colors
wxMenu * setColorMenu = new wxMenu;
AddMenuItem( prefsMenu, setColorMenu, ID_MENU3D_COLOR,
_( "Choose Colors" ), KiBitmap( palette_xpm ) );
wxMenu * setBgColorMenu = new wxMenu;
AddMenuItem( setColorMenu, setBgColorMenu, ID_MENU3D_BGCOLOR,
_( "Background Color" ), KiBitmap( palette_xpm ) );
AddMenuItem( setBgColorMenu, ID_MENU3D_BGCOLOR_TOP_SELECTION,
_( "Background Top Color" ), KiBitmap( setcolor_3d_bg_xpm ) );
AddMenuItem( setBgColorMenu, ID_MENU3D_BGCOLOR_BOTTOM_SELECTION,
_( "Background Bottom Color" ), KiBitmap( setcolor_3d_bg_xpm ) );
AddMenuItem( setColorMenu, ID_MENU3D_SILKSCREEN_COLOR_SELECTION,
_( "Silkscreen Color" ), KiBitmap( setcolor_silkscreen_xpm ) );
AddMenuItem( setColorMenu, ID_MENU3D_SOLDERMASK_COLOR_SELECTION,
_( "Solder Mask Color" ), KiBitmap( setcolor_soldermask_xpm ) );
AddMenuItem( setColorMenu, ID_MENU3D_SOLDERPASTE_COLOR_SELECTION,
_( "Solder Paste Color" ), KiBitmap( setcolor_solderpaste_xpm ) );
AddMenuItem( setColorMenu, ID_MENU3D_COPPER_COLOR_SELECTION,
_( "Copper/Surface Finish Color" ), KiBitmap( setcolor_copper_xpm ) );
AddMenuItem( setColorMenu, ID_MENU3D_PCB_BODY_COLOR_SELECTION,
_( "Board Body Color" ), KiBitmap( setcolor_board_body_xpm ) );
AddMenuItem( prefsMenu, ID_MENU3D_AXIS_ONOFF,
_( "Show 3D &Axis" ), KiBitmap( axis3d_front_xpm ), wxITEM_CHECK );
_( "Show 3D &Axis" ), KiBitmap( axis3d_front_xpm ), wxITEM_CHECK );
// Creates grid menu
wxMenu * gridlistMenu = new wxMenu;
AddMenuItem( prefsMenu, gridlistMenu, ID_MENU3D_GRID,
_( "3D Grid" ), KiBitmap( grid_xpm ) );
gridlistMenu->Append( ID_MENU3D_GRID_NOGRID, _( "No 3D Grid" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_10_MM, _( "3D Grid 10 mm" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_5_MM, _( "3D Grid 5 mm" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_2P5_MM, _( "3D Grid 2.5 mm" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_1_MM, _( "3D Grid 1 mm" ), wxEmptyString, true );
gridlistMenu->AppendCheckItem( ID_MENU3D_GRID_NOGRID, _( "No 3D Grid" ), wxEmptyString );
gridlistMenu->AppendCheckItem( ID_MENU3D_GRID_10_MM, _( "3D Grid 10 mm" ), wxEmptyString );
gridlistMenu->AppendCheckItem( ID_MENU3D_GRID_5_MM, _( "3D Grid 5 mm" ), wxEmptyString );
gridlistMenu->AppendCheckItem( ID_MENU3D_GRID_2P5_MM, _( "3D Grid 2.5 mm" ), wxEmptyString );
gridlistMenu->AppendCheckItem( ID_MENU3D_GRID_1_MM, _( "3D Grid 1 mm" ), wxEmptyString );
// If the grid is on, check the corresponding menuitem showing the grid size
if( g_Parm_3D_Visu.GetFlag( FL_GRID ) )
if( IsEnabled( FL_GRID ) )
{
gridlistMenu->Check( ID_MENU3D_GRID_10_MM, g_Parm_3D_Visu.m_3D_Grid == 10.0 );
gridlistMenu->Check( ID_MENU3D_GRID_5_MM, g_Parm_3D_Visu.m_3D_Grid == 5.0 );
gridlistMenu->Check( ID_MENU3D_GRID_2P5_MM, g_Parm_3D_Visu.m_3D_Grid == 2.5 );
gridlistMenu->Check( ID_MENU3D_GRID_1_MM, g_Parm_3D_Visu.m_3D_Grid == 1.0 );
gridlistMenu->Check( ID_MENU3D_GRID_10_MM, GetPrm3DVisu().m_3D_Grid == 10.0 );
gridlistMenu->Check( ID_MENU3D_GRID_5_MM, GetPrm3DVisu().m_3D_Grid == 5.0 );
gridlistMenu->Check( ID_MENU3D_GRID_2P5_MM, GetPrm3DVisu().m_3D_Grid == 2.5 );
gridlistMenu->Check( ID_MENU3D_GRID_1_MM, GetPrm3DVisu().m_3D_Grid == 1.0 );
}
else
gridlistMenu->Check( ID_MENU3D_GRID_NOGRID, true );
@@ -186,35 +251,41 @@ void EDA_3D_FRAME::CreateMenuBar()
prefsMenu->AppendSeparator();
AddMenuItem( prefsMenu, ID_MENU3D_SHOW_BOARD_BODY,
_( "Show Board Body" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
_( "Show Board Bod&y" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
AddMenuItem( prefsMenu, ID_MENU3D_USE_COPPER_THICKNESS,
_( "Show Copper Thickness" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
_( "Show Copper &Thickness" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
AddMenuItem( prefsMenu, ID_MENU3D_MODULE_ONOFF,
_( "Show 3D F&ootprints" ), KiBitmap( shape_3d_xpm ), wxITEM_CHECK );
_( "Show 3D M&odels" ), KiBitmap( shape_3d_xpm ), wxITEM_CHECK );
AddMenuItem( prefsMenu, ID_MENU3D_ZONE_ONOFF,
_( "Show Zone &Filling" ), KiBitmap( add_zone_xpm ), wxITEM_CHECK );
prefsMenu->AppendSeparator();
AddMenuItem( prefsMenu, ID_MENU3D_ADHESIVE_ONOFF,
wxMenu * layersMenu = new wxMenu;
AddMenuItem( prefsMenu, layersMenu, ID_MENU3D_LAYERS,
_( "Show &Layers" ), KiBitmap( tools_xpm ) );
AddMenuItem( layersMenu, ID_MENU3D_ADHESIVE_ONOFF,
_( "Show &Adhesive Layers" ), KiBitmap( tools_xpm ), wxITEM_CHECK );
AddMenuItem( prefsMenu, ID_MENU3D_SILKSCREEN_ONOFF,
_( "Show &Silkscreen Layer" ), KiBitmap( add_text_xpm ), wxITEM_CHECK );
AddMenuItem( layersMenu, ID_MENU3D_SILKSCREEN_ONOFF,
_( "Show &Silkscreen Layers" ), KiBitmap( add_text_xpm ), wxITEM_CHECK );
AddMenuItem( prefsMenu, ID_MENU3D_SOLDER_MASK_ONOFF,
AddMenuItem( layersMenu, ID_MENU3D_SOLDER_MASK_ONOFF,
_( "Show Solder &Mask Layers" ), KiBitmap( pads_mask_layers_xpm ), wxITEM_CHECK );
AddMenuItem( prefsMenu, ID_MENU3D_SOLDER_PASTE_ONOFF,
AddMenuItem( layersMenu, ID_MENU3D_SOLDER_PASTE_ONOFF,
_( "Show Solder &Paste Layers" ), KiBitmap( pads_mask_layers_xpm ), wxITEM_CHECK );
AddMenuItem( prefsMenu, ID_MENU3D_COMMENTS_ONOFF,
_( "Show &Comments and Drawings Layer" ), KiBitmap( edit_sheet_xpm ), wxITEM_CHECK );
// Other layers are not "board" layers, and are not shown in realistic mode
// These menus will be disabled in in realistic mode
AddMenuItem( layersMenu, ID_MENU3D_COMMENTS_ONOFF,
_( "Show &Comments and Drawing Layers" ), KiBitmap( edit_sheet_xpm ), wxITEM_CHECK );
AddMenuItem( prefsMenu, ID_MENU3D_ECO_ONOFF,
AddMenuItem( layersMenu, ID_MENU3D_ECO_ONOFF,
_( "Show &Eco Layers" ), KiBitmap( edit_sheet_xpm ), wxITEM_CHECK );
SetMenuBar( menuBar );
@@ -231,40 +302,68 @@ void EDA_3D_FRAME::SetMenuBarOptionsState()
wxMenuItem* item;
// Set the state of toggle menus according to the current display options
item = menuBar->FindItem( ID_MENU3D_REALISTIC_MODE );
item->Check(g_Parm_3D_Visu.GetFlag( FL_USE_REALISTIC_MODE ) );
item->Check( GetPrm3DVisu().IsRealisticMode() );
item = menuBar->FindItem( ID_MENU3D_COMMENTS_ONOFF );
item->Enable( !GetPrm3DVisu().IsRealisticMode() );
item = menuBar->FindItem( ID_MENU3D_ECO_ONOFF );
item->Enable( !GetPrm3DVisu().IsRealisticMode() );
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SHADOWS );
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_SHADOWS ) );
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SHADOWS );
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_SHADOWS ) );
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES );
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_SHOW_HOLES_IN_ZONES ) );
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_TEXTURES );
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_TEXTURES ) );
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SMOOTH_NORMALS );
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_SMOOTH_NORMALS ) );
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_USE_MODEL_NORMALS );
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_USE_MODEL_NORMALS ) );
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL );
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_MATERIAL ) );
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SHOW_MODEL_BBOX );
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_SHOW_MODEL_BBOX ) );
item = menuBar->FindItem( ID_MENU3D_SHOW_BOARD_BODY );
item->Check(g_Parm_3D_Visu.GetFlag( FL_SHOW_BOARD_BODY ) );
item->Check( GetPrm3DVisu().GetFlag( FL_SHOW_BOARD_BODY ) );
item = menuBar->FindItem( ID_MENU3D_USE_COPPER_THICKNESS );
item->Check(g_Parm_3D_Visu.GetFlag( FL_USE_COPPER_THICKNESS ) );
item->Check( GetPrm3DVisu().GetFlag( FL_USE_COPPER_THICKNESS ) );
item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF );
item->Check(g_Parm_3D_Visu.GetFlag( FL_MODULE ) );
item->Check( GetPrm3DVisu().GetFlag( FL_MODULE ) );
item = menuBar->FindItem( ID_MENU3D_ZONE_ONOFF );
item->Check(g_Parm_3D_Visu.GetFlag( FL_ZONE ) );
item->Check( GetPrm3DVisu().GetFlag( FL_ZONE ) );
item = menuBar->FindItem( ID_MENU3D_AXIS_ONOFF );
item->Check(g_Parm_3D_Visu.GetFlag( FL_AXIS ) );
item->Check( GetPrm3DVisu().GetFlag( FL_AXIS ) );
item = menuBar->FindItem( ID_MENU3D_ADHESIVE_ONOFF );
item->Check(g_Parm_3D_Visu.GetFlag( FL_ADHESIVE ) );
item->Check( GetPrm3DVisu().GetFlag( FL_ADHESIVE ) );
item = menuBar->FindItem( ID_MENU3D_SILKSCREEN_ONOFF );
item->Check(g_Parm_3D_Visu.GetFlag( FL_SILKSCREEN ) );
item->Check( GetPrm3DVisu().GetFlag( FL_SILKSCREEN ) );
item = menuBar->FindItem( ID_MENU3D_SOLDER_MASK_ONOFF );
item->Check(g_Parm_3D_Visu.GetFlag( FL_SOLDERMASK ) );
item->Check( GetPrm3DVisu().GetFlag( FL_SOLDERMASK ) );
item = menuBar->FindItem( ID_MENU3D_SOLDER_PASTE_ONOFF );
item->Check(g_Parm_3D_Visu.GetFlag( FL_SOLDERPASTE ) );
item->Check( GetPrm3DVisu().GetFlag( FL_SOLDERPASTE ) );
item = menuBar->FindItem( ID_MENU3D_COMMENTS_ONOFF );
item->Check(g_Parm_3D_Visu.GetFlag( FL_COMMENTS ) );
item->Check( GetPrm3DVisu().GetFlag( FL_COMMENTS ) );
item = menuBar->FindItem( ID_MENU3D_ECO_ONOFF );
item->Check(g_Parm_3D_Visu.GetFlag( FL_ECO ));
item->Check( GetPrm3DVisu().GetFlag( FL_ECO ));
}
void EDA_3D_FRAME::SetToolbars()
+108
View File
@@ -0,0 +1,108 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file 3d_types.h
*/
#ifndef _3D_TYPES_H_
#define _3D_TYPES_H_
#define GLM_FORCE_RADIANS
#include <gal/opengl/glm/glm.hpp>
#include <base_units.h> // for IU_PER_MILS
/**
* @note For historical reasons the 3D modeling unit is 0.1 inch
* 1 3Dunit = 2.54 mm = 0.1 inch = 100 mils
*/
#define UNITS3D_TO_UNITSPCB (IU_PER_MILS * 100)
/**
* scaling factor for 3D shape offset ( S3D_MASTER::m_MatPosition member )
* Was in inches in legacy version, and, due to a mistake, still in inches
* in .kicad_pcb files (which are using mm)
* so this scaling convert file units (inch) to 3D units (0.1 inch), only
* for S3D_MASTER::m_MatPosition parameter
*/
#define SCALE_3D_CONV 10
// S3D_VERTEX manages a opengl 3D coordinate (3 float numbers: x,y,z coordinates)
// float are widely used in opengl functions.
// they are used here in coordinates which are also used in opengl functions.
#define S3D_VERTEX glm::vec3
// S3DPOINT manages a set of 3 double values (x,y,z )
// It is used for values which are not directly used in opengl functions.
// It is used in dialogs, or when reading/writing files for instance
class S3DPOINT
{
public:
double x, y, z;
public:
S3DPOINT()
{
x = y = z = 0.0;
}
S3DPOINT( double px, double py, double pz)
{
x = px;
y = py;
z = pz;
}
};
/**
* Class S3DPOINT_VALUE_CTRL
* displays a S3DPOINT for editing (in dialogs). A S3DPOINT is a triplet of values
* Values can be scale, rotation, offset...
*/
class S3DPOINT_VALUE_CTRL
{
private:
wxTextCtrl* m_XValueCtrl, * m_YValueCtrl, * m_ZValueCtrl;
public:
S3DPOINT_VALUE_CTRL( wxWindow* parent, wxBoxSizer* BoxSizer );
~S3DPOINT_VALUE_CTRL();
/**
* Function GetValue
* @return the 3D point in internal units.
*/
S3DPOINT GetValue();
void SetValue( S3DPOINT a3Dpoint );
void Enable( bool enbl );
void SetToolTip( const wxString& text );
};
#endif // 3D_TYPES_H
+77 -23
View File
@@ -37,29 +37,22 @@
#endif
#include <wx/glcanvas.h>
#ifdef __WXMAC__
# ifdef __DARWIN__
# include <OpenGL/glu.h>
# else
# include <glu.h>
# endif
#else
# include <GL/glu.h>
#endif
#define KISYS3DMOD "KISYS3DMOD"
#include <3d_struct.h>
#include <info3d_visu.h>
#define KISYS3DMOD "KISYS3DMOD"
/// A variable name whose value holds the path of 3D shape files.
/// Currently an environment variable, eventually a project variable.
#define KISYS3DMOD wxT( "KISYS3DMOD" )
/// All 3D files are expected to be stored in LIB3D_FOLDER, or one of
/// its subdirectory.
#define LIB3D_FOLDER wxT( "packages3d" )
class EDA_3D_CANVAS;
class PCB_BASE_FRAME;
class wxColourData;
#define KICAD_DEFAULT_3D_DRAWFRAME_STYLE (wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS)
#define LIB3D_PATH wxT( "packages3d" )
class EDA_3D_FRAME : public KIWAY_PLAYER
@@ -76,10 +69,7 @@ public:
EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, const wxString& aTitle,
long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE );
~EDA_3D_FRAME()
{
m_auimgr.UnInit();
};
~EDA_3D_FRAME();
PCB_BASE_FRAME* Parent() const { return (PCB_BASE_FRAME*)GetParent(); }
@@ -103,7 +93,7 @@ public:
* @param aGlList = the list to rebuild.
* if 0 (default) all lists are rebuilt
*/
void NewDisplay( GLuint aGlList = 0 );
void NewDisplay( int aGlList = 0 );
void SetDefaultFileName(const wxString &aFn) { m_defaultFileName = aFn; }
const wxString &GetDefaultFileName() const { return m_defaultFileName; }
@@ -111,9 +101,21 @@ public:
/// Toggles orthographic projection on and off
void ToggleOrtho(){ m_ortho = !m_ortho ; Refresh(true);};
/// Returns the orthographic projection flag
/// @return the orthographic projection flag
bool ModeIsOrtho() { return m_ortho ;};
/** @return the INFO3D_VISU which contains the current parameters
* to draw the 3D view og the board
*/
INFO3D_VISU& GetPrm3DVisu() const;
/**
* @return true if aItem must be displayed
* @param aItem = an item of DISPLAY3D_FLG enum
*/
bool IsEnabled( DISPLAY3D_FLG aItem ) const;
private:
// Event handlers:
void Exit3DFrame( wxCommandEvent& event );
@@ -141,7 +143,59 @@ private:
double BestZoom();
void RedrawActiveWindow( wxDC* DC, bool EraseBg );
void Set3DBgColor();
/**
* Function Set3DColorFromUser
* Get a S3D_COLOR from a wx colour dialog
* @param aColor is the S3D_COLOR to change
* @param aTitle is the title displayed in the colordialog selector
* @param aPredefinedColors is a reference to a wxColourData
* which contains a few predefined colors
* if it is NULL, no predefined colors are used
* @return true if a new color is chosen, false if
* no change or aborted by user
*/
bool Set3DColorFromUser( S3D_COLOR &aColor, const wxString& aTitle,
wxColourData* aPredefinedColors = NULL );
/**
* Function Set3DSolderMaskColorFromUser
* Set the solder mask color from a set of colors
* @return true if a new color is chosen, false if
* no change or aborted by user
*/
bool Set3DSolderMaskColorFromUser();
/**
* Function Set3DSolderPasteColorFromUser
* Set the solder mask color from a set of colors
* @return true if a new color is chosen, false if
* no change or aborted by user
*/
bool Set3DSolderPasteColorFromUser();
/**
* Function Set3DCopperColorFromUser
* Set the copper color from a set of colors
* @return true if a new color is chosen, false if
* no change or aborted by user
*/
bool Set3DCopperColorFromUser();
/**
* Function Set3DBoardBodyBodyColorFromUser
* Set the copper color from a set of colors
* @return true if a new color is chosen, false if
* no change or aborted by user
*/
bool Set3DBoardBodyColorFromUser();
/**
* Function Set3DSilkScreenColorFromUser
* Set the silkscreen color from a set of colors
* @return true if a new color is chosen, false if
* no change or aborted by user
*/
bool Set3DSilkScreenColorFromUser();
DECLARE_EVENT_TABLE()
};
+21 -3
View File
@@ -8,13 +8,15 @@
* Please add IDs that are unique to the 3D viewer here and not in the global
* id.h file. This will prevent the entire project from being rebuilt when
* adding new commands to the 3D viewer.
* However the number of IDs should be < ROOM_FOR_3D_VIEWER, defined in id.h
* Please change the value of ROOM_FOR_3D_VIEWER if too small.
*/
#include <id.h> // Generic Id.
#include <id.h> // Generic Id.
enum id_3dview_frm
{
ID_START_COMMAND_3D = ID_END_LIST,
ID_START_COMMAND_3D = ID_KICAD_3D_VIEWER_START,
ID_ROTATE3D_X_NEG,
ID_ROTATE3D_X_POS,
ID_ROTATE3D_Y_NEG,
@@ -28,11 +30,20 @@ enum id_3dview_frm
ID_MOVE3D_UP,
ID_MOVE3D_DOWN,
ID_ORTHO,
ID_MENU3D_BGCOLOR_SELECTION,
ID_MENU3D_COLOR,
ID_MENU3D_BGCOLOR,
ID_MENU3D_BGCOLOR_BOTTOM_SELECTION,
ID_MENU3D_BGCOLOR_TOP_SELECTION,
ID_MENU3D_SILKSCREEN_COLOR_SELECTION,
ID_MENU3D_SOLDERMASK_COLOR_SELECTION,
ID_MENU3D_SOLDERPASTE_COLOR_SELECTION,
ID_MENU3D_PCB_BODY_COLOR_SELECTION,
ID_MENU3D_COPPER_COLOR_SELECTION,
ID_MENU3D_USE_COPPER_THICKNESS,
ID_MENU3D_AXIS_ONOFF,
ID_MENU3D_MODULE_ONOFF,
ID_MENU3D_ZONE_ONOFF,
ID_MENU3D_LAYERS,
ID_MENU3D_ADHESIVE_ONOFF,
ID_MENU3D_SILKSCREEN_ONOFF,
ID_MENU3D_SOLDER_PASTE_ONOFF,
@@ -41,6 +52,13 @@ enum id_3dview_frm
ID_MENU3D_ECO_ONOFF,
ID_MENU3D_SHOW_BOARD_BODY,
ID_MENU3D_REALISTIC_MODE,
ID_MENU3D_FL_RENDER_SHADOWS,
ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES,
ID_MENU3D_FL_RENDER_TEXTURES,
ID_MENU3D_FL_RENDER_SMOOTH_NORMALS,
ID_MENU3D_FL_RENDER_USE_MODEL_NORMALS,
ID_MENU3D_FL_RENDER_MATERIAL,
ID_MENU3D_FL_RENDER_SHOW_MODEL_BBOX,
ID_END_COMMAND_3D,
ID_TOOL_SET_VISIBLE_ITEMS,
+278
View File
@@ -0,0 +1,278 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file CBBox.cpp
* @brief Bounding Box class implementation
*/
#include "CBBox.h"
// openGL includes used for debug the bounding box
#ifdef __WXMAC__
# ifdef __DARWIN__
# include <OpenGL/glu.h>
# else
# include <glu.h>
# endif
#else
# include <GL/glu.h>
#endif
CBBOX::CBBOX()
{
Reset();
}
CBBOX::CBBOX( const S3D_VERTEX &aPbInit )
{
m_min = aPbInit;
m_max = aPbInit;
m_initialized = true;
}
CBBOX::CBBOX( const S3D_VERTEX &aPbMin, const S3D_VERTEX &aPbMax )
{
Set( aPbMin, aPbMax );
}
CBBOX::~CBBOX()
{
}
void CBBOX::Set( const S3D_VERTEX &aPbMin, const S3D_VERTEX &aPbMax )
{
m_min.x = glm::min( aPbMin.x, aPbMax.x );
m_min.y = glm::min( aPbMin.y, aPbMax.y );
m_min.z = glm::min( aPbMin.z, aPbMax.z );
m_max.x = glm::max( aPbMin.x, aPbMax.x );
m_max.y = glm::max( aPbMin.y, aPbMax.y );
m_max.z = glm::max( aPbMin.z, aPbMax.z );
m_initialized = true;
}
bool CBBOX::IsInitialized() const
{
return m_initialized;
}
void CBBOX::Reset()
{
m_min = S3D_VERTEX( 0.0f, 0.0f, 0.0f );
m_max = S3D_VERTEX( 0.0f, 0.0f, 0.0f );
m_initialized = false;
}
void CBBOX::Union( const S3D_VERTEX &aPoint )
{
if( !m_initialized )
{
m_initialized = true;
// Initialize the bounding box with the given point
m_min = aPoint;
m_max = aPoint;
}
else
{
// get the minimun value between the added point and the existent bounding box
m_min.x = glm::min( m_min.x, aPoint.x );
m_min.y = glm::min( m_min.y, aPoint.y );
m_min.z = glm::min( m_min.z, aPoint.z );
// get the maximun value between the added point and the existent bounding box
m_max.x = glm::max( m_max.x, aPoint.x );
m_max.y = glm::max( m_max.y, aPoint.y );
m_max.z = glm::max( m_max.z, aPoint.z );
}
}
void CBBOX::Union( const CBBOX &aBBox )
{
if( aBBox.m_initialized == false )
return;
if( !m_initialized )
{
// Initialize the bounding box with the given bounding box
m_initialized = true;
m_min = aBBox.m_min;
m_max = aBBox.m_max;
}
else
{
// get the minimun value between the added bounding box and the existent bounding box
m_min.x = glm::min( m_min.x, aBBox.m_min.x );
m_min.y = glm::min( m_min.y, aBBox.m_min.y );
m_min.z = glm::min( m_min.z, aBBox.m_min.z );
// get the maximun value between the added bounding box and the existent bounding box
m_max.x = glm::max( m_max.x, aBBox.m_max.x );
m_max.y = glm::max( m_max.y, aBBox.m_max.y );
m_max.z = glm::max( m_max.z, aBBox.m_max.z );
}
}
S3D_VERTEX CBBOX::GetCenter() const
{
return (m_max + m_min) * 0.5f;
}
S3D_VERTEX CBBOX::Min() const
{
return m_min;
}
S3D_VERTEX CBBOX::Max() const
{
return m_max;
}
void CBBOX::Scale( float aScale )
{
if( m_initialized == false )
return;
S3D_VERTEX scaleV = S3D_VERTEX( aScale, aScale, aScale );
S3D_VERTEX centerV = GetCenter();
m_min = (m_min - centerV) * scaleV + centerV;
m_max = (m_max - centerV) * scaleV + centerV;
}
bool CBBOX::OverlapsBox( const CBBOX &aBBox ) const
{
if( aBBox.m_initialized == false )
return false;
bool x = ( m_max.x >= aBBox.m_min.x ) && ( m_min.x <= aBBox.m_max.x );
bool y = ( m_max.y >= aBBox.m_min.y ) && ( m_min.y <= aBBox.m_max.y );
bool z = ( m_max.z >= aBBox.m_min.z ) && ( m_min.z <= aBBox.m_max.z );
return ( x && y && z );
}
bool CBBOX::Inside( const S3D_VERTEX &aPoint ) const
{
if( m_initialized == false )
return false;
return (( aPoint.x >= m_min.x ) && ( aPoint.x <= m_max.x ) &&
( aPoint.y >= m_min.y ) && ( aPoint.y <= m_max.y ) &&
( aPoint.z >= m_min.z ) && ( aPoint.z <= m_max.z ));
}
float CBBOX::Volume() const
{
if( m_initialized == false )
return 0.0f;
S3D_VERTEX d = m_max - m_min;
return d.x * d.y * d.z;
}
void CBBOX::ApplyTransformation( glm::mat4 aTransformMatrix )
{
if( m_initialized == false )
return;
S3D_VERTEX v1 = S3D_VERTEX( aTransformMatrix * glm::vec4( m_min.x, m_min.y, m_min.z, 1.0f ) );
S3D_VERTEX v2 = S3D_VERTEX( aTransformMatrix * glm::vec4( m_max.x, m_max.y, m_max.z, 1.0f ) );
Reset();
Union( v1 );
Union( v2 );
}
void CBBOX::ApplyTransformationAA( glm::mat4 aTransformMatrix )
{
if( m_initialized == false )
return;
// apply the transformation matrix for each of vertices of the bounding box
// and make a union with all vertices
CBBOX tmpBBox = CBBOX( S3D_VERTEX( aTransformMatrix * glm::vec4( m_min.x, m_min.y, m_min.z, 1.0f ) ) );
tmpBBox.Union( S3D_VERTEX( aTransformMatrix * glm::vec4( m_max.x, m_min.y, m_min.z, 1.0f ) ) );
tmpBBox.Union( S3D_VERTEX( aTransformMatrix * glm::vec4( m_min.x, m_max.y, m_min.z, 1.0f ) ) );
tmpBBox.Union( S3D_VERTEX( aTransformMatrix * glm::vec4( m_min.x, m_min.y, m_max.z, 1.0f ) ) );
tmpBBox.Union( S3D_VERTEX( aTransformMatrix * glm::vec4( m_min.x, m_max.y, m_max.z, 1.0f ) ) );
tmpBBox.Union( S3D_VERTEX( aTransformMatrix * glm::vec4( m_max.x, m_max.y, m_min.z, 1.0f ) ) );
tmpBBox.Union( S3D_VERTEX( aTransformMatrix * glm::vec4( m_max.x, m_min.y, m_max.z, 1.0f ) ) );
tmpBBox.Union( S3D_VERTEX( aTransformMatrix * glm::vec4( m_max.x, m_max.y, m_max.z, 1.0f ) ) );
m_min = tmpBBox.m_min;
m_max = tmpBBox.m_max;
}
void CBBOX::GLdebug() const
{
if( m_initialized == false )
return;
glBegin( GL_LINE_LOOP );
glVertex3f( m_min.x, m_min.y, m_min.z );
glVertex3f( m_max.x, m_min.y, m_min.z );
glVertex3f( m_max.x, m_max.y, m_min.z );
glVertex3f( m_min.x, m_max.y, m_min.z );
glEnd();
glBegin( GL_LINE_LOOP );
glVertex3f( m_min.x, m_min.y, m_max.z );
glVertex3f( m_max.x, m_min.y, m_max.z );
glVertex3f( m_max.x, m_max.y, m_max.z );
glVertex3f( m_min.x, m_max.y, m_max.z );
glEnd();
glBegin( GL_LINE_STRIP );
glVertex3f( m_min.x, m_min.y, m_min.z );
glVertex3f( m_min.x, m_min.y, m_max.z );
glEnd();
glBegin( GL_LINE_STRIP );
glVertex3f( m_max.x, m_min.y, m_min.z );
glVertex3f( m_max.x, m_min.y, m_max.z );
glEnd();
glBegin( GL_LINE_STRIP );
glVertex3f( m_max.x, m_max.y, m_min.z );
glVertex3f( m_max.x, m_max.y, m_max.z );
glEnd();
glBegin( GL_LINE_STRIP );
glVertex3f( m_min.x, m_max.y, m_min.z );
glVertex3f( m_min.x, m_max.y, m_max.z );
glEnd();
}
+182
View File
@@ -0,0 +1,182 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file CBBox.h
* @brief Bounding Box class definition
*/
#ifndef CBBox_h
#define CBBox_h
#define GLM_FORCE_RADIANS
#include <gal/opengl/glm/glm.hpp>
#include <3d_types.h>
/**
* Class CBBOX
* manages a bounding box defined by two S3D_VERTEX points.
*/
class CBBOX
{
public:
/**
* Constructor CBBOX
* Create with default values a bounding box (not inizialized)
*/
CBBOX();
/**
* Constructor CBBOX
* Initialize a bounding box with a given point
* @param aPbInit a point for the bounding box initialization
*/
CBBOX( const S3D_VERTEX &aPbInit );
/**
* Constructor CBBOX
* Initialize a bounding box with a minimon and a maximun point
* @param aPbMin the minimun point to initialize the bounding box
* @param aPbMax the maximun point to initialize the bounding box
*/
CBBOX( const S3D_VERTEX &aPbMin, const S3D_VERTEX &aPbMax );
~CBBOX();
/**
* Function Set
* Set bounding box with new parameters
* @param aPbMin the minimun point to initialize the bounding box
* @param aPbMax the maximun point to initialize the bounding box
*/
void Set( const S3D_VERTEX &aPbMin, const S3D_VERTEX &aPbMax );
/**
* Function Union
* recalculate the bounding box adding a point
* @param aPoint the point to be bounded
*/
void Union( const S3D_VERTEX &aPoint );
/**
* Function Union
* recalculate the bounding box adding other bounding box
* @param aBBox the bounding box to be bounded
*/
void Union( const CBBOX &aBBox );
/**
* Function Scale
* scales a bounding box by its center
* @param aScale scale factor to apply
*/
void Scale( float aScale );
/**
* Function OverlapsBox
* test if a bounding box overlaps this box
* @param aBBox the bounding box to check if it overlaps
*/
bool OverlapsBox( const CBBOX &aBBox ) const;
/**
* Function Inside
* check is a point is inside this bounding box
* @param aPoint point to test
*/
bool Inside( const S3D_VERTEX &aPoint ) const;
/**
* Function ApplyTransformation
* apply a transformation matrix to the box points
* @param aTransformMatrix matrix to apply to the points of the bounding box
*/
void ApplyTransformation( glm::mat4 aTransformMatrix );
/**
* Function ApplyTransformationAA
* apply a transformation matrix to the box points and recalculate it
* to fit an axis aligned bounding box
* @param aTransformMatrix matrix to apply to the points of the bounding box
*/
void ApplyTransformationAA( glm::mat4 aTransformMatrix );
/**
* Function Volume
* calculate the volume of a bounding box
* @return float - volume of this bounding box
*/
float Volume() const;
/**
* Function GLdebug
* render a wired bounding box using openGL
*/
void GLdebug() const;
/**
* Function IsInitialized
* check if this bounding box is already initialized
* @return bool - return true if it was initialized, false if otherwise
*/
bool IsInitialized() const;
/**
* Function Reset
* reset the bounding box to zero and de-initialized it
*/
void Reset();
/**
* Function GetCenter
* return the center point of the bounding box
* @return S3D_VERTEX - the position of the center of this bounding box
*/
S3D_VERTEX GetCenter() const;
/**
* Function Min
* return the minimun vertex pointer
* @return S3D_VERTEX - the minimun vertice position
*/
S3D_VERTEX Min() const;
/**
* Function Max
* return the maximum vertex pointer
* @return S3D_VERTEX - the maximun vertice position
*/
S3D_VERTEX Max() const;
private:
S3D_VERTEX m_min; ///< point of the lower position of the bounding box
S3D_VERTEX m_max; ///< point of the higher position of the bounding box
bool m_initialized; ///< initialization status of the bounding box. true - if initialized, false otherwise
};
#endif // CBBox_h
+440
View File
@@ -0,0 +1,440 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file CImage.cpp
* @brief one 8bit-channel image implementation
*/
#include "CImage.h"
#include <wx/image.h> // Used for save an image to disk
#include <string.h> // For memcpy
#ifndef CLAMP
#define CLAMP(n, min, max) {if (n < min) n=min; else if (n > max) n = max;}
#endif
CIMAGE::CIMAGE( unsigned int aXsize, unsigned int aYsize )
{
m_wxh = aXsize * aYsize;
m_pixels = (unsigned char*)malloc( m_wxh );
m_width = aXsize;
m_height = aYsize;
m_wraping = (E_WRAP)WRAP_CLAMP;
}
CIMAGE::~CIMAGE()
{
free( m_pixels );
}
unsigned char* CIMAGE::GetBuffer() const
{
return m_pixels;
}
bool CIMAGE::wrapCoords( int *aXo, int *aYo ) const
{
int x = *aXo;
int y = *aYo;
switch(m_wraping)
{
case WRAP_CLAMP:
x = (x < 0 )?0:x;
x = (x >= (int)(m_width - 1))?(m_width - 1):x;
y = (y < 0)?0:y;
y = (y >= (int)(m_height - 1))?(m_height - 1):y;
break;
case WRAP_WRAP:
x = (x < 0)?((m_width - 1)+x):x;
x = (x >= (int)(m_width - 1))?(x - m_width):x;
y = (y < 0)?((m_height - 1)+y):y;
y = (y >= (int)(m_height - 1))?(y - m_height):y;
break;
default:
break;
}
if( (x < 0) || (x >= (int)m_width) ||
(y < 0) || (y >= (int)m_height) )
return false;
*aXo = x;
*aYo = y;
return true;
}
void CIMAGE::Setpixel( int aX, int aY, unsigned char aValue )
{
if( wrapCoords( &aX, &aY ) )
m_pixels[aX + aY * m_width] = aValue;
}
unsigned char CIMAGE::Getpixel( int aX, int aY ) const
{
if( wrapCoords( &aX, &aY ) )
return m_pixels[aX + aY * m_width];
else
return 0;
}
void CIMAGE::Invert()
{
for( unsigned int it = 0; it < m_wxh; it++ )
m_pixels[it] = 255 - m_pixels[it];
}
void CIMAGE::CopyFull( const CIMAGE *aImgA, const CIMAGE *aImgB, E_IMAGE_OP aOperation )
{
int aV, bV;
if( aOperation == COPY_RAW )
{
if ( aImgA == NULL )
return;
}
else
{
if ( (aImgA == NULL) || (aImgB == NULL) )
return;
}
switch(aOperation)
{
case COPY_RAW:
memcpy( m_pixels, aImgA->m_pixels, m_wxh );
break;
case COPY_ADD:
for( unsigned int it = 0;it < m_wxh; it++ )
{
aV = aImgA->m_pixels[it];
bV = aImgB->m_pixels[it];
aV = (aV + bV);
aV = (aV > 255)?255:aV;
m_pixels[it] = aV;
}
break;
case COPY_SUB:
for( unsigned int it = 0;it < m_wxh; it++ )
{
aV = aImgA->m_pixels[it];
bV = aImgB->m_pixels[it];
aV = (aV - bV);
aV = (aV < 0)?0:aV;
m_pixels[it] = aV;
}
break;
case COPY_DIF:
for( unsigned int it = 0;it < m_wxh; it++ )
{
aV = aImgA->m_pixels[it];
bV = aImgB->m_pixels[it];
m_pixels[it] = abs(aV - bV);
}
break;
case COPY_MUL:
for( unsigned int it = 0;it < m_wxh; it++ )
{
aV = aImgA->m_pixels[it];
bV = aImgB->m_pixels[it];
m_pixels[it] = (unsigned char)((((float)aV / 255.0f) * ((float)bV / 255.0f)) * 255);
}
break;
case COPY_AND:
for( unsigned int it = 0;it < m_wxh; it++ )
{
m_pixels[it] = aImgA->m_pixels[it] & aImgB->m_pixels[it];
}
break;
case COPY_OR:
for( unsigned int it = 0;it < m_wxh; it++ )
{
m_pixels[it] = aImgA->m_pixels[it] | aImgB->m_pixels[it];
}
break;
case COPY_XOR:
for( unsigned int it = 0;it < m_wxh; it++ )
{
m_pixels[it] = aImgA->m_pixels[it] ^ aImgB->m_pixels[it];
}
break;
case COPY_BLEND50:
for( unsigned int it = 0;it < m_wxh; it++ )
{
aV = aImgA->m_pixels[it];
bV = aImgB->m_pixels[it];
m_pixels[it] = (aV + bV) / 2;
}
break;
case COPY_MIN:
for( unsigned int it = 0;it < m_wxh; it++ )
{
aV = aImgA->m_pixels[it];
bV = aImgB->m_pixels[it];
m_pixels[it] = (aV < bV)?aV:bV;
}
break;
case COPY_MAX:
for( unsigned int it = 0;it < m_wxh; it++ )
{
aV = aImgA->m_pixels[it];
bV = aImgB->m_pixels[it];
m_pixels[it] = (aV > bV)?aV:bV;
}
break;
default:
break;
}
}
// TIP: If you want create or test filters you can use GIMP
// with a generic convolution matrix and get the values from there.
// http://docs.gimp.org/nl/plug-in-convmatrix.html
static const S_FILTER FILTERS[] = {
// Hi Pass
{
{ { 0, -1, -1, -1, 0},
{-1, 2, -4, 2, -1},
{-1, -4, 13, -4, -1},
{-1, 2, -4, 2, -1},
{ 0, -1, -1, -1, 0}
},
7,
255
},
// Blur
{
{ { 3, 5, 7, 5, 3},
{ 5, 9, 12, 9, 5},
{ 7, 12, 20, 12, 7},
{ 5, 9, 12, 9, 5},
{ 3, 5, 7, 5, 3}
},
182,
0
},
// Blur Invert
{
{ { 0, 0, 0, 0, 0},
{ 0, 0, -1, 0, 0},
{ 0, -1, 0, -1, 0},
{ 0, 0, -1, 0, 0},
{ 0, 0, 0, 0, 0}
},
4,
255
},
//
{
{ { 0, 2, 4, 2, 0},
{ 2, -2, 1, -2, 2},
{ 4, 1, -8, 1, 4},
{ 2, -2, 1, -2, 2},
{ 0, 2, 4, 2, 0}
},
20,
0
},
// Cartoon
{
{ {-1, -1, -1, -1, 0},
{-1, 0, 0, 0, 0},
{-1, 0, 4, 0, 0},
{ 0, 0, 0, 1, 0},
{ 0, 0, 0, 0, 4}
},
3,
0
},
// Emboss
{
{ {-1, -1, -1, -1, 0},
{-1, -1, -1, 0, 1},
{-1, -1, 0, 1, 1},
{-1, 0, 1, 1, 1},
{ 0, 1, 1, 1, 1}
},
1,
128
},
// Sharpen
{
{ {-1, -1, -1, -1, -1},
{-1, 2, 2, 2, -1},
{-1, 2, 8, 2, -1},
{-1, 2, 2, 2, -1},
{-1, -1, -1, -1, -1}
},
8,
0
},
// Melt
{
{ { 4, 2, 6, 8, 1},
{ 1, 2, 5, 4, 2},
{ 0, -1, 1, -1, 0},
{ 0, 0, -2, 0, 0},
{ 0, 0, 0, 0, 0}
},
32,
0
},
// Sobel Gx
{
{ { 0, 0, 0, 0, 0},
{ 0, -1, 0, 1, 0},
{ 0, -2, 0, 2, 0},
{ 0, -1, 0, 1, 0},
{ 0, 0, 0, 0, 0}
},
1,
0
},
// Sobel Gy
{
{ { 1, 2, 4, 2, 1},
{-1, -1, 0, 1, 1},
{-2, -2, 0, 2, 2},
{-1, -1, 0, 1, 1},
{-1, -2, -4, -2, -1},
},
1,
0
}
};// Filters
//!TODO: This functions can be optimized slipting it between the edges and
// do it without use the getpixel function.
// Optimization can be done to m_pixels[ix + iy * m_width]
// but keep in mind the parallel process of the algorithm
void CIMAGE::EfxFilter( CIMAGE *aInImg, E_FILTER aFilterType )
{
S_FILTER filter = FILTERS[aFilterType];
aInImg->m_wraping = WRAP_CLAMP;
m_wraping = WRAP_CLAMP;
#ifdef USE_OPENMP
#pragma omp parallel for
#endif /* USE_OPENMP */
for( int iy = 0; iy < (int)m_height; iy++)
{
for( int ix = 0; ix < (int)m_width; ix++ )
{
int v = 0;
for( int sy = 0; sy < 5; sy++ )
{
for( int sx = 0; sx < 5; sx++ )
{
int factor = filter.kernel[sx][sy];
unsigned char pixelv = aInImg->Getpixel( ix + sx - 2, iy + sy - 2 );
v += pixelv * factor;
}
}
v /= filter.div;
v += filter.offset;
CLAMP(v, 0, 255);
m_pixels[ix + iy * m_width] = v;
}
}
}
void CIMAGE::SetPixelsFromNormalizedFloat( const float * aNormalizedFloatArray )
{
for( unsigned int i = 0; i < m_wxh; i++ )
{
int v = aNormalizedFloatArray[i] * 255;
CLAMP(v, 0, 255);
m_pixels[i] = v;
}
}
void CIMAGE::SaveAsPNG( wxString aFileName ) const
{
unsigned char* pixelbuffer = (unsigned char*) malloc( m_wxh * 3 );
wxImage image( m_width, m_height );
for( unsigned int i = 0; i < m_wxh; i++)
{
unsigned char v = m_pixels[i];
// Set RGB value with all same values intensities
pixelbuffer[i * 3 + 0] = v;
pixelbuffer[i * 3 + 1] = v;
pixelbuffer[i * 3 + 2] = v;
}
image.SetData( pixelbuffer );
image = image.Mirror( false );
image.SaveFile( aFileName + ".png", wxBITMAP_TYPE_PNG );
image.Destroy();
}
+190
View File
@@ -0,0 +1,190 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file CImage.h
* @brief one 8bit-channel image definition
*/
#ifndef CImage_h
#define CImage_h
#include <wx/string.h>
/// Image operation type
enum E_IMAGE_OP {
COPY_RAW,
COPY_ADD,
COPY_SUB,
COPY_DIF,
COPY_MUL,
COPY_AND,
COPY_OR,
COPY_XOR,
COPY_BLEND50,
COPY_MIN,
COPY_MAX
};
/// Image wrap type enumeration
enum E_WRAP {
WRAP_ZERO, ///< Coords that wraps are not evaluated
WRAP_CLAMP, ///< Coords are clamped to image size
WRAP_WRAP ///< Coords are wrapped arround
};
/// Filter type enumeration
enum E_FILTER {
FILTER_HIPASS,
FILTER_GAUSSIAN_BLUR,
FILTER_INVERT_BLUR,
};
/// 5x5 Filter struct parameters
typedef struct {
signed char kernel[5][5];
unsigned char div;
unsigned char offset;
}S_FILTER;
/**
* Class CIMAGE
* manages a 8-bit channel image
*/
class CIMAGE
{
public:
/**
* Constructor CIMAGE
* constructs a CIMAGE based on image size
* @param aXsize x size
* @param aYsize y size
*/
CIMAGE( unsigned int aXsize, unsigned int aYsize );
~CIMAGE();
/**
* Function Setpixel
* set a value in a pixel position, position is clamped in accord with the
* current clamp settings
* @param aX x position
* @param aY y position
* @param aValue value to set the pixel
*/
void Setpixel( int aX, int aY, unsigned char aValue );
/**
* Function Getpixel
* get the pixel value from pixel position, position is clamped in accord with the
* current clamp settings
* @param aX x position
* @param aY y position
* @return unsigned char - pixel value
*/
unsigned char Getpixel( int aX, int aY ) const;
/**
* Function CopyFull
* perform a copy operation, based on operation type. The result destination is the self image class
* @param aImgA an image input
* @param aImgB an image input
* @param aOperation operation to perform
* COPY_RAW this <- aImgA
* COPY_ADD this <- CLAMP(aImgA + aImgB)
* COPY_SUB this <- CLAMP(aImgA - aImgB)
* COPY_DIF this <- abs(aImgA - aImgB)
* COPY_MUL this <- aImgA * aImgB
* COPY_AND this <- aImgA & aImgB
* COPY_OR this <- aImgA | aImgB
* COPY_XOR this <- aImgA ^ aImgB
* COPY_BLEND50 this <- (aImgA + aImgB) / 2
* COPY_MIN this <- (aImgA < aImgB)?aImgA:aImgB
* COPY_MAX this <- (aImgA > aImgB)?aImgA:aImgB
*/
void CopyFull( const CIMAGE *aImgA, const CIMAGE *aImgB, E_IMAGE_OP aOperation );
/**
* Function Invert
* invert the values of image this <- (255 - this)
*/
void Invert();
/**
* Function EfxFilter
* apply a filter to the input image and stores it in the image class
* this <- FilterType(aInImg)
* @param aInImg input image
* @param aFilterType filter type to apply
*/
void EfxFilter( CIMAGE *aInImg, E_FILTER aFilterType );
/**
* Function SaveAsPNG
* save image buffer to a PNG file into the working folder.
* each of RGB channel will have the 8bit-channel from the image.
* @param aFileName fime name (without extension)
*/
void SaveAsPNG( wxString aFileName ) const;
/**
* Function SetPixelsFromNormalizedFloat
* set the current channel from a float normalized (0.0 - 1.0) buffer
* this <- CLAMP(NormalizedFloat * 255)
* @param aNormalizedFloatArray a float array with the same size of the image
*/
void SetPixelsFromNormalizedFloat( const float * aNormalizedFloatArray );
/**
* Function GetBuffer
* get the image buffer pointer
* @return unsigned char * - the pointer of the buffer 8bit channel
*/
unsigned char* GetBuffer() const;
private:
/**
* Function wrapCoords
* calculate the coordinates points in accord with the current clamping settings
* @param aXo X coordinate to be converted (output)
* @param aXo Y coordinate to be converted (output)
* @return bool - true if the coordinates are inside the image, false otherwise
*/
bool wrapCoords( int *aXo, int *aYo ) const;
private:
unsigned char* m_pixels; ///< buffer to store the image 8bit-channel
unsigned int m_width; ///< width of the image
unsigned int m_height; ///< height of the image
unsigned int m_wxh; ///< width * height precalc value
E_WRAP m_wraping; ///< current wrapping type
};
#endif // CImage_h
+13 -1
View File
@@ -2,8 +2,10 @@ add_definitions(-DPCBNEW)
include_directories(BEFORE ${INC_BEFORE})
include_directories(
textures
../pcbnew
../polygon
${GLEW_INCLUDE_DIR}
${INC_AFTER}
)
@@ -14,14 +16,24 @@ set(3D-VIEWER_SRCS
3d_canvas.cpp
3d_class.cpp
3d_draw.cpp
3d_draw_board_body.cpp
3d_draw_basic_functions.cpp
3d_draw_helper_functions.cpp
3d_frame.cpp
3d_material.cpp
3d_mesh_model.cpp
3d_read_mesh.cpp
3d_toolbar.cpp
info3d_visu.cpp
trackball.cpp
x3dmodelparser.cpp
vrmlmodelparser.cpp
vrml_aux.cpp
vrml_v1_modelparser.cpp
vrml_v2_modelparser.cpp
x3dmodelparser.cpp
CImage.cpp
CBBox.cpp
)
add_library(3d-viewer STATIC ${3D-VIEWER_SRCS})
add_dependencies( 3d-viewer pcbcommon )
+46 -3
View File
@@ -1,3 +1,26 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2014-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "dialog_3D_view_option_base.h"
#include <3d_viewer.h>
@@ -18,11 +41,14 @@ private:
void OnShowAllClick( wxCommandEvent& event );
void OnShowNoneClick( wxCommandEvent& event );
void OnOKClick( wxCommandEvent& event );
void OnCheckRealisticMode( wxCommandEvent& event );
};
void EDA_3D_FRAME::Install_3D_ViewOptionDialog( wxCommandEvent& event )
{
DIALOG_3D_VIEW_OPTIONS dlg( this );
if( dlg.ShowModal() == wxID_OK )
{
SetMenuBarOptionsState();
@@ -38,13 +64,16 @@ DIALOG_3D_VIEW_OPTIONS::DIALOG_3D_VIEW_OPTIONS( EDA_3D_FRAME* parent )
initDialog();
SetDefaultItem( (wxWindow*) m_sdbSizerOK );
Layout();
GetSizer()->SetSizeHints(this);
GetSizer()->SetSizeHints( this );
Centre();
}
void DIALOG_3D_VIEW_OPTIONS::initDialog()
{
m_bitmapRealisticMode->SetBitmap( KiBitmap( use_3D_copper_thickness_xpm ) );
m_bitmapCuThickness->SetBitmap( KiBitmap( use_3D_copper_thickness_xpm ) );
m_bitmap3Dshapes->SetBitmap( KiBitmap( shape_3d_xpm ) );
m_bitmapAreas->SetBitmap( KiBitmap( add_zone_xpm ) );
@@ -56,6 +85,7 @@ void DIALOG_3D_VIEW_OPTIONS::initDialog()
m_bitmapECO->SetBitmap( KiBitmap( edit_sheet_xpm ) );
// Check/uncheck checkboxes
m_checkBoxRealisticMode->SetValue( m_3Dprms.GetFlag( FL_USE_REALISTIC_MODE ) );
m_checkBoxCuThickness->SetValue( m_3Dprms.GetFlag( FL_USE_COPPER_THICKNESS ) );
m_checkBox3Dshapes->SetValue( m_3Dprms.GetFlag( FL_MODULE ) );
m_checkBoxAreas->SetValue( m_3Dprms.GetFlag( FL_ZONE ) );
@@ -63,8 +93,19 @@ void DIALOG_3D_VIEW_OPTIONS::initDialog()
m_checkBoxSolderMask->SetValue( m_3Dprms.GetFlag( FL_SOLDERMASK ) );
m_checkBoxSolderpaste->SetValue( m_3Dprms.GetFlag( FL_SOLDERPASTE ) );
m_checkBoxAdhesive->SetValue( m_3Dprms.GetFlag( FL_ADHESIVE ) );
m_checkBoxComments->SetValue( m_3Dprms.GetFlag( FL_COMMENTS ) );
m_checkBoxECO->SetValue( m_3Dprms.GetFlag( FL_ECO ) );
bool enable = !m_3Dprms.GetFlag( FL_USE_REALISTIC_MODE );
m_checkBoxComments->Enable( enable );
m_checkBoxECO->Enable( enable );
}
void DIALOG_3D_VIEW_OPTIONS::OnCheckRealisticMode( wxCommandEvent& event )
{
bool enable = !m_checkBoxRealisticMode->GetValue();
m_checkBoxComments->Enable( enable );
m_checkBoxECO->Enable( enable );
}
void DIALOG_3D_VIEW_OPTIONS::OnShowAllClick( wxCommandEvent& event )
@@ -81,6 +122,7 @@ void DIALOG_3D_VIEW_OPTIONS::OnShowAllClick( wxCommandEvent& event )
m_checkBoxECO->SetValue( state );
}
void DIALOG_3D_VIEW_OPTIONS::OnShowNoneClick( wxCommandEvent& event )
{
bool state = false;
@@ -95,10 +137,11 @@ void DIALOG_3D_VIEW_OPTIONS::OnShowNoneClick( wxCommandEvent& event )
m_checkBoxECO->SetValue( state );
}
void DIALOG_3D_VIEW_OPTIONS::OnOKClick( wxCommandEvent& event )
{
m_3Dprms.SetFlag( FL_USE_COPPER_THICKNESS,
m_checkBoxCuThickness->GetValue() );
m_3Dprms.SetFlag( FL_USE_REALISTIC_MODE, m_checkBoxRealisticMode->GetValue() );
m_3Dprms.SetFlag( FL_USE_COPPER_THICKNESS, m_checkBoxCuThickness->GetValue() );
m_3Dprms.SetFlag( FL_MODULE, m_checkBox3Dshapes->GetValue() );
m_3Dprms.SetFlag( FL_ZONE, m_checkBoxAreas->GetValue() );
m_3Dprms.SetFlag( FL_SILKSCREEN, m_checkBoxSilkscreen->GetValue() );
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version Jun 17 2015)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -20,63 +20,69 @@ DIALOG_3D_VIEW_OPTIONS_BASE::DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWi
bSizerLeft = new wxBoxSizer( wxHORIZONTAL );
wxFlexGridSizer* fgSizeShowOpts;
fgSizeShowOpts = new wxFlexGridSizer( 9, 2, 0, 0 );
fgSizeShowOpts = new wxFlexGridSizer( 0, 2, 0, 0 );
fgSizeShowOpts->SetFlexibleDirection( wxBOTH );
fgSizeShowOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_bitmapRealisticMode = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_bitmapRealisticMode, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxRealisticMode = new wxCheckBox( this, wxID_ANY, _("Realistic mode"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBoxRealisticMode, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_bitmapCuThickness = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_bitmapCuThickness, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_bitmapCuThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxCuThickness = new wxCheckBox( this, wxID_ANY, _("Show copper thickness"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBoxCuThickness, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_checkBoxCuThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_bitmap3Dshapes = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_bitmap3Dshapes, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_bitmap3Dshapes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBox3Dshapes = new wxCheckBox( this, wxID_ANY, _("Show component 3D shapes"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBox3Dshapes, 0, wxALL, 5 );
m_checkBox3Dshapes = new wxCheckBox( this, wxID_ANY, _("Show 3D Models"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBox3Dshapes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_bitmapAreas = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_bitmapAreas, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_bitmapAreas, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxAreas = new wxCheckBox( this, wxID_ANY, _("Show filled areas in zones"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBoxAreas, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_checkBoxAreas, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_bitmapSilkscreen = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_bitmapSilkscreen, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_bitmapSilkscreen, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxSilkscreen = new wxCheckBox( this, wxID_ANY, _("Show silkscreen layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBoxSilkscreen, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_checkBoxSilkscreen, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_bitmapSolderMask = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_bitmapSolderMask, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_bitmapSolderMask, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxSolderMask = new wxCheckBox( this, wxID_ANY, _("Show solder mask layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBoxSolderMask, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_checkBoxSolderMask, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_bitmapSolderPaste = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_bitmapSolderPaste, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_bitmapSolderPaste, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxSolderpaste = new wxCheckBox( this, wxID_ANY, _("Show solder paste layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBoxSolderpaste, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_checkBoxSolderpaste, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_bitmapAdhesive = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_bitmapAdhesive, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_bitmapAdhesive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxAdhesive = new wxCheckBox( this, wxID_ANY, _("Show adhesive layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBoxAdhesive, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_checkBoxAdhesive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_bitmapComments = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_bitmapComments, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_bitmapComments, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxComments = new wxCheckBox( this, wxID_ANY, _("Show comments and drawings Layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBoxComments, 0, wxALL, 5 );
m_checkBoxComments = new wxCheckBox( this, wxID_ANY, _("Show comments and drawings layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBoxComments, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_bitmapECO = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_bitmapECO, 0, wxALL, 5 );
fgSizeShowOpts->Add( m_bitmapECO, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxECO = new wxCheckBox( this, wxID_ANY, _("Show ECOs layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBoxECO, 0, wxALL, 5 );
m_checkBoxECO = new wxCheckBox( this, wxID_ANY, _("Show ECO layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizeShowOpts->Add( m_checkBoxECO, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
bSizerLeft->Add( fgSizeShowOpts, 1, wxEXPAND, 5 );
@@ -106,27 +112,28 @@ DIALOG_3D_VIEW_OPTIONS_BASE::DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWi
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
bSizerMain->Add( m_sdbSizer, 0, wxALIGN_RIGHT, 5 );
bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
this->SetSizer( bSizerMain );
this->Layout();
bSizerMain->Fit( this );
this->Centre( wxBOTH );
// Connect Events
m_checkBoxRealisticMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
m_buttonShowAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnShowAllClick ), NULL, this );
m_buttonShowNone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnShowNoneClick ), NULL, this );
m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCancelClick ), NULL, this );
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnOKClick ), NULL, this );
}
DIALOG_3D_VIEW_OPTIONS_BASE::~DIALOG_3D_VIEW_OPTIONS_BASE()
{
// Disconnect Events
m_checkBoxRealisticMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
m_buttonShowAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnShowAllClick ), NULL, this );
m_buttonShowNone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnShowNoneClick ), NULL, this );
m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCancelClick ), NULL, this );
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnOKClick ), NULL, this );
}
+197 -26
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@@ -20,8 +20,10 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@@ -42,7 +44,7 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_3D_VIEW_OPTIONS_BASE</property>
<property name="pos"></property>
<property name="size">340,344</property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">3D Display Options</property>
@@ -114,11 +116,180 @@
<property name="name">fgSizeShowOpts</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">9</property>
<property name="rows">0</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticBitmap" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_bitmapRealisticMode</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Realistic mode</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBoxRealisticMode</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox">OnCheckRealisticMode</event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticBitmap" expanded="1">
<property name="BottomDockable">1</property>
@@ -199,7 +370,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
@@ -287,7 +458,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticBitmap" expanded="1">
<property name="BottomDockable">1</property>
@@ -368,7 +539,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
@@ -399,7 +570,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show component 3D shapes</property>
<property name="label">Show 3D Models</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -456,7 +627,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticBitmap" expanded="1">
<property name="BottomDockable">1</property>
@@ -537,7 +708,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
@@ -625,7 +796,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticBitmap" expanded="1">
<property name="BottomDockable">1</property>
@@ -706,7 +877,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
@@ -794,7 +965,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticBitmap" expanded="1">
<property name="BottomDockable">1</property>
@@ -875,7 +1046,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
@@ -963,7 +1134,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticBitmap" expanded="1">
<property name="BottomDockable">1</property>
@@ -1044,7 +1215,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
@@ -1132,7 +1303,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticBitmap" expanded="1">
<property name="BottomDockable">1</property>
@@ -1213,7 +1384,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
@@ -1301,7 +1472,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticBitmap" expanded="1">
<property name="BottomDockable">1</property>
@@ -1382,7 +1553,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
@@ -1413,7 +1584,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show comments and drawings Layers</property>
<property name="label">Show comments and drawings layers</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -1470,7 +1641,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticBitmap" expanded="1">
<property name="BottomDockable">1</property>
@@ -1551,7 +1722,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
@@ -1582,7 +1753,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show ECOs layers</property>
<property name="label">Show ECO layers</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -1911,7 +2082,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="1">
<property name="Apply">0</property>
@@ -1926,7 +2097,7 @@
<property name="name">m_sdbSizer</property>
<property name="permission">protected</property>
<event name="OnApplyButtonClick"></event>
<event name="OnCancelButtonClick">OnCancelClick</event>
<event name="OnCancelButtonClick"></event>
<event name="OnContextHelpButtonClick"></event>
<event name="OnHelpButtonClick"></event>
<event name="OnNoButtonClick"></event>
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version Jun 17 2015)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -40,6 +40,8 @@ class DIALOG_3D_VIEW_OPTIONS_BASE : public DIALOG_SHIM
private:
protected:
wxStaticBitmap* m_bitmapRealisticMode;
wxCheckBox* m_checkBoxRealisticMode;
wxStaticBitmap* m_bitmapCuThickness;
wxCheckBox* m_checkBoxCuThickness;
wxStaticBitmap* m_bitmap3Dshapes;
@@ -66,15 +68,15 @@ class DIALOG_3D_VIEW_OPTIONS_BASE : public DIALOG_SHIM
wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnCheckRealisticMode( wxCommandEvent& event ) { event.Skip(); }
virtual void OnShowAllClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnShowNoneClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("3D Display Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 340,344 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("3D Display Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_3D_VIEW_OPTIONS_BASE();
};
+62 -43
View File
@@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -62,16 +62,19 @@ INFO3D_VISU::INFO3D_VISU()
m_CopperLayersCount = 2;
m_BoardSettings = NULL;
m_CopperThickness = 0;
m_EpoxyThickness = 0;
m_NonCopperLayerThickness = 0;
m_copperThickness = 0;
m_epoxyThickness = 0;
m_nonCopperLayerThickness = 0;
m_BiuTo3Dunits = 1.0;
zpos_offset = 0.0;
// default all special item layers Visible
for( ii = 0; ii < FL_LAST; ii++ )
m_drawFlags[ii] = true;
m_drawFlags.set();
SetFlag( FL_GRID, false );
SetFlag( FL_USE_COPPER_THICKNESS, false );
SetFlag( FL_RENDER_SHADOWS, false );
SetFlag( FL_RENDER_SHOW_HOLES_IN_ZONES, false );
}
@@ -84,13 +87,17 @@ INFO3D_VISU::~INFO3D_VISU()
*/
void INFO3D_VISU::InitSettings( BOARD* aBoard )
{
EDA_RECT bbbox = aBoard->ComputeBoundingBox( false );
// Calculates the board bounding box
// First, use only the board outlines
EDA_RECT bbbox = aBoard->ComputeBoundingBox( true );
// If no outlines, use the board with items
if( bbbox.GetWidth() == 0 && bbbox.GetHeight() == 0 )
{
bbbox.SetWidth( Millimeter2iu( 100 ) );
bbbox.SetHeight( Millimeter2iu( 100 ) );
}
bbbox = aBoard->ComputeBoundingBox( false );
// Gives a non null size to avoid issues in zoom / scale calculations
if( bbbox.GetWidth() == 0 && bbbox.GetHeight() == 0 )
bbbox.Inflate( Millimeter2iu( 10 ) );
m_BoardSettings = &aBoard->GetDesignSettings();
@@ -107,97 +114,109 @@ void INFO3D_VISU::InitSettings( BOARD* aBoard )
m_BiuTo3Dunits = 2.0 / std::max( m_BoardSize.x, m_BoardSize.y );
m_EpoxyThickness = aBoard->GetDesignSettings().GetBoardThickness() * m_BiuTo3Dunits;
m_epoxyThickness = aBoard->GetDesignSettings().GetBoardThickness() * m_BiuTo3Dunits;
// TODO use value defined by user (currently use default values by ctor
m_CopperThickness = COPPER_THICKNESS * m_BiuTo3Dunits;
m_NonCopperLayerThickness = TECH_LAYER_THICKNESS * m_BiuTo3Dunits;
m_copperThickness = COPPER_THICKNESS * m_BiuTo3Dunits;
m_nonCopperLayerThickness = TECH_LAYER_THICKNESS * m_BiuTo3Dunits;
// Init Z position of each layer
// calculate z position for each copper layer
// Z = 0 is the z position of the back (bottom) layer (layer id = 31)
// Z = m_epoxyThickness is the z position of the front (top) layer (layer id = 0)
// all unused copper layer z position are set to 0
int layer;
int copper_layers_cnt = m_CopperLayersCount;
for( layer = 0; layer < copper_layers_cnt; layer++ )
{
m_LayerZcoord[layer] =
m_EpoxyThickness * layer / (copper_layers_cnt - 1);
m_layerZcoord[layer] =
m_epoxyThickness - (m_epoxyThickness * layer / (copper_layers_cnt - 1));
}
#define layerThicknessMargin 1.1
double zpos_offset = m_NonCopperLayerThickness * layerThicknessMargin;
double zpos_copper_back = m_LayerZcoord[0] - layerThicknessMargin*m_CopperThickness/2;
double zpos_copper_front = m_EpoxyThickness + layerThicknessMargin*m_CopperThickness/2;
double zpos_offset = m_nonCopperLayerThickness * layerThicknessMargin;
double zpos_copper_back = - layerThicknessMargin*m_copperThickness/2;
double zpos_copper_front = m_epoxyThickness + layerThicknessMargin*m_copperThickness/2;
// Fill remaining unused copper layers and front layer zpos
// with m_EpoxyThickness
// Solder mask and Solder paste have the same Z position
for( ; layer <= LAST_COPPER_LAYER; layer++ )
// Fill remaining unused copper layers and back layer zpos
// with 0
for( ; layer < MAX_CU_LAYERS; layer++ )
{
m_LayerZcoord[layer] = m_EpoxyThickness;
m_layerZcoord[layer] = 0;
}
// calculate z position for each non copper layer
for( int layer_id = FIRST_NON_COPPER_LAYER; layer_id < NB_PCB_LAYERS; layer_id++ )
// Solder mask and Solder paste have the same Z position
for( int layer_id = MAX_CU_LAYERS; layer_id < LAYER_ID_COUNT; layer_id++ )
{
double zpos;
switch( layer_id )
{
case ADHESIVE_N_BACK:
case B_Adhes:
zpos = zpos_copper_back - 3 * zpos_offset;
break;
case ADHESIVE_N_FRONT:
case F_Adhes:
zpos = zpos_copper_front + 3 * zpos_offset;
break;
case SOLDERPASTE_N_BACK:
case B_Paste:
zpos = zpos_copper_back - 1 * zpos_offset;
break;
case SOLDERPASTE_N_FRONT:
case F_Paste:
zpos = zpos_copper_front + 1 * zpos_offset;
break;
case SOLDERMASK_N_BACK:
case B_Mask:
zpos = zpos_copper_back - 1 * zpos_offset;
break;
case SOLDERMASK_N_FRONT:
case F_Mask:
zpos = zpos_copper_front + 1 * zpos_offset;
break;
case SILKSCREEN_N_BACK:
case B_SilkS:
zpos = zpos_copper_back - 2 * zpos_offset;
break;
case SILKSCREEN_N_FRONT:
case F_SilkS:
zpos = zpos_copper_front + 2 * zpos_offset;
break;
default:
zpos = zpos_copper_front +
(layer_id - FIRST_NON_COPPER_LAYER + 4) * zpos_offset;
zpos = zpos_copper_front + (layer_id - MAX_CU_LAYERS + 4) * zpos_offset;
break;
}
m_LayerZcoord[layer_id] = zpos;
m_layerZcoord[layer_id] = zpos;
}
}
/* return the Z position of 3D shapes, in 3D Units
* aIsFlipped: true for modules on Front (top) layer, false
* if on back (bottom) layer
* Note: in draw functions, the copper has a thickness = m_CopperThickness
* Vias and tracks are draw with the top side position = m_CopperThickness/2
* and the bottom side position = -m_CopperThickness/2 from the Z layer position
* Note: in draw functions, the copper has a thickness = m_copperThickness
* Vias and tracks are draw with the top side position = m_copperThickness/2
* and the bottom side position = -m_copperThickness/2 from the Z layer position
*/
double INFO3D_VISU::GetModulesZcoord3DIU( bool aIsFlipped )
{
if( aIsFlipped )
return m_LayerZcoord[LAYER_N_BACK] - ( m_CopperThickness / 2 );
if( aIsFlipped )
{
if( g_Parm_3D_Visu.GetFlag( FL_SOLDERPASTE ) )
return m_layerZcoord[B_SilkS] - ( m_copperThickness / 2.0 );
else
return m_layerZcoord[B_Paste] - ( m_copperThickness / 2.0 );
}
else
return m_LayerZcoord[LAYER_N_FRONT] + ( m_CopperThickness / 2 );
{
if( g_Parm_3D_Visu.GetFlag( FL_SOLDERPASTE ) )
return m_layerZcoord[F_SilkS] + ( m_copperThickness / 2.0 );
else
return m_layerZcoord[F_Paste] + ( m_copperThickness / 2.0 );
}
}
+41 -31
View File
@@ -52,7 +52,9 @@
class BOARD_DESIGN_SETTINGS;
class S3D_COLOR /* 3D color (R, G, B) 3 floats range 0 to 1.0*/
/** Minor class to store a 3D color (R, G, B) 3 floats range 0 to 1.0
*/
class S3D_COLOR
{
public:
double m_Red, m_Green, m_Blue;
@@ -62,7 +64,6 @@ public: S3D_COLOR()
}
};
/* information needed to display 3D board */
enum DISPLAY3D_FLG {
FL_AXIS=0, FL_MODULE, FL_ZONE,
FL_ADHESIVE, FL_SILKSCREEN, FL_SOLDERMASK, FL_SOLDERPASTE,
@@ -71,9 +72,18 @@ enum DISPLAY3D_FLG {
FL_USE_COPPER_THICKNESS,
FL_SHOW_BOARD_BODY,
FL_USE_REALISTIC_MODE,
FL_RENDER_SHADOWS,
FL_RENDER_SHOW_HOLES_IN_ZONES,
FL_RENDER_TEXTURES,
FL_RENDER_SMOOTH_NORMALS,
FL_RENDER_USE_MODEL_NORMALS,
FL_RENDER_MATERIAL,
FL_RENDER_SHOW_MODEL_BBOX,
FL_LAST
};
/** Helper class to handle information needed to display 3D board
*/
class INFO3D_VISU
{
public:
@@ -83,6 +93,12 @@ public:
double m_Zoom; // 3D zoom value
double m_3D_Grid; // 3D grid value, in mm
S3D_COLOR m_BgColor;
S3D_COLOR m_BgColor_Top;
S3D_COLOR m_BoardBodyColor; // in realistic mode: FR4 board color
S3D_COLOR m_SolderMaskColor; // in realistic mode: solder mask color
S3D_COLOR m_SolderPasteColor; // in realistic mode: solder paste color
S3D_COLOR m_SilkScreenColor; // in realistic mode: SilkScreen color
S3D_COLOR m_CopperColor; // in realistic mode: copper color
wxPoint m_BoardPos; // center board actual position in board units
wxSize m_BoardSize; // board actual size in board units
int m_CopperLayersCount; // Number of copper layers actually used by the board
@@ -91,35 +107,34 @@ public:
double m_BiuTo3Dunits; // Normalization scale to convert board
// internal units to 3D units
// to scale 3D units between -1.0 and +1.0
double m_CurrentZpos; // temporary storage of current value of Z position,
// used in some calculation
// to normalize 3D units between -1.0 and +1.0
double zpos_offset;
private:
double m_LayerZcoord[NB_LAYERS]; // Z position of each layer (normalized)
double m_CopperThickness; // Copper thickness (normalized)
double m_EpoxyThickness; // Epoxy thickness (normalized)
double m_NonCopperLayerThickness; // Non copper layers thickness
bool m_drawFlags[FL_LAST]; // Enable/disable flags (see DISPLAY3D_FLG list)
double m_layerZcoord[LAYER_ID_COUNT]; // Z position of each layer (normalized)
double m_copperThickness; // Copper thickness (normalized)
double m_epoxyThickness; // Epoxy thickness (normalized)
double m_nonCopperLayerThickness; // Non copper layers thickness
std::bitset<FL_LAST> m_drawFlags; // Enable/disable flags (see DISPLAY3D_FLG list)
public: INFO3D_VISU();
~INFO3D_VISU();
// Accessors
bool GetFlag( DISPLAY3D_FLG aFlag ) const { return m_drawFlags[aFlag]; }
bool SetFlag( DISPLAY3D_FLG aFlag, bool aState )
void SetFlag( DISPLAY3D_FLG aFlag, bool aState )
{
return m_drawFlags[aFlag] = aState;
m_drawFlags[aFlag] = aState;
}
/**
* Function InitSettings
* Initialize info 3D Parameters from aBoard
* Initialize 3D Parameters depending on aBoard
* @param aBoard: the board to display
*/
void InitSettings( BOARD* aBoard );
/**
* function GetModulesZcoord3DIU
* @return the Z position of 3D shapes, in 3D Units
* @param aIsFlipped: true for modules on Front (top) layer, false
* if on back (bottom) layer
@@ -127,17 +142,15 @@ public: INFO3D_VISU();
double GetModulesZcoord3DIU( bool aIsFlipped );
/**
* function GetLayerZcoordBIU
* @return the Z coordinate of the layer aLayer, in Board Internal Units
* @param aLayerId: the layer number
*/
int GetLayerZcoordBIU( int aLayerId )
{
return KiROUND( m_LayerZcoord[aLayerId] / m_BiuTo3Dunits );
return KiROUND( m_layerZcoord[aLayerId] / m_BiuTo3Dunits );
}
/**
* function GetCopperThicknessBIU
* @return the thickness (Z size) of the copper, in Board Internal Units
* note: the thickness (Z size) of the copper is not the thickness
* of the layer (the thickness of the layer is the epoxy thickness / layer count)
@@ -147,11 +160,10 @@ public: INFO3D_VISU();
*/
int GetCopperThicknessBIU() const
{
bool use_thickness = GetFlag( FL_USE_COPPER_THICKNESS )
// || GetFlag( FL_USE_REALISTIC_MODE )
;
bool use_thickness = GetFlag( FL_USE_COPPER_THICKNESS );
return use_thickness ?
KiROUND( m_CopperThickness / m_BiuTo3Dunits )
KiROUND( m_copperThickness / m_BiuTo3Dunits )
: 0;
}
@@ -161,7 +173,7 @@ public: INFO3D_VISU();
*/
int GetEpoxyThicknessBIU() const
{
return KiROUND( m_EpoxyThickness / m_BiuTo3Dunits );
return KiROUND( m_epoxyThickness / m_BiuTo3Dunits );
}
/**
@@ -173,11 +185,9 @@ public: INFO3D_VISU();
*/
int GetNonCopperLayerThicknessBIU() const
{
bool use_thickness = GetFlag( FL_USE_COPPER_THICKNESS )
// || GetFlag( FL_USE_REALISTIC_MODE )
;
bool use_thickness = GetFlag( FL_USE_COPPER_THICKNESS );
return use_thickness ?
KiROUND( m_NonCopperLayerThickness / m_BiuTo3Dunits )
KiROUND( m_nonCopperLayerThickness / m_BiuTo3Dunits )
: 0;
}
@@ -188,11 +198,11 @@ public: INFO3D_VISU();
*
* Note: if m_drawFlags[FL_USE_COPPER_THICKNESS] is not set, returns 0
*/
int GetLayerObjectThicknessBIU( int aLayerId) const
int GetLayerObjectThicknessBIU( int aLayerId ) const
{
return aLayerId >= FIRST_NON_COPPER_LAYER ?
GetNonCopperLayerThicknessBIU() :
GetCopperThicknessBIU();
return IsCopperLayer( aLayerId ) ?
GetCopperThicknessBIU() :
GetNonCopperLayerThicknessBIU();
}
bool IsRealisticMode() { return GetFlag( FL_USE_REALISTIC_MODE ); }
+167 -62
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 Tuomas Vaherkoski <tuomasvaherkoski@gmail.com>
* Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -30,16 +30,12 @@
#define MODELPARSERS_H
#include <map>
#include <memory>
#include <vector>
#include <wx/string.h>
#include <3d_mesh_model.h>
class S3D_MASTER;
class S3D_VERTEX;
extern void TransfertToGLlist( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits );
class S3D_MODEL_PARSER;
class X3D_MODEL_PARSER;
/**
@@ -49,12 +45,11 @@ class X3D_MODEL_PARSER;
class S3D_MODEL_PARSER
{
public:
S3D_MODEL_PARSER(S3D_MASTER* aMaster) :
S3D_MODEL_PARSER( S3D_MASTER* aMaster ) :
master( aMaster )
{}
virtual ~S3D_MODEL_PARSER()
{}
virtual ~S3D_MODEL_PARSER(){}
S3D_MASTER* GetMaster()
{
@@ -70,12 +65,19 @@ public:
* @param aExtension is file extension of the file you are going to parse.
*/
static S3D_MODEL_PARSER* Create( S3D_MASTER* aMaster, const wxString aExtension );
/**
* Function Load
*
* virtual Function
* Concrete parsers should implement this function
* @param aFilename = the full file name of the file to load
* @return true if as succeeded
*/
virtual void Load( const wxString aFilename ) = 0;
virtual bool Load( const wxString& aFilename )
{
return false;
};
S3D_MESH_PTRS childs;
private:
S3D_MASTER* master;
@@ -93,10 +95,11 @@ class X3D_MODEL_PARSER: public S3D_MODEL_PARSER
public:
X3D_MODEL_PARSER( S3D_MASTER* aMaster );
~X3D_MODEL_PARSER();
void Load( const wxString aFilename );
bool Load( const wxString& aFilename );
typedef std::map< wxString, wxString > PROPERTY_MAP;
typedef std::vector< wxXmlNode* > NODE_LIST;
typedef std::vector< wxXmlNode* > NODE_LIST;
/**
* Function GetChildsByName
@@ -117,14 +120,10 @@ public:
*/
static void GetNodeProperties( wxXmlNode* aNode, PROPERTY_MAP& aProps );
/**
* Return string representing x3d file in vrml format
* Function Load must be called before this function, otherwise empty
* data set is returned.
*/
wxString VRML_representation();
private:
wxString m_Filename;
S3D_MESH_PTR m_model;
std::vector< wxString > vrml_materials;
std::vector< wxString > vrml_points;
std::vector< wxString > vrml_coord_indexes;
@@ -137,57 +136,163 @@ private:
void rotate( S3D_VERTEX& aCoordinate, S3D_VERTEX& aRotAxis, double angle );
};
typedef std::map< std::string, std::vector< glm::vec3 > > VRML2_COORDINATE_MAP;
typedef std::map< std::string, S3D_MESH_PTR > VRML2_DEF_GROUP_MAP;
/**
* class WRL_MODEL_PARSER
* class VRML2_MODEL_PARSER
* Parses
*/
class VRML2_MODEL_PARSER
{
public:
VRML2_MODEL_PARSER( S3D_MODEL_PARSER* aModelParser );
~VRML2_MODEL_PARSER();
bool Load( const wxString& aFilename );
/**
* Function Load
* Load a VRML2 filename and apply a transformation to the root
* @param aFilename file name with path
* @param aTransformationModel a model with translation, rotation and scale to apply to default root
* @return bool - true if finnished with success
*/
bool Load( const wxString& aFilename, S3D_MESH_PTR aTransformationModel );
/**
* Return string representing VRML2 file in vrml2 format
* Function Load must be called before this function, otherwise empty
* data set is returned.
*/
wxString VRML2_representation();
private:
int loadFileModel( S3D_MESH_PTR transformationModel );
int read_Transform();
int read_DEF();
int read_DEF_Coordinate();
int read_Shape();
int read_appearance();
int read_Appearance();
int read_material();
int read_Material();
int read_IndexedFaceSet();
int read_IndexedLineSet();
int read_Coordinate();
int read_CoordinateDef();
int read_Normal();
int read_NormalIndex();
int read_Color();
int read_coordIndex();
int read_colorIndex();
int read_geometry();
int read_IndexedFaceSet_USE();
int read_Transform_USE();
int read_Inline();
/** Function debug_enter
* Used in debug to increase a ' ' in the m_debugSpacer,
* should be called after the first debug comment in a function
*/
void debug_enter();
/** Function debug_exit
* Used in debug to decrease a ' ' in the m_debugSpacer,
* should be called before the last debug comment in a funtion before exit
*/
void debug_exit();
bool m_normalPerVertex;
bool colorPerVertex;
S3D_MESH_PTR m_model; ///< It stores the current model that the parsing is adding data
FILE* m_file;
wxFileName m_Filename;
VRML2_COORDINATE_MAP m_defCoordinateMap;
VRML2_DEF_GROUP_MAP m_defGroupMap; ///< Stores a list of labels for groups and meshs that will be used later by the USE keyword
S3D_MODEL_PARSER* m_ModelParser;
S3D_MASTER* m_Master;
wxString m_debugSpacer; ///< Used to give identation space
int m_counter_DEF_GROUP; ///< Counts the number of DEF * GROUPS used
int m_counter_USE_GROUP; ///< Counts the number of USE * used, in the end, if m_counter_DEF_GROUP > 0 and m_counter_USE_GROUP == 0 then it will add the first group with childs
bool m_discardLastGeometry; ///< If true, it should not store the latest loaded geometry (used to discard IndexedLineSet, but load it)
};
/**
* class VRML1_MODEL_PARSER
* Parses
*/
class VRML1_MODEL_PARSER
{
public:
VRML1_MODEL_PARSER( S3D_MODEL_PARSER* aModelParser );
~VRML1_MODEL_PARSER();
bool Load( const wxString& aFilename );
/**
* Return string representing VRML2 file in vrml2 format
* Function Load must be called before this function, otherwise empty
* data set is returned.
*/
wxString VRML2_representation();
private:
int read_separator();
int readMaterial();
int readCoordinate3();
int readIndexedFaceSet();
int readMaterial_ambientColor();
int readMaterial_diffuseColor();
int readMaterial_emissiveColor();
int readMaterial_specularColor();
int readMaterial_shininess();
int readMaterial_transparency();
int readCoordinate3_point();
int readIndexedFaceSet_coordIndex();
int readIndexedFaceSet_materialIndex();
bool m_normalPerVertex;
bool colorPerVertex;
S3D_MESH_PTR m_model;
FILE* m_file;
wxString m_Filename;
S3D_MODEL_PARSER* m_ModelParser;
S3D_MASTER* m_Master;
};
/**
* class VRML_MODEL_PARSER
* Parses
*/
class VRML_MODEL_PARSER: public S3D_MODEL_PARSER
{
public:
/**
* ctor: initialize a VRML file parser
* @param aMaster = a ref to a 3D footprint shape description to fill
* by the vrml file data
*/
VRML_MODEL_PARSER( S3D_MASTER* aMaster );
~VRML_MODEL_PARSER();
void Load( const wxString aFilename );
private:
/**
* Function ReadMaterial
* read the description of a 3D material definition in the form:
* DEF yellow material Material (
* DiffuseColor 1.00000 1.00000 0.00000e 0
* EmissiveColor 0.00000e 0 0.00000e 0 0.00000e 0
* SpecularColor 1.00000 1.00000 1.00000
* AmbientIntensity 1.00000
* Transparency 0.00000e 0
* Shininess 1.00000
*)
* Or type:
* USE yellow material
*/
int readMaterial( FILE* file, int* LineNum );
int readChildren( FILE* file, int* LineNum );
int readShape( FILE* file, int* LineNum );
int readAppearance( FILE* file, int* LineNum );
int readGeometry( FILE* file, int* LineNum );
/**
* Function ReadCoordList
* reads 3D coordinate lists like:
* coord Coordinate { point [
* -5.24489 6.57640e-3 -9.42129e-2,
* -5.11821 6.57421e-3 0.542654,
* -3.45868 0.256565 1.32000 ] }
* or:
* normal Normal { vector [
* 0.995171 -6.08102e-6 9.81541e-2,
* 0.923880 -4.09802e-6 0.382683,
* 0.707107 -9.38186e-7 0.707107]
* }
*
* text_buffer contains the first line of this node :
* "coord Coordinate { point ["
* Function load
* Load a 3D file and build a S3D_MASTER shape.
* file has .vrml ext and can be VRML 1 or VRML 2 format
* @param aFilename = the full filename to read
* @param aVrmlunits_to_3Dunits = the csaling factor to convert the 3D file unit
* to our internal units.
*/
void readCoordsList( FILE* file, char* text_buffer, std::vector< double >& aList,
int* LineNum );
bool Load( const wxString& aFilename );
};
#endif // MODELPARSERS_H
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -19,7 +19,7 @@
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN PAD_CONNECTION WITH THE
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
+1 -1
View File
@@ -19,7 +19,7 @@
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN PAD_CONNECTION WITH THE
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
*
* US Government Users Restricted Rights
+270
View File
@@ -0,0 +1,270 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014-2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file vrml_aux.cpp
* @brief implements auxiliar functions to parse VRML files
*/
#include "vrml_aux.h"
bool GetString( FILE* File, char* aDstString, size_t maxDstLen )
{
if( (!aDstString) || (maxDstLen == 0) )
return false;
int c;
while( ( c = fgetc( File ) ) != EOF )
{
if( c == '\"' )
{
break;
}
}
if( c != '\"' )
{
return false;
}
while( (( c = fgetc( File ) ) != EOF) && (maxDstLen > 0) )
{
if( c == '\"' )
{
break;
}
maxDstLen--;
*aDstString = c;
aDstString++;
}
*aDstString = 0;
if( c == '\"' )
{
return true;
}
return false;
}
static int SkipGetChar ( FILE* File );
static int SkipGetChar( FILE* File )
{
int c;
bool re_parse;
if( ( c = fgetc( File ) ) == EOF )
{
// DBG( printf( "EOF\n" ) );
return EOF;
}
// DBG( printf( "c %c 0x%02X\n", c, c ) );
do
{
re_parse = false;
if( (c == ' ') || (c == '\t') || (c == '{') || (c == '[') )
{
// DBG( printf( "Skipping space \\t or { or [\n" ) );
do
{
if( ( c = fgetc( File ) ) == EOF )
{
// DBG( printf( "EOF\n" ) );
return EOF;
}
} while( (c == ' ') || (c == '\t') || (c == '{') || (c == '[') );
}
if( (c == '#') || (c == '\n') || (c == '\r') || (c == 0) || (c == ',') )
{
if( c == '#' )
{
// DBG( printf( "Skipping # \\n or \\r or 0, 0x%02X\n", c ) );
do
{
if( ( c = fgetc( File ) ) == EOF )
{
// DBG( printf( "EOF\n" ) );
return EOF;
}
} while( (c != '\n') && (c != '\r') && (c != 0) && (c != ',') );
}
else
{
if( ( c = fgetc( File ) ) == EOF )
{
// DBG( printf( "EOF\n" ) );
return EOF;
}
}
re_parse = true;
}
} while( re_parse == true );
return c;
}
bool GetNextTag( FILE* File, char* tag, size_t len )
{
int c = SkipGetChar( File );
if( c == EOF )
{
return false;
}
tag[0] = c;
tag[1] = 0;
// DBG( printf( "tag[0] %c\n", tag[0] ) );
if( (c != '}') && (c != ']') )
{
len--;
char* dst = &tag[1];
while( fscanf( File, "%c", dst ) && len > 0 )
{
if( (*dst == ' ') || (*dst == '[') || (*dst == '{')
|| (*dst == '\t') || (*dst == '\n')|| (*dst == '\r') )
{
*dst = 0;
break;
}
dst++;
len--;
}
// DBG( printf( "tag %s\n", tag ) );
c = SkipGetChar( File );
if( c != EOF )
{
// Puts again the read char in the buffer
ungetc( c, File );
}
}
return true;
}
int Read_NotImplemented( FILE* File, char closeChar )
{
int c;
// DBG( printf( "look for %c\n", closeChar) );
while( ( c = fgetc( File ) ) != EOF )
{
if( c == '{' )
{
// DBG( printf( "{\n") );
Read_NotImplemented( File, '}' );
}
else if( c == '[' )
{
// DBG( printf( "[\n") );
Read_NotImplemented( File, ']' );
}
else if( c == closeChar )
{
// DBG( printf( "%c\n", closeChar) );
return 0;
}
}
// DBG( printf( " NotImplemented failed\n" ) );
return -1;
}
int ParseVertexList( FILE* File, std::vector<glm::vec3>& dst_vector )
{
// DBG( printf( " ParseVertexList\n" ) );
dst_vector.clear();
glm::vec3 vertex;
while( ParseVertex( File, vertex ) )
{
dst_vector.push_back( vertex );
}
return 0;
}
bool ParseVertex( FILE* File, glm::vec3& dst_vertex )
{
float a, b, c;
int ret = fscanf( File, "%e %e %e", &a, &b, &c );
dst_vertex.x = a;
dst_vertex.y = b;
dst_vertex.z = c;
int s = SkipGetChar( File );
if( s != EOF )
{
// Puts again the read char in the buffer
ungetc( s, File );
}
// DBG( printf( "ret%d(%.9f,%.9f,%.9f)", ret, a,b,c) );
return ret == 3;
}
bool ParseFloat( FILE* aFile, float *aDstFloat, float aDefaultValue )
{
float value;
int ret = fscanf( aFile, "%e", &value );
if( ret == 1 )
*aDstFloat = value;
else
*aDstFloat = aDefaultValue;
return ret == 1;
}
+113
View File
@@ -0,0 +1,113 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014-2015 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file vrml_aux.h
* @brief auxiliar functions to parse VRML files
*/
#ifndef _VRML_AUX_H
#define _VRML_AUX_H
#include <fctsys.h>
#include <common.h>
#include <macros.h>
#include <base_struct.h>
#define GLM_FORCE_RADIANS
#include <gal/opengl/glm/glm.hpp>
#include <vector>
#include <kicad_string.h>
#include <info3d_visu.h>
#ifdef __WXMAC__
# ifdef __DARWIN__
# include <OpenGL/glu.h>
# else
# include <glu.h>
# endif
#else
# include <GL/glu.h>
#endif
#include <wx/glcanvas.h>
/**
* Function GetEpoxyThicknessBIU
* skip a VRML block and eventualy internal blocks until it find the close char
* @param File file to read from
* @param closeChar the expected close char of the block
* @return int - -1 if failed, 0 if OK
*/
int Read_NotImplemented( FILE* File, char closeChar);
/**
* Function ParseVertexList
* parse a vertex list
* @param File file to read from
* @param dst_vector destination vector list
* @return int - -1 if failed, 0 if OK
*/
int ParseVertexList( FILE* File, std::vector< glm::vec3 > &dst_vector);
/**
* Function ParseVertex
* parse a vertex
* @param File file to read from
* @param dst_vertex destination vector
* @return bool - return true if the 3 elements are read
*/
bool ParseVertex( FILE* File, glm::vec3 &dst_vertex );
/**
* Function ParseFloat
* parse a float value
* @param aFile file to read from
* @param aDstFloat destination float
* @param aDefaultValue = the default value, when the actual value cannot be read
* @return bool - Return true if the float was read without error
*/
bool ParseFloat( FILE* aFile, float *aDstFloat, float aDefaultValue );
/**
* Function GetNextTag
* parse the next tag
* @param File file to read from
* @param tag destination pointer
* @param len max length of storage
* @return bool - true if succeeded, false if EOF
*/
bool GetNextTag( FILE* File, char* tag, size_t len );
/**
* Function GetString
* parse a string, it expects starting by " and end with "
* @param File file to read from
* @param aDstString destination pointer
* @param maxDstLen max length of storage
* @return bool - true if successful read the string, false if failed to get a string
*/
bool GetString( FILE* File, char* aDstString, size_t maxDstLen );
#endif
+439
View File
@@ -0,0 +1,439 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file vrml_v1_modelparser.cpp
*/
#include <fctsys.h>
#include <vector>
#include <macros.h>
#include <kicad_string.h>
#include <info3d_visu.h>
#include "3d_struct.h"
#include "modelparsers.h"
#include "vrml_aux.h"
#define BUFLINE_SIZE 32
/**
* Trace mask used to enable or disable the trace output of the VRML V1 parser code.
* The debug output can be turned on by setting the WXTRACE environment variable to
* "KI_TRACE_VRML_V1_PARSER". See the wxWidgets documentation on wxLogTrace for
* more information.
*/
static const wxChar* traceVrmlV1Parser = wxT( "KI_TRACE_VRML_V1_PARSER" );
VRML1_MODEL_PARSER::VRML1_MODEL_PARSER( S3D_MODEL_PARSER* aModelParser )
{
m_ModelParser = aModelParser;
m_Master = m_ModelParser->GetMaster();
m_model.reset();
m_file = NULL;
m_normalPerVertex = true;
colorPerVertex = true;
}
VRML1_MODEL_PARSER::~VRML1_MODEL_PARSER()
{
}
bool VRML1_MODEL_PARSER::Load( const wxString& aFilename )
{
char text[BUFLINE_SIZE];
wxLogTrace( traceVrmlV1Parser, wxT( "Loading: %s" ), GetChars( aFilename ) );
m_file = wxFopen( aFilename, wxT( "rt" ) );
if( m_file == NULL )
return false;
// Switch the locale to standard C (needed to print floating point numbers)
LOCALE_IO toggle;
m_ModelParser->childs.clear();
while( GetNextTag( m_file, text, sizeof(text) ) )
{
if( ( *text == '}' ) || ( *text == ']' ) )
{
continue;
}
if( strcmp( text, "Separator" ) == 0 )
{
m_model.reset( new S3D_MESH() );
m_ModelParser->childs.push_back( m_model );
read_separator();
}
}
fclose( m_file );
return true;
}
int VRML1_MODEL_PARSER::read_separator()
{
char text[BUFLINE_SIZE];
// DBG( printf( "Separator\n" ) );
while( GetNextTag( m_file, text, sizeof(text) ) )
{
if( strcmp( text, "Material" ) == 0 )
{
readMaterial();
}
else if( strcmp( text, "Coordinate3" ) == 0 )
{
readCoordinate3();
}
else if( strcmp( text, "IndexedFaceSet" ) == 0 )
{
readIndexedFaceSet();
}
else if( strcmp( text, "Separator" ) == 0 )
{
S3D_MESH_PTR parent( m_model.get() );
S3D_MESH_PTR new_mesh_model( new S3D_MESH() );
m_model->childs.push_back( new_mesh_model );
m_model.reset( new_mesh_model.get() );
// recursive
read_separator();
m_model.reset( parent.get() );
}
else if( ( *text != '}' ) )
{
// DBG( printf( "read_NotImplemented %s\n", text ) );
Read_NotImplemented( m_file, '}' );
}
else
break;
}
return 0;
}
int VRML1_MODEL_PARSER::readMaterial()
{
char text[BUFLINE_SIZE];
S3D_MATERIAL* material = NULL;
// DBG( printf( " readMaterial\n" ) );
wxString mat_name;
material = new S3D_MATERIAL( m_Master, mat_name );
m_Master->Insert( material );
m_model->m_Materials = material;
while( GetNextTag( m_file, text, sizeof(text) ) )
{
if( *text == ']' )
{
continue;
}
if( *text == '}' )
{
return 0;
}
if( strcmp( text, "ambientColor" ) == 0 )
{
readMaterial_ambientColor();
}
else if( strcmp( text, "diffuseColor" ) == 0 )
{
readMaterial_diffuseColor();
}
else if( strcmp( text, "emissiveColor" ) == 0 )
{
readMaterial_emissiveColor();
}
else if( strcmp( text, "specularColor" ) == 0 )
{
readMaterial_specularColor();
}
else if( strcmp( text, "shininess" ) == 0 )
{
readMaterial_shininess();
}
else if( strcmp( text, "transparency" ) == 0 )
{
readMaterial_transparency();
}
}
wxLogTrace( traceVrmlV1Parser, wxT( " readMaterial failed" ) );
return -1;
}
int VRML1_MODEL_PARSER::readCoordinate3()
{
char text[BUFLINE_SIZE];
// DBG( printf( " readCoordinate3\n" ) );
while( GetNextTag( m_file, text, sizeof( text ) ) )
{
if( *text == ']' )
{
continue;
}
if( *text == '}' )
{
return 0;
}
if( strcmp( text, "point" ) == 0 )
{
readCoordinate3_point();
}
}
wxLogTrace( traceVrmlV1Parser, wxT( " readCoordinate3 failed" ) );
return -1;
}
int VRML1_MODEL_PARSER::readIndexedFaceSet()
{
char text[BUFLINE_SIZE];
// DBG( printf( " readIndexedFaceSet\n" ) );
while( GetNextTag( m_file, text, sizeof(text) ) )
{
if( *text == ']' )
{
continue;
}
if( *text == '}' )
{
return 0;
}
if( strcmp( text, "coordIndex" ) == 0 )
{
readIndexedFaceSet_coordIndex();
}
else if( strcmp( text, "materialIndex" ) == 0 )
{
readIndexedFaceSet_materialIndex();
}
}
wxLogTrace( traceVrmlV1Parser, wxT( " readIndexedFaceSet failed" ) );
return -1;
}
int VRML1_MODEL_PARSER::readMaterial_ambientColor()
{
// DBG( printf( " readMaterial_ambientColor\n" ) );
return ParseVertexList( m_file, m_model->m_Materials->m_AmbientColor );
}
int VRML1_MODEL_PARSER::readMaterial_diffuseColor()
{
// DBG( printf( " readMaterial_diffuseColor\n" ) );
return ParseVertexList( m_file, m_model->m_Materials->m_DiffuseColor );
}
int VRML1_MODEL_PARSER::readMaterial_emissiveColor()
{
// DBG( printf( " readMaterial_emissiveColor\n" ) );
int ret = ParseVertexList( m_file, m_model->m_Materials->m_EmissiveColor );
if( m_Master->m_use_modelfile_emissiveColor == false )
{
m_model->m_Materials->m_EmissiveColor.clear();
}
return ret;
}
int VRML1_MODEL_PARSER::readMaterial_specularColor()
{
// DBG( printf( " readMaterial_specularColor\n" ) );
int ret = ParseVertexList( m_file, m_model->m_Materials->m_SpecularColor );
if( m_Master->m_use_modelfile_specularColor == false )
{
m_model->m_Materials->m_SpecularColor.clear();
}
return ret;
}
int VRML1_MODEL_PARSER::readMaterial_shininess()
{
// DBG( printf( " readMaterial_shininess\n" ) );
m_model->m_Materials->m_Shininess.clear();
float shininess_value;
while( fscanf( m_file, "%f,", &shininess_value ) )
{
// VRML value is normalized and openGL expects a value 0 - 128
shininess_value = shininess_value * 128.0f;
m_model->m_Materials->m_Shininess.push_back( shininess_value );
}
if( m_Master->m_use_modelfile_shininess == false )
{
m_model->m_Materials->m_Shininess.clear();
}
// DBG( printf( " m_Shininess.size: %ld\n", m_model->m_Materials->m_Shininess.size() ) );
return 0;
}
int VRML1_MODEL_PARSER::readMaterial_transparency()
{
// DBG( printf( " readMaterial_transparency\n" ) );
m_model->m_Materials->m_Transparency.clear();
float tmp;
while( fscanf( m_file, "%f,", &tmp ) )
{
m_model->m_Materials->m_Transparency.push_back( tmp );
}
if( m_Master->m_use_modelfile_transparency == false )
{
m_model->m_Materials->m_Transparency.clear();
}
// DBG( printf( " m_Transparency.size: %ld\n", m_model->m_Materials->m_Transparency.size() ) );
return 0;
}
int VRML1_MODEL_PARSER::readCoordinate3_point()
{
// DBG( printf( " readCoordinate3_point\n" ) );
if( ParseVertexList( m_file, m_model->m_Point ) == 0 )
{
return 0;
}
wxLogTrace( traceVrmlV1Parser, wxT( " readCoordinate3_point failed" ) );
return -1;
}
int VRML1_MODEL_PARSER::readIndexedFaceSet_coordIndex()
{
// DBG( printf( " readIndexedFaceSet_coordIndex\n" ) );
m_model->m_CoordIndex.clear();
glm::ivec3 coord;
int dummy; // should be -1
while( fscanf( m_file, "%d,%d,%d,%d,", &coord[0], &coord[1], &coord[2], &dummy ) )
{
std::vector<int> coord_list;
coord_list.resize( 3 );
coord_list[0] = coord[0];
coord_list[1] = coord[1];
coord_list[2] = coord[2];
if( (coord[0] == coord[1])
|| (coord[0] == coord[2])
|| (coord[2] == coord[1]) )
{
wxLogTrace( traceVrmlV1Parser, wxT( " invalid coordIndex at index %zu (%d, %d, %d, %d)" ),
m_model->m_CoordIndex.size() + 1, coord[0], coord[1], coord[2], dummy );
}
if( dummy != -1 )
{
wxLogTrace( traceVrmlV1Parser, wxT( " Error at index %zu, -1 Expected, got %d" ),
m_model->m_CoordIndex.size() + 1, dummy );
}
m_model->m_CoordIndex.push_back( coord_list );
}
// DBG( printf( " m_CoordIndex.size: %ld\n", m_model->m_CoordIndex.size() ) );
return 0;
}
int VRML1_MODEL_PARSER::readIndexedFaceSet_materialIndex()
{
// DBG( printf( " readIndexedFaceSet_materialIndex\n" ) );
m_model->m_MaterialIndexPerFace.clear();
int index;
while( fscanf( m_file, "%d,", &index ) )
{
m_model->m_MaterialIndexPerFace.push_back( index );
}
// DBG( printf( " m_MaterialIndexPerFace.size: %ld\n", m_model->m_MaterialIndexPerFace.size() ) );
return 0;
}
File diff suppressed because it is too large Load Diff
+29 -516
View File
@@ -37,540 +37,53 @@
#include "3d_struct.h"
#include "modelparsers.h"
// separator chars
static const char* sep_chars = " \t\n\r";
VRML_MODEL_PARSER::VRML_MODEL_PARSER( S3D_MASTER* aMaster ) :
S3D_MODEL_PARSER( aMaster )
{}
{
}
VRML_MODEL_PARSER::~VRML_MODEL_PARSER()
{}
void VRML_MODEL_PARSER::Load( const wxString aFilename )
{
char line[1024], * text;
}
bool VRML_MODEL_PARSER::Load( const wxString& aFilename )
{
char line[11 + 1];
FILE* file;
int LineNum = 0;
//DBG( printf( "Load %s", GetChars( aFilename ) ) );
file = wxFopen( aFilename, wxT( "rt" ) );
if( file == NULL )
return false;
if( fgets( line, 11, file ) == NULL )
{
return;
}
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
SetLocaleTo_C_standard();
while( GetLine( file, line, &LineNum, 512 ) )
{
text = strtok( line, sep_chars );
if ( text == NULL )
continue;
if( stricmp( text, "DEF" ) == 0 || stricmp( text, "Transform" ) == 0 || stricmp( text, "Group" ) == 0 )
{
while( GetLine( file, line, &LineNum, 512 ) )
{
text = strtok( line, sep_chars );
if( text == NULL )
continue;
if( *text == '}' )
break;
if( stricmp( text, "children" ) == 0 )
{
readChildren( file, &LineNum );
}
}
}
fclose( file );
return false;
}
fclose( file );
SetLocaleTo_Default(); // revert to the current locale
}
childs.clear();
int VRML_MODEL_PARSER::readMaterial( FILE* file, int* LineNum )
{
char line[512], * text, * command;
wxString mat_name;
S3D_MATERIAL* material = NULL;
command = strtok( NULL, sep_chars );
text = strtok( NULL, sep_chars );
mat_name = FROM_UTF8( text );
if( stricmp( command, "USE" ) == 0 )
if( stricmp( line, "#VRML V2.0" ) == 0 )
{
for( material = GetMaster()->m_Materials; material; material = material->Next() )
{
if( material->m_Name == mat_name )
{
material->SetMaterial();
return 1;
}
}
DBG( printf( "ReadMaterial error: material not found\n" ) );
return 0;
VRML2_MODEL_PARSER *vrml2_parser = new VRML2_MODEL_PARSER( this );
vrml2_parser->Load( aFilename );
delete vrml2_parser;
return true;
}
else if( stricmp( line, "#VRML V1.0" ) == 0 )
{
VRML1_MODEL_PARSER *vrml1_parser = new VRML1_MODEL_PARSER( this );
vrml1_parser->Load( aFilename );
delete vrml1_parser;
return true;
}
if( stricmp( command, "DEF" ) == 0 || stricmp( command,"Transform" ) == 0 || stricmp( command, "Material") == 0)
{
material = new S3D_MATERIAL( GetMaster(), mat_name );
GetMaster()->Insert( material );
while( GetLine( file, line, LineNum, 512 ) )
{
text = strtok( line, sep_chars );
if( text == NULL )
continue;
if( text[0] == '}' )
{
material->SetMaterial();
return 0;
}
if( stricmp( text, "diffuseColor" ) == 0 )
{
text = strtok( NULL, sep_chars );
material->m_DiffuseColor.x = atof( text );
text = strtok( NULL, sep_chars );
material->m_DiffuseColor.y = atof( text );
text = strtok( NULL, sep_chars );
material->m_DiffuseColor.z = atof( text );
}
else if( stricmp( text, "emissiveColor" ) == 0 )
{
text = strtok( NULL, sep_chars );
material->m_EmissiveColor.x = atof( text );
text = strtok( NULL, sep_chars );
material->m_EmissiveColor.y = atof( text );
text = strtok( NULL, sep_chars );
material->m_EmissiveColor.z = atof( text );
}
else if( strnicmp( text, "specularColor", 13 ) == 0 )
{
text = strtok( NULL, sep_chars );
material->m_SpecularColor.x = atof( text );
text = strtok( NULL, sep_chars );
material->m_SpecularColor.y = atof( text );
text = strtok( NULL, sep_chars );
material->m_SpecularColor.z = atof( text );
}
else if( strnicmp( text, "ambientIntensity", 16 ) == 0 )
{
text = strtok( NULL, sep_chars );
material->m_AmbientIntensity = atof( text );
}
else if( strnicmp( text, "transparency", 12 ) == 0 )
{
text = strtok( NULL, sep_chars );
material->m_Transparency = atof( text );
}
else if( strnicmp( text, "shininess", 9 ) == 0 )
{
text = strtok( NULL, sep_chars );
material->m_Shininess = atof( text );
}
}
}
return -1;
}
int VRML_MODEL_PARSER::readChildren( FILE* file, int* LineNum )
{
char line[1024], * text;
while( GetLine( file, line, LineNum, 512 ) )
{
text = strtok( line, sep_chars );
if( *text == '[' )
continue;
if( *text == ']' )
return 0;
if( *text == ',' )
continue;
if( stricmp( text, "Shape" ) == 0 )
{
readShape( file, LineNum );
}
else
{
DBG( printf( "ReadChildren error line %d <%s> \n", *LineNum, text ) );
break;
}
}
return 1;
}
int VRML_MODEL_PARSER::readShape( FILE* file, int* LineNum )
{
char line[1024], * text;
int err = 1;
while( GetLine( file, line, LineNum, 512 ) )
{
text = strtok( line, sep_chars );
if( *text == '}' )
{
err = 0;
break;
}
if( *text == '{' )
{
continue;
}
if( stricmp( text, "appearance" ) == 0 )
{
readAppearance( file, LineNum );
}
else if( stricmp( text, "geometry" ) == 0 )
{
readGeometry( file, LineNum );
}
else
{
DBG( printf( "ReadShape error line %d <%s> \n", *LineNum, text ) );
break;
}
}
return err;
}
int VRML_MODEL_PARSER::readAppearance( FILE* file, int* LineNum )
{
char line[1024], * text;
int err = 1;
while( GetLine( file, line, LineNum, 512 ) )
{
text = strtok( line, sep_chars );
if( *text == '}' )
{
err = 0;
break;
}
if( *text == '{' )
{
continue;
}
if( stricmp( text, "material" ) == 0 )
{
readMaterial( file, LineNum );
}
else
{
DBG( printf( "ReadAppearance error line %d <%s> \n", *LineNum, text ) );
break;
}
}
return err;
}
void VRML_MODEL_PARSER::readCoordsList( FILE* file, char* text_buffer,
std::vector< double >& aList, int* LineNum )
{
unsigned int ii = 0, jj = 0;
char* text;
bool HasData = false;
bool StartData = false;
bool EndNode = false;
char string_num[512];
text = text_buffer;
while( !EndNode )
{
if( *text == 0 ) // Needs data !
{
text = text_buffer;
GetLine( file, text_buffer, LineNum, 512 );
}
while( !EndNode && *text )
{
switch( *text )
{
case '[':
StartData = true;
jj = 0;
string_num[jj] = 0;
break;
case '}':
EndNode = true;
break;
case ']':
case '\t':
case ' ':
case ',':
jj = 0;
if( !StartData || !HasData )
break;
aList.push_back( atof( string_num ) );
string_num[jj] = 0;
ii++;
HasData = false;
if( *text == ']' )
{
StartData = false;
}
break;
default:
if( !StartData )
break;
if( jj >= sizeof( string_num ) )
break;
string_num[jj] = *text;
jj++;
string_num[jj] = 0;
HasData = true;
break;
}
text++;
}
}
}
int VRML_MODEL_PARSER::readGeometry( FILE* file, int* LineNum )
{
char line[1024], buffer[1024], * text;
int err = 1;
std::vector< double > points;
std::vector< double > list;
double vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB;
while( GetLine( file, line, LineNum, 512 ) )
{
strcpy( buffer, line );
text = strtok( buffer, sep_chars );
if( text == NULL )
continue;
if( *text == '}' )
{
err = 0;
break;
}
if( stricmp( text, "creaseAngle" ) == 0 )
{
continue;
}
if( *text == '{' )
{
continue;
}
if( stricmp( text, "normalPerVertex" ) == 0 )
{
text = strtok( NULL, " ,\t\n\r" );
if( text && stricmp( text, "true" ) == 0 )
{
}
else
{
}
continue;
}
if( stricmp( text, "colorPerVertex" ) == 0 )
{
text = strtok( NULL, " ,\t\n\r" );
if( text && stricmp( text, "true" ) == 0 )
{
}
else
{
}
continue;
}
if( stricmp( text, "normal" ) == 0 )
{
readCoordsList( file, line, list, LineNum );
list.clear();
continue;
}
if( stricmp( text, "normalIndex" ) == 0 )
{
while( GetLine( file, line, LineNum, 512 ) )
{
text = strtok( line, " ,\t\n\r" );
while( text )
{
if( *text == ']' )
break;
text = strtok( NULL, " ,\t\n\r" );
}
if( text && (*text == ']') )
break;
}
continue;
}
if( stricmp( text, "color" ) == 0 )
{
readCoordsList( file, line, list, LineNum );
list.clear();
continue;
}
if( stricmp( text, "solid" ) == 0 )
{
// ignore solid
continue;
}
if( stricmp( text, "colorIndex" ) == 0 )
{
while( GetLine( file, line, LineNum, 512 ) )
{
text = strtok( line, " ,\t\n\r" );
while( text )
{
if( *text == ']' )
break;
text = strtok( NULL, " ,\t\n\r" );
}
if( text && (*text == ']') )
break;
}
continue;
}
if( stricmp( text, "coord" ) == 0 )
{
readCoordsList( file, line, points, LineNum );
}
else if( stricmp( text, "coordIndex" ) == 0 )
{
if( points.size() < 3 || points.size() % 3 != 0 )
{
wxLogError( wxT( "3D geometry read error <%s> at line %d." ),
GetChars( FROM_UTF8( text ) ), *LineNum );
err = 1;
break;
}
std::vector< int > coordIndex;
std::vector< S3D_VERTEX > vertices;
while( GetLine( file, line, LineNum, 512 ) )
{
int jj;
text = strtok( line, " ,\t\n\r" );
while( text )
{
if( *text == ']' )
break;
jj = atoi( text );
if( jj < 0 )
{
for( jj = 0; jj < (int) coordIndex.size(); jj++ )
{
int kk = coordIndex[jj] * 3;
if( (kk < 0) || ((kk + 3) > (int)points.size()) )
{
wxLogError( wxT( "3D geometry index read error <%s> at line %d." ),
GetChars( FROM_UTF8( text ) ), *LineNum );
err = 1;
break;
}
S3D_VERTEX vertex;
vertex.x = points[kk];
vertex.y = points[kk + 1];
vertex.z = points[kk + 2];
vertices.push_back( vertex );
}
if( GetMaster()->IsOpenGlAllowed() )
{
GetMaster()->ObjectCoordsTo3DUnits( vertices );
TransfertToGLlist( vertices, vrmlunits_to_3Dunits );
}
vertices.clear();
coordIndex.clear();
}
else
{
coordIndex.push_back( jj );
}
text = strtok( NULL, " ,\t\n\r" );
}
if( text && (*text == ']') )
break;
}
}
else
{
wxLogError( wxT( "3D geometry read error <%s> at line %d." ),
GetChars( FROM_UTF8( text ) ), *LineNum );
err = 1;
break;
}
}
return err;
DBG( printf( "Unknown internal VRML file format: %s\n", line ) );
return false;
}
+222 -141
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 Tuomas Vaherkoski <tuomasvaherkoski@gmail.com>
* Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -40,32 +40,50 @@
#include <modelparsers.h>
#include <xnode.h>
/**
* Trace mask used to enable or disable the trace output of the X3D parser code.
* The debug output can be turned on by setting the WXTRACE environment variable to
* "KI_TRACE_X3D_PARSER". See the wxWidgets documentation on wxLogTrace for
* more information.
*/
static const wxChar* traceX3DParser = wxT( "KI_TRACE_X3D_PARSER" );
X3D_MODEL_PARSER::X3D_MODEL_PARSER( S3D_MASTER* aMaster ) :
S3D_MODEL_PARSER( aMaster )
{}
{
m_model.reset();
}
X3D_MODEL_PARSER::~X3D_MODEL_PARSER()
{}
void X3D_MODEL_PARSER::Load( const wxString aFilename )
{
}
bool X3D_MODEL_PARSER::Load( const wxString& aFilename )
{
wxLogTrace( traceX3DParser, wxT( "Loading: %s" ), GetChars( aFilename ) );
wxXmlDocument doc;
if( !doc.Load( aFilename ) )
{
wxLogError( wxT( "Error while parsing file '%s'" ), GetChars( aFilename ) );
return;
wxLogTrace( traceX3DParser, wxT( "Error while parsing file: %s" ), GetChars( aFilename ) );
return false;
}
if( doc.GetRoot()->GetName() != wxT( "X3D" ) )
{
wxLogError( wxT( "Filetype is not X3D '%s'" ), GetChars( aFilename ) );
return;
wxLogTrace( traceX3DParser, wxT( "Filetype is not X3D: %s" ), GetChars( aFilename ) );
return false;
}
// Switch the locale to standard C (needed to print floating point numbers)
LOCALE_IO toggle;
childs.clear();
// Shapes are inside of Transform nodes
// Transform node contains information about
// transition, scale and rotation of the shape
@@ -73,68 +91,49 @@ void X3D_MODEL_PARSER::Load( const wxString aFilename )
GetChildsByName( doc.GetRoot(), wxT( "Transform" ), transforms );
for( NODE_LIST::iterator node_it = transforms.begin();
node_it != transforms.end();
node_it++ )
node_it != transforms.end();
node_it++ )
{
readTransform( *node_it );
}
}
m_model.reset( new S3D_MESH() );
childs.push_back( m_model );
wxXmlNode* node = *node_it;
wxXmlAttribute* prop = node->GetAttributes();
wxLogTrace( traceX3DParser, wxT( "Transform: %s %s" ), prop->GetName(), prop->GetValue() );
readTransform( node );
wxString X3D_MODEL_PARSER::VRML_representation()
{
wxString output;
for( unsigned i = 0; i < vrml_points.size(); i++ )
{
output +=
wxT( "Shape {\n"
" appearance Appearance {\n"
" material Material {\n" ) +
vrml_materials[i] +
wxT( " }\n"
" }\n"
" geometry IndexedFaceSet {\n"
" solid TRUE\n"
" coord Coordinate {\n"
" point [\n") +
vrml_points[i] +
wxT( " ]\n"
" }\n"
" coordIndex [\n" ) +
vrml_coord_indexes[i] +
wxT( " ]\n"
" }\n"
"},\n" );
}
return output;
return true;
}
void X3D_MODEL_PARSER::GetChildsByName( wxXmlNode* aParent,
const wxString aName,
std::vector< wxXmlNode* >& aResult )
const wxString aName,
std::vector<wxXmlNode*>& aResult )
{
// Breadth-first search (BFS)
std::queue< wxXmlNode* > found;
// (-Breadth-first search (BFS)-)
// **NOTE** This function was changed to get only the first depth of ocorrences
// so it will be an workarround for the Bug #1443431
std::queue<wxXmlNode*> found;
found.push( aParent );
while( !found.empty() )
{
wxXmlNode *elem = found.front();
wxXmlNode* elem = found.front();
for( wxXmlNode *child = elem->GetChildren();
for( wxXmlNode* child = elem->GetChildren();
child != NULL;
child = child->GetNext() )
{
if( child->GetName() == aName )
{
aResult.push_back( child );
}
found.push( child );
else // **NOTE** This function was changed here to get only the first depth of ocorrences
found.push( child );
}
found.pop();
@@ -154,11 +153,13 @@ void X3D_MODEL_PARSER::GetNodeProperties( wxXmlNode* aNode, PROPERTY_MAP& aProps
}
}
/* Private ----- */
void X3D_MODEL_PARSER::readTransform( wxXmlNode* aTransformNode )
{
NODE_LIST childnodes;
GetChildsByName( aTransformNode, wxT( "Material" ), childnodes );
for( NODE_LIST::iterator node = childnodes.begin();
@@ -173,7 +174,10 @@ void X3D_MODEL_PARSER::readTransform( wxXmlNode* aTransformNode )
PROPERTY_MAP properties;
GetNodeProperties( aTransformNode, properties );
GetChildsByName( aTransformNode, wxT("IndexedFaceSet"), childnodes );
GetChildsByName( aTransformNode, wxT( "IndexedFaceSet" ), childnodes );
for( NODE_LIST::iterator node = childnodes.begin();
node != childnodes.end();
@@ -188,7 +192,10 @@ void X3D_MODEL_PARSER::readTransform( wxXmlNode* aTransformNode )
void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode )
{
glm::vec3 color;
PROPERTY_MAP properties;
GetNodeProperties( aMatNode, properties );
// DEFine new Material named as value of DEF
@@ -199,22 +206,33 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode )
S3D_MATERIAL* material = new S3D_MATERIAL( GetMaster(), properties[ wxT( "DEF" ) ] );
GetMaster()->Insert( material );
if( !parseDoubleTriplet( properties[ wxT( "diffuseColor" ) ],
material->m_DiffuseColor ) )
m_model->m_Materials = material;
if( !parseDoubleTriplet( properties[ wxT( "diffuseColor" ) ], color ) )
{
DBG( printf("diffuseColor parsing error") );
// DBG( printf( "diffuseColor parsing error" ) );
}
else
{
m_model->m_Materials->m_DiffuseColor.push_back( color );
}
if( !parseDoubleTriplet( properties[ wxT( "specularColor" ) ],
material->m_SpecularColor ) )
if( !parseDoubleTriplet( properties[ wxT( "specularColor" ) ], color ) )
{
DBG( printf("specularColor parsing error") );
// DBG( printf( "specularColor parsing error" ) );
}
else
{
m_model->m_Materials->m_SpecularColor.push_back( color );
}
if( !parseDoubleTriplet( properties[ wxT( "emissiveColor" ) ],
material->m_EmissiveColor ) )
if( !parseDoubleTriplet( properties[ wxT( "emissiveColor" ) ], color ) )
{
DBG( printf("emissiveColor parsing error") );
// DBG( printf( "emissiveColor parsing error" ) );
}
else
{
m_model->m_Materials->m_EmissiveColor.push_back( color );
}
wxStringTokenizer values;
@@ -222,40 +240,47 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode )
if( values.GetNextToken().ToDouble( &amb ) )
{
material->m_AmbientIntensity = amb;
m_model->m_Materials->m_AmbientColor.push_back( glm::vec3( amb, amb, amb ) );
}
else
{
DBG( printf( "ambienterror" ) );
// DBG( printf( "ambienterror" ) );
}
values.SetString( properties[ wxT( "shininess" ) ] );
if( values.GetNextToken().ToDouble( &shine ) )
{
material->m_Shininess = shine;
// VRML value is normalized and openGL expects a value 0 - 128
if( shine > 1.0 )
{
shine = 1.0;
} else if( shine < 0.0 )
{
shine = 0.0;
}
shine = shine * 128.0f;
m_model->m_Materials->m_Shininess.push_back( shine );
}
else
{
DBG( printf( "shininess error" ) );
// DBG( printf( "shininess error" ) );
}
values.SetString( properties[ wxT( "transparency" ) ] );
if( values.GetNextToken().ToDouble( &transp ) )
{
material->m_Transparency = transp;
m_model->m_Materials->m_Transparency.push_back( transp );
}
else
{
DBG( printf( "trans error") );
// DBG( printf( "trans error" ) );
}
material->SetMaterial();
// VRML
wxString vrml_material;
PROPERTY_MAP::const_iterator p = ++properties.begin(); // skip DEF
PROPERTY_MAP::const_iterator p = ++properties.begin(); // skip DEF
for( ; p != properties.end(); p++ )
{
@@ -264,7 +289,6 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode )
vrml_materials.push_back( vrml_material );
}
// USE existing material named by value of USE
else if( properties.find( wxT( "USE" ) ) != properties.end() )
{
@@ -278,60 +302,71 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode )
wxString vrml_material;
vrml_material.Append( wxString::Format( wxT( "specularColor %f %f %f\n" ),
material->m_SpecularColor.x,
material->m_SpecularColor.y,
material->m_SpecularColor.z ) );
material->m_SpecularColor[0].x,
material->m_SpecularColor[0].y,
material->m_SpecularColor[0].z ) );
vrml_material.Append( wxString::Format( wxT( "diffuseColor %f %f %f\n" ),
material->m_DiffuseColor.x,
material->m_DiffuseColor.y,
material->m_DiffuseColor.z ) );
material->m_DiffuseColor[0].x,
material->m_DiffuseColor[0].y,
material->m_DiffuseColor[0].z ) );
vrml_material.Append( wxString::Format( wxT( "emissiveColor %f %f %f\n" ),
material->m_EmissiveColor.x,
material->m_EmissiveColor.y,
material->m_EmissiveColor.z ) );
material->m_EmissiveColor[0].x,
material->m_EmissiveColor[0].y,
material->m_EmissiveColor[0].z ) );
vrml_material.Append( wxString::Format( wxT( "ambientIntensity %f\n"),
material->m_AmbientIntensity ) );
vrml_material.Append( wxString::Format( wxT( "ambientIntensity %f\n" ),
material->m_AmbientColor[0].x ) );
vrml_material.Append( wxString::Format( wxT( "shininess %f\n"),
material->m_Shininess ) );
vrml_material.Append( wxString::Format( wxT( "shininess %f\n" ),
material->m_Shininess[0] ) );
vrml_material.Append( wxString::Format( wxT( "transparency %f\n"),
material->m_Transparency ) );
vrml_material.Append( wxString::Format( wxT( "transparency %f\n" ),
material->m_Transparency[0] ) );
vrml_materials.push_back( vrml_material );
material->SetMaterial();
m_model->m_Materials = material;
return;
}
}
DBG( printf( "ReadMaterial error: material not found\n" ) );
// DBG( printf( "ReadMaterial error: material not found\n" ) );
}
}
bool X3D_MODEL_PARSER::parseDoubleTriplet( const wxString& aData,
S3D_VERTEX& aResult )
S3D_VERTEX& aResult )
{
wxStringTokenizer tokens(aData);
wxStringTokenizer tokens( aData );
return tokens.GetNextToken().ToDouble( &aResult.x ) &&
tokens.GetNextToken().ToDouble( &aResult.y ) &&
tokens.GetNextToken().ToDouble( &aResult.z );
double x = 0;
double y = 0;
double z = 0;
bool ret = tokens.GetNextToken().ToDouble( &x )
&& tokens.GetNextToken().ToDouble( &y )
&& tokens.GetNextToken().ToDouble( &z );
aResult.x = x;
aResult.y = y;
aResult.z = z;
return ret;
}
void X3D_MODEL_PARSER::rotate( S3D_VERTEX& aV,
S3D_VERTEX& aU,
double angle )
S3D_VERTEX& aU,
double angle )
{
S3D_VERTEX rotated;
double C = cos( angle );
double S = sin( angle );
double t = 1.0 - C;
double C = cos( angle );
double S = sin( angle );
double t = 1.0 - C;
rotated.x = ( t * aU.x * aU.x + C ) * aV.x +
( t * aU.x * aU.y - S * aU.z ) * aV.y +
@@ -345,9 +380,9 @@ void X3D_MODEL_PARSER::rotate( S3D_VERTEX& aV,
( t * aU.y * aU.z + S * aU.x ) * aV.y +
( t * aU.z * aU.z + C) * aV.z;
aV.x = rotated.x;
aV.y = rotated.y;
aV.z = rotated.z;
aV.x = rotated.x;
aV.y = rotated.y;
aV.z = rotated.z;
}
@@ -358,12 +393,13 @@ void X3D_MODEL_PARSER::rotate( S3D_VERTEX& aV,
* 4. Apply geometry to Master object
*/
void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode,
PROPERTY_MAP& aTransformProps)
PROPERTY_MAP& aTransformProps )
{
/* Step 1: Read transform data
* --------------------------- */
S3D_VERTEX translation;
parseDoubleTriplet( aTransformProps[ wxT( "translation" ) ], translation );
S3D_VERTEX scale;
@@ -371,31 +407,36 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode,
S3D_VERTEX rotation;
double angle = 0.0;
wxStringTokenizer tokens(aTransformProps[ wxT( "rotation" ) ]);
wxStringTokenizer tokens( aTransformProps[ wxT( "rotation" ) ] );
if( !(tokens.GetNextToken().ToDouble( &rotation.x ) &&
tokens.GetNextToken().ToDouble( &rotation.y ) &&
tokens.GetNextToken().ToDouble( &rotation.z ) &&
tokens.GetNextToken().ToDouble( &angle ) ) )
double x = 0.0, y = 0.0, z = 0.0;
if( !( tokens.GetNextToken().ToDouble( &x )
&& tokens.GetNextToken().ToDouble( &y )
&& tokens.GetNextToken().ToDouble( &z )
&& tokens.GetNextToken().ToDouble( &angle ) ) )
{
DBG( printf("rotation read error") );
// DBG( printf( "rotation read error" ) );
}
else
{
rotation.x = x;
rotation.y = y;
rotation.z = z;
}
double vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits *
UNITS3D_TO_UNITSPCB;
/* Step 2: Read all coordinate points
* ---------------------------- */
std::vector< double > points;
std::vector<double> points;
NODE_LIST coordinates;
GetChildsByName( aFaceNode, wxT( "Coordinate" ), coordinates);
GetChildsByName( aFaceNode, wxT( "Coordinate" ), coordinates );
PROPERTY_MAP coordinate_properties;
// IndexedFaceSet has one Coordinate child node
GetNodeProperties( coordinates[0], coordinate_properties );
// Save points to vector as doubles
wxStringTokenizer point_tokens( coordinate_properties[ wxT("point") ] );
wxStringTokenizer point_tokens( coordinate_properties[ wxT( "point" ) ] );
double point = 0.0;
while( point_tokens.HasMoreTokens() )
@@ -406,13 +447,13 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode,
}
else
{
wxLogError( wxT( "Error converting to double" ) );
wxLogTrace( traceX3DParser, wxT( "Error converting to double" ) );
}
}
if( points.size() % 3 != 0 )
{
DBG( printf( "Number of points is incorrect" ) );
// DBG( printf( "Number of points is incorrect" ) );
return;
}
@@ -420,14 +461,14 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode,
* apply transforms in order of SCALE, ROTATION, TRANSLATION
*/
wxString vrml_pointlist;
std::vector< S3D_VERTEX > triplets;
std::vector<S3D_VERTEX> triplets;
for( unsigned id = 0; id < points.size() / 3; id++ )
{
int triplet_indx = id * 3;
S3D_VERTEX point( points[ triplet_indx ],
points[ triplet_indx + 1 ],
points[ triplet_indx + 2 ] );
points[ triplet_indx + 1 ],
points[ triplet_indx + 2 ] );
point.x *= scale.x;
point.y *= scale.y;
@@ -439,7 +480,7 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode,
point.y += translation.y;
point.z += translation.z;
triplets.push_back(point);
m_model->m_Point.push_back( point );
// VRML
vrml_pointlist.Append( wxString::Format( wxT( "%f %f %f\n" ), point.x, point.y, point.z ) );
@@ -447,18 +488,72 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode,
vrml_points.push_back( vrml_pointlist );
/* Step 3: Read all color points
* ---------------------------- */
std::vector<double> color_points;
NODE_LIST color;
GetChildsByName( aFaceNode, wxT( "Color" ), color );
// Some models lack color information, need to handle this safely
if( !color.empty() )
{
PROPERTY_MAP color_properties;
// IndexedFaceSet has one Coordinate child node
GetNodeProperties( color[0], color_properties );
// Save points to vector as doubles
wxStringTokenizer colorpoint_tokens( color_properties[ wxT( "color" ) ] );
double color_point = 0.0;
while( colorpoint_tokens.HasMoreTokens() )
{
if( colorpoint_tokens.GetNextToken().ToDouble( &color_point ) )
{
color_points.push_back( color_point );
}
else
{
wxLogTrace( traceX3DParser, wxT( "Error converting to double" ) );
}
}
if( color_points.size() % 3 != 0 )
{
// DBG( printf( "Number of points is incorrect" ) );
return;
}
/* Create 3D face color from 3 color points
*/
m_model->m_Materials->m_DiffuseColor.clear();
for( unsigned id = 0; id < color_points.size() / 3; id++ )
{
m_model->m_MaterialIndexPerFace.push_back( id );
int color_triplet_indx = id * 3;
glm::vec3 colorface( color_points[ color_triplet_indx + 0 ],
color_points[ color_triplet_indx + 1 ],
color_points[ color_triplet_indx + 2 ] );
m_model->m_Materials->m_DiffuseColor.push_back( colorface );
}
}
/* -- Read coordinate indexes -- */
PROPERTY_MAP faceset_properties;
GetNodeProperties( aFaceNode, faceset_properties );
std::vector< S3D_VERTEX > vertices;
std::vector< int > coordIndex;
wxString coordIndex_str = faceset_properties[ wxT( "coordIndex" ) ];
wxStringTokenizer index_tokens( coordIndex_str );
wxString vrml_coord_indx_list;
std::vector<int> coord_list;
coord_list.clear();
while( index_tokens.HasMoreTokens() )
{
long index = 0;
@@ -470,29 +565,15 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode,
{
/* Step 4: Apply geometry to Master object
* --------------------------------------- */
std::vector<int>::const_iterator id;
m_model->m_CoordIndex.push_back( coord_list );
for( id = coordIndex.begin();
id != coordIndex.end();
id++ )
{
vertices.push_back( triplets.at( *id ) );
}
if( GetMaster()->IsOpenGlAllowed() )
{
GetMaster()->ObjectCoordsTo3DUnits( vertices );
TransfertToGLlist( vertices, vrmlunits_to_3Dunits );
}
vertices.clear();
coordIndex.clear();
coord_list.clear();
vrml_coord_indx_list.Append( wxT( "-1\n" ) );
}
else
{
coordIndex.push_back( index );
vrml_coord_indx_list.Append( wxString::Format( wxT( "%u " ), index ) );
coord_list.push_back( index );
vrml_coord_indx_list.Append( wxString::Format( wxT( "%ld " ), index ) );
}
}
+37 -15
View File
@@ -1,11 +1,12 @@
* Copyright (C) 1992-2010 Jean-Pierre Charras
* Copyright (C) 1992-2010 Kicad Developers Team
* Copyright (C) 1992-2015 Jean-Pierre Charras
* Copyright (C) 1992-2015 Kicad Developers Team
* under GNU General Public License (see copyright.txt)
== Main Authors
Jean-Pierre Charras <jean-pierre.charras[at]gipsa-lab-dot-inpg-dot-fr>
Dick Hollenbeck <dick[at]softplc-dot-com>
Wayne Stambaugh <stambaughw[at]verizon-dot-net>
Wayne Stambaugh <stambaughw[at]gmail-dot-com>
== Contributors
Hauptmech <hauptmech[at]gmail-dot-com>
@@ -16,17 +17,37 @@ Marco Serantoni <marco.serantoni[at]gmail-dot-com> (OSX maintener)
Rok Markovic <rok[at]kanardia.eu>
Tim Hanson <sideskate[at]gmail-dot-com>
Vesa Solonen <vesa.solonen[at]hut-dot-fi>
Alexander Zakamaldin <zaka62[at]mail.ru>
Miguel Angel Ajo Pelayo <miguelangel@nbee.es> (Python Scripting)
Alexander Lunev <al.lunev@yahoo.com> (Pcad to Kicad converter)
Jacobo Aragunde Perez <jaragunde@igalia.com> for Igalia and the CERN
Alexander Zakamaldin <zaka62[at]mail-dot-ru>
Miguel Angel Ajo Pelayo <miguelangel[at]nbee-dot-es> (Python Scripting)
Alexander Lunev <al.lunev[at]yahoo-dot-com> (Pcad to Kicad converter)
Jacobo Aragunde Perez <jaragunde[at]igalia-dot-com> for Igalia and the CERN
Brian Sidebotham <brian.sidebotham[at]gmail-dot-com>
Maciej Sumiński <maciej.suminski[at]cern-dot-ch>
Tomasz Wlostowski <tomasz.wlostowski[at]cern-dot-ch>
Henner Zeller <h.zeller[at]acm-dot-org>
Mark Roszko <mark.roszko[at]gmail-dot-com>
Daniel Majewski <lordblick[at]gmail-dot-com>
Konstantin Baranovskiy <baranovskiykonstantin[at]gmail-dot-com>
Torsten Hüter <torstenhtr[at]gmx-dot-de>
Nick Østergaard <oe.nick[at]gmail-dot-com>
Andrew Zonenberg <azonenberg[at]drawersteak-dot-com>
Cirilo Bernardo <cirilo_bernardo[at]yahoo-dot-com>
Adam Wolf <adamwolf[at]feelslikeburning-dot-com>
Bernhard Stegmaier <stegmaier[at]sw-systems-dot-de>
Chris Pavlina <pavlina.chris[at]gmail-dot-com>
Simon Richter <Simon.Richter[at]hogyros-dot-de>
Mario Luzeiro <mrluzeiro[at]ua-dot-pt>
Mateusz Skowroński <skowri[at]gmail-dot-com>
See also CHANGELOG.txt for contributors.
== Document Writers
Jean-Pierre Charras <jean-pierre.charras[at]gipsa-lab.inpg.fr>
Igor Plyatov <plyatov[at]gmail.com>
Jean-Pierre Charras <jean-pierre.charras[at]gipsa-lab.inpg-dot-fr>
Igor Plyatov <plyatov[at]gmail-dot-com>
Fabrizio Tappero <fabrizio-dot-tappero[at]gmail-dot-com>
Marco Ciampa <ciampix[at]libero-dot-it>
Wayne Stambaugh <stambaughw[at]gmail-dot-com
== Translators
Czech (CZ) Martin Kratoška <martin[at]ok1rr-dot-com>
@@ -34,20 +55,21 @@ Dutch (NL) Jerry Jacobs <xor.gate.engineering[at]gmail-dot-com>
Finnish (FI) Vesa Solonen <vesa.solonen[at]hut-dot-fi>
French (FR) Jean-Pierre Charras <jean-pierre.charras[at]inpg-dot-fr>
Polish (PL) Mateusz Skowro¿ski <skowri[at]gmail-dot-com>
Polish (PL) Kerusey Karyu <keruseykaryu@o2.pl>
Polish (PL) Kerusey Karyu <keruseykaryu[at]o2.pl>
Portuguese (PT) Renie Marquet <reniemarquet[at]uol-dot-com-dot-br>"
Russian (RU) Igor Plyatov <plyatov[at]gmail-dot-com>
Russian (RU) Andrey Fedorushkov <andrf@mail.ru>
Russian (RU) Andrey Fedorushkov <andrf[at]mail-dot-ru>
Russian (RU) Eldar Khayrullin <eldar.khayrullin[at]mail-dot-ru>
Spanish (ES) Pedro Martin del Valle <pkicad[at]yahoo-dot-es>
Spanish (ES) Iñigo Zuluaga <inigo_zuluaga[at]yahoo-dot-es>
German (DE) Rafael Sokolowski <Rafael.Sokolowski[at]web-dot-de
Japanese (JA) Kenta Yonekura <midpika@hotmail.com>
Japanese (JA) yoneken <midpika@hotmail.com>
Japanese (JA) Kenta Yonekura <yoneken[at]kicad-dot-jp>
Remy Halvick, David Briscoe, Dominique Laigle, Paul Burke
== Programm credits for icons and others
Icons by Iñigo Zuluagaz <inigo_zuluaga[at]yahoo-dot-es>
New Icons by Fabrizio Tappero <fabrizio-dot-tappero[at]gmail-dot-com>
3D modules by Renie Marquet <reniemarquet[at]uol.com-dot-br>
3D modules by Renie Marquet <reniemarquet[at]uol-dot-com-dot-br>
3D modules by Christophe Boschat <nox454[at]hotmail-dot-fr>
+244 -134
View File
@@ -23,10 +23,6 @@ set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules )
# reports.
#
#option( USE_KIWAY_DLLS "Build the major modules as KIFACE DLLs or DSOs, will soon be the norm." ON )
set( USE_KIWAY_DLLS true ) # this is now mandatory, the code is the same anyways, the old code is gone.
# The desire is to migrate designs *away from* case independence, and to create designs which use
# literally (case specific) interpreted component names. But for backwards compatibility,
# you may turn OFF this option if you really must. (Remember that with KiCad using text
@@ -36,36 +32,39 @@ set( USE_KIWAY_DLLS true ) # this is now mandatory, the code is the same anyway
# have this option turned OFF, the xml export's referential integrity is broken
# on library part name. Hence the default is ON now, as of 29-Jan-2014.
option( KICAD_KEEPCASE
"ON= case specific string matching on component names, OFF= match names as if they were spelt using uppercase."
"Use case sensitive string matching for component names (default ON)."
ON
)
option( USE_WX_GRAPHICS_CONTEXT
"Use wxGraphicsContext for rendering ( default OFF). Warning, this is experimental" )
"Use wxGraphicsContext for rendering (default OFF). Warning, this is experimental" )
option( USE_WX_OVERLAY
"Use wxOverlay: Always ON for MAC ( default OFF). Warning, this is experimental" )
"Use wxOverlay: Always ON for MAC (default OFF). Warning, this is experimental" )
option( KICAD_SCRIPTING
"set this option ON to build the scripting support inside kicad binaries"
"Build the Python scripting support inside KiCad binaries (default OFF)."
)
option( KICAD_SCRIPTING_MODULES
"set this option ON to build kicad modules that can be used from scripting languages"
"Build KiCad Python modules that can be used from scripting languages (default OFF)."
)
option( KICAD_SCRIPTING_WXPYTHON
"set this option ON to build wxpython implementation for wx interface building in python and py.shell"
"Build wxPython implementation for wx interface building in Python and py.shell (default OFF)."
)
option( KICAD_BUILD_STATIC
"Builds Kicad and all libraries static"
"Build dependencies as static libraries. OSX only. (default OFF)."
)
option( KICAD_BUILD_DYNAMIC
"Builds Kicad and all libraries dynamic (required for wxPython)"
"Build dependencies as shared libraries. Required for wxPython support. OXS only. (default OFF)."
)
option( USE_OSX_DEPS_BUILDER
"Build dependencies from source instead of dependencies installed on system. OSX only. (default OFF)."
)
# WARNING: KiCad developers strongly advise you to build Boost with supplied patches,
# as it is known to work with KiCad. Other versions may contain bugs that may result
@@ -75,7 +74,6 @@ option( KICAD_SKIP_BOOST
)
mark_as_advanced( KICAD_SKIP_BOOST ) # Normal builders should build Boost.
# when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled:
# PYTHON_EXECUTABLE can be defined when invoking cmake
# ( use -DPYTHON_EXECUTABLE=<python path>/python.exe or python2 )
@@ -84,6 +82,7 @@ mark_as_advanced( KICAD_SKIP_BOOST ) # Normal builders should build Boost.
option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." ON )
# This can be set to a custom name to brag about a particular branch in the "About" dialog:
set( KICAD_REPO_NAME "product" CACHE STRING "Name of the tree from which this build came." )
@@ -95,16 +94,33 @@ set( KICAD_REPO_NAME "product" CACHE STRING "Name of the tree from which this bu
set( DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/.downloads-by-cmake
CACHE PATH "Location of KiCad downloads, suggested is a dir common to all builds, i.e. global." )
#Add option to add user directories for linker, if any
# Add option to add user directories for linker, if any
LINK_DIRECTORIES( ${LINK_DIRECTORIES_PATH} )
if( UNIX )
set( KICAD_USER_CONFIG_DIR $ENV{HOME} CACHE PATH "Location of user specific KiCad config files" )
elseif( MINGW )
set( KICAD_USER_CONFIG_DIR $ENV{%APPDATA%} CACHE PATH "Location of user specific KiCad config files" )
set( KICAD_USER_CONFIG_DIR $ENV{APPDATA} CACHE PATH "Location of user specific KiCad config files" )
endif()
mark_as_advanced( KICAD_USER_CONFIG_DIR )
# Set default data file path to CMAKE_INSTALL_PREFIX if it wasn't specified during the
# CMake configuration. The value of DEFAULT_INSTALL_PATH is expanded in config.h and
# used in the source code to define the base path for kicad search paths and environment
# variables.
if( NOT DEFAULT_INSTALL_PATH )
set( DEFAULT_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}"
CACHE
PATH
"Location of KiCad data files." )
endif()
message( STATUS "Kicad install dir: <${DEFAULT_INSTALL_PATH}>" )
# Generate build system specific header file.
include( PerformFeatureChecks )
perform_feature_checks()
#================================================
# Set flags for GCC, or treat llvm as GCC
@@ -183,16 +199,28 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# Since version 2.8.5, Cmake uses a response file (.rsp) to
# pass the list of include paths to gcc
# unfortunately, under mingw32+msys, at least with gcc 4.8 and previous,
# this file is not expanded and include paths defined in this file are not taken in account
# this is the case of wxWidgets includes
# Disable this response file for includes ( See Windows-GNU.cmake module )
if( WIN32 AND MSYS AND NOT CMAKE_CROSSCOMPILING )
# fixme: it is needed only with MSYS+MINGW32? or always under MINGW
if( ${CMAKE_SIZEOF_VOID_P} MATCHES 4 )
set( CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 0 )
# this file is not always expanded and in this case include paths defined in this file
# are not taken in account ( this is the case of wxWidgets includes )
# If it is the case, disable this response file for includes ( See Windows-GNU.cmake module )
if( false ) #set to true to disable the include response file
if( WIN32 AND MSYS AND NOT CMAKE_CROSSCOMPILING )
# fixme: it is needed only with MSYS+MINGW32? or always under MINGW
if( ${CMAKE_SIZEOF_VOID_P} MATCHES 4 )
set( CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 0 )
endif()
endif()
endif()
# for some reasons, cmake does do use always a response file to send the list of objects
# to the archiver, and because this list can be very long, and can create issue
# when it is used in a command line, force use of a response file to store it
SET( CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1 )
# The MinGW compiler can use the microsoft system snprintf as standard and it has a broken
# API with respect to the C99 standard, so make sure we force it to use its own compliant
# snprintf
add_definitions(-D__USE_MINGW_ANSI_STDIO=1)
else()
# We build DLL/DSOs from static libraries, so create position independent
# code for all cases, since we do not have DLL/DSO specific static
@@ -227,8 +255,8 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
if( APPLE )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__ASSERTMACROS__ -mmacosx-version-min=10.5" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__ASSERTMACROS__ -mmacosx-version-min=10.5" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__ASSERTMACROS__" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__ASSERTMACROS__" )
# Allows .dylib relocation in the future - needed by fixbundle
set( CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -headerpad_max_install_names")
@@ -241,6 +269,12 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
EXEC_PROGRAM( wx-config ARGS --cxx OUTPUT_VARIABLE CMAKE_CXX_COMPILER )
endif()
# There seems to be no consistent behavior when -mmacosx-min-version is
# not specified, so force user to set minimum OSX version to build for
if( NOT CMAKE_OSX_DEPLOYMENT_TARGET )
message( FATAL_ERROR "Please specify target OS X version using -DCMAKE_OSX_DEPLOYMENT_TARGET=10.x" )
endif()
endif()
endif( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
@@ -270,21 +304,15 @@ if( USE_WX_GRAPHICS_CONTEXT )
endif()
# Allow user to override the default settings for adding images to menu items. By default
# images in menu items are enabled on all platforms except OSX. This can be over ridden by
# defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior.
if( NOT DEFINED USE_IMAGES_IN_MENUS )
if( NOT APPLE )
set( USE_IMAGES_IN_MENUS ON )
endif()
# By default images in menu items are enabled on all platforms except OSX.
if( NOT APPLE )
set( USE_IMAGES_IN_MENUS ON CACHE BOOL "Enable images in menus" )
else()
if( USE_IMAGES_IN_MENUS )
set( USE_IMAGES_IN_MENUS ON )
endif()
set( USE_IMAGES_IN_MENUS OFF CACHE BOOL "Enable images in menus" )
endif()
# KIFACE_SUFFIX is the file extension used for top level program modules which
# implement the KIFACE interface. A valid suffix starts with a period '.'.
@@ -305,38 +333,82 @@ set( KIFACE_PREFIX "_" )
#================================================
# Locations for install targets.
set( KICAD_BIN bin
CACHE PATH "Location of KiCad binaries." )
set( KICAD_FP_LIB_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}"
CACHE PATH "Default path where footprint libraries are installed." )
if( UNIX )
#================================================
if( NOT APPLE )
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
set( KICAD_PLUGINS lib/kicad/plugins
CACHE PATH "Location of KiCad plugins." )
set( KICAD_BIN ${CMAKE_INSTALL_PREFIX}/bin
CACHE PATH "Location of KiCad binaries." )
if( WIN32 )
set( KICAD_PLUGINS ${KICAD_BIN}/scripting/plugins
CACHE PATH "Location of KiCad plugins." )
else()
set( KICAD_PLUGINS lib/kicad/plugins
CACHE PATH "Location of KiCad plugins." )
endif()
set( KICAD_DATA share/kicad
CACHE PATH "Location of KiCad data files." )
set( KICAD_DOCS share/doc/kicad
CACHE PATH "Location of KiCad documentation files." )
set( KICAD_FP_LIB_INSTALL_PATH "${KICAD_FP_LIB_INSTALL_PATH}/share/kicad/modules" )
endif()
set( KICAD_DEMOS ${KICAD_DATA}/demos
CACHE PATH "Location of KiCad demo files." )
set( KICAD_TEMPLATE ${KICAD_DATA}/template
CACHE PATH "Location of KiCad template files." )
else()
# everything without leading / is relative to CMAKE_INSTALL_PREFIX.
# CMAKE_INSTALL_PREFIX is root of .dmg image
set( KICAD_BIN ${CMAKE_INSTALL_PREFIX}
CACHE PATH "Location of KiCad binaries." FORCE )
if( MINGW )
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
set( KICAD_PLUGINS ${KICAD_BIN}/plugins
CACHE PATH "Location of KiCad plugins." )
set( KICAD_DATA share
CACHE PATH "Location of KiCad data files." )
# some paths to single app bundle
set( OSX_BUNDLE_MAIN "kicad.app" )
set( OSX_BUNDLE_BIN_DIR "Contents/MacOS" )
set( OSX_BUNDLE_LIB_DIR "Contents/Frameworks" )
set( OSX_BUNDLE_KIFACE_DIR "Contents/PlugIns" )
set( OSX_BUNDLE_SUP_DIR "Contents/SharedSupport" )
set( OSX_BUNDLE_APP_DIR "Contents/Applications" )
set( OSX_BUNDLE_BUILD_DIR "${CMAKE_BINARY_DIR}/kicad/${OSX_BUNDLE_MAIN}" )
set( OSX_BUNDLE_BUILD_BIN_DIR "${OSX_BUNDLE_BUILD_DIR}/${OSX_BUNDLE_BIN_DIR}" )
set( OSX_BUNDLE_BUILD_LIB_DIR "${OSX_BUNDLE_BUILD_DIR}/${OSX_BUNDLE_LIB_DIR}" )
set( OSX_BUNDLE_BUILD_KIFACE_DIR "${OSX_BUNDLE_BUILD_DIR}/${OSX_BUNDLE_KIFACE_DIR}" )
set( OSX_BUNDLE_INSTALL_DIR "${KICAD_BIN}/${OSX_BUNDLE_MAIN}" )
set( OSX_BUNDLE_INSTALL_BIN_DIR "${OSX_BUNDLE_INSTALL_DIR}/${OSX_BUNDLE_BIN_DIR}" )
set( OSX_BUNDLE_INSTALL_LIB_DIR "${OSX_BUNDLE_INSTALL_DIR}/${OSX_BUNDLE_LIB_DIR}" )
set( OSX_BUNDLE_INSTALL_KIFACE_DIR "${OSX_BUNDLE_INSTALL_DIR}/${OSX_BUNDLE_KIFACE_DIR}" )
# everything provided with the application bundle goes into
# kicad.app/Contents/SharedSupport => accessible via GetDataDir()
# everything else to the .dmg image
set( KICAD_DATA ${OSX_BUNDLE_INSTALL_DIR}/${OSX_BUNDLE_SUP_DIR}
CACHE PATH "Location of KiCad data files." FORCE )
set( KICAD_TEMPLATE ${KICAD_DATA}/template
CACHE PATH "Location of KiCad template files." FORCE )
set( KICAD_PLUGINS ${KICAD_DATA}/plugins
CACHE PATH "Location of KiCad plugins." FORCE )
set( KICAD_DOCS doc
CACHE PATH "Location of KiCad documentation files." )
set( KICAD_FP_LIB_INSTALL_PATH "${KICAD_FP_LIB_INSTALL_PATH}/modules" )
endif()
CACHE PATH "Location of KiCad documentation files." FORCE )
set( KICAD_DEMOS demos
CACHE PATH "Location of KiCad demo files." FORCE )
set( KICAD_DEMOS ${KICAD_DATA}/demos
CACHE PATH "Location of KiCad demo files." )
set( KICAD_TEMPLATE ${KICAD_DATA}/template
CACHE PATH "Location of KiCad template files." )
# Override default paths for fixup_bundle
set( OSX_BUNDLE_OVERRIDE_PATHS "
function( gp_item_default_embedded_path_override item default_embedded_path_var )
# by default, embed things right next to the main bundle executable:
set( path \"@executable_path/../../Contents/MacOS\" )
set( overridden 0 )
# embed .dylibs right next to the main bundle executable:
if( item MATCHES \"\\\\.dylib$\" )
set( path \"@executable_path/../Frameworks\" )
set( overridden 1 )
endif()
set( \${default_embedded_path_var} \"\${path}\" PARENT_SCOPE )
endfunction(gp_item_default_embedded_path_override)
"
)
endif()
mark_as_advanced( KICAD_BIN
KICAD_PLUGINS
@@ -354,9 +426,24 @@ include( ExternalProject )
#================================================
include( CheckFindPackageResult )
##########################
# Find wxWidgets library #
##########################
# Here you can define what libraries of wxWidgets you need for your
# application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
# Turn on wxWidgets compatibility mode for some classes
add_definitions( -DWX_COMPATIBILITY )
# See line 41 of CMakeModules/FindwxWidgets.cmake
set( wxWidgets_CONFIG_OPTIONS ${wxWidgets_CONFIG_OPTIONS} --static=no )
find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml stc REQUIRED )
# Include wxWidgets macros.
include( ${wxWidgets_USE_FILE} )
#######################
# Find OpenGL library #
#######################
@@ -373,9 +460,12 @@ check_find_package_result( OPENGL_FOUND "OpenGL" )
# Always defined, empty if no libraries are to be built
add_custom_target( lib-dependencies )
if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
# Only download and build all dependencies from source on OSX if the user specifically requests
# it. Otherwise, respect the developers wishes to use the dependencies already installed on
# their system
if( APPLE AND USE_OSX_DEPS_BUILDER )
# This should be built in all cases, if swig exec is not avaiable
# This should be built in all cases, if swig exec is not available
# will be impossible also enable SCRIPTING being for PCBNEW required immediately
include( download_pcre )
@@ -418,31 +508,24 @@ if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
set( PYTHON_DEST ${LIBWXPYTHON_ROOT}/wxPython/lib/python2.6/site-packages )
set(wxWidgets_BIN_DIR ${LIBWXPYTHON_ROOT}/bin/wxrc )
set(wxWidgets_CONFIG_EXECUTABLE ${LIBWXPYTHON_ROOT}/bin/wx-config )
set(wxWidgets_INCLUDE_DIRS ${LIBWXPYTHON_ROOT}/include/wx-3.0 )
set(wxWidgets_LIBRARY_DIRS ${LIBWXPYTHON_ROOT}/lib )
add_dependencies( lib-dependencies libwxpython )
add_dependencies( lib-dependencies swig )
else()
include( download_wxwidgets )
add_dependencies( lib-dependencies libwx )
endif()
include( download_libpng )
include( download_pkgconfig )
set( PKG_CONFIG_EXECUTABLE "${PKGCONFIG_ROOT}/bin/pkg-config" )
set( PKG_CONFIG_EXECUTABLE "${PKGCONFIG_ROOT}/bin/pkg-config" )
include( download_glew )
set( GLEW_GLEW_LIBRARY "${GLEW_ROOT}/lib/libGLEW.a" )
set( GLEW_INCLUDE_DIR "${GLEW_ROOT}/include" )
set( GLEW_GLEW_LIBRARY "${GLEW_ROOT}/lib/libGLEW.a" )
set( GLEW_INCLUDE_DIR "${GLEW_ROOT}/include" )
include( download_pixman )
set( PIXMAN_LIBRARY "${PIXMAN_ROOT}/lib/libpixman-1.a" )
set( PIXMAN_LIBRARY "${PIXMAN_ROOT}/lib/libpixman-1.a" )
include( download_cairo )
set( CAIRO_INCLUDE_DIR "${CAIRO_ROOT}/include/cairo" )
set( CAIRO_LIBRARY "${CAIRO_ROOT}/lib/libcairo.a" )
set( CAIRO_INCLUDE_DIR "${CAIRO_ROOT}/include/cairo" )
set( CAIRO_LIBRARY "${CAIRO_ROOT}/lib/libcairo.a" )
add_dependencies( lib-dependencies boost )
add_dependencies( lib-dependencies cairo )
@@ -451,11 +534,13 @@ if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
add_dependencies( lib-dependencies pkgconfig )
if( KICAD_BUILD_DYNAMIC AND APPLE )
add_custom_target( osx_fix_bundles ALL DEPENDS cvpcb eeschema gerbview kicad pcbnew bitmap2component pcb_calculator pl_editor)
add_custom_command(TARGET osx_fix_bundles POST_BUILD COMMAND ${PROJECT_SOURCE_DIR}/scripts/osx_fixbundle.sh ${PROJECT_SOURCE_DIR} COMMENT "Migrating dylibs to bundles")
add_custom_target( osx_fix_bundles ALL DEPENDS
eeschema gerbview kicad pcbnew bitmap2component pcb_calculator pl_editor)
add_custom_command(TARGET osx_fix_bundles
POST_BUILD COMMAND ${PROJECT_SOURCE_DIR}/scripts/osx_fixbundle.sh ${PROJECT_SOURCE_DIR}
COMMENT "Migrating dylibs to bundles")
endif()
endif( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC)
endif()
#####################
# Find GLEW library #
@@ -483,48 +568,22 @@ if( KICAD_SKIP_BOOST )
message( FATAL_ERROR "Boost 1.54+ libraries are required." )
endif()
add_custom_target( boost ) # it is required to meet some further dependencies
# Keeps CMake from complaining about undefined boost dependencies even though Boost was
# found. Sigh!!!!!
add_custom_target( boost )
message( WARNING "
WARNING: You decided to skip building boost library.
KiCad developers strongly advise you to build the bundled boost library, as it is known to work with KiCad.
Other versions may contain bugs that may result in KiCad errors." )
else()
add_dependencies( lib-dependencies boost )
include( download_boost )
endif()
##########################
# Find wxWidgets library #
##########################
# Here you can define what libraries of wxWidgets you need for your
# application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
# See line 41 of CMakeModules/FindwxWidgets.cmake
set( wxWidgets_CONFIG_OPTIONS --static=no )
# On Apple only wxwidgets 2.9 or higher doesn't need to find aui part of base
# Seems no more needed on wx-3
if( APPLE AND ( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES OR KICAD_SCRIPTING_WXPYTHON) )
find_package( wxWidgets COMPONENTS gl adv html core net base xml QUIET )
else()
find_package( wxWidgets COMPONENTS gl aui adv html core net base xml QUIET )
endif()
if( NOT (KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC) )
check_find_package_result( wxWidgets_FOUND "wxWidgets" )
endif()
# Include wxWidgets macros.
include( ${wxWidgets_USE_FILE} )
# Include MinGW resource compiler.
include( MinGWResourceCompiler )
# Generate build system specific header file.
include( PerformFeatureChecks )
perform_feature_checks()
# Find GDI+ on windows if wxGraphicsContext is available.
if( MINGW AND USE_WX_GRAPHICS_CONTEXT )
find_package( GdiPlus )
@@ -554,16 +613,8 @@ set( INC_AFTER
# Find Python and other scripting resources
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
if( APPLE )
set( PYTHON_LIBRARY /System/Library/Frameworks/Python.framework/Versions/2.6/Python )
set( PYTHON_INCLUDE_DIR /System/Library/Frameworks/Python.framework/Versions//2.6/include/python2.6 )
set( PythonInterp_FIND_VERSION 2.6 )
set( PythonLibs_FIND_VERSION 2.6 )
endif()
# force a python version < 3.0
set( PythonInterp_FIND_VERSION 2.6)
set( PythonInterp_FIND_VERSION 2.6 )
set( PythonLibs_FIND_VERSION 2.6 )
find_package( PythonInterp )
@@ -573,25 +624,72 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
if( NOT PYTHON_VERSION_MAJOR EQUAL 2 )
message( FATAL_ERROR "Python 2.x is required." )
endif()
# Get the correct Python site package install path from the Python interpreter found by
# FindPythonInterp unless the user specifically defined a custom path.
if( NOT PYTHON_SITE_PACKAGE_PATH )
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib()"
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib(plat_specific=0, standard_lib=0, prefix='')"
OUTPUT_VARIABLE PYTHON_SITE_PACKAGE_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if( NOT PYTHON_SITE_PACKAGE_PATH )
message( FATAL_ERROR "Error occurred while attemping to find the Python site library path." )
message( FATAL_ERROR "Error occurred while attempting to find the Python site library path." )
endif()
endif()
set( PYTHON_DEST "${PYTHON_SITE_PACKAGE_PATH}" CACHE PATH "Python module install path." )
if( NOT APPLE )
set( PYTHON_DEST "${PYTHON_SITE_PACKAGE_PATH}"
CACHE PATH "Python module install path."
)
else()
# relative path for python in bundle
set( PYTHON_LIB_DIR "python/site-packages" )
# install into bundle Frameworks folder
set( PYTHON_DEST "${OSX_BUNDLE_BUILD_LIB_DIR}/${PYTHON_LIB_DIR}"
CACHE PATH "Python module install path."
)
endif()
mark_as_advanced( PYTHON_DEST )
message( STATUS "Python module install path: ${PYTHON_DEST}" )
find_package( PythonLibs 2.6 )
if( KICAD_SCRIPTING_WXPYTHON )
# Check to see if the correct version of wxPython is installed based on the version of
# wxWidgets found. At least the major an minor version should match.
set( _wxpy_version "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}" )
set( _py_cmd "import wxversion;print wxversion.checkInstalled('${_wxpy_version}')" )
# Add user specified Python site package path.
if( PYTHON_SITE_PACKAGE_PATH )
set( _py_cmd
"import sys;sys.path.insert(0, \"${PYTHON_SITE_PACKAGE_PATH}\");${_py_cmd}" )
endif()
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "${_py_cmd}"
RESULT_VARIABLE WXPYTHON_VERSION_RESULT
OUTPUT_VARIABLE WXPYTHON_VERSION_FOUND
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# message( STATUS "WXPYTHON_VERSION_FOUND: ${WXPYTHON_VERSION_FOUND}" )
# message( STATUS "WXPYTHON_VERSION_RESULT: ${WXPYTHON_VERSION_RESULT}" )
# Check to see if any version of wxPython is installed on the system.
if( WXPYTHON_VERSION_RESULT GREATER 0 )
message( FATAL_ERROR "wxPython does not appear to be installed on the system." )
endif()
if( NOT WXPYTHON_VERSION_FOUND STREQUAL "True" )
message( FATAL_ERROR
"wxPython version ${_wxpy_version} does not appear to be installed on the system." )
endif()
set( WXPYTHON_VERSION ${_wxpy_version} CACHE STRING "wxPython version found." )
message( STATUS "wxPython version ${_wxpy_version} found." )
endif()
#message( STATUS "PYTHON_INCLUDE_DIRS:${PYTHON_INCLUDE_DIRS}" )
# Infrequently needed headers go at end of search paths, append to INC_AFTER which
@@ -603,11 +701,6 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
endif()
# Automagically create version header file.
include( CreateBzrVersionHeader )
create_bzr_version_header()
if( EXISTS ${CMAKE_SOURCE_DIR}/include/config.h )
# This file may exist ( created by an alternate process to the svn test above),
# e.g. could be created by a checkout script that produces a source tar file.
@@ -622,6 +715,24 @@ endif()
# 'CMakeLists.txt' files to process
#================================================
if( APPLE )
# Remove app bundles in ${KICAD_BIN} before installing anything new.
# Must be defined before all includes so that it is executed first.
install( CODE "
message( STATUS \"Removing existing application bundles...\" )
# Remove links to standalone apps
file( REMOVE ${KICAD_BIN}/bitmap2component.app )
file( REMOVE ${KICAD_BIN}/eeschema.app )
file( REMOVE ${KICAD_BIN}/gerbview.app )
file( REMOVE ${KICAD_BIN}/pcb_calculator.app )
file( REMOVE ${KICAD_BIN}/pcbnew.app )
file( REMOVE ${KICAD_BIN}/pl_editor.app )
# Remove main bundle
file( REMOVE_RECURSE ${KICAD_BIN}/${OSX_BUNDLE_MAIN} )
" COMPONENT Runtime
)
endif()
############################
# Binaries ( CMake targets ) #
############################
@@ -651,7 +762,7 @@ add_subdirectory( qa )
# except perhaps bitmap lib. This allows a multi-threaded build to succeed.
add_dependencies( pcbnew boost )
add_dependencies( eeschema boost )
add_dependencies( cvpcb boost )
add_dependencies( cvpcb_kiface boost )
add_dependencies( gal boost )
add_dependencies( common boost )
add_dependencies( pcbcommon boost )
@@ -662,10 +773,10 @@ add_dependencies( pl_editor boost )
add_dependencies( pnsrouter boost )
if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
add_dependencies( pcbnew lib-dependencies )
add_dependencies( eeschema lib-dependencies )
add_dependencies( cvpcb lib-dependencies )
add_dependencies( cvpcb_kiface lib-dependencies )
add_dependencies( common lib-dependencies )
add_dependencies( gal lib-dependencies )
add_dependencies( pcbcommon lib-dependencies )
@@ -675,7 +786,7 @@ if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
add_dependencies( pnsrouter lib-dependencies )
endif()
if ( KICAD_BUILD_DYNAMIC )
if( KICAD_BUILD_DYNAMIC )
endif()
#############
@@ -707,6 +818,9 @@ else()
message( STATUS "WARNING: Doxygen not found - doxygen-docs (Source Docs) target not created" )
endif()
# Generate config.h.
configure_file( ${PROJECT_SOURCE_DIR}/CMakeModules/config.h.cmake
${CMAKE_BINARY_DIR}/config.h )
#================================================
# "make uninstall" rules
@@ -728,10 +842,6 @@ install( FILES INSTALL.txt
DESTINATION ${KICAD_DOCS}
COMPONENT resources )
install( FILES resources/freeroute.jnlp
DESTINATION ${KICAD_BIN}
COMPONENT resources )
###
# Install scripts
###
@@ -745,7 +855,7 @@ endif()
###
# FreeDesktop .desktop and MIME resources
###
if( UNIX )
if( UNIX AND NOT APPLE )
# Set paths
set( UNIX_MIME_DIR resources/linux/mime )
+36 -43
View File
@@ -2,7 +2,7 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2010 Wayne Stambaugh <stambaughw@verizon.net>
# Copyright (C) 2010 Kicad Developers, see AUTHORS.txt for contributors.
# Copyright (C) 2010-2015 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -22,7 +22,11 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
macro( create_bzr_version_header )
macro( create_bzr_version_header _bzr_src_path )
# If bzr is not found or an error occurs using the bzr commands to determine the repo
# version, set the build version string to "no-bzr"
set( KICAD_BUILD_VERSION "no-bzr" )
# Include Bazaar support to automagically create version header file.
find_package( Bazaar )
@@ -30,53 +34,42 @@ macro( create_bzr_version_header )
set( _Bazaar_SAVED_LC_ALL "$ENV{LC_ALL}" )
set( ENV{LC_ALL} C )
# Get the tree revison
execute_process( COMMAND
${Bazaar_EXECUTABLE} revno --tree ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE _bazaar_TREE_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
# Get the tree revision
execute_process(
COMMAND ${Bazaar_EXECUTABLE} revno --tree ${_bzr_src_path}
OUTPUT_VARIABLE _bzr_TREE_DATE
RESULT_VARIABLE _bzr_revno_result
OUTPUT_STRIP_TRAILING_WHITESPACE )
# Get more info about that revision
execute_process( COMMAND
${Bazaar_EXECUTABLE} log -r${_bazaar_TREE_DATE} ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE _bazaar_LAST_CHANGE_LOG
ERROR_VARIABLE _bazaar_log_error
RESULT_VARIABLE _bazaar_log_result
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( ${_bzr_revno_result} EQUAL 0 )
# Get more info about that revision
execute_process(
COMMAND ${Bazaar_EXECUTABLE} log -r${_bzr_TREE_DATE} ${_bzr_src_path}
OUTPUT_VARIABLE _bzr_LAST_CHANGE_LOG
ERROR_VARIABLE _bzr_log_error
RESULT_VARIABLE _bzr_log_result
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT ${_bzr_log_result} EQUAL 0 )
message(STATUS "Using <build_version.h> for version string.")
else( NOT ${_bzr_log_result} EQUAL 0 )
string( REGEX REPLACE "^(.*\n)?revno: ([^ \n]+).*"
"\\2" Kicad_REPO_REVISION "${_bazaar_LAST_CHANGE_LOG}" )
string( REGEX REPLACE "^(.*\n)?committer: ([^\n]+).*"
"\\2" Kicad_REPO_LAST_CHANGED_AUTHOR "${_bazaar_LAST_CHANGE_LOG}" )
string( REGEX REPLACE "^(.*\n)?timestamp: [a-zA-Z]+ ([^ \n]+).*"
"\\2" Kicad_REPO_LAST_CHANGED_DATE "${_bazaar_LAST_CHANGE_LOG}" )
endif( NOT ${_bzr_log_result} EQUAL 0 )
if( ${_bzr_log_result} EQUAL 0 )
string( REGEX REPLACE "^(.*\n)?revno: ([^ \n]+).*"
"\\2" Kicad_REPO_REVISION "${_bzr_LAST_CHANGE_LOG}" )
string( REGEX REPLACE "^(.*\n)?committer: ([^\n]+).*"
"\\2" Kicad_REPO_LAST_CHANGED_AUTHOR "${_bzr_LAST_CHANGE_LOG}" )
string( REGEX REPLACE "^(.*\n)?timestamp: [a-zA-Z]+ ([^ \n]+).*"
"\\2" Kicad_REPO_LAST_CHANGED_DATE "${_bzr_LAST_CHANGE_LOG}" )
endif()
endif()
set( ENV{LC_ALL} ${_Bazaar_SAVED_LC_ALL} )
endif( Bazaar_FOUND )
endif()
# Check to make sure 'bzr log' command did not fail. Otherwise fallback
# to version strings defined in "<kicad-src-dir>/include/build_version.h".
# Check to make sure 'bzr log' command did not fail. Otherwise, default
# to "no-bzr" as the revision.
if( Kicad_REPO_LAST_CHANGED_DATE )
string( REGEX REPLACE "^([0-9]+)\\-([0-9]+)\\-([0-9]+)" "\\1-\\2-\\3"
_kicad_bzr_date ${Kicad_REPO_LAST_CHANGED_DATE} )
_kicad_bzr_date ${Kicad_REPO_LAST_CHANGED_DATE} )
set( KICAD_BUILD_VERSION "(${_kicad_bzr_date} BZR ${Kicad_REPO_REVISION})" )
endif()
# Definition to conditionally use date and revision returned from the
# Bazaar log command instead of hand coded date and revision in
# "include/build_version.h". If Bazaar is not found then the date
# and version information must be manually edited.
# Directive means bzr build, program version and build version will
# reflect this.
add_definitions( -DHAVE_SVN_VERSION )
# Generate version.h.
configure_file( ${CMAKE_SOURCE_DIR}/CMakeModules/version.h.cmake
${CMAKE_BINARY_DIR}/version.h)
message( STATUS "Kicad Bazaar build version: ${KICAD_BUILD_VERSION}")
endif(Kicad_REPO_LAST_CHANGED_DATE)
endmacro(create_bzr_version_header)
set( KICAD_BUILD_VERSION ${KICAD_BUILD_VERSION} )
endmacro()
+105
View File
@@ -0,0 +1,105 @@
#
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2010 Wayne Stambaugh <stambaughw@verizon.net>
# Copyright (C) 2010-2015 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
macro( create_git_version_header _git_src_path )
# If bzr is not found or an error occurs using the git commands to determine the repo
# version, set the build version string to "no-git"
set( KICAD_BUILD_VERSION "no-git" )
# Include Git support to automagically create version header file.
find_package( Git )
if( GIT_FOUND )
set( _Git_SAVED_LC_ALL "$ENV{LC_ALL}" )
set( ENV{LC_ALL} C )
# Get latest commit hash
execute_process(
COMMAND
${GIT_EXECUTABLE} --no-pager log -1 HEAD
--pretty=format:%H
WORKING_DIRECTORY ${_git_src_path}
OUTPUT_VARIABLE _git_LONG_HASH
ERROR_VARIABLE _git_log_error
RESULT_VARIABLE _git_log_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
if( ${_git_log_result} EQUAL 0 )
execute_process(
COMMAND
${GIT_EXECUTABLE} --no-pager log -1 HEAD
--pretty=format:%h
WORKING_DIRECTORY ${_git_src_path}
OUTPUT_VARIABLE _git_SHORT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(
COMMAND
${GIT_EXECUTABLE} --no-pager log -1 HEAD
--pretty=format:%cn
WORKING_DIRECTORY ${_git_src_path}
OUTPUT_VARIABLE _git_LAST_COMITTER
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(
COMMAND
${GIT_EXECUTABLE} --no-pager log -1 HEAD
--pretty=format:%cd --date=short
WORKING_DIRECTORY ${_git_src_path}
OUTPUT_VARIABLE _git_LAST_CHANGE_LOG
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(
COMMAND
${GIT_EXECUTABLE} rev-list HEAD --count
--first-parent
WORKING_DIRECTORY ${_git_src_path}
OUTPUT_VARIABLE _git_SERIAL
OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Git hash: ${_git_LONG_HASH}")
if( ${_git_log_result} EQUAL 0 )
string( REGEX REPLACE "^(.*\n)?revno: ([^ \n]+).*"
"\\2" Kicad_REPO_REVISION "BZR ${_git_SERIAL}, Git ${_git_SHORT_HASH}" )
string( REGEX REPLACE "^(.*\n)?committer: ([^\n]+).*"
"\\2" Kicad_REPO_LAST_CHANGED_AUTHOR "${_git_LAST_COMITTER}")
string( REGEX REPLACE "^(.*\n)?timestamp: [a-zA-Z]+ ([^ \n]+).*"
"\\2" Kicad_REPO_LAST_CHANGED_DATE "${_git_LAST_CHANGE_LOG}")
endif()
endif()
set( ENV{LC_ALL} ${_Git_SAVED_LC_ALL} )
endif( GIT_FOUND )
# Check to make sure 'git' command did not fail. Otherwise fallback
# to "no-git" as the revision.
if( Kicad_REPO_LAST_CHANGED_DATE )
string( REGEX REPLACE "^([0-9]+)\\-([0-9]+)\\-([0-9]+)" "\\1-\\2-\\3"
_kicad_git_date ${Kicad_REPO_LAST_CHANGED_DATE} )
set( KICAD_BUILD_VERSION "(${_kicad_git_date} ${Kicad_REPO_REVISION})" )
endif()
set( KICAD_BUILD_VERSION ${KICAD_BUILD_VERSION} )
endmacro()
+9 -9
View File
@@ -54,28 +54,28 @@ if( Bazaar_EXECUTABLE )
# Fetch the Bazaar executable version.
execute_process( COMMAND ${Bazaar_EXECUTABLE} --version
OUTPUT_VARIABLE bzr_version_output
OUTPUT_VARIABLE _bzr_version_output
ERROR_VARIABLE _bzr_version_error
RESULT_VARIABLE _bzr_version_result
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( ${_bzr_version_result} EQUAL 0 )
set( Bazaar_FOUND TRUE )
string( REGEX REPLACE "^(.*\n)? \(bzr\) ([^\n]+).*"
"\\2" Bazaar_VERSION "${_bzr_version_output}" )
string( REGEX REPLACE "^[\n]*Bazaar \\(bzr\\) ([0-9.a-z]+).*"
"\\1" Bazaar_VERSION "${_bzr_version_output}" )
message( STATUS "Bazaar version control system version ${Bazaar_VERSION} found." )
endif( ${_bzr_version_result} EQUAL 0 )
endif()
# restore the previous LC_ALL
set( ENV{LC_ALL} ${_Bazaar_SAVED_LC_ALL} )
endif( Bazaar_EXECUTABLE )
endif()
if( NOT Bazaar_FOUND )
if( NOT Bazaar_FIND_QUIETLY )
message( STATUS "Bazaar version control command line client was not found." )
else( NOT Bazaar_FIND_QUIETLY )
else()
if( Bazaar_FIND_REQUIRED )
message( FATAL_ERROR "Bazaar version control command line client was not found." )
endif( Bazaar_FIND_REQUIRED )
endif( NOT Bazaar_FIND_QUIETLY )
endif( NOT Bazaar_FOUND )
endif()
endif()
endif()
+1
View File
@@ -33,6 +33,7 @@ IF (WIN32)
NAMES glew glew32 glew32s
PATHS
$ENV{GLEW_ROOT_PATH}/lib
$ENV{GLEW_ROOT_PATH}/lib/Release/Win32
${OPENGL_LIBRARY_DIR}
)
+342
View File
@@ -0,0 +1,342 @@
#.rst:
# FindOpenSSL
# -----------
#
# Try to find the OpenSSL encryption library
#
# Once done this will define
#
# ::
#
# OPENSSL_ROOT_DIR - Set this variable to the root installation of OpenSSL
#
#
#
# Read-Only variables:
#
# ::
#
# OPENSSL_FOUND - system has the OpenSSL library
# OPENSSL_INCLUDE_DIR - the OpenSSL include directory
# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
# OPENSSL_VERSION - This is set to $major.$minor.$revision$path (eg. 0.9.8s)
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
# Copyright 2009-2011 Mathieu Malaterre <mathieu.malaterre@gmail.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if (UNIX)
find_package(PkgConfig QUIET)
pkg_check_modules(_OPENSSL QUIET openssl)
endif ()
if (WIN32)
# http://www.slproweb.com/products/Win32OpenSSL.html
set(_OPENSSL_ROOT_HINTS
${OPENSSL_ROOT_DIR}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]"
ENV OPENSSL_ROOT_DIR
)
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
set(_OPENSSL_ROOT_PATHS
"${_programfiles}/OpenSSL"
"${_programfiles}/OpenSSL-Win32"
"${_programfiles}/OpenSSL-Win64"
"C:/OpenSSL/"
"C:/OpenSSL-Win32/"
"C:/OpenSSL-Win64/"
)
unset(_programfiles)
else ()
set(_OPENSSL_ROOT_HINTS
${OPENSSL_ROOT_DIR}
ENV OPENSSL_ROOT_DIR
)
endif ()
set(_OPENSSL_ROOT_HINTS_AND_PATHS
HINTS ${_OPENSSL_ROOT_HINTS}
PATHS ${_OPENSSL_ROOT_PATHS}
)
find_path(OPENSSL_INCLUDE_DIR
NAMES
openssl/ssl.h
${_OPENSSL_ROOT_HINTS_AND_PATHS}
HINTS
${_OPENSSL_INCLUDEDIR}
PATH_SUFFIXES
include
)
if(WIN32 AND NOT CYGWIN)
if(MSVC)
# /MD and /MDd are the standard values - if someone wants to use
# others, the libnames have to change here too
# use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
# TODO: handle /MT and static lib
# In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix:
# * MD for dynamic-release
# * MDd for dynamic-debug
# * MT for static-release
# * MTd for static-debug
# Implementation details:
# We are using the libraries located in the VC subdir instead of the parent directory eventhough :
# libeay32MD.lib is identical to ../libeay32.lib, and
# ssleay32MD.lib is identical to ../ssleay32.lib
find_library(LIB_EAY_DEBUG
NAMES
libeay32MDd
libeay32d
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
"VC"
"lib/VC"
)
find_library(LIB_EAY_RELEASE
NAMES
libeay32MD
libeay32
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
"VC"
"lib/VC"
)
find_library(SSL_EAY_DEBUG
NAMES
ssleay32MDd
ssleay32d
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
"VC"
"lib/VC"
)
find_library(SSL_EAY_RELEASE
NAMES
ssleay32MD
ssleay32
ssl
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
"VC"
"lib/VC"
)
set(LIB_EAY_LIBRARY_DEBUG "${LIB_EAY_DEBUG}")
set(LIB_EAY_LIBRARY_RELEASE "${LIB_EAY_RELEASE}")
set(SSL_EAY_LIBRARY_DEBUG "${SSL_EAY_DEBUG}")
set(SSL_EAY_LIBRARY_RELEASE "${SSL_EAY_RELEASE}")
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
select_library_configurations(LIB_EAY)
select_library_configurations(SSL_EAY)
mark_as_advanced(LIB_EAY_LIBRARY_DEBUG LIB_EAY_LIBRARY_RELEASE
SSL_EAY_LIBRARY_DEBUG SSL_EAY_LIBRARY_RELEASE)
set( OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} )
elseif(MINGW)
message( STATUS "Searching for OpenSSL in MinGW." )
# same player, for MinGW
set(LIB_EAY_NAMES libeay32)
set(SSL_EAY_NAMES ssleay32)
list(APPEND LIB_EAY_NAMES crypto)
list(APPEND SSL_EAY_NAMES ssl)
find_library(LIB_EAY
NAMES
${LIB_EAY_NAMES}
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
"lib/MinGW"
# Do not search system path. Otherwise the DLL will be found rather than the link library.
NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_SYSTEM_PATH
)
find_library(SSL_EAY
NAMES
${SSL_EAY_NAMES}
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
"lib/MinGW"
# Do not search system path. Otherwise the DLL will be found rather than the link library.
NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_SYSTEM_PATH
)
mark_as_advanced(SSL_EAY LIB_EAY)
set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} )
unset(LIB_EAY_NAMES)
unset(SSL_EAY_NAMES)
else()
# Not sure what to pick for -say- intel, let's use the toplevel ones and hope someone report issues:
find_library(LIB_EAY
NAMES
libeay32
${_OPENSSL_ROOT_HINTS_AND_PATHS}
HINTS
${_OPENSSL_LIBDIR}
PATH_SUFFIXES
lib
)
find_library(SSL_EAY
NAMES
ssleay32
${_OPENSSL_ROOT_HINTS_AND_PATHS}
HINTS
${_OPENSSL_LIBDIR}
PATH_SUFFIXES
lib
)
mark_as_advanced(SSL_EAY LIB_EAY)
set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} )
endif()
else()
find_library(OPENSSL_SSL_LIBRARY
NAMES
ssl
ssleay32
ssleay32MD
${_OPENSSL_ROOT_HINTS_AND_PATHS}
HINTS
${_OPENSSL_LIBDIR}
PATH_SUFFIXES
lib
)
find_library(OPENSSL_CRYPTO_LIBRARY
NAMES
crypto
${_OPENSSL_ROOT_HINTS_AND_PATHS}
HINTS
${_OPENSSL_LIBDIR}
PATH_SUFFIXES
lib
)
mark_as_advanced(OPENSSL_CRYPTO_LIBRARY OPENSSL_SSL_LIBRARY)
# compat defines
set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY})
set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
endif()
function(from_hex HEX DEC)
string(TOUPPER "${HEX}" HEX)
set(_res 0)
string(LENGTH "${HEX}" _strlen)
while (_strlen GREATER 0)
math(EXPR _res "${_res} * 16")
string(SUBSTRING "${HEX}" 0 1 NIBBLE)
string(SUBSTRING "${HEX}" 1 -1 HEX)
if (NIBBLE STREQUAL "A")
math(EXPR _res "${_res} + 10")
elseif (NIBBLE STREQUAL "B")
math(EXPR _res "${_res} + 11")
elseif (NIBBLE STREQUAL "C")
math(EXPR _res "${_res} + 12")
elseif (NIBBLE STREQUAL "D")
math(EXPR _res "${_res} + 13")
elseif (NIBBLE STREQUAL "E")
math(EXPR _res "${_res} + 14")
elseif (NIBBLE STREQUAL "F")
math(EXPR _res "${_res} + 15")
else()
math(EXPR _res "${_res} + ${NIBBLE}")
endif()
string(LENGTH "${HEX}" _strlen)
endwhile()
set(${DEC} ${_res} PARENT_SCOPE)
endfunction()
if (OPENSSL_INCLUDE_DIR)
if (_OPENSSL_VERSION)
set(OPENSSL_VERSION "${_OPENSSL_VERSION}")
elseif(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
# The version number is encoded as 0xMNNFFPPS: major minor fix patch status
# The status gives if this is a developer or prerelease and is ignored here.
# Major, minor, and fix directly translate into the version numbers shown in
# the string. The patch field translates to the single character suffix that
# indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so
# on.
message(STATUS "OPENSSL_VERSION_STR=${openssl_version_str}")
string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$"
"\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}")
list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR)
list(GET OPENSSL_VERSION_LIST 1 OPENSSL_VERSION_MINOR)
from_hex("${OPENSSL_VERSION_MINOR}" OPENSSL_VERSION_MINOR)
list(GET OPENSSL_VERSION_LIST 2 OPENSSL_VERSION_FIX)
from_hex("${OPENSSL_VERSION_FIX}" OPENSSL_VERSION_FIX)
list(GET OPENSSL_VERSION_LIST 3 OPENSSL_VERSION_PATCH)
if (NOT OPENSSL_VERSION_PATCH STREQUAL "00")
from_hex("${OPENSSL_VERSION_PATCH}" _tmp)
# 96 is the ASCII code of 'a' minus 1
math(EXPR OPENSSL_VERSION_PATCH_ASCII "${_tmp} + 96")
unset(_tmp)
# Once anyone knows how OpenSSL would call the patch versions beyond 'z'
# this should be updated to handle that, too. This has not happened yet
# so it is simply ignored here for now.
string(ASCII "${OPENSSL_VERSION_PATCH_ASCII}" OPENSSL_VERSION_PATCH_STRING)
endif ()
set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH_STRING}")
endif ()
endif ()
include(FindPackageHandleStandardArgs)
if (OPENSSL_VERSION)
find_package_handle_standard_args(OpenSSL
REQUIRED_VARS
OPENSSL_LIBRARIES
OPENSSL_INCLUDE_DIR
VERSION_VAR
OPENSSL_VERSION
FAIL_MESSAGE
"Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR"
)
else ()
find_package_handle_standard_args(OpenSSL "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR"
OPENSSL_LIBRARIES
OPENSSL_INCLUDE_DIR
)
endif ()
mark_as_advanced(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
@@ -1,260 +0,0 @@
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
#
# This function is intended to be used in FindXXX.cmake modules files.
# It handles the REQUIRED, QUIET and version-related arguments to FIND_PACKAGE().
# It also sets the <UPPERCASED_NAME>_FOUND variable.
# The package is considered found if all variables <var1>... listed contain
# valid results, e.g. valid filepaths.
#
# There are two modes of this function. The first argument in both modes is
# the name of the Find-module where it is called (in original casing).
#
# The first simple mode looks like this:
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
# If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND
# will be set to TRUE.
# If DEFAULT_MSG is given as second argument, then the function will generate
# itself useful success and error messages. You can also supply a custom error message
# for the failure case. This is not recommended.
#
# The second mode is more powerful and also supports version checking:
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
# [VERSION_VAR <versionvar>
# [CONFIG_MODE]
# [FAIL_MESSAGE "Custom failure message"] )
#
# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND
# will be set to TRUE.
# After REQUIRED_VARS the variables which are required for this package are listed.
# Following VERSION_VAR the name of the variable can be specified which holds
# the version of the package which has been found. If this is done, this version
# will be checked against the (potentially) specified required version used
# in the find_package() call. The EXACT keyword is also handled. The default
# messages include information about the required version and the version
# which has been actually found, both if the version is ok or not.
# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for
# a find_package(... NO_MODULE) call, in this case all the information
# provided by the config-mode of find_package() will be evaluated
# automatically.
# Via FAIL_MESSAGE a custom failure message can be specified, if this is not
# used, the default message will be displayed.
#
# Example for mode 1:
#
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
#
# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
# independent whether QUIET was used or not.
# If it is found, success will be reported, including the content of <var1>.
# On repeated Cmake runs, the same message won't be printed again.
#
# Example for mode 2:
#
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON REQUIRED_VARS BISON_EXECUTABLE
# VERSION_VAR BISON_VERSION)
# In this case, BISON is considered to be found if the variable(s) listed
# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case.
# Also the version of BISON will be checked by using the version contained
# in BISON_VERSION.
# Since no FAIL_MESSAGE is given, the default messages will be printed.
#
# Another example for mode 2:
#
# FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4 CONFIG_MODE)
# In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE)
# and adds an additional search directory for automoc4.
# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
# success/error message.
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
INCLUDE(FindPackageMessage)
INCLUDE(CMakeParseArguments)
# internal helper macro
MACRO(_FPHSA_FAILURE_MESSAGE _msg)
IF (${_NAME}_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${_msg}")
ELSE (${_NAME}_FIND_REQUIRED)
IF (NOT ${_NAME}_FIND_QUIETLY)
MESSAGE(STATUS "${_msg}")
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
ENDIF (${_NAME}_FIND_REQUIRED)
ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg)
# internal helper macro to generate the failure message when used in CONFIG_MODE:
MACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
# <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
IF(${_NAME}_CONFIG)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
ELSE(${_NAME}_CONFIG)
# If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
# List them all in the error message:
IF(${_NAME}_CONSIDERED_CONFIGS)
SET(configsText "")
LIST(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
MATH(EXPR configsCount "${configsCount} - 1")
FOREACH(currentConfigIndex RANGE ${configsCount})
LIST(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
LIST(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
SET(configsText "${configsText} ${filename} (version ${version})\n")
ENDFOREACH(currentConfigIndex)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
ELSE(${_NAME}_CONSIDERED_CONFIGS)
# Simple case: No Config-file was found at all:
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
ENDIF(${_NAME}_CONSIDERED_CONFIGS)
ENDIF(${_NAME}_CONFIG)
ENDMACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
# new extended or in the "old" mode:
SET(options CONFIG_MODE)
SET(oneValueArgs FAIL_MESSAGE VERSION_VAR)
SET(multiValueArgs REQUIRED_VARS)
SET(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} )
LIST(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
IF(${INDEX} EQUAL -1)
SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
SET(FPHSA_REQUIRED_VARS ${ARGN})
SET(FPHSA_VERSION_VAR)
ELSE(${INDEX} EQUAL -1)
CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN})
IF(FPHSA_UNPARSED_ARGUMENTS)
MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
ENDIF(FPHSA_UNPARSED_ARGUMENTS)
IF(NOT FPHSA_FAIL_MESSAGE)
SET(FPHSA_FAIL_MESSAGE "DEFAULT_MSG")
ENDIF(NOT FPHSA_FAIL_MESSAGE)
ENDIF(${INDEX} EQUAL -1)
# now that we collected all arguments, process them
IF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
# In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
# when it successfully found the config-file, including version checking:
IF(FPHSA_CONFIG_MODE)
LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
SET(FPHSA_VERSION_VAR ${_NAME}_VERSION)
ENDIF(FPHSA_CONFIG_MODE)
IF(NOT FPHSA_REQUIRED_VARS)
MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
ENDIF(NOT FPHSA_REQUIRED_VARS)
LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
STRING(TOUPPER ${_NAME} _NAME_UPPER)
STRING(TOLOWER ${_NAME} _NAME_LOWER)
# collect all variables which were not found, so they can be printed, so the
# user knows better what went wrong (#6375)
SET(MISSING_VARS "")
SET(DETAILS "")
SET(${_NAME_UPPER}_FOUND TRUE)
# check if all passed variables are valid
FOREACH(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
IF(NOT ${_CURRENT_VAR})
SET(${_NAME_UPPER}_FOUND FALSE)
SET(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
ELSE(NOT ${_CURRENT_VAR})
SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
ENDIF(NOT ${_CURRENT_VAR})
ENDFOREACH(_CURRENT_VAR)
# version handling:
SET(VERSION_MSG "")
SET(VERSION_OK TRUE)
SET(VERSION ${${FPHSA_VERSION_VAR}} )
IF (${_NAME}_FIND_VERSION)
IF(VERSION)
IF(${_NAME}_FIND_VERSION_EXACT) # exact version required
IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
SET(VERSION_OK FALSE)
ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
SET(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
ELSE(${_NAME}_FIND_VERSION_EXACT) # minimum version specified:
IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
SET(VERSION_OK FALSE)
ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
SET(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")")
ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
ENDIF(${_NAME}_FIND_VERSION_EXACT)
ELSE(VERSION)
# if the package was not found, but a version was given, add that to the output:
IF(${_NAME}_FIND_VERSION_EXACT)
SET(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
ELSE(${_NAME}_FIND_VERSION_EXACT)
SET(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
ENDIF(${_NAME}_FIND_VERSION_EXACT)
ENDIF(VERSION)
ELSE (${_NAME}_FIND_VERSION)
IF(VERSION)
SET(VERSION_MSG "(found version \"${VERSION}\")")
ENDIF(VERSION)
ENDIF (${_NAME}_FIND_VERSION)
IF(VERSION_OK)
SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
ELSE(VERSION_OK)
SET(${_NAME_UPPER}_FOUND FALSE)
ENDIF(VERSION_OK)
# print the result:
IF (${_NAME_UPPER}_FOUND)
FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG}" "${DETAILS}")
ELSE (${_NAME_UPPER}_FOUND)
IF(FPHSA_CONFIG_MODE)
_FPHSA_HANDLE_FAILURE_CONFIG_MODE()
ELSE(FPHSA_CONFIG_MODE)
IF(NOT VERSION_OK)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
ELSE(NOT VERSION_OK)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
ENDIF(NOT VERSION_OK)
ENDIF(FPHSA_CONFIG_MODE)
ENDIF (${_NAME_UPPER}_FOUND)
SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG)
+57
View File
@@ -0,0 +1,57 @@
#.rst:
# FindPackageMessage
# ------------------
#
#
#
# FIND_PACKAGE_MESSAGE(<name> "message for user" "find result details")
#
# This macro is intended to be used in FindXXX.cmake modules files. It
# will print a message once for each unique find result. This is useful
# for telling the user where a package was found. The first argument
# specifies the name (XXX) of the package. The second argument
# specifies the message to display. The third argument lists details
# about the find result so that if they change the message will be
# displayed again. The macro also obeys the QUIET argument to the
# find_package command.
#
# Example:
#
# ::
#
# if(X11_FOUND)
# FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
# "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
# else()
# ...
# endif()
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
function(FIND_PACKAGE_MESSAGE pkg msg details)
# Avoid printing a message repeatedly for the same find result.
if(NOT ${pkg}_FIND_QUIETLY)
string(REGEX REPLACE "[\n]" "" details "${details}")
set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
# The message has not yet been printed.
message(STATUS "${msg}")
# Save the find details in the cache to avoid printing the same
# message again.
set("${DETAILS_VAR}" "${details}"
CACHE INTERNAL "Details about finding ${pkg}")
endif()
endif()
endfunction()
+4 -4
View File
@@ -91,7 +91,7 @@ unset(_PYTHON3_VERSIONS)
# Search for newest python version if python executable isn't found
if(NOT PYTHON_EXECUTABLE)
# If using the MINGW compiler, we mustn't find the standard python
# distribution because of multiple C-Runtime errors. We must instead
# use the Python-a-mingw-us distribution
@@ -110,7 +110,7 @@ if(NOT PYTHON_EXECUTABLE)
else()
list( APPEND _Python_PPATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] )
endif()
foreach(_CURRENT_VERSION ${_Python_VERSIONS})
set(_Python_NAMES python${_CURRENT_VERSION})
if(WIN32)
@@ -169,7 +169,7 @@ endif()
# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
# all listed variables are TRUE
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING)
mark_as_advanced(PYTHON_EXECUTABLE)
+31 -47
View File
@@ -37,9 +37,10 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindFrameworks.cmake)
include(CMakeFindFrameworks)
# Search for the python framework on Apple.
CMAKE_FIND_FRAMEWORKS(Python)
cmake_find_frameworks(Python)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
@@ -86,32 +87,25 @@ unset(_PYTHON3_VERSIONS)
foreach(_CURRENT_VERSION ${_Python_VERSIONS})
string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
if(WIN32)
if(MINGW)
find_library(PYTHON_DEBUG_LIBRARY
NAMES python{$_CURRENT_VERSION}_d
PATHS
"${PYTHON_ROOT_DIR}"
"C:/python/${_CURRENT_VERSION}.9"
"C:/python/${_CURRENT_VERSION}.8"
"C:/python/${_CURRENT_VERSION}.7"
"C:/python/${_CURRENT_VERSION}.6"
"C:/python/${_CURRENT_VERSION}.5"
"C:/python/${_CURRENT_VERSION}.4"
"C:/python/${_CURRENT_VERSION}.3"
"C:/python/${_CURRENT_VERSION}.2"
"C:/python/${_CURRENT_VERSION}.1"
"C:/python/${_CURRENT_VERSION}.0"
"c:/python${_CURRENT_VERSION}"
"c:/python${_CURRENT_VERSION_NO_DOTS}"
NO_SYSTEM_ENVIRONMENT_PATH
)
)
else()
find_library(PYTHON_DEBUG_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
)
endif()
endif()
@@ -121,26 +115,20 @@ foreach(_CURRENT_VERSION ${_Python_VERSIONS})
NAMES python${_CURRENT_VERSION}
PATHS
"${PYTHON_ROOT_DIR}"
"C:/python/${_CURRENT_VERSION}.9"
"C:/python/${_CURRENT_VERSION}.8"
"C:/python/${_CURRENT_VERSION}.7"
"C:/python/${_CURRENT_VERSION}.6"
"C:/python/${_CURRENT_VERSION}.5"
"C:/python/${_CURRENT_VERSION}.4"
"C:/python/${_CURRENT_VERSION}.3"
"C:/python/${_CURRENT_VERSION}.2"
"C:/python/${_CURRENT_VERSION}.1"
"C:/python/${_CURRENT_VERSION}.0"
"C:/python"
PATH_SUFFIXES
${_CURRENT_VERSION}
${_CURRENT_VERSION_NO_DOTS}
NO_SYSTEM_ENVIRONMENT_PATH
)
else()
find_library(PYTHON_LIBRARY
NAMES
python${_CURRENT_VERSION_NO_DOTS}
python${_CURRENT_VERSION}mu
python${_CURRENT_VERSION}m
python${_CURRENT_VERSION}u
python${_CURRENT_VERSION}
python${_CURRENT_VERSION_NO_DOTS}
python${_CURRENT_VERSION}mu
python${_CURRENT_VERSION}m
python${_CURRENT_VERSION}u
python${_CURRENT_VERSION}
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
@@ -158,7 +146,6 @@ foreach(_CURRENT_VERSION ${_Python_VERSIONS})
PATH_SUFFIXES python${_CURRENT_VERSION}/config
)
# For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
# PYTHON_INCLUDE_DIR is not set.
if(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
@@ -167,6 +154,7 @@ foreach(_CURRENT_VERSION ${_Python_VERSIONS})
endif()
set(PYTHON_FRAMEWORK_INCLUDES)
if(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
foreach(dir ${Python_FRAMEWORKS})
set(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES}
@@ -178,17 +166,13 @@ foreach(_CURRENT_VERSION ${_Python_VERSIONS})
find_path(PYTHON_INCLUDE_DIR
NAMES Python.h
PATHS
"${PYTHON_ROOT_DIR}/include"
"C:/python/${_CURRENT_VERSION}.9/include"
"C:/python/${_CURRENT_VERSION}.8/include"
"C:/python/${_CURRENT_VERSION}.7/include"
"C:/python/${_CURRENT_VERSION}.6/include"
"C:/python/${_CURRENT_VERSION}.5/include"
"C:/python/${_CURRENT_VERSION}.4/include"
"C:/python/${_CURRENT_VERSION}.3/include"
"C:/python/${_CURRENT_VERSION}.2/include"
"C:/python/${_CURRENT_VERSION}.1/include"
"C:/python/${_CURRENT_VERSION}.0/include"
"${PYTHON_ROOT_DIR}"
"C:/python${_CURRENT_VERSION}"
"C:/python${_CURRENT_VERSION_NOT_DOTS}"
PATH_SUFFIXES
include
python${_CURRENT_VERSION}
python${_CURRENT_VERSION_NOT_DOTS}
)
else()
find_path(PYTHON_INCLUDE_DIR
@@ -239,14 +223,14 @@ set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
set(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}")
set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
SELECT_LIBRARY_CONFIGURATIONS(PYTHON)
select_library_configurations(PYTHON)
# SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library.
# Unset this, this prefix doesn't match the module prefix, they are different
# for historical reasons.
unset(PYTHON_FOUND)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PythonLibs
REQUIRED_VARS PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS
VERSION_VAR PYTHONLIBS_VERSION_STRING)
File diff suppressed because it is too large Load Diff
+3 -5
View File
@@ -83,6 +83,9 @@ macro( perform_feature_checks )
check_symbol_exists( strncasecmp "strings.h" HAVE_STRNCASECMP )
check_symbol_exists( strtok_r "string.h" HAVE_STRTOKR )
check_cxx_symbol_exists( strcasecmp "string.h" HAVE_STRCASECMP )
check_cxx_symbol_exists( strncasecmp "string.h" HAVE_STRNCASECMP )
# Some platforms define malloc and free in malloc.h instead of stdlib.h.
check_symbol_exists( malloc "stdlib.h" MALLOC_IN_STDLIB_H )
@@ -109,9 +112,4 @@ macro( perform_feature_checks )
# getc() on platforms where getc_unlocked() doesn't exist.
check_symbol_exists( getc_unlocked "stdio.h" HAVE_FGETC_NOLOCK )
# Generate config.h.
configure_file( ${PROJECT_SOURCE_DIR}/CMakeModules/config.h.cmake
${CMAKE_BINARY_DIR}/config.h
)
endmacro( perform_feature_checks )
+3 -7
View File
@@ -374,14 +374,10 @@ const char* ${LEXERCLASS}::TokenName( T aTok )
{
const char* ret;
if( (unsigned) aTok < keyword_count )
{
ret = keywords[aTok].name;
}
else if( aTok < 0 )
{
if( aTok < 0 )
ret = DSNLEXER::Syntax( aTok );
}
else if( (unsigned) aTok < keyword_count )
ret = keywords[aTok].name;
else
ret = \"token too big\";
+87
View File
@@ -0,0 +1,87 @@
#
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2015 Wayne Stambaugh <stambaughw@verizon.net>
# Copyright (C) 2015 KiCad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
# Automagically create version header file if the version string was not defined during
# the build configuration. If CreateBzrVersionHeader or CreateGitVersionHeader cannot
# determine the current repo version, a version.h file is still created with
# KICAD_BUILD_VERSION set to "no-vcs-found".
if( NOT KICAD_BUILD_VERSION )
set( _wvh_version_str "no-vcs-found" )
# Detect the appropiate VCS and set the version string.
if( EXISTS "${SRC_PATH}/.bzr" )
message( STATUS "Using Bazaar to determine build version string." )
include( ${CMAKE_MODULE_PATH}/CreateBzrVersionHeader.cmake )
create_bzr_version_header( ${SRC_PATH} )
set( _wvh_version_str ${KICAD_BUILD_VERSION} )
elseif( EXISTS "${SRC_PATH}/.git" )
message( STATUS "Using Git to determine build version string." )
include( ${CMAKE_MODULE_PATH}/CreateGitVersionHeader.cmake )
create_git_version_header( ${SRC_PATH} )
set( _wvh_version_str ${KICAD_BUILD_VERSION} )
endif()
else()
set( _wvh_version_str ${KICAD_BUILD_VERSION} )
endif()
set( _wvh_write_version_file ON )
# Compare the version argument against the version in the existing header file for a mismatch.
if( EXISTS ${OUTPUT_FILE} )
file( STRINGS ${OUTPUT_FILE} _current_version_str
REGEX "^#define[\t ]+KICAD_BUILD_VERSION[\t ]+.*" )
string( REGEX REPLACE "^#define KICAD_BUILD_VERSION \"([()a-zA-Z0-9 -.]+)\".*"
"\\1" _wvh_last_version "${_current_version_str}" )
# No change, do not write version.h
if( _wvh_version_str STREQUAL _wvh_last_version )
message( STATUS "Not updating ${OUTPUT_FILE}" )
set( _wvh_write_version_file OFF )
endif()
endif()
if( _wvh_write_version_file )
message( STATUS "Writing ${OUTPUT_FILE} file with version: ${_wvh_version_str}" )
file( WRITE ${OUTPUT_FILE}
"/* Do not modify this file, it was automatically generated by CMake. */
/*
* Define the KiCad build version string.
*/
#ifndef __KICAD_VERSION_H__
#define __KICAD_VERSION_H__
#define KICAD_BUILD_VERSION \"${_wvh_version_str}\"
#endif /* __KICAD_VERSION_H__ */
"
)
endif()
# There should always be a valid version.h file. Otherwise, the build will fail.
if( NOT EXISTS ${OUTPUT_FILE} )
message( FATAL_ERROR "Configuration failed to write file ${OUTPUT_FILE}." )
endif()
+6 -4
View File
@@ -58,11 +58,13 @@
/// The legacy file format revision of the *.brd file created by this build
#define LEGACY_BOARD_FILE_VERSION 2
/// The install prefix defined in CMAKE_INSTALL_PREFIX.
#define DEFAULT_INSTALL_PATH "@CMAKE_INSTALL_PREFIX@"
/// The install prefix defined during CMake configuration or fall back to CMAKE_INSTALL_PREFIX.
#define DEFAULT_INSTALL_PATH "@DEFAULT_INSTALL_PATH@"
/// Default footprint library install path when installed with `make install`.
#define DEFAULT_FP_LIB_PATH "@KICAD_FP_LIB_INSTALL_PATH@"
/// The wxPython version found during configuration.
#if defined( KICAD_SCRIPTING_WXPYTHON )
#define WXPYTHON_VERSION "@WXPYTHON_VERSION@"
#endif
/// When defined, build the GITHUB_PLUGIN for pcbnew.
#cmakedefine BUILD_GITHUB_PLUGIN
+8 -5
View File
@@ -140,11 +140,8 @@ endif()
if( APPLE )
# I set this to being compatible with wxWidgets
# wxWidgets still using libstdc++ (gcc), meanwhile OSX
# has switched to libc++ (llvm) by default
set( BOOST_CXXFLAGS "cxxflags=-mmacosx-version-min=10.5 -fno-common" )
set( BOOST_LINKFLAGS "linkflags=-mmacosx-version-min=10.5 -fno-common" )
set( BOOST_CXXFLAGS "cxxflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -fno-common" )
set( BOOST_LINKFLAGS "linkflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -fno-common" )
set( BOOST_TOOLSET "toolset=darwin" )
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
@@ -219,6 +216,8 @@ ExternalProject_Add( boost
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_macosx_older_openssl.patch" #https://svn.boost.org/trac/boost/ticket/9273
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_mingw.patch" #https://svn.boost.org/trac/boost/ticket/7262
COMMAND ${PATCH_STR_CMD} "${PROJECT_SOURCE_DIR}/patches/boost_mingw64_interlocked.patch"
# tell bzr about "added" files by last patch:
COMMAND bzr add libs/context/src/asm/make_i386_ms_pe_gas.S
COMMAND bzr add libs/context/src/asm/jump_i386_ms_pe_gas.S
@@ -312,6 +311,10 @@ ExternalProject_Add_Step( boost bzr_add_boost
ExternalProject_Add_Step( boost bzr_init_boost
COMMAND bzr init -q <SOURCE_DIR>
#creates a .bzrignore file in boost root dir, to avoid copying useless files
#moreover these files have a very very long name, and sometimes
#have a too long full file name to be handled by DOS commands
COMMAND echo "*.htm*" > ${PREFIX}/src/boost/.bzrignore
COMMENT "creating 'boost scratch repo' specifically for boost to track boost patches"
DEPENDERS bzr_add_boost
DEPENDEES download
-13
View File
@@ -1,13 +0,0 @@
/* Do not modify this file, it was automatically generated by CMake. */
/*
* Define the current source code Subversion commit number. The version
* string defined below does not update automatically when building the
* source with make. Run make rebuild_cache to update version strings.
*/
#ifndef __KICAD_SVN_VERSION_H__
#define __KICAD_SVN_VERSION_H__
#cmakedefine KICAD_BUILD_VERSION "@KICAD_BUILD_VERSION@"
#endif /* __KICAD_SVN_VERSION_H__ */
-354
View File
@@ -1,354 +0,0 @@
Note that the GPL below is copyrighted by the Free Software
Foundation, but the instance of code that it refers to (KiCad)
is copyrighted by the KiCad developers, those who actually wrote it.
The various CHANGELOG*.txt files and more importantly the Bazaar
repository contain a record of who wrote what.
Also note that the only valid version of the GPL as far as KiCad
is concerned is _this_ particular version of the license (ie v2, not
v2.2 or v3.x or whatever), unless explicitly otherwise stated.
Dick Hollenbeck
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
-216
View File
@@ -1,216 +0,0 @@
Compiling KiCad from Source
===========================
KiCad Documentation Team
Last revised on 12-mars-2012 by jp Charras
Introduction
------------
This is a generic guide how to compile kicad from scratch. On windows and linux.
If you need something more distribution specific or the experimental mac-osx port
read the other documents in the Documentation/compiling folder.
Installation of Tools
---------------------
On windows:
Get msys and mingw here:
http://mingw.org/
msys sets up a development environment that allows the bash shell to run.
mingw are a set of tools that run on windows or under msys. You will need
at least the following mingw packages: make, gcc, g++, binutils, autoconf, and
automake.
On linux:
Install "mesa". Use your package manager to install the
development libaries.
After a fresh install you need the following packages to compile and run
KiCad from source.
* bzr - Bazaar version control system
* CMake - Cross-platform make
* GLUT - The OpenGL Utility Library
* GLEW
* wxGTK or wxWidgets - The wxWidgets GUI toolkit with GTK+ bindings
* libbz2 (dev)
* libcairo (dev)
* Boost - Collection of portable C++ source libraries
boost will be automagically downloaded, copied in kicad sources tree and patched,
the first time you compile kicad.
Useful, but not required:
* Doxygen - Documentation system for several programming languages
Required to build Kicad with scripting (using python) support:
Python
Swig
KiCad uses the Bazaar version control system to track source code changes,
and download the boost libraries needed by Kicad.
Be sure you bzr install also includes bzrtools.
boost libraries will be downloaded the first time you build Kicad.
Compiler and basic development tools
-------------
Make sure g++, make and other tools are in your path.
If windows, then try running g++ and make from within your msys bash shell.
PLEASE NOTE: g++ 4.7.1 at least (possibly the 4.7.x series) is known to
miscompile pcbnew (it get zones wrong) with -O2; using -O1 is a suitable
workaround until they fix the compiler.
Install or Build wxWidgets
--------------------------
WARNING:
see wxWidgets_patch_notes.txt for patches and issues in wxWidgets.
On Windows, download
http://sourceforge.net/projects/wxwindows/files/3.0.0/wxWidgets-3.0.0.zip/download
or a newer version.
Do NOT use previous versions which all have annoying issues for KiCad.
Start msys so you have a bash shell.
Note also since 2.9 versions no need to build a "debug" version of the wxWidgets library,
the release and the debug version are same.
Unzip the wxWidgets zip file into the build directory. Change directories into
there, and then:
mkdir Release
cd Release
../configure --with-opengl
make
and under Linux, but not under Windows:
sudo make install that install wxWidgets libs and headers in /usr/local/
On linux, yo can also download wxWidgets 3.0 (recommandedd)
or you can use your package manager to install the
development versions of the wxWidgets packages which include the C++ headers.
The recommended way is to build wxWidgets from source, and use wxWidgets 3.0
or more recent (Older versions have a print function which does not work).
Verify that wx-config is in your path by running it from a command prompt.
Linux users then go to next step.
Install CMake
-------------
On windows, download the installation binary for windows from cmake.org.
Install that and choose to add cmake to your path during installation. You
will have to restart your command shell for the new path to take effect.
Verify that cmake is in your path by trying to run it from a command prompt.
On linux, use your package manager to install cmake. You should get cmake 2.8.4
or later. If only an older one is available in your package repository, build
cmake from source. Verify that cmake is in your path by trying to run it from a
command prompt.
Obtain Sources
--------------
You can use the Launchpad repository or a tar file for this. See the wiki.
To download files from Launchpad repository, you should install bazaar (bzr) that is a
version control system like subversion, mercurial, git...
Launchpad repository handle 2 branches for KiCda sources:
- a product branch (used by developers, which is most of time usable in production)
- a stable branch (a copy of the testing branch,
when the product branch is a stable state))
Remarks:
- The product branch is actively maintained
- From the product branch, you can go back to any previous version, using bzr features
- The stable branch is poorly or not maintained (and could be removed)
In order to have a working Kicad installtion, you need
- sources to build binaries
- libraries (they are not included in sources)
- documentation and translations (they are not included in sources)
product branch:
bzr branch lp:kicad kicad_src
Stable branch:
bzr branch lp:kicad/stable kicad_src
Components and Footprints libraries
all (schematic libs, 3D shapes ...) but new footprints libraries (use Download zip tool)
https://github.com/KiCad/kicad-library/
New footprints libraries (use Download zip tool for each lib you want)
https://github.com/KiCad/ for footprint libs (*.pretty folders)
A mirror of github is available, using bzr:
(schematic libs, 3D shapes ... all but new footprints libraries)
bzr checkout lp:~kicad-product-committers/kicad/library
Old legacy libraries:
bzr checkout lp:~dickelbeck/kicad/library-read-only
Note also Kicad is able to read on github.com/KiCad/ the *.pretty folders
without download, using github plugin.
(however the time to read them can be long)
Documentation and translations:
bzr branch lp:~kicad-developers/kicad/doc kicad_doc
Create Makefiles with CMake
---------------------------
On windows, go into your msys shell.
Linux and windows users both then make two "out of source" build directories:
cd <kicadSource>
mkdir -p build/release
mkdir build/debug (if you want a debug version of KiCad)
cd build/release
On either cmake command line shown below, you can optionally include
-DCMAKE_INSTALL_PREFIX=<finallInstallDir>
On windows, run the following command:
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DwxWidgets_ROOT_DIR=<wxInstallDir> ../../
On linux, run instead the following command:
cmake -DCMAKE_BUILD_TYPE=Release ../../
Take a look at CMakeCache.txt, and in particular CMAKE_INSTALL_PREFIX, which
gives the final install directory. If not what you want, edit it with a text
editor and re-run the same cmake command again, but with no
-DCMAKE_INSTALL_PREFIX given on the command line.
Compiling with Make
------------------~
You compile Kicad here. You will only need to do step 8) again when one of the
CMakeLists.txt files change. If windows, you must be in your msys shell.
On either platform then:
cd <kicadSource>/build/release
make
[sudo] make install
You are now done unless you want to make a Debug build.
Compiling a Debug version
-------------------------
cd <kicadSource>/build/debug
On either cmake command line shown below, you can optionally include
-DCMAKE_INSTALL_PREFIX=<finallInstallDir> before the final ../../ argument.
Although normally you do not install the Debug binaries, you can debug them
where they were built.
On windows, run the following command:
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug -DwxWidgets_ROOT_DIR=<wxInstallDir> ../../
where <wxInstallDir> is <wxWidgets path>/Release
On linux, run instead the following command:
cmake -DCMAKE_BUILD_TYPE=Debug -DwxWidgets_USE_DEBUG=ON ../../
Make the Debug binaries:
make
See Documentation/compiling/build-config.txt for a list of all CMake options
available when compiling KiCad.
-223
View File
@@ -1,223 +0,0 @@
Bazaar
======
KiCad uses the Bazaar version control system to track source code changes,
and download the boost libraries needed by Kicad.
The easiest way to get a copy of the KiCad source is to use Bazaar.
Bazaar can be download from http://wiki.bazaar.canonical.com.
Your best bet is to use the stand alone version of Bazaar
(which includes bzrtools, needed by Kicad) rather than one of
the Python specific versions.
Be sure bzrtools is also installed.
boost libraries will be downloaded the first time you build Kicad.
CMake
=====
KiCad uses CMake to generate the build files specific for the target platform
specified by the developer. This document attempts to define some of the more
common CMake and KiCad build configuration settings. You can use CMake either
by the command CMake on or the graphical version ccmake. This document only
documents a very small subset of the total CMake documentation For all of the
gory details, please see the complete CMake documentation at:
http://www.cmake.org/cmake/help/documentation.html.
Useful CMake Build Settings.
============================
This section defines some of the more common CMake build configuration setting
used when configuring KiCad. These settings are valid for all projects that
use CMake.
Changing the Build Generator.
-----------------------------
CMake attempts to create the project build system based on the platform. On
Posix systems CMake will create Unix Makefiles to build KiCad. On Windows
systems CMake will attempt to find the latest version of Visual C++ installed
on the system and create the appropriate project files. This behavior can be
changed by specifying the project generator using the -G "Project Generator"
switch on the command line. Please note, only a small subset of these project
generators are supported. If you want to use Eclipse on Linux to build KiCad,
you may be in for a lot of work.
CMAKE_BUILD_TYPE (Release/Debug/RelWithDebInfo/MinSizeRel)
----------------------------------------------------------
Default: Release
When configuring the KiCad build for the command line you must specify build
type. To create a debug build, set CMAKE_BUILD_TYPE to Debug. To create a
release build, set CMAKE_BUILD_TYPE to Release. See the CMake documentation
for other build types. For IDE project files, the build type can be selected
by the IDE configuration manager.
CMAKE_INSTALL_PATH (InstallPath)
--------------------------------
By default CMake will select the correct install path for your platform. If
you wish to install KiCad in a custom location, set CMAKE_INSTALL_PATH to the
path where you want to install KiCad. Please note that the default install
path that CMake chooses will likely overwrite the current version of KiCad
installed on your system.
wxWidgets Library Configuration.
================================
KiCad is built using the wxWidgets library. The following options allow you
to specifically tailor the wxWidgets library configuration. For the complete
list of wxWidgets setting see CMakeModules/FindwxWidgets.cmake in the KiCad
source.
wxWidgets_ROOT_DIR (NonDefaultwxWidgetsPath)
--------------------------------------------
CMake looks in the standard platform locations to find the default version of
the wxWidgets library. If you wish to use a custom built wxWidgets library,
set wxWidgets_ROOT_DIR to the correct path.
wxWidgets_USE_DEBUG (ON/OFF)
----------------------------
Default: OFF
When creating a debug build of KiCad, it is often useful to link against the
debug build of the wxWidgets. To use the debug build of wxWidgets, set
wxWidgets_USE_DEBUG to ON.
wxWidgets_USE_UNICODE (ON/OFF)
------------------------------
Default: ON (wxWidgets 2.9 or later), OFF (older versions)
If your platform supports Unicode and you wish to build KiCad with Unicode
support, set wxWidgets_USE_UNICODE to ON. Please note as of the 2.9 branch
this option is not required.
KiCad Specific Options
======================
All of the configuration settings below are specific to the KiCad project.
If for any reason you add or remove a build option to the KiCad CMake files,
please update the list below.
KICAD_SKIP_BOOST (ON/OFF)
--------------------------
Default: OFF
Use the version of the Boost library installed on the system rather than
building a local copy.
WARNING: The KiCad developers strongly advise you to build the bundled copy of
the Boost library, as it is known to work with KiCad. Other versions may
contain bugs that may result in KiCad errors.
USE_WX_GRAPHICS_CONTEXT (ON/OFF)
--------------------------------
Default: OFF
This option is *Experimental*. It enables advanced drawing library code using
wxGraphicsContext and should only be used for testing purposes. Under Windows,
a very recent version of mingw is needed. It also requires wxWidgets to be
built with the --enable-graphics_ctx configuration switch.
USE_IMAGES_IN_MENUS (ON/OFF)
----------------------------
Default: OFF for OSX, ON for other platforms.
This option is used to enable or disable building KiCad with images in menu
items. If this is not defined when CMake is used to create the build files,
images will be included in menu items on all platforms except OSX.
DOWNLOAD_DIR (PATH)
-------------------
Default: <source directory>/.downloads-by-cmake
Some external dependencies are automatically download and built when you
compile KiCad. This option specifies which directory they are stored in. If you
are building multiple copies of KiCad (e.g., to test different features or your
own modifications), it is recommended you set this option to a global directory
to avoid download and building the dependencies multiple times.
KICAD_USER_CONFIG_DIR (PATH)
----------------------------
Default: Home directory (Unix-based systems), Application data directory (Windows)
This option specifies where to store user-specific configuration information.
KICAD_KEEPCASE (ON/OFF)
-----------------------
Default: ON
If this is OFF, component names are automatically converted to uppercase meaning
they are case insensitive. If it is ON, component names are not changed and
are therefore case sensitive.
USE_WX_OVERLAY (ON/OFF)
-----------------------
Default: ON for OSX, OFF for other platforms.
This option enables or disables the use of wxOverlay for drawing operations.
Warning, this is experimental!
KICAD_SCRIPTING (ON/OFF)
------------------------
Default: OFF
This option enables or disables building Python scripting support within KiCad.
Currently only Pcbnew is supported. This option requires SWIG and Python to be
installed on the system.
KICAD_SCRIPTING_MODULES (ON/OFF)
--------------------------------
Default: OFF
This option enables or disables building KiCad Python modules that can be used
externally by Python. Currently only Pcbnew is supported. This option
requires SWIG and Python to be installed on the system.
KICAD_SCRIPTING_WXPYTHON (ON/OFF)
---------------------------------
Default: OFF
This option enables or disables building wxPython support into the KiCad
scripting support. Currently only Pcbnew is supported. This option requires
SWIG, Python, and wxPython to be installed on the system.
PYTHON_SITE_PACKAGE_PATH (PATH)
-------------------------------
Default: System site library path
When building KiCad with Python scripting enable, the Python site library path
is used by default. If you want to install the KiCad Python extension in a
different path, set this variable to the desired path.
BUILD_GITHUB_PLUGIN (ON/OFF)
----------------------------
Default: OFF
This option enables or disables building KiCad with a pcbnew plugin for loading
footprints from a GitHub repository.
KICAD_REPO_NAME (STRING)
------------------------
Default: "product"
The name of the repository this copy of KiCad was compiled from. This is
reported in the "About" dialog and is useful for people who are working with
multiple copies of the code from different sources. The default value is
"product", the name of the main development branch on Launchpad.
-226
View File
@@ -1,226 +0,0 @@
Introduction
------------
This document details how to build KiCad from source on Windows. The current
supported method of building KiCad for Windows systems is to use the MinGW
compiler, either from Windows or cross compiling from Linux. MSYS can be
used on Windows to extend the range of subprojects that you can build, but
is not needed to build KiCad itself.
Visual Studio is not supported, and don't ask about it, it is not supported
and will not be, ever.
Install Build Tools
-------------------
This section describes the tools required to build KiCad from source and how
to install them. Failure to install these tools properly will likely result
in build errors.
MinGW/MSYS
----------
MinGW/MSYS provides the compiler tools and a partial Posix environment useful
for building software. Download the MinGW installer from http://mingw.org.
Run the installer and and verify MinGW and MSYS are checked. You will also
need to expand the MinGW entry and select C++ from the list of supported
languages. Only C is installed by default and C++ is required to build KiCad.
Bazaar
------
KiCad uses the Bazaar version control system to track source code changes,
and download the boost libraries needed by Kicad.
The easiest way to get a copy of the KiCad source is to use Bazaar. Bazaar
can be download from http://wiki.bazaar.canonical.com/WindowsDownloads.
Your best bet is to use the stand alone version of Bazaar
(which includes bzrtools, needed Kicad) rather than one of
the Python specific versions.
CMake
-----
The KiCad source uses CMake to make sure the system has the required software
and libraries installed to properly compile the source. Download the latest
CMake installer from http://cmake.org. Run the installer and make sure the
add CMake to PATH variable check box is checked. If you fail to do this step,
the CMake executable will not be found.
Doxygen (Optional)
------------------
Doxygen is used to generate HTML documentation of the KiCad source code. While
it is not necessary to install Doxygen, it is a very good way to learn your way
around the KiCad code base. It is highly recommended for new developers. The
latest Doxygen installer can be downloaded from http://www.stack.nl/~dimitri/
doxygen/
Python (Optional)
-----------------
KiCad supports the Python scripting language (currently only Pcbnew scripting
exists). Currently the Python scripting support will only build against the
version 2 branch of Python. The Python installer can be downloaded from http://
www.python.org.
SWIG (Optional)
---------------
SWIG is used to generate the Python scripting code. It must be installed to
build the Python scripting support. Unfortunately there in no installer for
windows. You can download precompiled binaries from http://http://www.swig.
org/download.html and install swig.exe. Make sure the folder you install the
SWIG binary into is in the system PATH. Otherwise CMake will not be able to
find it.
NullSoft Installer System (Optional)
------------------------------------
The NullSoft Installer System (NSIS) is used to create a Windows installer for
end users from the binaries created from the KiCad source along with the
library and documentation files. NSIS is typically only used be developers who
create installers for end users and is not required if you install from source.
NSIS can be downloaded from http://nsis.sourceforge.net/Download.
Install and Build Libraries
---------------------------
This section documents installing and build all of the software libraries
required to build KiCad. As of now, these libraries have to be built because
MinGW builds of these libraries are not readily available Attempting to link
programs built on MinGW with libraries from other compilers (namely Microsoft
Visual C) is problematic. It can be done but it is not painless. As far as
the author of this document knows, MinGW can only link to Visual Studio C
libraries. The name mangling of Visual Studio C++ is not compatible with the
MinGW linker.
Build and Install the wxWidgets Library
---------------------------------------
The wxWidgets library is the base that KiCad is built upon. Version 2.9.4
or later of wxWidgets *should be* used on Windows. You may be able to build
KiCad with older versions of wxWidgets but it is not recommended. wxWidgets
can be downloaded from http://http://www.wxwidgets.org/downloads/
Unzip the wxWidgets zip file into your preferred build directory. Avoid using
spaces in the path names. Some MinGW tools do not play well with them. It is
always best to error on the side of caution.
Open MinGW and change to the wxWidgets source directory. If you don't want to
install the wxWidgets library into MinGW then enter the following commands:
#mkdir Release
#cd Release
#../configure --with-opengl
#make
If you want to install wxWidgets in MinGW then enter the following commands:
#mkdir Release
#cd Release
#../configure --prefix=/mingw --enable-monolithic=no --disable-shared --with-opengl
#make && make install
wxWidgets will be statically linked to Kicad, which avoid issus with wxWidgets dlls
Download the KiCad Source Code
------------------------------
You can use the Launchpad repository or a tar file for this. See the wiki.
To download files from Launchpad repository, you need to install the Bazaar
(bzr) version control system.
Launchpad repository has two branches for KiCad sources:
- a testing branch (used by developers)
- a stable branch (a copy of the testing branch, when this testing branch is
near a stable state)
To download the testing branch:
#bzr branch lp:kicad kicad_testing
To download the stable branch:
#bzr branch lp:kicad/stable kicad_stable
To download the component and footprint libraries
#bzr branch lp:~kicad-lib-committers/kicad/library kicad_libraries
To download the documentation and translation files:
#bzr branch lp:~kicad-developers/kicad/doc kicad_doc
Create Makefiles with CMake
---------------------------
Open your Msys shell. Create two "out of source" build directories at the
command line enter the following commands:
#cd <kicadSource>
#mkdir -p build/release # Build path can be anywhere you prefer.
#mkdir build/debug # Only if you want a debug version of KiCad.
To create a release build of KiCad, run the following command:
#cd build
#cmake -G "MSYS Makefiles" \ # Back slashes are not required
-DCMAKE_BUILD_TYPE=Release ../../ \ # and are for formatting only.
If the configuration fails, you have failed to install the required software
on you system. The error message should give you a good indication of what is
missing. You must resolve this before you can build KiCad.
Compiling the Code
------------------
To build KiCad, at the command line enter following comnands:
#cd <kicadSource>/build/release
#make
Installing KiCad
----------------
To install Kicad, at the command line enter the following commands:
#cd <kicadSource>/build/release
#make install
If you get any errors during the installation, you probably do not have the
appropriate privileges to the install path. Take a look at CMakeCache.txt
that was created when you ran CMake, and in particular look at the value of
the CMAKE_INSTALL_PREFIX variable. This is where KiCad will be installed. If
this not where you want KiCad installed, edit it with a text editor rerun the
make install command. You do not have the appropriate privileges to install
KiCad in the CMAKE_INSTALL_PATH, run the make install command as administrator.
You are now done unless you want to make a Debug build.
Compiling a Debug version
-------------------------
To create a debug version of KiCad, enter the following commands:
#cd <kicadSource>/build/debug
#cmake -G "MSYS Makefiles" \
-DCMAKE_BUILD_TYPE=Debug ../../
#make
Generally speaking you do not install debug binaries. They can be debugged in
place. To monitor the debugging output, you can download the Windows debug
viewer DbgView from http://technet.microsoft.com/en-us/sysinternals/
bb896647.aspx
Compiling the Python Scripting Support.
---------------------------------------
Before building KiCad Python scripting extension, you must create a MinGW
compatible Python link library. The directions to do this can be found in
the "How do I create Python extensions?" FAQ at http://www.mingw.org/wiki/FAQ.
To build KiCad with Python scripting support, run CMake as follows and then
compile the source as described above.
#cmake -G "MSYS Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DKICAD_PYTHON_SCRIPTING=ON \
-DKICAD_PYTHON_MODULES=ON ../../
You only need to include the KICAD_PYTHON_MODULES option if you want to
install the python modules that ship with KiCad. Also note that the wxPython
support cannot be compiled on Windows at this time due to library conflicts
between MinGW and Python. Work is currently underway by the KiCad developers
to provide a MinGW build of Python which should resolve this issue.
Building the Developer Documentation
------------------------------------
To build the HTML developer documentation, run the following commands:
#cd <kicadSource>/build/debug
#make doxygen-docs
The documentation will be created in the <kicadSouce>/Documentation/html
directory.
-63
View File
@@ -1,63 +0,0 @@
Compiling KiCad on Apple Mac OS X
=================================
First written: 2010-01-31
by: Jerry Jacobs <xor.gate.engineering[at]gmail[dot]com>
Modified at: 2014-02-07
by: Marco Serantoni <marco.serantoni[at]gmail[dot]com>
Snow Leopard
------------
Requirements
* XCode Tools (http://developer.apple.com/tools/xcode)
* bzr (bazaar)
* CMake (http://www.cmake.org)
The build of Kicad for OSX is now easier than before.
The building system will download and compile the needed libraries for you
patching them accordly to the needs.
Building Kicad with no support for Scripting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The building needs to know if you want a static binary or a dynamic one
Just set ONE of those two options KICAD_BUILD_STATIC or KICAD_BUILD_DYNAMIC
If you set KICAD_BUILD_DYNAMIC the building system will build all and include
the needed libraries for each executable in its bundle
cmake -DKICAD_BUILD_DYNAMIC=ON .
make
Building Kicad with support for Scripting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Due some problems with some dependencies the build of this kind of binary is a bit
more complex, you should initially set KICAD_BUILD_DYNAMIC
then issue for example
cmake -DKICAD_BUILD_DYNAMIC=ON .
make swig
After successfully building you can set your KICAD_SCRIPTING* options (for example):
cmake -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_WXPYTHON=ON -DKICAD_SCRIPTING_MODULES=ON .
make
The system will build all accordling your choices and package all in the bundle
I know bundles will be huge, but those will be autosufficient.
Building Kicad for other processors or Universal binaries
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I wish remember you should set the processor like
cmake -DCMAKE_OSX_ARCHITECTURES="x86_64"
for other platforms
cmake -DCMAKE_OSX_ARCHITECTURES="x86_64 -arch i386"
cmake -DCMAKE_OSX_ARCHITECTURES="x86_64 -arch i386 -arch ppc"
I know some you should prefer use ; as separator, this will be accomplished soon
keeping support for both the syntaxes
+6 -35
View File
@@ -1,3 +1,4 @@
# Doxyfile 1.8.2
# This file describes the settings to be used by the documentation system
@@ -324,22 +325,6 @@ INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
# determine which symbols to keep in memory and which to flush to disk.
# When the cache is full, less often used symbols will be written to disk.
# For small to medium size projects (<1000 input files) the default value is
# probably good enough. For larger projects a too small cache size can cause
# doxygen to be busy swapping symbols to and from disk most of the time
# causing a significant performance penalty.
# If the system has enough physical memory increasing the cache will improve the
# performance by keeping more symbols in memory. Note that the value works on
# a logarithmic scale so increasing the size by one will roughly double the
# memory usage. The cache size is given by this formula:
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols.
SYMBOL_CACHE_SIZE = 4
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
# their name and scope. Since this can be an expensive process and often the
@@ -661,7 +646,10 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = road-map.md
INPUT = coding-style-policy.md \
stable-release-policy.md \
road-map.md \
compiling.md
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -679,7 +667,7 @@ INPUT_ENCODING = UTF-8
# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
# *.f90 *.f *.for *.vhd *.vhdl
FILE_PATTERNS = *.md
FILE_PATTERNS =
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
@@ -1411,23 +1399,6 @@ GENERATE_XML = NO
XML_OUTPUT = xml
# The XML_SCHEMA tag can be used to specify an XML schema,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
XML_SCHEMA =
# The XML_DTD tag can be used to specify an XML DTD,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
XML_DTD =
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting
# and cross-referencing information) to the XML output. Note that
# enabling this will significantly increase the size of the XML output.
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
@@ -0,0 +1,800 @@
# KiCad C++ Source Code Style Guide #
Latest Publishing: February 2013
First Published: September 2010
written by
Wayne Stambaugh \<<stambaughw@verizon.net>\>
and
Dick Hollenbeck \<<dick@softplc.com>\>
[TOC]
# 1. Introduction # {#intro}
The purpose of this document is to provide a reference guide for KiCad
developers about how source code should be styled and formatted in
KiCad. It is not a comprehensive programming guide because it does not
discuss many things such as software engineering strategies, source
directories, existing classes, or how to internationalize text. The goal
is to make all of the KiCad source conform to this guide.
## 1.1 Why Coding Style Matters ## {#why}
You may be thinking to yourself that using the style defined in this
document will not make you a good programmer and you would be correct.
Any given coding style is no substitute for experience. However, any
experienced coder will tell that the only thing worse than looking at
code that is not in your preferred coding style, is looking at twenty
different coding styles that are not your preferred coding style.
Consistency makes a) problems easier to spot, and b) looking at code for
long periods of time more tolerable.
## 1.2 Enforcement ## {#enforcement}
The KiCad coding police are not going to break down your door and beat
you with your keyboard if you don't follow these guidelines (although
there are those who would argue that they should). However, there are
some very sound reasons why you should follow them. If you are
contributing patches, you are much more likely to be taken seriously by
the primary developers if your patches are formatted correctly. Busy
developers don't have the time to go back and reformat your code. If you
have a desire to become a regular KiCad developer with commit access to
the development branch, you're not likely to get a glowing
recommendation by the lead developers if you will not follow these
guidelines. It is just good programming courtesy to follow this policy
because it is respectful of the investment already made by the existing
developers. The other KiCad developers will appreciate your effort.
**Warning**
**Do not modify this document without the consent of the project
leader. All changes to this document require approval.**
# 2. Naming Conventions # {#naming_conventions}
Before delving into anything as esoteric as indentation and formatting,
naming conventions need to be addressed. This section does not attempt
to define what names you use for your code. Rather, it defines the style
for naming. See the references section for links to some excellent
coding references. When defining multiple word names use the following
conventions for improved readability:
- Use underscores for all upper and all lower case variables to make
multiple word names more readable.
- Use camel case for mixed case variable names.
Avoid mixing camel case and underscores.
**Examples**
~~~~~~~~~~~~~{.cpp}
CamelCaseName // if camelcase, then no underscores
all_lower_case_name
ALL_UPPER_CASE_NAME
~~~~~~~~~~~~~
## 2.1 Class, Type Definitions, Name Space, and Macro Names ## {#definitions}
Class, typedef, enum, name space, and macro names should be comprised of
all capital letters.
**Examples**
~~~~~~~~~~~~~{.cpp}
class SIMPLE
#define LONG_MACRO_WITH_UNDERSCORES
typedef boost::ptr_vector<PIN> PIN_LIST;
enum KICAD_T {...};
~~~~~~~~~~~~~
## 2.2 Local, Private and Automatic Variables ## {#local_variables}
The first character of automatic, static local, and private variable
names should be lower case. This indicates that the variable will not be
“visible” outside of the function, file, or class where they are
defined, respectively. The limited visibility is being acknowledged with
the lowercase starting letter, where lowercase is considered to be less
boisterous than uppercase.
**Examples**
~~~~~~~~~~~~~{.cpp}
int i;
double aPrivateVariable;
static char* static_variable = NULL;
~~~~~~~~~~~~~
## 2.3 Public and Global Variables ## {#global_variables}
The first character of public and global variable names are to be
uppercase. This indicates that the variable is visible outside the class
or file in which it was defined. (An exception is the use of prefix `g_`
which is also sometimes used to indicate a global variable.)
**Example**
~~~~~~~~~~~~~{.cpp}
char* GlobalVariable;
~~~~~~~~~~~~~
## 2.4 Local, Private and Static Functions ## {#functions}
The first character of local, private, and static functions should be
lower case. This indicates that the function is not visible outside the
class or file where it is defined.
**Example**
~~~~~~~~~~~~~{.cpp}
bool isModified();
static int buildList( int* list );
~~~~~~~~~~~~~
## 2.5 Function Arguments ## {#function_arguments}
Function arguments are prefixed with an 'a' to indicate these are
arguments to a function. The 'a' stands for “argument”, and it also
enables clever and concise Doxygen comments.
**Example**
~~~~~~~~~~~~~{.cpp}
/*/** */*
* Function SetFoo
* takes aFoo and copies it into this instance.
*/
void SetFoo( int aFoo );
~~~~~~~~~~~~~
Notice how the reader can say “a Foo” to himself when reading this.
## 2.6 Pointers ## {#pointers}
It is not desired to identify a pointer by building a 'p' into the
variable name. The pointer aspect of the variable pertains to type, not
purpose.
**Example**
~~~~~~~~~~~~~{.cpp}
MODULE* module;
~~~~~~~~~~~~~
The purpose of the variable is that it represents a MODULE. Something
like `p_module` would only make that harder to discern.
## 2.7 Accessing Member Variables and Member Functions ## {#accessing_members}
We do not use “`this->`” to access either member variables or member
functions from within the containing class. We let C++ perform this for
us.
# 3. Commenting # {#commenting}
Comments in KiCad typically fall into two categories: in line code
comments and Doxygen comments. In line comments have no set formatting
rules other than they should have the same indent level as the code if
they do not follow a statement. In line comments that follow statements
should not exceed 99 columns unless absolutely necessary. The prevents
word wrapping in an editor when the viewable columns is set to 100. In
line comments can use either the C++ or the C commenting style, but C++
comments are preferred for single line comments or comments consisting
of only a few lines.
## 3.1 Blank Lines Above Comments ## {#blank_lines_above_comments}
If a comment is the first thing on a line, then that comment should have
one or more blank lines above them. One blank line is preferred.
## 3.2 Doxygen ## {#doxygen}
Doxygen is a C++ source code documenting tool used by the project. Descriptive
*.html files can be generated from the source code by installing Doxygen and
building the target named **doxygen-docs**.
$ cd <kicad_build_base>
$ make doxygen-docs
The \*.html files will be placed into
\<kicad\_project\_base\>/Documentation/doxygen/html/
Doxygen comments are used to build developer documentation from the
source code. They should normally be only placed in header files and not
in \*.cpp files. This eliminates the obligation to keep two comments in
agreement with each other. is if the class, function, or enum, etc. is
only defined in a \*.cpp source file and not present in any header file,
in which case the Doxygen comments should go into the \*.cpp source file.
Again, avoid duplicating the Doxygen comments in both the header and
\*.cpp source files.
KiCad uses the JAVADOC comment style defined in the [“Documenting the
code”][doccode] section of the Doxygen [manual][manual]. Don't forget
to use the special Doxygen tags: bug, todo, deprecated, etc., so other
developers can quickly get useful information about your code. It is
good practice to actually generate the Doxygen \*.html files by
building target doxygen-docs, and then to review the quality of your
Doxygen comments with a web browser before submitting a patch.
[doccode]: http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html
[manual]: http://www.stack.nl/~dimitri/doxygen/manual.html
### 3.2.1 Function Comments ### {#function_comments}
These go into a header file, unless the function is a private (i.e.
static) function known only to a \*.cpp file. The format of a function
comment is chosen to serve a dual purpose role: delineation of the
function declaration within the source code and to create a consistent
leading sentence in the doxygen html output. The chosen format is
“Function \<name\>” as shown in the example below.
**Example**
~~~~~~~~~~~~~{.cpp}
/*/** */*
* Function Print
* formats and writes text to the output stream.
* @param nestLevel is the multiple of spaces to precede the output with.
* @param fmt is a printf() style format string.
* @param ... is a variable list of parameters that will get blended into
* the output under control of the format string.
* @return int - the number of characters output.
* @throw IO_ERROR, if there is a problem outputting, such asisk.
*/
int PRINTF_FUNC Print( int nestLevel,
const char* fmt, ... ) throw( IO_ERROR );
~~~~~~~~~~~~~
The “Function \<name\>” text goes on the 2nd line of the comment. The
\@return keyword if present, should show the type of the return value
followed by a hiphen. The \@param keyword names a function parameter
and the text following should flow like a normal English sentence.
### 3.2.2 Class Comments ### {#class_comments}
A class comment describes a class declaration by giving the purpose and
use of the class. Its format is similar to a function comment. Doxygen
can use the html \<p\> (paragraph designation) to begin a new paragraph
in its output. So if the text of the comment is large, break it put into
multiple paragraphs.
**Example**
~~~~~~~~~~~~~{.cpp}
/*/** */*
* Class OUTPUTFORMATTER
* is an important interface (abstract) class used to output UTF8 text in
* a convenient way. The primary interface is "printf() - like" but
* with support for indentation control. The destination of the 8 bit
* wide text is up to the implementer.
* <p>
* The implementer only has to implement the write() function, but can
* also optionally re-implement GetQuoteChar().
* <p>
* If you want to output a wxString, then use CONV_TO_UTF8() on it
* before passing it as an argument to Print().
* <p>
* Since this is an abstract interface, only classes derived from
* this one may actually be used.
*/
class OUTPUTFORMATTER
{
~~~~~~~~~~~~~
# 4. Formatting # {#formatting}
This section defines the formatting style used in the KiCad source.
## 4.1 Indentation ## {#indentation}
The indentation level for the KiCad source code is defined as four
spaces. Please do not use tabs.
### 4.1.1 Defines ### {#defines}
There should be only one space after a \#define statement.
### 4.1.2 Column Alignment ### {#column_alignment}
Please try to align multiple consecutive similar lines into consistent
columns when possible, such as \#define lines which can be thought of as
containing 4 columns: \#define, symbol, value, and comment. Notice how
all 4 columns are aligned in the example below.
**Example**
~~~~~~~~~~~~~{.cpp}
#define LN_RED 12 // my favorite
#define LN_GREEN 13 // eco friendly
~~~~~~~~~~~~~
Another common case is the declaration of automatic variables. These are
preferably shown in columns of type and variable name.
## 4.2 Blank Lines ## {#blank_lines}
### 4.2.1 Function Declarations ### {#function_declarations}
There should be 1 blank line above a function declaration in a class
file if that function declaration is presented with a Javadoc comment.
This is consist with the statement above about blank lines above
comments.
### 4.2.2 Function Definitions ### {#function_definitions}
Function definitions in *.cpp files will not typically be accompanied by
any comment, since those are normally only in the header file. It is
desirable to set off the function definition within the *.cpp file by
leaving two blank lines above the function definition.
### 4.2.3 If Statements ### {#if_statements}
There should be one blank line above if statements.
## 4.3 Line Length ### {#line_length}
The maximum line width is 99 columns. An exception to this is a long
quoted string such as the internationalized text required to satisfy
MSVC++, described below.
## 4.4 Strings ## {#strings}
The KiCad project team no longer supports compiling with Microsoft
Visual C++. When you need to break long strings into smaller substrings,
please use the C99 compliant method for improved readability. Using
any of previously accepted methods defined below for breaking
long internationalized strings will no longer be accepted.
**Examples**
~~~~~~~~~~~~~{.cpp}
// This works with C99 compliant compilers is the **only** accepted method:
wxChar* foo = _( “this is a long string broken ”
“into pieces for readability.” );
// This works with MSVC, breaks POEdit, and is **not** acceptable:
wxChar* foo = _( “this is a long string broken ”
L“into pieces for readability” );
// This works with MSVC, is ugly, and is **not** accepted:
wxChar* foo = _( “this is a long string \
broken into pieces for readability” );
~~~~~~~~~~~~~
A second acceptable solution is to simply put the text all on one
line, even if it exceeds the 99 character line length limit. However,
the preferred method is to break strings within the 99 character limit
whenever possible to prevent wrapping.
## 4.5 Trailing Whitespace ## {#trailing_whitespace}
Many programming editors conveniently indent your code for you. Some of
them do it rather poorly and leave trailing whitespace. Thankfully, most
editors come with a remove trailing whitespace macro or at least a
setting to make trailing whitespace visible so you can see it and
manually remove it. Trailing whitespace is known to break some text
parsing tools. It also leads to unnecessary diffs in the version control
system. Please remove trailing whitespace.
## 4.6 Multiple Statements per Line ## {#multiple_statements_per_line}
It is generally preferred that each statement be placed on its own line.
This is especially true for statements without keywords.
**Example**
~~~~~~~~~~~~~{.cpp}
x=1; y=2; z=3; // Bad, should be on separate lines.
~~~~~~~~~~~~~
## 4.7 Braces ## {#braces}
Braces should be placed on the line proceeding the keyword and indented
to the same level. It is not necessary to use braces if there is only a
single line statement after the keyword. In the case of if..else
if..else, indent all to the same level.
**Example**
~~~~~~~~~~~~~{.cpp}
void function()
{
if( foo )
{
statement1;
statement2;
}
else if( bar )
{
statement3;
statement4;
}
else
statement5;
}
~~~~~~~~~~~~~
## 4.8 Parenthesis ## {#parenthesis}
Parenthesis should be placed immediately after function names and
keywords. Spaces should be placed after the opening parenthesis, before
the closing parenthesis, and between the comma and the next argument in
functions. No space is needed if a function has no arguments.
**Example**
~~~~~~~~~~~~~{.cpp}
void Function( int aArg1, int aArg2 )
{
while( busy )
{
if( a || b || c )
doSomething();
else
doSomethingElse();
}
}
~~~~~~~~~~~~~
## 4.9 Switch Formatting ## {#switch}
The case statement is to be indented to the same level as the switch.
**Example**
~~~~~~~~~~~~~{.cpp}
switch( foo )
{
case 1:
doOne();
break;
case 2:
doTwo();
// Fall through.
default:
doDefault();
}
~~~~~~~~~~~~~
# 5. License Statement # {#license_statement}
There is a the file copyright.h which you can copy into the top of
your new source files and edit the \<author\> field. KiCad depends on
the copyright enforcement capabilities of copyright law, and this
means that source files must be copyrighted and not be released into
the public domain. Each source file has one or more owners.
# 6. Header Files # {#header_files}
Project \*.h source files should:
- contain a license statement
- contain a nested include \#ifndef
- be fully self standing and not depend on other headers that are not
included within it.
The license statement was described above.
## 6.1 Nested Include #ifndef ## {#nested_include}
Each header file should include an \#ifndef which is commonly used to
prevent compiler errors in the case where the header file is seen
multiple times in the code stream presented to the compiler. Just
after the license statement, at the top of the file there should be
lines similar to these (but with a filename specific token other than
`RICHIO_H_`):
~~~~~~~~~~~~~{.cpp}
#ifndef RICHIO_H_
#define RICHIO_H_
~~~~~~~~~~~~~
And at the very bottom of the header file, use a line like this one:
~~~~~~~~~~~~~{.cpp}
#endif // RICHIO_H_
~~~~~~~~~~~~~
The \#ifndef wrapper begins after the license statement, and ends at
the very bottom of the file. It is important that it wrap any nested
\#include statements, so that the compiler can skip them if the
\#ifndef evaluates to false, which will reduce compilation time.
## 6.2 Headers Without Unsatisfied Dependencies ## {#header_depends}
Any header file should include other headers that it depends on. (Note:
KiCad is not at this point now, but this section is a goal of the
project.)
It should be possible to run the compiler on any header file within the
project, and with proper include paths being passed to the compiler, the
header file should compile without error.
**Example**
$ cd /svn/kicad/testing.checkout/include
$ g++ wx-config --cxxflags -I . xnode.h -o /tmp/junk
Such structuring of the header files removes the need within a client
\*.cpp file to include some project header file before some other project
header file. (A client \*.cpp file is one that intends to **use, not
implement,** the public API exposed within the header file.)
Client code should not have to piece together things that a header file
wishes to expose. The exposing header file should be viewed as a fully
sufficient **ticket to use** the public API of that header file.
This is not saying anything about how much to expose, only that that
which is exposed needs to be fully usable merely by including the header
file that exposes it, with no additional includes.
For situations where there is a class header file and an
implementation \*.cpp file, it is desirable to hide as much of the
private implementation as is practical and any header file that is not
needed as part of the public API can and should be included only in
the implementation \*.cpp file. However, the number one concern of
this section is that client (using) code can use the public API which
is exposed in the header file, merely by including that one header
file.
# 7. I Wrote X Lines of Code Before I Read This Document # {#x_lines}
It's OK. We all make mistakes. Fortunately, KiCad provides a
configuration file for the code beautifier uncrustify. Uncrustify won't
fix your naming problems but it does a pretty decent job of formatting
your source code. There are a few places where uncrustify makes some
less than ideal indentation choices. It struggles with the string
declaration macros wxT(“”) and \_(“”) and functions used as arguments to
other functions. After you uncrustify your source code, please review the
indentation for any glaring errors and manually fix them. See the
uncrustify [website][uncrustify] for more information.
[uncrustify]: http://uncrustify.sourceforge.net/
# 8. Show Me an Example # {#show_me_an_example}
Nothing drives the point home like an example. The source file richio.h
below was taken directly from the KiCad source.
~~~~~~~~~~~~~{.cpp}
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2007-2010 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef RICHIO_H_
#define RICHIO_H_
// This file defines 3 classes useful for working with DSN text files and is named
// "richio" after its author, Richard Hollenbeck, aka Dick Hollenbeck.
#include <string>
#include <vector>
// I really did not want to be dependent on wxWidgets in richio
// but the errorText needs to be wide char so wxString rules.
#include <wx/wx.h>
#include <cstdio> // FILE
/*/** */*
* Struct IOError
* is a class used to hold an error message and may be used to throw exceptions
* containing meaningful error messages.
*/
struct IOError
{
wxString errorText;
IOError( const wxChar* aMsg ) :
errorText( aMsg )
{
}
IOError( const wxString& aMsg ) :
errorText( aMsg )
{
}
};
/*/** */*
* Class LINE_READER
* reads single lines of text into its buffer and increments a line number counter.
* It throws an exception if a line is too long.
*/
class LINE_READER
{
protected:
FILE* fp;
int lineNum;
unsigned maxLineLength;
unsigned length;
char* line;
unsigned capacity;
public:
/*/** */*
* Constructor LINE_READER
* takes an open FILE and the size of the desired line buffer.
* @param aFile An open file in "ascii" mode, not binary mode.
* @param aMaxLineLength The number of bytes to use in the line buffer.
*/
LINE_READER( FILE* aFile, unsigned aMaxLineLength );
~LINE_READER()
{
delete[] line;
}
/*
int CharAt( int aNdx )
{
if( (unsigned) aNdx < capacity )
return (char) (unsigned char) line[aNdx];
return -1;
}
*/
/*/** */*
* Function ReadLine
* reads a line of text into the buffer and increments the line number
* counter. If the line is larger than the buffer size, then an exception
* is thrown.
* @return int - The number of bytes read, 0 at end of file.
* @throw IOError only when a line is too long.
*/
int ReadLine() throw (IOError);
operator char* ()
{
return line;
}
int LineNumber()
{
return lineNum;
}
unsigned Length()
{
return length;
}
};
/*/** */*
* Class OUTPUTFORMATTER
* is an interface (abstract class) used to output ASCII text in a convenient
* way. The primary interface is printf() like but with support for indentation
* control. The destination of the 8 bit wide text is up to the implementer.
* If you want to output a wxString, then use CONV_TO_UTF8() on it before passing
* it as an argument to Print().
* <p>
* Since this is an abstract interface, only classes derived from this one
* will be the implementations.
*/
class OUTPUTFORMATTER
{
#if defined(__GNUG__) // The GNU C++ compiler defines this
// When used on a C++ function, we must account for the "this" pointer,
// so increase the STRING-INDEX and FIRST-TO_CHECK by one.
// See http://docs.freebsd.org/info/gcc/gcc.info.Function_Attributes.html
// Then to get format checking during the compile, compile with -Wall or -Wformat
#define PRINTF_FUNC __attribute__ ((format (printf, 3, 4)))
#else
#define PRINTF_FUNC // nothing
#endif
public:
/*/** */*
* Function Print
* formats and writes text to the output stream.
*
* @param nestLevel The multiple of spaces to preceed the output with.
* @param fmt A printf() style format string.
* @param ... a variable list of parameters that will get blended into
* the output under control of the format string.
* @return int - the number of characters output.
* @throw IOError, if there is a problem outputting, such as a full disk.
*/
virtual int PRINTF_FUNC Print( int nestLevel, const char* fmt, ... ) throw( IOError ) = 0;
/*/** */*
* Function GetQuoteChar
* performs quote character need determination.
* It returns the quote character as a single character string for a given
* input wrapee string. If the wrappee does not need to be quoted,
* the return value is "" (the null string), such as when there are no
* delimiters in the input wrapee string. If you want the quote_char
* to be assuredly not "", then pass in "(" as the wrappee.
* <p>
* Implementations are free to override the default behavior, which is to
* call the static function of the same name.
* @param wrapee A string that might need wrapping on each end.
* @return const char* - the quote_char as a single character string, or ""
* if the wrapee does not need to be wrapped.
*/
virtual const char* GetQuoteChar( const char* wrapee ) = 0;
virtual ~OUTPUTFORMATTER() {}
/*/** */*
* Function GetQuoteChar
* performs quote character need determination according to the Specctra DSN
* specification.
* @param wrapee A string that might need wrapping on each end.
* @param quote_char A single character C string which provides the current
* quote character, should it be needed by the wrapee.
*
* @return const char* - the quote_char as a single character string, or ""
* if the wrapee does not need to be wrapped.
*/
static const char* GetQuoteChar( const char* wrapee, const char* quote_char );
};
/*/** */*
* Class STRINGFORMATTER
* implements OUTPUTFORMATTER to a memory buffer. After Print()ing the
* string is available through GetString()
*/
class STRINGFORMATTER : public OUTPUTFORMATTER
{
std::vector<char> buffer;
std::string mystring;
int sprint( const char* fmt, ... );
int vprint( const char* fmt, va_list ap );
public:
/*/** */*
* Constructor STRINGFORMATTER
* reserves space in the buffer
*/
STRINGFORMATTER( int aReserve = 300 ) :
buffer( aReserve, '\0' )
{
}
/*/** */*
* Function Clear
* clears the buffer and empties the internal string.
*/
void Clear()
{
mystring.clear();
}
/*/** */*
* Function StripUseless
* removes whitespace, '(', and ')' from the mystring.
*/
void StripUseless();
std::string GetString()
{
return mystring;
}
//-----<OUTPUTFORMATTER>------------------------------------------------
int PRINTF_FUNC Print( int nestLevel, const char* fmt, ... ) throw( IOError );
const char* GetQuoteChar( const char* wrapee );
//-----</OUTPUTFORMATTER>-----------------------------------------------
};
#endif // RICHIO_H_
~~~~~~~~~~~~~
# 9. Resources # {#resources}
There are plenty of excellent resources on the Internet on C++ coding
styles and coding do's and don'ts. Here are a few useful ones. In most
cases, the coding styles do not follow the KiCad coding style but there
is plenty of other good information here. Besides, most of them have
some great humor in them enjoyable to read. Who knows, you might even
learn something new.
- [C++ Coding Standard][cppstandard]
- [Linux Kernel Coding Style][kernel]
- [C++ Operator Overloading Guidelines][overloading]
- [Wikipedia's Programming Style Page][style]
[cppstandard]:http://www.possibility.com/Cpp/CppCodingStandard.html
[kernel]:http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/Documentation/CodingStyle
[overloading]:http://www.cs.caltech.edu/courses/cs11/material/cpp/donnie/cpp-ops.html
[style]:http://en.wikipedia.org/wiki/Programming_style
+398
View File
@@ -0,0 +1,398 @@
# Building KiCad from Source #
If you are a user and not a developer, please consider using one of the prebuilt packages
of KiCad which can be found at the [download][] page on the [KiCad website][]. Building KiCad
from source is not for the faint of heart and is not recommended unless you have reasonable
software development experience. This document contains the instructions on how to build KiCad
from source on the supported platforms. It is not intended as a guide for installing or building
[library dependencies](#library_dependencies). Please consult you platforms documentation for
installing packages or the source code when building the library dependencies. Currently the
supported platforms are Windows Versions 7-10, just about any version of Linux, and OSX
10.7-10.10. You may be able to build KiCad on other platforms but it is not supported. On
Windows and Linux the [GNU GCC][] is the only supported compiler and on OSX [Clang][] is the
only supported compiler.
[TOC]
# Development Tools # {#development_tools}
Before you begin building KiCad, there are a few tools required in addition to your compiler.
Some of these tools are required to build from source and some are optional.
## CMake Build Configuration Tool ## {#cmake}
[CMake][] is the build configuration and makefile generation tool used by KiCad. It is required.
## Bazaar Version Control System ## {#bazaar}
The official source code repository is hosted on [Launchpad][] and requires the [Bazaar][] version
control system in order to create a branch of the latest source. Bazaar is not required if you are
going to build a stable version of KiCad from a source archive.
## GIT Version Control System ## {#git}
If you prefer to use [GIT][] for version control, there is a mirror of the official KiCad
repository on [Github][]. GIT is not required if you are going to build a stable version of
KiCad from a source archive. Please note that the Github mirror is read only. Do not submit
pull requests to Github. Changes should be sent to the KiCad developer's [mailing list][] as
an attached patch with [PATCH] at the beginning of the subject.
## Doxygen Code Documentation Generator ## {#doxygen_section}
The KiCad source code is documented using [Doxygen][] which parses the KiCad source code files
and builds a dependency tree along with the source documentation into HTML. Doxygen is only
required if you are going to build the KiCad documentation.
## SWIG Simplified Wrapper and Interface Generator ## {#swig}
[SWIG][] is used to generate the Python scripting language extensions for KiCad. SWIG is not
required if you are not going to build the KiCad scripting extension.
# Library Dependencies # {#library_dependencies}
This section includes a list of library dependencies required to build KiCad. It does not
include any dependencies of the libraries. Please consult the library's documentation for any
additional dependencies. Some of these libraries are optional depending on you build
configuration. This is not a guide on how to install the library dependencies using you systems
package management tools or how to build the library from source. Consult the appropriate
documentation to perform these tasks.
## wxWidgets Cross Platform GUI Library## {#wxwidgets}
[wxWidgets][] is the graphical user interface (GUI) library used by KiCad. The current minimum
version is 3.0.0. However, 3.0.2 should be used whenever possible as there are some known bugs
in prior versions that can cause problems on some platforms. Please note that there are also
some platform specific patches that must be applied before building wxWidgets from source. These
patches can be found in the [patches folder][] in the KiCad source. These patches are named by
the wxWidgets version and platform name they should be applied against. wxWidgets must be built
with the --with-opengl option. If you installed the packaged version of wxWidgets on your system,
verify that it was built with this option.
## Boost C++ Libraries ## {#boost}
The [Boost][] C++ library is required only if you intend to build KiCad with the system installed
version of Boost instead of the default internally built version. If you use the system installed
version of Boost, version 1.56 or greater is required. Please note there are some platform
specific patches required to build a working Boost library. These patches can be found in the
[patches folder][] in the KiCad source. These patches are named by the platform name they should
be applied against.
## OpenSSL Secure Socket Layer Library ## {#openssl}
The [OpenSSL][] library is only required when the KiCad build is configured with the Github plugin
enabled. See the [KiCad Build Configuration Options](#build_opts)` section for more information.
Please note that KiCad will download and build version 1.0.1e of OpenSSL by default. You should
probably use the version of OpenSSL installed on your system as it will most likely be more up to
date and contain the latest security fixes.
## GLEW OpenGL Extension Wrangler Library ## {#glew}
The [OpenGL Extension Wrangler][GLEW] is an OpenGL helper library used by the KiCad graphics
abstraction library [GAL] and is always required to build KiCad.
## GLUT OpenGL Utility Toolkit Library ## {#glut}
The [OpenGL Utility Toolkit][GLUT] is an OpenGL helper library used by the KiCad graphics
abstraction library [GAL] and is always required to build KiCad.
## Cairo 2D Graphics Library ## {#cairo}
The [Cairo][] 2D graphics library is used as a fallback rendering canvas when OpenGL is no
available and is always required to build KiCad.
## Python Programming Language ## {#python}
The [Python][] programming language is used to provide scripting support to KiCad. It only needs
to be install if the [KiCad scripting](#kicad_scripting) build configuration option is enabled.
## wxPython Library ## {#wxpython}
The [wxPython][] library is used to provide a scripting console for Pcbnew. It only needs to be
installed if the [wxPython scripting](#wxpython_scripting) build configuration option is enabled.
When building KiCad with wxPython support, make sure the version of the wxWidgets library and
the version of wxPython installed on your system are the same. Mismatched versions have been
known to cause runtime issues.
# KiCad Build Configuration Options # {#build_opts}
KiCad has many build options that can be configured to build different options depending on
the availability of support for each option on a given platform. This section documents
these options and their default values.
## Case Sensitivity ## {#case_sensitive_opt}
The KICAD_KEEPCASE option allows you to build KiCad so that the string matching for component
names is case sensitive of case insensitive. This option is enabled by default.
## Advanced Graphics Context ## {#graphics_context_opt}
The USE_WX_GRAPHICS_CONTEXT option replaces wxDC with wxGraphicsContext for graphics rendering.
This option is disabled by default. Warning: the is experimental and has not been maintained
so use at your own risk.
## Graphics Context Overlay ## {#overlay_opt}
The USE_WX_OVERLAY option is used to enable the optional wxOverlay class for graphics rendering
on OSX. This is enabled on OSX by default and disabled on all other platforms.
## Scripting Support ## {#scripting_opt}
The KICAD_SCRIPTING option is used to enable building the Python scripting support into Pcbnew.
This options is disabled by default.
## Scripting Module Support ## {#scripting_mod_opt}
The KICAD_SCRIPTING_MODULES option is used to enable building and installing the Python modules
supplied by KiCad. This option is disabled by default.
## wxPython Scripting Support ## {#wxpython_opt}
The KICAD_SCRIPTING_WXPYTHON option is used to enable building the wxPython interface into
Pcbnew including the wxPython console. This option is disabled by default.
## Build with Static Libraries ## {#static_lib_opt}
The KICAD_BUILD_STATIC option is used to build KiCad with static libraries. This option is
used for OSX builds only and is disabled by default.
## Build with Dynamic Libraries ## {#dynamic_lib_opt}
The KICAD_BUILD_DYNAMIC option is used to build KiCad with dynamic libraries. This option is
used for OSX only and is disabled by default.
## Build with System Boost ## {#boost_opt}
The KICAD_SKIP_BOOST option allow you to use the Boost libraries installed on your system to
be used instead of downloading Boost 1.54 and building a custom version specifically for
building KiCad. It is high recommended that you enable this option on Linux and use Boost
version 1.56 or greater. On other platforms you mileage may vary. This option is disabled
by default.
## OSX Dependency Builder ## {#osx_deps_opt}
The USE_OSX_DEPS_BUILDER option forces the build configuration to download and build the
required dependencies to build KiCad on OSX. This option is not longer maintained and most
likely is broken. Use it at your own peril.
## Github Plugin ## {#github_opt}
The BUILD_GITHUB_PLUGIN option is used to control if the Github plugin is built. This option is
enabled by default.
# Getting the KiCad Source Code ## {#getting_src}
There are several ways to get the KiCad source. If you want to build the stable version you
can down load the source archive from the [KiCad Launchpad][] developers page. Use tar or some
other archive program to extract the source on your system. If you are using tar, use the
following command:
tar -xzf kicad_src_archive.tar.gz
If you are contributing directly to the KiCad project on Launchpad, you can create a local
branch on your machine by using the following command:
bzr branch lp:repo_to_branch
If you prefer to use [GIT][] as you version control system, you can clone the KiCad mirror on
Github using the following command:
git clone https://github.com/KiCad/kicad-source-mirror
Here is a list of source links:
Stable release archive: https://launchpad.net/kicad/4.0/4.0.0-rc1/+download/kicad-4.0.0-rc1.tar.xz
Development branch: https://code.launchpad.net/~kicad-product-committers/kicad/product
Github mirror: https://github.com/KiCad/kicad-source-mirror
# Building KiCad on Linux # {#build_linux}
To perform a full build on Linux, run the following commands:
cd kicad_source_tree
mkdir -p build/release
mkdir build/debug # Optional for debug build.
cd build/release
cmake -DCMAKE_BUILD_TYPE=Release \
-DKICAD_SCRIPTING=ON \
-DKICAD_SCRIPTING_MODULES=ON \
-DKICAD_SCRIPTING_WXPYTHON=ON \
../../
make
sudo make install
If the CMake configuration fails, determine the missing dependencies and install them on your
system. By default, CMake sets the install path on Linux to /usr/local. Use the
CMAKE_INSTALL_PREFIX option to specify a different install path.
# Building KiCad on Windows # {#build_windows}
The preferred Windows build environment is [MSYS2][]. The [MinGW][] build environment is still
supported but it is not recommended because the developer is responsible for building *all* of
the dependencies from source which is a huge and frustrating undertaking. The [MSYS2][] project
provides packages for all of the require dependencies to build KiCad. To setup the [MSYS2][]
build environment, depending on your system download and run either the [MSYS2 32-bit Installer][]
or the [MSYS2 64-bit Installer][]. After the installer is finished, update to the latest
package versions by running the `msys2_shell.bat` file located in the MSYS2 install path and
running the command `pacman -Syu`. If the msys2-runtime package is updated, close the shell
and run `msys2_shell.bat`.
## MSYS2 the Easy Way ## {#msys2_easy}
The easiest way to build KiCad using the [MSYS2][] build environment is to use the KiCad
[PKGBUILD][] provided by the MSYS2 project to build package using the head of the KiCad
development branch. To build the KiCad package, run the `msys2_shell.bat` file located in the
MSYS2 install path and run the following commands:
pacman -S git
mkdir src
cd src
git clone https://github.com/Alexpux/MINGW-packages
cd MinGW-packages/mingw-w64-kicad-git
makepkg-mingw -is
This will download and install all of the build dependencies, clone the KiCad source mirror
from Github, create both 32-bit and 64-bit KiCad packages depending on your MSYS setup, and
install the newly built KiCad packages. Please note that this build process takes a very
long time to build even on a fast system.
## MSYS2 the Hard Way ## {#msys2_hard}
If you do not want to create KiCad packages and prefer the traditional `make && make install`
method of building KiCad, your task is significantly more involved. For 64 bit builds run
the `mingw64_shell.bat` file located in the MSYS2 install path. At the command prompt run the
the following commands:
pacman -S mingw-w64-x86_64-cmake \
mingw-w64-x86_64-doxygen \
mingw-w64-x86_64-gcc \
mingw-w64-x86_64-python2 \
mingw-w64-x86_64-pkg-config \
mingw-w64-x86_64-swig \
mingw-w64-x86_64-boost \
mingw-w64-x86_64-cairo \
mingw-w64-x86_64-glew \
mingw-w64-x86_64-openssl \
mingw-w64-x86_64-wxPython \
mingw-w64-x86_64-wxWidgets
cd kicad-source
mkdir -p build/release
mkdir build/debug # Optional for debug build.
cd build/release
cmake -DCMAKE_BUILD_TYPE=Release \
-G "MSYS Makefiles" \
-DCMAKE_PREFIX_PATH=/mingw64 \
-DCMAKE_INSTALL_PREFIX=/mingw64 \
-DDEFAULT_INSTALL_PATH=/mingw64 \
-DOPENSSL_ROOT_DIR=/mingw64 \
-DKICAD_SKIP_BOOST=ON \
-DKICAD_SCRIPTING=ON \
-DKICAD_SCRIPTING_MODULES=ON \
-DKICAD_SCRIPTING_WXPYTHON=ON \
../../
make install
# Building KiCad on OSX # {#build_osx}
Building on OSX is challenging at best. It typically requires building dependency libraries
that require patching in order to work correctly. For more information on the complexities of
building KiCad on OSX, see the [OSX bundle build scripts][].
Download the wxPython source and build using the following commands:
cd path-to-wxwidgets-src
patch -p0 < path-to-kicad-src/patches/wxwidgets-3.0.0_macosx.patch
patch -p0 < path-to-kicad-src/wxwidgets-3.0.0_macosx_bug_15908.patch
patch -p0 < path-to-kicad-src/patches/wxwidgets-3.0.0_macosx_soname.patch
patch -p0 < path-to-kicad-src/patches/wxwidgets-3.0.2_macosx_yosemite.patch
patch -p0 < path-to-kicad-src/patches/wxwidgets-3.0.0_macosx_scrolledwindow.patch
mkdir build
cd build
export MAC_OS_X_VERSION_MIN_REQUIRED=10.7
../configure \
--prefix=`pwd`/../wx-bin \
--with-opengl \
--enable-aui \
--enable-utf8 \
--enable-html \
--enable-stl \
--with-libjpeg=builtin \
--with-libpng=builtin \
--with-regex=builtin \
--with-libtiff=builtin \
--with-zlib=builtin \
--with-expat=builtin \
--without-liblzma \
--with-macosx-version-min=10.7 \
--enable-universal-binary=i386,x86_64 \
CC=clang \
CXX=clang++
Build KiCad using the following commands:
cd kicad-source
mkdir -p build/release
mkdir build/debug # Optional for debug build.
cd build/release
cmake -DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 \
-DwxWidgets_CONFIG_EXECUTABLE=path-to-wx-install/bin/wx-config \
-DKICAD_SCRIPTING=ON \
-DKICAD_SCRIPTING_MODULES=ON \
-DKICAD_SCRIPTING_WXPYTHON=ON \
-DPYTHON_EXECUTABLE=path-to-python-exe/python \
-DPYTHON_SITE_PACKAGE_PATH=wx/wx-bin/lib/python2.7/site-packages \
-DCMAKE_INSTALL_PREFIX=../bin \
-DCMAKE_BUILD_TYPE=Release \
../../
make
make install
# Known Issues # {#known_issues}
There are some known issues that are platform and/or dependencie specific. This section provides
a list of the currently known issues when building KiCad.
## Boost C++ Library Issues ## {#boost_issue}
As of version 5 of [GNU GCC][], using the default configuration of downloading, patching, and
building of Boost 1.54 will cause the KiCad build to fail. Therefore a newer version of Boost
must be used to build KiCad. If your system has Boost 1.56 or greater installed, you job is
straight forward. Configure your KiCad build using `-DKICAD_SKIP_BOOST=ON`. If your system
does not have Boost 1.56 or greater installed, you will have to download and [build Boost][]
from source. If you are building Boost on windows using [MinGW][] you will have to apply the
Boost patches in the KiCad source [patch folder][].
[download]: http://kicad-pcb.org/download/
[KiCad website]: http://kicad-pcb.org/
[KiCad Launchpad]: https://launchpad.net/kicad
[GNU GCC]: https://gcc.gnu.org/
[Clang]: http://clang.llvm.org/
[CMake]: https://cmake.org/
[Launchpad]: https://code.launchpad.net/~kicad-product-committers/kicad/product
[Bazaar]: http://bazaar.canonical.com/en/
[GIT]: https://git-scm.com/
[Github]: https://github.com/KiCad/kicad-source-mirror
[Doxygen]: http://www.stack.nl/~dimitri/doxygen/
[mailing list]: https://launchpad.net/~kicad-developers
[SWIG]: http://www.swig.org/
[wxWidgets]: http://wxwidgets.org/
[patches folder]: http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/files/head:/patches/
[Boost]: http://www.boost.org/
[OpenSSL]: https://www.openssl.org/
[GLEW]: http://glew.sourceforge.net/
[GLUT]: https://www.opengl.org/resources/libraries/glut/
[Cairo]: http://cairographics.org/
[Python]: https://www.python.org/
[wxPython]: http://wxpython.org/
[MSYS2]: http://msys2.github.io/
[MSYS2 32-bit Installer]: http://repo.msys2.org/distrib/i686/msys2-i686-20150916.exe
[MSYS2 64-bit Installer]: http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20150916.exe
[PKGBUILD]: https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-kicad-git/PKGBUILD
[OSX bundle build scripts]:http://bazaar.launchpad.net/~adamwolf/+junk/kicad-mac-packaging/files
[MinGW]: http://mingw.org/
[build Boost]: http://www.boost.org/doc/libs/1_59_0/more/getting_started/index.html
+78 -5
View File
@@ -1,4 +1,4 @@
# Road Map # {#mainpage}
# Road Map #
This document is the KiCad Developer's road map document. It is a living
document that should be maintained as the project progresses. The goal of
@@ -222,7 +222,7 @@ provided by version 3 can be utilized.
- wxWidgets 3 is widely available on Linux distributions.
**Status:**
- No progress
- Build now requires 3.0.0 or greater.
## Linux Printing Improvements ## {#linux_print}
**Goal:**
@@ -428,6 +428,20 @@ Provide a method of passing information to other tools via the net list.
**Status:**
- No progress.
## Net Highlighting ## {#sch_net_highlight}
**Goal:**
Highlight wires, buses, and junctions when corresponding net in Pcbnew is selected.
**Task:**
- Add communications link to handle net selection from Pcbnew.
- Implement highlight algorithm for net objects.
- Highlight objects connected to net selected in Pcbnew.
**Dependencies:**
- [GAL port, maybe](#sch_gal).
**Status:**
- No progress.
# CvPcb: Footprint Association Tool # {#cvpcb}
This section covers the source code of the footprint assignment tool CvPcb.
@@ -522,7 +536,7 @@ Add features such as matched length and microwave tools to the P&S router.
- None
**Status:**
- No progress.
- Match trace length work in progress.
## Layer Improvements ## {#pcb_layers}
**Goal:**
@@ -539,7 +553,7 @@ Increase the number of usable technical and user defined layers in Pcbnew.
- None
**Status:**
- No progress.
- Work complete on 32 copper and 32 technical layers is complete.
## Pin and Part Swapping ## {#pcb_drc}
**Goal:**
@@ -606,6 +620,7 @@ Create additional DRC tests for improved error checking.
- Remove floating point code from clearance calculations to prevent rounding
errors.
- Add checks for component, silk screen, and mask clearances.
- Add checks for keep out zones.
- Remove DRC related limitations such as no arc or text on copper layers.
- Add option for saving and loading DRC options.
@@ -615,6 +630,49 @@ Create additional DRC tests for improved error checking.
**Progress:**
- Planning
## Segment End Point Snapping. ## {#segment_snapping}
**Goal:**
It is not uncommon for board edge segment end points to inadvertently not
be closed causing issues for the 3D viewer and exporting to different file
formats due the board outline not being a fully enclosed polygon. This
feature would add segment end snapping support to allow the board outline
to be fully enclosed. This feature would only need to be supported by the
GAL rendering.
**Tasks**
- Mark board edge segment ends with a drag indicator to make it visible to the
user that the segment end does not have an endpoint with any other board edge
segment.
- Allow the user to smap the unconnected segment end to the nearest segment end
point.
- Automatically connect unconnected segments with and additional segment when
opening the 3D viewer or exporting the board to another format. Warn the
user that an addition segment has be added and should be verified.
**Dependencies:**
- None
**Progress:**
- Initial discussion.
## Keepout Zones. ## {#keepout_zones}
**Goal:**
Add support for keepout zones on boards and footprints.
**Task:**
- Add keepout support to zone classes.
- Add keepout zone support to board editor.
- Add keepout zone support to library editor.
**Dependencies:**
- [DRC Improvements.](#drc_improvements)
**Progress:**
- Planning
## Gerber File Attributes ## {#gerber_attributes}
**Goal:**
@@ -631,7 +689,22 @@ document for more information.
- None
**Progress:**
- Under investigation.
- Done both in Pcbnew and Gerbview.
## Net Highlighting ## {#pcb_net_highlight}
**Goal:**
Highlight rats nest links and/or traces when corresponding net in Eeschema is selected.
**Task:**
- Add communications link to handle net selection from Eeschema.
- Implement highlight algorithm for objects connected to the selected net.
- Highlight objects connected to net selected in Eeschema
**Dependencies:**
- None.
**Status:**
- No progress.
# GerbView: Gerber File Viewer # {#gerbview}
@@ -0,0 +1,80 @@
# Stable Release Policy #
This document defines the project requirements that must be satisfied in order to create a new
stable release of the KiCad project. It is designed to be a reference for developers and user's
so that both groups expectations are understood. This document is only to be modified by the
project leader or at the request of the project leader. It should be noted that this policy is
not cast in stone and at any time in the future, should the decision be made by the project at
large that it can be revised to suit the ongoing needs of the project and it's users.
The current release policy is to support the concept of a lightweight stable release. The goal
is to provide regular stable releases of KiCad without the burden of trying to provide long term
support of a full stable release branch. Therefore, once a new release is created, the only
patches that will be made to the stable release branch will be for bugs that cause KiCad to crash
or possible corruption and/or loss of data. No other changes from the current development branch
will be backported to the last stable release by the project.
[TOC]
# Stable Release Interval # {#stable_release_interval}
The criteria required for new stable releases is based on the developers decision that enough
new features and/or improvements have been made to the current development branch to justify a
new stable release. This decision is completely discretionary and can be proposed at any time
by any developer on the KiCad developers mailing list. Once a request for a new stable release
is made, a consensus must be reached by the primary developers to proceed with the release with
the final decision and announcement being made by the project leader.
# Feature Freeze # {#feature_freeze}
Once the announcement has been made that a new stable release is in effect, the current
development branch is frozen. No new features or potentially disruptive core code changes can
be committed with out approval of the primary developers and/or the project leader.
# Bug Fixing # {#bug_fixing}
After the development branch has been frozen, work will continue to fix bugs reported against
the development branch. Bugs will be prioritized based on their severity. All bugs that cause
KiCad to crash or cause loss and/or corruption of data must be fixed. All other bugs must be
evaluated to see if they fit into the scope of the stable release. All bugs that fit into the
scope of the stable release will be tagged and must be fixed. All other bugs will be tagged for
the next stable release and fixed when it is convenient. Once the stable release is officially
announced, the bugs tagged as "Fix Committed" that are relevant to the stable release will be
changed to "Fix Released".
# User Documentation # {#user_docs}
The user documentation will be updated to reflect the current changes in the code. This includes
all new features, any behavioral changes to existing features, and all screen shots as required.
Completion of the English version of the user documentation is minimum that is required for
release. Foreign language translations can be released at any time as the become available.
# Stable Release Series Branch # {#stable_branch}
Once the primary developers decide that the stable release criteria has been met, a new series
branch will be created from the current product branch on Launchpad. At this time the freeze
will be removed from the product branch and normal development can resume. The stable release
version will be incremented from the previous stable release and tagged in the stable release
branch build configuration.
# System Installers # {#system_installers}
To proved the best user experience for platforms that do not have package managers, full system
installers will be provided. Currently this only pertains to Windows and OSX. The full system
installers will include all KiCad binary files, all binary library dependencies, user
documentation, component libraries, 3D model libraries, demo project files, and project template
files. Optionally, the footprint libraries can be included for users who prefer not us use the
GitHub plugin.
# Source Archives # {#source_archives}
To provide a convenient method for system packagers to build KiCad from known stable sources,
source archives in the most common formats along with the resulting md5sum checksum will be
added to either the KiCad developer's site on Launchpad or the main website at www.kicad-pcb.org.
# Stable Release Announcement # {#announcement}
Once all of the above tasks have been completed, the project leader will post an announcement on
the developers mailing list and the Launchpad site. This announcement should include a list of
new features and improvements made since the previous stable release.
@@ -0,0 +1,5 @@
#!/bin/bash
pandoc -f markdown_mmd -t html interactive_router.mmd > interactive_router.html
pandoc -f markdown_mmd -t latex interactive_router.mmd > tmp.tex
pdflatex interactive_router.tex
@@ -0,0 +1,73 @@
# Interactive Router #
The Interactive Router lets you quickly and efficient route your PCBs by shoving off or walking around items on the PCB that collide with the trace you are currently drawing.
Following modes are supported:
- **Shove**, attempting to push and shove all items colliding with the currently routed track.
- **Walk around**, trying to avoid obstacles by hugging/walking around them.
- **Highlight collisions** which highlights all violating objects with a nice, shiny green color and shows violating clearance regions.
## Setting up ##
Before using the Interactive Router, please set up these two things:
- Clearance settings. To set the clearances, open the *Design Rules* dialog and make sure at least the default clearance
value looks sensible.
- Enable OpenGL mode by selecting *View->Switch canvas to OpenGL* menu option or pressing **F11**.
![Screenshot](pictures/opengl_menu.png)
## Laying out tracks ##
To activate the router tool press the *Interactive Router* button ![Interactive Router Button](pictures/route_icon.png) or the **X** key.
The cursor will turn into a cross and the tool name, will appear in the status bar.
To start a track, click on any item (a pad, track or a via) or press the **X** key again hovering the mouse over that item.
The new track will use the net of the starting item. Clicking or pressing **X** on empty PCB space starts a track with no net assigned.
Move the mouse to define shape of the track. The router will try to follow mouse trail, hugging unmovable obstacles
(such as pads) and shoving colliding traces/vias, depending on the mode. Retreating mouse cursor will cause the shoved items to spring back
to their former locations.
Clicking on a pad/track/via in the same net finishes routing. Clicking in empty space fixes the segments routed so far and continues routing the trace.
In order to stop routing and undo all changes (shoved items, etc.), simply press **Esc**.
Pressing **V** or selecting *Place Through Via* from the context menu while routing a track attaches a via at the end of the trace being routed.
Pressing **V** again disables via placement. Clicking in any spot establishes the via and continues routing.
Pressing **/** or selecting *Switch Track Posture* from the context menu toggles the direction of the initial track segment between straight or diagonal.
**Note**: By default, the router snaps to centers/axes of the items. Snapping can be disabled by holding **Shift** while routing or selecting items.
## Setting track widths and via sizes ##
There are several ways to pre-select a track width/via size or to change it during routing:
- Use standard Kicad shortcuts.
- Press **W** or select *Custom Track Width* from the context menu to type in a custom width/via size.
- Pick a predefined width from the *Select Track Width* sub-menu of the context menu.
- Select *Use the starting track width* in the *Select Track Width* menu to pick the width from the start item (or the traces already connected to it).
## Dragging ##
The router can drag track segments, corners and vias. To drag an item, click on it with **Ctrl** key pressed, hover the mouse and press **G** or select *Drag Track/Via* from the context menu.
Finish dragging by clicking again or abort by pressing *Esc*.
## Options ##
The router behavior be configured by pressing *E* or selecting *Routing Options* from the context menu. It opens a window like the one below:
![Screenshot](pictures/router_options.png)
The options are:
- **Mode** - select how the router handles DRC violation (shoving, walking around, etc.)
- **Shove vias** - when disabled, vias are treated as un-movable objects and hugged instead of shoved.
- **Jump over obstacles** - when enabled, the router tries to move colliding traces behind solid obstacles (e.g. pads) instead of "reflecting" back the collision
- **Remove redundant tracks** - removes loops while routing (e.g. if the new track ensures same connectivity as an already existing one, the old track is removed). Loop removal works locally (only between the start and end of the currently routed trace).
- **Automatic neckdown** - when enabled, the router tries to break out pads/vias in a clean way, avoiding acute angles and jagged breakout traces.
- **Smooth dragged segments** - when enabled, the router attempts to merge several jagged segments into a single straight one (dragging mode).
- **Allow DRC violations** (*Highlight collisions* mode only) - allows to establish a track even if is violating the DRC rules.
- **Optimizer effort** - defines how much time the router shall spend optimizing the routed/shoved traces. More effort means cleaner routing (but slower), less effort means faster routing but somewhat jagged traces.
Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

-11
View File
@@ -1,11 +0,0 @@
So, finally we've got an integrated interactive, push-and-sometimes-shove router, although with a very limited user interface:
- Edit->Interactive router launches the tool,
- while routing: 'V' key places a via,
- '+' and '-' keys cycle through available layers,
- '/' key switches track posture.
Via/track dimensions are taken from the netclasses.
There are no other options available for the time being - promise to add them soon :)
Tom
+11 -47
View File
@@ -1,56 +1,20 @@
--== notes about wxWidgets problems ==--
Last Revised: 28-Feb-2010
Last Revised: 02-jul-2015
Kicad needs wxWidgets, the multi platform G.U.I toolkit.
Kicad needs wxWidgets, the multi platform G.U.I.
Known problems:
wxMSW:
use *only* wxWidgets >= 3.0
wxGTK
Use wxWidgets 2.8.10 or later
Linux and macOSX
- Printing problems (all version).
Note old versions of wxWidgets give *very ugly results*
(poor printing resolution set to 72ppi)
So use a very recent version (>= 2.8.10 (that also solve other bugs)
wxWidgets patch:
wxWidgets 2.9.1 (all platforms)
Has a problem when using the built in string to double conversion:
In countries using a comm instead of a point as floating number separator
after calling this conversion function, the comma is changed in point.
(Happens after reading a parameter stored in a wxConfig structure, if this
parameter is a double)
Workaround:
Use a version >= 2.9.3
*************************************************************************************
wxGTK version: All before wxWidgets 3.0
*************************************************************************************
Patch for printing wide traces that were shown with missing rounded end caps.
Without this patch, printing boards and schematics under Linux, and perhaps OSX
gives ugly drawings.
wxGTK-2.8.11/src/generic/dcpsg.cpp
search for:
line 1636
PsPrint( "%%EndProlog\n" );
Add after this line:
PsPrint("%%BeginSetup\n");
PsPrint( "1 setlinecap\n" );
PsPrint("%%EndSetup\n");
use *only* wxWidgets
>= 3.0.1 On Windows
>= 3.0.2 on Linux (prevision versions have bugs which crash Kicad)
>= 3.0.2 on OSX (which need patches: see patches/wxwidgets-3.0.0_macosx_xxx)
Known bug on Windows:
Postscript printers print tracks like tin line.
Postscript printers print tracks like thin line.
It happens only for PS drivers, and PDF printer.
Other drivers (PCL for instance) work fine,
so it is unlikely a bug inside Kicad/wxWidgets
On 3.0.2 Window version 64 bits:
The mirror mode gives a blank sheet.
This is a bug in wxWidgets 3.0.2
wxWidgets 3.0.2 must be patched (see patches/wxWidgets-3.0.2-msw-dc-orientation-fix.patch) and rebuilt.
+6 -31
View File
@@ -324,22 +324,6 @@ INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
# determine which symbols to keep in memory and which to flush to disk.
# When the cache is full, less often used symbols will be written to disk.
# For small to medium size projects (<1000 input files) the default value is
# probably good enough. For larger projects a too small cache size can cause
# doxygen to be busy swapping symbols to and from disk most of the time
# causing a significant performance penalty.
# If the system has enough physical memory increasing the cache will improve the
# performance by keeping more symbols in memory. Note that the value works on
# a logarithmic scale so increasing the size by one will roughly double the
# memory usage. The cache size is given by this formula:
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols.
SYMBOL_CACHE_SIZE = 4
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
# their name and scope. Since this can be an expensive process and often the
@@ -661,7 +645,10 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = Documentation/development/road-map.md \
INPUT = Documentation/development/coding-style-policy.md \
Documentation/development/stable-release-policy.md \
Documentation/development/road-map.md \
Documentation/development/compiling.md \
kicad \
pcbnew \
cvpcb \
@@ -705,7 +692,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE = include/boost
EXCLUDE = polygon/clipper.cpp
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
@@ -1226,7 +1213,7 @@ MATHJAX_EXTENSIONS =
# typically be disabled. For large projects the javascript based search engine
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
SEARCHENGINE = NO
SEARCHENGINE = YES
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a PHP enabled web server instead of at the web client
@@ -1423,18 +1410,6 @@ GENERATE_XML = NO
XML_OUTPUT = xml
# The XML_SCHEMA tag can be used to specify an XML schema,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
XML_SCHEMA =
# The XML_DTD tag can be used to specify an XML DTD,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
XML_DTD =
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting
# and cross-referencing information) to the XML output. Note that
+35 -87
View File
@@ -24,87 +24,43 @@ Installation from binary packages
Installation from binary packages for Windows
---------------------------------------------
KiCad can be installed in 'C:\kicad', 'D:\kicad', 'C:\Program files\kicad',
'D:\Program files\kicad'.
The KiCad binary archive can be installed anywhere on the system that as long as the user
has write privileges.
For example, for an installation in the folder 'C:\kicad', unzip KiCad
packages:
kicad-{version}.zip
kicad-doc-{version}.zip
kicad-library-{version}.zip
to the folder 'C:\kicad'.
The main program is the project manager (kicad.exe) and from it you can run
the other programs (schematic editor - eeschema, pcb editor - pcbnew,
utilities: cvpcb and gerbview).
You can create a shortcut to 'C:\kicad\bin\kicad.exe'.
You can create a shortcut to '${prefix}\bin\kicad.exe' where ${prefix} is the install path.
Installation from binary packages for Linux
-------------------------------------------
KiCad can be installed in '/usr' or '/usr/local'.
KiCad can be installed in '/usr' or '/usr/local'. You must have "root" access for installation.
You must have "root" access for installation.
cd /
tar -xjf kicad-{version}.tbz2
tar -xjf kicad-doc-{version}.tbz2
tar -xjf kicad-library-{version}.tbz2
cd /
tar -xjf kicad-{version}.tbz2
tar -xjf kicad-doc-{version}.tbz2
tar -xjf kicad-library-{version}.tbz2
The main program is '/usr/bin/kicad'.
The main program is '/usr/bin/kicad'.
Windows KiCad tree
------------------
Linux and Windows KiCad install tree
-------------------------------------
kicad/bin - Binaries (executable files).
kicad/doc - Various documentation.
kicad/doc/help - Interactive help.
kicad/share/demos - Sample schematics and printed boards.
kicad/share/internat - Interface localization files.
kicad/share/library - Libraries for schematic.
kicad/share/modules - Module libraries for printed boards.
kicad/share/modules/packages3d - 3D component models (.wrl and .wings format).
${prefix}/bin - Binaries (executable files).
${prefix}/share/doc/kicad/ - Various documentation.
${prefix}/share/doc/kicad/help - Interactive help.
${prefix}/share/kicad/demos - Sample schematics and printed boards.
${prefix}/share/kicad/internat - Dictionaries for interface localization.
${prefix}/share/kicad/library - Interface localization files.
${prefix}/share/kicad/modules - Module libraries for printed boards.
${prefix}/share/kicad/modules/packages3d - 3D component models (.wrl and .wings format).
Files '*.mod' are libraries, and files '*.brd' are printed boards you can
view with pcbnew.
Files *.brd show the existing modules (and 3D shapes) in libraries.
Linux KiCad tree
----------------
KiCad can use the Windows tree or the below tree.
When Kicad is coming from Linux distribution, the tree is:
/usr/bin - Binaries (executable files).
/usr/share/doc/kicad/ - Various documentation.
/usr/share/doc/kicad/help - Interactive help.
/usr/share/kicad/demos - Sample schematics and printed boards.
/usr/share/kicad/internat - Dictionaries for interface localization.
/usr/share/kicad/library - Interface localization files.
/usr/share/kicad/modules - Module libraries for printed boards.
/usr/share/kicad/modules/packages3d - 3D component models (.wrl and .wings format).
if KiCad does not found its files in usr/share, the search is made in
/usr/local/kicad
and kicad uses the same tree as the Windows KiCad tree above
*** When KiCad comes from .tgz archive from http://iut-tice.ujf-grenoble.fr/cao/,
it must me installed in /usr/local and uses the Windows tree ***.
Files '*.mod' are the libraries, and files '*.brd' are printed boards you can
view with pcbnew.
Files *.brd show the existing modules (and 3D shapes) in libraries.
KiCad searches for the libraries, templates, 3D models, etc. bin/../share.
Warning:
Do not change the KiCad tree, or the location of binary files,
else KiCad will not be able to find its required files (configuration,
libraries, etc.).
Do not change the KiCad tree, or the location of binary files. Otherwise
KiCad may not be able to find some or all of its required files.
Mac OS X KiCad tree
-------------------
@@ -122,35 +78,35 @@ User files can be the same as the system wide files but only inside the users ho
$HOME/Library/Application Support/kicad
Warning:
These paths are hardcoded into KiCad, if you put them somewhere else KiCad will not find them when a new
project is created.
These paths are hardcoded into KiCad, if you put them somewhere else KiCad will not find
them when a new project is created.
Installation from source code
-----------------------------
Some dependencies must be satisfied for the correct installation of KiCad:
under Linux:
wxWidgets >= 2.8.11 http://www.wxwidgets.org/
(needs to be compiled with unicode support)
under Windows:MacOSX
wxWidgets >= 2.9.4 http://www.wxwidgets.org/
CMake >= 2.8.1 http://www.cmake.org/
wxWidgets >= 3.0.0 http://www.wxwidgets.org/
CMake >= 2.8.4 http://www.cmake.org/
Boost C++ Libraries:
files used by kicad are autmatically downloaded and patched if needed
from boost site ( http://www.boost.org/ )
OpenGL
Linux: Mesa 3D Graphics Library http://www.mesa3d.org/
Windows: built-in
Zlib Compression Library http://www.zlib.net/
In source-tree-build are mostly unwanted, so make a subdir called "build" and
In source-tree-build are mostly unwanted, so make a subdir called "build" and
change to it.
Call cmake with the path to KiCad. E.g., when your build-folder is "build"
Call cmake with the path to KiCad. E.g., when your build-folder is "build"
within source-tree, type "cmake ../".
Now your system get checked if it is able compiling KiCad and cmake generates
Now your system get checked if it is able compiling KiCad and cmake generates
the Makefiles.
After calling cmake just type "make" and build begins.
@@ -185,14 +141,6 @@ Required for Windows platform.
-DwxWidgets_USE_DEBUG=ON
Can be used only with -DCMAKE_BUILD_TYPE=Debug
-DwxWidgets_USE_STATIC=ON
For building statically linked executables. Can be used only if wxWidgets
configured and builded with "--enable-monolithic --disable-shared" parameters.
-DwxWidgets_USE_STATIC=OFF
For building dinamically linked executables. Can be used only if wxWidgets
configured and builded with "--disable-monolithic --enable-shared" parameters.
-DKICAD_KEEPCASE=ON
Build the KiCad with no component name conversion to uppercase (if you want your
ADuC.../Si.../bq... components named as just so).
@@ -207,7 +155,7 @@ When more output is wanted use this cmake parameter or call "make VERBOSE=1".
Extra CFLAGS and linker flags
-----------------------------
If you require extra flags for compiler and linker you may give them via
If you require extra flags for compiler and linker you may give them via
environment variables
"CXXFLAGS" (c++ compiler)
"LDFLAGS" (for linker)
+11 -12
View File
@@ -60,18 +60,17 @@ PCBNew
*) Paste (module ...) from clipboard into module editor.
Dick's Final TODO List:
======================
*) Milestone B of Modular KiCad Blueprint:
* Put SEARCH_STACK::LastVisitedPath() out of its misery.
* Combine CVPCB into PCBNEW.
*) Milestone C of Modular KiCad Blueprint
* SWIG class KIWAY, PROJECT, and KIWAY_MGR and fill out KIWAY_MGR as needed.
* Implement PROJECT::Substitute().
* Other stuff in blueprint milestone.
*) Get licensing cleaned up.
*) DLL-ization of pcbnew & eeschema
http://www.eevblog.com/forum/open-source-kicad-geda/seriously-irritated-with-the-library-editor!/
https://blueprints.launchpad.net/kicad/+spec/modular-kicad
Issues as a result of minimal testing:
* If eeschema launched from C++ project manager and does not find all libraries,
then the dialog showing the names of missing libraries is shown twice.
* Clear all/some? retained strings on project change.
* Clear the FP_LIB_TABLE when the last KIWAY_PLAYER using it is closed.
+41 -18
View File
@@ -3,6 +3,7 @@ include_directories( BEFORE ${INC_BEFORE} )
include_directories(
../potrace
../common
../polygon
${INC_AFTER}
)
@@ -20,6 +21,17 @@ set_source_files_properties( bitmap2cmp_gui.cpp PROPERTIES
COMPILE_DEFINITIONS "COMPILING_DLL"
)
if( APPLE )
# setup bundle
set( BITMAP2COMPONENT_RESOURCES bitmap2component.icns )
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/bitmap2component.icns" PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set( MACOSX_BUNDLE_ICON_FILE bitmap2component.icns )
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-pcb.kicad )
set( MACOSX_BUNDLE_NAME bitmap2component )
endif()
add_executable( bitmap2component WIN32 MACOSX_BUNDLE
${BITMAP2COMPONENT_SRCS}
${BITMAP2COMPONENT_RESOURCES}
@@ -33,10 +45,35 @@ target_link_libraries( bitmap2component
potrace
)
install( TARGETS bitmap2component
DESTINATION ${KICAD_BIN}
COMPONENT binary
)
if( APPLE )
set_target_properties( bitmap2component PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
)
# put individual bundle outside of main bundle as a first step
# will be pulled into the main bundle when creating main bundle
install( TARGETS bitmap2component
DESTINATION ${KICAD_BIN}
COMPONENT binary
)
install( CODE "
# override default embedded path settings
${OSX_BUNDLE_OVERRIDE_PATHS}
# do all the work
include( BundleUtilities )
fixup_bundle( ${KICAD_BIN}/bitmap2component.app/Contents/MacOS/bitmap2component
\"\"
\"\"
)
" COMPONENT Runtime
)
else()
install( TARGETS bitmap2component
DESTINATION ${KICAD_BIN}
COMPONENT binary
)
endif()
if( false ) # linker map with cross reference
@@ -52,17 +89,3 @@ if( MINGW )
else()
set( BITMAP2COMPONENT_RESOURCES bitmap2component.rc )
endif()
if( APPLE )
set( BITMAP2COMPONENT_RESOURCES bitmap2component.icns )
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/bitmap2component.icns" PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set( MACOSX_BUNDLE_ICON_FILE bitmap2component.icns )
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.bitmap2component )
set_target_properties( bitmap2component PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
)
endif()
+1 -1
View File
@@ -13,7 +13,7 @@
<key>CFBundleIconFile</key>
<string>bitmap2component.icns</string>
<key>CFBundleIdentifier</key>
<string>org.kicad-eda.bitmap2component</string>
<string>org.kicad-pcb.bitmap2component</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
+122 -84
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 1992-2010 jean-pierre.charras
* Copyright (C) 1992-2010 Kicad Developers, see change_log.txt for contributors.
* Copyright (C) 1992-2015 Kicad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -29,8 +29,10 @@
#include <wxstruct.h>
#include <confirm.h>
#include <gestfich.h>
#include <wildcards_and_files_ext.h>
#include <bitmap2cmp_gui_base.h>
#include <bitmap2component.h>
#include <potracelib.h>
#include <bitmap_io.h>
@@ -41,6 +43,7 @@
#include <kiway.h>
#include <kiface_i.h>
#define KEYWORD_FRAME_POSX wxT( "Bmconverter_Pos_x" )
#define KEYWORD_FRAME_POSY wxT( "Bmconverter_Pos_y" )
#define KEYWORD_FRAME_SIZEX wxT( "Bmconverter_Size_x" )
@@ -48,13 +51,15 @@
#define KEYWORD_LAST_INPUT_FILE wxT( "Last_input" )
#define KEYWORD_LAST_OUTPUT_FILE wxT( "Last_output" )
#define KEYWORD_LAST_FORMAT wxT( "Last_format" )
#define KEYWORD_LAST_MODLAYER wxT( "Last_modlayer" )
#define KEYWORD_BINARY_THRESHOLD wxT( "Threshold" )
#define KEYWORD_BW_NEGATIVE wxT( "Negative_choice" )
#define DEFAULT_DPI 300 // Default resolution in Bit per inches
extern int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
int aFormat, int aDpi_X, int aDpi_Y );
OUTPUT_FMT_ID aFormat, int aDpi_X, int aDpi_Y,
BMP2CMP_MOD_LAYER aModLayer );
/**
* Class BM2CMP_FRAME_BASE
@@ -63,19 +68,19 @@ extern int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
class BM2CMP_FRAME : public BM2CMP_FRAME_BASE
{
private:
wxImage m_Pict_Image;
wxBitmap m_Pict_Bitmap;
wxImage m_Greyscale_Image;
wxBitmap m_Greyscale_Bitmap;
wxImage m_NB_Image;
wxBitmap m_BN_Bitmap;
wxSize m_imageDPI; // The initial image resolution. When unknown,
wxImage m_Pict_Image;
wxBitmap m_Pict_Bitmap;
wxImage m_Greyscale_Image;
wxBitmap m_Greyscale_Bitmap;
wxImage m_NB_Image;
wxBitmap m_BN_Bitmap;
wxSize m_imageDPI; // The initial image resolution. When unknown,
// set to DEFAULT_DPI x DEFAULT_DPI per Inch
wxString m_BitmapFileName;
wxString m_ConvertedFileName;
wxSize m_frameSize;
wxPoint m_framePos;
wxConfig* m_config;
wxString m_BitmapFileName;
wxString m_ConvertedFileName;
wxSize m_frameSize;
wxPoint m_framePos;
wxConfigBase* m_config;
public:
BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent );
@@ -92,17 +97,15 @@ private:
void OnExport( wxCommandEvent& event );
/**
* Generate a schematic library which comtains one component:
* Generate a schematic library which contains one component:
* the logo
*/
void OnExportEeschema();
/**
* Depending on the option:
* Legacy format: generate a module library which comtains one component
* New kicad_mod format: generate a module in S expr format
* Generate a module in S expr format
*/
void OnExportPcbnew( bool aLegacyFormat );
void OnExportPcbnew();
/**
* Generate a postscript file
@@ -121,22 +124,24 @@ private:
void OnResolutionChange( wxCommandEvent& event );
// called when texts controls which handle the image resolution
// lose the focus, to ensure the rigyht vaules are displayed
// lose the focus, to ensure the right values are displayed
// because the m_imageDPI are clipped to acceptable values, and
// the text displayed could be differ duringa text edition
// the text displayed could be differ during text edition
// We are using ChangeValue here to avoid generating a wxEVT_TEXT event.
void UpdateDPITextValueX( wxMouseEvent& event )
{
m_DPIValueX->ChangeValue( wxString::Format( wxT( "%d" ), m_imageDPI.x ) );
}
void UpdateDPITextValueY( wxMouseEvent& event )
{
m_DPIValueY->ChangeValue( wxString::Format( wxT( "%d" ), m_imageDPI.y ) );
}
void NegateGreyscaleImage( );
void ExportFile( FILE* aOutfile, int aFormat );
void ExportFile( FILE* aOutfile, OUTPUT_FMT_ID aFormat );
void updateImageInfo();
void OnFormatChange( wxCommandEvent& event );
};
@@ -146,7 +151,7 @@ BM2CMP_FRAME::BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
SetKiway( this, aKiway );
int tmp;
m_config = new wxConfig();
m_config = GetNewConfig( Pgm().App().GetAppName() );
m_config->Read( KEYWORD_FRAME_POSX, & m_framePos.x, -1 );
m_config->Read( KEYWORD_FRAME_POSY, & m_framePos.y, -1 );
m_config->Read( KEYWORD_FRAME_SIZEX, & m_frameSize.x, -1 );
@@ -160,8 +165,26 @@ BM2CMP_FRAME::BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
if( m_config->Read( KEYWORD_BW_NEGATIVE, &tmp ) )
m_rbOptions->SetSelection( tmp ? 1 : 0 );
m_config->Read( KEYWORD_LAST_FORMAT, &tmp );
m_radioBoxFormat->SetSelection( tmp );
if( m_config->Read( KEYWORD_LAST_FORMAT, &tmp ) )
{
if( tmp < 0 || tmp > FINAL_FMT )
tmp = PCBNEW_KICAD_MOD;
m_radioBoxFormat->SetSelection( tmp );
}
if( tmp == PCBNEW_KICAD_MOD )
m_radio_PCBLayer->Enable( true );
else
m_radio_PCBLayer->Enable( false );
if( m_config->Read( KEYWORD_LAST_MODLAYER, &tmp ) )
{
if( (unsigned) tmp > MOD_LYR_FINAL ) // Out of range
m_radio_PCBLayer->SetSelection( MOD_LYR_FSILKS );
else
m_radio_PCBLayer->SetSelection( tmp );
}
// Give an icon
wxIcon icon;
@@ -198,6 +221,7 @@ BM2CMP_FRAME::~BM2CMP_FRAME()
m_config->Write( KEYWORD_BINARY_THRESHOLD, m_sliderThreshold->GetValue() );
m_config->Write( KEYWORD_BW_NEGATIVE, m_rbOptions->GetSelection() );
m_config->Write( KEYWORD_LAST_FORMAT, m_radioBoxFormat->GetSelection() );
m_config->Write( KEYWORD_LAST_MODLAYER, m_radio_PCBLayer->GetSelection() );
delete m_config;
@@ -226,7 +250,7 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event )
m_BNPicturePanel->PrepareDC( nb_dc );
// OSX crashes with empty bitmaps (on initial refreshes)
if(m_Pict_Bitmap.IsOk() && m_Greyscale_Bitmap.IsOk() && m_BN_Bitmap.IsOk())
if( m_Pict_Bitmap.IsOk() && m_Greyscale_Bitmap.IsOk() && m_BN_Bitmap.IsOk() )
{
pict_dc.DrawBitmap( m_Pict_Bitmap, 0, 0, false );
greyscale_dc.DrawBitmap( m_Greyscale_Bitmap, 0, 0, false );
@@ -235,19 +259,17 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event )
}
/* Called to load a bitmap file
*/
void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
{
wxFileName fn( m_BitmapFileName );
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
path = wxGetCwd();
if( path.IsEmpty() || !wxDirExists( path ) )
path = m_mruPath;
wxFileDialog fileDlg( this, _( "Choose Image" ), path, wxEmptyString,
_( "Image Files " ) + wxImage::GetImageExtWildcard(),
wxFD_OPEN );
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
int diag = fileDlg.ShowModal();
@@ -259,6 +281,8 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
if( !OpenProjectFiles( std::vector<wxString>( 1, fullFilename ) ) )
return;
fn = fullFilename;
m_mruPath = fn.GetPath();
m_buttonExport->Enable( true );
SetStatusText( fullFilename );
Refresh();
@@ -273,14 +297,7 @@ bool BM2CMP_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, int
if( !m_Pict_Image.LoadFile( m_BitmapFileName ) )
{
/* LoadFile has its own UI, no need for further failure notification here
wxString msg = wxString::Format(
_( "Could not load image '%s'" ),
GetChars( aFilename )
);
wxMessageBox( msg );
*/
// LoadFile has its own UI, no need for further failure notification here
return false;
}
@@ -333,11 +350,12 @@ bool BM2CMP_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, int
return true;
}
void BM2CMP_FRAME::updateImageInfo()
{
// Note: the image resolution text controls are not modified
// here, to avoid a race between text change when entered by user and
// a text change if it is modifed here.
// a text change if it is modified here.
int h = m_Pict_Bitmap.GetHeight();
int w = m_Pict_Bitmap.GetWidth();
int nb = m_Pict_Bitmap.GetDepth();
@@ -352,6 +370,7 @@ void BM2CMP_FRAME::updateImageInfo()
(double) h / m_imageDPI.y * 25.4 ) );
}
void BM2CMP_FRAME::OnResolutionChange( wxCommandEvent& event )
{
long tmp;
@@ -371,6 +390,7 @@ void BM2CMP_FRAME::OnResolutionChange( wxCommandEvent& event )
updateImageInfo();
}
void BM2CMP_FRAME::Binarize( double aThreshold )
{
unsigned int pixin;
@@ -411,10 +431,10 @@ void BM2CMP_FRAME::NegateGreyscaleImage( )
}
}
/* Called on Normal/Negative change option */
void BM2CMP_FRAME::OnOptionsSelection( wxCommandEvent& event )
{
NegateGreyscaleImage( );
NegateGreyscaleImage();
m_Greyscale_Bitmap = wxBitmap( m_Greyscale_Image );
Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() );
Refresh();
@@ -430,27 +450,25 @@ void BM2CMP_FRAME::OnThresholdChange( wxScrollEvent& event )
void BM2CMP_FRAME::OnExport( wxCommandEvent& event )
{
int sel = m_radioBoxFormat->GetSelection();
// choices of m_radioBoxFormat are expected to be in same order as
// OUTPUT_FMT_ID. See bitmap2component.h
OUTPUT_FMT_ID sel = (OUTPUT_FMT_ID) m_radioBoxFormat->GetSelection();
switch( sel )
{
case 0:
case EESCHEMA_FMT:
OnExportEeschema();
break;
case 1:
OnExportPcbnew( true );
case PCBNEW_KICAD_MOD:
OnExportPcbnew();
break;
case 2:
OnExportPcbnew( false );
break;
case 3:
case POSTSCRIPT_FMT:
OnExportPostScript();
break;
case 4:
case KICAD_LOGO:
OnExportLogo();
break;
}
@@ -465,16 +483,18 @@ void BM2CMP_FRAME::OnExportLogo()
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
wxString msg = _( "Logo file (*.kicad_wks)|*.kicad_wks" );
wxFileDialog fileDlg( this, _( "Create a logo file" ), path, wxEmptyString,
msg,
wxFileDialog fileDlg( this, _( "Create a logo file" ),
path, wxEmptyString,
wxGetTranslation( PageLayoutDescrFileWildcard ),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = fileDlg.ShowModal();
if( diag != wxID_OK )
return;
m_ConvertedFileName = fileDlg.GetPath();
fn = fileDlg.GetPath();
fn.SetExt( PageLayoutDescrFileExtension );
m_ConvertedFileName = fn.GetFullPath();
FILE* outfile;
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
@@ -482,12 +502,12 @@ void BM2CMP_FRAME::OnExportLogo()
if( outfile == NULL )
{
wxString msg;
msg.Printf( _( "File %s could not be created" ), m_ConvertedFileName.c_str() );
msg.Printf( _( "File '%s' could not be created." ), GetChars( m_ConvertedFileName ) );
wxMessageBox( msg );
return;
}
ExportFile( outfile, 4 );
ExportFile( outfile, KICAD_LOGO );
fclose( outfile );
}
@@ -500,9 +520,9 @@ void BM2CMP_FRAME::OnExportPostScript()
if( path.IsEmpty() || !wxDirExists( path ) )
path = ::wxGetCwd();
wxString msg = _( "Postscript file (*.ps)|*.ps" );
wxFileDialog fileDlg( this, _( "Create a Postscript file" ), path, wxEmptyString,
msg,
wxFileDialog fileDlg( this, _( "Create a Postscript file" ),
path, wxEmptyString,
wxGetTranslation( PSFileWildcard ),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = fileDlg.ShowModal();
@@ -510,7 +530,9 @@ void BM2CMP_FRAME::OnExportPostScript()
if( diag != wxID_OK )
return;
m_ConvertedFileName = fileDlg.GetPath();
fn = fileDlg.GetPath();
fn.SetExt( wxT( "ps" ) );
m_ConvertedFileName = fn.GetFullPath();
FILE* outfile;
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
@@ -518,12 +540,12 @@ void BM2CMP_FRAME::OnExportPostScript()
if( outfile == NULL )
{
wxString msg;
msg.Printf( _( "File %s could not be created" ), m_ConvertedFileName.c_str() );
msg.Printf( _( "File '%s' could not be created." ), GetChars( m_ConvertedFileName ) );
wxMessageBox( msg );
return;
}
ExportFile( outfile, 3 );
ExportFile( outfile, POSTSCRIPT_FMT );
fclose( outfile );
}
@@ -536,10 +558,9 @@ void BM2CMP_FRAME::OnExportEeschema()
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
wxString msg = _( "Schematic lib file (*.lib)|*.lib" );
wxFileDialog fileDlg( this, _( "Create a lib file for Eeschema" ), path, wxEmptyString,
msg,
wxFileDialog fileDlg( this, _( "Create a component library file for Eeschema" ),
path, wxEmptyString,
wxGetTranslation( SchematicLibraryFileWildcard ),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = fileDlg.ShowModal();
@@ -547,38 +568,36 @@ void BM2CMP_FRAME::OnExportEeschema()
if( diag != wxID_OK )
return;
m_ConvertedFileName = fileDlg.GetPath();
fn = fileDlg.GetPath();
fn.SetExt( SchematicLibraryFileExtension );
m_ConvertedFileName = fn.GetFullPath();
FILE* outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
if( outfile == NULL )
{
wxString msg;
msg.Printf( _( "File %s could not be created" ), m_ConvertedFileName.c_str() );
msg.Printf( _( "File '%s' could not be created." ), GetChars( m_ConvertedFileName ) );
wxMessageBox( msg );
return;
}
ExportFile( outfile, 2 );
ExportFile( outfile, EESCHEMA_FMT );
fclose( outfile );
}
void BM2CMP_FRAME::OnExportPcbnew( bool aLegacyFormat )
void BM2CMP_FRAME::OnExportPcbnew()
{
wxFileName fn( m_ConvertedFileName );
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists( path ) )
path = ::wxGetCwd();
path = m_mruPath;
wxString msg = aLegacyFormat ?
_( "Footprint file (*.emp)|*.emp" ) :
_( "Footprint file (*.kicad_mod)|*.kicad_mod" );
wxFileDialog fileDlg( this, _( "Create a footprint file for PcbNew" ),
wxFileDialog fileDlg( this, _( "Create a footprint file for Pcbnew" ),
path, wxEmptyString,
msg,
wxGetTranslation( KiCadFootprintLibFileWildcard ),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = fileDlg.ShowModal();
@@ -586,24 +605,27 @@ void BM2CMP_FRAME::OnExportPcbnew( bool aLegacyFormat )
if( diag != wxID_OK )
return;
m_ConvertedFileName = fileDlg.GetPath();
fn = fileDlg.GetPath();
fn.SetExt( KiCadFootprintFileExtension );
m_ConvertedFileName = fn.GetFullPath();
FILE* outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
if( outfile == NULL )
{
wxString msg;
msg.Printf( _( "File %s could not be created" ), m_ConvertedFileName.c_str() );
msg.Printf( _( "File '%s' could not be created." ), GetChars( m_ConvertedFileName ) );
wxMessageBox( msg );
return;
}
ExportFile( outfile, aLegacyFormat ? 0 : 1 );
ExportFile( outfile, PCBNEW_KICAD_MOD );
fclose( outfile );
m_mruPath = fn.GetPath();
}
void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat )
void BM2CMP_FRAME::ExportFile( FILE* aOutfile, OUTPUT_FMT_ID aFormat )
{
// Create a potrace bitmap
int h = m_NB_Image.GetHeight();
@@ -628,7 +650,14 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat )
}
}
bitmap2component( potrace_bitmap, aOutfile, aFormat, m_imageDPI.x, m_imageDPI.y );
// choices of m_radio_PCBLayer are expected to be in same order as
// BMP2CMP_MOD_LAYER. See bitmap2component.h
BMP2CMP_MOD_LAYER modLayer = MOD_LYR_FSILKS;
if( aFormat == PCBNEW_KICAD_MOD )
modLayer = (BMP2CMP_MOD_LAYER) m_radio_PCBLayer->GetSelection();
bitmap2component( potrace_bitmap, aOutfile, aFormat, m_imageDPI.x, m_imageDPI.y, modLayer );
}
@@ -711,3 +740,12 @@ bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits )
return start_common( aCtlBits );
}
void BM2CMP_FRAME::OnFormatChange( wxCommandEvent& event )
{
if( m_radioBoxFormat->GetSelection() == PCBNEW_KICAD_MOD )
m_radio_PCBLayer->Enable( true );
else
m_radio_PCBLayer->Enable( false );
event.Skip();
}
+21 -11
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 5 2013)
// C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -16,22 +16,22 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxHORIZONTAL );
m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_InitialPicturePanel = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
m_Notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_InitialPicturePanel = new wxScrolledWindow( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
m_InitialPicturePanel->SetScrollRate( 5, 5 );
m_InitialPicturePanel->SetMinSize( wxSize( 400,300 ) );
m_notebook1->AddPage( m_InitialPicturePanel, _("Original Picture"), true );
m_GreyscalePicturePanel = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
m_Notebook->AddPage( m_InitialPicturePanel, _("Original Picture"), true );
m_GreyscalePicturePanel = new wxScrolledWindow( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
m_GreyscalePicturePanel->SetScrollRate( 5, 5 );
m_GreyscalePicturePanel->SetMinSize( wxSize( 400,300 ) );
m_notebook1->AddPage( m_GreyscalePicturePanel, _("Greyscale Picture"), false );
m_BNPicturePanel = new wxScrolledWindow( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
m_Notebook->AddPage( m_GreyscalePicturePanel, _("Greyscale Picture"), false );
m_BNPicturePanel = new wxScrolledWindow( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
m_BNPicturePanel->SetScrollRate( 5, 5 );
m_notebook1->AddPage( m_BNPicturePanel, _("Black&&White Picture"), false );
m_Notebook->AddPage( m_BNPicturePanel, _("Black&&White Picture"), false );
bMainSizer->Add( m_notebook1, 1, wxEXPAND, 5 );
bMainSizer->Add( m_Notebook, 1, wxEXPAND, 5 );
m_panelRight = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* brightSizer;
@@ -126,10 +126,10 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
brightSizer->Add( m_buttonExport, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxString m_radioBoxFormatChoices[] = { _("Eeschema"), _("Pcbnew old fmt (.emp)"), _("Pcbnew kicad_mod"), _("Postscript"), _("Logo for title block") };
wxString m_radioBoxFormatChoices[] = { _("Eeschema (.lib file)"), _("Pcbnew (.kicad_mod file)"), _("Postscript (.ps file)"), _("Logo for title block (.kicad_wks file)") };
int m_radioBoxFormatNChoices = sizeof( m_radioBoxFormatChoices ) / sizeof( wxString );
m_radioBoxFormat = new wxRadioBox( m_panelRight, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_radioBoxFormatNChoices, m_radioBoxFormatChoices, 1, wxRA_SPECIFY_COLS );
m_radioBoxFormat->SetSelection( 2 );
m_radioBoxFormat->SetSelection( 1 );
brightSizer->Add( m_radioBoxFormat, 0, wxEXPAND|wxALL, 5 );
wxString m_rbOptionsChoices[] = { _("Normal"), _("Negative") };
@@ -147,6 +147,14 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
brightSizer->Add( m_sliderThreshold, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxString m_radio_PCBLayerChoices[] = { _("Front silk screen"), _("Front solder mask"), _("User layer Eco1"), _("User Layer Eco2") };
int m_radio_PCBLayerNChoices = sizeof( m_radio_PCBLayerChoices ) / sizeof( wxString );
m_radio_PCBLayer = new wxRadioBox( m_panelRight, wxID_ANY, _("Board Layer for Outline:"), wxDefaultPosition, wxDefaultSize, m_radio_PCBLayerNChoices, m_radio_PCBLayerChoices, 1, wxRA_SPECIFY_COLS );
m_radio_PCBLayer->SetSelection( 0 );
m_radio_PCBLayer->SetToolTip( _("Choose the board layer to place the outline.\nThe 2 invisible fields reference and value are always placed on the silk screen layer.") );
brightSizer->Add( m_radio_PCBLayer, 0, wxALL|wxEXPAND, 5 );
m_panelRight->SetSizer( brightSizer );
m_panelRight->Layout();
@@ -168,6 +176,7 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
m_DPIValueY->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnResolutionChange ), NULL, this );
m_buttonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnLoadFile ), NULL, this );
m_buttonExport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnExport ), NULL, this );
m_radioBoxFormat->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnFormatChange ), NULL, this );
m_rbOptions->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnOptionsSelection ), NULL, this );
m_sliderThreshold->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( BM2CMP_FRAME_BASE::OnThresholdChange ), NULL, this );
}
@@ -184,6 +193,7 @@ BM2CMP_FRAME_BASE::~BM2CMP_FRAME_BASE()
m_DPIValueY->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnResolutionChange ), NULL, this );
m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnLoadFile ), NULL, this );
m_buttonExport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnExport ), NULL, this );
m_radioBoxFormat->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnFormatChange ), NULL, this );
m_rbOptions->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnOptionsSelection ), NULL, this );
m_sliderThreshold->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( BM2CMP_FRAME_BASE::OnThresholdChange ), NULL, this );
+129 -39
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<FileVersion major="1" minor="13" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@@ -44,7 +44,7 @@
<property name="minimum_size"></property>
<property name="name">BM2CMP_FRAME_BASE</property>
<property name="pos"></property>
<property name="size">527,470</property>
<property name="size">733,634</property>
<property name="style">wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">KIWAY_PLAYER; kiway_player.h</property>
<property name="title">Bitmap to Component Converter</property>
@@ -133,7 +133,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_notebook1</property>
<property name="name">m_Notebook</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@@ -522,7 +522,7 @@
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<object class="wxFlexGridSizer" expanded="0">
<property name="cols">4</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1,2</property>
@@ -534,11 +534,11 @@
<property name="permission">none</property>
<property name="rows">0</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -617,11 +617,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -700,11 +700,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -783,11 +783,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -866,11 +866,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_RIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -949,11 +949,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -1032,11 +1032,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -1115,11 +1115,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -1198,11 +1198,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -1281,11 +1281,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -1364,11 +1364,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -1447,21 +1447,21 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="1">
<object class="spacer" expanded="0">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -1540,11 +1540,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -1631,11 +1631,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -1722,11 +1722,11 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -2003,7 +2003,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Eeschema&quot; &quot;Pcbnew old fmt (.emp)&quot; &quot;Pcbnew kicad_mod&quot; &quot;Postscript&quot; &quot;Logo for title block&quot;</property>
<property name="choices">&quot;Eeschema (.lib file)&quot; &quot;Pcbnew (.kicad_mod file)&quot; &quot;Postscript (.ps file)&quot; &quot;Logo for title block (.kicad_wks file)&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
@@ -2035,7 +2035,7 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">2</property>
<property name="selection">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
@@ -2066,7 +2066,7 @@
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRadioBox">OnFormatChange</event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
@@ -2356,6 +2356,96 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Front silk screen&quot; &quot;Front solder mask&quot; &quot;User layer Eco1&quot; &quot;User Layer Eco2&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Board Layer for Outline:</property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_radio_PCBLayer</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Choose the board layer to place the outline.&#x0A;The 2 invisible fields reference and value are always placed on the silk screen layer.</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
+5 -3
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 5 2013)
// C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -46,7 +46,7 @@ class BM2CMP_FRAME_BASE : public KIWAY_PLAYER
private:
protected:
wxNotebook* m_notebook1;
wxNotebook* m_Notebook;
wxScrolledWindow* m_InitialPicturePanel;
wxScrolledWindow* m_GreyscalePicturePanel;
wxScrolledWindow* m_BNPicturePanel;
@@ -72,6 +72,7 @@ class BM2CMP_FRAME_BASE : public KIWAY_PLAYER
wxRadioBox* m_rbOptions;
wxStaticText* m_ThresholdText;
wxSlider* m_sliderThreshold;
wxRadioBox* m_radio_PCBLayer;
wxStatusBar* m_statusBar;
// Virtual event handlers, overide them in your derived class
@@ -81,13 +82,14 @@ class BM2CMP_FRAME_BASE : public KIWAY_PLAYER
virtual void UpdatePPITextValueY( wxMouseEvent& event ) { event.Skip(); }
virtual void OnLoadFile( wxCommandEvent& event ) { event.Skip(); }
virtual void OnExport( wxCommandEvent& event ) { event.Skip(); }
virtual void OnFormatChange( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOptionsSelection( wxCommandEvent& event ) { event.Skip(); }
virtual void OnThresholdChange( wxScrollEvent& event ) { event.Skip(); }
public:
BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Bitmap to Component Converter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 527,470 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Bitmap to Component Converter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 733,634 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
~BM2CMP_FRAME_BASE();
+112 -147
View File
@@ -35,29 +35,15 @@
#include <cmath>
#include <vector>
#include <layers_id_colors_and_visibility.h>
#include <common.h>
#include <bitmap2component.h>
#include <geometry/shape_poly_set.h>
// include this after shape_poly_set.h to avoid redefinition of min, max ...
#include <potracelib.h>
#include <auxiliary.h>
// Define some types used here from boost::polygon
namespace bpl = boost::polygon; // bpl = boost polygon library
using namespace bpl::operators; // +, -, =, ...
typedef int coordinate_type;
typedef bpl::polygon_data<coordinate_type> KPolygon; // define a basic polygon
typedef std::vector<KPolygon> KPolygonSet; // define a set of polygons
typedef bpl::point_data<coordinate_type> KPolyPoint; // define a corner of a polygon
enum output_format {
POSTSCRIPT_FMT = 1,
PCBNEW_LEGACY_EMP,
PCBNEW_KICAD_MOD,
EESCHEMA_FMT,
KICAD_LOGO
};
/* free a potrace bitmap */
static void bm_free( potrace_bitmap_t* bm )
{
@@ -75,7 +61,7 @@ static void bm_free( potrace_bitmap_t* bm )
class BITMAPCONV_INFO
{
public:
enum output_format m_Format; // File format
enum OUTPUT_FMT_ID m_Format; // File format
int m_PixmapWidth;
int m_PixmapHeight; // the bitmap size in pixels
double m_ScaleX;
@@ -92,7 +78,7 @@ public:
* Creates the output file specified by m_Outfile,
* depending on file format given by m_Format
*/
void CreateOutputFile();
void CreateOutputFile( BMP2CMP_MOD_LAYER aModLayer = (BMP2CMP_MOD_LAYER) 0 );
private:
@@ -100,7 +86,7 @@ private:
* Function OuputFileHeader
* write to file the header depending on file format
*/
void OuputFileHeader();
void OuputFileHeader( const char * aBrdLayerName );
/**
* Function OuputFileEnd
@@ -109,12 +95,18 @@ private:
void OuputFileEnd();
/**
* @return the board layer name depending on the board layer selected
* @param aChoice = the choice (MOD_LYR_FSILKS to MOD_LYR_FINAL)
*/
const char * getBrdLayerName( BMP2CMP_MOD_LAYER aChoice );
/**
* Function OuputOnePolygon
* write one polygon to output file.
* Polygon coordinates are expected scaled by the polugon extraction function
*/
void OuputOnePolygon( KPolygon & aPolygon );
void OuputOnePolygon( SHAPE_LINE_CHAIN & aPolygon, const char* aBrdLayerName );
};
@@ -139,7 +131,8 @@ BITMAPCONV_INFO::BITMAPCONV_INFO()
int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
int aFormat, int aDpi_X, int aDpi_Y )
OUTPUT_FMT_ID aFormat, int aDpi_X, int aDpi_Y,
BMP2CMP_MOD_LAYER aModLayer )
{
potrace_param_t* param;
potrace_state_t* st;
@@ -157,6 +150,12 @@ int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
st = potrace_trace( param, aPotrace_bitmap );
if( !st || st->status != POTRACE_STATUS_OK )
{
if( st )
{
potrace_state_free( st );
}
potrace_param_free( param );
fprintf( stderr, "Error tracing bitmap: %s\n", strerror( errno ) );
return 1;
}
@@ -169,14 +168,14 @@ int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
switch( aFormat )
{
case 4:
case KICAD_LOGO:
info.m_Format = KICAD_LOGO;
info.m_ScaleX = 1e3 * 25.4 / aDpi_X; // the conversion scale from PPI to micro
info.m_ScaleY = 1e3 * 25.4 / aDpi_Y; // Y axis is top to bottom
info.CreateOutputFile();
break;
case 3:
case POSTSCRIPT_FMT:
info.m_Format = POSTSCRIPT_FMT;
info.m_ScaleX = 1.0; // the conversion scale
info.m_ScaleY = info.m_ScaleX;
@@ -184,25 +183,18 @@ int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
info.CreateOutputFile();
break;
case 2:
case EESCHEMA_FMT:
info.m_Format = EESCHEMA_FMT;
info.m_ScaleX = 1000.0 / aDpi_X; // the conversion scale from PPI to UI
info.m_ScaleY = -1000.0 / aDpi_Y; // Y axis is bottom to Top for components in libs
info.CreateOutputFile();
break;
case 1:
case PCBNEW_KICAD_MOD:
info.m_Format = PCBNEW_KICAD_MOD;
info.m_ScaleX = 1e6 * 25.4 / aDpi_X; // the conversion scale from PPI to UI
info.m_ScaleY = 1e6 * 25.4 / aDpi_Y; // Y axis is top to bottom in modedit
info.CreateOutputFile();
break;
case 0:
info.m_Format = PCBNEW_LEGACY_EMP;
info.m_ScaleX = 10000.0 / aDpi_X; // the conversion scale
info.m_ScaleY = 10000.0 / aDpi_Y; // Y axis is top to bottom in modedit
info.CreateOutputFile();
info.CreateOutputFile( aModLayer );
break;
default:
@@ -217,8 +209,33 @@ int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
return 0;
}
const char* BITMAPCONV_INFO::getBrdLayerName( BMP2CMP_MOD_LAYER aChoice )
{
const char * layerName = "F.SilkS";
void BITMAPCONV_INFO::OuputFileHeader()
switch( aChoice )
{
case MOD_LYR_FSOLDERMASK:
layerName = "F.Mask";
break;
case MOD_LYR_ECO1:
layerName = "Eco1.User";
break;
case MOD_LYR_ECO2:
layerName = "Eco2.User";
break;
case MOD_LYR_FSILKS:
default: // case MOD_LYR_FSILKS only unless there is a bug
break;
}
return layerName;
}
void BITMAPCONV_INFO::OuputFileHeader( const char * aBrdLayerName )
{
int Ypos = (int) ( m_PixmapHeight / 2 * m_ScaleY );
int fieldSize; // fields text size = 60 mils
@@ -233,35 +250,15 @@ void BITMAPCONV_INFO::OuputFileHeader()
fprintf( m_Outfile, "gsave\n" );
break;
case PCBNEW_LEGACY_EMP:
#define FIELD_LAYER 21
fieldSize = 600; // fields text size = 60 mils
Ypos += fieldSize / 2;
fprintf( m_Outfile, "PCBNEW-LibModule-V1\n" );
fprintf( m_Outfile, "$INDEX\n%s\n$EndINDEX\n", m_CmpName );
fprintf( m_Outfile, "#\n# %s\n", m_CmpName );
fprintf( m_Outfile, "# pixmap w = %d, h = %d\n#\n",
m_PixmapWidth, m_PixmapHeight );
fprintf( m_Outfile, "$MODULE %s\n", m_CmpName );
fprintf( m_Outfile, "Po 0 0 0 15 00000000 00000000 ~~\n" );
fprintf( m_Outfile, "Li %s\n", m_CmpName );
fprintf( m_Outfile, "T0 0 %d %d %d 0 %d N I %d \"G***\"\n",
Ypos, fieldSize, fieldSize, fieldSize / 5, FIELD_LAYER );
fprintf( m_Outfile, "T1 0 %d %d %d 0 %d N I %d \"%s\"\n",
-Ypos, fieldSize, fieldSize, fieldSize / 5, FIELD_LAYER, m_CmpName );
break;
case PCBNEW_KICAD_MOD:
// fields text size = 1.5 mm
// fields text thickness = 1.5 / 5 = 0.3mm
fprintf( m_Outfile, "(module %s (layer F.Cu)\n (at 0 0)\n",
m_CmpName );
fprintf( m_Outfile, " (fp_text reference \"G***\" (at 0 0) (layer F.SilkS) hide\n"
" (effects (font (thickness 0.3)))\n )\n" );
fprintf( m_Outfile, " (fp_text value \"%s\" (at 0.75 0) (layer F.SilkS) hide\n"
" (effects (font (thickness 0.3)))\n )\n",
m_CmpName );
fprintf( m_Outfile, " (fp_text reference \"G***\" (at 0 0) (layer %s) hide\n"
" (effects (font (thickness 0.3)))\n )\n", aBrdLayerName );
fprintf( m_Outfile, " (fp_text value \"%s\" (at 0.75 0) (layer %s) hide\n"
" (effects (font (thickness 0.3)))\n )\n", m_CmpName, aBrdLayerName );
break;
case KICAD_LOGO:
@@ -295,11 +292,6 @@ void BITMAPCONV_INFO::OuputFileEnd()
fprintf( m_Outfile, "%%EOF\n" );
break;
case PCBNEW_LEGACY_EMP:
fprintf( m_Outfile, "$EndMODULE %s\n", m_CmpName );
fprintf( m_Outfile, "$EndLIBRARY\n" );
break;
case PCBNEW_KICAD_MOD:
fprintf( m_Outfile, ")\n" );
break;
@@ -320,28 +312,28 @@ void BITMAPCONV_INFO::OuputFileEnd()
* write one polygon to output file.
* Polygon coordinates are expected scaled by the polygon extraction function
*/
void BITMAPCONV_INFO::OuputOnePolygon( KPolygon & aPolygon )
void BITMAPCONV_INFO::OuputOnePolygon( SHAPE_LINE_CHAIN & aPolygon, const char* aBrdLayerName )
{
unsigned ii, jj;
KPolyPoint currpoint;
int ii, jj;
VECTOR2I currpoint;
int offsetX = (int)( m_PixmapWidth / 2 * m_ScaleX );
int offsetY = (int)( m_PixmapHeight / 2 * m_ScaleY );
KPolyPoint startpoint = *aPolygon.begin();
const VECTOR2I startpoint = aPolygon.CPoint( 0 );
switch( m_Format )
{
case POSTSCRIPT_FMT:
offsetY = (int)( m_PixmapHeight * m_ScaleY );
fprintf( m_Outfile, "newpath\n%d %d moveto\n",
startpoint.x(), offsetY - startpoint.y() );
startpoint.x, offsetY - startpoint.y );
jj = 0;
for( ii = 1; ii < aPolygon.size(); ii++ )
for( ii = 1; ii < aPolygon.PointCount(); ii++ )
{
currpoint = *(aPolygon.begin() + ii);
currpoint = aPolygon.CPoint( ii );
fprintf( m_Outfile, " %d %d lineto",
currpoint.x(), offsetY - currpoint.y() );
currpoint.x, offsetY - currpoint.y );
if( jj++ > 6 )
{
@@ -353,39 +345,18 @@ void BITMAPCONV_INFO::OuputOnePolygon( KPolygon & aPolygon )
fprintf( m_Outfile, "\nclosepath fill\n" );
break;
case PCBNEW_LEGACY_EMP:
{
LAYER_NUM layer = SILKSCREEN_N_FRONT;
int width = 1;
fprintf( m_Outfile, "DP %d %d %d %d %d %d %d\n",
0, 0, 0, 0,
(int) aPolygon.size() + 1, width, layer );
for( ii = 0; ii < aPolygon.size(); ii++ )
{
currpoint = *( aPolygon.begin() + ii );
fprintf( m_Outfile, "Dl %d %d\n",
currpoint.x() - offsetX, currpoint.y() - offsetY );
}
// Close polygon
fprintf( m_Outfile, "Dl %d %d\n",
startpoint.x() - offsetX, startpoint.y() - offsetY );
}
break;
case PCBNEW_KICAD_MOD:
{
double width = 0.1;
double width = 0.01; // outline thickness in mm
fprintf( m_Outfile, " (fp_poly (pts" );
jj = 0;
for( ii = 0; ii < aPolygon.size(); ii++ )
for( ii = 0; ii < aPolygon.PointCount(); ii++ )
{
currpoint = *( aPolygon.begin() + ii );
currpoint = aPolygon.CPoint( ii );
fprintf( m_Outfile, " (xy %f %f)",
(currpoint.x() - offsetX) / 1e6,
(currpoint.y() - offsetY) / 1e6 );
( currpoint.x - offsetX ) / 1e6,
( currpoint.y - offsetY ) / 1e6 );
if( jj++ > 6 )
{
@@ -395,8 +366,10 @@ void BITMAPCONV_INFO::OuputOnePolygon( KPolygon & aPolygon )
}
// Close polygon
fprintf( m_Outfile, " (xy %f %f) )",
(startpoint.x() - offsetX) / 1e6, (startpoint.y() - offsetY) / 1e6 );
fprintf( m_Outfile, "(layer F.SilkS) (width %f)\n )\n", width );
( startpoint.x - offsetX ) / 1e6, ( startpoint.y - offsetY ) / 1e6 );
fprintf( m_Outfile, "(layer %s) (width %f)\n )\n", aBrdLayerName, width );
}
break;
@@ -404,12 +377,12 @@ void BITMAPCONV_INFO::OuputOnePolygon( KPolygon & aPolygon )
fprintf( m_Outfile, " (pts" );
// Internal units = micron, file unit = mm
jj = 0;
for( ii = 0; ii < aPolygon.size(); ii++ )
for( ii = 0; ii < aPolygon.PointCount(); ii++ )
{
currpoint = *( aPolygon.begin() + ii );
currpoint = aPolygon.CPoint( ii );
fprintf( m_Outfile, " (xy %.3f %.3f)",
(currpoint.x() - offsetX) / 1e3,
(currpoint.y() - offsetY) / 1e3 );
( currpoint.x - offsetX ) / 1e3,
( currpoint.y - offsetY ) / 1e3 );
if( jj++ > 4 )
{
@@ -419,21 +392,21 @@ void BITMAPCONV_INFO::OuputOnePolygon( KPolygon & aPolygon )
}
// Close polygon
fprintf( m_Outfile, " (xy %.3f %.3f) )\n",
(startpoint.x() - offsetX) / 1e3, (startpoint.y() - offsetY) / 1e3 );
( startpoint.x - offsetX ) / 1e3, ( startpoint.y - offsetY ) / 1e3 );
break;
case EESCHEMA_FMT:
fprintf( m_Outfile, "P %d 0 0 1", (int) aPolygon.size() + 1 );
for( ii = 0; ii < aPolygon.size(); ii++ )
fprintf( m_Outfile, "P %d 0 0 1", (int) aPolygon.PointCount() + 1 );
for( ii = 0; ii < aPolygon.PointCount(); ii++ )
{
currpoint = *(aPolygon.begin() + ii);
currpoint = aPolygon.CPoint( ii );
fprintf( m_Outfile, " %d %d",
currpoint.x() - offsetX, currpoint.y() - offsetY );
currpoint.x - offsetX, currpoint.y - offsetY );
}
// Close polygon
fprintf( m_Outfile, " %d %d",
startpoint.x() - offsetX, startpoint.y() - offsetY );
startpoint.x - offsetX, startpoint.y - offsetY );
fprintf( m_Outfile, " F\n" );
break;
@@ -441,24 +414,24 @@ void BITMAPCONV_INFO::OuputOnePolygon( KPolygon & aPolygon )
}
void BITMAPCONV_INFO::CreateOutputFile()
void BITMAPCONV_INFO::CreateOutputFile( BMP2CMP_MOD_LAYER aModLayer )
{
KPolyPoint currpoint;
std::vector <potrace_dpoint_t> cornersBuffer;
// This KPolygonSet polyset_areas is a complex polygon to draw
// and can be complex depending on holes inside this polygon
KPolygonSet polyset_areas;
// polyset_areas is a set of polygon to draw
SHAPE_POLY_SET polyset_areas;
// This KPolygonSet polyset_holes is the set of holes inside polyset_areas
KPolygonSet polyset_holes;
// polyset_holes is the set of holes inside polyset_areas outlines
SHAPE_POLY_SET polyset_holes;
potrace_dpoint_t( *c )[3];
setlocale( LC_NUMERIC, "C" ); // Switch the locale to standard C
LOCALE_IO toggle; // Temporary switch the locale to standard C to r/w floats
OuputFileHeader();
// The layer name has meaning only for .kicad_mod files.
// For these files the header creates 2 invisible texts: value and ref
// (needed but not usefull) on silk screen layer
OuputFileHeader( getBrdLayerName( MOD_LYR_FSILKS ) );
bool main_outline = true;
@@ -495,33 +468,24 @@ void BITMAPCONV_INFO::CreateOutputFile()
main_outline = false;
// build the current main polygon
std::vector<KPolyPoint> cornerslist; // a simple boost polygon
polyset_areas.NewOutline();
for( unsigned int i = 0; i < cornersBuffer.size(); i++ )
{
currpoint.x( (coordinate_type) (cornersBuffer[i].x * m_ScaleX) );
currpoint.y( (coordinate_type) (cornersBuffer[i].y * m_ScaleY) );
cornerslist.push_back( currpoint );
polyset_areas.Append( int( cornersBuffer[i].x * m_ScaleX ),
int( cornersBuffer[i].y * m_ScaleY ) );
}
KPolygon poly;
bpl::set_points( poly, cornerslist.begin(), cornerslist.end() );
polyset_areas.push_back( poly );
}
else
{
// Add current hole in polyset_holes
std::vector<KPolyPoint> cornerslist; // a simple boost polygon
polyset_holes.NewOutline();
for( unsigned int i = 0; i < cornersBuffer.size(); i++ )
{
currpoint.x( (coordinate_type) (cornersBuffer[i].x * m_ScaleX) );
currpoint.y( (coordinate_type) (cornersBuffer[i].y * m_ScaleY) );
cornerslist.push_back( currpoint );
polyset_holes.Append( int( cornersBuffer[i].x * m_ScaleX ),
int( cornersBuffer[i].y * m_ScaleY ) );
}
KPolygon poly;
bpl::set_points( poly, cornerslist.begin(), cornerslist.end() );
polyset_holes.push_back( poly );
}
cornersBuffer.clear();
/* at the end of a group of a positive path and its negative children, fill.
@@ -529,25 +493,26 @@ void BITMAPCONV_INFO::CreateOutputFile()
if( paths->next == NULL || paths->next->sign == '+' )
{
// Substract holes to main polygon:
polyset_areas -= polyset_holes;
polyset_areas.Simplify();
polyset_holes.Simplify();
polyset_areas.BooleanSubtract( polyset_holes );
polyset_areas.Fracture();
// Output current resulting polygon(s)
for( unsigned ii = 0; ii < polyset_areas.size(); ii++ )
for( int ii = 0; ii < polyset_areas.OutlineCount(); ii++ )
{
KPolygon& poly = polyset_areas[ii];
OuputOnePolygon(poly );
SHAPE_LINE_CHAIN& poly = polyset_areas.Outline( ii );
OuputOnePolygon(poly, getBrdLayerName( aModLayer ) );
}
polyset_areas.clear();
polyset_holes.clear();
polyset_areas.RemoveAllContours();
polyset_holes.RemoveAllContours();
main_outline = true;
}
paths = paths->next;
}
OuputFileEnd();
setlocale( LC_NUMERIC, "" ); // revert to the current locale
}
+47
View File
@@ -0,0 +1,47 @@
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 1992-2014 Kicad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef BITMAP2COMPONENT_H
#define BITMAP2COMPONENT_H
// for consistency this enum should conform to the
// indices in m_radioBoxFormat from bitmap2cmp_gui.cpp
enum OUTPUT_FMT_ID
{
EESCHEMA_FMT = 0,
PCBNEW_KICAD_MOD,
POSTSCRIPT_FMT,
KICAD_LOGO,
FINAL_FMT = KICAD_LOGO
};
enum BMP2CMP_MOD_LAYER
{
MOD_LYR_FSILKS = 0,
MOD_LYR_FSOLDERMASK,
MOD_LYR_ECO1,
MOD_LYR_ECO2,
MOD_LYR_FINAL = MOD_LYR_ECO2
};
#endif // BITMAP2COMPONENT_H
+48 -4
View File
@@ -151,6 +151,12 @@ set( BMAPS_MID
annotate_down_right
annotate_right_down
annotate
array_line
array_module
array_pad
array_text
array_target
array_zone
auto_associe
auto_delete_track
auto_track_width
@@ -168,6 +174,7 @@ set( BMAPS_MID
browse_files
cancel
change_entry_orient
contrast_mode
create_cmp_file
checked_ok
component_select_unit
@@ -216,6 +223,12 @@ set( BMAPS_MID
drag_track_segment
drc_off
drc
duplicate_line
duplicate_module
duplicate_pad
duplicate_target
duplicate_text
duplicate_zone
edges_sketch
edit_comp_footprint
edit_component
@@ -253,11 +266,9 @@ set( BMAPS_MID
gbr_select_mode2
gerber_file
gerber_recent_files
gerber_open_dcode_file
gerbview_show_negative_objects
gerbview_drill_file
gerbview_clear_layers
gerber_open_dcode_file
gerbview_open_recent_drill_files
general_deletions
general_ratsnest
@@ -275,6 +286,7 @@ set( BMAPS_MID
hierarchy_cursor
hierarchy_nav
hotkeys
html
icon_cvpcb_small
icon_gerbview_small
icon_txt
@@ -326,6 +338,7 @@ set( BMAPS_MID
library_table
libview
lines90
list_nets
load_module_board
load_module_lib
local_ratsnest
@@ -364,9 +377,11 @@ set( BMAPS_MID
move_polygon
move_rectangle
move_sheet
move_target
move_text
move_track_segment
move_track
move_zone
move
mw_add_gap
mw_add_line
@@ -386,8 +401,6 @@ set( BMAPS_MID
new_project
new_project_with_template
new_sch
new_txt
new
noconn
normal
online_help
@@ -417,6 +430,7 @@ set( BMAPS_MID
pad_sketch
pad
pad_dimensions
pad_enumerate
pads_mask_layers
pagelayout_load
pagelayout_load_default
@@ -433,6 +447,7 @@ set( BMAPS_MID
pin_name_to
pin_number_to
pin_size_to
pin_table
pin_to
pin
plot
@@ -448,6 +463,12 @@ set( BMAPS_MID
preference
print_button
ps_router
ps_diff_pair
ps_diff_pair_gap
ps_diff_pair_tune_length
ps_diff_pair_tune_phase
ps_diff_pair_via_gap
ps_tune_length
py_script
ratsnest
read_setup
@@ -457,6 +478,8 @@ set( BMAPS_MID
reload
reset_text
resize_sheet
rescue_pcbnew
revert_pcbnew
right
rotate_field
rotate_glabel
@@ -484,6 +507,12 @@ set( BMAPS_MID
select_w_layer
shape_3d
sheetset
setcolor_3d_bg
setcolor_silkscreen
setcolor_soldermask
setcolor_solderpaste
setcolor_copper
setcolor_board_body
show_dcodenumber
show_footprint
show_mod_edge
@@ -512,6 +541,8 @@ set( BMAPS_MID
up
use_3D_copper_thickness
via
via_buried
via_microvia
via_sketch
warning
web_support
@@ -521,6 +552,7 @@ set( BMAPS_MID
width_track
width_vias
window_close
wizard_add_fplib_small
zip_tool
zip
zone_duplicate
@@ -551,6 +583,13 @@ set( BMAPS_BIG
libedit_icon
viewlibs_icon
icon_pagelayout_editor
wizard_add_fplib_icon
)
set( BMAPS_OTHER
tune_diff_pair_length_legend
tune_diff_pair_skew_legend
tune_single_track_length_legend
)
@@ -726,5 +765,10 @@ foreach( bmn ${BMAPS_BIG} )
list( APPEND CPP_LIST cpp_48/${bmn}.cpp )
endforeach()
foreach( bmn ${BMAPS_OTHER} )
#message( "library add cpp_other/${bmn}.cpp" )
list( APPEND CPP_LIST cpp_other/${bmn}.cpp )
endforeach()
#add_library( bitmaps SHARED ${CPP_LIST} )
add_library( bitmaps STATIC ${CPP_LIST} )
@@ -8,55 +8,86 @@
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x02, 0xef, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x96, 0x4f, 0x48, 0x14,
0x51, 0x1c, 0xc7, 0xbf, 0xbf, 0xa7, 0xa6, 0xe9, 0xe6, 0x29, 0x3c, 0x25, 0x44, 0xe0, 0x41, 0xaa,
0x53, 0xeb, 0xea, 0x55, 0xf3, 0xde, 0xa1, 0x53, 0x97, 0xee, 0x9d, 0xa4, 0x4b, 0x48, 0x50, 0x50,
0x90, 0x50, 0x74, 0xe9, 0x90, 0x07, 0x8f, 0xae, 0xee, 0xc1, 0x43, 0x20, 0x94, 0x45, 0xe6, 0xa1,
0x5b, 0x2e, 0x2a, 0x0a, 0xfe, 0x01, 0x09, 0x9d, 0xdd, 0x6d, 0x51, 0x07, 0x2a, 0x91, 0x26, 0xa7,
0x79, 0x33, 0xef, 0xd7, 0x61, 0x77, 0xb6, 0x37, 0x6f, 0x77, 0x47, 0x2d, 0xf2, 0x07, 0x8f, 0x19,
0x66, 0xde, 0x7c, 0x3f, 0xf3, 0xfd, 0xce, 0x6f, 0xde, 0x0c, 0x31, 0x33, 0x4e, 0xa3, 0x04, 0x4e,
0xa9, 0x1a, 0xc3, 0x1d, 0x22, 0x3a, 0x3f, 0x34, 0x34, 0x74, 0xbf, 0xa3, 0xa3, 0xa3, 0xed, 0x6f,
0xc5, 0x36, 0x36, 0x36, 0xf6, 0xd2, 0xe9, 0xf4, 0xc3, 0x5a, 0xe7, 0x28, 0x8c, 0x8e, 0x88, 0x3a,
0xad, 0x5c, 0x6e, 0xad, 0xa5, 0xe5, 0xec, 0x39, 0x21, 0x08, 0x44, 0x04, 0x41, 0xa5, 0x2d, 0x11,
0x01, 0xe1, 0x7e, 0x69, 0x72, 0x65, 0xab, 0xd7, 0xda, 0xea, 0xea, 0x76, 0x5f, 0x5f, 0xdf, 0xa5,
0x58, 0x47, 0x65, 0x18, 0x35, 0x34, 0x08, 0x64, 0xb3, 0x59, 0x28, 0xa5, 0x2a, 0x20, 0x6d, 0x02,
0x28, 0x7a, 0x41, 0x44, 0xec, 0x4b, 0xa1, 0xd0, 0x3e, 0x36, 0x36, 0x76, 0x47, 0x4a, 0xa9, 0x26,
0x26, 0x26, 0xa6, 0x99, 0x79, 0xb7, 0xa6, 0xa3, 0x7c, 0xa1, 0xb0, 0xde, 0xd6, 0xda, 0x9a, 0xf8,
0x34, 0x3f, 0x8f, 0x54, 0x2a, 0x55, 0x72, 0x25, 0x44, 0xc5, 0x95, 0xe9, 0x86, 0x6a, 0xc1, 0x4b,
0x15, 0x24, 0x12, 0x89, 0x24, 0x33, 0x2f, 0xd7, 0x73, 0x04, 0x12, 0x02, 0x82, 0x08, 0xcc, 0x8c,
0xdd, 0xdd, 0x5d, 0xec, 0xed, 0xed, 0xfd, 0x11, 0x2c, 0x8b, 0xc6, 0xba, 0x2c, 0x27, 0x03, 0xe0,
0x32, 0x11, 0x35, 0x01, 0xf8, 0xca, 0xcc, 0x5b, 0x51, 0x10, 0x00, 0x51, 0x7e, 0x1e, 0x42, 0x08,
0x6c, 0x6e, 0x6e, 0x62, 0xf0, 0xfa, 0x20, 0x02, 0x15, 0x54, 0x8e, 0x47, 0x9c, 0xd5, 0x8f, 0x52,
0xfc, 0x70, 0x9c, 0x34, 0x01, 0x18, 0x19, 0x19, 0x79, 0x01, 0xe0, 0x6e, 0x4d, 0x47, 0xe1, 0x5d,
0x0b, 0x21, 0x10, 0xa8, 0x00, 0x41, 0x10, 0x40, 0x69, 0x8d, 0x11, 0x19, 0x86, 0x2b, 0xdd, 0x2b,
0x88, 0xd0, 0xd4, 0xd4, 0x44, 0x55, 0xd1, 0xc1, 0x70, 0x44, 0x00, 0x84, 0x10, 0xa5, 0xc6, 0xd0,
0x9f, 0x95, 0x01, 0xaa, 0x44, 0x69, 0x38, 0xd4, 0x23, 0x6e, 0x34, 0xc2, 0x8d, 0xb6, 0x75, 0x59,
0x3c, 0x84, 0x08, 0xed, 0x98, 0x0e, 0x09, 0x05, 0x89, 0xe8, 0xe8, 0x17, 0x36, 0xb4, 0x1d, 0x4e,
0x16, 0x9a, 0x90, 0x0e, 0x10, 0x75, 0x22, 0x3c, 0x11, 0x08, 0xfa, 0x45, 0x9a, 0x30, 0x97, 0x3b,
0x31, 0xec, 0xc8, 0x93, 0x42, 0x62, 0x1d, 0xe9, 0x2b, 0x82, 0x09, 0x09, 0xa3, 0x84, 0x31, 0xff,
0xd8, 0x20, 0x1d, 0x10, 0x11, 0xd0, 0x22, 0xd3, 0x9b, 0xc2, 0x04, 0x1c, 0xff, 0x19, 0x95, 0x45,
0x75, 0xa0, 0x20, 0x82, 0x32, 0x9a, 0x22, 0xce, 0x4d, 0x3d, 0x58, 0xb5, 0xa3, 0x98, 0x18, 0x4d,
0xc8, 0x3f, 0x81, 0x62, 0x23, 0x34, 0xce, 0x99, 0xae, 0x98, 0x19, 0x41, 0x10, 0x40, 0x5b, 0x3f,
0x8f, 0x06, 0x45, 0x3a, 0x91, 0xb9, 0x0a, 0x6c, 0x42, 0x7c, 0xdf, 0x87, 0xeb, 0xba, 0x38, 0x3c,
0x3c, 0x84, 0x94, 0x12, 0x00, 0x70, 0xa6, 0xb9, 0x19, 0xae, 0xe7, 0x57, 0x7f, 0x61, 0xa5, 0x94,
0x81, 0x10, 0x22, 0xb2, 0x6e, 0x51, 0x8d, 0x38, 0x4c, 0x98, 0xef, 0xfb, 0x38, 0x38, 0x38, 0x80,
0x6d, 0xdb, 0xb0, 0x2c, 0x0b, 0x5b, 0x5b, 0x5b, 0xc8, 0xe5, 0x72, 0xc8, 0x2e, 0x2e, 0x3a, 0x33,
0xaf, 0xdf, 0x8e, 0x9b, 0xa0, 0x6f, 0x3d, 0x3d, 0x3d, 0x37, 0xba, 0xba, 0xba, 0xfa, 0xad, 0x5c,
0x6e, 0x99, 0x8c, 0x85, 0xb2, 0x16, 0x8c, 0x88, 0xa0, 0x94, 0x82, 0xe3, 0x38, 0xd8, 0xdf, 0xdf,
0x47, 0xb1, 0x58, 0x44, 0x32, 0x99, 0x44, 0x6f, 0x6f, 0x0a, 0x3f, 0x5d, 0x57, 0xde, 0x1b, 0x1e,
0x4e, 0xad, 0xac, 0x2c, 0x2c, 0x45, 0xa2, 0x63, 0x66, 0x07, 0xc0, 0x47, 0x00, 0x48, 0x4f, 0x4e,
0x7e, 0x8f, 0x34, 0x47, 0xcc, 0xbb, 0xa2, 0x94, 0x82, 0xeb, 0xba, 0x70, 0x1c, 0x07, 0xed, 0xed,
0xed, 0xf0, 0xbc, 0x5f, 0x78, 0x37, 0x3b, 0xeb, 0x3d, 0x7f, 0xfa, 0xec, 0xea, 0xea, 0xd2, 0xd2,
0x66, 0xd5, 0x87, 0x4f, 0xaf, 0x81, 0x81, 0x81, 0x9b, 0xdd, 0xdd, 0xdd, 0x17, 0x6d, 0xdb, 0xbe,
0x96, 0xc9, 0x64, 0x6e, 0xd5, 0x6a, 0x80, 0x70, 0x48, 0x29, 0x61, 0xdb, 0x36, 0xf2, 0xf9, 0x3c,
0x3a, 0x3b, 0x2f, 0x60, 0xfa, 0xcd, 0xcc, 0xfe, 0xab, 0xa9, 0xa9, 0x2b, 0x73, 0x73, 0x73, 0xc5,
0x88, 0x28, 0x33, 0xd7, 0x1d, 0xfd, 0xfd, 0xfd, 0xb7, 0x3d, 0xcf, 0x63, 0xcf, 0xf3, 0x58, 0x4a,
0xc9, 0xbe, 0xef, 0xb3, 0xef, 0xfb, 0x1c, 0x04, 0x01, 0x2b, 0xa5, 0x98, 0x99, 0x59, 0x4a, 0xc9,
0x3b, 0x3b, 0x3b, 0xfc, 0xfe, 0xc3, 0x1c, 0x3f, 0x78, 0xf4, 0x78, 0x1d, 0x40, 0x4b, 0x2d, 0xad,
0xd8, 0xae, 0xb3, 0x2c, 0x6b, 0xfb, 0xe5, 0xe8, 0xe8, 0xb8, 0x20, 0xaa, 0xfb, 0x5b, 0xc6, 0x00,
0x3c, 0x3f, 0xc0, 0xc2, 0xe2, 0xf2, 0xe7, 0xa9, 0xcc, 0xf8, 0x13, 0x66, 0xf6, 0x63, 0xff, 0x82,
0xfe, 0x77, 0xfd, 0x06, 0x86, 0xd4, 0x50, 0x62, 0x0e, 0x3a, 0xfd, 0x94, 0x00, 0x00, 0x00, 0x00,
0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
0xce, 0x00, 0x00, 0x04, 0xde, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xad, 0x96, 0x5f, 0x48, 0x5b,
0x57, 0x1c, 0xc7, 0x03, 0x7b, 0x19, 0x53, 0xc6, 0xc6, 0xf0, 0x41, 0x06, 0x7b, 0xd8, 0x60, 0x08,
0xdd, 0xc3, 0xc0, 0x81, 0x30, 0x99, 0xe0, 0xc3, 0xd8, 0x1f, 0xca, 0x1e, 0x5a, 0xd8, 0x60, 0xb5,
0xeb, 0xa8, 0x7d, 0xe9, 0xa8, 0xad, 0xb5, 0x50, 0x10, 0x62, 0x15, 0x59, 0x19, 0x2d, 0x9b, 0x56,
0x23, 0xfb, 0xe3, 0x9c, 0xb6, 0x0a, 0xda, 0x6a, 0xe2, 0x9f, 0x68, 0xab, 0xcb, 0xd4, 0x32, 0x35,
0x06, 0xd4, 0xb4, 0x9a, 0xc4, 0x3f, 0x49, 0x6a, 0x8c, 0xab, 0x89, 0x9a, 0xff, 0x31, 0x31, 0xc6,
0x44, 0xfd, 0xee, 0xfc, 0x8e, 0xb9, 0x97, 0x24, 0x5e, 0x59, 0x1f, 0x76, 0xe1, 0xcb, 0xb9, 0xf7,
0xdc, 0x9b, 0xdf, 0xe7, 0xf7, 0xef, 0x9c, 0x13, 0x59, 0x66, 0x66, 0xe6, 0x89, 0xc2, 0xc2, 0xc2,
0x6f, 0xfe, 0x0f, 0xe5, 0xe6, 0xe6, 0x7e, 0x2d, 0x93, 0xc9, 0x5e, 0x07, 0x20, 0x4b, 0x97, 0xac,
0xa0, 0xa0, 0xe0, 0x7c, 0x28, 0x14, 0x86, 0xcf, 0xe7, 0x83, 0xcf, 0xef, 0x47, 0x20, 0x18, 0x44,
0x50, 0xd0, 0xd6, 0x16, 0xb6, 0x42, 0x21, 0x84, 0xc2, 0x61, 0x84, 0x93, 0xb5, 0xbd, 0x2d, 0x6a,
0x3b, 0x21, 0xba, 0x5f, 0xb6, 0xd9, 0xbc, 0x0c, 0xf4, 0xf6, 0xb1, 0x20, 0x7f, 0x20, 0x08, 0x97,
0xdb, 0x8d, 0x35, 0x87, 0x03, 0xcf, 0xd7, 0xd6, 0xf8, 0xe8, 0x70, 0x3a, 0xe1, 0x5c, 0x5f, 0xc7,
0xfa, 0xc6, 0x06, 0x36, 0x48, 0x9b, 0x9b, 0xd8, 0x4c, 0x96, 0xcb, 0xc5, 0xe5, 0x4a, 0x88, 0xee,
0x97, 0xcc, 0xe6, 0x00, 0x03, 0x9d, 0x60, 0x7a, 0x85, 0xe9, 0xe5, 0x23, 0x20, 0xf2, 0xdc, 0xe3,
0xf5, 0xa2, 0xb1, 0xb1, 0x11, 0x73, 0x06, 0x03, 0x0c, 0x46, 0x23, 0x8c, 0x26, 0x13, 0x4c, 0x82,
0xe6, 0xe7, 0x31, 0x9f, 0xac, 0x85, 0x05, 0xae, 0x85, 0x34, 0xb1, 0x6f, 0xf7, 0x67, 0x67, 0x67,
0x5d, 0x06, 0x83, 0x61, 0xbd, 0xa4, 0xa4, 0x44, 0x75, 0x04, 0x44, 0xe9, 0xf1, 0xb2, 0xd4, 0xa9,
0x54, 0x2a, 0xee, 0xb9, 0x75, 0x6a, 0x0a, 0xed, 0xa7, 0x4e, 0x61, 0x79, 0x66, 0x86, 0xcf, 0x53,
0x4a, 0xfd, 0x81, 0x00, 0x02, 0xa4, 0xe4, 0xb4, 0x26, 0x52, 0xcb, 0xd3, 0x9b, 0xa6, 0xe6, 0xe6,
0xe6, 0x31, 0x89, 0x1a, 0x85, 0xb8, 0xa1, 0xee, 0xee, 0x6e, 0x9e, 0x42, 0xd3, 0xd0, 0x10, 0xfa,
0x2a, 0x2a, 0xd0, 0x70, 0xe6, 0x0c, 0x14, 0x45, 0x45, 0x18, 0x19, 0x1c, 0xc4, 0xc4, 0xc4, 0xc4,
0xa1, 0xb4, 0x5a, 0x68, 0x49, 0x93, 0x93, 0x98, 0x24, 0xe9, 0x74, 0x5c, 0xba, 0x34, 0x95, 0x97,
0x97, 0xeb, 0x59, 0xfa, 0xde, 0x17, 0x45, 0x20, 0x2a, 0x24, 0x79, 0x4a, 0xa0, 0x79, 0x8d, 0x06,
0x43, 0xe5, 0xe5, 0xa8, 0x2d, 0x29, 0xe1, 0xd1, 0xb8, 0xdc, 0x1e, 0x78, 0x58, 0xfe, 0x3d, 0x1e,
0x8f, 0xd8, 0x30, 0x7e, 0xa9, 0x08, 0xd3, 0x9a, 0x88, 0xcd, 0x1f, 0xb0, 0x31, 0x4e, 0x32, 0x9b,
0xcd, 0x2e, 0x0e, 0xa2, 0xae, 0xa1, 0x97, 0x3d, 0x3d, 0x3d, 0xb0, 0xe9, 0xf5, 0x18, 0xaf, 0xab,
0x43, 0xdd, 0x95, 0x2b, 0xdc, 0x08, 0x45, 0xe8, 0x66, 0x10, 0xaa, 0xa1, 0x64, 0x1a, 0x93, 0x52,
0x98, 0x92, 0x3e, 0xd6, 0x9d, 0x82, 0x58, 0xf3, 0x84, 0x0f, 0x41, 0x91, 0x08, 0x7f, 0x49, 0x20,
0xf2, 0x76, 0x71, 0x78, 0x18, 0xf5, 0x57, 0xaf, 0x72, 0x23, 0x04, 0x49, 0x07, 0x90, 0xd7, 0x82,
0x71, 0xa5, 0xe6, 0x09, 0xae, 0xd7, 0xf6, 0x8b, 0xba, 0xdd, 0x32, 0x0a, 0x3d, 0x4b, 0xbb, 0xd7,
0x66, 0x03, 0xd9, 0xa5, 0x20, 0x58, 0x57, 0x1e, 0x82, 0x22, 0x3b, 0x3b, 0x7c, 0x7d, 0x10, 0xe8,
0x69, 0x67, 0x27, 0xba, 0x2f, 0x5c, 0x40, 0xed, 0xa5, 0x4b, 0x10, 0x9a, 0x44, 0x84, 0xa4, 0xad,
0xad, 0x25, 0xa7, 0x1e, 0xdf, 0x29, 0x2a, 0xa0, 0xb7, 0x8f, 0x20, 0xc2, 0x8c, 0x92, 0x9d, 0x1d,
0x09, 0xb9, 0xdd, 0xee, 0x43, 0x10, 0x3d, 0x10, 0xb9, 0xb7, 0xb7, 0x17, 0x6e, 0xb6, 0x8e, 0xe6,
0x94, 0x4a, 0xd4, 0x97, 0x96, 0x72, 0x63, 0x7c, 0x11, 0x27, 0xa2, 0x38, 0x5d, 0xfd, 0x33, 0xbe,
0xa8, 0x6c, 0xc0, 0xc5, 0xfa, 0x36, 0xfe, 0xfd, 0xe5, 0xae, 0x0f, 0xa0, 0x78, 0x5c, 0x8a, 0xb3,
0xad, 0x6f, 0x22, 0x1a, 0x8d, 0x22, 0xba, 0xbb, 0x8b, 0x5d, 0x09, 0xb1, 0xfa, 0x26, 0x40, 0xec,
0x23, 0xf2, 0x88, 0x40, 0xe4, 0xad, 0x65, 0x74, 0x14, 0x95, 0x27, 0x4f, 0xf2, 0x28, 0x93, 0xa3,
0xb8, 0x75, 0xff, 0x11, 0xaa, 0xdb, 0xd4, 0x68, 0x19, 0x1a, 0xe7, 0x9e, 0x5e, 0x56, 0xe6, 0x22,
0x14, 0x09, 0xf2, 0x31, 0x16, 0x8b, 0xa5, 0x28, 0x1e, 0x8f, 0x73, 0xd1, 0xbd, 0x08, 0x22, 0x4f,
0xe8, 0x87, 0x04, 0x22, 0xe3, 0x9e, 0xd5, 0x55, 0xdc, 0x61, 0xa9, 0xa3, 0x1c, 0x13, 0x84, 0xea,
0x47, 0xf3, 0x5a, 0xa3, 0x19, 0x63, 0x06, 0x33, 0xe6, 0x9e, 0xad, 0x72, 0xef, 0x09, 0x60, 0xdd,
0x7c, 0x82, 0x8b, 0x0f, 0xde, 0x13, 0x0d, 0x4b, 0x49, 0x04, 0x51, 0x78, 0x14, 0x3a, 0x81, 0x28,
0x25, 0x42, 0x74, 0x34, 0x6e, 0x25, 0x20, 0x04, 0x25, 0x67, 0xe8, 0x3b, 0xfa, 0x9e, 0x3c, 0xed,
0xd4, 0xdf, 0x42, 0x71, 0x73, 0x21, 0xda, 0xa6, 0x6e, 0x70, 0x83, 0x7b, 0x7b, 0x7b, 0x92, 0xf2,
0x7a, 0xbd, 0xa9, 0xa0, 0xbe, 0xbe, 0x3e, 0xd1, 0x20, 0xdd, 0x0b, 0x4d, 0x42, 0xf0, 0x74, 0x88,
0xe0, 0xed, 0x39, 0xf9, 0x7d, 0x54, 0xfd, 0xaa, 0xe1, 0xaa, 0xbe, 0xd3, 0x8b, 0xfe, 0xa2, 0x62,
0xec, 0xef, 0xef, 0xa7, 0x28, 0x05, 0x44, 0xe2, 0xc6, 0x19, 0x88, 0x0c, 0xaa, 0xd5, 0x6a, 0x50,
0xed, 0x78, 0x84, 0x69, 0x10, 0xa7, 0xdf, 0x06, 0x7f, 0xd8, 0x85, 0xf8, 0x5e, 0x1c, 0x65, 0x75,
0xf7, 0x8e, 0x18, 0x3e, 0x38, 0x38, 0x48, 0x11, 0x5b, 0xe8, 0x09, 0x10, 0xfb, 0xb1, 0x00, 0x22,
0xcf, 0xe9, 0x9e, 0x40, 0xd1, 0x44, 0x93, 0x08, 0x73, 0x42, 0x24, 0x9a, 0xc5, 0x16, 0xa8, 0x9e,
0xfe, 0x88, 0x1f, 0x34, 0x5f, 0x61, 0xd2, 0xd6, 0x2b, 0x69, 0x5c, 0xb8, 0x52, 0x40, 0xb1, 0x64,
0x50, 0xc2, 0x73, 0x01, 0xc4, 0xd7, 0x01, 0xdb, 0xd1, 0x4d, 0xed, 0x5d, 0x68, 0xed, 0x9f, 0xe1,
0xba, 0xa9, 0xac, 0xe4, 0x75, 0x89, 0xc5, 0x77, 0x45, 0x48, 0xeb, 0x5f, 0x93, 0xf8, 0x49, 0xa9,
0x41, 0x8b, 0x46, 0x2b, 0x46, 0x46, 0xf5, 0xa1, 0x51, 0x12, 0x44, 0xc6, 0xe9, 0x99, 0x40, 0x34,
0xc7, 0xd3, 0xc7, 0xd6, 0xd2, 0xa6, 0xc5, 0x0a, 0x83, 0xc5, 0x01, 0xa3, 0xd5, 0x89, 0xd6, 0xf1,
0x7a, 0x18, 0x1d, 0x7f, 0x8b, 0x10, 0xba, 0x6e, 0x77, 0xfe, 0x89, 0xd2, 0x5f, 0x1e, 0xe0, 0xfb,
0xf6, 0x01, 0xde, 0xa5, 0xb4, 0xc3, 0xd0, 0xde, 0x48, 0xeb, 0x6f, 0x7d, 0x23, 0xb1, 0x05, 0xc5,
0x58, 0x3a, 0x24, 0x41, 0x6c, 0x14, 0x9e, 0x85, 0xe2, 0x93, 0x97, 0x8f, 0xe6, 0x7f, 0x83, 0x7c,
0xe0, 0x13, 0x96, 0xba, 0x2f, 0xf1, 0x8f, 0x6f, 0x91, 0x83, 0xe8, 0x1d, 0x19, 0x75, 0xb2, 0x03,
0xd3, 0xc6, 0xb6, 0x1f, 0xb6, 0x91, 0x62, 0x69, 0x69, 0x89, 0x9f, 0x6d, 0x9a, 0x91, 0xc7, 0x1b,
0xb2, 0xec, 0xec, 0xec, 0x8f, 0xe4, 0x72, 0x79, 0x03, 0xa9, 0xa6, 0xa6, 0xc6, 0x9e, 0x0c, 0x12,
0x22, 0x15, 0x40, 0x42, 0xbb, 0x06, 0x23, 0x6e, 0x04, 0x22, 0x2e, 0x5c, 0xeb, 0xf9, 0x10, 0x72,
0xd5, 0xb7, 0xfc, 0x1d, 0xed, 0x1e, 0xab, 0x6c, 0xfd, 0x8d, 0x8d, 0x8d, 0x61, 0x7a, 0x7a, 0x9a,
0x1f, 0x90, 0xab, 0xab, 0x76, 0x0c, 0x8f, 0x8e, 0x44, 0xdf, 0xc9, 0xc9, 0xc9, 0x4d, 0x39, 0xd7,
0x15, 0x0a, 0xc5, 0xc3, 0x17, 0x01, 0x09, 0x29, 0x73, 0x04, 0xac, 0xb8, 0xfe, 0xc7, 0x4d, 0x98,
0x9e, 0x6b, 0xb1, 0x46, 0x5b, 0xd7, 0xdc, 0x1c, 0xac, 0x56, 0x2b, 0x7f, 0xbf, 0xb3, 0x13, 0x41,
0x8f, 0x5a, 0xbd, 0x93, 0x93, 0x93, 0xf3, 0x2e, 0x3f, 0xf8, 0x92, 0x41, 0x65, 0x65, 0x65, 0xed,
0x2b, 0x2b, 0x2b, 0x5e, 0xbb, 0xdd, 0xee, 0x6b, 0x6a, 0x6a, 0x0a, 0x49, 0x81, 0x92, 0x5b, 0x78,
0x63, 0x6b, 0x05, 0xd3, 0xf6, 0x41, 0x18, 0xec, 0x5a, 0x2c, 0x2f, 0x2f, 0x63, 0x88, 0x1d, 0x98,
0xd4, 0xa5, 0x94, 0xc2, 0xe6, 0xd6, 0x7b, 0xa1, 0xfc, 0xfc, 0xfc, 0xb7, 0xc4, 0x13, 0x36, 0xe5,
0xb8, 0x95, 0xc9, 0x5e, 0x63, 0x7a, 0x83, 0x94, 0x95, 0x95, 0x75, 0xee, 0xbf, 0x40, 0x74, 0xd1,
0x1c, 0x15, 0xdd, 0x62, 0xb1, 0xf0, 0xdd, 0x84, 0x0e, 0x48, 0x79, 0x55, 0xd5, 0xb3, 0xbc, 0xbc,
0xbc, 0x57, 0x53, 0x6c, 0x4b, 0xfd, 0x35, 0x22, 0xb1, 0xda, 0x9d, 0x7e, 0x51, 0x10, 0xd5, 0x87,
0x22, 0x52, 0x0f, 0x3c, 0xdc, 0x3f, 0x5b, 0x7c, 0xbe, 0x8f, 0x39, 0xfa, 0xd2, 0x91, 0xbf, 0x5b,
0xc7, 0x81, 0x32, 0x32, 0x32, 0x3e, 0xee, 0xe8, 0xe8, 0x18, 0x67, 0xc7, 0xbb, 0x4e, 0x10, 0x3b,
0xaf, 0x24, 0xd5, 0xa5, 0x54, 0xe9, 0x7e, 0xbf, 0x7b, 0x57, 0xf7, 0xe9, 0xe7, 0x9f, 0x5d, 0x3b,
0xce, 0xde, 0xbf, 0xf0, 0x98, 0xa8, 0x79, 0x89, 0xa3, 0xb6, 0xe9, 0x00, 0x00, 0x00, 0x00, 0x49,
0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE add_hierarchical_subsheet_xpm[1] = {{ png, sizeof( png ), "add_hierarchical_subsheet_xpm" }};
+25
View File
@@ -0,0 +1,25 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x00, 0x79, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xdd, 0x94, 0x41, 0x0a, 0x00,
0x31, 0x08, 0x03, 0xfd, 0x4a, 0xff, 0x94, 0xff, 0xf6, 0xdc, 0xfd, 0x94, 0x7b, 0xda, 0x43, 0x65,
0x41, 0xad, 0x90, 0x82, 0x07, 0xc1, 0x8b, 0x0e, 0xc4, 0x18, 0x51, 0x55, 0x61, 0x94, 0xd0, 0x41,
0x00, 0xd4, 0x2b, 0x3b, 0x0c, 0x60, 0x7a, 0xb5, 0x81, 0xbe, 0x45, 0xb2, 0x86, 0x7a, 0xbd, 0x85,
0xc8, 0x33, 0xa6, 0xd7, 0xdf, 0x03, 0x65, 0xe4, 0x8b, 0xc8, 0xf6, 0x0b, 0x8a, 0x1c, 0xd4, 0x82,
0x82, 0x33, 0x97, 0x40, 0x34, 0xe9, 0x7a, 0xb9, 0x8e, 0xf6, 0xb0, 0x6d, 0xb3, 0x2e, 0x2c, 0x43,
0x25, 0xeb, 0x52, 0x87, 0xad, 0xb8, 0x8e, 0x0b, 0xca, 0x48, 0x71, 0xfa, 0xb0, 0xa9, 0x38, 0xa9,
0x44, 0x10, 0x0f, 0x44, 0x93, 0xae, 0x97, 0xeb, 0x68, 0x0f, 0xdb, 0x2a, 0xeb, 0x5e, 0x8c, 0x95,
0x3c, 0x73, 0x5c, 0xe2, 0x55, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42,
0x60, 0x82,
};
const BITMAP_OPAQUE array_footprint_xpm[1] = {{ png, sizeof( png ), "array_footprint_xpm" }};
//EOF
+53
View File
@@ -0,0 +1,53 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x02, 0x47, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xa5, 0x96, 0x3b, 0x68, 0x14,
0x51, 0x14, 0x86, 0xbf, 0x35, 0x2f, 0x51, 0x13, 0x91, 0x10, 0x0b, 0x25, 0xac, 0x58, 0xc8, 0xfa,
0x48, 0xe9, 0x62, 0x10, 0x04, 0xc5, 0x07, 0x62, 0x40, 0x10, 0x14, 0x15, 0xb4, 0xb1, 0x50, 0x9b,
0x60, 0x63, 0x44, 0xf0, 0xd5, 0xa8, 0x20, 0xb1, 0x70, 0x35, 0xbb, 0x99, 0x7b, 0xee, 0x64, 0x4d,
0x70, 0x31, 0x24, 0x11, 0x93, 0xc1, 0x4a, 0x0b, 0xed, 0xac, 0xad, 0x6c, 0x6d, 0xec, 0x2c, 0x6c,
0x04, 0x0b, 0xe5, 0x5a, 0x78, 0x9c, 0x8c, 0x71, 0x77, 0xee, 0x5d, 0x2c, 0x06, 0x06, 0xe6, 0x3f,
0x7c, 0xe7, 0x7d, 0x06, 0xe7, 0x1c, 0xa1, 0x0f, 0x77, 0x58, 0xd5, 0x96, 0x1e, 0x0a, 0xe9, 0x7b,
0xb0, 0x91, 0x70, 0x19, 0xe1, 0x0d, 0x31, 0xbd, 0x41, 0x7a, 0xcb, 0x59, 0x2c, 0x63, 0xbc, 0xa5,
0x33, 0x18, 0x84, 0x70, 0x02, 0xe1, 0x27, 0x82, 0x43, 0xb8, 0xea, 0xd5, 0x1b, 0x8e, 0x22, 0x24,
0x08, 0x09, 0x11, 0xfb, 0x83, 0x40, 0x58, 0xf6, 0x21, 0x7c, 0x57, 0xc8, 0xbc, 0x2f, 0x7d, 0x4c,
0x32, 0x8c, 0x61, 0x09, 0x21, 0xc1, 0x70, 0x29, 0x28, 0x75, 0x44, 0x0c, 0x21, 0x7c, 0x55, 0xc8,
0x3b, 0x2a, 0xf4, 0x78, 0x22, 0xd9, 0x89, 0x65, 0x41, 0x21, 0xd7, 0x71, 0x01, 0x35, 0xc2, 0x52,
0x44, 0xf8, 0xac, 0x90, 0x0f, 0x44, 0xac, 0xf7, 0x44, 0x5e, 0xc4, 0xf0, 0x5c, 0x53, 0x76, 0x9f,
0x88, 0xae, 0xbf, 0xbe, 0x37, 0x35, 0x9a, 0xa6, 0x1f, 0xe1, 0xa3, 0x42, 0x3e, 0x11, 0xb3, 0x29,
0x17, 0x32, 0xc5, 0x00, 0x96, 0x3a, 0x42, 0x82, 0xe5, 0x31, 0x33, 0xac, 0xfd, 0x47, 0xd3, 0x24,
0x5d, 0x6b, 0x10, 0xde, 0x2b, 0xe4, 0x0b, 0x11, 0xa5, 0x5c, 0x48, 0x4c, 0x2f, 0x42, 0x55, 0xd3,
0x15, 0xf3, 0x84, 0xfe, 0xa6, 0xba, 0x15, 0x73, 0xd2, 0x89, 0xe1, 0x95, 0x42, 0xbe, 0x11, 0x33,
0x9c, 0x0b, 0xa9, 0xd0, 0x83, 0xf0, 0x40, 0x23, 0x69, 0x30, 0xc1, 0x60, 0x4b, 0xed, 0x8a, 0x3c,
0xd7, 0x15, 0xf2, 0x03, 0xc3, 0x48, 0x2e, 0x64, 0x8e, 0x0e, 0x84, 0x9b, 0x1a, 0xc9, 0x02, 0x75,
0x4f, 0xe4, 0x99, 0x8e, 0xb9, 0xa7, 0x10, 0x87, 0x70, 0x21, 0x60, 0xb6, 0x46, 0xb5, 0xf0, 0x8b,
0x58, 0xca, 0x5e, 0xbd, 0x1a, 0x9d, 0x49, 0x21, 0x86, 0x1b, 0x01, 0x90, 0xe3, 0x99, 0x81, 0x3c,
0x1c, 0x34, 0xf4, 0xce, 0x39, 0x98, 0x60, 0x1d, 0xc2, 0x6b, 0x84, 0x6a, 0x4b, 0x61, 0x8d, 0xcd,
0x08, 0x07, 0xb4, 0x36, 0x7d, 0x58, 0x1e, 0x62, 0x38, 0x9d, 0x33, 0x53, 0xdb, 0xb2, 0x91, 0x66,
0x73, 0xde, 0xdd, 0x6a, 0xea, 0x69, 0xb0, 0x01, 0xc1, 0x6a, 0x3d, 0x8e, 0x68, 0xe3, 0x74, 0x7b,
0x9c, 0x7a, 0x86, 0xb0, 0x88, 0xb0, 0x27, 0x6c, 0x05, 0xfd, 0x6e, 0xf7, 0x8a, 0xa6, 0xea, 0x29,
0x53, 0x0c, 0xe4, 0xea, 0xb3, 0x4e, 0x09, 0xb5, 0x3f, 0x4b, 0xd8, 0x07, 0xe9, 0x42, 0xb8, 0xab,
0x46, 0xb3, 0x58, 0x8a, 0x01, 0x4e, 0x3d, 0x52, 0xfd, 0x34, 0x35, 0x36, 0xfa, 0x57, 0x90, 0xa3,
0x80, 0xe5, 0x9a, 0x1a, 0xbd, 0xc0, 0xb2, 0xab, 0x2d, 0xa7, 0xea, 0x6c, 0xf1, 0xae, 0x20, 0x9d,
0xa9, 0x8b, 0x5a, 0x93, 0x25, 0x2c, 0x7b, 0xf3, 0x3b, 0x8a, 0x02, 0x26, 0xe3, 0x54, 0xc4, 0x90,
0x77, 0x05, 0x69, 0xc7, 0x9c, 0xca, 0xb4, 0xef, 0xb1, 0x80, 0x3a, 0x7a, 0x9d, 0x6a, 0x36, 0x23,
0x87, 0x52, 0x88, 0xe1, 0x5c, 0xc0, 0xbd, 0x3a, 0x99, 0xd1, 0x8f, 0x84, 0xae, 0xa0, 0xb2, 0xb6,
0x64, 0x82, 0x30, 0x1a, 0x70, 0x49, 0x0f, 0xa6, 0x10, 0xe1, 0x7c, 0xd8, 0x0a, 0x8a, 0x28, 0x61,
0xd2, 0xa3, 0x75, 0x8b, 0x39, 0x3a, 0x3c, 0x90, 0xdd, 0x18, 0x5e, 0x2a, 0xe4, 0x4a, 0xe8, 0x66,
0x18, 0xc4, 0xd2, 0x50, 0xa3, 0x71, 0xef, 0x25, 0x8d, 0x28, 0x21, 0xcc, 0xab, 0xfe, 0xb6, 0xcf,
0xa9, 0x65, 0xd0, 0x24, 0x3b, 0x10, 0x66, 0xb3, 0x03, 0xe6, 0xa9, 0x4b, 0x59, 0x4f, 0xf6, 0x38,
0x75, 0x56, 0x07, 0xef, 0x3a, 0xe7, 0x1c, 0x54, 0xd9, 0xca, 0xcc, 0xf2, 0x80, 0x05, 0x2c, 0xd6,
0xed, 0x54, 0xe8, 0x0b, 0xd6, 0xb7, 0xf3, 0x43, 0xf8, 0x3f, 0xcf, 0x2f, 0x78, 0xbb, 0x45, 0x34,
0xcd, 0x8e, 0xb0, 0xa7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE array_line_xpm[1] = {{ png, sizeof( png ), "array_line_xpm" }};
//EOF
+25
View File
@@ -0,0 +1,25 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x00, 0x79, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xdd, 0x94, 0x41, 0x0a, 0x00,
0x31, 0x08, 0x03, 0xfd, 0x4a, 0xff, 0x94, 0xff, 0xf6, 0xdc, 0xfd, 0x94, 0x7b, 0xda, 0x43, 0x65,
0x41, 0xad, 0x90, 0x82, 0x07, 0xc1, 0x8b, 0x0e, 0xc4, 0x18, 0x51, 0x55, 0x61, 0x94, 0xd0, 0x41,
0x00, 0xd4, 0x2b, 0x3b, 0x0c, 0x60, 0x7a, 0xb5, 0x81, 0xbe, 0x45, 0xb2, 0x86, 0x7a, 0xbd, 0x85,
0xc8, 0x33, 0xa6, 0xd7, 0xdf, 0x03, 0x65, 0xe4, 0x8b, 0xc8, 0xf6, 0x0b, 0x8a, 0x1c, 0xd4, 0x82,
0x82, 0x33, 0x97, 0x40, 0x34, 0xe9, 0x7a, 0xb9, 0x8e, 0xf6, 0xb0, 0x6d, 0xb3, 0x2e, 0x2c, 0x43,
0x25, 0xeb, 0x52, 0x87, 0xad, 0xb8, 0x8e, 0x0b, 0xca, 0x48, 0x71, 0xfa, 0xb0, 0xa9, 0x38, 0xa9,
0x44, 0x10, 0x0f, 0x44, 0x93, 0xae, 0x97, 0xeb, 0x68, 0x0f, 0xdb, 0x2a, 0xeb, 0x5e, 0x8c, 0x95,
0x3c, 0x73, 0x5c, 0xe2, 0x55, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42,
0x60, 0x82,
};
const BITMAP_OPAQUE array_module_xpm[1] = {{ png, sizeof( png ), "array_module_xpm" }};
//EOF
+77
View File
@@ -0,0 +1,77 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x03, 0xbe, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x96, 0xdd, 0x4b, 0x54,
0x41, 0x18, 0xc6, 0x67, 0x3f, 0xda, 0x2b, 0x53, 0x28, 0x93, 0xa0, 0x08, 0xef, 0x14, 0x8a, 0x4c,
0x44, 0x2c, 0x8c, 0x2d, 0xcb, 0x4a, 0xc1, 0x7f, 0xa0, 0x8b, 0xfe, 0x82, 0xa0, 0x8b, 0x8a, 0x22,
0xf2, 0x63, 0x3d, 0x47, 0x57, 0x4b, 0xca, 0x42, 0xd4, 0xf5, 0xb3, 0x34, 0xf3, 0x83, 0x5c, 0x95,
0x45, 0x02, 0x15, 0x0c, 0xfb, 0x07, 0x8a, 0x84, 0x10, 0x45, 0x23, 0x24, 0x24, 0xa2, 0x8b, 0x6e,
0x82, 0xbc, 0xc8, 0xde, 0xdf, 0x38, 0x47, 0x8f, 0xeb, 0x6e, 0x7a, 0x61, 0x5d, 0x3c, 0x9c, 0x61,
0xce, 0xcc, 0x3c, 0xf3, 0x3e, 0xef, 0x33, 0xef, 0x8c, 0x5a, 0x5b, 0x5b, 0x53, 0xff, 0x03, 0x89,
0x3b, 0x43, 0xea, 0x80, 0xa0, 0x44, 0x50, 0xa6, 0xc2, 0xea, 0xd0, 0x8e, 0x8b, 0xd4, 0xab, 0x34,
0x65, 0xa9, 0x7c, 0x55, 0xa1, 0xf2, 0xd4, 0x1d, 0xb5, 0x7f, 0x47, 0x22, 0x59, 0x38, 0x5d, 0x30,
0xa6, 0xaa, 0xd5, 0x6f, 0xf9, 0x7e, 0xd7, 0x58, 0x6f, 0x4f, 0xab, 0x1a, 0x75, 0x64, 0xdb, 0xe4,
0xb0, 0x3a, 0x18, 0xa8, 0x09, 0xd4, 0xca, 0x98, 0x58, 0xca, 0x83, 0x94, 0xfe, 0x94, 0xba, 0x94,
0x7e, 0xda, 0x7e, 0xcb, 0x5f, 0x2e, 0x73, 0x52, 0x13, 0x12, 0x19, 0x92, 0xaf, 0x82, 0xcf, 0x82,
0x49, 0x41, 0x4c, 0xa3, 0x4a, 0x4d, 0xc8, 0xf7, 0x93, 0xe0, 0x87, 0x20, 0xd3, 0x35, 0x3e, 0xc3,
0x67, 0xfb, 0x06, 0x73, 0x9e, 0x9d, 0xec, 0x6c, 0x5e, 0x7a, 0x64, 0x0d, 0x7d, 0xeb, 0xa9, 0x00,
0x4f, 0xe6, 0x1f, 0xda, 0xd9, 0x6d, 0x59, 0xdd, 0xf2, 0xaf, 0xcf, 0x4d, 0xe6, 0x26, 0x1a, 0x33,
0x24, 0x31, 0x43, 0xf4, 0x51, 0x30, 0x27, 0x98, 0x32, 0x7d, 0x8b, 0xb2, 0xdb, 0xb7, 0xce, 0xf8,
0x80, 0x1d, 0xa8, 0x2f, 0xec, 0x2b, 0x88, 0xb0, 0xf8, 0xe3, 0xf9, 0xb0, 0x7d, 0x71, 0xe8, 0x7c,
0xa4, 0x34, 0x7a, 0xb9, 0xa5, 0x69, 0xa9, 0x41, 0x93, 0x42, 0x46, 0x64, 0x5b, 0x88, 0x74, 0x4e,
0xd6, 0x25, 0x9a, 0x34, 0xf8, 0x65, 0xbe, 0x51, 0xc1, 0xaa, 0xe0, 0x8d, 0xe0, 0xb5, 0x6e, 0xdb,
0x2a, 0x0b, 0x19, 0x7d, 0x96, 0x6f, 0xb4, 0xe7, 0x4b, 0x5b, 0x95, 0x3d, 0x5b, 0x19, 0xa6, 0xed,
0xb7, 0xfd, 0x15, 0xb2, 0x70, 0xad, 0x60, 0x04, 0x32, 0x22, 0x43, 0x46, 0x27, 0x67, 0x0e, 0x51,
0x89, 0xc9, 0x49, 0xcc, 0x44, 0x32, 0xe1, 0x8a, 0x14, 0x09, 0x16, 0xcc, 0xbf, 0x15, 0x99, 0x7c,
0x55, 0x88, 0x82, 0x19, 0x8d, 0xe9, 0xbd, 0xec, 0xfc, 0x74, 0x6f, 0x7e, 0xbb, 0xd7, 0xf2, 0xde,
0x74, 0xc6, 0x43, 0x46, 0x64, 0xfc, 0xd3, 0x39, 0x13, 0x83, 0xb8, 0x89, 0xca, 0x5c, 0x44, 0xc8,
0x15, 0x75, 0x11, 0x45, 0xb4, 0x6c, 0x9b, 0x44, 0xd7, 0x04, 0x45, 0x87, 0x1b, 0x33, 0x34, 0x51,
0xde, 0xf3, 0x53, 0x1d, 0x5e, 0xdb, 0x7b, 0x7d, 0x83, 0x48, 0x22, 0x43, 0x46, 0x4d, 0x24, 0x06,
0xc1, 0x8d, 0x9b, 0x44, 0x62, 0x61, 0x2d, 0xdd, 0x7a, 0xe2, 0xa7, 0x8c, 0x5c, 0x2f, 0x0c, 0x09,
0x32, 0xce, 0x08, 0xc6, 0x75, 0xbf, 0xa5, 0x8e, 0xcb, 0xf7, 0x98, 0xcf, 0xf2, 0x8c, 0xf6, 0xad,
0x74, 0x56, 0x56, 0xbc, 0xbf, 0x5b, 0x47, 0x1b, 0x32, 0xc1, 0x2d, 0x64, 0x24, 0x67, 0x18, 0x44,
0x4b, 0x27, 0xd6, 0x8f, 0x37, 0xc3, 0xb4, 0x71, 0x57, 0xcc, 0xe4, 0x64, 0xc1, 0x44, 0x32, 0xa3,
0xfb, 0xaa, 0xd5, 0xbc, 0x7c, 0xdf, 0xa9, 0x35, 0xe5, 0x01, 0xfb, 0x6a, 0xf6, 0x3d, 0x2d, 0x1a,
0x0c, 0xea, 0x9d, 0x43, 0x46, 0x64, 0xc8, 0x48, 0xce, 0xe8, 0xc3, 0x8d, 0x58, 0x7f, 0xbb, 0xeb,
0x24, 0xc1, 0xc6, 0xc2, 0x8b, 0x26, 0xf1, 0x31, 0x83, 0x71, 0x4d, 0x52, 0xad, 0x7e, 0x4a, 0x3b,
0xdb, 0xb5, 0xb1, 0xa3, 0x9e, 0x6a, 0xcf, 0x30, 0x64, 0x44, 0xe6, 0xd8, 0x1b, 0x83, 0xe0, 0x46,
0xac, 0xcf, 0x39, 0x4b, 0x76, 0x60, 0x33, 0xb1, 0xb0, 0x91, 0x6e, 0xc5, 0x60, 0x55, 0x47, 0xe2,
0x22, 0x71, 0x93, 0x11, 0x19, 0xd2, 0x91, 0x33, 0x0c, 0x82, 0x74, 0x58, 0x9f, 0x73, 0xb6, 0x73,
0x09, 0xc2, 0xc2, 0xb8, 0x8b, 0xc4, 0x93, 0x13, 0x91, 0x2a, 0x79, 0x0d, 0x13, 0x29, 0x25, 0x67,
0x18, 0x04, 0x37, 0x26, 0xaa, 0x20, 0xc9, 0x89, 0x90, 0x91, 0x49, 0x4c, 0x66, 0x91, 0xbd, 0x26,
0x22, 0x5c, 0xc2, 0xf6, 0x88, 0x14, 0xc8, 0x80, 0x1c, 0xc8, 0x82, 0x3c, 0xc8, 0xb4, 0x1b, 0xe9,
0x98, 0xfb, 0x57, 0xe9, 0x48, 0x9c, 0xe8, 0x3b, 0x94, 0xdf, 0x93, 0xdb, 0xd1, 0xb5, 0xdc, 0x1c,
0x72, 0x92, 0xdb, 0xbb, 0xd2, 0x5e, 0x19, 0x1c, 0x38, 0xd3, 0x26, 0x0b, 0x44, 0xdd, 0x64, 0xda,
0x0c, 0x96, 0x67, 0x38, 0x38, 0x58, 0x18, 0x61, 0x8c, 0x33, 0x9e, 0xb9, 0xac, 0xc1, 0x5a, 0x09,
0xcd, 0x80, 0x15, 0x73, 0xba, 0x4f, 0x74, 0x31, 0xd8, 0x9e, 0x2d, 0x0f, 0x17, 0x88, 0x55, 0xb1,
0x2c, 0xd6, 0xa5, 0x0f, 0x32, 0x1d, 0x99, 0xcb, 0xde, 0x17, 0x86, 0x82, 0xad, 0x49, 0xed, 0x2d,
0x6b, 0x6d, 0xb3, 0xb7, 0xbe, 0x4f, 0xe4, 0x70, 0x71, 0xc8, 0x38, 0x6c, 0xfa, 0x00, 0x4a, 0x59,
0xe1, 0x10, 0xd2, 0x66, 0x21, 0x76, 0x4d, 0x5b, 0xe7, 0x23, 0xee, 0xc0, 0x7a, 0x9c, 0x03, 0x6b,
0x79, 0x6f, 0xd3, 0x4e, 0x7a, 0x60, 0x29, 0x13, 0x94, 0x0b, 0x76, 0x42, 0xf9, 0x90, 0x32, 0x72,
0xcf, 0xd9, 0x09, 0x0b, 0xb0, 0x5b, 0xfe, 0x91, 0x07, 0x9d, 0xf4, 0xf8, 0x12, 0x64, 0x79, 0x6f,
0xb8, 0x4a, 0x50, 0x28, 0x79, 0x09, 0x92, 0xc2, 0x47, 0x01, 0xe4, 0x67, 0x69, 0xb4, 0xb8, 0x45,
0x92, 0x69, 0xb9, 0x88, 0x6e, 0x21, 0x23, 0xff, 0x48, 0xb6, 0x71, 0xd6, 0x46, 0x51, 0x2d, 0xe8,
0xcd, 0x8b, 0x2f, 0xaa, 0xf6, 0x95, 0xe1, 0xe2, 0xd6, 0xc4, 0x45, 0x55, 0x4a, 0x39, 0x61, 0x52,
0xda, 0x81, 0x3e, 0x74, 0x56, 0xc0, 0x26, 0x32, 0x24, 0x22, 0x67, 0x24, 0x19, 0x59, 0x8c, 0xf5,
0x37, 0xae, 0x89, 0xd0, 0x87, 0xfb, 0xba, 0xd6, 0x31, 0x96, 0x0d, 0xfa, 0x2d, 0xdf, 0x88, 0xb3,
0xce, 0xb6, 0x6b, 0xc2, 0xec, 0xa4, 0x9c, 0xcb, 0xca, 0xb9, 0x25, 0x89, 0x0c, 0x09, 0xd0, 0x9b,
0x3e, 0x9c, 0x84, 0x6d, 0x13, 0x5d, 0x7c, 0x0d, 0x73, 0xb5, 0x35, 0xe7, 0x06, 0xce, 0xb6, 0x5d,
0x7a, 0x55, 0x14, 0x61, 0x6e, 0xd2, 0x8b, 0xcf, 0xd8, 0x35, 0x95, 0xeb, 0x97, 0x01, 0xce, 0x60,
0x40, 0x52, 0x71, 0x90, 0xb6, 0xab, 0xeb, 0x6c, 0x38, 0x57, 0x79, 0xae, 0xe4, 0xa8, 0x63, 0xb9,
0x29, 0xb4, 0xeb, 0xab, 0xdc, 0x21, 0xd3, 0x0f, 0x0b, 0x1e, 0x1b, 0xa2, 0xaf, 0x4e, 0xa6, 0xb4,
0xf5, 0x03, 0xc4, 0x75, 0x26, 0xe2, 0x1f, 0x27, 0x52, 0x5c, 0x63, 0x69, 0xf5, 0xa9, 0x2f, 0x77,
0xf5, 0x38, 0xd9, 0xd2, 0x49, 0xce, 0x78, 0x3a, 0xf1, 0x84, 0x32, 0xf6, 0xdc, 0xd3, 0xe7, 0xd6,
0xbf, 0xc4, 0x1f, 0x25, 0x18, 0x28, 0x89, 0x49, 0x82, 0xc8, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x49,
0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE array_pad_xpm[1] = {{ png, sizeof( png ), "array_pad_xpm" }};
//EOF
+51
View File
@@ -0,0 +1,51 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x02, 0x22, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x94, 0x4f, 0x4b, 0x1b,
0x41, 0x18, 0x87, 0x67, 0xc1, 0x59, 0xdd, 0x4d, 0xb6, 0x69, 0x24, 0xb6, 0xb6, 0x62, 0xbd, 0x0a,
0x31, 0x15, 0x94, 0x5d, 0x12, 0x6a, 0xbd, 0xd9, 0xcf, 0xe1, 0xb9, 0x58, 0xe8, 0x27, 0x29, 0x3d,
0xf5, 0xd8, 0x4b, 0xa1, 0xe0, 0x45, 0xb1, 0xc1, 0x4b, 0xa1, 0x9d, 0x0f, 0xe0, 0xd5, 0x8b, 0x8a,
0x87, 0xf6, 0xa4, 0xa0, 0x87, 0xf6, 0x94, 0x16, 0xe9, 0x74, 0x9e, 0x25, 0x23, 0x13, 0x49, 0xc2,
0xfe, 0x09, 0x2e, 0xbc, 0x2c, 0x3b, 0xb3, 0xef, 0x3e, 0xf3, 0xbe, 0xbf, 0x77, 0x7f, 0x42, 0x6b,
0x2d, 0x86, 0x85, 0xb9, 0xf4, 0xa8, 0xbd, 0x31, 0x39, 0x6a, 0xe4, 0xde, 0x9d, 0x17, 0xa3, 0xa8,
0x22, 0xde, 0x35, 0x1e, 0xca, 0x73, 0x40, 0x73, 0xb3, 0xf2, 0x84, 0x67, 0xd6, 0xc7, 0x7c, 0x3c,
0xac, 0x86, 0xe2, 0x75, 0xa3, 0x26, 0x3f, 0x03, 0x6a, 0xd4, 0xe5, 0x27, 0x9e, 0x59, 0x1f, 0x0a,
0x32, 0x57, 0x1c, 0xcc, 0x78, 0x57, 0xeb, 0xab, 0xf3, 0x37, 0x9d, 0x76, 0xc2, 0x82, 0x3e, 0xea,
0x6e, 0xea, 0x37, 0xdb, 0x8b, 0xbd, 0x30, 0xf0, 0x2e, 0xd9, 0x1f, 0x02, 0x59, 0x0e, 0xa6, 0xbd,
0x83, 0xb5, 0xe7, 0xf3, 0xdf, 0x3a, 0xed, 0x58, 0x01, 0x3a, 0xea, 0xbe, 0x54, 0x3b, 0xdb, 0x8b,
0x5f, 0x4d, 0xce, 0x3e, 0xfb, 0x03, 0x20, 0x4e, 0x3c, 0xe3, 0x7b, 0xd7, 0xed, 0x64, 0x45, 0xb7,
0x5a, 0x2d, 0xbd, 0xb1, 0xf1, 0x22, 0x05, 0xf5, 0xce, 0x5e, 0xe9, 0x3f, 0x27, 0x1d, 0xdd, 0xfd,
0xb8, 0xae, 0xfb, 0xb0, 0xc8, 0xad, 0x64, 0xda, 0xf7, 0xbe, 0xb4, 0xe3, 0x15, 0x65, 0x72, 0x94,
0xc9, 0x49, 0x41, 0xbd, 0xb3, 0x2d, 0xf5, 0xf7, 0xb4, 0xa3, 0x4c, 0x8e, 0xea, 0xc3, 0xc2, 0x5b,
0x10, 0xed, 0x59, 0x7a, 0xf6, 0xf8, 0x1f, 0x10, 0x00, 0x2e, 0xe8, 0xe6, 0xb8, 0x96, 0xc2, 0xa8,
0x8c, 0xf7, 0x2c, 0x88, 0xf6, 0x98, 0x9c, 0xef, 0x40, 0x00, 0xb8, 0x20, 0x93, 0x93, 0xc2, 0xa8,
0x8c, 0xf7, 0x6e, 0x41, 0xf5, 0x9a, 0xfc, 0x91, 0x24, 0x49, 0x0a, 0xb0, 0x61, 0x41, 0x36, 0x68,
0x23, 0x9a, 0x59, 0x90, 0xc9, 0xd9, 0x8d, 0xe3, 0x38, 0x05, 0xd8, 0xb0, 0x20, 0x1b, 0xb4, 0x11,
0xcd, 0xfa, 0x1d, 0x10, 0xba, 0x40, 0xa8, 0xdc, 0x01, 0x8d, 0x93, 0x72, 0x62, 0xb7, 0x02, 0xdb,
0x42, 0x1b, 0x54, 0x1c, 0x55, 0xa6, 0x2e, 0x6c, 0x45, 0x9c, 0x94, 0x13, 0xbb, 0x15, 0xd8, 0x16,
0xda, 0xa0, 0xe2, 0x28, 0x9c, 0xda, 0x1b, 0xd0, 0x08, 0x0d, 0xd0, 0x02, 0x4d, 0x5c, 0x10, 0x77,
0xb4, 0x5b, 0x78, 0xfa, 0x48, 0x87, 0xa1, 0xf8, 0xe0, 0x6a, 0x84, 0x06, 0x68, 0x81, 0x26, 0x2e,
0x88, 0x3b, 0xda, 0x2d, 0x3c, 0x99, 0x53, 0x41, 0x20, 0xde, 0x0e, 0x4c, 0x1d, 0x53, 0xc5, 0x74,
0x01, 0x73, 0x41, 0x40, 0x9a, 0xcd, 0xa6, 0x96, 0xd2, 0xfb, 0x7d, 0x77, 0xea, 0x98, 0x2a, 0xa6,
0x0b, 0x98, 0x0b, 0x02, 0x62, 0x72, 0x94, 0xef, 0x7b, 0x87, 0x03, 0x53, 0x67, 0xff, 0x23, 0x60,
0x54, 0x46, 0x1b, 0x01, 0xd1, 0x2e, 0x2a, 0xf1, 0xa5, 0xf7, 0x6b, 0xd4, 0x7f, 0x04, 0x8c, 0xca,
0x68, 0x23, 0x20, 0xda, 0x45, 0x25, 0x7d, 0xc8, 0xf2, 0x58, 0x67, 0x40, 0x33, 0x40, 0xf5, 0x07,
0xf2, 0x67, 0xb5, 0x22, 0xde, 0x67, 0x72, 0x06, 0xa3, 0x19, 0x20, 0x93, 0xb3, 0x5b, 0x0d, 0xc4,
0xce, 0x48, 0x67, 0xb8, 0x57, 0xaf, 0xcb, 0x9a, 0x34, 0x09, 0x53, 0xcd, 0x64, 0x90, 0x65, 0x4d,
0x35, 0xb3, 0x41, 0x96, 0x31, 0xd5, 0x5c, 0x06, 0x59, 0xd8, 0x54, 0xf3, 0x1a, 0x64, 0x19, 0x53,
0xcd, 0x65, 0x90, 0x45, 0x4d, 0x55, 0xdd, 0x4b, 0x14, 0x31, 0xc8, 0xc2, 0xa6, 0x9a, 0xd7, 0x20,
0xcb, 0x98, 0x6a, 0x2e, 0x83, 0x2c, 0x6b, 0xaa, 0x99, 0x0d, 0x72, 0x12, 0xa6, 0x9a, 0xc9, 0x20,
0x27, 0x6d, 0xaa, 0x13, 0xf5, 0xba, 0xff, 0x0c, 0x96, 0xd3, 0x5f, 0x78, 0x1d, 0xd5, 0x5b, 0x00,
0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE array_target_xpm[1] = {{ png, sizeof( png ), "array_target_xpm" }};
//EOF
+39
View File
@@ -0,0 +1,39 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x01, 0x5a, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0x96, 0xbf, 0x6a, 0xc2,
0x50, 0x14, 0x87, 0x3f, 0xf0, 0x19, 0x74, 0xaa, 0xe0, 0x22, 0xd2, 0x41, 0x9c, 0x9c, 0x25, 0xe0,
0xe6, 0xe2, 0xe0, 0x24, 0xf8, 0x06, 0x4e, 0x4e, 0xe9, 0xe6, 0xe6, 0x13, 0x88, 0xc9, 0xbd, 0x37,
0x06, 0x1c, 0x5d, 0x2c, 0x9d, 0xba, 0xfa, 0x2e, 0x0e, 0x7d, 0x07, 0x0b, 0xe9, 0x70, 0xae, 0xb1,
0x49, 0x73, 0x6d, 0x1a, 0x4a, 0xa1, 0xe0, 0xf0, 0x1b, 0xce, 0x9f, 0x1f, 0x1f, 0xc9, 0xe1, 0x1c,
0x2e, 0x49, 0x92, 0xf0, 0x17, 0x02, 0xcc, 0x1c, 0xf4, 0x5b, 0x79, 0x99, 0x39, 0x98, 0x11, 0xa8,
0x5d, 0x79, 0x99, 0x11, 0xa0, 0x7d, 0xd0, 0x09, 0xe8, 0x13, 0xe8, 0x57, 0xd0, 0x47, 0x1b, 0x5f,
0x74, 0xb4, 0xf9, 0x93, 0x8d, 0x7d, 0xd0, 0x13, 0xd0, 0x2f, 0x60, 0x62, 0xd0, 0x4b, 0xd0, 0x2b,
0x89, 0x53, 0xad, 0x24, 0x6f, 0x62, 0x1b, 0x4f, 0x2e, 0xa0, 0x77, 0x50, 0x7d, 0xf9, 0xc4, 0x4d,
0x2b, 0x0b, 0xda, 0xb4, 0x24, 0xaf, 0xfa, 0xd2, 0x97, 0x82, 0x9e, 0x21, 0x68, 0x4b, 0x6d, 0xd7,
0xc8, 0x82, 0x76, 0x0d, 0xc9, 0x07, 0x6d, 0xe9, 0x13, 0xd0, 0x23, 0x44, 0xde, 0xf5, 0x5f, 0x16,
0x83, 0xa4, 0x16, 0x79, 0xd2, 0xbf, 0x6e, 0x42, 0xdc, 0xbd, 0xe6, 0x8b, 0x41, 0x52, 0x8b, 0xbb,
0xb0, 0x6e, 0x16, 0x0c, 0xcd, 0x0d, 0x72, 0x0f, 0xda, 0x0d, 0x4a, 0x7b, 0xee, 0xa0, 0xff, 0x08,
0x52, 0xc3, 0x2c, 0x48, 0x0d, 0xbf, 0x07, 0x45, 0xbd, 0x2c, 0x28, 0xea, 0xdd, 0x04, 0x81, 0x5a,
0x80, 0x3e, 0xe7, 0x16, 0xf6, 0x0c, 0x6a, 0xe1, 0x86, 0x84, 0x63, 0x50, 0x87, 0x2c, 0x48, 0x1d,
0x20, 0x1c, 0xdf, 0x00, 0x99, 0xa9, 0x5d, 0xc8, 0x9c, 0xcc, 0xd4, 0x0d, 0x52, 0x03, 0xbb, 0xc0,
0x39, 0xa9, 0x41, 0xee, 0xd6, 0x45, 0x9d, 0xe2, 0x46, 0x97, 0xa2, 0x4e, 0x35, 0x4f, 0x7a, 0xb7,
0x4a, 0x6b, 0x52, 0xcd, 0x93, 0x9a, 0xd4, 0x0c, 0xf4, 0x03, 0x04, 0xb9, 0xc1, 0x06, 0x3d, 0xc9,
0xab, 0xd9, 0x57, 0xd0, 0x4f, 0x3c, 0x84, 0x1e, 0xa8, 0x27, 0xd8, 0xd7, 0x6e, 0x1f, 0xc8, 0x7d,
0x4d, 0xfa, 0x42, 0xaf, 0x92, 0xa7, 0xca, 0x4e, 0xfc, 0xd2, 0x1e, 0xdd, 0x41, 0x77, 0x50, 0x92,
0x00, 0xdb, 0xba, 0x7d, 0x6c, 0x7c, 0x5e, 0xb6, 0x25, 0x6c, 0xeb, 0x6e, 0x48, 0x39, 0x4f, 0xce,
0xa4, 0xfd, 0xe2, 0xe7, 0x92, 0xf6, 0xdd, 0xa0, 0x72, 0x1e, 0xfe, 0xea, 0x01, 0xf9, 0x01, 0xbd,
0x5c, 0x34, 0x23, 0x26, 0x7e, 0x75, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE array_text_xpm[1] = {{ png, sizeof( png ), "array_text_xpm" }};
//EOF
+51
View File
@@ -0,0 +1,51 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x02, 0x1a, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xcd, 0x94, 0x3d, 0x88, 0x13,
0x41, 0x18, 0x86, 0xe7, 0x40, 0xbb, 0x20, 0xe1, 0x1a, 0x13, 0x3b, 0xb1, 0xb3, 0xb0, 0xbf, 0x43,
0x0e, 0xe5, 0x38, 0xbd, 0xd2, 0x46, 0x10, 0x04, 0x0b, 0x0b, 0x4b, 0xb9, 0xce, 0x9f, 0xc2, 0xcc,
0x9a, 0x9d, 0x9d, 0x9f, 0x6c, 0x22, 0xc1, 0x22, 0x6a, 0x27, 0x07, 0x5a, 0x18, 0xb2, 0xe4, 0xe4,
0x20, 0x46, 0x4c, 0x8a, 0x6b, 0x6c, 0xc5, 0xeb, 0x4e, 0x2c, 0x6c, 0x44, 0x39, 0x72, 0x57, 0xa8,
0xa0, 0x98, 0x1b, 0xdf, 0xec, 0xae, 0x49, 0x30, 0xeb, 0xdd, 0x8e, 0x03, 0xc1, 0xe2, 0xdd, 0x6f,
0x77, 0x66, 0xbe, 0x79, 0xe7, 0xe7, 0xdb, 0x87, 0x68, 0xad, 0xc9, 0x34, 0x14, 0x3d, 0x1c, 0xf2,
0x93, 0x50, 0xa2, 0x0f, 0x14, 0xc6, 0x0d, 0x13, 0x29, 0xa9, 0x43, 0xdd, 0x14, 0xaa, 0x8f, 0x8c,
0xa2, 0x89, 0xde, 0x61, 0xa2, 0xf7, 0x88, 0x3b, 0xd0, 0xd7, 0x38, 0x7e, 0x08, 0xdb, 0x47, 0xd2,
0x63, 0x46, 0x83, 0x49, 0x6e, 0x42, 0xb7, 0xa1, 0x0a, 0x29, 0x90, 0x87, 0x61, 0xa4, 0xe4, 0x4e,
0xdc, 0xfe, 0x5b, 0xdd, 0x3f, 0x8d, 0x3e, 0x42, 0x7d, 0x98, 0xed, 0x22, 0x6e, 0x86, 0xd1, 0x21,
0x7b, 0x78, 0xff, 0x1c, 0x2f, 0x60, 0xd2, 0xa8, 0x40, 0x18, 0x62, 0x00, 0x55, 0xa1, 0x95, 0x38,
0xae, 0x43, 0x22, 0x5c, 0x80, 0x43, 0x6e, 0x25, 0x19, 0xf5, 0xa1, 0xfb, 0x9e, 0xef, 0x5d, 0x10,
0x92, 0xb5, 0xa5, 0x64, 0x67, 0xf1, 0xcd, 0x63, 0xb3, 0x41, 0xff, 0x5e, 0xc2, 0x8e, 0x02, 0xf4,
0x2f, 0x16, 0x4b, 0xc5, 0xe3, 0x52, 0xf2, 0xcb, 0x52, 0xd2, 0x63, 0x68, 0x3b, 0x1d, 0x9b, 0xbd,
0x84, 0xd6, 0x26, 0x8d, 0xb0, 0x03, 0xae, 0xf8, 0xc5, 0x52, 0x59, 0xe8, 0x46, 0xf0, 0x4c, 0x2b,
0x9f, 0x6b, 0xe1, 0xbb, 0x0b, 0x63, 0x13, 0xef, 0x26, 0x18, 0x55, 0x95, 0x52, 0x27, 0x54, 0x59,
0xb4, 0x91, 0xf3, 0x42, 0xfa, 0x5e, 0x9b, 0x31, 0x96, 0x1f, 0x1b, 0x53, 0x4d, 0xda, 0xd1, 0x5b,
0xe9, 0xf3, 0x8d, 0xe6, 0x5a, 0xa0, 0x7b, 0xbd, 0x6d, 0xfd, 0xe4, 0xe9, 0xaa, 0x16, 0x8a, 0x0d,
0x95, 0xbf, 0x7b, 0xf4, 0x5e, 0x82, 0xd1, 0x8a, 0x2a, 0xf3, 0xab, 0xcd, 0xe7, 0x8d, 0x0e, 0x72,
0xba, 0xc8, 0xe9, 0x0a, 0xe5, 0x45, 0x2a, 0xb1, 0x56, 0xae, 0x98, 0x3b, 0x93, 0x7a, 0x47, 0xe8,
0x3b, 0x82, 0xa3, 0xdc, 0x12, 0xca, 0x7d, 0x85, 0xf7, 0x53, 0x69, 0x76, 0x84, 0xb2, 0x38, 0x8c,
0xa3, 0xbf, 0x81, 0x05, 0x5e, 0xc1, 0x98, 0xd9, 0x34, 0x77, 0x34, 0x38, 0x6b, 0x7d, 0xde, 0x5b,
0x72, 0x90, 0xd4, 0xa7, 0x94, 0x66, 0x52, 0xdc, 0xd1, 0x25, 0xa8, 0xb3, 0xec, 0x2d, 0xcf, 0x21,
0xa7, 0x8e, 0x9c, 0x43, 0xc9, 0x55, 0x17, 0xdd, 0xc5, 0x1b, 0xe8, 0x7b, 0x5c, 0x85, 0x3f, 0x10,
0x5f, 0x23, 0xa9, 0x87, 0x23, 0x79, 0xb0, 0x4f, 0xd5, 0x5d, 0x87, 0x1e, 0xc7, 0xdf, 0xab, 0xd0,
0x35, 0x21, 0x58, 0x85, 0x73, 0x7e, 0x6e, 0xbf, 0xff, 0xe8, 0x0b, 0xf4, 0x29, 0x6c, 0x2b, 0x44,
0x0b, 0x28, 0x96, 0x1c, 0x17, 0x66, 0xdf, 0xfe, 0xfa, 0x1f, 0x51, 0x52, 0x0b, 0xcb, 0x3a, 0x2a,
0x69, 0x77, 0x60, 0x28, 0x84, 0x3b, 0x2f, 0xa4, 0xfb, 0xc8, 0x88, 0x0c, 0x19, 0x9a, 0x39, 0xc9,
0x15, 0xab, 0x0d, 0x8f, 0xe2, 0x20, 0x32, 0x38, 0xa4, 0x95, 0xa5, 0xd9, 0x2c, 0xae, 0x60, 0x09,
0xe3, 0x67, 0xc8, 0x54, 0x59, 0x37, 0x3d, 0xa8, 0x1a, 0x02, 0xd2, 0x06, 0xaa, 0x46, 0x80, 0xb4,
0x81, 0xaa, 0x11, 0x20, 0x6d, 0xa0, 0x6a, 0x04, 0x48, 0x1b, 0xa8, 0x1a, 0x01, 0xd2, 0x06, 0xaa,
0x46, 0x80, 0xb4, 0x81, 0xaa, 0x11, 0x20, 0x6d, 0xa0, 0x6a, 0x04, 0x48, 0x1b, 0xa8, 0x1a, 0x01,
0xd2, 0x06, 0xaa, 0x46, 0x80, 0xfc, 0x77, 0xa8, 0x1a, 0x02, 0xf2, 0xbf, 0x86, 0xea, 0x2f, 0x73,
0x29, 0x07, 0xb2, 0xe7, 0xc3, 0x61, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE array_zone_xpm[1] = {{ png, sizeof( png ), "array_zone_xpm" }};
//EOF

Some files were not shown because too many files have changed in this diff Show More