25 #include <wx/arrstr.h> 30 #include "bitmaps/c_microstrip.xpm" 31 #include "bitmaps/microstrip.xpm" 32 #include "bitmaps/twistedpair.xpm" 33 #include "bitmaps/coax.xpm" 34 #include "bitmaps/cpw.xpm" 35 #include "bitmaps/cpw_back.xpm" 36 #include "bitmaps/stripline.xpm" 37 #include "bitmaps/rectwaveguide.xpm" 59 const char* aKeywordCfg,
60 const wxString& aDlgLabel,
61 const wxString& aToolTip,
120 _(
"Epsilon R: substrate relative dielectric constant" ),
124 _(
"Tangent delta: dielectric loss factor." ), 2e-2,
130 _(
"Electrical resistivity or specific electrical resistance of conductor (Ohm*meter)" ),
135 "Frequency",
_(
"Frequency" ),
136 _(
"Frequency of the input signal" ), 1.0,
true ) );
143 m_Icon =
new wxBitmap( microstrip_xpm );
151 "H",
"H",
_(
"Height of Substrate" ), 0.2,
true ) );
153 "H_t",
"H_t",
_(
"Height of Box Top" ), 1e20,
true ) );
156 _(
"Strip Thickness" ), 0.035,
true ) );
158 "Rough",
_(
"Rough" ),
159 _(
"Conductor Roughness" ), 0.0,
true ) );
161 "mu Rel S",
_(
"mu Rel S" ),
162 _(
"Relative Permeability (mu) of Substrate" ), 1,
false ) );
164 "mu Rel C",
_(
"mu Rel C" ),
165 _(
"Relative Permeability (mu) of Conductor" ), 1,
169 "W",
"W",
_(
"Line Width" ), 0.2,
true ) );
171 "L",
"L",
_(
"Line Length" ), 50.0,
true ) );
174 "Z0",
"Z0",
_(
"Characteristic Impedance" ), 50.0,
true ) );
177 "Ang_l",
"Ang_l",
_(
"Electrical Length" ), 0.0,
true ) );
182 m_Icon =
new wxBitmap( cpw_xpm );
191 "H",
"H",
_(
"Height of Substrate" ), 0.2,
true ) );
193 "T",
"T",
_(
"Strip Thickness" ), 0.035,
true ) );
195 "mu Rel C",
_(
"mu Rel C" ),
196 _(
"Relative Permeability (mu) of Conductor" ), 1,
200 "W",
"W",
_(
"Line Width" ), 0.2,
true ) );
202 "S",
"S",
_(
"Gap Width" ), 0.2,
true ) );
204 "L",
"L",
_(
"Line Length" ), 50.0,
true ) );
207 "Z0",
"Z0",
_(
"Characteristic Impedance" ), 50.0,
true ) );
210 "Ang_l",
"Ang_l",
_(
"Electrical Length" ), 0.0,
true ) );
215 m_Icon =
new wxBitmap( cpw_back_xpm );
224 "H",
"H",
_(
"Height of Substrate" ), 0.2,
true ) );
226 "T",
"T",
_(
"Strip Thickness" ), 0.035,
true ) );
228 "mu Rel C",
"mu Rel C",
229 _(
"Relative Permeability (mu) of Conductor" ), 1,
233 "W",
"W",
_(
"Line Width" ), 0.2,
true ) );
235 "S",
"S",
_(
"Gap Width" ), 0.2,
true ) );
237 "L",
"L",
_(
"Line Length" ), 50.0,
true ) );
240 "Z0",
"Z0",
_(
"Characteristic Impedance" ), 50.0,
true ) );
243 "Ang_l",
"Ang_l",
_(
"Electrical Length" ), 0,
true ) );
249 m_Icon =
new wxBitmap( rectwaveguide_xpm );
260 "mu Rel I",
_(
"mu Rel I" ),
261 _(
"Relative Permeability (mu) of Insulator" ), 1,
false ) );
263 "mu Rel C",
_(
"mu Rel C" ),
264 _(
"Relative Permeability (mu) of Conductor" ), 1,
268 "a",
"a",
_(
"Width of Waveguide" ), 10.0,
true ) );
270 "b",
"b",
_(
"Height of Waveguide" ), 5.0,
true ) );
272 "L",
"L",
_(
"Waveguide Length" ), 50.0,
true ) );
275 "Z0",
"Z0",
_(
"Characteristic Impedance" ), 50.0,
true ) );
278 "Ang_l",
"Ang_l",
_(
"Electrical Length" ), 0,
true ) );
283 m_Icon =
new wxBitmap( coax_xpm );
293 "mu Rel I",
_(
"mu Rel I" ),
294 _(
"Relative Permeability (mu) of Insulator" ), 1,
false ) );
296 "mu Rel C",
_(
"mu Rel C" ),
297 _(
"Relative Permeability (mu) of Conductor" ), 1,
302 _(
"Inner Diameter (conductor)" ), 1.0,
true ) );
305 _(
"Outer Diameter (insulator)" ), 8.0,
true ) );
308 _(
"Line Length" ), 50.0,
true ) );
312 _(
"Characteristic Impedance" ), 50.0,
true ) );
316 _(
"Electrical Length" ), 0.0,
true ) );
321 m_Icon =
new wxBitmap( c_microstrip_xpm );
334 _(
"Height of Substrate" ), 0.2,
true ) );
337 _(
"Height of Box Top" ), 1e20,
true ) );
340 _(
"Strip Thickness" ), 0.035,
true ) );
342 "Rough",
_(
"Rough" ),
343 _(
"Conductor Roughness" ), 0.0,
true ) );
345 "mu Rel C",
_(
"mu Rel C" ),
346 _(
"Relative Permeability (mu) of Conductor" ), 1,
351 _(
"Line Width" ), 0.2,
true ) );
354 _(
"Gap Width" ), 0.2,
true ) );
357 _(
"Line Length" ), 50.0,
true ) );
360 "Zeven",
_(
"Zeven" ),
361 _(
"Even mode impedance (lines driven by common voltages)" ), 50.0,
true ) );
364 _(
"Odd mode impedance (lines driven by opposite (differential) voltages)" ), 50.0,
true ) );
367 _(
"Electrical Length" ), 0.0,
true ) );
372 m_Icon =
new wxBitmap( stripline_xpm );
381 _(
"Height of Substrate" ), 0.2,
true ) );
384 _(
"distance between strip and top metal" ), 0.2,
388 _(
"Strip Thickness" ), 0.035,
true ) );
390 "mu Rel C",
_(
"mu Rel C" ),
391 _(
"Relative Permeability (mu) of Conductor" ), 1,
396 _(
"Line Width" ), 0.2,
true ) );
399 _(
"Line Length" ), 50.0,
true ) );
403 _(
"Characteristic Impedance" ), 50,
true ) );
407 _(
"Electrical Length" ), 0,
true ) );
412 m_Icon =
new wxBitmap( twistedpair_xpm );
421 "Twists",
_(
"Twists" ),
422 _(
"Number of Twists per Length" ), 0.0,
false ) );
424 "mu Rel C",
_(
"mu Rel C" ),
425 _(
"Relative Permeability (mu) of Conductor" ), 1,
428 "ErEnv",
_(
"ErEnv" ),
429 _(
"Relative Permittivity of Environment" ), 1,
433 _(
"Inner Diameter (conductor)" ), 1.0,
true ) );
436 _(
"Outer Diameter (insulator)" ), 8.0,
true ) );
439 _(
"Cable Length" ), 50.0,
true ) );
443 _(
"Characteristic Impedance" ), 50.0,
true ) );
447 _(
"Electrical Length" ), 0.0,
true ) );
469 auto cfg = static_cast<PCB_CALCULATOR_SETTINGS*>(
Kiface().KifaceSettings() );
472 if( cfg->m_TransLine.param_values.count(
name ) )
474 wxASSERT( cfg->m_TransLine.param_units.count(
name ) );
481 cfg->m_TransLine.param_values.at(
name ).at( param->m_KeyWord );
482 param->m_UnitSelection =
483 cfg->m_TransLine.param_units.at(
name ).at( param->m_KeyWord );
494 auto cfg = static_cast<PCB_CALCULATOR_SETTINGS*>(
Kiface().KifaceSettings() );
499 if( !std::isfinite( param->m_Value ) )
504 cfg->m_TransLine.param_values[
name ][ param->m_KeyWord ] = param->m_Value;
505 cfg->m_TransLine.param_units[
name ][ param->m_KeyWord ] = param->m_UnitSelection;
void AddPrm(TRANSLINE_PRM *aParam)
enum TRANSLINE_TYPE_ID m_Type
std::vector< TRANSLINE_PRM * > m_prms_List
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
TRANSLINE_IDENT(enum TRANSLINE_TYPE_ID aType)
TRANSLINE_PRM(PRM_TYPE aType, PRMS_ID aId, const char *aKeywordCfg="", const wxString &aDlgLabel=wxEmptyString, const wxString &aToolTip=wxEmptyString, double aValue=0.0, bool aConvUnit=false)
TRANSLINE_PRM ctor.