diff --git a/3d-viewer/3d_mesh_model.cpp b/3d-viewer/3d_mesh_model.cpp index e5a28b0df9..ed49f742fa 100644 --- a/3d-viewer/3d_mesh_model.cpp +++ b/3d-viewer/3d_mesh_model.cpp @@ -114,17 +114,18 @@ void S3D_MESH::openGL_Render() perVertexNormalsVerify_and_Repair(); else calcPerPointNormals(); - + } for( unsigned int idx = 0; idx < m_CoordIndex.size(); idx++ ) { - if( m_MaterialIndex.size() == 0 ) - m_Materials->SetOpenGLMaterial( 0, useMaterial ); - else - if( m_Materials ) + if( m_Materials ) + { + if( m_MaterialIndex.size() == 0 ) + m_Materials->SetOpenGLMaterial( 0, useMaterial ); + else m_Materials->SetOpenGLMaterial( m_MaterialIndex[idx], useMaterial ); - + } switch( m_CoordIndex[idx].size() ) { @@ -465,7 +466,7 @@ void S3D_MESH::calcPerPointNormals() if( each_face_A_idx != each_face_B_idx ) { bool addThisVertex = false; - + for( unsigned int ii = 0; ii < m_CoordIndex[each_face_B_idx].size(); ii++ ) { if( m_CoordIndex[each_face_B_idx][ii] == vertexIndex ) @@ -474,7 +475,7 @@ void S3D_MESH::calcPerPointNormals() break; } } - + if( addThisVertex ) { glm::vec3 vector_face_B = m_PerFaceNormalsNormalized[each_face_B_idx]; diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 61c162b98e..1fc8133851 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -95,10 +95,7 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) // it now has, so we decrement the count of components without // a footprint assigned. if( !hasFootprint ) - { - hasFootprint = true; m_undefinedComponentCnt -= 1; - } // Set the new description and deselect the processed component m_compListBox->SetString( componentIndex, description ); diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index ca3f7b9294..5b7fb87d4e 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -305,9 +305,6 @@ void SCH_EDIT_FRAME::OnSelectUnit( wxCommandEvent& aEvent ) if( unitCount <= 1 || component->GetUnit() == unit ) return; - if( unit < 1 ) - unit = 1; - if( unit > unitCount ) unit = unitCount; diff --git a/gerbview/onleftclick.cpp b/gerbview/onleftclick.cpp index 5e857558e1..55b47df5da 100644 --- a/gerbview/onleftclick.cpp +++ b/gerbview/onleftclick.cpp @@ -33,47 +33,21 @@ #include #include -/* Process the command triggered by the left button of the mouse when a tool - * is already selected. +/* Process the command triggered by the left button of the mouse + * currently: just display info in the message panel. */ void GERBVIEW_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition ) { - GERBER_DRAW_ITEM* DrawStruct = (GERBER_DRAW_ITEM*) GetScreen()->GetCurItem(); - wxString msg; + GERBER_DRAW_ITEM* DrawStruct = Locate( aPosition, CURSEUR_OFF_GRILLE ); - if( GetToolId() == ID_NO_TOOL_SELECTED ) + GetScreen()->SetCurItem( DrawStruct ); + + if( DrawStruct == NULL ) { - if( DrawStruct && DrawStruct->GetFlags() ) - { - msg.Printf( wxT( "GERBVIEW_FRAME::OnLeftClick err: Struct %u, m_Flags = %X" ), - (unsigned) DrawStruct->Type(), - (unsigned) DrawStruct->GetFlags() ); - wxFAIL_MSG( msg ); - } - else - { - DrawStruct = Locate( aPosition, CURSEUR_OFF_GRILLE ); - GetScreen()->SetCurItem( DrawStruct ); - if( DrawStruct == NULL ) - { - GERBER_IMAGE* gerber = g_GERBER_List.GetGbrImage( getActiveLayer() ); - if( gerber ) - gerber->DisplayImageInfo( ); - } - } - } + GERBER_IMAGE* gerber = g_GERBER_List.GetGbrImage( getActiveLayer() ); - switch( GetToolId() ) - { - case ID_NO_TOOL_SELECTED: - break; - - if( DrawStruct == NULL ) - break; - - default: - wxFAIL_MSG( wxT( "GERBVIEW_FRAME::ProcessCommand error" ) ); - break; + if( gerber ) + gerber->DisplayImageInfo( ); } } diff --git a/pcb_calculator/transline/c_microstrip.cpp b/pcb_calculator/transline/c_microstrip.cpp index 624fe64e9f..184275a40c 100644 --- a/pcb_calculator/transline/c_microstrip.cpp +++ b/pcb_calculator/transline/c_microstrip.cpp @@ -42,6 +42,27 @@ C_MICROSTRIP::C_MICROSTRIP() : TRANSLINE() aux_ms = NULL; // Initialize these variables mainly to avoid warnings from a static analyzer + h = 0.0; // height of substrate + ht = 0.0; // height to the top of box + t = 0.0; // thickness of top metal + rough = 0.0; // Roughness of top metal + w = 0.0; // width of lines + w_t_e = 0.0; // even-mode thickness-corrected line width + w_t_o = 0.0; // odd-mode thickness-corrected line width + l = 0.0; // length of lines + s = 0.0; // spacing of lines + Z0_e_0 = 0.0; // static even-mode impedance + Z0_o_0 = 0.0; // static odd-mode impedance + Z0e = 0.0; // even-mode impedance + Z0o = 0.0; // odd-mode impedance + c_e = 0.0; // even-mode capacitance + c_o = 0.0; // odd-mode capacitance + ang_l_e = 0.0; // even-mode electrical length in angle + ang_l_o = 0.0; // odd-mode electrical length in angle + er_eff_e = 0.0; // even-mode effective dielectric constant + er_eff_o = 0.0; // odd-mode effective dielectric constant + er_eff_e_0 = 0.0; // static even-mode effective dielectric constant + er_eff_o_0 = 0.0; // static odd-mode effective dielectric constant er_eff = 0.0; // dummy w_eff = 0.0; // Effective width of line atten_dielectric_e = 0.0; // even-mode dielectric losses (dB) diff --git a/pcb_calculator/transline/c_microstrip.h b/pcb_calculator/transline/c_microstrip.h index 3843b1873a..4a49434ca1 100644 --- a/pcb_calculator/transline/c_microstrip.h +++ b/pcb_calculator/transline/c_microstrip.h @@ -3,7 +3,7 @@ * * Copyright (C) 2002 Claudio Girardi * Copyright (C) 2005 Stefan Jahn - * Modifications for Kicad: Jean-Pierre Charras + * Modifications for Kicad: 2015 Jean-Pierre Charras * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -19,9 +19,9 @@ * along with this package; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * Boston, MA 02110-1301, USA. - * */ + #ifndef _C_MICROSTRIP_H_ #define _C_MICROSTRIP_H_ @@ -31,33 +31,33 @@ public: C_MICROSTRIP(); ~C_MICROSTRIP(); private: - double h; /* height of substrate */ - double ht; /* height to the top of box */ - double t; /* thickness of top metal */ - double rough; /* Roughness of top metal */ - double w; /* width of lines */ - double w_t_e; /* even-mode thickness-corrected line width */ - double w_t_o; /* odd-mode thickness-corrected line width */ - double l; /* length of lines */ - double s; /* spacing of lines */ - double Z0_e_0; /* static even-mode impedance */ - double Z0_o_0; /* static odd-mode impedance */ - double Z0e; /* even-mode impedance */ - double Z0o; /* odd-mode impedance */ - double c_e; /* even-mode capacitance */ - double c_o; /* odd-mode capacitance */ - double ang_l_e; /* even-mode electrical length in angle */ - double ang_l_o; /* odd-mode electrical length in angle */ - double er_eff_e; /* even-mode effective dielectric constant */ - double er_eff_o; /* odd-mode effective dielectric constant */ - double er_eff_e_0; /* static even-mode effective dielectric constant */ - double er_eff_o_0; /* static odd-mode effective dielectric constant */ - double er_eff; /* FIXME: dummy */ - double w_eff; /* Effective width of line */ - double atten_dielectric_e; /* even-mode dielectric losses (dB) */ - double atten_cond_e; /* even-mode conductors losses (dB) */ - double atten_dielectric_o; /* odd-mode dielectric losses (dB) */ - double atten_cond_o; /* odd-mode conductors losses (dB) */ + double h; // height of substrate + double ht; // height to the top of box + double t; // thickness of top metal + double rough; // Roughness of top metal + double w; // width of lines + double w_t_e; // even-mode thickness-corrected line width + double w_t_o; // odd-mode thickness-corrected line width + double l; // length of lines + double s; // spacing of lines + double Z0_e_0; // static even-mode impedance + double Z0_o_0; // static odd-mode impedance + double Z0e; // even-mode impedance + double Z0o; // odd-mode impedance + double c_e; // even-mode capacitance + double c_o; // odd-mode capacitance + double ang_l_e; // even-mode electrical length in angle + double ang_l_o; // odd-mode electrical length in angle + double er_eff_e; // even-mode effective dielectric constant + double er_eff_o; // odd-mode effective dielectric constant + double er_eff_e_0; // static even-mode effective dielectric constant + double er_eff_o_0; // static odd-mode effective dielectric constant + double er_eff; // FIXME: dummy + double w_eff; // Effective width of line + double atten_dielectric_e; // even-mode dielectric losses (dB) + double atten_cond_e; // even-mode conductors losses (dB) + double atten_dielectric_o; // odd-mode dielectric losses (dB) + double atten_cond_o; // odd-mode conductors losses (dB) public: void analyze(); @@ -96,4 +96,4 @@ private: MICROSTRIP* aux_ms; }; -#endif /* _C_MICROSTRIP_H_ */ +#endif // _C_MICROSTRIP_H_ diff --git a/pcb_calculator/transline/coax.cpp b/pcb_calculator/transline/coax.cpp index d325dd0982..fc96ec9562 100644 --- a/pcb_calculator/transline/coax.cpp +++ b/pcb_calculator/transline/coax.cpp @@ -43,6 +43,10 @@ COAX::COAX() : TRANSLINE() m_name = "Coax"; // Initialize these variables mainly to avoid warnings from a static analyzer + mur = 0.0; // magnetic permeability of substrate + din = 0.0; // Inner diameter of cable + dout = 0.0; // Outer diameter of cable + l = 0.0; // Length of cable Z0 = 0.0; // characteristic impedance ang_l = 0.0; // Electrical length in angle atten_dielectric = 0.0; // Loss in dielectric (dB) diff --git a/pcb_calculator/transline/coax.h b/pcb_calculator/transline/coax.h index e59e39d89a..b4c301f74d 100644 --- a/pcb_calculator/transline/coax.h +++ b/pcb_calculator/transline/coax.h @@ -3,6 +3,7 @@ * * Copyright (C) 2001 Gopal Narayanan * Copyright (C) 2005 Stefan Jahn + * Modifications for Kicad: 2015 Jean-Pierre Charras * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -18,9 +19,9 @@ * along with this package; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * Boston, MA 02110-1301, USA. - * */ + #ifndef __COAX_H #define __COAX_H @@ -29,15 +30,15 @@ class COAX : public TRANSLINE public: COAX(); private: - double mur; /* magnetic permeability of substrate */ - double din; /* Inner diameter of cable */ - double dout; /* Outer diameter of cable */ - double l; /* Length of cable */ - double Z0; /* characteristic impedance */ - double ang_l; /* Electrical length in angle */ - double atten_dielectric; /* Loss in dielectric (dB) */ - double atten_cond; /* Loss in conductors (dB) */ - double fc; /* Cutoff frequency for higher order modes */ + double mur; // magnetic permeability of substrate + double din; // Inner diameter of cable + double dout; // Outer diameter of cable + double l; // Length of cable + double Z0; // characteristic impedance + double ang_l; // Electrical length in angle + double atten_dielectric; // Loss in dielectric (dB) + double atten_cond; // Loss in conductors (dB) + double fc; // Cutoff frequency for higher order modes public: void analyze(); @@ -55,4 +56,4 @@ private: void show_results(); }; -#endif /* __COAX_H */ +#endif // __COAX_H diff --git a/pcb_calculator/transline/coplanar.cpp b/pcb_calculator/transline/coplanar.cpp index dbca49e08c..cf5ddb7db1 100644 --- a/pcb_calculator/transline/coplanar.cpp +++ b/pcb_calculator/transline/coplanar.cpp @@ -38,11 +38,16 @@ COPLANAR::COPLANAR() : TRANSLINE() backMetal = false; // Initialize these variables mainly to avoid warnings from a static analyzer - Z0 = 0.0; // characteristic impedance - ang_l = 0.0; // Electrical length in angle - atten_dielectric = 0.0; // Loss in dielectric (dB) - atten_cond = 0.0; // Loss in conductors (dB) - er_eff = 1.0; // Effective dielectric constant + h = 0.0; // height of substrate + t = 0.0; // thickness of top metal + w = 0.0; // width of line + s = 0.0; // width of gap between line and ground + len = 0.0; // length of line + Z0 = 0.0; // characteristic impedance + ang_l = 0.0; // Electrical length in angle + atten_dielectric = 0.0; // Loss in dielectric (dB) + atten_cond = 0.0; // Loss in conductors (dB) + er_eff = 1.0; // Effective dielectric constant } diff --git a/pcb_calculator/transline/coplanar.h b/pcb_calculator/transline/coplanar.h index b3d6a70ee1..0d96f45c5d 100644 --- a/pcb_calculator/transline/coplanar.h +++ b/pcb_calculator/transline/coplanar.h @@ -3,7 +3,7 @@ * * Copyright (C) 2008 Michael Margraf * Copyright (C) 2005 Stefan Jahn - * Modified for Kicad: 2011 jean-pierre.charras + * Modified for Kicad: 2015 jean-pierre.charras * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -19,9 +19,9 @@ * along with this package; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * Boston, MA 02110-1301, USA. - * */ + #ifndef __COPLANAR_H #define __COPLANAR_H @@ -30,16 +30,16 @@ class COPLANAR : public TRANSLINE public: COPLANAR(); private: - double h; /* height of substrate */ - double t; /* thickness of top metal */ - double w; /* width of line */ - double s; /* width of gap between line and ground */ - double len; /* length of line */ - double Z0; /* characteristic impedance */ - double er_eff; /* effective dielectric constant */ - double ang_l; /* Electrical length in angle */ - double atten_dielectric; /* Loss in dielectric (dB) */ - double atten_cond; /* Loss in conductors (dB) */ + double h; // height of substrate + double t; // thickness of top metal + double w; // width of line + double s; // width of gap between line and ground + double len; // length of line + double Z0; // characteristic impedance + double er_eff; // effective dielectric constant + double ang_l; // Electrical length in angle + double atten_dielectric; // Loss in dielectric (dB) + double atten_cond; // Loss in conductors (dB) public: void analyze(); @@ -60,4 +60,4 @@ class GROUNDEDCOPLANAR : public COPLANAR public: GROUNDEDCOPLANAR(); }; -#endif /* __COPLANAR_H */ +#endif // __COPLANAR_H diff --git a/pcb_calculator/transline/microstrip.cpp b/pcb_calculator/transline/microstrip.cpp index a7800f9bb1..7cf0eab811 100644 --- a/pcb_calculator/transline/microstrip.cpp +++ b/pcb_calculator/transline/microstrip.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2001 Gopal Narayanan * Copyright (C) 2002 Claudio Girardi * Copyright (C) 2005, 2006 Stefan Jahn - * Modified for Kicad: 2011 jean-pierre.charras + * Modified for Kicad: 2015 jean-pierre.charras * * 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 @@ -43,11 +43,23 @@ MICROSTRIP::MICROSTRIP() : TRANSLINE() m_name = "MicroStrip"; // Initialize these variables mainly to avoid warnings from a static analyzer - mur_eff = 0.0; // Effective mag. permeability - w_eff = 0.0; // Effective width of line - atten_dielectric = 0.0; // Loss in dielectric (dB) - atten_cond = 0.0; // Loss in conductors (dB) - Z0_h_1 = 0.0; // homogeneous stripline impedance + h = 0.0; // height of substrate + ht = 0.0; // height to the top of box + t = 0.0; // thickness of top metal + rough = 0.0; // Roughness of top metal + mur = 0.0; // magnetic permeability of substrate + w = 0.0; // width of line + l = 0.0; // length of line + Z0_0 = 0.0; // static characteristic impedance + Z0 = 0.0; // characteristic impedance + ang_l = 0.0; // Electrical length in angle + er_eff_0 = 0.0; // Static effective dielectric constant + er_eff = 0.0; // Effective dielectric constant + mur_eff = 0.0; // Effective mag. permeability + w_eff = 0.0; // Effective width of line + atten_dielectric = 0.0; // Loss in dielectric (dB) + atten_cond = 0.0; // Loss in conductors (dB) + Z0_h_1 = 0.0; // homogeneous stripline impedance } diff --git a/pcb_calculator/transline/microstrip.h b/pcb_calculator/transline/microstrip.h index 0438811e2c..8f2737b3c1 100644 --- a/pcb_calculator/transline/microstrip.h +++ b/pcb_calculator/transline/microstrip.h @@ -3,6 +3,7 @@ * * Copyright (C) 2001 Gopal Narayanan * Copyright (C) 2005 Stefan Jahn + * Modified for Kicad: 2015 jean-pierre.charras * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -18,9 +19,9 @@ * along with this package; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * Boston, MA 02110-1301, USA. - * */ + #ifndef __MICROSTRIP_H #define __MICROSTRIP_H @@ -31,25 +32,25 @@ public: MICROSTRIP(); friend class C_MICROSTRIP; private: - double h; /* height of substrate */ - double ht; /* height to the top of box */ - double t; /* thickness of top metal */ - double rough; /* Roughness of top metal */ - double mur; /* magnetic permeability of substrate */ - double w; /* width of line */ - double l; /* length of line */ - double Z0_0; /* static characteristic impedance */ - double Z0; /* characteristic impedance */ - double ang_l; /* Electrical length in angle */ - double er_eff_0; /* Static effective dielectric constant */ - double er_eff; /* Effective dielectric constant */ - double mur_eff; /* Effective mag. permeability */ - double w_eff; /* Effective width of line */ - double atten_dielectric; /* Loss in dielectric (dB) */ - double atten_cond; /* Loss in conductors (dB) */ + double h; // height of substrate + double ht; // height to the top of box + double t; // thickness of top metal + double rough; // Roughness of top metal + double mur; // magnetic permeability of substrate + double w; // width of line + double l; // length of line + double Z0_0; // static characteristic impedance + double Z0; // characteristic impedance + double ang_l; // Electrical length in angle + double er_eff_0; // Static effective dielectric constant + double er_eff; // Effective dielectric constant + double mur_eff; // Effective mag. permeability + double w_eff; // Effective width of line + double atten_dielectric; // Loss in dielectric (dB) + double atten_cond; // Loss in conductors (dB) - /* private params */ - double Z0_h_1; /* homogeneous stripline impedance */ + // private params + double Z0_h_1; // homogeneous stripline impedance public: void analyze(); @@ -88,4 +89,4 @@ private: void show_results(); }; -#endif /* __MICROSTRIP_H */ +#endif // __MICROSTRIP_H diff --git a/pcb_calculator/transline/rectwaveguide.cpp b/pcb_calculator/transline/rectwaveguide.cpp index 1e7f5a9834..f73fcae225 100644 --- a/pcb_calculator/transline/rectwaveguide.cpp +++ b/pcb_calculator/transline/rectwaveguide.cpp @@ -34,6 +34,14 @@ RECTWAVEGUIDE::RECTWAVEGUIDE() : TRANSLINE() m_name = "RectWaveGuide"; // Initialize these here variables mainly to avoid warnings from a static analyzer + mur = 0.0; // magnetic permeability of substrate + tanm = 0.0; // Magnetic Loss Tangent + a = 0.0; // width of waveguide + b = 0.0; // height of waveguide + l = 0.0; // length of waveguide + Z0 = 0.0; // characteristic impedance + Z0EH = 0.0; // characteristic impedance of field quantities*/ + ang_l = 0.0; // Electrical length in angle er_eff = 0.0; // Effective dielectric constant mur_eff = 0.0; // Effective mag. permeability atten_dielectric = 0.0; // Loss in dielectric (dB) diff --git a/pcb_calculator/transline/rectwaveguide.h b/pcb_calculator/transline/rectwaveguide.h index 66900141c6..58d5ce450e 100644 --- a/pcb_calculator/transline/rectwaveguide.h +++ b/pcb_calculator/transline/rectwaveguide.h @@ -3,6 +3,7 @@ * * Copyright (C) 2001 Gopal Narayanan * Copyright (C) 2005 Stefan Jahn + * Modified for Kicad: 2015 jean-pierre.charras * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -18,9 +19,9 @@ * along with this package; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * Boston, MA 02110-1301, USA. - * */ + #ifndef __RECTWAVEGUIDE_H #define __RECTWAVEGUIDE_H @@ -29,19 +30,19 @@ class RECTWAVEGUIDE : public TRANSLINE public: RECTWAVEGUIDE(); private: - double mur; /* magnetic permeability of substrate */ - double tanm; /* Magnetic Loss Tangent */ - double a; /* width of waveguide */ - double b; /* height of waveguide */ - double l; /* length of waveguide */ - double Z0; /* characteristic impedance */ - double Z0EH; /* characteristic impedance of field quantities*/ - double ang_l; /* Electrical length in angle */ - double er_eff; /* Effective dielectric constant */ - double mur_eff; /* Effective mag. permeability */ - double atten_dielectric; /* Loss in dielectric (dB) */ - double atten_cond; /* Loss in conductors (dB) */ - double fc10; /* Cutoff frequency for TE10 mode */ + double mur; // magnetic permeability of substrate + double tanm; // Magnetic Loss Tangent + double a; // width of waveguide + double b; // height of waveguide + double l; // length of waveguide + double Z0; // characteristic impedance + double Z0EH; // characteristic impedance of field quantities*/ + double ang_l; // Electrical length in angle + double er_eff; // Effective dielectric constant + double mur_eff; // Effective mag. permeability + double atten_dielectric; // Loss in dielectric (dB) + double atten_cond; // Loss in conductors (dB) + double fc10; // Cutoff frequency for TE10 mode public: void analyze(); @@ -61,4 +62,4 @@ private: void show_results(); }; -#endif /* __RECTWAVEGUIDE_H */ +#endif // __RECTWAVEGUIDE_H diff --git a/pcb_calculator/transline/stripline.cpp b/pcb_calculator/transline/stripline.cpp index bc6f59b541..bb15d29727 100644 --- a/pcb_calculator/transline/stripline.cpp +++ b/pcb_calculator/transline/stripline.cpp @@ -36,11 +36,16 @@ STRIPLINE::STRIPLINE() : TRANSLINE() m_name = "StripLine"; // Initialize these variables mainly to avoid warnings from a static analyzer - Z0 = 0.0; // characteristic impedance - ang_l = 0.0; // Electrical length in angle - er_eff = 0.0; // effective dielectric constant - atten_dielectric = 0.0; // Loss in dielectric (dB) - atten_cond = 0.0; // Loss in conductors (dB) + h = 0.0; // height of substrate + a = 0.0; // distance of strip to top metal + t = 0.0; // thickness of top metal + w = 0.0; // width of line + len = 0.0; // length of line + Z0 = 0.0; // characteristic impedance + ang_l = 0.0; // Electrical length in angle + er_eff = 0.0; // effective dielectric constant + atten_dielectric = 0.0; // Loss in dielectric (dB) + atten_cond = 0.0; // Loss in conductors (dB) } diff --git a/pcb_calculator/transline/twistedpair.cpp b/pcb_calculator/transline/twistedpair.cpp index 0a7c5408ea..81d7c7ab97 100644 --- a/pcb_calculator/transline/twistedpair.cpp +++ b/pcb_calculator/transline/twistedpair.cpp @@ -36,11 +36,16 @@ TWISTEDPAIR::TWISTEDPAIR() : TRANSLINE() m_name = "TwistedPair"; // Initialize these variables mainly to avoid warnings from a static analyzer - Z0 = 0.0; // characteristic impedance - ang_l = 0.0; // Electrical length in angle - atten_dielectric = 0.0; // Loss in dielectric (dB) - atten_cond = 0.0; // Loss in conductors (dB) - er_eff = 1.0; // Effective dielectric constant + din = 0.0; // Inner diameter of conductor + dout = 0.0; // Outer diameter of insulator + twists = 0.0; // Twists per length + er_env = 0.0; // dielectric constant of environment*/ + len = 0.0; // Length of cable + Z0 = 0.0; // characteristic impedance + ang_l = 0.0; // Electrical length in angle + atten_dielectric = 0.0; // Loss in dielectric (dB) + atten_cond = 0.0; // Loss in conductors (dB) + er_eff = 1.0; // Effective dielectric constant } diff --git a/pcb_calculator/transline/twistedpair.h b/pcb_calculator/transline/twistedpair.h index d0e71b3362..b38b88fcba 100644 --- a/pcb_calculator/transline/twistedpair.h +++ b/pcb_calculator/transline/twistedpair.h @@ -2,7 +2,7 @@ * twistedpair.h - twisted pair class definition * * Copyright (C) 2011 Michael Margraf - * Modifications 2011 for Kicad: Jean-Pierre Charras + * Modified for Kicad: 2015 jean-pierre.charras * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -18,9 +18,9 @@ * along with this package; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * Boston, MA 02110-1301, USA. - * */ + #ifndef __TWISTEDPAIR_H #define __TWISTEDPAIR_H @@ -29,16 +29,16 @@ class TWISTEDPAIR : public TRANSLINE public: TWISTEDPAIR(); private: - double din; /* Inner diameter of conductor */ - double dout; /* Outer diameter of insulator */ - double twists; /* Twists per length */ - double er_env; /* dielectric constant of environment*/ - double len; /* Length of cable */ - double Z0; /* characteristic impedance */ - double ang_l; /* Electrical length in angle */ - double er_eff; /* Effective dielectric constant */ - double atten_dielectric; /* Loss in dielectric (dB) */ - double atten_cond; /* Loss in conductors (dB) */ + double din; // Inner diameter of conductor + double dout; // Outer diameter of insulator + double twists; // Twists per length + double er_env; // dielectric constant of environment*/ + double len; // Length of cable + double Z0; // characteristic impedance + double ang_l; // Electrical length in angle + double er_eff; // Effective dielectric constant + double atten_dielectric; // Loss in dielectric (dB) + double atten_cond; // Loss in conductors (dB) public: void analyze(); diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index 74e290a505..1a6e55cc00 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -194,8 +194,10 @@ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet( case PCB_MODULE_TEXT_T: { TEXTE_MODULE* text = static_cast( item ); - if( text->GetLayer() == aLayer ) + + if( text->GetLayer() == aLayer && text->IsVisible() ) texts.push_back( text ); + break; } diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 58a1d5dddd..41441e5c19 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2015 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2015 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2015 Wayne Stambaugh * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. @@ -545,20 +545,14 @@ const EDA_RECT MODULE::GetBoundingBox() const void MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { int nbpad; - char bufcar[512], Line[512]; wxString msg; aList.push_back( MSG_PANEL_ITEM( m_Reference->GetShownText(), m_Value->GetShownText(), DARKCYAN ) ); // Display last date the component was edited (useful in Module Editor). - time_t edit_time = m_LastEditTime; - strcpy( Line, ctime( &edit_time ) ); - strtok( Line, " \n\r" ); - strcpy( bufcar, strtok( NULL, " \n\r" ) ); strcat( bufcar, " " ); - strcat( bufcar, strtok( NULL, " \n\r" ) ); strcat( bufcar, ", " ); - strtok( NULL, " \n\r" ); - strcat( bufcar, strtok( NULL, " \n\r" ) ); - msg = FROM_UTF8( bufcar ); + wxDateTime date( m_LastEditTime ); + // Date format: see http://www.cplusplus.com/reference/ctime/strftime + msg = date.Format( wxT( "%b %d, %Y" ) ); // Abbreviated_month_name Day, Year aList.push_back( MSG_PANEL_ITEM( _( "Last Change" ), msg, BROWN ) ); // display schematic path diff --git a/pcbnew/dialogs/dialog_print_using_printer.cpp b/pcbnew/dialogs/dialog_print_using_printer.cpp index 222c98ecfa..5ca9022148 100644 --- a/pcbnew/dialogs/dialog_print_using_printer.cpp +++ b/pcbnew/dialogs/dialog_print_using_printer.cpp @@ -273,10 +273,8 @@ void DIALOG_PRINT_USING_PRINTER::initValues( ) m_FineAdjustYscaleOpt->SetValue( msg ); bool enable = (s_Parameters.m_PrintScale == 1.0); - if( m_FineAdjustXscaleOpt ) - m_FineAdjustXscaleOpt->Enable(enable); - if( m_FineAdjustYscaleOpt ) - m_FineAdjustYscaleOpt->Enable(enable); + m_FineAdjustXscaleOpt->Enable(enable); + m_FineAdjustYscaleOpt->Enable(enable); }