pcb_calculator: add iec60664 electrical spacing panel.
From patches from by Fabien Corona and Aris_kimi
This commit is contained in:
parent
f92271af2c
commit
47c0c7b3b7
|
@ -1078,6 +1078,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||||
aBitmapInfoCache[BITMAPS::color_code_tolerance].emplace_back( BITMAPS::color_code_tolerance, wxT( "color_code_tolerance.png" ), -1, wxT( "light" ) );
|
aBitmapInfoCache[BITMAPS::color_code_tolerance].emplace_back( BITMAPS::color_code_tolerance, wxT( "color_code_tolerance.png" ), -1, wxT( "light" ) );
|
||||||
aBitmapInfoCache[BITMAPS::color_code_value].emplace_back( BITMAPS::color_code_value, wxT( "color_code_value.png" ), -1, wxT( "light" ) );
|
aBitmapInfoCache[BITMAPS::color_code_value].emplace_back( BITMAPS::color_code_value, wxT( "color_code_value.png" ), -1, wxT( "light" ) );
|
||||||
aBitmapInfoCache[BITMAPS::color_code_value_and_name].emplace_back( BITMAPS::color_code_value_and_name, wxT( "color_code_value_and_name.png" ), -1, wxT( "light" ) );
|
aBitmapInfoCache[BITMAPS::color_code_value_and_name].emplace_back( BITMAPS::color_code_value_and_name, wxT( "color_code_value_and_name.png" ), -1, wxT( "light" ) );
|
||||||
|
aBitmapInfoCache[BITMAPS::creepage_clearance].emplace_back( BITMAPS::creepage_clearance, wxT( "creepage_clearance.png" ), -1, wxT( "light" ) );
|
||||||
aBitmapInfoCache[BITMAPS::cpw].emplace_back( BITMAPS::cpw, wxT( "cpw.png" ), -1, wxT( "light" ) );
|
aBitmapInfoCache[BITMAPS::cpw].emplace_back( BITMAPS::cpw, wxT( "cpw.png" ), -1, wxT( "light" ) );
|
||||||
aBitmapInfoCache[BITMAPS::cpw_back].emplace_back( BITMAPS::cpw_back, wxT( "cpw_back.png" ), -1, wxT( "light" ) );
|
aBitmapInfoCache[BITMAPS::cpw_back].emplace_back( BITMAPS::cpw_back, wxT( "cpw_back.png" ), -1, wxT( "light" ) );
|
||||||
aBitmapInfoCache[BITMAPS::microstrip].emplace_back( BITMAPS::microstrip, wxT( "microstrip.png" ), -1, wxT( "light" ) );
|
aBitmapInfoCache[BITMAPS::microstrip].emplace_back( BITMAPS::microstrip, wxT( "microstrip.png" ), -1, wxT( "light" ) );
|
||||||
|
@ -1116,6 +1117,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||||
aBitmapInfoCache[BITMAPS::color_code_tolerance].emplace_back( BITMAPS::color_code_tolerance, wxT( "color_code_tolerance_dark.png" ), -1, wxT( "dark" ) );
|
aBitmapInfoCache[BITMAPS::color_code_tolerance].emplace_back( BITMAPS::color_code_tolerance, wxT( "color_code_tolerance_dark.png" ), -1, wxT( "dark" ) );
|
||||||
aBitmapInfoCache[BITMAPS::color_code_value].emplace_back( BITMAPS::color_code_value, wxT( "color_code_value_dark.png" ), -1, wxT( "dark" ) );
|
aBitmapInfoCache[BITMAPS::color_code_value].emplace_back( BITMAPS::color_code_value, wxT( "color_code_value_dark.png" ), -1, wxT( "dark" ) );
|
||||||
aBitmapInfoCache[BITMAPS::color_code_value_and_name].emplace_back( BITMAPS::color_code_value_and_name, wxT( "color_code_value_and_name_dark.png" ), -1, wxT( "dark" ) );
|
aBitmapInfoCache[BITMAPS::color_code_value_and_name].emplace_back( BITMAPS::color_code_value_and_name, wxT( "color_code_value_and_name_dark.png" ), -1, wxT( "dark" ) );
|
||||||
|
aBitmapInfoCache[BITMAPS::creepage_clearance].emplace_back( BITMAPS::creepage_clearance, wxT( "creepage_clearance_dark.png" ), -1, wxT( "dark" ) );
|
||||||
aBitmapInfoCache[BITMAPS::cpw].emplace_back( BITMAPS::cpw, wxT( "cpw_dark.png" ), -1, wxT( "dark" ) );
|
aBitmapInfoCache[BITMAPS::cpw].emplace_back( BITMAPS::cpw, wxT( "cpw_dark.png" ), -1, wxT( "dark" ) );
|
||||||
aBitmapInfoCache[BITMAPS::cpw_back].emplace_back( BITMAPS::cpw_back, wxT( "cpw_back_dark.png" ), -1, wxT( "dark" ) );
|
aBitmapInfoCache[BITMAPS::cpw_back].emplace_back( BITMAPS::cpw_back, wxT( "cpw_back_dark.png" ), -1, wxT( "dark" ) );
|
||||||
aBitmapInfoCache[BITMAPS::microstrip].emplace_back( BITMAPS::microstrip, wxT( "microstrip_dark.png" ), -1, wxT( "dark" ) );
|
aBitmapInfoCache[BITMAPS::microstrip].emplace_back( BITMAPS::microstrip, wxT( "microstrip_dark.png" ), -1, wxT( "dark" ) );
|
||||||
|
|
|
@ -118,6 +118,7 @@ enum class BITMAPS : unsigned int
|
||||||
change_label,
|
change_label,
|
||||||
change_text,
|
change_text,
|
||||||
checked_ok,
|
checked_ok,
|
||||||
|
creepage_clearance,
|
||||||
coax,
|
coax,
|
||||||
color_code_multiplier,
|
color_code_multiplier,
|
||||||
color_code_tolerance,
|
color_code_tolerance,
|
||||||
|
|
|
@ -25,6 +25,11 @@ set( PCB_CALCULATOR_SRCS
|
||||||
calculator_panels/panel_galvanic_corrosion_base.cpp
|
calculator_panels/panel_galvanic_corrosion_base.cpp
|
||||||
calculator_panels/panel_electrical_spacing.cpp
|
calculator_panels/panel_electrical_spacing.cpp
|
||||||
calculator_panels/panel_electrical_spacing_base.cpp
|
calculator_panels/panel_electrical_spacing_base.cpp
|
||||||
|
calculator_panels/iec60664.cpp
|
||||||
|
calculator_panels/panel_electrical_spacing_iec60664.cpp
|
||||||
|
calculator_panels/panel_electrical_spacing_iec60664_base.cpp
|
||||||
|
calculator_panels/panel_electrical_spacing_ipc2221.cpp
|
||||||
|
calculator_panels/panel_electrical_spacing_ipc2221_base.cpp
|
||||||
calculator_panels/panel_eseries.cpp
|
calculator_panels/panel_eseries.cpp
|
||||||
calculator_panels/panel_eseries_base.cpp
|
calculator_panels/panel_eseries_base.cpp
|
||||||
calculator_panels/panel_fusing_current.cpp
|
calculator_panels/panel_fusing_current.cpp
|
||||||
|
@ -220,6 +225,7 @@ endfunction()
|
||||||
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/eseries_help )
|
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/eseries_help )
|
||||||
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/fusing_current_help )
|
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/fusing_current_help )
|
||||||
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/galvanic_corrosion_help )
|
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/galvanic_corrosion_help )
|
||||||
|
md_doc2h( ${CMAKE_CURRENT_SOURCE_DIR}/iec60664_help )
|
||||||
|
|
||||||
set( DOCS_LIST
|
set( DOCS_LIST
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/attenuators/pi_formula.h
|
${CMAKE_CURRENT_SOURCE_DIR}/attenuators/pi_formula.h
|
||||||
|
@ -230,6 +236,7 @@ set( DOCS_LIST
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/eseries_help.h
|
${CMAKE_CURRENT_SOURCE_DIR}/eseries_help.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/fusing_current_help.h
|
${CMAKE_CURRENT_SOURCE_DIR}/fusing_current_help.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/galvanic_corrosion_help.h
|
${CMAKE_CURRENT_SOURCE_DIR}/galvanic_corrosion_help.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/iec60664_help.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set_source_files_properties( attenuators/attenuator_classes.cpp
|
set_source_files_properties( attenuators/attenuator_classes.cpp
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,119 @@
|
||||||
|
|
||||||
|
|
||||||
|
// Based on IEC60664-1 : 2020-05
|
||||||
|
#ifndef IEC_60664_H
|
||||||
|
#define IEC_60664_H
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
class IEC60664
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
IEC60664(){};
|
||||||
|
~IEC60664(){};
|
||||||
|
|
||||||
|
|
||||||
|
enum class POLLUTION_DEGREE
|
||||||
|
{
|
||||||
|
PD1 = 1,
|
||||||
|
PD2,
|
||||||
|
PD3,
|
||||||
|
PD4
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class OV_CATEGORY
|
||||||
|
{
|
||||||
|
OV_I = 1,
|
||||||
|
OV_II,
|
||||||
|
OV_III,
|
||||||
|
OV_IV
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class MATERIAL_GROUP
|
||||||
|
{
|
||||||
|
MG_I = 1,
|
||||||
|
MG_II,
|
||||||
|
MG_IIIa,
|
||||||
|
MG_IIIb,
|
||||||
|
NOT_INSULATING
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class INSULATION_TYPE
|
||||||
|
{
|
||||||
|
FUNCTIONAL = 1,
|
||||||
|
BASIC,
|
||||||
|
REINFORCED
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class FIELD
|
||||||
|
{
|
||||||
|
INHOMOGENEOUS = 1,
|
||||||
|
HOMOGENEOUS
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class WAVEFORM
|
||||||
|
{
|
||||||
|
AC_50_OR_60HZ = 1,
|
||||||
|
IMPULSE_1_2_50
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void SetAltitude( const double aAltitude ) { m_altitude = aAltitude; };
|
||||||
|
void SetPollutionDegree( const POLLUTION_DEGREE aPD ) { m_pollutionDegree = aPD; };
|
||||||
|
void SetPCBMaterial( const bool aPCB ) { m_pcbMaterial = aPCB; };
|
||||||
|
void SetMaterialGroup( const MATERIAL_GROUP aMG ) { m_materialGroup = aMG; };
|
||||||
|
void SetFrequency( const double aF ) { m_frequency = aF; };
|
||||||
|
void SetInsulationType( const INSULATION_TYPE aIns ) { m_insulationType = aIns; };
|
||||||
|
void SetOvervoltageCategory( const OV_CATEGORY aOV ) { m_overvoltageCat = aOV; };
|
||||||
|
void SetField( const FIELD aField ) { m_field = aField; };
|
||||||
|
void SetRatedVoltage( const double aV ) { m_ratedVoltage = aV; };
|
||||||
|
void SetRMSVoltage( const double aV ) { m_RMSvoltage = aV; };
|
||||||
|
void SetPeakVoltage( const double aV ) { m_peakVoltage = aV; };
|
||||||
|
void SetTransientVoltage( const double aV ) { m_transientVoltage = aV; };
|
||||||
|
|
||||||
|
|
||||||
|
bool Compute();
|
||||||
|
|
||||||
|
double GetMinGrooveWidth() { return m_minGrooveWidth; };
|
||||||
|
double GetClearanceDistance() { return m_clearance; };
|
||||||
|
double GetCreepageDistance() { return m_creepage; };
|
||||||
|
|
||||||
|
double GetRatedImpulseWithstandVoltage();
|
||||||
|
|
||||||
|
private:
|
||||||
|
double m_ratedVoltage = 100e3;
|
||||||
|
double m_frequency = 50;
|
||||||
|
bool m_coated = false;
|
||||||
|
bool m_pcbMaterial = false;
|
||||||
|
|
||||||
|
double m_RMSvoltage = 100e3;
|
||||||
|
double m_peakVoltage = 100e3;
|
||||||
|
double m_transientVoltage = 100e3;
|
||||||
|
double m_altitude = 100e3;
|
||||||
|
double m_clearance = -1;
|
||||||
|
double m_creepage = -1;
|
||||||
|
double m_minGrooveWidth = -1;
|
||||||
|
FIELD m_field = FIELD::INHOMOGENEOUS;
|
||||||
|
OV_CATEGORY m_overvoltageCat = OV_CATEGORY::OV_IV;
|
||||||
|
MATERIAL_GROUP m_materialGroup = MATERIAL_GROUP::NOT_INSULATING;
|
||||||
|
POLLUTION_DEGREE m_pollutionDegree = POLLUTION_DEGREE::PD3;
|
||||||
|
INSULATION_TYPE m_insulationType = INSULATION_TYPE::REINFORCED;
|
||||||
|
|
||||||
|
|
||||||
|
double GetMinGrooveWidth( const POLLUTION_DEGREE aPD, const double aDistIso = 100 );
|
||||||
|
double GetClearanceAltitudeCorrectionFactor( const double aAltitude );
|
||||||
|
double GetClearanceForRMSVoltage( const double aVRMS,
|
||||||
|
const FIELD aField = FIELD::INHOMOGENEOUS );
|
||||||
|
MATERIAL_GROUP GetMaterialGroupFromCTI( const double aCTI );
|
||||||
|
double GetClearanceToWithstandTransientVoltage( const double aVoltage,
|
||||||
|
const POLLUTION_DEGREE aPD,
|
||||||
|
const FIELD aField );
|
||||||
|
double GetClearanceToWithstandPeaks( const double aVoltage, const FIELD aField );
|
||||||
|
double GetBasicCreepageDistance( const double aVoltage, const POLLUTION_DEGREE aPD,
|
||||||
|
const MATERIAL_GROUP aMG );
|
||||||
|
double ComputeClearanceDistance( const POLLUTION_DEGREE aPD, const FIELD aField,
|
||||||
|
const double aAltitude );
|
||||||
|
double ComputeCreepageDistance( const POLLUTION_DEGREE aPD, const MATERIAL_GROUP aMG );
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,8 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* 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) 2011 jean-pierre.charras
|
* Copyright (C) 2023 Kicad Developers, see AUTHORS.txt for contributors.
|
||||||
* Copyright (C) 1992-2021 Kicad Developers, see AUTHORS.txt for contributors.
|
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -27,85 +26,6 @@
|
||||||
#include <calculator_panels/panel_electrical_spacing.h>
|
#include <calculator_panels/panel_electrical_spacing.h>
|
||||||
#include <pcb_calculator_settings.h>
|
#include <pcb_calculator_settings.h>
|
||||||
#include <string_utils.h>
|
#include <string_utils.h>
|
||||||
#include <widgets/unit_selector.h>
|
|
||||||
#include <units_scales.h>
|
|
||||||
|
|
||||||
extern double DoubleFromString( const wxString& TextValue );
|
|
||||||
|
|
||||||
// The IPC2221 formula used to calculate track width is valid only for copper material
|
|
||||||
const double copper_resistivity = 1.72e-8;
|
|
||||||
|
|
||||||
|
|
||||||
#define VALUE_COUNT 7
|
|
||||||
#define CLASS_COUNT 10
|
|
||||||
|
|
||||||
/* These values come from IPC2221
|
|
||||||
* there are 10 voltage classes:
|
|
||||||
* "0 ... 15V" "16 ... 30V" "31 ... 50V" "51 ... 100V"
|
|
||||||
* "101 ... 150V" "151 ... 170V" "171 ... 250V"
|
|
||||||
* "251 ... 300V" "301 ... 500V" " > 500V"
|
|
||||||
* and for each voltage class
|
|
||||||
* there ar e 7 cases:
|
|
||||||
* "B1" "B2" "B3" "B4" "A5" "A6" "A7"
|
|
||||||
* B1 - Internal Conductors
|
|
||||||
* B2 - External Conductors, uncoated, sea level to 3050 m
|
|
||||||
* B3 - External Conductors, uncoated, over 3050 m
|
|
||||||
* B4 - External Conductors, with permanent polymer coating (any elevation)
|
|
||||||
* A5 - External Conductors, with conformal coating over assembly (any elevation)
|
|
||||||
* A6 - External Component lead/termination, uncoated
|
|
||||||
* A7 - External Component lead termination, with conformal coating (any elevation)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* For voltages greater than 500V, the (per volt) table values
|
|
||||||
* must be added to the 500V values. For example, the elec-
|
|
||||||
* trical spacing for a Type B1 board with 600V is calculated
|
|
||||||
* as:
|
|
||||||
* 600V - 500V = 100V
|
|
||||||
* 0.25 mm + (100V x 0.0025
|
|
||||||
*/
|
|
||||||
static double clist[CLASS_COUNT][VALUE_COUNT] =
|
|
||||||
{
|
|
||||||
{ 0.05 * UNIT_MM, 0.1 * UNIT_MM, 0.1 * UNIT_MM, 0.05 * UNIT_MM, 0.13 * UNIT_MM, 0.13 *
|
|
||||||
UNIT_MM,
|
|
||||||
0.13 * UNIT_MM }, // 0 ... 15V
|
|
||||||
|
|
||||||
{ 0.05 * UNIT_MM, 0.1 * UNIT_MM, 0.1 * UNIT_MM, 0.05 * UNIT_MM, 0.13 * UNIT_MM, 0.25 *
|
|
||||||
UNIT_MM,
|
|
||||||
0.13 * UNIT_MM }, // 16 ... 30V
|
|
||||||
|
|
||||||
{ 0.1 * UNIT_MM, 0.6 * UNIT_MM, 0.6 * UNIT_MM, 0.13 * UNIT_MM, 0.13 * UNIT_MM, 0.4 *
|
|
||||||
UNIT_MM,
|
|
||||||
0.13 * UNIT_MM }, // 31 ... 50V
|
|
||||||
|
|
||||||
{ 0.1 * UNIT_MM, 0.6 * UNIT_MM, 1.5 * UNIT_MM, 0.13 * UNIT_MM, 0.13 * UNIT_MM, 0.5 *
|
|
||||||
UNIT_MM,
|
|
||||||
0.13 * UNIT_MM }, // 51 ... 100V
|
|
||||||
|
|
||||||
{ 0.2 * UNIT_MM, 0.6 * UNIT_MM, 3.2 * UNIT_MM, 0.4 * UNIT_MM, 0.4 * UNIT_MM, 0.8 *
|
|
||||||
UNIT_MM,
|
|
||||||
0.4 * UNIT_MM }, // 101 ... 150V
|
|
||||||
|
|
||||||
{ 0.2 * UNIT_MM, 1.25 * UNIT_MM, 3.2 * UNIT_MM, 0.4 * UNIT_MM, 0.4 * UNIT_MM, 0.8 *
|
|
||||||
UNIT_MM,
|
|
||||||
0.4 * UNIT_MM }, // 151 ... 170V
|
|
||||||
|
|
||||||
{ 0.2 * UNIT_MM, 1.25 * UNIT_MM, 6.4 * UNIT_MM, 0.4 * UNIT_MM, 0.4 * UNIT_MM, 0.8 *
|
|
||||||
UNIT_MM,
|
|
||||||
0.4 * UNIT_MM }, // 171 ... 250V
|
|
||||||
|
|
||||||
{ 0.2 * UNIT_MM, 1.25 * UNIT_MM, 12.5 * UNIT_MM, 0.4 * UNIT_MM, 0.4 * UNIT_MM, 0.8 *
|
|
||||||
UNIT_MM,
|
|
||||||
0.8 * UNIT_MM }, // 251 ... 300V
|
|
||||||
|
|
||||||
{ 0.25 * UNIT_MM, 2.5 * UNIT_MM, 12.5 * UNIT_MM, 0.8 * UNIT_MM, 0.8 * UNIT_MM, 1.5 *
|
|
||||||
UNIT_MM,
|
|
||||||
0.8 * UNIT_MM }, // 301 ... 500V
|
|
||||||
|
|
||||||
// These last values are used to calculate spacing for voltage > 500V
|
|
||||||
// there are not the spacing
|
|
||||||
{ 0.0025 * UNIT_MM, 0.005 * UNIT_MM, 0.025 * UNIT_MM, 0.00305 * UNIT_MM,
|
|
||||||
0.00305 * UNIT_MM, 0.00305 * UNIT_MM, 0.00305 * UNIT_MM }, // > 500V
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
PANEL_ELECTRICAL_SPACING::PANEL_ELECTRICAL_SPACING( wxWindow* parent, wxWindowID id,
|
PANEL_ELECTRICAL_SPACING::PANEL_ELECTRICAL_SPACING( wxWindow* parent, wxWindowID id,
|
||||||
|
@ -113,11 +33,6 @@ PANEL_ELECTRICAL_SPACING::PANEL_ELECTRICAL_SPACING( wxWindow* parent, wxWindowID
|
||||||
long style, const wxString& name ) :
|
long style, const wxString& name ) :
|
||||||
PANEL_ELECTRICAL_SPACING_BASE( parent, id, pos, size, style, name )
|
PANEL_ELECTRICAL_SPACING_BASE( parent, id, pos, size, style, name )
|
||||||
{
|
{
|
||||||
// Autosize the row label column to be sure label are not truncated
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelSize( wxGRID_AUTOSIZE );
|
|
||||||
|
|
||||||
// Needed on wxWidgets 3.0 to ensure sizers are correctly set
|
|
||||||
GetSizer()->SetSizeHints( this );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,70 +43,20 @@ PANEL_ELECTRICAL_SPACING::~PANEL_ELECTRICAL_SPACING()
|
||||||
|
|
||||||
void PANEL_ELECTRICAL_SPACING::ThemeChanged()
|
void PANEL_ELECTRICAL_SPACING::ThemeChanged()
|
||||||
{
|
{
|
||||||
// TODO: Only the grid needs updating, but it isn't done automatically (https://trac.wxwidgets.org/ticket/19279)
|
static_cast<CALCULATOR_PANEL*>( m_notebook1->GetPage( 0 ) )->ThemeChanged();
|
||||||
|
static_cast<CALCULATOR_PANEL*>( m_notebook1->GetPage( 1 ) )->ThemeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_ELECTRICAL_SPACING::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg )
|
void PANEL_ELECTRICAL_SPACING::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg )
|
||||||
{
|
{
|
||||||
aCfg->m_Electrical.spacing_units = m_ElectricalSpacingUnitsSelector->GetSelection();
|
static_cast<CALCULATOR_PANEL*>( m_notebook1->GetPage( 0 ) )->SaveSettings( aCfg );
|
||||||
aCfg->m_Electrical.spacing_voltage = m_ElectricalSpacingVoltage->GetValue();
|
static_cast<CALCULATOR_PANEL*>( m_notebook1->GetPage( 1 ) )->SaveSettings( aCfg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_ELECTRICAL_SPACING::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg )
|
void PANEL_ELECTRICAL_SPACING::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg )
|
||||||
{
|
{
|
||||||
m_ElectricalSpacingUnitsSelector->SetSelection( aCfg->m_Electrical.spacing_units );
|
static_cast<CALCULATOR_PANEL*>( m_notebook1->GetPage( 0 ) )->LoadSettings( aCfg );
|
||||||
m_ElectricalSpacingVoltage->SetValue( aCfg->m_Electrical.spacing_voltage );
|
static_cast<CALCULATOR_PANEL*>( m_notebook1->GetPage( 1 ) )->LoadSettings( aCfg );
|
||||||
|
}
|
||||||
ElectricalSpacingUpdateData( m_ElectricalSpacingUnitsSelector->GetUnitScale() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PANEL_ELECTRICAL_SPACING::OnElectricalSpacingUnitsSelection( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
ElectricalSpacingUpdateData( m_ElectricalSpacingUnitsSelector->GetUnitScale() );
|
|
||||||
}
|
|
||||||
|
|
||||||
void PANEL_ELECTRICAL_SPACING::OnElectricalSpacingRefresh( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
ElectricalSpacingUpdateData( m_ElectricalSpacingUnitsSelector->GetUnitScale() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void PANEL_ELECTRICAL_SPACING::ElectricalSpacingUpdateData( double aUnitScale )
|
|
||||||
{
|
|
||||||
wxString txt;
|
|
||||||
double voltage = 500.0; // to calculate values at V > 500V
|
|
||||||
txt = m_ElectricalSpacingVoltage->GetValue();
|
|
||||||
|
|
||||||
if( ! txt.IsEmpty() )
|
|
||||||
voltage = DoubleFromString(txt);
|
|
||||||
|
|
||||||
if( voltage < 500.0 )
|
|
||||||
voltage = 500.0;
|
|
||||||
|
|
||||||
txt.Printf( wxT( "%g" ), voltage );
|
|
||||||
m_ElectricalSpacingVoltage->SetValue( txt );
|
|
||||||
|
|
||||||
for( int ii = 0; ii < CLASS_COUNT-1; ii++ )
|
|
||||||
{
|
|
||||||
for( int jj = 0; jj < VALUE_COUNT; jj++ )
|
|
||||||
{
|
|
||||||
txt.Printf( wxT( "%g" ), clist[ii][jj] / aUnitScale );
|
|
||||||
m_gridElectricalSpacingValues->SetCellValue( ii, jj, txt );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for( int jj = 0; jj < VALUE_COUNT; jj++ )
|
|
||||||
{
|
|
||||||
double spacing = clist[CLASS_COUNT-2][jj];
|
|
||||||
double spacing_extra = clist[CLASS_COUNT-1][jj];
|
|
||||||
spacing += spacing_extra * ( voltage - 500.0 );
|
|
||||||
txt.Printf( wxT( "%g" ), spacing / aUnitScale );
|
|
||||||
m_gridElectricalSpacingValues->SetCellValue( CLASS_COUNT-1, jj, txt );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelSize( wxGRID_AUTOSIZE );
|
|
||||||
}
|
|
|
@ -38,11 +38,6 @@ public:
|
||||||
void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
|
void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
|
||||||
void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
|
void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
|
||||||
void ThemeChanged() override;
|
void ThemeChanged() override;
|
||||||
|
|
||||||
void OnElectricalSpacingUnitsSelection( wxCommandEvent& event ) override;
|
|
||||||
void OnElectricalSpacingRefresh( wxCommandEvent& event ) override;
|
|
||||||
void ElectricalSpacingUpdateData( double aUnitScale );
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5,131 +5,28 @@
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "widgets/unit_selector.h"
|
|
||||||
|
|
||||||
#include "panel_electrical_spacing_base.h"
|
#include "panel_electrical_spacing_base.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
PANEL_ELECTRICAL_SPACING_BASE::PANEL_ELECTRICAL_SPACING_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name )
|
PANEL_ELECTRICAL_SPACING_BASE::PANEL_ELECTRICAL_SPACING_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name )
|
||||||
{
|
{
|
||||||
wxBoxSizer* bSizerElectricalClearance;
|
wxBoxSizer* bSizer4;
|
||||||
bSizerElectricalClearance = new wxBoxSizer( wxHORIZONTAL );
|
bSizer4 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxBoxSizer* bLeftSizerElectricalClearance;
|
m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bLeftSizerElectricalClearance = new wxBoxSizer( wxVERTICAL );
|
m_IPC2221 = new PANEL_ELECTRICAL_SPACING_IPC2221( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
|
m_notebook1->AddPage( m_IPC2221, _("IPC 2221"), false );
|
||||||
|
m_IEC60664 = new PANEL_ELECTRICAL_SPACING_IEC60664( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
|
m_notebook1->AddPage( m_IEC60664, _("IEC 60664"), false );
|
||||||
|
|
||||||
wxArrayString m_ElectricalSpacingUnitsSelectorChoices;
|
bSizer4->Add( m_notebook1, 1, wxALL|wxEXPAND, 0 );
|
||||||
m_ElectricalSpacingUnitsSelector = new UNIT_SELECTOR_LEN( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ElectricalSpacingUnitsSelectorChoices, 0 );
|
|
||||||
m_ElectricalSpacingUnitsSelector->SetSelection( -1 );
|
|
||||||
m_ElectricalSpacingUnitsSelector->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
|
||||||
|
|
||||||
bLeftSizerElectricalClearance->Add( m_ElectricalSpacingUnitsSelector, 0, wxEXPAND|wxALL, 10 );
|
|
||||||
|
|
||||||
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
|
||||||
bLeftSizerElectricalClearance->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
|
|
||||||
|
|
||||||
m_staticText891 = new wxStaticText( this, wxID_ANY, _("Voltage > 500 V:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_staticText891->Wrap( -1 );
|
|
||||||
bLeftSizerElectricalClearance->Add( m_staticText891, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
|
||||||
m_ElectricalSpacingVoltage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
bLeftSizerElectricalClearance->Add( m_ElectricalSpacingVoltage, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
|
||||||
m_buttonElectSpacingRefresh = new wxButton( this, wxID_ANY, _("Update Values"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
bLeftSizerElectricalClearance->Add( m_buttonElectSpacingRefresh, 0, wxEXPAND|wxALL, 5 );
|
|
||||||
|
|
||||||
|
|
||||||
bSizerElectricalClearance->Add( bLeftSizerElectricalClearance, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
this->SetSizer( bSizer4 );
|
||||||
|
|
||||||
m_electricalSpacingSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
m_staticTextElectricalSpacing = new wxStaticText( this, wxID_ANY, _("Note: Values are minimal values (from IPC 2221)"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_staticTextElectricalSpacing->Wrap( -1 );
|
|
||||||
m_staticTextElectricalSpacing->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
|
||||||
|
|
||||||
m_electricalSpacingSizer->Add( m_staticTextElectricalSpacing, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
|
||||||
m_gridElectricalSpacingValues = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
|
|
||||||
// Grid
|
|
||||||
m_gridElectricalSpacingValues->CreateGrid( 10, 7 );
|
|
||||||
m_gridElectricalSpacingValues->EnableEditing( false );
|
|
||||||
m_gridElectricalSpacingValues->EnableGridLines( true );
|
|
||||||
m_gridElectricalSpacingValues->EnableDragGridSize( false );
|
|
||||||
m_gridElectricalSpacingValues->SetMargins( 0, 0 );
|
|
||||||
|
|
||||||
// Columns
|
|
||||||
m_gridElectricalSpacingValues->SetColSize( 0, 100 );
|
|
||||||
m_gridElectricalSpacingValues->SetColSize( 1, 100 );
|
|
||||||
m_gridElectricalSpacingValues->SetColSize( 2, 100 );
|
|
||||||
m_gridElectricalSpacingValues->SetColSize( 3, 100 );
|
|
||||||
m_gridElectricalSpacingValues->SetColSize( 4, 100 );
|
|
||||||
m_gridElectricalSpacingValues->SetColSize( 5, 100 );
|
|
||||||
m_gridElectricalSpacingValues->SetColSize( 6, 100 );
|
|
||||||
m_gridElectricalSpacingValues->EnableDragColMove( false );
|
|
||||||
m_gridElectricalSpacingValues->EnableDragColSize( true );
|
|
||||||
m_gridElectricalSpacingValues->SetColLabelValue( 0, _("B1") );
|
|
||||||
m_gridElectricalSpacingValues->SetColLabelValue( 1, _("B2") );
|
|
||||||
m_gridElectricalSpacingValues->SetColLabelValue( 2, _("B3") );
|
|
||||||
m_gridElectricalSpacingValues->SetColLabelValue( 3, _("B4") );
|
|
||||||
m_gridElectricalSpacingValues->SetColLabelValue( 4, _("A5") );
|
|
||||||
m_gridElectricalSpacingValues->SetColLabelValue( 5, _("A6") );
|
|
||||||
m_gridElectricalSpacingValues->SetColLabelValue( 6, _("A7") );
|
|
||||||
m_gridElectricalSpacingValues->SetColLabelSize( 30 );
|
|
||||||
m_gridElectricalSpacingValues->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
||||||
|
|
||||||
// Rows
|
|
||||||
m_gridElectricalSpacingValues->SetRowSize( 0, 24 );
|
|
||||||
m_gridElectricalSpacingValues->SetRowSize( 1, 24 );
|
|
||||||
m_gridElectricalSpacingValues->SetRowSize( 2, 24 );
|
|
||||||
m_gridElectricalSpacingValues->SetRowSize( 3, 24 );
|
|
||||||
m_gridElectricalSpacingValues->SetRowSize( 4, 24 );
|
|
||||||
m_gridElectricalSpacingValues->SetRowSize( 5, 24 );
|
|
||||||
m_gridElectricalSpacingValues->SetRowSize( 6, 24 );
|
|
||||||
m_gridElectricalSpacingValues->SetRowSize( 7, 24 );
|
|
||||||
m_gridElectricalSpacingValues->SetRowSize( 8, 24 );
|
|
||||||
m_gridElectricalSpacingValues->SetRowSize( 9, 24 );
|
|
||||||
m_gridElectricalSpacingValues->EnableDragRowSize( false );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelValue( 0, _("0 .. 15 V") );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelValue( 1, _("16 .. 30 V") );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelValue( 2, _("31 .. 50 V") );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelValue( 3, _("51 .. 100 V") );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelValue( 4, _("101 .. 150 V") );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelValue( 5, _("151 .. 170 V") );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelValue( 6, _("171 .. 250 V") );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelValue( 7, _("251 .. 300 V") );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelValue( 8, _("301 .. 500 V") );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelValue( 9, _(" > 500 V") );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelSize( 100 );
|
|
||||||
m_gridElectricalSpacingValues->SetRowLabelAlignment( wxALIGN_RIGHT, wxALIGN_CENTER );
|
|
||||||
|
|
||||||
// Label Appearance
|
|
||||||
|
|
||||||
// Cell Defaults
|
|
||||||
m_gridElectricalSpacingValues->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
||||||
m_electricalSpacingSizer->Add( m_gridElectricalSpacingValues, 0, wxALL, 5 );
|
|
||||||
|
|
||||||
m_staticText88 = new wxStaticText( this, wxID_ANY, _("* B1 - Internal Conductors\n* B2 - External Conductors, uncoated, sea level to 3050 m\n* B3 - External Conductors, uncoated, over 3050 m\n* B4 - External Conductors, with permanent polymer coating (any elevation)\n* A5 - External Conductors, with conformal coating over assembly (any elevation)\n* A6 - External Component lead/termination, uncoated\n* A7 - External Component lead termination, with conformal coating (any elevation)"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_staticText88->Wrap( -1 );
|
|
||||||
m_electricalSpacingSizer->Add( m_staticText88, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
|
||||||
|
|
||||||
bSizerElectricalClearance->Add( m_electricalSpacingSizer, 1, wxEXPAND|wxLEFT, 20 );
|
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( bSizerElectricalClearance );
|
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
|
||||||
// Connect Events
|
|
||||||
m_ElectricalSpacingUnitsSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
|
||||||
m_buttonElectSpacingRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PANEL_ELECTRICAL_SPACING_BASE::~PANEL_ELECTRICAL_SPACING_BASE()
|
PANEL_ELECTRICAL_SPACING_BASE::~PANEL_ELECTRICAL_SPACING_BASE()
|
||||||
{
|
{
|
||||||
// Disconnect Events
|
|
||||||
m_ElectricalSpacingUnitsSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
|
||||||
m_buttonElectSpacingRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,505 +54,71 @@
|
||||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="1">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizerElectricalClearance</property>
|
<property name="name">bSizer4</property>
|
||||||
<property name="orient">wxHORIZONTAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">0</property>
|
||||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
|
<property name="flag">wxALL|wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxBoxSizer" expanded="1">
|
|
||||||
<property name="minimum_size"></property>
|
|
||||||
<property name="name">bLeftSizerElectricalClearance</property>
|
|
||||||
<property name="orient">wxVERTICAL</property>
|
|
||||||
<property name="permission">none</property>
|
|
||||||
<object class="sizeritem" expanded="0">
|
|
||||||
<property name="border">10</property>
|
|
||||||
<property name="flag">wxEXPAND|wxALL</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxChoice" expanded="0">
|
|
||||||
<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"></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">,90,90,-1,70,0</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_ElectricalSpacingUnitsSelector</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">-1</property>
|
|
||||||
<property name="show">1</property>
|
|
||||||
<property name="size"></property>
|
|
||||||
<property name="style"></property>
|
|
||||||
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</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="OnChoice">OnElectricalSpacingUnitsSelection</event>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="0">
|
|
||||||
<property name="border">10</property>
|
|
||||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxStaticLine" expanded="0">
|
|
||||||
<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="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_staticline2</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">wxLI_HORIZONTAL</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>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="0">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxStaticText" expanded="0">
|
|
||||||
<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="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">Voltage > 500 V:</property>
|
|
||||||
<property name="markup">0</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_staticText891</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="window_extra_style"></property>
|
|
||||||
<property name="window_name"></property>
|
|
||||||
<property name="window_style"></property>
|
|
||||||
<property name="wrap">-1</property>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="0">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxTextCtrl" expanded="0">
|
|
||||||
<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="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="maxlength">0</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_ElectricalSpacingVoltage</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="value"></property>
|
|
||||||
<property name="window_extra_style"></property>
|
|
||||||
<property name="window_name"></property>
|
|
||||||
<property name="window_style"></property>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="0">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxEXPAND|wxALL</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxButton" expanded="0">
|
|
||||||
<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="auth_needed">0</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="current"></property>
|
|
||||||
<property name="default">0</property>
|
|
||||||
<property name="default_pane">0</property>
|
|
||||||
<property name="disabled"></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="focus"></property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_ANY</property>
|
|
||||||
<property name="label">Update Values</property>
|
|
||||||
<property name="margins"></property>
|
|
||||||
<property name="markup">0</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_buttonElectSpacingRefresh</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="position"></property>
|
|
||||||
<property name="pressed"></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="OnButtonClick">OnElectricalSpacingRefresh</event>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="1">
|
|
||||||
<property name="border">20</property>
|
|
||||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxNotebook" 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="bitmapsize"></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="minimum_size"></property>
|
||||||
<property name="name">m_electricalSpacingSizer</property>
|
<property name="moveable">1</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="name">m_notebook1</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<object class="sizeritem" expanded="0">
|
<property name="pin_button">1</property>
|
||||||
<property name="border">5</property>
|
<property name="pos"></property>
|
||||||
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="proportion">0</property>
|
<property name="show">1</property>
|
||||||
<object class="wxStaticText" expanded="0">
|
<property name="size"></property>
|
||||||
<property name="BottomDockable">1</property>
|
<property name="style"></property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="subclass">; ; forward_declare</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="TopDockable">1</property>
|
<property name="tooltip"></property>
|
||||||
<property name="aui_layer"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="aui_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="window_style"></property>
|
||||||
<property name="aui_row"></property>
|
<object class="notebookpage" expanded="1">
|
||||||
<property name="best_size"></property>
|
<property name="bitmap"></property>
|
||||||
<property name="bg"></property>
|
<property name="label">IPC 2221</property>
|
||||||
<property name="caption"></property>
|
<property name="select">0</property>
|
||||||
<property name="caption_visible">1</property>
|
<object class="wxPanel" expanded="1">
|
||||||
<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">,93,92,-1,70,0</property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_ANY</property>
|
|
||||||
<property name="label">Note: Values are minimal values (from IPC 2221)</property>
|
|
||||||
<property name="markup">0</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_staticTextElectricalSpacing</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="window_extra_style"></property>
|
|
||||||
<property name="window_name"></property>
|
|
||||||
<property name="window_style"></property>
|
|
||||||
<property name="wrap">-1</property>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="0">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxALL</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxGrid" expanded="0">
|
|
||||||
<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="autosize_cols">0</property>
|
|
||||||
<property name="autosize_rows">0</property>
|
|
||||||
<property name="best_size"></property>
|
|
||||||
<property name="bg"></property>
|
|
||||||
<property name="caption"></property>
|
|
||||||
<property name="caption_visible">1</property>
|
|
||||||
<property name="cell_bg"></property>
|
|
||||||
<property name="cell_font"></property>
|
|
||||||
<property name="cell_horiz_alignment">wxALIGN_CENTER</property>
|
|
||||||
<property name="cell_text"></property>
|
|
||||||
<property name="cell_vert_alignment">wxALIGN_CENTER</property>
|
|
||||||
<property name="center_pane">0</property>
|
|
||||||
<property name="close_button">1</property>
|
|
||||||
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
|
||||||
<property name="col_label_size">30</property>
|
|
||||||
<property name="col_label_values">"B1" "B2" "B3" "B4" "A5" "A6" "A7"</property>
|
|
||||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
|
||||||
<property name="cols">7</property>
|
|
||||||
<property name="column_sizes">100,100,100,100,100,100,100</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="drag_col_move">0</property>
|
|
||||||
<property name="drag_col_size">1</property>
|
|
||||||
<property name="drag_grid_size">0</property>
|
|
||||||
<property name="drag_row_size">0</property>
|
|
||||||
<property name="editing">0</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="floatable">1</property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="grid_line_color"></property>
|
|
||||||
<property name="grid_lines">1</property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_ANY</property>
|
|
||||||
<property name="label_bg"></property>
|
|
||||||
<property name="label_font"></property>
|
|
||||||
<property name="label_text"></property>
|
|
||||||
<property name="margin_height">0</property>
|
|
||||||
<property name="margin_width">0</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_gridElectricalSpacingValues</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="row_label_horiz_alignment">wxALIGN_RIGHT</property>
|
|
||||||
<property name="row_label_size">100</property>
|
|
||||||
<property name="row_label_values">"0 .. 15 V" "16 .. 30 V" "31 .. 50 V" "51 .. 100 V" "101 .. 150 V" "151 .. 170 V" "171 .. 250 V" "251 .. 300 V" "301 .. 500 V" " > 500 V"</property>
|
|
||||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
|
||||||
<property name="row_sizes">24,24,24,24,24,24,24,24,24,24</property>
|
|
||||||
<property name="rows">10</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>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="0">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxStaticText" expanded="0">
|
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
|
@ -580,8 +146,6 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">* B1 - Internal Conductors
* B2 - External Conductors, uncoated, sea level to 3050 m
* B3 - External Conductors, uncoated, over 3050 m
* B4 - External Conductors, with permanent polymer coating (any elevation)
* A5 - External Conductors, with conformal coating over assembly (any elevation)
* A6 - External Component lead/termination, uncoated
* A7 - External Component lead termination, with conformal coating (any elevation)</property>
|
|
||||||
<property name="markup">0</property>
|
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -589,7 +153,7 @@
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_staticText88</property>
|
<property name="name">m_IPC2221</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
|
@ -599,14 +163,69 @@
|
||||||
<property name="resize">Resizable</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="style"></property>
|
<property name="subclass">PANEL_ELECTRICAL_SPACING_IPC2221; panel_electrical_spacing_ipc2221.h; ...</property>
|
||||||
<property name="subclass"></property>
|
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||||
<property name="wrap">-1</property>
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="notebookpage" expanded="1">
|
||||||
|
<property name="bitmap"></property>
|
||||||
|
<property name="label">IEC 60664</property>
|
||||||
|
<property name="select">0</property>
|
||||||
|
<object class="wxPanel" 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="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_IEC60664</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">PANEL_ELECTRICAL_SPACING_IEC60664; panel_electrical_spacing_iec60664.h; ...</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">wxTAB_TRAVERSAL</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
|
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -10,25 +10,20 @@
|
||||||
#include <wx/artprov.h>
|
#include <wx/artprov.h>
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
class UNIT_SELECTOR_LEN;
|
#include "panel_electrical_spacing_ipc2221.h"
|
||||||
|
#include "panel_electrical_spacing_iec60664.h"
|
||||||
#include "calculator_panels/calculator_panel.h"
|
#include "calculator_panels/calculator_panel.h"
|
||||||
#include <wx/string.h>
|
#include <wx/panel.h>
|
||||||
#include <wx/choice.h>
|
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/statline.h>
|
#include <wx/string.h>
|
||||||
#include <wx/stattext.h>
|
|
||||||
#include <wx/textctrl.h>
|
|
||||||
#include <wx/button.h>
|
|
||||||
#include <wx/bitmap.h>
|
#include <wx/bitmap.h>
|
||||||
#include <wx/image.h>
|
#include <wx/image.h>
|
||||||
#include <wx/icon.h>
|
#include <wx/icon.h>
|
||||||
|
#include <wx/notebook.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/grid.h>
|
|
||||||
#include <wx/panel.h>
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -41,20 +36,9 @@ class PANEL_ELECTRICAL_SPACING_BASE : public CALCULATOR_PANEL
|
||||||
private:
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UNIT_SELECTOR_LEN* m_ElectricalSpacingUnitsSelector;
|
wxNotebook* m_notebook1;
|
||||||
wxStaticLine* m_staticline2;
|
PANEL_ELECTRICAL_SPACING_IPC2221* m_IPC2221;
|
||||||
wxStaticText* m_staticText891;
|
PANEL_ELECTRICAL_SPACING_IEC60664* m_IEC60664;
|
||||||
wxTextCtrl* m_ElectricalSpacingVoltage;
|
|
||||||
wxButton* m_buttonElectSpacingRefresh;
|
|
||||||
wxBoxSizer* m_electricalSpacingSizer;
|
|
||||||
wxStaticText* m_staticTextElectricalSpacing;
|
|
||||||
wxGrid* m_gridElectricalSpacingValues;
|
|
||||||
wxStaticText* m_staticText88;
|
|
||||||
|
|
||||||
// Virtual event handlers, override them in your derived class
|
|
||||||
virtual void OnElectricalSpacingUnitsSelection( wxCommandEvent& event ) { event.Skip(); }
|
|
||||||
virtual void OnElectricalSpacingRefresh( wxCommandEvent& event ) { event.Skip(); }
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,264 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2023 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 3
|
||||||
|
* 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* see
|
||||||
|
* http://www.desmith.net/NMdS/Electronics/TraceWidth.html
|
||||||
|
* http://www.ultracad.com/articles/pcbtemp.pdf
|
||||||
|
* for more info
|
||||||
|
*/
|
||||||
|
#include <calculator_panels/panel_electrical_spacing.h>
|
||||||
|
#include <pcb_calculator_settings.h>
|
||||||
|
#include <string_utils.h>
|
||||||
|
#include "iec60664.h"
|
||||||
|
#include <wx/string.h>
|
||||||
|
#include <html_window.h>
|
||||||
|
#include <bitmaps.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include <i18n_utility.h> // For _HKI definition in eseries_help.h
|
||||||
|
wxString iec60664help =
|
||||||
|
#include "iec60664_help.h"
|
||||||
|
|
||||||
|
extern double DoubleFromString( const wxString& TextValue );
|
||||||
|
|
||||||
|
PANEL_ELECTRICAL_SPACING_IEC60664::PANEL_ELECTRICAL_SPACING_IEC60664(
|
||||||
|
wxWindow * parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
|
||||||
|
long style, const wxString& name ) :
|
||||||
|
PANEL_ELECTRICAL_SPACING_IEC60664_BASE( parent, id, pos, size, style, name )
|
||||||
|
{
|
||||||
|
m_OVCchoice->Append( _( "OVC I" ) );
|
||||||
|
m_OVCchoice->Append( _( "OVC II" ) );
|
||||||
|
m_OVCchoice->Append( _( "OVC III" ) );
|
||||||
|
m_OVCchoice->Append( _( "OVC IV" ) );
|
||||||
|
m_OVCchoice->SetSelection( 0 );
|
||||||
|
|
||||||
|
m_insulationType->Append( _( "Functional" ) );
|
||||||
|
m_insulationType->Append( _( "Basic" ) );
|
||||||
|
m_insulationType->Append( _( "Reinforced" ) );
|
||||||
|
m_insulationType->SetSelection( 0 );
|
||||||
|
|
||||||
|
m_pollutionDegree->Append( _( "PD1" ) );
|
||||||
|
m_pollutionDegree->Append( _( "PD2" ) );
|
||||||
|
m_pollutionDegree->Append( _( "PD3" ) );
|
||||||
|
m_pollutionDegree->Append( _( "PD4" ) );
|
||||||
|
m_pollutionDegree->SetSelection( 0 );
|
||||||
|
|
||||||
|
m_materialGroup->Append( _( "I" ) );
|
||||||
|
m_materialGroup->Append( _( "II" ) );
|
||||||
|
m_materialGroup->Append( _( "IIIa" ) );
|
||||||
|
m_materialGroup->Append( _( "IIIb" ) );
|
||||||
|
m_materialGroup->SetSelection( 0 );
|
||||||
|
|
||||||
|
wxString msg;
|
||||||
|
ConvertMarkdown2Html( wxGetTranslation( iec60664help ), msg );
|
||||||
|
m_panelHelp->SetPage( msg );
|
||||||
|
|
||||||
|
m_creepageclearanceBitmap->SetBitmap( KiBitmap( BITMAPS::creepage_clearance ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PANEL_ELECTRICAL_SPACING_IEC60664::~PANEL_ELECTRICAL_SPACING_IEC60664()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IEC60664::ThemeChanged()
|
||||||
|
{
|
||||||
|
m_creepageclearanceBitmap->SetBitmap( KiBitmap( BITMAPS::viacalc ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IEC60664::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg )
|
||||||
|
{
|
||||||
|
if( !aCfg )
|
||||||
|
return;
|
||||||
|
|
||||||
|
aCfg->m_Electrical.iec60664_ratedVoltage = DoubleFromString( m_ratedVoltage1->GetValue() );
|
||||||
|
aCfg->m_Electrical.iec60664_RMSvoltage = DoubleFromString( m_RMSVoltage->GetValue() );
|
||||||
|
aCfg->m_Electrical.iec60664_transientOV = DoubleFromString( m_transientOvervoltage->GetValue() );
|
||||||
|
aCfg->m_Electrical.iec60664_peakOV = DoubleFromString( m_peakVoltage->GetValue() );
|
||||||
|
aCfg->m_Electrical.iec60664_altitude = DoubleFromString( m_altitude->GetValue() );
|
||||||
|
|
||||||
|
aCfg->m_Electrical.iec60664_OVC = m_OVCchoice->GetSelection();
|
||||||
|
aCfg->m_Electrical.iec60664_insulationType = m_insulationType->GetSelection();
|
||||||
|
aCfg->m_Electrical.iec60664_pollutionDegree = m_pollutionDegree->GetSelection();
|
||||||
|
aCfg->m_Electrical.iec60664_materialGroup = m_materialGroup->GetSelection();
|
||||||
|
|
||||||
|
aCfg->m_Electrical.iec60664_pcbMaterial = m_pcbMaterial->GetValue() ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IEC60664::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg )
|
||||||
|
{
|
||||||
|
if( !aCfg )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_ratedVoltage1->SetValue( wxString( "" ) << aCfg->m_Electrical.iec60664_ratedVoltage );
|
||||||
|
m_RMSVoltage->SetValue( wxString( "" ) << aCfg->m_Electrical.iec60664_RMSvoltage );
|
||||||
|
m_transientOvervoltage->SetValue( wxString( "" ) << aCfg->m_Electrical.iec60664_transientOV );
|
||||||
|
m_peakVoltage->SetValue( wxString( "" ) << aCfg->m_Electrical.iec60664_peakOV );
|
||||||
|
m_altitude->SetValue( wxString( "" ) << aCfg->m_Electrical.iec60664_altitude );
|
||||||
|
|
||||||
|
m_OVCchoice->SetSelection( aCfg->m_Electrical.iec60664_OVC );
|
||||||
|
m_insulationType->SetSelection( aCfg->m_Electrical.iec60664_insulationType );
|
||||||
|
m_pollutionDegree->SetSelection( aCfg->m_Electrical.iec60664_pollutionDegree );
|
||||||
|
m_materialGroup->SetSelection( aCfg->m_Electrical.iec60664_materialGroup );
|
||||||
|
|
||||||
|
m_pcbMaterial->SetValue( aCfg->m_Electrical.iec60664_pcbMaterial ? true : false );
|
||||||
|
|
||||||
|
CalculateTransientImpulse();
|
||||||
|
CalculateClearanceCreepage();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IEC60664::CalculateTransientImpulse()
|
||||||
|
{
|
||||||
|
wxString string = m_ratedVoltage1->GetValue();
|
||||||
|
double value = 0;
|
||||||
|
IEC60664::OV_CATEGORY ovc;
|
||||||
|
|
||||||
|
switch( m_OVCchoice->GetSelection() )
|
||||||
|
{
|
||||||
|
case 0: ovc = IEC60664::OV_CATEGORY::OV_I; break;
|
||||||
|
case 1: ovc = IEC60664::OV_CATEGORY::OV_II; break;
|
||||||
|
case 2: ovc = IEC60664::OV_CATEGORY::OV_III; break;
|
||||||
|
default: ovc = IEC60664::OV_CATEGORY::OV_IV; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( string.ToDouble( &value ) )
|
||||||
|
{
|
||||||
|
IEC60664 cal;
|
||||||
|
cal.SetOvervoltageCategory( ovc );
|
||||||
|
cal.SetRatedVoltage( value );
|
||||||
|
string = "";
|
||||||
|
double result = cal.GetRatedImpulseWithstandVoltage();
|
||||||
|
|
||||||
|
if( result >= 0 )
|
||||||
|
string << result / 1000;
|
||||||
|
else
|
||||||
|
string << _( "Error" );
|
||||||
|
|
||||||
|
m_impulseVotlage1TxtCtrl->SetValue( string );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IEC60664::UpdateTransientImpulse( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
CalculateTransientImpulse();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IEC60664::CalculateClearanceCreepage()
|
||||||
|
{
|
||||||
|
IEC60664::INSULATION_TYPE insul;
|
||||||
|
IEC60664::POLLUTION_DEGREE pd;
|
||||||
|
IEC60664::MATERIAL_GROUP mg;
|
||||||
|
|
||||||
|
switch( m_insulationType->GetSelection() )
|
||||||
|
{
|
||||||
|
case 0: insul = IEC60664::INSULATION_TYPE::FUNCTIONAL; break;
|
||||||
|
case 1: insul = IEC60664::INSULATION_TYPE::BASIC; break;
|
||||||
|
default: insul = IEC60664::INSULATION_TYPE::REINFORCED; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch( m_pollutionDegree->GetSelection() )
|
||||||
|
{
|
||||||
|
case 0: pd = IEC60664::POLLUTION_DEGREE::PD1; break;
|
||||||
|
case 1: pd = IEC60664::POLLUTION_DEGREE::PD2; break;
|
||||||
|
case 2: pd = IEC60664::POLLUTION_DEGREE::PD3; break;
|
||||||
|
default: pd = IEC60664::POLLUTION_DEGREE::PD4; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch( m_materialGroup->GetSelection() )
|
||||||
|
{
|
||||||
|
case 0: mg = IEC60664::MATERIAL_GROUP::MG_I; break;
|
||||||
|
case 1: mg = IEC60664::MATERIAL_GROUP::MG_II; break;
|
||||||
|
case 2: mg = IEC60664::MATERIAL_GROUP::MG_IIIa; break;
|
||||||
|
default: mg = IEC60664::MATERIAL_GROUP::MG_IIIb; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
double altitude = 0;
|
||||||
|
double transientV = 0;
|
||||||
|
double RMSV = 0;
|
||||||
|
double peakV = 0;
|
||||||
|
|
||||||
|
if( m_altitude->GetValue().ToDouble( &altitude )
|
||||||
|
&& m_transientOvervoltage->GetValue().ToDouble( &transientV )
|
||||||
|
&& m_peakVoltage->GetValue().ToDouble( &peakV )
|
||||||
|
&& m_RMSVoltage->GetValue().ToDouble( &RMSV ) )
|
||||||
|
{
|
||||||
|
wxString string;
|
||||||
|
|
||||||
|
IEC60664 cal;
|
||||||
|
cal.SetPollutionDegree( pd );
|
||||||
|
cal.SetMaterialGroup( mg );
|
||||||
|
cal.SetInsulationType( insul );
|
||||||
|
cal.SetAltitude( altitude );
|
||||||
|
cal.SetTransientVoltage( transientV );
|
||||||
|
cal.SetPeakVoltage( peakV );
|
||||||
|
cal.SetRMSVoltage( RMSV );
|
||||||
|
cal.SetPCBMaterial( m_pcbMaterial->GetValue() );
|
||||||
|
|
||||||
|
cal.Compute();
|
||||||
|
|
||||||
|
double groove = cal.GetMinGrooveWidth();
|
||||||
|
double creepage = cal.GetCreepageDistance();
|
||||||
|
double clearange = cal.GetClearanceDistance();
|
||||||
|
|
||||||
|
string = "";
|
||||||
|
|
||||||
|
if( groove >= 0 )
|
||||||
|
string << groove;
|
||||||
|
else
|
||||||
|
string << _( "Error" );
|
||||||
|
|
||||||
|
m_minGrooveWidth->SetValue( string );
|
||||||
|
|
||||||
|
string = "";
|
||||||
|
|
||||||
|
if( creepage >= 0 )
|
||||||
|
string << creepage;
|
||||||
|
else
|
||||||
|
string << _( "Error" );
|
||||||
|
|
||||||
|
m_creepage->SetValue( string );
|
||||||
|
|
||||||
|
string = "";
|
||||||
|
|
||||||
|
if( clearange >= 0 )
|
||||||
|
string << clearange;
|
||||||
|
else
|
||||||
|
string << _( "Error" );
|
||||||
|
|
||||||
|
m_clearance->SetValue( string );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_minGrooveWidth->SetValue( _( "Error" ) );
|
||||||
|
m_creepage->SetValue( _( "Error" ) );
|
||||||
|
m_clearance->SetValue( _( "Error" ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IEC60664::UpdateClearanceCreepage( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
CalculateClearanceCreepage();
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 1992-2023 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 3
|
||||||
|
* 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PANEL_ELECTRICAL_SPACING_IEC60664_H
|
||||||
|
#define PANEL_ELECTRICAL_SPACING_IEC60664_H
|
||||||
|
|
||||||
|
#include "panel_electrical_spacing_iec60664_base.h"
|
||||||
|
|
||||||
|
class PCB_CALCULATOR_SETTINGS;
|
||||||
|
|
||||||
|
|
||||||
|
class PANEL_ELECTRICAL_SPACING_IEC60664 : public PANEL_ELECTRICAL_SPACING_IEC60664_BASE
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PANEL_ELECTRICAL_SPACING_IEC60664( wxWindow* parent, wxWindowID id = wxID_ANY,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||||
|
~PANEL_ELECTRICAL_SPACING_IEC60664();
|
||||||
|
|
||||||
|
void UpdateTransientImpulse( wxCommandEvent& event ) override;
|
||||||
|
void UpdateClearanceCreepage( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
|
// Methods from CALCULATOR_PANEL that must be overridden
|
||||||
|
void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
|
||||||
|
void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
|
||||||
|
void ThemeChanged() override;
|
||||||
|
|
||||||
|
|
||||||
|
void CalculateTransientImpulse();
|
||||||
|
void CalculateClearanceCreepage();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,396 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "html_window.h"
|
||||||
|
|
||||||
|
#include "panel_electrical_spacing_iec60664_base.h"
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
PANEL_ELECTRICAL_SPACING_IEC60664_BASE::PANEL_ELECTRICAL_SPACING_IEC60664_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name )
|
||||||
|
{
|
||||||
|
wxBoxSizer* bSizer4;
|
||||||
|
bSizer4 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_scrolledWindow1 = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
|
||||||
|
m_scrolledWindow1->SetScrollRate( 5, 5 );
|
||||||
|
wxBoxSizer* bSizeMain;
|
||||||
|
bSizeMain = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_stTitle = new wxStaticText( m_scrolledWindow1, wxID_ANY, _("Insulation coordination for equipment within low-voltage supply systems"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_stTitle->Wrap( -1 );
|
||||||
|
bSizeMain->Add( m_stTitle, 0, wxALIGN_CENTER|wxALL, 15 );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbSizerTop;
|
||||||
|
sbSizerTop = new wxStaticBoxSizer( new wxStaticBox( m_scrolledWindow1, wxID_ANY, _("Determine the transient impulse voltage to withstand") ), wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerTopLeft;
|
||||||
|
bSizerTopLeft = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxFlexGridSizer* fgSizer111;
|
||||||
|
fgSizer111 = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||||
|
fgSizer111->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
|
m_staticText5211 = new wxStaticText( sbSizerTop->GetStaticBox(), wxID_ANY, _("Rated Voltage (RMS or DC):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText5211->Wrap( -1 );
|
||||||
|
m_staticText5211->SetToolTip( _("Voltage of the mains supply") );
|
||||||
|
|
||||||
|
fgSizer111->Add( m_staticText5211, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_ratedVoltage1 = new wxTextCtrl( sbSizerTop->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizer111->Add( m_ratedVoltage1, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticText52112 = new wxStaticText( sbSizerTop->GetStaticBox(), wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText52112->Wrap( -1 );
|
||||||
|
m_staticText52112->SetToolTip( _("OVC I: Equipments with no direct connection to mains supply\n\nOVC II: Energy-consming equipment to be supplied from the fixed installation. (eg: appliances, potable tools, household loads). OVCIII applys if there are reliability and avaibility requirements\n\nOVC III : Equipements in fixed installation with reliability and avaibility requirements. (eg: electrical switches, equipment for industrial use)\n\nOVC IV: Equipments at the origin of the installation (eg: electricity meters, primary overcurrent protection devices)") );
|
||||||
|
|
||||||
|
fgSizer111->Add( m_staticText52112, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText52111 = new wxStaticText( sbSizerTop->GetStaticBox(), wxID_ANY, _("Overvoltage category:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText52111->Wrap( -1 );
|
||||||
|
m_staticText52111->SetToolTip( _("OVC I: Equipments with no direct connection to mains supply\n\nOVC II: Energy-consming equipment to be supplied from the fixed installation. (eg: appliances, potable tools, household loads). OVCIII applys if there are reliability and avaibility requirements\n\nOVC III : Equipements in fixed installation with reliability and avaibility requirements. (eg: electrical switches, equipment for industrial use)\n\nOVC IV: Equipments at the origin of the installation (eg: electricity meters, primary overcurrent protection devices)") );
|
||||||
|
|
||||||
|
fgSizer111->Add( m_staticText52111, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_OVCchoiceChoices;
|
||||||
|
m_OVCchoice = new wxChoice( sbSizerTop->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_OVCchoiceChoices, 0 );
|
||||||
|
m_OVCchoice->SetSelection( 0 );
|
||||||
|
fgSizer111->Add( m_OVCchoice, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerTopLeft->Add( fgSizer111, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerTopLeft->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
sbSizerTop->Add( bSizerTopLeft, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_OVC = new wxStaticLine( sbSizerTop->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
||||||
|
sbSizerTop->Add( m_OVC, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerTopRight;
|
||||||
|
bSizerTopRight = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxFlexGridSizer* fgSizerTopRight;
|
||||||
|
fgSizerTopRight = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||||
|
fgSizerTopRight->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizerTopRight->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
|
m_staticText111111 = new wxStaticText( sbSizerTop->GetStaticBox(), wxID_ANY, _("Impulse voltage:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText111111->Wrap( -1 );
|
||||||
|
m_staticText111111->SetToolTip( _("Given the rated voltage and the overvoltage category, a device should withstand this value whithout a breakdown of insulation. This impulse voltage is a standard 1.2/50µs wave") );
|
||||||
|
|
||||||
|
fgSizerTopRight->Add( m_staticText111111, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_impulseVotlage1TxtCtrl = new wxTextCtrl( sbSizerTop->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_impulseVotlage1TxtCtrl->Enable( false );
|
||||||
|
|
||||||
|
fgSizerTopRight->Add( m_impulseVotlage1TxtCtrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
static_textkV = new wxStaticText( sbSizerTop->GetStaticBox(), wxID_ANY, _("kV"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
static_textkV->Wrap( -1 );
|
||||||
|
static_textkV->SetToolTip( _("A groove with a smaller width has no effect on the path for clearance distances.") );
|
||||||
|
|
||||||
|
fgSizerTopRight->Add( static_textkV, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerTopRight->Add( fgSizerTopRight, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
sbSizerTop->Add( bSizerTopRight, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizeMain->Add( sbSizerTop, 0, wxALL|wxEXPAND, 15 );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbSizerMiddle;
|
||||||
|
sbSizerMiddle = new wxStaticBoxSizer( new wxStaticBox( m_scrolledWindow1, wxID_ANY, _("Compute the clearance and creepage distances") ), wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerMiddleLeft;
|
||||||
|
bSizerMiddleLeft = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxFlexGridSizer* fgSizer11;
|
||||||
|
fgSizer11 = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||||
|
fgSizer11->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
|
m_staticText11 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("RMS Voltage:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText11->Wrap( -1 );
|
||||||
|
m_staticText11->SetToolTip( _("Expected RMS voltage.") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_RMSVoltage = new wxTextCtrl( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizer11->Add( m_RMSVoltage, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticText11212 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText11212->Wrap( -1 );
|
||||||
|
m_staticText11212->SetToolTip( _("Functional: inuslation is necessary only for the functioning of the equipment\n\nBasic: Insulation of hazardous-live parts.\n\nReinforced: Single insulation that provides a degree of protection equivalent to a double insulation. ( which is two separate basic insulations, in case one of them fails ).") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_staticText11212, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText114 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("Transient overvoltage:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText114->Wrap( -1 );
|
||||||
|
m_staticText114->SetToolTip( _("Transient overvoltages due to:\n\n- Atmospheric disturbances transmitted by the mains supply (eg: a lightning strike)\n- Switching loads in the main supplys\n- External circuits\n- Internal generation\n\nEvents that last for a few milliseconds or less.") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_staticText114, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_transientOvervoltage = new wxTextCtrl( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizer11->Add( m_transientOvervoltage, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticText1121 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("kV"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText1121->Wrap( -1 );
|
||||||
|
m_staticText1121->SetToolTip( _("Functional: inuslation is necessary only for the functioning of the equipment\n\nBasic: Insulation of hazardous-live parts.\n\nReinforced: Single insulation that provides a degree of protection equivalent to a double insulation. ( which is two separate basic insulations, in case one of them fails ).") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_staticText1121, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText113 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("Recurring peak voltage:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText113->Wrap( -1 );
|
||||||
|
m_staticText113->SetToolTip( _("- Steady-state voltage value\n- Temporary overvoltage\n- Recurring peak voltage\n\nEvents of relatively long duration.") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_staticText113, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_peakVoltage = new wxTextCtrl( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizer11->Add( m_peakVoltage, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticText11211 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("kV"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText11211->Wrap( -1 );
|
||||||
|
m_staticText11211->SetToolTip( _("Functional: inuslation is necessary only for the functioning of the equipment\n\nBasic: Insulation of hazardous-live parts.\n\nReinforced: Single insulation that provides a degree of protection equivalent to a double insulation. ( which is two separate basic insulations, in case one of them fails ).") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_staticText11211, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText112 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("Type of insulation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText112->Wrap( -1 );
|
||||||
|
m_staticText112->SetToolTip( _("Functional: inuslation is necessary only for the functioning of the equipment\n\nBasic: Insulation of hazardous-live parts.\n\nReinforced: Single insulation that provides a degree of protection equivalent to a double insulation. ( which is two separate basic insulations, in case one of them fails ).") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_staticText112, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_insulationTypeChoices;
|
||||||
|
m_insulationType = new wxChoice( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_insulationTypeChoices, 0 );
|
||||||
|
m_insulationType->SetSelection( 0 );
|
||||||
|
fgSizer11->Add( m_insulationType, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
fgSizer11->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticText52 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("Pollution Degree:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText52->Wrap( -1 );
|
||||||
|
m_staticText52->SetToolTip( _("PD1: No pollution or only dry, non-conductive pollution occurs\n\nPD2: Only non-conductive pollution occurs . Condensation may occur.\n\nPD3: Conductive pollution occurs, or non-conductive pollution occurs which becomes conductive due to expected condensation.\n\nPD4: Continous conductivity occurs due to conductive dust, rain, ...") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_staticText52, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_pollutionDegreeChoices;
|
||||||
|
m_pollutionDegree = new wxChoice( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pollutionDegreeChoices, 0 );
|
||||||
|
m_pollutionDegree->SetSelection( 0 );
|
||||||
|
fgSizer11->Add( m_pollutionDegree, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
fgSizer11->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_materialGroupTxt = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("Material group:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_materialGroupTxt->Wrap( -1 );
|
||||||
|
m_materialGroupTxt->SetToolTip( _("Materials with a high comparative tracking index (CTI) are better at providing isolation.\n\nMaterial group I: 600 <= CTI\nMaterial group II: 400 <= CTI < 600\nMaterial group IIIa: 175 <= CTI < 400\nMaterial group IIIb: 100 <= CTI < 175") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_materialGroupTxt, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_materialGroupChoices;
|
||||||
|
m_materialGroup = new wxChoice( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_materialGroupChoices, 0 );
|
||||||
|
m_materialGroup->SetSelection( 0 );
|
||||||
|
fgSizer11->Add( m_materialGroup, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
fgSizer11->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticText1112 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("PCB material:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText1112->Wrap( -1 );
|
||||||
|
m_staticText1112->SetToolTip( _("Printed wiring mateiral can benefit of a creepage distance reduction for RMS voltages lower than 1000V") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_staticText1112, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_pcbMaterial = new wxCheckBox( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizer11->Add( m_pcbMaterial, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
fgSizer11->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticText1112121 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("Max altitude:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText1112121->Wrap( -1 );
|
||||||
|
m_staticText1112121->SetToolTip( _("Coating and potting allows for clearange and creepace distances reduction.Not supported by the calculator.\n\nA coating that could easily delaminate in the lifespan of the product (such as a soldermask) should not be considered for a reduction.") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_staticText1112121, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_altitude = new wxTextCtrl( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizer11->Add( m_altitude, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticText11121211 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("m"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText11121211->Wrap( -1 );
|
||||||
|
m_staticText11121211->SetToolTip( _("Coating and potting allows for clearange and creepace distances reduction.Not supported by the calculator.\n\nA coating that could easily delaminate in the lifespan of the product (such as a soldermask) should not be considered for a reduction.") );
|
||||||
|
|
||||||
|
fgSizer11->Add( m_staticText11121211, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerMiddleLeft->Add( fgSizer11, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerMiddleLeft->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
sbSizerMiddle->Add( bSizerMiddleLeft, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticline31 = new wxStaticLine( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
||||||
|
sbSizerMiddle->Add( m_staticline31, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerMiddleRight;
|
||||||
|
bSizerMiddleRight = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerMiddleRightInfo;
|
||||||
|
bSizerMiddleRightInfo = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxFlexGridSizer* fgSizer6;
|
||||||
|
fgSizer6 = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||||
|
fgSizer6->AddGrowableCol( 1 );
|
||||||
|
fgSizer6->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
|
m_staticText11111 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("Clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText11111->Wrap( -1 );
|
||||||
|
fgSizer6->Add( m_staticText11111, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_clearance = new wxTextCtrl( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_clearance->Enable( false );
|
||||||
|
|
||||||
|
fgSizer6->Add( m_clearance, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText71111 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText71111->Wrap( -1 );
|
||||||
|
m_staticText71111->SetToolTip( _("A groove with a smaller width has no effect on the path for clearance distances.") );
|
||||||
|
|
||||||
|
fgSizer6->Add( m_staticText71111, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText1111 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("Creepage:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText1111->Wrap( -1 );
|
||||||
|
fgSizer6->Add( m_staticText1111, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_creepage = new wxTextCtrl( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_creepage->Enable( false );
|
||||||
|
|
||||||
|
fgSizer6->Add( m_creepage, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText7111 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText7111->Wrap( -1 );
|
||||||
|
m_staticText7111->SetToolTip( _("A groove with a smaller width has no effect on the path for clearance distances.") );
|
||||||
|
|
||||||
|
fgSizer6->Add( m_staticText7111, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText111 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("Min groove width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText111->Wrap( -1 );
|
||||||
|
m_staticText111->SetToolTip( _("A groove which width is smaller has no effect on the path considered for creepage") );
|
||||||
|
|
||||||
|
fgSizer6->Add( m_staticText111, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_minGrooveWidth = new wxTextCtrl( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_minGrooveWidth->Enable( false );
|
||||||
|
|
||||||
|
fgSizer6->Add( m_minGrooveWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText711 = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText711->Wrap( -1 );
|
||||||
|
m_staticText711->SetToolTip( _("A groove with a smaller width has no effect on the path for clearance distances.") );
|
||||||
|
|
||||||
|
fgSizer6->Add( m_staticText711, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerMiddleRightInfo->Add( fgSizer6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerMiddleRight->Add( bSizerMiddleRightInfo, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerBitmapHelp;
|
||||||
|
bSizerBitmapHelp = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_staticline3 = new wxStaticLine( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
bSizerBitmapHelp->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerBitmap;
|
||||||
|
bSizerBitmap = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
m_creepageclearanceBitmap = new wxStaticBitmap( sbSizerMiddle->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bSizerBitmap->Add( m_creepageclearanceBitmap, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_stBitmapLegend = new wxStaticText( sbSizerMiddle->GetStaticBox(), wxID_ANY, _("solid: clearance\ndashed: creepage"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_stBitmapLegend->Wrap( -1 );
|
||||||
|
bSizerBitmap->Add( m_stBitmapLegend, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerBitmapHelp->Add( bSizerBitmap, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerMiddleRight->Add( bSizerBitmapHelp, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
sbSizerMiddle->Add( bSizerMiddleRight, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizeMain->Add( sbSizerMiddle, 0, wxALL|wxEXPAND, 15 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerBottom;
|
||||||
|
bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbSizer3;
|
||||||
|
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_scrolledWindow1, wxID_ANY, _("Help") ), wxVERTICAL );
|
||||||
|
|
||||||
|
sbSizer3->SetMinSize( wxSize( -1,100 ) );
|
||||||
|
m_panelHelp = new HTML_WINDOW( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
|
||||||
|
m_panelHelp->SetMinSize( wxSize( -1,-200 ) );
|
||||||
|
|
||||||
|
sbSizer3->Add( m_panelHelp, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerBottom->Add( sbSizer3, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizeMain->Add( bSizerBottom, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
m_scrolledWindow1->SetSizer( bSizeMain );
|
||||||
|
m_scrolledWindow1->Layout();
|
||||||
|
bSizeMain->Fit( m_scrolledWindow1 );
|
||||||
|
bSizer4->Add( m_scrolledWindow1, 1, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
this->SetSizer( bSizer4 );
|
||||||
|
this->Layout();
|
||||||
|
|
||||||
|
// Connect Events
|
||||||
|
m_ratedVoltage1->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateTransientImpulse ), NULL, this );
|
||||||
|
m_OVCchoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateTransientImpulse ), NULL, this );
|
||||||
|
m_RMSVoltage->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_transientOvervoltage->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_peakVoltage->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_insulationType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_pollutionDegree->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_materialGroup->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_pcbMaterial->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_altitude->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
PANEL_ELECTRICAL_SPACING_IEC60664_BASE::~PANEL_ELECTRICAL_SPACING_IEC60664_BASE()
|
||||||
|
{
|
||||||
|
// Disconnect Events
|
||||||
|
m_ratedVoltage1->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateTransientImpulse ), NULL, this );
|
||||||
|
m_OVCchoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateTransientImpulse ), NULL, this );
|
||||||
|
m_RMSVoltage->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_transientOvervoltage->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_peakVoltage->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_insulationType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_pollutionDegree->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_materialGroup->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_pcbMaterial->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
m_altitude->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IEC60664_BASE::UpdateClearanceCreepage ), NULL, this );
|
||||||
|
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,105 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <wx/artprov.h>
|
||||||
|
#include <wx/xrc/xmlres.h>
|
||||||
|
#include <wx/intl.h>
|
||||||
|
class HTML_WINDOW;
|
||||||
|
|
||||||
|
#include "calculator_panels/calculator_panel.h"
|
||||||
|
#include <wx/string.h>
|
||||||
|
#include <wx/stattext.h>
|
||||||
|
#include <wx/gdicmn.h>
|
||||||
|
#include <wx/font.h>
|
||||||
|
#include <wx/colour.h>
|
||||||
|
#include <wx/settings.h>
|
||||||
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/choice.h>
|
||||||
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/statline.h>
|
||||||
|
#include <wx/statbox.h>
|
||||||
|
#include <wx/checkbox.h>
|
||||||
|
#include <wx/bitmap.h>
|
||||||
|
#include <wx/image.h>
|
||||||
|
#include <wx/icon.h>
|
||||||
|
#include <wx/statbmp.h>
|
||||||
|
#include <wx/html/htmlwin.h>
|
||||||
|
#include <wx/scrolwin.h>
|
||||||
|
#include <wx/panel.h>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Class PANEL_ELECTRICAL_SPACING_IEC60664_BASE
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
class PANEL_ELECTRICAL_SPACING_IEC60664_BASE : public CALCULATOR_PANEL
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxScrolledWindow* m_scrolledWindow1;
|
||||||
|
wxStaticText* m_stTitle;
|
||||||
|
wxStaticText* m_staticText5211;
|
||||||
|
wxTextCtrl* m_ratedVoltage1;
|
||||||
|
wxStaticText* m_staticText52112;
|
||||||
|
wxStaticText* m_staticText52111;
|
||||||
|
wxChoice* m_OVCchoice;
|
||||||
|
wxStaticLine* m_OVC;
|
||||||
|
wxStaticText* m_staticText111111;
|
||||||
|
wxTextCtrl* m_impulseVotlage1TxtCtrl;
|
||||||
|
wxStaticText* static_textkV;
|
||||||
|
wxStaticText* m_staticText11;
|
||||||
|
wxTextCtrl* m_RMSVoltage;
|
||||||
|
wxStaticText* m_staticText11212;
|
||||||
|
wxStaticText* m_staticText114;
|
||||||
|
wxTextCtrl* m_transientOvervoltage;
|
||||||
|
wxStaticText* m_staticText1121;
|
||||||
|
wxStaticText* m_staticText113;
|
||||||
|
wxTextCtrl* m_peakVoltage;
|
||||||
|
wxStaticText* m_staticText11211;
|
||||||
|
wxStaticText* m_staticText112;
|
||||||
|
wxChoice* m_insulationType;
|
||||||
|
wxStaticText* m_staticText52;
|
||||||
|
wxChoice* m_pollutionDegree;
|
||||||
|
wxStaticText* m_materialGroupTxt;
|
||||||
|
wxChoice* m_materialGroup;
|
||||||
|
wxStaticText* m_staticText1112;
|
||||||
|
wxCheckBox* m_pcbMaterial;
|
||||||
|
wxStaticText* m_staticText1112121;
|
||||||
|
wxTextCtrl* m_altitude;
|
||||||
|
wxStaticText* m_staticText11121211;
|
||||||
|
wxStaticLine* m_staticline31;
|
||||||
|
wxStaticText* m_staticText11111;
|
||||||
|
wxTextCtrl* m_clearance;
|
||||||
|
wxStaticText* m_staticText71111;
|
||||||
|
wxStaticText* m_staticText1111;
|
||||||
|
wxTextCtrl* m_creepage;
|
||||||
|
wxStaticText* m_staticText7111;
|
||||||
|
wxStaticText* m_staticText111;
|
||||||
|
wxTextCtrl* m_minGrooveWidth;
|
||||||
|
wxStaticText* m_staticText711;
|
||||||
|
wxStaticLine* m_staticline3;
|
||||||
|
wxStaticBitmap* m_creepageclearanceBitmap;
|
||||||
|
wxStaticText* m_stBitmapLegend;
|
||||||
|
HTML_WINDOW* m_panelHelp;
|
||||||
|
|
||||||
|
// Virtual event handlers, override them in your derived class
|
||||||
|
virtual void UpdateTransientImpulse( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void UpdateClearanceCreepage( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
PANEL_ELECTRICAL_SPACING_IEC60664_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 699,561 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||||
|
|
||||||
|
~PANEL_ELECTRICAL_SPACING_IEC60664_BASE();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,197 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011 jean-pierre.charras
|
||||||
|
* Copyright (C) 1992-2021 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 3
|
||||||
|
* 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* see
|
||||||
|
* http://www.desmith.net/NMdS/Electronics/TraceWidth.html
|
||||||
|
* http://www.ultracad.com/articles/pcbtemp.pdf
|
||||||
|
* for more info
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <calculator_panels/panel_electrical_spacing_ipc2221.h>
|
||||||
|
#include <pcb_calculator_settings.h>
|
||||||
|
#include <string_utils.h>
|
||||||
|
#include <widgets/unit_selector.h>
|
||||||
|
#include <units_scales.h>
|
||||||
|
|
||||||
|
extern double DoubleFromString( const wxString& TextValue );
|
||||||
|
|
||||||
|
// The IPC2221 formula used to calculate track width is valid only for copper material
|
||||||
|
const double copper_resistivity = 1.72e-8;
|
||||||
|
|
||||||
|
|
||||||
|
#define VALUE_COUNT 7
|
||||||
|
#define CLASS_COUNT 10
|
||||||
|
|
||||||
|
/* These values come from IPC2221
|
||||||
|
* there are 10 voltage classes:
|
||||||
|
* "0 ... 15V" "16 ... 30V" "31 ... 50V" "51 ... 100V"
|
||||||
|
* "101 ... 150V" "151 ... 170V" "171 ... 250V"
|
||||||
|
* "251 ... 300V" "301 ... 500V" " > 500V"
|
||||||
|
* and for each voltage class
|
||||||
|
* there ar e 7 cases:
|
||||||
|
* "B1" "B2" "B3" "B4" "A5" "A6" "A7"
|
||||||
|
* B1 - Internal Conductors
|
||||||
|
* B2 - External Conductors, uncoated, sea level to 3050 m
|
||||||
|
* B3 - External Conductors, uncoated, over 3050 m
|
||||||
|
* B4 - External Conductors, with permanent polymer coating (any elevation)
|
||||||
|
* A5 - External Conductors, with conformal coating over assembly (any elevation)
|
||||||
|
* A6 - External Component lead/termination, uncoated
|
||||||
|
* A7 - External Component lead termination, with conformal coating (any elevation)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* For voltages greater than 500V, the (per volt) table values
|
||||||
|
* must be added to the 500V values. For example, the elec-
|
||||||
|
* trical spacing for a Type B1 board with 600V is calculated
|
||||||
|
* as:
|
||||||
|
* 600V - 500V = 100V
|
||||||
|
* 0.25 mm + (100V x 0.0025
|
||||||
|
*/
|
||||||
|
static double clist[CLASS_COUNT][VALUE_COUNT] =
|
||||||
|
{
|
||||||
|
{ 0.05 * UNIT_MM, 0.1 * UNIT_MM, 0.1 * UNIT_MM, 0.05 * UNIT_MM, 0.13 * UNIT_MM, 0.13 *
|
||||||
|
UNIT_MM,
|
||||||
|
0.13 * UNIT_MM }, // 0 ... 15V
|
||||||
|
|
||||||
|
{ 0.05 * UNIT_MM, 0.1 * UNIT_MM, 0.1 * UNIT_MM, 0.05 * UNIT_MM, 0.13 * UNIT_MM, 0.25 *
|
||||||
|
UNIT_MM,
|
||||||
|
0.13 * UNIT_MM }, // 16 ... 30V
|
||||||
|
|
||||||
|
{ 0.1 * UNIT_MM, 0.6 * UNIT_MM, 0.6 * UNIT_MM, 0.13 * UNIT_MM, 0.13 * UNIT_MM, 0.4 *
|
||||||
|
UNIT_MM,
|
||||||
|
0.13 * UNIT_MM }, // 31 ... 50V
|
||||||
|
|
||||||
|
{ 0.1 * UNIT_MM, 0.6 * UNIT_MM, 1.5 * UNIT_MM, 0.13 * UNIT_MM, 0.13 * UNIT_MM, 0.5 *
|
||||||
|
UNIT_MM,
|
||||||
|
0.13 * UNIT_MM }, // 51 ... 100V
|
||||||
|
|
||||||
|
{ 0.2 * UNIT_MM, 0.6 * UNIT_MM, 3.2 * UNIT_MM, 0.4 * UNIT_MM, 0.4 * UNIT_MM, 0.8 *
|
||||||
|
UNIT_MM,
|
||||||
|
0.4 * UNIT_MM }, // 101 ... 150V
|
||||||
|
|
||||||
|
{ 0.2 * UNIT_MM, 1.25 * UNIT_MM, 3.2 * UNIT_MM, 0.4 * UNIT_MM, 0.4 * UNIT_MM, 0.8 *
|
||||||
|
UNIT_MM,
|
||||||
|
0.4 * UNIT_MM }, // 151 ... 170V
|
||||||
|
|
||||||
|
{ 0.2 * UNIT_MM, 1.25 * UNIT_MM, 6.4 * UNIT_MM, 0.4 * UNIT_MM, 0.4 * UNIT_MM, 0.8 *
|
||||||
|
UNIT_MM,
|
||||||
|
0.4 * UNIT_MM }, // 171 ... 250V
|
||||||
|
|
||||||
|
{ 0.2 * UNIT_MM, 1.25 * UNIT_MM, 12.5 * UNIT_MM, 0.4 * UNIT_MM, 0.4 * UNIT_MM, 0.8 *
|
||||||
|
UNIT_MM,
|
||||||
|
0.8 * UNIT_MM }, // 251 ... 300V
|
||||||
|
|
||||||
|
{ 0.25 * UNIT_MM, 2.5 * UNIT_MM, 12.5 * UNIT_MM, 0.8 * UNIT_MM, 0.8 * UNIT_MM, 1.5 *
|
||||||
|
UNIT_MM,
|
||||||
|
0.8 * UNIT_MM }, // 301 ... 500V
|
||||||
|
|
||||||
|
// These last values are used to calculate spacing for voltage > 500V
|
||||||
|
// there are not the spacing
|
||||||
|
{ 0.0025 * UNIT_MM, 0.005 * UNIT_MM, 0.025 * UNIT_MM, 0.00305 * UNIT_MM,
|
||||||
|
0.00305 * UNIT_MM, 0.00305 * UNIT_MM, 0.00305 * UNIT_MM }, // > 500V
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
PANEL_ELECTRICAL_SPACING_IPC2221::PANEL_ELECTRICAL_SPACING_IPC2221( wxWindow* parent, wxWindowID id,
|
||||||
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style, const wxString& name ) :
|
||||||
|
PANEL_ELECTRICAL_SPACING_IPC2221_BASE( parent, id, pos, size, style, name )
|
||||||
|
{
|
||||||
|
// Autosize the row label column to be sure label are not truncated
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelSize( wxGRID_AUTOSIZE );
|
||||||
|
|
||||||
|
// Needed on wxWidgets 3.0 to ensure sizers are correctly set
|
||||||
|
GetSizer()->SetSizeHints( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PANEL_ELECTRICAL_SPACING_IPC2221::~PANEL_ELECTRICAL_SPACING_IPC2221()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IPC2221::ThemeChanged()
|
||||||
|
{
|
||||||
|
// TODO: Only the grid needs updating, but it isn't done automatically (https://trac.wxwidgets.org/ticket/19279)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IPC2221::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg )
|
||||||
|
{
|
||||||
|
aCfg->m_Electrical.spacing_units = m_ElectricalSpacingUnitsSelector->GetSelection();
|
||||||
|
aCfg->m_Electrical.spacing_voltage = m_ElectricalSpacingVoltage->GetValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IPC2221::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg )
|
||||||
|
{
|
||||||
|
m_ElectricalSpacingUnitsSelector->SetSelection( aCfg->m_Electrical.spacing_units );
|
||||||
|
m_ElectricalSpacingVoltage->SetValue( aCfg->m_Electrical.spacing_voltage );
|
||||||
|
|
||||||
|
ElectricalSpacingUpdateData( m_ElectricalSpacingUnitsSelector->GetUnitScale() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IPC2221::OnElectricalSpacingUnitsSelection( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
ElectricalSpacingUpdateData( m_ElectricalSpacingUnitsSelector->GetUnitScale() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IPC2221::OnElectricalSpacingRefresh( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
ElectricalSpacingUpdateData( m_ElectricalSpacingUnitsSelector->GetUnitScale() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_ELECTRICAL_SPACING_IPC2221::ElectricalSpacingUpdateData( double aUnitScale )
|
||||||
|
{
|
||||||
|
wxString txt;
|
||||||
|
double voltage = 500.0; // to calculate values at V > 500V
|
||||||
|
txt = m_ElectricalSpacingVoltage->GetValue();
|
||||||
|
|
||||||
|
if( ! txt.IsEmpty() )
|
||||||
|
voltage = DoubleFromString( txt );
|
||||||
|
|
||||||
|
if( voltage < 500.0 )
|
||||||
|
voltage = 500.0;
|
||||||
|
|
||||||
|
txt.Printf( wxT( "%g" ), voltage );
|
||||||
|
m_ElectricalSpacingVoltage->SetValue( txt );
|
||||||
|
|
||||||
|
for( int ii = 0; ii < CLASS_COUNT-1; ii++ )
|
||||||
|
{
|
||||||
|
for( int jj = 0; jj < VALUE_COUNT; jj++ )
|
||||||
|
{
|
||||||
|
txt.Printf( wxT( "%g" ), clist[ii][jj] / aUnitScale );
|
||||||
|
m_gridElectricalSpacingValues->SetCellValue( ii, jj, txt );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for( int jj = 0; jj < VALUE_COUNT; jj++ )
|
||||||
|
{
|
||||||
|
double spacing = clist[CLASS_COUNT-2][jj];
|
||||||
|
double spacing_extra = clist[CLASS_COUNT-1][jj];
|
||||||
|
spacing += spacing_extra * ( voltage - 500.0 );
|
||||||
|
txt.Printf( wxT( "%g" ), spacing / aUnitScale );
|
||||||
|
m_gridElectricalSpacingValues->SetCellValue( CLASS_COUNT-1, jj, txt );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelSize( wxGRID_AUTOSIZE );
|
||||||
|
}
|
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 1992-2023 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 3
|
||||||
|
* 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PANEL_ELECTRICAL_SPACING_IPC2221_H
|
||||||
|
#define PANEL_ELECTRICAL_SPACING_IPC2221_H
|
||||||
|
|
||||||
|
#include "panel_electrical_spacing_ipc2221_base.h"
|
||||||
|
|
||||||
|
class PCB_CALCULATOR_SETTINGS;
|
||||||
|
|
||||||
|
|
||||||
|
class PANEL_ELECTRICAL_SPACING_IPC2221 : public PANEL_ELECTRICAL_SPACING_IPC2221_BASE
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PANEL_ELECTRICAL_SPACING_IPC2221( wxWindow* parent, wxWindowID id = wxID_ANY,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||||
|
~PANEL_ELECTRICAL_SPACING_IPC2221();
|
||||||
|
|
||||||
|
// Methods from CALCULATOR_PANEL that must be overridden
|
||||||
|
void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
|
||||||
|
void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
|
||||||
|
void ThemeChanged() override;
|
||||||
|
|
||||||
|
void OnElectricalSpacingUnitsSelection( wxCommandEvent& event ) override;
|
||||||
|
void OnElectricalSpacingRefresh( wxCommandEvent& event ) override;
|
||||||
|
void ElectricalSpacingUpdateData( double aUnitScale );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,139 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "widgets/unit_selector.h"
|
||||||
|
|
||||||
|
#include "panel_electrical_spacing_ipc2221_base.h"
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
PANEL_ELECTRICAL_SPACING_IPC2221_BASE::PANEL_ELECTRICAL_SPACING_IPC2221_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name )
|
||||||
|
{
|
||||||
|
wxBoxSizer* bSizerElectricalClearance;
|
||||||
|
bSizerElectricalClearance = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bLeftSizerElectricalClearance;
|
||||||
|
bLeftSizerElectricalClearance = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_stSpacingUnit = new wxStaticText( this, wxID_ANY, _("Unit:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_stSpacingUnit->Wrap( -1 );
|
||||||
|
bLeftSizerElectricalClearance->Add( m_stSpacingUnit, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_ElectricalSpacingUnitsSelectorChoices;
|
||||||
|
m_ElectricalSpacingUnitsSelector = new UNIT_SELECTOR_LEN( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ElectricalSpacingUnitsSelectorChoices, 0 );
|
||||||
|
m_ElectricalSpacingUnitsSelector->SetSelection( -1 );
|
||||||
|
m_ElectricalSpacingUnitsSelector->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_LIGHT, false, wxEmptyString ) );
|
||||||
|
|
||||||
|
bLeftSizerElectricalClearance->Add( m_ElectricalSpacingUnitsSelector, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
|
||||||
|
|
||||||
|
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
bLeftSizerElectricalClearance->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
|
||||||
|
|
||||||
|
m_stVoltage = new wxStaticText( this, wxID_ANY, _("Voltage > 500 V:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_stVoltage->Wrap( -1 );
|
||||||
|
bLeftSizerElectricalClearance->Add( m_stVoltage, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_ElectricalSpacingVoltage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bLeftSizerElectricalClearance->Add( m_ElectricalSpacingVoltage, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_buttonElectSpacingRefresh = new wxButton( this, wxID_ANY, _("Update Values"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bLeftSizerElectricalClearance->Add( m_buttonElectSpacingRefresh, 0, wxEXPAND|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerElectricalClearance->Add( bLeftSizerElectricalClearance, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_electricalSpacingSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_staticTextElectricalSpacing = new wxStaticText( this, wxID_ANY, _("Note: Values are minimal values (from IPC 2221)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextElectricalSpacing->Wrap( -1 );
|
||||||
|
m_staticTextElectricalSpacing->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||||
|
|
||||||
|
m_electricalSpacingSizer->Add( m_staticTextElectricalSpacing, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_gridElectricalSpacingValues = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
||||||
|
// Grid
|
||||||
|
m_gridElectricalSpacingValues->CreateGrid( 10, 7 );
|
||||||
|
m_gridElectricalSpacingValues->EnableEditing( false );
|
||||||
|
m_gridElectricalSpacingValues->EnableGridLines( true );
|
||||||
|
m_gridElectricalSpacingValues->EnableDragGridSize( false );
|
||||||
|
m_gridElectricalSpacingValues->SetMargins( 0, 0 );
|
||||||
|
|
||||||
|
// Columns
|
||||||
|
m_gridElectricalSpacingValues->SetColSize( 0, 100 );
|
||||||
|
m_gridElectricalSpacingValues->SetColSize( 1, 100 );
|
||||||
|
m_gridElectricalSpacingValues->SetColSize( 2, 100 );
|
||||||
|
m_gridElectricalSpacingValues->SetColSize( 3, 100 );
|
||||||
|
m_gridElectricalSpacingValues->SetColSize( 4, 100 );
|
||||||
|
m_gridElectricalSpacingValues->SetColSize( 5, 100 );
|
||||||
|
m_gridElectricalSpacingValues->SetColSize( 6, 100 );
|
||||||
|
m_gridElectricalSpacingValues->EnableDragColMove( false );
|
||||||
|
m_gridElectricalSpacingValues->EnableDragColSize( true );
|
||||||
|
m_gridElectricalSpacingValues->SetColLabelValue( 0, _("B1") );
|
||||||
|
m_gridElectricalSpacingValues->SetColLabelValue( 1, _("B2") );
|
||||||
|
m_gridElectricalSpacingValues->SetColLabelValue( 2, _("B3") );
|
||||||
|
m_gridElectricalSpacingValues->SetColLabelValue( 3, _("B4") );
|
||||||
|
m_gridElectricalSpacingValues->SetColLabelValue( 4, _("A5") );
|
||||||
|
m_gridElectricalSpacingValues->SetColLabelValue( 5, _("A6") );
|
||||||
|
m_gridElectricalSpacingValues->SetColLabelValue( 6, _("A7") );
|
||||||
|
m_gridElectricalSpacingValues->SetColLabelSize( 30 );
|
||||||
|
m_gridElectricalSpacingValues->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
|
|
||||||
|
// Rows
|
||||||
|
m_gridElectricalSpacingValues->SetRowSize( 0, 24 );
|
||||||
|
m_gridElectricalSpacingValues->SetRowSize( 1, 24 );
|
||||||
|
m_gridElectricalSpacingValues->SetRowSize( 2, 24 );
|
||||||
|
m_gridElectricalSpacingValues->SetRowSize( 3, 24 );
|
||||||
|
m_gridElectricalSpacingValues->SetRowSize( 4, 24 );
|
||||||
|
m_gridElectricalSpacingValues->SetRowSize( 5, 24 );
|
||||||
|
m_gridElectricalSpacingValues->SetRowSize( 6, 24 );
|
||||||
|
m_gridElectricalSpacingValues->SetRowSize( 7, 24 );
|
||||||
|
m_gridElectricalSpacingValues->SetRowSize( 8, 24 );
|
||||||
|
m_gridElectricalSpacingValues->SetRowSize( 9, 24 );
|
||||||
|
m_gridElectricalSpacingValues->EnableDragRowSize( false );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelValue( 0, _("0 .. 15 V") );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelValue( 1, _("16 .. 30 V") );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelValue( 2, _("31 .. 50 V") );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelValue( 3, _("51 .. 100 V") );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelValue( 4, _("101 .. 150 V") );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelValue( 5, _("151 .. 170 V") );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelValue( 6, _("171 .. 250 V") );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelValue( 7, _("251 .. 300 V") );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelValue( 8, _("301 .. 500 V") );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelValue( 9, _(" > 500 V") );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelSize( 100 );
|
||||||
|
m_gridElectricalSpacingValues->SetRowLabelAlignment( wxALIGN_RIGHT, wxALIGN_CENTER );
|
||||||
|
|
||||||
|
// Label Appearance
|
||||||
|
|
||||||
|
// Cell Defaults
|
||||||
|
m_gridElectricalSpacingValues->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_TOP );
|
||||||
|
m_electricalSpacingSizer->Add( m_gridElectricalSpacingValues, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_stHelp = new wxStaticText( this, wxID_ANY, _("* B1 - Internal Conductors\n* B2 - External Conductors, uncoated, sea level to 3050 m\n* B3 - External Conductors, uncoated, over 3050 m\n* B4 - External Conductors, with permanent polymer coating (any elevation)\n* A5 - External Conductors, with conformal coating over assembly (any elevation)\n* A6 - External Component lead/termination, uncoated\n* A7 - External Component lead termination, with conformal coating (any elevation)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_stHelp->Wrap( -1 );
|
||||||
|
m_electricalSpacingSizer->Add( m_stHelp, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerElectricalClearance->Add( m_electricalSpacingSizer, 1, wxEXPAND|wxLEFT, 20 );
|
||||||
|
|
||||||
|
|
||||||
|
this->SetSizer( bSizerElectricalClearance );
|
||||||
|
this->Layout();
|
||||||
|
|
||||||
|
// Connect Events
|
||||||
|
m_ElectricalSpacingUnitsSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IPC2221_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
||||||
|
m_buttonElectSpacingRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IPC2221_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
PANEL_ELECTRICAL_SPACING_IPC2221_BASE::~PANEL_ELECTRICAL_SPACING_IPC2221_BASE()
|
||||||
|
{
|
||||||
|
// Disconnect Events
|
||||||
|
m_ElectricalSpacingUnitsSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IPC2221_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
||||||
|
m_buttonElectSpacingRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_IPC2221_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,688 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<wxFormBuilder_Project>
|
||||||
|
<FileVersion major="1" minor="16" />
|
||||||
|
<object class="Project" expanded="1">
|
||||||
|
<property name="class_decoration"></property>
|
||||||
|
<property name="code_generation">C++</property>
|
||||||
|
<property name="disconnect_events">1</property>
|
||||||
|
<property name="disconnect_mode">source_name</property>
|
||||||
|
<property name="disconnect_php_events">0</property>
|
||||||
|
<property name="disconnect_python_events">0</property>
|
||||||
|
<property name="embedded_files_path">res</property>
|
||||||
|
<property name="encoding">UTF-8</property>
|
||||||
|
<property name="event_generation">connect</property>
|
||||||
|
<property name="file">panel_electrical_spacing_ipc2221_base</property>
|
||||||
|
<property name="first_id">1000</property>
|
||||||
|
<property name="help_provider">none</property>
|
||||||
|
<property name="image_path_wrapper_function_name"></property>
|
||||||
|
<property name="indent_with_spaces"></property>
|
||||||
|
<property name="internationalize">1</property>
|
||||||
|
<property name="name">panel_electrical_spacing_ipc2221_base</property>
|
||||||
|
<property name="namespace"></property>
|
||||||
|
<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_array_enum">0</property>
|
||||||
|
<property name="use_enum">0</property>
|
||||||
|
<property name="use_microsoft_bom">0</property>
|
||||||
|
<object class="Panel" expanded="1">
|
||||||
|
<property name="aui_managed">0</property>
|
||||||
|
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="drag_accept_files">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="event_handler">impl_virtual</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">PANEL_ELECTRICAL_SPACING_IPC2221_BASE</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="size">551,450</property>
|
||||||
|
<property name="subclass">CALCULATOR_PANEL; calculator_panels/calculator_panel.h; </property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="two_step_creation">0</property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bSizerElectricalClearance</property>
|
||||||
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bLeftSizerElectricalClearance</property>
|
||||||
|
<property name="orient">wxVERTICAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticText" 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="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="drag_accept_files">0</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">Unit:</property>
|
||||||
|
<property name="markup">0</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_stSpacingUnit</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">; ; forward_declare</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>
|
||||||
|
<property name="wrap">-1</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="0">
|
||||||
|
<property name="border">10</property>
|
||||||
|
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxChoice" expanded="0">
|
||||||
|
<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"></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="drag_accept_files">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font">,90,91,-1,70,0</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_ElectricalSpacingUnitsSelector</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">-1</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</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="OnChoice">OnElectricalSpacingUnitsSelection</event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="0">
|
||||||
|
<property name="border">10</property>
|
||||||
|
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticLine" expanded="0">
|
||||||
|
<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="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="drag_accept_files">0</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_staticline2</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">wxLI_HORIZONTAL</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>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="0">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticText" expanded="0">
|
||||||
|
<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="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="drag_accept_files">0</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">Voltage > 500 V:</property>
|
||||||
|
<property name="markup">0</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_stVoltage</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="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<property name="wrap">-1</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="0">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxTextCtrl" expanded="0">
|
||||||
|
<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="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="drag_accept_files">0</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="maxlength">0</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_ElectricalSpacingVoltage</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="value"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="0">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND|wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxButton" expanded="0">
|
||||||
|
<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="auth_needed">0</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="current"></property>
|
||||||
|
<property name="default">0</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="disabled"></property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="drag_accept_files">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="focus"></property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">Update Values</property>
|
||||||
|
<property name="margins"></property>
|
||||||
|
<property name="markup">0</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_buttonElectSpacingRefresh</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="position"></property>
|
||||||
|
<property name="pressed"></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="OnButtonClick">OnElectricalSpacingRefresh</event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">20</property>
|
||||||
|
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">m_electricalSpacingSizer</property>
|
||||||
|
<property name="orient">wxVERTICAL</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<object class="sizeritem" expanded="0">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticText" expanded="0">
|
||||||
|
<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="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="drag_accept_files">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font">,93,92,-1,70,0</property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">Note: Values are minimal values (from IPC 2221)</property>
|
||||||
|
<property name="markup">0</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_staticTextElectricalSpacing</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="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<property name="wrap">-1</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="0">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxGrid" expanded="0">
|
||||||
|
<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="autosize_cols">0</property>
|
||||||
|
<property name="autosize_rows">0</property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="cell_bg"></property>
|
||||||
|
<property name="cell_font"></property>
|
||||||
|
<property name="cell_horiz_alignment">wxALIGN_CENTER</property>
|
||||||
|
<property name="cell_text"></property>
|
||||||
|
<property name="cell_vert_alignment">wxALIGN_TOP</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||||
|
<property name="col_label_size">30</property>
|
||||||
|
<property name="col_label_values">"B1" "B2" "B3" "B4" "A5" "A6" "A7"</property>
|
||||||
|
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||||
|
<property name="cols">7</property>
|
||||||
|
<property name="column_sizes">100,100,100,100,100,100,100</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="drag_accept_files">0</property>
|
||||||
|
<property name="drag_col_move">0</property>
|
||||||
|
<property name="drag_col_size">1</property>
|
||||||
|
<property name="drag_grid_size">0</property>
|
||||||
|
<property name="drag_row_size">0</property>
|
||||||
|
<property name="editing">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="grid_line_color"></property>
|
||||||
|
<property name="grid_lines">1</property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label_bg"></property>
|
||||||
|
<property name="label_font"></property>
|
||||||
|
<property name="label_text"></property>
|
||||||
|
<property name="margin_height">0</property>
|
||||||
|
<property name="margin_width">0</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_gridElectricalSpacingValues</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="row_label_horiz_alignment">wxALIGN_RIGHT</property>
|
||||||
|
<property name="row_label_size">100</property>
|
||||||
|
<property name="row_label_values">"0 .. 15 V" "16 .. 30 V" "31 .. 50 V" "51 .. 100 V" "101 .. 150 V" "151 .. 170 V" "171 .. 250 V" "251 .. 300 V" "301 .. 500 V" " > 500 V"</property>
|
||||||
|
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||||
|
<property name="row_sizes">24,24,24,24,24,24,24,24,24,24</property>
|
||||||
|
<property name="rows">10</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>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="0">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticText" expanded="0">
|
||||||
|
<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="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="drag_accept_files">0</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">* B1 - Internal Conductors
* B2 - External Conductors, uncoated, sea level to 3050 m
* B3 - External Conductors, uncoated, over 3050 m
* B4 - External Conductors, with permanent polymer coating (any elevation)
* A5 - External Conductors, with conformal coating over assembly (any elevation)
* A6 - External Component lead/termination, uncoated
* A7 - External Component lead termination, with conformal coating (any elevation)</property>
|
||||||
|
<property name="markup">0</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_stHelp</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="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<property name="wrap">-1</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</wxFormBuilder_Project>
|
|
@ -0,0 +1,67 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <wx/artprov.h>
|
||||||
|
#include <wx/xrc/xmlres.h>
|
||||||
|
#include <wx/intl.h>
|
||||||
|
class UNIT_SELECTOR_LEN;
|
||||||
|
|
||||||
|
#include "calculator_panels/calculator_panel.h"
|
||||||
|
#include <wx/string.h>
|
||||||
|
#include <wx/stattext.h>
|
||||||
|
#include <wx/gdicmn.h>
|
||||||
|
#include <wx/font.h>
|
||||||
|
#include <wx/colour.h>
|
||||||
|
#include <wx/settings.h>
|
||||||
|
#include <wx/choice.h>
|
||||||
|
#include <wx/statline.h>
|
||||||
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/button.h>
|
||||||
|
#include <wx/bitmap.h>
|
||||||
|
#include <wx/image.h>
|
||||||
|
#include <wx/icon.h>
|
||||||
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/grid.h>
|
||||||
|
#include <wx/panel.h>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Class PANEL_ELECTRICAL_SPACING_IPC2221_BASE
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
class PANEL_ELECTRICAL_SPACING_IPC2221_BASE : public CALCULATOR_PANEL
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxStaticText* m_stSpacingUnit;
|
||||||
|
UNIT_SELECTOR_LEN* m_ElectricalSpacingUnitsSelector;
|
||||||
|
wxStaticLine* m_staticline2;
|
||||||
|
wxStaticText* m_stVoltage;
|
||||||
|
wxTextCtrl* m_ElectricalSpacingVoltage;
|
||||||
|
wxButton* m_buttonElectSpacingRefresh;
|
||||||
|
wxBoxSizer* m_electricalSpacingSizer;
|
||||||
|
wxStaticText* m_staticTextElectricalSpacing;
|
||||||
|
wxGrid* m_gridElectricalSpacingValues;
|
||||||
|
wxStaticText* m_stHelp;
|
||||||
|
|
||||||
|
// Virtual event handlers, override them in your derived class
|
||||||
|
virtual void OnElectricalSpacingUnitsSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnElectricalSpacingRefresh( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
PANEL_ELECTRICAL_SPACING_IPC2221_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 551,450 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||||
|
|
||||||
|
~PANEL_ELECTRICAL_SPACING_IPC2221_BASE();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include <pcb_calculator_settings.h>
|
#include <pcb_calculator_settings.h>
|
||||||
#include <string_utils.h>
|
#include <string_utils.h>
|
||||||
#include <wx/msgdlg.h>
|
#include <wx/msgdlg.h>
|
||||||
|
#include <html_window.h>
|
||||||
|
|
||||||
|
|
||||||
#include <i18n_utility.h> // For _HKI definition in eseries_help.h
|
#include <i18n_utility.h> // For _HKI definition in eseries_help.h
|
||||||
wxString eseries_help =
|
wxString eseries_help =
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
// Do not edit this file, it is autogenerated by CMake from the .md file
|
||||||
|
_HKI( "The goal of the IEC60664-1 is to provide guidance on designing insulation for products that have a connection to mains supply.\n"
|
||||||
|
"\n"
|
||||||
|
"However some cases are not covered by this calculator:\n"
|
||||||
|
"\n"
|
||||||
|
"- For frequencies higher than 30kHz, the dielectric perfomances are degraded. IEC60664-4 covers those cases\n"
|
||||||
|
"- When using a conformal coating or a potting in order to protect for pollution, if all conditions specified by IEC60664-3 are met, the clearance and creepage distances can be reduced. Soldermask is usually not considered as a conformal coating.\n"
|
||||||
|
"- Insulations trough liquids, compressed air or gases other than air are not in the scope of IEC60664" );
|
|
@ -0,0 +1,7 @@
|
||||||
|
The goal of the IEC60664-1 is to provide guidance on designing insulation for products that have a connection to mains supply.
|
||||||
|
|
||||||
|
However some cases are not covered by this calculator:
|
||||||
|
|
||||||
|
- For frequencies higher than 30kHz, the dielectric perfomances are degraded. IEC60664-4 covers those cases
|
||||||
|
- When using a conformal coating or a potting in order to protect for pollution, if all conditions specified by IEC60664-3 are met, the clearance and creepage distances can be reduced. Soldermask is usually not considered as a conformal coating.
|
||||||
|
- Insulations trough liquids, compressed air or gases other than air are not in the scope of IEC60664
|
|
@ -63,12 +63,43 @@ PCB_CALCULATOR_SETTINGS::PCB_CALCULATOR_SETTINGS() :
|
||||||
m_params.emplace_back( new PARAM<double>( path + ".zout", &att->zout, 50.0 ) );
|
m_params.emplace_back( new PARAM<double>( path + ".zout", &att->zout, 50.0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Electrical spacing params
|
||||||
m_params.emplace_back( new PARAM<int>( "electrical.spacing_units",
|
m_params.emplace_back( new PARAM<int>( "electrical.spacing_units",
|
||||||
&m_Electrical.spacing_units, 0 ) );
|
&m_Electrical.spacing_units, 0 ) );
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<wxString>( "electrical.spacing_voltage",
|
m_params.emplace_back( new PARAM<wxString>( "electrical.spacing_voltage",
|
||||||
&m_Electrical.spacing_voltage, "500" ) );
|
&m_Electrical.spacing_voltage, "500" ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<double>( "electrical.iec60664_ratedVoltage",
|
||||||
|
&m_Electrical.iec60664_ratedVoltage, 230 ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<int>( "electrical.iec60664_OVC",
|
||||||
|
&m_Electrical.iec60664_OVC, 0 ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<double>( "electrical.iec60664_RMSvoltage",
|
||||||
|
&m_Electrical.iec60664_RMSvoltage, 230 ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<double>( "electrical.iec60664_transientOV",
|
||||||
|
&m_Electrical.iec60664_transientOV, 1 ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<double>( "electrical.iec60664_peakOV",
|
||||||
|
&m_Electrical.iec60664_peakOV, 0.5 ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<int>( "electrical.iec60664_insulationType",
|
||||||
|
&m_Electrical.iec60664_insulationType, 0 ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<int>( "electrical.iec60664_pollutionDegree",
|
||||||
|
&m_Electrical.iec60664_pollutionDegree, 0 ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<int>( "electrical.iec60664_materialGroup",
|
||||||
|
&m_Electrical.iec60664_materialGroup, 0 ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<int>( "electrical.iec60664_pcbMaterial",
|
||||||
|
&m_Electrical.iec60664_pcbMaterial, 1 ) );
|
||||||
|
|
||||||
|
m_params.emplace_back( new PARAM<double>( "electrical.iec60664_altitude",
|
||||||
|
&m_Electrical.iec60664_altitude, 2000 ) );
|
||||||
|
|
||||||
// Regulators params
|
// Regulators params
|
||||||
m_params.emplace_back( new PARAM<wxString>( "regulators.r1", &m_Regulators.r1, "10" ) );
|
m_params.emplace_back( new PARAM<wxString>( "regulators.r1", &m_Regulators.r1, "10" ) );
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,17 @@ public:
|
||||||
{
|
{
|
||||||
int spacing_units;
|
int spacing_units;
|
||||||
wxString spacing_voltage;
|
wxString spacing_voltage;
|
||||||
|
|
||||||
|
double iec60664_ratedVoltage;
|
||||||
|
int iec60664_OVC;
|
||||||
|
double iec60664_RMSvoltage;
|
||||||
|
double iec60664_transientOV;
|
||||||
|
double iec60664_peakOV;
|
||||||
|
int iec60664_insulationType;
|
||||||
|
int iec60664_pollutionDegree;
|
||||||
|
int iec60664_materialGroup;
|
||||||
|
int iec60664_pcbMaterial;
|
||||||
|
double iec60664_altitude;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct REGULATORS
|
struct REGULATORS
|
||||||
|
|
|
@ -633,6 +633,7 @@ set( BMAPS_OTHER
|
||||||
color_code_tolerance
|
color_code_tolerance
|
||||||
color_code_value
|
color_code_value
|
||||||
color_code_value_and_name
|
color_code_value_and_name
|
||||||
|
creepage_clearance
|
||||||
cpw
|
cpw
|
||||||
cpw_back
|
cpw_back
|
||||||
microstrip
|
microstrip
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
Loading…
Reference in New Issue