From 8306f4c65c6314ec9f63acbcd751c9d8744d0ab3 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 8 Mar 2013 08:29:30 +0100 Subject: [PATCH] Pcbnew: fix bug in export vrml (bad Z position of 3D shapes). Very minor code cleaning. --- common/build_version.cpp | 4 ++-- include/wxPcbStruct.h | 9 ++++++++- packaging/windows/nsis/install.nsi | 4 ++-- pcbnew/clean.cpp | 4 ++-- pcbnew/edit.cpp | 2 +- pcbnew/export_vrml.cpp | 4 ++-- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/common/build_version.cpp b/common/build_version.cpp index 66a8062030..464e4f87d1 100644 --- a/common/build_version.cpp +++ b/common/build_version.cpp @@ -7,9 +7,9 @@ #ifndef KICAD_BUILD_VERSION #if defined KICAD_GOST -# define KICAD_BUILD_VERSION "(2013-mar-04 GOST)" +# define KICAD_BUILD_VERSION "(2013-mar-08 GOST)" #else -# define KICAD_BUILD_VERSION "(2013-mar-04)" +# define KICAD_BUILD_VERSION "(2013-mar-08)" #endif #endif diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 790ac18c99..7f465694d9 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -1544,7 +1544,14 @@ public: */ void Show_1_Ratsnest( EDA_ITEM* item, wxDC* DC ); - void Clean_Pcb( wxDC* DC ); + /** + * Function Clean_Pcb + * Clean up the board (remove redundant vias, not connected tracks + * and merges collinear track segments) + * Install the cleanup dialog frame to know what should be cleaned + * and run the cleanup function + */ + void Clean_Pcb(); void InstallFindFrame(); diff --git a/packaging/windows/nsis/install.nsi b/packaging/windows/nsis/install.nsi index 0e95f0bf7b..1bd81d14c6 100644 --- a/packaging/windows/nsis/install.nsi +++ b/packaging/windows/nsis/install.nsi @@ -17,7 +17,7 @@ ; General Product Description Definitions !define PRODUCT_NAME "KiCad" -!define PRODUCT_VERSION "2013.03.06" +!define PRODUCT_VERSION "2013.03.08" !define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/" !define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/" !define COMPANY_NAME "" @@ -36,7 +36,7 @@ SetCompressor /final /solid lzma CRCCheck force XPStyle on Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" -OutFile "${PRODUCT_NAME}_stable-${PRODUCT_VERSION}-BZR3986_Win_full_version.exe" +OutFile "${PRODUCT_NAME}_stable-${PRODUCT_VERSION}-BZR3989_Win_full_version.exe" InstallDir "$PROGRAMFILES\KiCad" ShowInstDetails hide ShowUnInstDetails hide diff --git a/pcbnew/clean.cpp b/pcbnew/clean.cpp index 8b2a120cc8..ec60732ccb 100644 --- a/pcbnew/clean.cpp +++ b/pcbnew/clean.cpp @@ -106,9 +106,9 @@ private: TRACK* aCandidate, int aEndType ); }; -/* Install the track operation dialog frame +/* Install the cleanup dialog frame to know what should be cleaned */ -void PCB_EDIT_FRAME::Clean_Pcb( wxDC* DC ) +void PCB_EDIT_FRAME::Clean_Pcb() { DIALOG_CLEANING_OPTIONS dlg( this ); diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index b6985d4b3b..77563ead58 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1120,7 +1120,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_MENU_PCB_CLEAN: - Clean_Pcb( &dc ); + Clean_Pcb(); break; case ID_MENU_PCB_SWAP_LAYERS: diff --git a/pcbnew/export_vrml.cpp b/pcbnew/export_vrml.cpp index 6b8954b77b..40e463d409 100644 --- a/pcbnew/export_vrml.cpp +++ b/pcbnew/export_vrml.cpp @@ -347,7 +347,7 @@ static void compute_layer_Zs( BOARD* pcb ) //{{{ /* To avoid rounding interference, we apply an epsilon to each * successive layer */ - const double epsilon_z = 1 * IU_PER_MILS; // That's 1 mils, about 1/50 mm + const double epsilon_z = 0.02 * IU_PER_MM; // That's 1/50 mm layer_z[SOLDERPASTE_N_BACK] = -half_thickness - epsilon_z * 4; layer_z[ADHESIVE_N_BACK] = -half_thickness - epsilon_z * 3; layer_z[SILKSCREEN_N_BACK] = -half_thickness - epsilon_z * 2; @@ -1127,7 +1127,7 @@ static void export_vrml_module( BOARD* aPcb, MODULE* aModule, fprintf( aOutputFile, " translation %g %g %g\n", (offsetx + aModule->m_Pos.x) * boardIU2WRML, - (offsety + aModule->m_Pos.y) * boardIU2WRML, // Y axis is reversed in Pcbnew - offsetz + layer_z[aModule->GetLayer()] * boardIU2WRML); + (offsetz + layer_z[aModule->GetLayer()]) * boardIU2WRML); fprintf( aOutputFile, " scale %g %g %g\n", vrmlm->m_MatScale.x * aVRMLModelsToBiu,