Commit f16e083e authored by jean-pierre charras's avatar jean-pierre charras

Fix minor bug #1429990 (3D viewer shows hidden footprint graphic texts ). Fix...

Fix minor bug #1429990 (3D viewer shows hidden footprint graphic texts ). Fix minor coverity warnings (not initialized members and dead code)
parent b6c5b291
...@@ -118,13 +118,14 @@ void S3D_MESH::openGL_Render() ...@@ -118,13 +118,14 @@ void S3D_MESH::openGL_Render()
} }
for( unsigned int idx = 0; idx < m_CoordIndex.size(); idx++ ) for( unsigned int idx = 0; idx < m_CoordIndex.size(); idx++ )
{
if( m_Materials )
{ {
if( m_MaterialIndex.size() == 0 ) if( m_MaterialIndex.size() == 0 )
m_Materials->SetOpenGLMaterial( 0, useMaterial ); m_Materials->SetOpenGLMaterial( 0, useMaterial );
else else
if( m_Materials )
m_Materials->SetOpenGLMaterial( m_MaterialIndex[idx], useMaterial ); m_Materials->SetOpenGLMaterial( m_MaterialIndex[idx], useMaterial );
}
switch( m_CoordIndex[idx].size() ) switch( m_CoordIndex[idx].size() )
{ {
......
...@@ -95,10 +95,7 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) ...@@ -95,10 +95,7 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName )
// it now has, so we decrement the count of components without // it now has, so we decrement the count of components without
// a footprint assigned. // a footprint assigned.
if( !hasFootprint ) if( !hasFootprint )
{
hasFootprint = true;
m_undefinedComponentCnt -= 1; m_undefinedComponentCnt -= 1;
}
// Set the new description and deselect the processed component // Set the new description and deselect the processed component
m_compListBox->SetString( componentIndex, description ); m_compListBox->SetString( componentIndex, description );
......
...@@ -305,9 +305,6 @@ void SCH_EDIT_FRAME::OnSelectUnit( wxCommandEvent& aEvent ) ...@@ -305,9 +305,6 @@ void SCH_EDIT_FRAME::OnSelectUnit( wxCommandEvent& aEvent )
if( unitCount <= 1 || component->GetUnit() == unit ) if( unitCount <= 1 || component->GetUnit() == unit )
return; return;
if( unit < 1 )
unit = 1;
if( unit > unitCount ) if( unit > unitCount )
unit = unitCount; unit = unitCount;
......
...@@ -33,48 +33,22 @@ ...@@ -33,48 +33,22 @@
#include <dialog_helpers.h> #include <dialog_helpers.h>
#include <class_DCodeSelectionbox.h> #include <class_DCodeSelectionbox.h>
/* Process the command triggered by the left button of the mouse when a tool /* Process the command triggered by the left button of the mouse
* is already selected. * currently: just display info in the message panel.
*/ */
void GERBVIEW_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition ) void GERBVIEW_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
{ {
GERBER_DRAW_ITEM* DrawStruct = (GERBER_DRAW_ITEM*) GetScreen()->GetCurItem(); GERBER_DRAW_ITEM* DrawStruct = Locate( aPosition, CURSEUR_OFF_GRILLE );
wxString msg;
if( GetToolId() == ID_NO_TOOL_SELECTED )
{
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 ); GetScreen()->SetCurItem( DrawStruct );
if( DrawStruct == NULL ) if( DrawStruct == NULL )
{ {
GERBER_IMAGE* gerber = g_GERBER_List.GetGbrImage( getActiveLayer() ); GERBER_IMAGE* gerber = g_GERBER_List.GetGbrImage( getActiveLayer() );
if( gerber ) if( gerber )
gerber->DisplayImageInfo( ); gerber->DisplayImageInfo( );
} }
}
}
switch( GetToolId() )
{
case ID_NO_TOOL_SELECTED:
break;
if( DrawStruct == NULL )
break;
default:
wxFAIL_MSG( wxT( "GERBVIEW_FRAME::ProcessCommand error" ) );
break;
}
} }
......
...@@ -42,6 +42,27 @@ C_MICROSTRIP::C_MICROSTRIP() : TRANSLINE() ...@@ -42,6 +42,27 @@ C_MICROSTRIP::C_MICROSTRIP() : TRANSLINE()
aux_ms = NULL; aux_ms = NULL;
// Initialize these variables mainly to avoid warnings from a static analyzer // 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 er_eff = 0.0; // dummy
w_eff = 0.0; // Effective width of line w_eff = 0.0; // Effective width of line
atten_dielectric_e = 0.0; // even-mode dielectric losses (dB) atten_dielectric_e = 0.0; // even-mode dielectric losses (dB)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (C) 2002 Claudio Girardi <in3otd@qsl.net> * Copyright (C) 2002 Claudio Girardi <in3otd@qsl.net>
* Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org> * Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
* Modifications for Kicad: Jean-Pierre Charras * Modifications for Kicad: 2015 Jean-Pierre Charras
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
* along with this package; see the file COPYING. If not, write to * along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*
*/ */
#ifndef _C_MICROSTRIP_H_ #ifndef _C_MICROSTRIP_H_
#define _C_MICROSTRIP_H_ #define _C_MICROSTRIP_H_
...@@ -31,33 +31,33 @@ public: C_MICROSTRIP(); ...@@ -31,33 +31,33 @@ public: C_MICROSTRIP();
~C_MICROSTRIP(); ~C_MICROSTRIP();
private: private:
double h; /* height of substrate */ double h; // height of substrate
double ht; /* height to the top of box */ double ht; // height to the top of box
double t; /* thickness of top metal */ double t; // thickness of top metal
double rough; /* Roughness of top metal */ double rough; // Roughness of top metal
double w; /* width of lines */ double w; // width of lines
double w_t_e; /* even-mode thickness-corrected line width */ double w_t_e; // even-mode thickness-corrected line width
double w_t_o; /* odd-mode thickness-corrected line width */ double w_t_o; // odd-mode thickness-corrected line width
double l; /* length of lines */ double l; // length of lines
double s; /* spacing of lines */ double s; // spacing of lines
double Z0_e_0; /* static even-mode impedance */ double Z0_e_0; // static even-mode impedance
double Z0_o_0; /* static odd-mode impedance */ double Z0_o_0; // static odd-mode impedance
double Z0e; /* even-mode impedance */ double Z0e; // even-mode impedance
double Z0o; /* odd-mode impedance */ double Z0o; // odd-mode impedance
double c_e; /* even-mode capacitance */ double c_e; // even-mode capacitance
double c_o; /* odd-mode capacitance */ double c_o; // odd-mode capacitance
double ang_l_e; /* even-mode electrical length in angle */ double ang_l_e; // even-mode electrical length in angle
double ang_l_o; /* odd-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_e; // even-mode effective dielectric constant
double er_eff_o; /* odd-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_e_0; // static even-mode effective dielectric constant
double er_eff_o_0; /* static odd-mode effective dielectric constant */ double er_eff_o_0; // static odd-mode effective dielectric constant
double er_eff; /* FIXME: dummy */ double er_eff; // FIXME: dummy
double w_eff; /* Effective width of line */ double w_eff; // Effective width of line
double atten_dielectric_e; /* even-mode dielectric losses (dB) */ double atten_dielectric_e; // even-mode dielectric losses (dB)
double atten_cond_e; /* even-mode conductors losses (dB) */ double atten_cond_e; // even-mode conductors losses (dB)
double atten_dielectric_o; /* odd-mode dielectric losses (dB) */ double atten_dielectric_o; // odd-mode dielectric losses (dB)
double atten_cond_o; /* odd-mode conductors losses (dB) */ double atten_cond_o; // odd-mode conductors losses (dB)
public: public:
void analyze(); void analyze();
...@@ -96,4 +96,4 @@ private: ...@@ -96,4 +96,4 @@ private:
MICROSTRIP* aux_ms; MICROSTRIP* aux_ms;
}; };
#endif /* _C_MICROSTRIP_H_ */ #endif // _C_MICROSTRIP_H_
...@@ -43,6 +43,10 @@ COAX::COAX() : TRANSLINE() ...@@ -43,6 +43,10 @@ COAX::COAX() : TRANSLINE()
m_name = "Coax"; m_name = "Coax";
// Initialize these variables mainly to avoid warnings from a static analyzer // 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 Z0 = 0.0; // characteristic impedance
ang_l = 0.0; // Electrical length in angle ang_l = 0.0; // Electrical length in angle
atten_dielectric = 0.0; // Loss in dielectric (dB) atten_dielectric = 0.0; // Loss in dielectric (dB)
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* *
* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> * Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu>
* Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org> * Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
* Modifications for Kicad: 2015 Jean-Pierre Charras
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -18,9 +19,9 @@ ...@@ -18,9 +19,9 @@
* along with this package; see the file COPYING. If not, write to * along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*
*/ */
#ifndef __COAX_H #ifndef __COAX_H
#define __COAX_H #define __COAX_H
...@@ -29,15 +30,15 @@ class COAX : public TRANSLINE ...@@ -29,15 +30,15 @@ class COAX : public TRANSLINE
public: COAX(); public: COAX();
private: private:
double mur; /* magnetic permeability of substrate */ double mur; // magnetic permeability of substrate
double din; /* Inner diameter of cable */ double din; // Inner diameter of cable
double dout; /* Outer diameter of cable */ double dout; // Outer diameter of cable
double l; /* Length of cable */ double l; // Length of cable
double Z0; /* characteristic impedance */ double Z0; // characteristic impedance
double ang_l; /* Electrical length in angle */ double ang_l; // Electrical length in angle
double atten_dielectric; /* Loss in dielectric (dB) */ double atten_dielectric; // Loss in dielectric (dB)
double atten_cond; /* Loss in conductors (dB) */ double atten_cond; // Loss in conductors (dB)
double fc; /* Cutoff frequency for higher order modes */ double fc; // Cutoff frequency for higher order modes
public: public:
void analyze(); void analyze();
...@@ -55,4 +56,4 @@ private: ...@@ -55,4 +56,4 @@ private:
void show_results(); void show_results();
}; };
#endif /* __COAX_H */ #endif // __COAX_H
...@@ -38,6 +38,11 @@ COPLANAR::COPLANAR() : TRANSLINE() ...@@ -38,6 +38,11 @@ COPLANAR::COPLANAR() : TRANSLINE()
backMetal = false; backMetal = false;
// Initialize these variables mainly to avoid warnings from a static analyzer // Initialize these variables mainly to avoid warnings from a static analyzer
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 Z0 = 0.0; // characteristic impedance
ang_l = 0.0; // Electrical length in angle ang_l = 0.0; // Electrical length in angle
atten_dielectric = 0.0; // Loss in dielectric (dB) atten_dielectric = 0.0; // Loss in dielectric (dB)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (C) 2008 Michael Margraf <michael.margraf@alumni.tu-berlin.de> * Copyright (C) 2008 Michael Margraf <michael.margraf@alumni.tu-berlin.de>
* Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org> * Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
* 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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
* along with this package; see the file COPYING. If not, write to * along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*
*/ */
#ifndef __COPLANAR_H #ifndef __COPLANAR_H
#define __COPLANAR_H #define __COPLANAR_H
...@@ -30,16 +30,16 @@ class COPLANAR : public TRANSLINE ...@@ -30,16 +30,16 @@ class COPLANAR : public TRANSLINE
public: COPLANAR(); public: COPLANAR();
private: private:
double h; /* height of substrate */ double h; // height of substrate
double t; /* thickness of top metal */ double t; // thickness of top metal
double w; /* width of line */ double w; // width of line
double s; /* width of gap between line and ground */ double s; // width of gap between line and ground
double len; /* length of line */ double len; // length of line
double Z0; /* characteristic impedance */ double Z0; // characteristic impedance
double er_eff; /* effective dielectric constant */ double er_eff; // effective dielectric constant
double ang_l; /* Electrical length in angle */ double ang_l; // Electrical length in angle
double atten_dielectric; /* Loss in dielectric (dB) */ double atten_dielectric; // Loss in dielectric (dB)
double atten_cond; /* Loss in conductors (dB) */ double atten_cond; // Loss in conductors (dB)
public: public:
void analyze(); void analyze();
...@@ -60,4 +60,4 @@ class GROUNDEDCOPLANAR : public COPLANAR ...@@ -60,4 +60,4 @@ class GROUNDEDCOPLANAR : public COPLANAR
public: GROUNDEDCOPLANAR(); public: GROUNDEDCOPLANAR();
}; };
#endif /* __COPLANAR_H */ #endif // __COPLANAR_H
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> * Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu>
* Copyright (C) 2002 Claudio Girardi <claudio.girardi@ieee.org> * Copyright (C) 2002 Claudio Girardi <claudio.girardi@ieee.org>
* Copyright (C) 2005, 2006 Stefan Jahn <stefan@lkcc.org> * Copyright (C) 2005, 2006 Stefan Jahn <stefan@lkcc.org>
* 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 * 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 * it under the terms of the GNU General Public License as published by
...@@ -43,6 +43,18 @@ MICROSTRIP::MICROSTRIP() : TRANSLINE() ...@@ -43,6 +43,18 @@ MICROSTRIP::MICROSTRIP() : TRANSLINE()
m_name = "MicroStrip"; m_name = "MicroStrip";
// Initialize these variables mainly to avoid warnings from a static analyzer // 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
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 mur_eff = 0.0; // Effective mag. permeability
w_eff = 0.0; // Effective width of line w_eff = 0.0; // Effective width of line
atten_dielectric = 0.0; // Loss in dielectric (dB) atten_dielectric = 0.0; // Loss in dielectric (dB)
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* *
* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> * Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu>
* Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org> * Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
* Modified for Kicad: 2015 jean-pierre.charras
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -18,9 +19,9 @@ ...@@ -18,9 +19,9 @@
* along with this package; see the file COPYING. If not, write to * along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*
*/ */
#ifndef __MICROSTRIP_H #ifndef __MICROSTRIP_H
#define __MICROSTRIP_H #define __MICROSTRIP_H
...@@ -31,25 +32,25 @@ public: MICROSTRIP(); ...@@ -31,25 +32,25 @@ public: MICROSTRIP();
friend class C_MICROSTRIP; friend class C_MICROSTRIP;
private: private:
double h; /* height of substrate */ double h; // height of substrate
double ht; /* height to the top of box */ double ht; // height to the top of box
double t; /* thickness of top metal */ double t; // thickness of top metal
double rough; /* Roughness of top metal */ double rough; // Roughness of top metal
double mur; /* magnetic permeability of substrate */ double mur; // magnetic permeability of substrate
double w; /* width of line */ double w; // width of line
double l; /* length of line */ double l; // length of line
double Z0_0; /* static characteristic impedance */ double Z0_0; // static characteristic impedance
double Z0; /* characteristic impedance */ double Z0; // characteristic impedance
double ang_l; /* Electrical length in angle */ double ang_l; // Electrical length in angle
double er_eff_0; /* Static effective dielectric constant */ double er_eff_0; // Static effective dielectric constant
double er_eff; /* Effective dielectric constant */ double er_eff; // Effective dielectric constant
double mur_eff; /* Effective mag. permeability */ double mur_eff; // Effective mag. permeability
double w_eff; /* Effective width of line */ double w_eff; // Effective width of line
double atten_dielectric; /* Loss in dielectric (dB) */ double atten_dielectric; // Loss in dielectric (dB)
double atten_cond; /* Loss in conductors (dB) */ double atten_cond; // Loss in conductors (dB)
/* private params */ // private params
double Z0_h_1; /* homogeneous stripline impedance */ double Z0_h_1; // homogeneous stripline impedance
public: public:
void analyze(); void analyze();
...@@ -88,4 +89,4 @@ private: ...@@ -88,4 +89,4 @@ private:
void show_results(); void show_results();
}; };
#endif /* __MICROSTRIP_H */ #endif // __MICROSTRIP_H
...@@ -34,6 +34,14 @@ RECTWAVEGUIDE::RECTWAVEGUIDE() : TRANSLINE() ...@@ -34,6 +34,14 @@ RECTWAVEGUIDE::RECTWAVEGUIDE() : TRANSLINE()
m_name = "RectWaveGuide"; m_name = "RectWaveGuide";
// Initialize these here variables mainly to avoid warnings from a static analyzer // 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 er_eff = 0.0; // Effective dielectric constant
mur_eff = 0.0; // Effective mag. permeability mur_eff = 0.0; // Effective mag. permeability
atten_dielectric = 0.0; // Loss in dielectric (dB) atten_dielectric = 0.0; // Loss in dielectric (dB)
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* *
* Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu> * Copyright (C) 2001 Gopal Narayanan <gopal@astro.umass.edu>
* Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org> * Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
* Modified for Kicad: 2015 jean-pierre.charras
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -18,9 +19,9 @@ ...@@ -18,9 +19,9 @@
* along with this package; see the file COPYING. If not, write to * along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*
*/ */
#ifndef __RECTWAVEGUIDE_H #ifndef __RECTWAVEGUIDE_H
#define __RECTWAVEGUIDE_H #define __RECTWAVEGUIDE_H
...@@ -29,19 +30,19 @@ class RECTWAVEGUIDE : public TRANSLINE ...@@ -29,19 +30,19 @@ class RECTWAVEGUIDE : public TRANSLINE
public: RECTWAVEGUIDE(); public: RECTWAVEGUIDE();
private: private:
double mur; /* magnetic permeability of substrate */ double mur; // magnetic permeability of substrate
double tanm; /* Magnetic Loss Tangent */ double tanm; // Magnetic Loss Tangent
double a; /* width of waveguide */ double a; // width of waveguide
double b; /* height of waveguide */ double b; // height of waveguide
double l; /* length of waveguide */ double l; // length of waveguide
double Z0; /* characteristic impedance */ double Z0; // characteristic impedance
double Z0EH; /* characteristic impedance of field quantities*/ double Z0EH; // characteristic impedance of field quantities*/
double ang_l; /* Electrical length in angle */ double ang_l; // Electrical length in angle
double er_eff; /* Effective dielectric constant */ double er_eff; // Effective dielectric constant
double mur_eff; /* Effective mag. permeability */ double mur_eff; // Effective mag. permeability
double atten_dielectric; /* Loss in dielectric (dB) */ double atten_dielectric; // Loss in dielectric (dB)
double atten_cond; /* Loss in conductors (dB) */ double atten_cond; // Loss in conductors (dB)
double fc10; /* Cutoff frequency for TE10 mode */ double fc10; // Cutoff frequency for TE10 mode
public: public:
void analyze(); void analyze();
...@@ -61,4 +62,4 @@ private: ...@@ -61,4 +62,4 @@ private:
void show_results(); void show_results();
}; };
#endif /* __RECTWAVEGUIDE_H */ #endif // __RECTWAVEGUIDE_H
...@@ -36,6 +36,11 @@ STRIPLINE::STRIPLINE() : TRANSLINE() ...@@ -36,6 +36,11 @@ STRIPLINE::STRIPLINE() : TRANSLINE()
m_name = "StripLine"; m_name = "StripLine";
// Initialize these variables mainly to avoid warnings from a static analyzer // Initialize these variables mainly to avoid warnings from a static analyzer
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 Z0 = 0.0; // characteristic impedance
ang_l = 0.0; // Electrical length in angle ang_l = 0.0; // Electrical length in angle
er_eff = 0.0; // effective dielectric constant er_eff = 0.0; // effective dielectric constant
......
...@@ -36,6 +36,11 @@ TWISTEDPAIR::TWISTEDPAIR() : TRANSLINE() ...@@ -36,6 +36,11 @@ TWISTEDPAIR::TWISTEDPAIR() : TRANSLINE()
m_name = "TwistedPair"; m_name = "TwistedPair";
// Initialize these variables mainly to avoid warnings from a static analyzer // Initialize these variables mainly to avoid warnings from a static analyzer
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 Z0 = 0.0; // characteristic impedance
ang_l = 0.0; // Electrical length in angle ang_l = 0.0; // Electrical length in angle
atten_dielectric = 0.0; // Loss in dielectric (dB) atten_dielectric = 0.0; // Loss in dielectric (dB)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* twistedpair.h - twisted pair class definition * twistedpair.h - twisted pair class definition
* *
* Copyright (C) 2011 Michael Margraf <michael.margraf@alumni.tu-berlin.de> * Copyright (C) 2011 Michael Margraf <michael.margraf@alumni.tu-berlin.de>
* 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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
* along with this package; see the file COPYING. If not, write to * along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*
*/ */
#ifndef __TWISTEDPAIR_H #ifndef __TWISTEDPAIR_H
#define __TWISTEDPAIR_H #define __TWISTEDPAIR_H
...@@ -29,16 +29,16 @@ class TWISTEDPAIR : public TRANSLINE ...@@ -29,16 +29,16 @@ class TWISTEDPAIR : public TRANSLINE
public: TWISTEDPAIR(); public: TWISTEDPAIR();
private: private:
double din; /* Inner diameter of conductor */ double din; // Inner diameter of conductor
double dout; /* Outer diameter of insulator */ double dout; // Outer diameter of insulator
double twists; /* Twists per length */ double twists; // Twists per length
double er_env; /* dielectric constant of environment*/ double er_env; // dielectric constant of environment*/
double len; /* Length of cable */ double len; // Length of cable
double Z0; /* characteristic impedance */ double Z0; // characteristic impedance
double ang_l; /* Electrical length in angle */ double ang_l; // Electrical length in angle
double er_eff; /* Effective dielectric constant */ double er_eff; // Effective dielectric constant
double atten_dielectric; /* Loss in dielectric (dB) */ double atten_dielectric; // Loss in dielectric (dB)
double atten_cond; /* Loss in conductors (dB) */ double atten_cond; // Loss in conductors (dB)
public: public:
void analyze(); void analyze();
......
...@@ -194,8 +194,10 @@ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet( ...@@ -194,8 +194,10 @@ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet(
case PCB_MODULE_TEXT_T: case PCB_MODULE_TEXT_T:
{ {
TEXTE_MODULE* text = static_cast<TEXTE_MODULE*>( item ); TEXTE_MODULE* text = static_cast<TEXTE_MODULE*>( item );
if( text->GetLayer() == aLayer )
if( text->GetLayer() == aLayer && text->IsVisible() )
texts.push_back( text ); texts.push_back( text );
break; break;
} }
......
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * 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 <dick@softplc.com> * Copyright (C) 2015 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2015 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
...@@ -545,20 +545,14 @@ const EDA_RECT MODULE::GetBoundingBox() const ...@@ -545,20 +545,14 @@ const EDA_RECT MODULE::GetBoundingBox() const
void MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) void MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
{ {
int nbpad; int nbpad;
char bufcar[512], Line[512];
wxString msg; wxString msg;
aList.push_back( MSG_PANEL_ITEM( m_Reference->GetShownText(), m_Value->GetShownText(), DARKCYAN ) ); aList.push_back( MSG_PANEL_ITEM( m_Reference->GetShownText(), m_Value->GetShownText(), DARKCYAN ) );
// Display last date the component was edited (useful in Module Editor). // Display last date the component was edited (useful in Module Editor).
time_t edit_time = m_LastEditTime; wxDateTime date( m_LastEditTime );
strcpy( Line, ctime( &edit_time ) ); // Date format: see http://www.cplusplus.com/reference/ctime/strftime
strtok( Line, " \n\r" ); msg = date.Format( wxT( "%b %d, %Y" ) ); // Abbreviated_month_name Day, Year
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 );
aList.push_back( MSG_PANEL_ITEM( _( "Last Change" ), msg, BROWN ) ); aList.push_back( MSG_PANEL_ITEM( _( "Last Change" ), msg, BROWN ) );
// display schematic path // display schematic path
......
...@@ -273,9 +273,7 @@ void DIALOG_PRINT_USING_PRINTER::initValues( ) ...@@ -273,9 +273,7 @@ void DIALOG_PRINT_USING_PRINTER::initValues( )
m_FineAdjustYscaleOpt->SetValue( msg ); m_FineAdjustYscaleOpt->SetValue( msg );
bool enable = (s_Parameters.m_PrintScale == 1.0); bool enable = (s_Parameters.m_PrintScale == 1.0);
if( m_FineAdjustXscaleOpt )
m_FineAdjustXscaleOpt->Enable(enable); m_FineAdjustXscaleOpt->Enable(enable);
if( m_FineAdjustYscaleOpt )
m_FineAdjustYscaleOpt->Enable(enable); m_FineAdjustYscaleOpt->Enable(enable);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment