From 4b596cc5f3e67ccaa61053960f3a9ab87244a773 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 23 Jun 2012 18:21:03 -0500 Subject: [PATCH 01/25] legacy_plugin was not round tripping nanometers, add test program to verify new conversion strategy --- pcbnew/legacy_plugin.cpp | 54 +++++++++++++++++++++------------------- pcbnew/legacy_plugin.h | 9 +++++-- tools/CMakeLists.txt | 4 +++ 3 files changed, 39 insertions(+), 28 deletions(-) diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 3f25ce71e3..3506433d07 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2563,15 +2563,19 @@ void LEGACY_PLUGIN::loadPCB_TARGET() } +#define SPBUFZ 50 // wire all usages of this together. + int LEGACY_PLUGIN::biuSprintf( char* buf, BIU aValue ) const { - double engUnits = biuToDisk * aValue; - int len; + long double engUnits = biuToDisk * aValue; + int len; - if( engUnits != 0.0 && fabs( engUnits ) <= 0.0001 ) + if( engUnits != 0.0 && fabsl( engUnits ) <= 0.0001 ) { - // printf( "f: " ); - len = sprintf( buf, "%.10f", engUnits ); + // Windows printf and sprintf do not support long double, but MinGW replaces + // snprintf and vsnprintf only with versions that do. + // http://gcc.gnu.org/ml/libstdc++/2008-02/msg00081.html + len = snprintf( buf, SPBUFZ, "%.10Lf", engUnits ); while( --len > 0 && buf[len] == '0' ) buf[len] = '\0'; @@ -2580,8 +2584,9 @@ int LEGACY_PLUGIN::biuSprintf( char* buf, BIU aValue ) const } else { - // printf( "g: " ); - len = sprintf( buf, "%.10g", engUnits ); + // Windows printf and sprintf do not support long double, but MinGW replaces + // snprintf and vsnprintf only with versions that do. + len = snprintf( buf, SPBUFZ, "%.10Lg", engUnits ); } return len; } @@ -2589,7 +2594,7 @@ int LEGACY_PLUGIN::biuSprintf( char* buf, BIU aValue ) const std::string LEGACY_PLUGIN::fmtBIU( BIU aValue ) const { - char temp[50]; + char temp[SPBUFZ]; int len = biuSprintf( temp, aValue ); @@ -2603,7 +2608,8 @@ std::string LEGACY_PLUGIN::fmtDEG( double aAngle ) const // @todo a hook site to convert from tenths degrees to degrees for BOARD_FORMAT_VERSION 2. - int len = sprintf( temp, "%.10g", aAngle ); + // MINGW: snprintf() comes from gcc folks, sprintf() comes from Microsoft. + int len = snprintf( temp, sizeof( temp ), "%.10g", aAngle ); return std::string( temp, len ); } @@ -2611,7 +2617,7 @@ std::string LEGACY_PLUGIN::fmtDEG( double aAngle ) const std::string LEGACY_PLUGIN::fmtBIUPair( BIU first, BIU second ) const { - char temp[100]; + char temp[2*SPBUFZ+2]; char* cp = temp; cp += biuSprintf( cp, first ); @@ -2630,7 +2636,12 @@ BIU LEGACY_PLUGIN::biuParse( const char* aValue, const char** nptrptr ) errno = 0; - double fval = strtod( aValue, &nptr ); + // The strategy in this function, which utilizes "long double" was verified using + // tools/test-nm-biu-to-ascii-mm-round-tripping.cpp. For it to work "long double" must + // have more precision than double. gcc has this, and its all we care about. + + // MINGW does have a working strtold() + long double fval = strtold( aValue, &nptr ); if( errno ) { @@ -2651,20 +2662,11 @@ BIU LEGACY_PLUGIN::biuParse( const char* aValue, const char** nptrptr ) if( nptrptr ) *nptrptr = nptr; -#if defined(DEBUG) + fval *= diskToBiu; - if( diskToBiu == 10000/25.4 ) - { - // this is the special reverse trip mm -> deci-mils testing run, - // only available in DEBUG mode. - return BIU( KiROUND( fval * diskToBiu ) ); - } - -#endif - - // There should be no rounding issues here, since the values in the file initially - // came from integers via biuFmt(). In fact this product should be an integer, exactly. - return BIU( fval * diskToBiu ); + // fval is up into the whole number realm here, and should be bounded + // within INT_MIN to INT_MAX since BIU's are nanometers. + return BIU( KiROUND( double( fval ) ) ); } @@ -2706,9 +2708,9 @@ void LEGACY_PLUGIN::init( PROPERTIES* aProperties ) // conversion factor for saving RAM BIUs to KICAD legacy file format. #if defined( USE_PCBNEW_NANOMETRES ) - biuToDisk = 1/IU_PER_MM; // BIUs are nanometers & file is mm + biuToDisk = 1.0L/IU_PER_MM; // BIUs are nanometers & file is mm #else - biuToDisk = 1.0; // BIUs are deci-mils + biuToDisk = 1.0L; // BIUs are deci-mils #endif // conversion factor for loading KICAD legacy file format into BIUs in RAM diff --git a/pcbnew/legacy_plugin.h b/pcbnew/legacy_plugin.h index 96f8380b33..40c956beab 100644 --- a/pcbnew/legacy_plugin.h +++ b/pcbnew/legacy_plugin.h @@ -130,8 +130,13 @@ protected: /// initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed. void init( PROPERTIES* aProperties ); - double biuToDisk; ///< convert from BIUs to disk engineering units with this scale factor - double diskToBiu; ///< convert from disk engineering units to BIUs with this scale factor + // Use of long double might affect MSVC++'s ability to make KiCad. + + long double biuToDisk; ///< convert from BIUs to disk engineering units + ///< with this scale factor + + long double diskToBiu; ///< convert from disk engineering units to BIUs + ///< with this scale factor /** * Function biuParse diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 3a1bd2524b..3a91d948b3 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -60,6 +60,10 @@ target_link_libraries( container_test ${wxWidgets_LIBRARIES} ) +add_executable( test-nm-biu-to-ascii-mm-round-tripping + EXCLUDE_FROM_ALL + test-nm-biu-to-ascii-mm-round-tripping.cpp + ) add_executable( parser_gen EXCLUDE_FROM_ALL From e06ce757b746e4b1dd09889ba688a974f3758a52 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 23 Jun 2012 19:44:02 -0500 Subject: [PATCH 02/25] bzr add test program to verify new conversion strategy --- ...test-nm-biu-to-ascii-mm-round-tripping.cpp | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 tools/test-nm-biu-to-ascii-mm-round-tripping.cpp diff --git a/tools/test-nm-biu-to-ascii-mm-round-tripping.cpp b/tools/test-nm-biu-to-ascii-mm-round-tripping.cpp new file mode 100644 index 0000000000..d44b7dc785 --- /dev/null +++ b/tools/test-nm-biu-to-ascii-mm-round-tripping.cpp @@ -0,0 +1,121 @@ + +/* + A test program to which explores the ability to round trip a nanometer + internal unit in the form of a 32 bit int, out to ASCII floating point + millimeters and back in without variation. It tests all 4 billion values + that an int can hold, and converts to ASCII and back and verifies integrity + of the round tripped value. + + Author: Dick Hollenbeck +*/ + + +#include +#include +#include +#include +#include +#include +#include + + +static inline int KiROUND( double v ) +{ + return int( v < 0 ? v - 0.5 : v + 0.5 ); +} + + +typedef int BIU; + +#define BIU_PER_MM 1e6L + + +//double scale = BIU_PER_MM; +//double scale = UM_PER_BIU; +long double scale = 1.0L/BIU_PER_MM; + + +std::string biuFmt( BIU aValue ) +{ + long double engUnits = aValue * scale; + char temp[48]; + int len; + + if( engUnits != 0.0 && fabsl( engUnits ) <= 0.0001 ) + { + snprintf( temp, sizeof(temp), "%.10Lf", engUnits ); + + len = strlen( temp ); + + while( --len > 0 && temp[len] == '0' ) + temp[len] = '\0'; + + ++len; + } + else + { + len = snprintf( temp, sizeof(temp), "%.10Lg", engUnits ); + } + + return std::string( temp, len );; +} + + +int parseBIU( const char* s ) +{ + long double d = strtold( s, NULL ); + return KiROUND( double( d * BIU_PER_MM ) ); +} + + +int main( int argc, char** argv ) +{ + unsigned mismatches = 0; + + if( argc > 1 ) + { + // take a value on the command line and round trip it back to ASCII. + + int i = parseBIU( argv[1] ); + + printf( "%s: i:%d\n", __func__, i ); + + std::string s = biuFmt( i ); + + printf( "%s: s:%s\n", __func__, s.c_str() ); + + exit(1); + } + + // printf( "sizeof(long double): %zd\n", sizeof( long double ) ); + + // Emperically prove that we can round trip all 4 billion 32 bit integers representative + // of nanometers out to textual floating point millimeters, and back without error using + // the above two functions. +// for( int i = INT_MIN; int64_t( i ) <= int64_t( INT_MAX ); ++i ) + for( int64_t j = INT_MIN; j <= int64_t( INT_MAX ); ++j ) + { + int i = int( j ); + + std::string s = biuFmt( int( i ) ); + + int r = parseBIU( s.c_str() ); + + if( r != i ) + { + printf( "i:%d biuFmt:%s r:%d\n", i, s.c_str(), r ); + ++mismatches; + } + + if( !( i & 0xFFFFFF ) ) + { + printf( " %08x", i ); + fflush( stdout ); + } + } + + printf( "mismatches:%u\n", mismatches ); + + return 0; +} + From 4019284e66a77749608d1bc6665355be990d9f5d Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sat, 23 Jun 2012 21:19:41 -0400 Subject: [PATCH 03/25] Minor Pcbnew s-expression improvements. * Put text effects on a single line. * Remove size token when defining drill sizes. * Don't save net in pad definition when pad has no connection. --- common/eda_text.cpp | 14 +++++++------- pcbnew/kicad_plugin.cpp | 15 +++++++++++---- pcbnew/pcb_parser.cpp | 24 +++++++++++++----------- 3 files changed, 31 insertions(+), 22 deletions(-) diff --git a/common/eda_text.cpp b/common/eda_text.cpp index 1c364eff20..df83ecb477 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -344,12 +344,12 @@ void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl { if( !IsDefaultFormatting() ) { - aFormatter->Print( aNestLevel+1, "(effects\n" ); + aFormatter->Print( aNestLevel+1, "(effects" ); if( ( m_Size.x != DEFAULT_SIZE_TEXT ) || ( m_Size.y != DEFAULT_SIZE_TEXT ) || m_Bold || m_Italic ) { - aFormatter->Print( aNestLevel+2, "(font" ); + aFormatter->Print( 0, " (font" ); // Add font support here at some point in the future. @@ -366,13 +366,13 @@ void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl if( IsItalic() ) aFormatter->Print( 0, " italic" ); - aFormatter->Print( 0, ")\n"); + aFormatter->Print( 0, ")"); } if( m_Mirror || ( m_HJustify != GR_TEXT_HJUSTIFY_CENTER ) || ( m_VJustify != GR_TEXT_VJUSTIFY_CENTER ) ) { - aFormatter->Print( aNestLevel+2, "(justify"); + aFormatter->Print( 0, " (justify"); if( m_HJustify != GR_TEXT_HJUSTIFY_CENTER ) aFormatter->Print( 0, (m_HJustify == GR_TEXT_HJUSTIFY_LEFT) ? " left" : " right" ); @@ -383,13 +383,13 @@ void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl if( m_Mirror ) aFormatter->Print( 0, " mirror" ); - aFormatter->Print( 0, ")\n" ); + aFormatter->Print( 0, ")" ); } // As of now the only place this is used is in Eeschema to hide or show the text. if( m_Attributs ) - aFormatter->Print( aNestLevel+2, "hide\n" ); + aFormatter->Print( 0, " hide" ); - aFormatter->Print( aNestLevel+1, ")\n" ); + aFormatter->Print( 0, ")\n" ); } } diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 48f17ed166..5ff61d02da 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -770,8 +770,11 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const if( aPad->GetDrillShape() == PAD_OVAL ) m_out->Print( 0, " oval" ); - m_out->Print( 0, " (size %s)", (sz.GetHeight() != sz.GetWidth()) ? FMT_IU( sz ).c_str() : - FMT_IU( sz.GetWidth() ).c_str() ); + if( sz.GetWidth() > 0 ) + m_out->Print( 0, " %s", FMT_IU( sz.GetWidth() ).c_str() ); + + if( sz.GetHeight() > 0 && sz.GetWidth() != sz.GetHeight() ) + m_out->Print( 0, " %s", FMT_IU( sz.GetHeight() ).c_str() ); if( (aPad->GetOffset().x != 0) || (aPad->GetOffset().y != 0) ) m_out->Print( 0, " (offset %s)", FMT_IU( aPad->GetOffset() ).c_str() ); @@ -799,8 +802,12 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const m_out->Print( 0, ")\n" ); - m_out->Print( aNestLevel+1, "(net %d %s)\n", - aPad->GetNet(), m_out->Quotew( aPad->GetNetname() ).c_str() ); + // Unconnected pad is default net so don't save it. + if( aPad->GetNet() != 0 ) + { + m_out->Print( aNestLevel+1, "(net %d %s)\n", + aPad->GetNet(), m_out->Quotew( aPad->GetNetname() ).c_str() ); + } if( aPad->GetDieLength() != 0 ) m_out->Print( aNestLevel+1, "(die_length %s)\n", diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 16492fd168..4652ad45d3 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2022,6 +2022,9 @@ D_PAD* PCB_PARSER::parseD_PAD() throw( IO_ERROR, PARSE_ERROR ) case T_drill: { + bool haveWidth = false; + wxSize drillSize = pad->GetDrillSize(); + for( token = NextTok(); token != T_RIGHT; token = NextTok() ) { if( token == T_LEFT ) @@ -2033,23 +2036,21 @@ D_PAD* PCB_PARSER::parseD_PAD() throw( IO_ERROR, PARSE_ERROR ) pad->SetDrillShape( PAD_OVAL ); break; - case T_size: + case T_NUMBER: { - int width = parseBoardUnits( "drill width" ); - int height = width; - token = NextTok(); + if( !haveWidth ) + { + drillSize.SetWidth( parseBoardUnits() ); - if( token == T_NUMBER ) - { - height = parseBoardUnits(); - NeedRIGHT(); + // If height is not defined the width and height are the same. + drillSize.SetHeight( drillSize.GetWidth() ); + haveWidth = true; } - else if( token != T_RIGHT ) + else { - Expecting( ") or number" ); + drillSize.SetHeight( parseBoardUnits() ); } - pad->SetDrillSize( wxSize( width, height ) ); break; } @@ -2064,6 +2065,7 @@ D_PAD* PCB_PARSER::parseD_PAD() throw( IO_ERROR, PARSE_ERROR ) } } + pad->SetDrillSize( drillSize ); break; } From e5452a7a39a8d5367c0bb26f54ccdb50ceb0e9df Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 24 Jun 2012 13:41:37 -0500 Subject: [PATCH 04/25] remove "long double" dependency, mingw was falling over when using it. --- pcbnew/legacy_plugin.cpp | 57 +++++++------------ pcbnew/legacy_plugin.h | 7 +-- ...test-nm-biu-to-ascii-mm-round-tripping.cpp | 21 ++++--- uncrustify.cfg | 25 ++++++-- 4 files changed, 53 insertions(+), 57 deletions(-) diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 3506433d07..e0f10c5905 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -355,12 +355,6 @@ void LEGACY_PLUGIN::loadGENERAL() { #if defined( USE_PCBNEW_NANOMETRES ) diskToBiu = IU_PER_MM; - -#elif defined(DEBUG) - // mm to deci-mils: - // advanced testing of round tripping only, not supported in non DEBUG build - diskToBiu = IU_PER_MM; - #else THROW_IO_ERROR( _( "May not load millimeter *.brd file into 'Pcbnew compiled for deci-mils'" ) ); #endif @@ -2567,15 +2561,12 @@ void LEGACY_PLUGIN::loadPCB_TARGET() int LEGACY_PLUGIN::biuSprintf( char* buf, BIU aValue ) const { - long double engUnits = biuToDisk * aValue; - int len; + double engUnits = biuToDisk * aValue; + int len; if( engUnits != 0.0 && fabsl( engUnits ) <= 0.0001 ) { - // Windows printf and sprintf do not support long double, but MinGW replaces - // snprintf and vsnprintf only with versions that do. - // http://gcc.gnu.org/ml/libstdc++/2008-02/msg00081.html - len = snprintf( buf, SPBUFZ, "%.10Lf", engUnits ); + len = snprintf( buf, SPBUFZ, "%.10f", engUnits ); while( --len > 0 && buf[len] == '0' ) buf[len] = '\0'; @@ -2584,9 +2575,16 @@ int LEGACY_PLUGIN::biuSprintf( char* buf, BIU aValue ) const } else { - // Windows printf and sprintf do not support long double, but MinGW replaces - // snprintf and vsnprintf only with versions that do. - len = snprintf( buf, SPBUFZ, "%.10Lg", engUnits ); + // The %.10g is about optimal since we are dealing with a bounded + // range on aValue, and we can be sure that there will never + // be a reason to have more than 6 digits to the right of the + // decimal point because we are converting from integer + // (signed whole numbers) nanometers to mm. A value of + // 0.000001 is one nanometer, the smallest positive nonzero value + // that we can ever have here. If you ever see a board file with + // more digits to the right of the decimal point than 6, this is a + // possibly a bug in a formatting string nearby. + len = snprintf( buf, SPBUFZ, "%.10g", engUnits ); } return len; } @@ -2636,12 +2634,7 @@ BIU LEGACY_PLUGIN::biuParse( const char* aValue, const char** nptrptr ) errno = 0; - // The strategy in this function, which utilizes "long double" was verified using - // tools/test-nm-biu-to-ascii-mm-round-tripping.cpp. For it to work "long double" must - // have more precision than double. gcc has this, and its all we care about. - - // MINGW does have a working strtold() - long double fval = strtold( aValue, &nptr ); + double fval = strtod( aValue, &nptr ); if( errno ) { @@ -2708,20 +2701,20 @@ void LEGACY_PLUGIN::init( PROPERTIES* aProperties ) // conversion factor for saving RAM BIUs to KICAD legacy file format. #if defined( USE_PCBNEW_NANOMETRES ) - biuToDisk = 1.0L/IU_PER_MM; // BIUs are nanometers & file is mm + biuToDisk = 1.0/IU_PER_MM; // BIUs are nanometers & file is mm #else - biuToDisk = 1.0L; // BIUs are deci-mils + biuToDisk = 1.0; // BIUs are deci-mils #endif - // conversion factor for loading KICAD legacy file format into BIUs in RAM - + // Conversion factor for loading KICAD legacy file format into BIUs in RAM // Start by assuming the *.brd file is in deci-mils. - // if we see "Units mm" in the $GENERAL section, set diskToBiu to 1000000.0 + // If we see "Units mm" in the $GENERAL section, set diskToBiu to 1000000.0 // then, during the file loading process, to start a conversion from - // mm to nanometers. + // mm to nanometers. The deci-mil legacy files have no such "Units" marker + // so we must assume the file is in deci-mils until told otherwise. - diskToBiu = IU_PER_DECIMILS; // BIUs are nanometers if USE_PCBNEW_NANOMETRES - // or BIUs are deci-mils + diskToBiu = IU_PER_DECIMILS; // BIUs are nanometers if defined(USE_PCBNEW_NANOMETRES) + // else are deci-mils } @@ -3859,12 +3852,6 @@ void FPL_CACHE::ReadAndVerifyHeader( LINE_READER* aReader ) { #if defined( USE_PCBNEW_NANOMETRES ) m_owner->diskToBiu = IU_PER_MM; - -#elif defined(DEBUG) - // mm to deci-mils: - // advanced testing of round tripping only, not supported in non DEBUG build - m_owner->diskToBiu = IU_PER_MM; - #else THROW_IO_ERROR( _( "May not load millimeter legacy library file into 'Pcbnew compiled for deci-mils'" ) ); #endif diff --git a/pcbnew/legacy_plugin.h b/pcbnew/legacy_plugin.h index 40c956beab..497243e1a8 100644 --- a/pcbnew/legacy_plugin.h +++ b/pcbnew/legacy_plugin.h @@ -126,16 +126,13 @@ protected: int m_loading_format_version; ///< which BOARD_FORMAT_VERSION am I Load()ing? FPL_CACHE* m_cache; - /// initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed. void init( PROPERTIES* aProperties ); - // Use of long double might affect MSVC++'s ability to make KiCad. - - long double biuToDisk; ///< convert from BIUs to disk engineering units + double biuToDisk; ///< convert from BIUs to disk engineering units ///< with this scale factor - long double diskToBiu; ///< convert from disk engineering units to BIUs + double diskToBiu; ///< convert from disk engineering units to BIUs ///< with this scale factor /** diff --git a/tools/test-nm-biu-to-ascii-mm-round-tripping.cpp b/tools/test-nm-biu-to-ascii-mm-round-tripping.cpp index d44b7dc785..29497a0df5 100644 --- a/tools/test-nm-biu-to-ascii-mm-round-tripping.cpp +++ b/tools/test-nm-biu-to-ascii-mm-round-tripping.cpp @@ -27,25 +27,23 @@ static inline int KiROUND( double v ) typedef int BIU; -#define BIU_PER_MM 1e6L +#define BIU_PER_MM 1e6 //double scale = BIU_PER_MM; //double scale = UM_PER_BIU; -long double scale = 1.0L/BIU_PER_MM; +double scale = 1.0/BIU_PER_MM; std::string biuFmt( BIU aValue ) { - long double engUnits = aValue * scale; - char temp[48]; - int len; + double engUnits = aValue * scale; + char temp[48]; + int len; if( engUnits != 0.0 && fabsl( engUnits ) <= 0.0001 ) { - snprintf( temp, sizeof(temp), "%.10Lf", engUnits ); - - len = strlen( temp ); + len = snprintf( temp, sizeof( temp ), "%.16f", engUnits ); while( --len > 0 && temp[len] == '0' ) temp[len] = '\0'; @@ -54,7 +52,7 @@ std::string biuFmt( BIU aValue ) } else { - len = snprintf( temp, sizeof(temp), "%.10Lg", engUnits ); + len = snprintf( temp, sizeof( temp ), "%.16g", engUnits ); } return std::string( temp, len );; @@ -63,8 +61,9 @@ std::string biuFmt( BIU aValue ) int parseBIU( const char* s ) { - long double d = strtold( s, NULL ); + double d = strtod( s, NULL ); return KiROUND( double( d * BIU_PER_MM ) ); +// return int( d * BIU_PER_MM ); } @@ -84,7 +83,7 @@ int main( int argc, char** argv ) printf( "%s: s:%s\n", __func__, s.c_str() ); - exit(1); + exit(0); } // printf( "sizeof(long double): %zd\n", sizeof( long double ) ); diff --git a/uncrustify.cfg b/uncrustify.cfg index b57b2c1698..b7419db25a 100644 --- a/uncrustify.cfg +++ b/uncrustify.cfg @@ -99,6 +99,9 @@ indent_class = true # false/true # Whether to indent the stuff after a leading class colon indent_class_colon = false # false/true +# Virtual indent from the ':' for member initializers. Default is 2 +indent_ctor_init_leading = 2 # number + # Additional indenting for constructor initializer list indent_ctor_init = 0 # number @@ -199,7 +202,7 @@ indent_comma_paren = false # false/true indent_bool_paren = false # false/true # If 'indent_bool_paren' is true, controls the indent of the first expression. If TRUE, aligns the first expression to the following ones -indent_first_bool_expr = true # false/true +indent_first_bool_expr = true # false/true # If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended) indent_square_nl = false # false/true @@ -221,6 +224,12 @@ sp_arith = force # ignore/add/remove/force # Add or remove space around assignment operator '=', '+=', etc sp_assign = force # ignore/add/remove/force +# Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign +sp_cpp_lambda_assign = ignore # ignore/add/remove/force + +# Add or remove space after the capture specification in C++11 lambda. +sp_cpp_lambda_paren = ignore # ignore/add/remove/force + # Add or remove space around assignment operator '=' in a prototype sp_assign_default = ignore # ignore/add/remove/force @@ -326,6 +335,10 @@ sp_angle_word = ignore # ignore/add/remove/force # Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add sp_angle_shift = add # ignore/add/remove/force +# Permit removal of the space between '>>' in 'foo >' (C++11 only). Default=False +# sp_angle_shift cannot remove the space without this option. +sp_permit_cpp11_shift = false # false/true + # Add or remove space before '(' of 'if', 'for', 'switch', and 'while' sp_before_sparen = remove # ignore/add/remove/force @@ -580,7 +593,7 @@ sp_before_send_oc_colon = ignore # ignore/add/remove/force # Add or remove space after the (type) in message specs # '-(int)f: (int) x;' vs '-(int)f: (int)x;' -sp_after_oc_type = add # ignore/add/remove/force +sp_after_oc_type = add # ignore/add/remove/force # Add or remove space after the first (type) in message specs # '-(int) f:(int)x;' vs '-(int)f:(int)x;' @@ -621,10 +634,10 @@ sp_case_label = force # ignore/add/remove/force sp_range = ignore # ignore/add/remove/force # Control the space after the opening of a C++ comment '// A' vs '//A' -sp_cmt_cpp_start = force # ignore/add/remove/force +sp_cmt_cpp_start = force # ignore/add/remove/force # Controls the spaces between #else or #endif and a trailing comment -sp_endif_cmt = force # ignore/add/remove/force +sp_endif_cmt = force # ignore/add/remove/force # Controls the spaces after 'new', 'delete', and 'delete[]' sp_after_new = force # ignore/add/remove/force @@ -1076,10 +1089,10 @@ nl_define_macro = false # false/true nl_squeeze_ifdef = false # false/true # Add or remove blank line before 'if' -nl_before_if = add # ignore/add/remove/force +nl_before_if = add # ignore/add/remove/force # Add or remove blank line after 'if' statement -nl_after_if = add # ignore/add/remove/force +nl_after_if = add # ignore/add/remove/force # Add or remove blank line before 'for' nl_before_for = add # ignore/add/remove/force From f94a95ab5b457398309e1536740bbb1137c6d535 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 25 Jun 2012 09:44:47 -0500 Subject: [PATCH 05/25] use the same format string in the test program as in LEGACY_PLUGIN for record keeping purposes --- TODO.txt | 43 ++++++++----------- pcbnew/legacy_plugin.cpp | 2 +- ...test-nm-biu-to-ascii-mm-round-tripping.cpp | 4 +- 3 files changed, 21 insertions(+), 28 deletions(-) diff --git a/TODO.txt b/TODO.txt index 3e842a8f00..b554625122 100644 --- a/TODO.txt +++ b/TODO.txt @@ -48,37 +48,30 @@ E6) Start initial work for changing component library file format to use Dick's PCBNew ------ -* Make the zone hit testing be done in screen coordinates, not internal units. - See the @todos in class_zone.cpp +*) Make the zone hit testing be done in screen coordinates, not internal units. + See the @todos in class_zone.cpp. A fixed distance in internal units becomes + a variable distance based on zoom factor, leading to inconsistent results at + various zoom factors. I believe that a fixed distance in pixels might make + for a friendlier UI. - -Dick's Peronal TODO Items (Last Update: 24-April-2012) ------------------------------------------------------ - -1) Work through some scroll, pan, zoom overflows in PCBNEW's nanometer build mode. - It is thought that if we can constrain the virtual IU space to within - INT_MIN to INT_MAX then a whole host of other problems will go away. Most - of the evil is in EDA_DRAW_FRAME::AdjustScrollBars() which assumes the - virtual IU space is infinite. This function triggers a movement of the - viewport within the virtual IU space and also a change in size of the virtual - IU space. Once this happens, you can end up thinking there are problems in - functions like EDA_DRAW_PANE::DrawCrossHair(), but this may be an artifact - of having traveled outside a limited virtual IU space. - - -2) Check that the new load visibility BOARD settings is properly setting the toolbar +*) Check that the new load visibility BOARD settings is properly setting the toolbar buttons like show grid or ratsnest. Add PCB_EDIT_FRAME::SetVisibleElements() so toolbar crap is not known to a BOARD. -3) Finish removing global access requirements from KICAD_PLUGIN, so that: +*) Finish removing global access requirements from PLUGINs, so that: *) a BOARD is a fully self contained document description. *) plugin developers do not have to access globals, since a plugin could - very well be a dynamically loaded DLL/DSO. - One final problem remains with BASE_SCREEN's grid origin, easy solution is to - move just that one field into the BOARD. + very well be a dynamically loaded DLL/DSO in the future. + One final problem remains is the BASE_SCREEN's grid origin. An easy + solution is to move just that one field into the BOARD. + +*) Add ::Footprint*() functions to EAGLE_PLUGIN, so that Eagle footprint libraries + can be used in situ. + +*) Add a library table for Pcbnew like that in the sweet library and get rid of the + damn search path strategy. This will enable concurrent usage of various types + of PLUGIN::Footprint*() functions. At least LEGACY and KICAD are both needed + concurrently. -4) Do an EAGLE XML import PCBNEW PLUGIN, and possibly add export support to it. - This is PLUGIN::Load() and maybe PLUGIN::Save(). -5) Get back to the SWEET work. diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index e0f10c5905..fd56d27267 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2659,7 +2659,7 @@ BIU LEGACY_PLUGIN::biuParse( const char* aValue, const char** nptrptr ) // fval is up into the whole number realm here, and should be bounded // within INT_MIN to INT_MAX since BIU's are nanometers. - return BIU( KiROUND( double( fval ) ) ); + return KiROUND( fval ); } diff --git a/tools/test-nm-biu-to-ascii-mm-round-tripping.cpp b/tools/test-nm-biu-to-ascii-mm-round-tripping.cpp index 29497a0df5..5ad16a531f 100644 --- a/tools/test-nm-biu-to-ascii-mm-round-tripping.cpp +++ b/tools/test-nm-biu-to-ascii-mm-round-tripping.cpp @@ -43,7 +43,7 @@ std::string biuFmt( BIU aValue ) if( engUnits != 0.0 && fabsl( engUnits ) <= 0.0001 ) { - len = snprintf( temp, sizeof( temp ), "%.16f", engUnits ); + len = snprintf( temp, sizeof( temp ), "%.10f", engUnits ); while( --len > 0 && temp[len] == '0' ) temp[len] = '\0'; @@ -52,7 +52,7 @@ std::string biuFmt( BIU aValue ) } else { - len = snprintf( temp, sizeof( temp ), "%.16g", engUnits ); + len = snprintf( temp, sizeof( temp ), "%.10g", engUnits ); } return std::string( temp, len );; From 0c946870c5aa29cae60ebfbfabd9c6144f04ef8c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 25 Jun 2012 22:59:19 +0200 Subject: [PATCH 06/25] All: fix a truncation issue in ReturnValueFromString that creates sometimes a small error for values entered in dialogs. Pcbnew: fix a compatibility issue with nano version for zones parameters. --- common/base_units.cpp | 6 +-- pcbnew/class_board.h | 10 ---- pcbnew/class_zone.h | 1 - pcbnew/class_zone_settings.cpp | 12 +++-- pcbnew/dialogs/dialog_copper_zones.cpp | 66 ++++++++++++++++++------ pcbnew/dialogs/dialog_pad_properties.cpp | 1 + pcbnew/zones.h | 11 ++++ pcbnew/zones_by_polygon.cpp | 20 +++++-- pcbnew/zones_test_and_combine_areas.cpp | 24 --------- 9 files changed, 90 insertions(+), 61 deletions(-) diff --git a/common/base_units.cpp b/common/base_units.cpp index acc8162e93..2b6bd7ecf6 100644 --- a/common/base_units.cpp +++ b/common/base_units.cpp @@ -188,7 +188,7 @@ double From_User_Unit( EDA_UNITS_T aUnit, double aValue ) int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ) { - int Value; + double value; double dtmp = 0; // Acquire the 'right' decimal point separator @@ -239,9 +239,9 @@ int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ) dtmp /= 1000; } - Value = From_User_Unit( aUnits, dtmp ); + value = From_User_Unit( aUnits, dtmp ); - return Value; + return KiROUND( value ); } diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index d1bd06e832..59cbdc76eb 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -1048,16 +1048,6 @@ public: */ ZONE_CONTAINER* InsertArea( int netcode, int iarea, int layer, int x, int y, int hatch ); - /** - * Function CompleteArea - * complete copper area contour by adding a line from last to first corner - * if there is only 1 or 2 corners, remove (delete) the area - * @param area_to_complete = area to complete or remove - * @param style = style of last corner - * @return 1 if Ok, 0 if area removed - */ - int CompleteArea( ZONE_CONTAINER* area_to_complete, int style ); - /** * Function TestAreaPolygon * Test an area for self-intersection. diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index b4d3f6aefa..2a2c9099a8 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -48,7 +48,6 @@ class PCB_EDIT_FRAME; class BOARD; class ZONE_CONTAINER; - /** * Struct SEGMENT * is a simple container used when filling areas with segments diff --git a/pcbnew/class_zone_settings.cpp b/pcbnew/class_zone_settings.cpp index 09f98f60c9..174033d77f 100644 --- a/pcbnew/class_zone_settings.cpp +++ b/pcbnew/class_zone_settings.cpp @@ -39,8 +39,10 @@ ZONE_SETTINGS::ZONE_SETTINGS() { m_ZonePriority = 0; m_FillMode = 0; // Mode for filling zone : 1 use segments, 0 use polygons - m_ZoneClearance = 200; // Clearance value - m_ZoneMinThickness = 100; // Min thickness value in filled areas + // Clearance value + m_ZoneClearance = Mils2iu( ZONE_CLEARANCE_MIL ); + // Min thickness value in filled areas (this is the minimum width of copper to fill solid areas) : + m_ZoneMinThickness = Mils2iu( ZONE_THICKNESS_MIL ); m_NetcodeSelection = 0; // Net code selection for the current zone m_CurrentZone_Layer = 0; // Layer used to create the current zone m_Zone_HatchingStyle = CPolyLine::DIAGONAL_EDGE; // Option to show the zone area (outlines only, short hatches or full hatches @@ -49,8 +51,10 @@ ZONE_SETTINGS::ZONE_SETTINGS() // ARC_APPROX_SEGMENTS_COUNT_LOW_DEF // or ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF segments - m_ThermalReliefGap = 200; // tickness of the gap in thermal reliefs - m_ThermalReliefCopperBridge = 200; // tickness of the copper bridge in thermal reliefs + // tickness of the gap in thermal reliefs: + m_ThermalReliefGap = Mils2iu( ZONE_THERMAL_RELIEF_GAP_MIL ); + // tickness of the copper bridge in thermal reliefs: + m_ThermalReliefCopperBridge = Mils2iu( ZONE_THERMAL_RELIEF_COPPER_WIDTH_MIL ); m_PadConnection = THERMAL_PAD; // How pads are covered by copper in zone diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index 970da8c103..e3e08bf146 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -1,19 +1,39 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog_copper_zones.cpp -// Author: jean-pierre Charras -// Created: 09/oct/2008 -// Licence: GNU License -///////////////////////////////////////////////////////////////////////////// +/** + * @file dialog_copper_zones.cpp + */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 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 2 + * 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, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include -#include #include #include #include #include #include #include -#include #include #include @@ -370,20 +390,25 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab // Test if this is a reasonable value for this parameter // A too large value can hang Pcbnew - #define CLEARANCE_MAX_VALUE 100*IU_PER_MILS + #define CLEARANCE_MAX_VALUE ZONE_CLEARANCE_MAX_VALUE_MIL*IU_PER_MILS if( m_settings.m_ZoneClearance > CLEARANCE_MAX_VALUE ) { - DisplayError( this, _( "Clearance must be smaller than 0.5\" / 12.7 mm." ) ); + wxString msg; + msg.Printf( _( "Clearance must be smaller than %f\" / %f mm." ), + ZONE_CLEARANCE_MAX_VALUE_MIL / 1000.0, ZONE_CLEARANCE_MAX_VALUE_MIL * 0.0254 ); + DisplayError( this, msg ); return false; } txtvalue = m_ZoneMinThicknessCtrl->GetValue(); m_settings.m_ZoneMinThickness = ReturnValueFromString( g_UserUnit, txtvalue ); - if( m_settings.m_ZoneMinThickness < (1*IU_PER_MILS) ) + if( m_settings.m_ZoneMinThickness < (ZONE_THICKNESS_MIN_VALUE_MIL*IU_PER_MILS) ) { - DisplayError( this, - _( "Minimum width must be larger than 0.001\" / 0.0254 mm." ) ); + wxString msg; + msg.Printf( _( "Minimum width must be larger than %f\" / %f mm." ), + ZONE_THICKNESS_MIN_VALUE_MIL / 1000.0, ZONE_THICKNESS_MIN_VALUE_MIL * 0.0254 ); + DisplayError( this, msg ); return false; } @@ -402,9 +427,20 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab m_settings.m_ThermalReliefCopperBridge = ReturnValueFromTextCtrl( *m_CopperWidthValue ); - m_Config->Write( ZONE_THERMAL_RELIEF_GAP_STRING_KEY, (long) m_settings.m_ThermalReliefGap ); + if( m_Config ) + { + m_Config->Write( ZONE_CLEARANCE_WIDTH_STRING_KEY, + (double) m_settings.m_ZoneClearance / IU_PER_MILS ); - m_Config->Write( ZONE_THERMAL_RELIEF_COPPER_WIDTH_STRING_KEY, (long) m_settings.m_ThermalReliefCopperBridge ); + m_Config->Write( ZONE_MIN_THICKNESS_WIDTH_STRING_KEY, + (double) m_settings.m_ZoneMinThickness / IU_PER_MILS ); + + m_Config->Write( ZONE_THERMAL_RELIEF_GAP_STRING_KEY, + (double) m_settings.m_ThermalReliefGap / IU_PER_MILS ); + + m_Config->Write( ZONE_THERMAL_RELIEF_COPPER_WIDTH_STRING_KEY, + (double) m_settings.m_ThermalReliefCopperBridge / IU_PER_MILS ); + } if( m_settings.m_ThermalReliefCopperBridge <= m_settings.m_ZoneMinThickness ) { diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 1dce2137be..0dc3dd5058 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -479,6 +479,7 @@ void DIALOG_PAD_PROPERTIES::initValues() wxCommandEvent cmd_event; setPadLayersList( m_dummyPad->GetLayerMask() ); OnDrillShapeSelected( cmd_event ); + OnPadShapeSelection( cmd_event ); } diff --git a/pcbnew/zones.h b/pcbnew/zones.h index 65d7dc7dba..69a2b61720 100644 --- a/pcbnew/zones.h +++ b/pcbnew/zones.h @@ -11,6 +11,17 @@ #define ZONE_NET_FILTER_STRING_KEY wxT( "Zone_Filter_Opt" ) #define ZONE_THERMAL_RELIEF_GAP_STRING_KEY wxT( "Zone_TH_Gap" ) #define ZONE_THERMAL_RELIEF_COPPER_WIDTH_STRING_KEY wxT( "Zone_TH_Copper_Width" ) +#define ZONE_CLEARANCE_WIDTH_STRING_KEY wxT( "Zone_Clearance" ) +#define ZONE_MIN_THICKNESS_WIDTH_STRING_KEY wxT( "Zone_Thickness" ) + +// Default values in mils for parameters in ZONE_CONTAINER +#define ZONE_THERMAL_RELIEF_GAP_MIL 20 // default value for ZONE_SETTINGS::m_ThermalReliefGap +#define ZONE_THERMAL_RELIEF_COPPER_WIDTH_MIL 20 // default value for ZONE_SETTINGS::m_ThermalReliefCopperBridge +#define ZONE_THICKNESS_MIL 10 // default value for ZONE_SETTINGS::m_ZoneMinThickness +#define ZONE_THICKNESS_MIN_VALUE_MIL 1 // minimum acceptable value for ZONE_SETTINGS::m_ZoneMinThickness +#define ZONE_CLEARANCE_MIL 20 // default value for ZONE_SETTINGS::m_ZoneClearance +#define ZONE_CLEARANCE_MAX_VALUE_MIL 500 // maximum acceptable value for ZONE_SETTINGS::m_ZoneClearance + /// Exit codes for zone editing dialogs enum ZONE_EDIT_T { diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index daf585f210..0d5dcf999f 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -536,12 +536,24 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) zone->SetNet( zoneInfo.m_NetcodeSelection ); zone->SetNetNameFromNetCode( ); } + double tmp = ZONE_THERMAL_RELIEF_GAP_MIL; + wxGetApp().GetSettings()->Read( ZONE_THERMAL_RELIEF_GAP_STRING_KEY, &tmp ); + zoneInfo.m_ThermalReliefGap = KiROUND( tmp * IU_PER_MILS); - wxGetApp().GetSettings()->Read( ZONE_THERMAL_RELIEF_GAP_STRING_KEY, - &zoneInfo.m_ThermalReliefGap ); - + tmp = ZONE_THERMAL_RELIEF_COPPER_WIDTH_MIL; wxGetApp().GetSettings()->Read( ZONE_THERMAL_RELIEF_COPPER_WIDTH_STRING_KEY, - &zoneInfo.m_ThermalReliefCopperBridge ); + &tmp ); + zoneInfo.m_ThermalReliefCopperBridge = KiROUND( tmp * IU_PER_MILS ); + + tmp = ZONE_CLEARANCE_MIL; + wxGetApp().GetSettings()->Read( ZONE_CLEARANCE_WIDTH_STRING_KEY, + &tmp ); + zoneInfo.m_ZoneClearance = KiROUND( tmp * IU_PER_MILS ); + + tmp = ZONE_THICKNESS_MIL; + wxGetApp().GetSettings()->Read( ZONE_MIN_THICKNESS_WIDTH_STRING_KEY, + &tmp ); + zoneInfo.m_ZoneMinThickness = KiROUND( tmp * IU_PER_MILS ); zoneInfo.m_CurrentZone_Layer = zone->GetLayer(); diff --git a/pcbnew/zones_test_and_combine_areas.cpp b/pcbnew/zones_test_and_combine_areas.cpp index b22ea9c4a2..c06e96feac 100644 --- a/pcbnew/zones_test_and_combine_areas.cpp +++ b/pcbnew/zones_test_and_combine_areas.cpp @@ -124,30 +124,6 @@ ZONE_CONTAINER* BOARD::InsertArea( int netcode, int iarea, int layer, int x, int } -/** - * Function CompleteArea - * complete copper area contour by adding a line from last to first corner - * if there is only 1 or 2 corners, remove (delete) the area - * @param area_to_complete = area to complete or remove - * @param style = style of last corner - * @return 1 if Ok, 0 if area removed - */ -int BOARD::CompleteArea( ZONE_CONTAINER* area_to_complete, int style ) -{ - if( area_to_complete->m_Poly->GetNumCorners() > 2 ) - { - area_to_complete->m_Poly->Close( style ); - return 1; - } - else - { - Delete( area_to_complete ); - } - - return 0; -} - - /** * Function TestAreaPolygon * Test an area for self-intersection. From 1b08d1874f481d92f0d5f14d25910b42d876e73f Mon Sep 17 00:00:00 2001 From: Jean-Pierre Charras Date: Mon, 25 Jun 2012 19:52:57 -0400 Subject: [PATCH 07/25] Commit JP's custom page size fix for Pcbnew s-expressions file format with minor changes. Thanks JP. --- common/class_page_info.cpp | 28 ++++++++++++++----------- pcbnew/pcb_parser.cpp | 43 +++++++++++++++++++++++++------------- 2 files changed, 44 insertions(+), 27 deletions(-) diff --git a/common/class_page_info.cpp b/common/class_page_info.cpp index 6c6612bd28..4ee98e8da8 100644 --- a/common/class_page_info.cpp +++ b/common/class_page_info.cpp @@ -250,12 +250,14 @@ void PAGE_INFO::SetPortrait( bool isPortrait ) static int clampWidth( int aWidthInMils ) { /* was giving EESCHEMA single component SVG plotter grief + However a minimal test is made to avoid values that crashes Kicad if( aWidthInMils < 4000 ) // 4" is about a baseball card aWidthInMils = 4000; - else if( aWidthInMils > 44000 ) //44" is plotter size aWidthInMils = 44000; */ + if( aWidthInMils < 10 ) + aWidthInMils = 10; return aWidthInMils; } @@ -264,11 +266,14 @@ static int clampHeight( int aHeightInMils ) { /* was giving EESCHEMA single component SVG plotter grief clamping is best done at the UI, i.e. dialog, levels + However a minimal test is made to avoid values that crashes Kicad if( aHeightInMils < 4000 ) aHeightInMils = 4000; else if( aHeightInMils > 44000 ) aHeightInMils = 44000; */ + if( aHeightInMils < 10 ) + aHeightInMils = 10; return aHeightInMils; } @@ -316,18 +321,17 @@ void PAGE_INFO::SetHeightMils( int aHeightInMils ) void PAGE_INFO::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControlBits ) const throw( IO_ERROR ) { - // If page is A3 landscape, then it is assumed to be the default and is not written. - if( !IsDefault() ) - { - aFormatter->Print( aNestLevel, "(page %s", aFormatter->Quotew( GetType() ).c_str() ); + aFormatter->Print( aNestLevel, "(page %s", aFormatter->Quotew( GetType() ).c_str() ); - // The page dimensions are only required for user defined page sizes. - if( GetType() == PAGE_INFO::Custom ) - aFormatter->Print( aNestLevel, " %d %d", GetWidthIU(), GetHeightIU() ); + // The page dimensions are only required for user defined page sizes. + // Internally, the page size is in mils + if( GetType() == PAGE_INFO::Custom ) + aFormatter->Print( 0, " %g %g", + GetCustomWidthMils() * 25.4 / 1000.0, + GetCustomHeightMils() * 25.4 / 1000.0 ); - if( IsCustom() && IsPortrait() ) - aFormatter->Print( aNestLevel, " portrait" ); + if( IsCustom() && IsPortrait() ) + aFormatter->Print( 0, " portrait" ); - aFormatter->Print( aNestLevel, ")\n" ); - } + aFormatter->Print( 0, ")\n" ); } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 4652ad45d3..b860f52b4c 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -431,7 +431,7 @@ void PCB_PARSER::parseHeader() throw( IO_ERROR, PARSE_ERROR ) Expecting( GetTokenText( T_version ) ); // Get the file version. - m_board->SetFileFormatVersionAtLoad( NeedNUMBER( GetTokenText( T_version ) ) ); + m_board->SetFileFormatVersionAtLoad( parseInt( GetTokenText( T_version ) ) ); // Skip the host name and host build version information. NeedRIGHT(); @@ -489,23 +489,45 @@ void PCB_PARSER::parsePAGE_INFO() throw( IO_ERROR, PARSE_ERROR ) wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a PAGE_INFO." ) ); T token; - bool isPortrait = false; + PAGE_INFO pageInfo; NeedSYMBOL(); wxString pageType = FromUTF8(); + if( !pageInfo.SetType( pageType ) ) + { + wxString err; + err.Printf( _( "page type \"%s\" is not valid " ), GetChars( FromUTF8() ) ); + THROW_PARSE_ERROR( err, CurSource(), CurLine(), CurLineNumber(), CurOffset() ); + } + if( pageType == PAGE_INFO::Custom ) { - PAGE_INFO::SetCustomWidthMils( Iu2Mils( NeedNUMBER( "width" ) ) ); - PAGE_INFO::SetCustomHeightMils( Iu2Mils( NeedNUMBER( "height" ) ) ); + double width = parseDouble( "width" ); // width in mm + + // Perform some controls to avoid crashes if the size is edited by hands + if( width < 100.0 ) + width = 100.0; + else if( width > 1200.0 ) + width = 1200.0; + + double height = parseDouble( "height" ); // height in mm + + if( height < 100.0 ) + height = 100.0; + else if( height > 1200.0 ) + height = 1200.0; + + pageInfo.SetWidthMils( Mm2mils( width ) ); + pageInfo.SetHeightMils( Mm2mils( height ) ); } token = NextTok(); if( token == T_portrait ) { - isPortrait = true; + pageInfo.SetPortrait( true ); NeedRIGHT(); } else if( token != T_RIGHT ) @@ -513,15 +535,6 @@ void PCB_PARSER::parsePAGE_INFO() throw( IO_ERROR, PARSE_ERROR ) Expecting( "portrait|)" ); } - PAGE_INFO pageInfo; - - if( !pageInfo.SetType( pageType, isPortrait ) ) - { - wxString err; - err.Printf( _( "page type \"%s\" is not valid " ), GetChars( FromUTF8() ) ); - THROW_PARSE_ERROR( err, CurSource(), CurLine(), CurLineNumber(), CurOffset() ); - } - m_board->SetPageSettings( pageInfo ); } @@ -566,7 +579,7 @@ void PCB_PARSER::parseTITLE_BLOCK() throw( IO_ERROR, PARSE_ERROR ) case T_comment: { - int commentNumber = NeedNUMBER( "comment" ); + int commentNumber = parseInt( "comment" ); switch( commentNumber ) { From 047bb44ef53b9c9ec13b5401d0b309aacf70337a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 26 Jun 2012 19:57:37 +0200 Subject: [PATCH 08/25] Pcbnew: minor changes in pcb-parser.cpp and kicad_plugin.cpp to make translations easier. Code cleaning in autoroute functions. --- pcbnew/autorouter/autoplac.cpp | 8 +- pcbnew/autorouter/autorout.cpp | 17 +-- pcbnew/autorouter/autorout.h | 40 +++---- pcbnew/autorouter/dist.cpp | 6 +- pcbnew/autorouter/graphpcb.cpp | 10 +- pcbnew/autorouter/routing_matrix.cpp | 80 ++++++------- pcbnew/autorouter/solve.cpp | 17 ++- pcbnew/autorouter/work.cpp | 162 ++++++++------------------- pcbnew/kicad_plugin.cpp | 4 +- pcbnew/pcb_parser.cpp | 2 +- 10 files changed, 137 insertions(+), 209 deletions(-) diff --git a/pcbnew/autorouter/autoplac.cpp b/pcbnew/autorouter/autoplac.cpp index f943e8116e..16f8b14958 100644 --- a/pcbnew/autorouter/autoplac.cpp +++ b/pcbnew/autorouter/autoplac.cpp @@ -440,7 +440,7 @@ int PCB_EDIT_FRAME::GenPlaceBoard() m_messagePanel->SetMessage( 14, _( "Cells." ), msg, YELLOW ); /* Choose the number of board sides. */ - Nb_Sides = TWO_SIDES; + RoutingMatrix.m_RoutingLayersCount = 2; RoutingMatrix.InitRoutingMatrix(); @@ -450,7 +450,7 @@ int PCB_EDIT_FRAME::GenPlaceBoard() Route_Layer_BOTTOM = LAYER_N_FRONT; - if( Nb_Sides == TWO_SIDES ) + if( RoutingMatrix.m_RoutingLayersCount > 1 ) Route_Layer_BOTTOM = LAYER_N_BACK; Route_Layer_TOP = LAYER_N_FRONT; @@ -618,7 +618,7 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) */ TstOtherSide = false; - if( Nb_Sides == TWO_SIDES ) + if( RoutingMatrix.m_RoutingLayersCount > 1 ) { D_PAD* Pad; int otherLayerMask = LAYER_BACK; @@ -967,7 +967,7 @@ void CreateKeepOutRectangle( int ux0, int uy0, int ux1, int uy1, if( aLayerMask & GetLayerMask( Route_Layer_BOTTOM ) ) trace = 1; /* Trace on bottom layer. */ - if( ( aLayerMask & GetLayerMask( Route_Layer_TOP ) ) && Nb_Sides ) + if( ( aLayerMask & GetLayerMask( Route_Layer_TOP ) ) && RoutingMatrix.m_RoutingLayersCount ) trace |= 2; /* Trace on top layer. */ if( trace == 0 ) diff --git a/pcbnew/autorouter/autorout.cpp b/pcbnew/autorouter/autorout.cpp index 4819575575..7ea56d1768 100644 --- a/pcbnew/autorouter/autorout.cpp +++ b/pcbnew/autorouter/autorout.cpp @@ -47,12 +47,6 @@ #include -int Nb_Sides; /* Number of layer for autorouting (0 or 1) */ -int OpenNodes; /* total number of nodes opened */ -int ClosNodes; /* total number of nodes closed */ -int MoveNodes; /* total number of nodes moved */ -int MaxNodes; /* maximum number of nodes opened at one time */ - MATRIX_ROUTING_HEAD RoutingMatrix; // routing matrix (grid) to route 2-sided boards /* init board, route traces*/ @@ -175,10 +169,10 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode ) m_messagePanel->EraseMsgBox(); /* Map the board */ - Nb_Sides = ONE_SIDE; + RoutingMatrix.m_RoutingLayersCount = 1; if( Route_Layer_TOP != Route_Layer_BOTTOM ) - Nb_Sides = TWO_SIDES; + RoutingMatrix.m_RoutingLayersCount = 2; if( RoutingMatrix.InitRoutingMatrix() < 0 ) { @@ -195,10 +189,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode ) // DisplayRoutingMatrix( m_canvas, DC ); - if( Nb_Sides == TWO_SIDES ) - Solve( DC, TWO_SIDES ); /* double face */ - else - Solve( DC, ONE_SIDE ); /* simple face */ + Solve( DC, RoutingMatrix.m_RoutingLayersCount ); /* Free memory. */ FreeQueue(); @@ -249,7 +240,7 @@ void DisplayRoutingMatrix( EDA_DRAW_PANEL* panel, wxDC* DC ) if( dcell0 & HOLE ) color = GREEN; -// if( Nb_Sides ) +// if( RoutingMatrix.m_RoutingLayersCount ) // dcell1 = GetCell( row, col, TOP ); if( dcell1 & HOLE ) diff --git a/pcbnew/autorouter/autorout.h b/pcbnew/autorouter/autorout.h index c6c01f431d..baa2074c65 100644 --- a/pcbnew/autorouter/autorout.h +++ b/pcbnew/autorouter/autorout.h @@ -46,7 +46,8 @@ class BOARD; /* Autorouter commands. */ -enum CommandOpt { +enum AUTOPLACEROUTE_OPTIONS +{ PLACE_ALL, PLACE_OUT_OF_BOARD, PLACE_INCREMENTAL, @@ -58,13 +59,7 @@ enum CommandOpt { ROUTE_PAD }; - -#define ONE_SIDE 0 -#define TWO_SIDES 1 - -#define MAX_SIDES_COUNT 2 - -extern int Nb_Sides; /* Number of layers for autorouting (0 or 1) */ +#define MAX_ROUTING_LAYERS_COUNT 2 #define FORCE_PADS 1 /* Force placement of pads for any Netcode */ @@ -88,20 +83,23 @@ typedef char DIR_CELL; class MATRIX_ROUTING_HEAD { public: - MATRIX_CELL* m_BoardSide[MAX_SIDES_COUNT]; // the image map of 2 board sides - DIST_CELL* m_DistSide[MAX_SIDES_COUNT]; // the image map of 2 board sides: distance to - // cells - DIR_CELL* m_DirSide[MAX_SIDES_COUNT]; // the image map of 2 board sides: pointers back to - // source + MATRIX_CELL* m_BoardSide[MAX_ROUTING_LAYERS_COUNT]; // the image map of 2 board sides + DIST_CELL* m_DistSide[MAX_ROUTING_LAYERS_COUNT]; // the image map of 2 board sides: + // distance to cells + DIR_CELL* m_DirSide[MAX_ROUTING_LAYERS_COUNT]; // the image map of 2 board sides: + // pointers back to source bool m_InitMatrixDone; - int m_Layers; // Layer count (1 2 ) + int m_RoutingLayersCount; // Number of layers for autorouting (0 or 1) int m_GridRouting; // Size of grid for autoplace/autoroute EDA_RECT m_BrdBox; // Actual board bounding box int m_Nrows, m_Ncols; // Matrix size int m_MemSize; // Memory requirement, just for statistics int m_RouteCount; // Number of routes + private: - void (MATRIX_ROUTING_HEAD::* m_opWriteCell)( int aRow, int aCol, int aSide, MATRIX_CELL aCell); // a pointeur to the current selected cell op + // a pointer to the current selected cell operation + void (MATRIX_ROUTING_HEAD::* m_opWriteCell)( int aRow, int aCol, + int aSide, MATRIX_CELL aCell); public: MATRIX_ROUTING_HEAD(); @@ -114,7 +112,7 @@ public: /** * function GetBrdCoordOrigin - * @returns the board coordinate corresponding to the + * @return the board coordinate corresponding to the * routing matrix origin ( board coordinate offset ) */ wxPoint GetBrdCoordOrigin() @@ -156,6 +154,12 @@ public: void SetDist( int aRow, int aCol, int aSide, DIST_CELL ); int GetDir( int aRow, int aCol, int aSide ); void SetDir( int aRow, int aCol, int aSide, int aDir); + + // calculate distance (with penalty) of a trace through a cell + int CalcDist(int x,int y,int z ,int side ); + + // calculate approximate distance (manhattan distance) + int GetApxDist( int r1, int c1, int r2, int c2 ); }; extern MATRIX_ROUTING_HEAD RoutingMatrix; /* 2-sided board */ @@ -220,10 +224,6 @@ int SetWork( int, int, int , int, int, RATSNEST_ITEM *, int ); void GetWork( int *, int *, int *, int *, int *, RATSNEST_ITEM ** ); void SortWork(); /* order the work items; shortest first */ -/* DIST.CPP */ -int GetApxDist( int r1, int c1, int r2, int c2 ); -int CalcDist(int x,int y,int z ,int side ); - /* routing_matrix.cpp */ int Build_Work( BOARD * Pcb ); void PlaceCells( BOARD * Pcb, int net_code, int flag = 0 ); diff --git a/pcbnew/autorouter/dist.cpp b/pcbnew/autorouter/dist.cpp index 8bc91921cf..5841073aad 100644 --- a/pcbnew/autorouter/dist.cpp +++ b/pcbnew/autorouter/dist.cpp @@ -39,7 +39,7 @@ /* calculate approximate distance (manhattan distance) */ -int GetApxDist( int r1, int c1, int r2, int c2 ) +int MATRIX_ROUTING_HEAD::GetApxDist( int r1, int c1, int r2, int c2 ) { int d1, d2; /* row and column deltas */ @@ -135,7 +135,7 @@ static int dir_penalty_BOTTOM[10][10] = /* calculate distance (with penalty) of a trace through a cell */ -int CalcDist(int x,int y,int z ,int side ) +int MATRIX_ROUTING_HEAD::CalcDist(int x,int y,int z ,int side ) { int adjust, ldist; @@ -158,7 +158,7 @@ int CalcDist(int x,int y,int z ,int side ) ldist = dist[x-1][y-1] + penalty[x-1][y-1] + adjust; - if( Nb_Sides ) + if( m_RouteCount > 1 ) { if( side == BOTTOM ) ldist += dir_penalty_TOP[x-1][y-1]; diff --git a/pcbnew/autorouter/graphpcb.cpp b/pcbnew/autorouter/graphpcb.cpp index 77d137ab55..ede59ae1c9 100644 --- a/pcbnew/autorouter/graphpcb.cpp +++ b/pcbnew/autorouter/graphpcb.cpp @@ -71,14 +71,14 @@ static void TraceCircle( int ux0, int uy0, int ux1, int uy1, int lg, int layer, if( layer < 0 ) \ { \ RoutingMatrix.WriteCell( dy, dx, BOTTOM, color ); \ - if( Nb_Sides ) \ + if( RoutingMatrix.m_RoutingLayersCount > 1 ) \ RoutingMatrix.WriteCell( dy, dx, TOP, color ); \ } \ else \ { \ if( layer == Route_Layer_BOTTOM ) \ RoutingMatrix.WriteCell( dy, dx, BOTTOM, color ); \ - if( Nb_Sides ) \ + if( RoutingMatrix.m_RoutingLayersCount > 1 ) \ if( layer == Route_Layer_TOP ) \ RoutingMatrix.WriteCell( dy, dx, TOP, color ); \ } \ @@ -156,7 +156,7 @@ void TraceFilledCircle( int cx, int cy, int radius, trace = 1; // Trace on BOTTOM if( aLayerMask & GetLayerMask( Route_Layer_TOP ) ) - if( Nb_Sides ) + if( RoutingMatrix.m_RoutingLayersCount > 1 ) trace |= 2; // Trace on TOP if( trace == 0 ) @@ -475,7 +475,7 @@ void TraceFilledRectangle( int ux0, int uy0, int ux1, int uy1, if( ( aLayerMask & GetLayerMask( Route_Layer_BOTTOM ) ) ) trace = 1; // Trace on BOTTOM - if( ( aLayerMask & GetLayerMask( Route_Layer_TOP ) ) && Nb_Sides ) + if( ( aLayerMask & GetLayerMask( Route_Layer_TOP ) ) && RoutingMatrix.m_RoutingLayersCount > 1 ) trace |= 2; // Trace on TOP if( trace == 0 ) @@ -542,7 +542,7 @@ void TraceFilledRectangle( int ux0, int uy0, int ux1, int uy1, if( aLayerMask & GetLayerMask( Route_Layer_TOP ) ) { - if( Nb_Sides ) + if( RoutingMatrix.m_RoutingLayersCount > 1 ) trace |= 2; // Trace on TOP } diff --git a/pcbnew/autorouter/routing_matrix.cpp b/pcbnew/autorouter/routing_matrix.cpp index e48c35ab37..e9ac66eef9 100644 --- a/pcbnew/autorouter/routing_matrix.cpp +++ b/pcbnew/autorouter/routing_matrix.cpp @@ -46,6 +46,23 @@ #include +MATRIX_ROUTING_HEAD::MATRIX_ROUTING_HEAD() +{ + m_BoardSide[0] = m_BoardSide[1] = NULL; + m_DistSide[0] = m_DistSide[1] = NULL; + m_DirSide[0] = m_DirSide[1] = NULL; + m_InitMatrixDone = false; + m_Nrows = m_Ncols = 0; + m_MemSize = 0; + m_RoutingLayersCount = 1; +} + + +MATRIX_ROUTING_HEAD::~MATRIX_ROUTING_HEAD() +{ +} + + bool MATRIX_ROUTING_HEAD::ComputeMatrixSize( BOARD* aPcb, bool aUseBoardEdgesOnly ) { aPcb->ComputeBoundingBox( aUseBoardEdgesOnly ); @@ -80,22 +97,6 @@ bool MATRIX_ROUTING_HEAD::ComputeMatrixSize( BOARD* aPcb, bool aUseBoardEdgesOnl } -MATRIX_ROUTING_HEAD::MATRIX_ROUTING_HEAD() -{ - m_BoardSide[0] = m_BoardSide[1] = NULL; - m_DistSide[0] = m_DistSide[1] = NULL; - m_DirSide[0] = m_DirSide[1] = NULL; - m_InitMatrixDone = false; - m_Layers = MAX_SIDES_COUNT; - m_Nrows = m_Ncols = 0; - m_MemSize = 0; -} - - -MATRIX_ROUTING_HEAD::~MATRIX_ROUTING_HEAD() -{ -} - int MATRIX_ROUTING_HEAD::InitRoutingMatrix() { @@ -109,7 +110,7 @@ int MATRIX_ROUTING_HEAD::InitRoutingMatrix() // give a small margin for memory allocation: ii = (RoutingMatrix.m_Nrows + 1) * (RoutingMatrix.m_Ncols + 1); - for( kk = 0; kk < m_Layers; kk++ ) + for( kk = 0; kk < m_RoutingLayersCount; kk++ ) { m_BoardSide[kk] = NULL; m_DistSide[kk] = NULL; @@ -137,7 +138,7 @@ int MATRIX_ROUTING_HEAD::InitRoutingMatrix() return -1; } - m_MemSize = m_Layers * ii * ( sizeof(MATRIX_CELL) + sizeof(DIST_CELL) + sizeof(char) ); + m_MemSize = m_RouteCount * ii * ( sizeof(MATRIX_CELL) + sizeof(DIST_CELL) + sizeof(char) ); return m_MemSize; } @@ -149,7 +150,7 @@ void MATRIX_ROUTING_HEAD::UnInitRoutingMatrix() m_InitMatrixDone = false; - for( ii = 0; ii < MAX_SIDES_COUNT; ii++ ) + for( ii = 0; ii < MAX_ROUTING_LAYERS_COUNT; ii++ ) { // de-allocate Dir matrix if( m_DirSide[ii] ) @@ -179,14 +180,17 @@ void MATRIX_ROUTING_HEAD::UnInitRoutingMatrix() /** * Function PlaceCells - * initializes the cell board is set and VIA_IMPOSSIBLE HOLE according to the setbacks. - * The elements of net_code = net_code will not be occupied as places but only - * VIA_IMPOSSIBLE - * For single-sided Routing 1: - * BOTTOM side is used and Route_Layer_BOTTOM = Route_Layer_TOP + * Initialize the matrix routing by setting obstacles for each occupied cell + * a cell set to HOLE is an obstacle for tracks and vias + * a cell set to VIA_IMPOSSIBLE is an obstacle for vias only. + * a cell set to CELL_is_EDGE is a frontier. + * Tracks and vias having the same net code as net_code are skipped + * (htey do not are obstacles) * - * According to the bits = 1 parameter flag: - * If FORCE_PADS: all pads will be placed even those same net_code. + * For single-sided Routing 1: + * BOTTOM side is used, and Route_Layer_BOTTOM = Route_Layer_TOP + * + * If flag == FORCE_PADS: all pads will be put in matrix as obstacles. */ void PlaceCells( BOARD* aPcb, int net_code, int flag ) { @@ -347,8 +351,6 @@ int Build_Work( BOARD* Pcb ) int demi_pas = RoutingMatrix.m_GridRouting / 2; wxString msg; - EDA_RECT bbbox = Pcb->GetBoundingBox(); - InitWork(); /* clear work list */ int cellCount = 0; @@ -356,7 +358,7 @@ int Build_Work( BOARD* Pcb ) { pt_rats = &Pcb->m_FullRatsnest[ii]; - /* We consider her only ratsnest that are active ( obviously not yet routed) + /* We consider here only ratsnest that are active ( obviously not yet routed) * and routables (that are not yet attempt to be routed and fail */ if( (pt_rats->m_Status & CH_ACTIF) == 0 ) @@ -373,45 +375,47 @@ int Build_Work( BOARD* Pcb ) current_net_code = pt_pad->GetNet(); pt_ch = pt_rats; - r1 = ( pt_pad->GetPosition().y - bbbox.GetY() + demi_pas ) / RoutingMatrix.m_GridRouting; + r1 = ( pt_pad->GetPosition().y - RoutingMatrix.m_BrdBox.GetY() + demi_pas ) + / RoutingMatrix.m_GridRouting; if( r1 < 0 || r1 >= RoutingMatrix.m_Nrows ) { msg.Printf( wxT( "error : row = %d ( padY %d pcbY %d) " ), r1, - pt_pad->GetPosition().y, bbbox.GetY() ); + pt_pad->GetPosition().y, RoutingMatrix.m_BrdBox.GetY() ); wxMessageBox( msg ); return 0; } - c1 = ( pt_pad->GetPosition().x - bbbox.GetX() + demi_pas ) / RoutingMatrix.m_GridRouting; + c1 = ( pt_pad->GetPosition().x - RoutingMatrix.m_BrdBox.GetX() + demi_pas ) / RoutingMatrix.m_GridRouting; if( c1 < 0 || c1 >= RoutingMatrix.m_Ncols ) { msg.Printf( wxT( "error : col = %d ( padX %d pcbX %d) " ), c1, - pt_pad->GetPosition().x, bbbox.GetX() ); + pt_pad->GetPosition().x, RoutingMatrix.m_BrdBox.GetX() ); wxMessageBox( msg ); return 0; } pt_pad = pt_rats->m_PadEnd; - r2 = ( pt_pad->GetPosition().y - bbbox.GetY() + r2 = ( pt_pad->GetPosition().y - RoutingMatrix.m_BrdBox.GetY() + demi_pas ) / RoutingMatrix.m_GridRouting; if( r2 < 0 || r2 >= RoutingMatrix.m_Nrows ) { msg.Printf( wxT( "error : row = %d ( padY %d pcbY %d) " ), r2, - pt_pad->GetPosition().y, bbbox.GetY() ); + pt_pad->GetPosition().y, RoutingMatrix.m_BrdBox.GetY() ); wxMessageBox( msg ); return 0; } - c2 = ( pt_pad->GetPosition().x - bbbox.GetX() + demi_pas ) / RoutingMatrix.m_GridRouting; + c2 = ( pt_pad->GetPosition().x - RoutingMatrix.m_BrdBox.GetX() + demi_pas ) + / RoutingMatrix.m_GridRouting; if( c2 < 0 || c2 >= RoutingMatrix.m_Ncols ) { msg.Printf( wxT( "error : col = %d ( padX %d pcbX %d) " ), c2, - pt_pad->GetPosition().x, bbbox.GetX() ); + pt_pad->GetPosition().x, RoutingMatrix.m_BrdBox.GetX() ); wxMessageBox( msg ); return 0; } @@ -424,7 +428,7 @@ int Build_Work( BOARD* Pcb ) return cellCount; } -// Initialize WriteCell to make the aLogicOp +// Initialize m_opWriteCell member to make the aLogicOp void MATRIX_ROUTING_HEAD::SetCellOperation( int aLogicOp ) { switch( aLogicOp ) diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp index 8ef2af3e7d..c3c00a2c0a 100644 --- a/pcbnew/autorouter/solve.cpp +++ b/pcbnew/autorouter/solve.cpp @@ -86,6 +86,10 @@ static int s_Clearance; // Clearance value used in autorouter static PICKED_ITEMS_LIST s_ItemsListPicker; +int OpenNodes; /* total number of nodes opened */ +int ClosNodes; /* total number of nodes closed */ +int MoveNodes; /* total number of nodes moved */ +int MaxNodes; /* maximum number of nodes opened at one time */ #define NOSUCCESS 0 #define STOP_FROM_ESC -1 @@ -263,7 +267,7 @@ static long newmask[8] = * -1 if escape (stop being routed) request * -2 if default memory allocation */ -int PCB_EDIT_FRAME::Solve( wxDC* DC, int two_sides ) +int PCB_EDIT_FRAME::Solve( wxDC* DC, int aLayersCount ) { int current_net_code; int row_source, col_source, row_target, col_target; @@ -272,6 +276,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int two_sides ) bool stop = false; wxString msg; int routedCount = 0; // routed ratsnest count + bool two_sides = aLayersCount == 2; m_canvas->SetAbortRequest( false ); @@ -522,7 +527,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, } InitQueue(); /* initialize the search queue */ - apx_dist = GetApxDist( row_source, col_source, row_target, col_target ); + apx_dist = RoutingMatrix.GetApxDist( row_source, col_source, row_target, col_target ); /* Initialize first search. */ if( two_sides ) /* Preferred orientation. */ @@ -713,7 +718,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, } olddir = RoutingMatrix.GetDir( r, c, side ); - newdist = d + CalcDist( ndir[i], olddir, + newdist = d + RoutingMatrix.CalcDist( ndir[i], olddir, ( olddir == FROM_OTHERSIDE ) ? RoutingMatrix.GetDir( r, c, 1 - side ) : 0, side ); @@ -725,7 +730,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, RoutingMatrix.SetDist( nr, nc, side, newdist ); if( SetQueue( nr, nc, side, newdist, - GetApxDist( nr, nc, row_target, col_target ), + RoutingMatrix.GetApxDist( nr, nc, row_target, col_target ), row_target, col_target ) == 0 ) { return ERR_MEMORY; @@ -736,7 +741,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, RoutingMatrix.SetDir( nr, nc, side, ndir[i] ); RoutingMatrix.SetDist( nr, nc, side, newdist ); ReSetQueue( nr, nc, side, newdist, - GetApxDist( nr, nc, row_target, col_target ), + RoutingMatrix.GetApxDist( nr, nc, row_target, col_target ), row_target, col_target ); } } @@ -781,7 +786,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe, if( skip ) /* neighboring hole or trace? */ continue; /* yes, can't drill via here */ - newdist = d + CalcDist( FROM_OTHERSIDE, olddir, 0, side ); + newdist = d + RoutingMatrix.CalcDist( FROM_OTHERSIDE, olddir, 0, side ); /* if (a) not visited yet, * or (b) we have found a better path, diff --git a/pcbnew/autorouter/work.cpp b/pcbnew/autorouter/work.cpp index 0db5dad007..11d0f1841b 100644 --- a/pcbnew/autorouter/work.cpp +++ b/pcbnew/autorouter/work.cpp @@ -41,9 +41,9 @@ #include -struct CWORK // a unit of work is a source-target (a ratsnet item) to connect +struct CWORK // a unit of work is a source-target to connect + // this is a ratsnest item in the routing matrix world { - struct CWORK* m_Next; int m_FromRow; // source row int m_FromCol; // source column int m_ToRow; // target row @@ -53,34 +53,22 @@ struct CWORK // a unit of work is a source-target (a ratsnet item) to connect int m_ApxDist; // approximate distance int m_Cost; // cost for sort by length int m_Priority; // route priority + + // the function that calculates the cost of this ratsnest: + void CalculateCost(); }; -// pointers to the first and last item of work to do -static CWORK* Head = NULL; -static CWORK* Tail = NULL; -static CWORK* Current = NULL; +// the list of ratsnests +static std::vector WorkList; +static unsigned Current = 0; // initialize the work list void InitWork() { - CWORK* ptr; - - while( ( ptr = Head ) != NULL ) - { - Head = ptr->m_Next; - delete ptr; - } - - Tail = Current = NULL; -} - - -// initialize the work list -void ReInitWork() -{ - Current = Head; + WorkList.clear(); + Current = 0; } @@ -89,40 +77,24 @@ void ReInitWork() * 1 if OK * 0 if memory allocation failed */ -static int GetCost( int r1, int c1, int r2, int c2 ); int SetWork( int r1, int c1, int n_c, int r2, int c2, RATSNEST_ITEM* pt_ch, int pri ) { - CWORK* p; - - if( ( p = (CWORK*) operator new( sizeof(CWORK), std::nothrow ) ) != NULL ) - { - p->m_FromRow = r1; - p->m_FromCol = c1; - p->m_NetCode = n_c; - p->m_ToRow = r2; - p->m_ToCol = c2; - p->m_Ratsnest = pt_ch; - p->m_ApxDist = GetApxDist( r1, c1, r2, c2 ); - p->m_Cost = GetCost( r1, c1, r2, c2 ); - p->m_Priority = pri; - p->m_Next = NULL; - - if( Head ) /* attach at end */ - Tail->m_Next = p; - else /* first in list */ - Head = Current = p; - - Tail = p; - return 1; - } - else /* can't get any more memory */ - { - return 0; - } + CWORK item; + item.m_FromRow = r1; + item.m_FromCol = c1; + item.m_NetCode = n_c; + item.m_ToRow = r2; + item.m_ToCol = c2; + item.m_Ratsnest = pt_ch; + item.m_ApxDist = RoutingMatrix.GetApxDist( r1, c1, r2, c2 ); + item.CalculateCost(); + item.m_Priority = pri; + WorkList.push_back( item ); + return 1; } @@ -132,15 +104,15 @@ void GetWork( int* r1, int* c1, int* r2, int* c2, RATSNEST_ITEM** pt_ch ) { - if( Current ) + if( Current < WorkList.size() ) { - *r1 = Current->m_FromRow; - *c1 = Current->m_FromCol; - *n_c = Current->m_NetCode; - *r2 = Current->m_ToRow; - *c2 = Current->m_ToCol; - *pt_ch = Current->m_Ratsnest; - Current = Current->m_Next; + *r1 = WorkList[Current].m_FromRow; + *c1 = WorkList[Current].m_FromCol; + *n_c = WorkList[Current].m_NetCode; + *r2 = WorkList[Current].m_ToRow; + *c2 = WorkList[Current].m_ToCol; + *pt_ch = WorkList[Current].m_Ratsnest; + Current++; } else /* none left */ { @@ -151,64 +123,18 @@ void GetWork( int* r1, int* c1, } -/* order the work items; shortest (low cost) first */ +// order the work items; shortest (low cost) first: +bool sort_by_cost( const CWORK& ref, const CWORK& item ) +{ + if( ref.m_Priority == item.m_Priority ) + return ref.m_Cost < item.m_Cost; + + return ref.m_Priority >= item.m_Priority; +} + void SortWork() { - CWORK* p; - CWORK* q0; /* put PRIORITY PAD_CONNECTs in q0 */ - CWORK* q1; /* sort other PAD_CONNECTs in q1 */ - CWORK* r; - - q0 = q1 = NULL; - - while( (p = Head) != NULL ) /* prioritize each work item */ - { - Head = Head->m_Next; - - if( p->m_Priority ) /* put at end of priority list */ - { - p->m_Next = NULL; - - if( (r = q0) == NULL ) /* empty list? */ - { - q0 = p; - } - else /* attach at end */ - { - while( r->m_Next ) /* search for end */ - r = r->m_Next; - - r->m_Next = p; /* attach */ - } - } - else if( ( ( r = q1 ) == NULL ) || ( p->m_Cost < q1->m_Cost ) ) - { - p->m_Next = q1; - q1 = p; - } - else /* find proper position in list */ - { - while( r->m_Next && p->m_Cost >= r->m_Next->m_Cost ) - r = r->m_Next; - - p->m_Next = r->m_Next; - r->m_Next = p; - } - } - - if( (p = q0) != NULL ) /* any priority PAD_CONNECTs? */ - { - while( q0->m_Next ) - q0 = q0->m_Next; - - q0->m_Next = q1; - } - else - p = q1; - - /* reposition Head and Tail */ - for( Head = Current = Tail = p; Tail && Tail->m_Next; Tail = Tail->m_Next ) - ; + sort( WorkList.begin(), WorkList.end(), sort_by_cost ); } @@ -216,13 +142,13 @@ void SortWork() * cost = (| dx | + | dy |) * disability * disability = 1 if dx or dy = 0, max if | dx | # | dy | */ -static int GetCost( int r1, int c1, int r2, int c2 ) +void CWORK::CalculateCost() { int dx, dy, mx, my; double incl = 1.0; - dx = abs( c2 - c1 ); - dy = abs( r2 - r1 ); + dx = abs( m_ToCol - m_FromCol ); + dy = abs( m_ToRow - m_FromRow ); mx = dx; my = dy; @@ -234,5 +160,5 @@ static int GetCost( int r1, int c1, int r2, int c2 ) if( mx ) incl += (2 * (double) my / mx); - return (int) ( ( dx + dy ) * incl ); + m_Cost = (int) ( ( dx + dy ) * incl ); } diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 5ff61d02da..c7e127ea2a 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1204,7 +1204,9 @@ BOARD* PCB_IO::Load( const wxString& aFileName, BOARD* aAppendToMe, PROPERTIES* if( !file.IsOpened() ) { - THROW_IO_ERROR( _( "Unable to read file \"" ) + aFileName + wxT( "\"" ) ); + wxString msg; + msg.Printf( _( "Unable to read file \"%s\"" ), GetChars( aFileName ) ); + THROW_IO_ERROR( msg ); } PCB_PARSER parser( new FILE_LINE_READER( file.fp(), aFileName ), aAppendToMe ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index b860f52b4c..9676a7925d 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -319,7 +319,7 @@ BOARD_ITEM* PCB_PARSER::Parse() throw( IO_ERROR, PARSE_ERROR ) default: wxString err; - err.Printf( _( "unknown token \"%s\" " ), GetChars( FromUTF8() ) ); + err.Printf( _( "unknown token \"%s\"" ), GetChars( FromUTF8() ) ); THROW_PARSE_ERROR( err, CurSource(), CurLine(), CurLineNumber(), CurOffset() ); } From a6bc4a0dc6ddaabf5ff4291c31bec2d01cb38054 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 26 Jun 2012 22:18:01 +0200 Subject: [PATCH 09/25] Pcbnew: fix compil issue under wxGTK 2.8.12 --- pcbnew/dialogs/dialog_copper_zones.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index e3e08bf146..b5426adced 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -40,6 +40,8 @@ #include #include #include + +#include // needed for wx/listctrl.h, in wxGTK 2.8.12 #include From 91b0191a029c288db722280b99bbec5a14130317 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 27 Jun 2012 22:07:37 +0200 Subject: [PATCH 10/25] Pcbnew: save/load .kicad_pcb files: fix 2 minor issues. Use now English layers names to build filenames in plot functions (for techical layers), because translated names create sometimes problems in filenames. (should do not change anything for English users) --- pcbnew/class_board.cpp | 119 ++++++++++++++++++++++++++++------------ pcbnew/class_board.h | 11 +++- pcbnew/kicad_plugin.cpp | 4 +- pcbnew/pcb_parser.cpp | 5 +- pcbnew/pcbplot.cpp | 9 +-- 5 files changed, 101 insertions(+), 47 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 33715ce3da..654042e42c 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -76,7 +76,7 @@ BOARD::BOARD() : for( int layer = 0; layer < LAYER_COUNT; ++layer ) { - m_Layer[layer].m_Name = GetDefaultLayerName( layer ); + m_Layer[layer].m_Name = GetDefaultLayerName( layer, true ); if( layer <= LAST_COPPER_LAYER ) m_Layer[layer].m_Type = LT_SIGNAL; @@ -355,7 +355,7 @@ bool BOARD::SetLayer( int aIndex, const LAYER& aLayer ) } -wxString BOARD::GetLayerName( int aLayerIndex ) const +wxString BOARD::GetLayerName( int aLayerIndex, bool aTranslate ) const { if( !IsValidLayerIndex( aLayerIndex ) ) return wxEmptyString; @@ -365,14 +365,51 @@ wxString BOARD::GetLayerName( int aLayerIndex ) const { // default names were set in BOARD::BOARD() but they may be // over-ridden by BOARD::SetLayerName() - return m_Layer[aLayerIndex].m_Name; + // For non translated name, return the actual copper layer names, + // otherwise, return the native layer names + if( aTranslate || aLayerIndex < FIRST_NO_COPPER_LAYER ) + return m_Layer[aLayerIndex].m_Name; } - return GetDefaultLayerName( aLayerIndex ); + return GetDefaultLayerName( aLayerIndex, aTranslate ); } -wxString BOARD::GetDefaultLayerName( int aLayerNumber ) +// Default layer names are statically initialized, +// because we want the Enghish name and the translation +// The Enghish name is stored here, and to get the tranlation +// wxGetTranslation must be called explicitely +static const wxChar * layer_FRONT_name = _( "Front" ); +static const wxChar * layer_INNER1_name = _( "Inner1" ); +static const wxChar * layer_INNER2_name = _( "Inner2" ); +static const wxChar * layer_INNER3_name = _( "Inner3" ); +static const wxChar * layer_INNER4_name = _( "Inner4" ); +static const wxChar * layer_INNER5_name = _( "Inner5" ); +static const wxChar * layer_INNER6_name = _( "Inner6" ); +static const wxChar * layer_INNER7_name = _( "Inner7" ); +static const wxChar * layer_INNER8_name = _( "Inner8" ); +static const wxChar * layer_INNER9_name = _( "Inner9" ); +static const wxChar * layer_INNER10_name = _( "Inner10" ); +static const wxChar * layer_INNER11_name = _( "Inner11" ); +static const wxChar * layer_INNER12_name = _( "Inner12" ); +static const wxChar * layer_INNER13_name = _( "Inner13" ); +static const wxChar * layer_INNER14_name = _( "Inner14" ); +static const wxChar * layer_BACK_name = _( "Back" ); +static const wxChar * layer_ADHESIVE_BACK_name = _( "Adhes_Back" ); +static const wxChar * layer_ADHESIVE_FRONT_name = _( "Adhes_Front" ); +static const wxChar * layer_SOLDERPASTE_BACK_namet = _( "SoldP_Back" ); +static const wxChar * layer_SOLDERPASTE_FRONT_name = _( "SoldP_Front" ); +static const wxChar * layer_SILKSCREEN_BACK_name = _( "SilkS_Back" ); +static const wxChar * layer_SILKSCREEN_FRONT_name = _( "SilkS_Front" ); +static const wxChar * layer_SOLDERMASK_BACK_name = _( "Mask_Back" ); +static const wxChar * layer_SOLDERMASK_FRONT_name = _( "Mask_Front" ); +static const wxChar * layer_DRAW_name = _( "Drawings" ); +static const wxChar * layer_COMMENT_name = _( "Comments" ); +static const wxChar * layer_ECO1_name = _( "Eco1" ); +static const wxChar * layer_ECO2_name = _( "Eco2" ); +static const wxChar * layer_EDGE_name = _( "PCB_Edges" ); + +wxString BOARD::GetDefaultLayerName( int aLayerNumber, bool aTranslate ) { const wxChar* txt; @@ -382,39 +419,49 @@ wxString BOARD::GetDefaultLayerName( int aLayerNumber ) // Use a switch to explicitly show the mapping more clearly switch( aLayerNumber ) { - case LAYER_N_FRONT: txt = _( "Front" ); break; - case LAYER_N_2: txt = _( "Inner2" ); break; - case LAYER_N_3: txt = _( "Inner3" ); break; - case LAYER_N_4: txt = _( "Inner4" ); break; - case LAYER_N_5: txt = _( "Inner5" ); break; - case LAYER_N_6: txt = _( "Inner6" ); break; - case LAYER_N_7: txt = _( "Inner7" ); break; - case LAYER_N_8: txt = _( "Inner8" ); break; - case LAYER_N_9: txt = _( "Inner9" ); break; - case LAYER_N_10: txt = _( "Inner10" ); break; - case LAYER_N_11: txt = _( "Inner11" ); break; - case LAYER_N_12: txt = _( "Inner12" ); break; - case LAYER_N_13: txt = _( "Inner13" ); break; - case LAYER_N_14: txt = _( "Inner14" ); break; - case LAYER_N_15: txt = _( "Inner15" ); break; - case LAYER_N_BACK: txt = _( "Back" ); break; - case ADHESIVE_N_BACK: txt = _( "Adhes_Back" ); break; - case ADHESIVE_N_FRONT: txt = _( "Adhes_Front" ); break; - case SOLDERPASTE_N_BACK: txt = _( "SoldP_Back" ); break; - case SOLDERPASTE_N_FRONT: txt = _( "SoldP_Front" ); break; - case SILKSCREEN_N_BACK: txt = _( "SilkS_Back" ); break; - case SILKSCREEN_N_FRONT: txt = _( "SilkS_Front" ); break; - case SOLDERMASK_N_BACK: txt = _( "Mask_Back" ); break; - case SOLDERMASK_N_FRONT: txt = _( "Mask_Front" ); break; - case DRAW_N: txt = _( "Drawings" ); break; - case COMMENT_N: txt = _( "Comments" ); break; - case ECO1_N: txt = _( "Eco1" ); break; - case ECO2_N: txt = _( "Eco2" ); break; - case EDGE_N: txt = _( "PCB_Edges" ); break; - default: txt = _( "BAD INDEX" ); break; + case LAYER_N_FRONT: txt = layer_FRONT_name; break; + case LAYER_N_2: txt = layer_INNER1_name; break; + case LAYER_N_3: txt = layer_INNER2_name; break; + case LAYER_N_4: txt = layer_INNER3_name; break; + case LAYER_N_5: txt = layer_INNER4_name; break; + case LAYER_N_6: txt = layer_INNER5_name; break; + case LAYER_N_7: txt = layer_INNER6_name; break; + case LAYER_N_8: txt = layer_INNER7_name; break; + case LAYER_N_9: txt = layer_INNER8_name; break; + case LAYER_N_10: txt = layer_INNER9_name; break; + case LAYER_N_11: txt = layer_INNER10_name; break; + case LAYER_N_12: txt = layer_INNER11_name; break; + case LAYER_N_13: txt = layer_INNER12_name; break; + case LAYER_N_14: txt = layer_INNER13_name; break; + case LAYER_N_15: txt = layer_INNER14_name; break; + case LAYER_N_BACK: txt = layer_BACK_name; break; + case ADHESIVE_N_BACK: txt =layer_ADHESIVE_BACK_name; break; + case ADHESIVE_N_FRONT: txt = layer_ADHESIVE_FRONT_name; break; + case SOLDERPASTE_N_BACK: txt = layer_SOLDERPASTE_BACK_namet; break; + case SOLDERPASTE_N_FRONT: txt = layer_SOLDERPASTE_FRONT_name; break; + case SILKSCREEN_N_BACK: txt = layer_SILKSCREEN_BACK_name; break; + case SILKSCREEN_N_FRONT: txt = layer_SILKSCREEN_FRONT_name; break; + case SOLDERMASK_N_BACK: txt = layer_SOLDERMASK_BACK_name; break; + case SOLDERMASK_N_FRONT: txt = layer_SOLDERMASK_FRONT_name; break; + case DRAW_N: txt = layer_DRAW_name; break; + case COMMENT_N: txt = layer_COMMENT_name; break; + case ECO1_N: txt = layer_ECO1_name; break; + case ECO2_N: txt = layer_ECO2_name; break; + case EDGE_N: txt = layer_EDGE_name; break; + default: txt = wxT( "BAD_INDEX" ); break; } - return wxString( txt ); + wxString name; + if( aTranslate ) + { + name = wxGetTranslation( txt ); + name.Trim( true ); + name.Trim( false ); + } + else + name = txt; + + return name; } diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 59cbdc76eb..facbd7f2a8 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -303,10 +303,12 @@ public: * be different than the default if the user has renamed any copper layers. * * @param aLayerNumber is the layer number to fetch + * @param aTranslate = true to return the translated version + * = false to get the native version * @return wxString - containing the layer name or "BAD INDEX" if aLayerNumber * is not legal */ - static wxString GetDefaultLayerName( int aLayerNumber ); + static wxString GetDefaultLayerName( int aLayerNumber, bool aTranslate ); /** * Function ReturnFlippedLayerNumber @@ -619,10 +621,13 @@ public: * Function GetLayerName * returns the name of the layer given by aLayerIndex. * - * @param aLayerIndex A layer index, like LAYER_N_BACK, etc. + * @param aLayerIndex = A layer index, like LAYER_N_BACK, etc. + * @param aTranslate = true to return the translated version (default) + * = false to get the native English name + * (Useful to build filenames from layer names) * @return wxString - the layer name. */ - wxString GetLayerName( int aLayerIndex ) const; + wxString GetLayerName( int aLayerIndex, bool aTranslate = true ) const; /** * Function SetLayerName diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index c7e127ea2a..fea888811a 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -192,7 +192,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const #endif if( !( aBoard->GetVisibleLayers() & mask ) ) - m_out->Print( 0, "hide" ); + m_out->Print( 0, " hide" ); m_out->Print( 0, ")\n" ); } @@ -218,7 +218,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const #endif if( !( aBoard->GetVisibleLayers() & mask ) ) - m_out->Print( 0, "hide" ); + m_out->Print( 0, " hide" ); m_out->Print( 0, ")\n" ); } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 9676a7925d..0419f62587 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -1528,13 +1528,13 @@ MODULE* PCB_PARSER::parseMODULE() throw( IO_ERROR, PARSE_ERROR ) break; case T_descr: - NeedSYMBOL(); + NeedSYMBOLorNUMBER(); // some symbols can be 0508, so a number is also a symbol here module->SetDescription( FromUTF8() ); NeedRIGHT(); break; case T_tags: - NeedSYMBOL(); + NeedSYMBOLorNUMBER(); // some symbols can be 0508, so a number is also a symbol here module->SetKeywords( FromUTF8() ); NeedRIGHT(); break; @@ -1788,6 +1788,7 @@ EDGE_MODULE* PCB_PARSER::parseEDGE_MODULE() throw( IO_ERROR, PARSE_ERROR ) pt.y = parseBoardUnits( "Y coordinate" ); segment->SetStart0( pt ); NeedRIGHT(); + NeedLEFT(); token = NextTok(); if( token != T_end ) diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index d5e8678f8b..865dc2ac05 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -111,7 +111,7 @@ private: }; -const int UNITS_MILS = 1000; +//const int UNITS_MILS = 1000; DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) : DIALOG_PLOT_BASE( aParent ), @@ -725,9 +725,10 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event ) fn = m_parent->GetScreen()->GetFileName(); fn.SetPath( outputDir.GetPath() ); - // Create file name. - wxString layername = m_board->GetLayerName( layer ); - layername.Trim( true ); layername.Trim( false ); // remove leading and trailing spaces if any + // Create file name (from the English layer name for non copper layers). + wxString layername = m_board->GetLayerName( layer, false ); + // remove leading and trailing spaces if any + layername.Trim( true ); layername.Trim( false ); fn.SetName( fn.GetName() + wxT( "-" ) + layername ); // Use Gerber Extensions based on layer number From c7f6343bb4ee76eb38b3b0fd988a8ea5976d9023 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 30 Jun 2012 10:20:04 +0200 Subject: [PATCH 11/25] Pcbnew: fix 2 minor issues, noticeable only in debug mode. When reading board files, the net 0 was stored twice. It creates only log messges in debug mode, because the list of nets is rebuild after reading files. --- pcbnew/class_board.cpp | 11 +- ...ialog_edit_module_for_BoardEditor_base.cpp | 706 +- ...ialog_edit_module_for_BoardEditor_base.fbp | 8859 ++++++++--------- .../dialog_edit_module_for_BoardEditor_base.h | 256 +- pcbnew/legacy_plugin.cpp | 17 +- pcbnew/pcb_parser.cpp | 25 +- 6 files changed, 4896 insertions(+), 4978 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 654042e42c..02a07d1ec7 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1381,13 +1381,10 @@ NETINFO_ITEM* BOARD::FindNet( int aNetcode ) const NETINFO_ITEM* net = m_NetInfo.GetNetItem( aNetcode ); #if defined(DEBUG) - if( net ) // item can be NULL if anetcode is not valid + if( net && aNetcode != net->GetNet()) // item can be NULL if anetcode is not valid { - if( aNetcode != net->GetNet() ) - { - printf( "FindNet() anetcode %d != GetNet() %d (net: %s)\n", - aNetcode, net->GetNet(), TO_UTF8( net->GetNetname() ) ); - } + wxLogError( wxT( "FindNet() anetcode %d != GetNet() %d (net: %s)\n" ), + aNetcode, net->GetNet(), TO_UTF8( net->GetNetname() ) ); } #endif @@ -1440,7 +1437,7 @@ NETINFO_ITEM* BOARD::FindNet( const wxString& aNetname ) const if( item == NULL ) return NULL; - int icmp = item->GetNetname().Cmp( aNetname ); + int icmp = item->GetNetname().Cmp( aNetname ); if( icmp == 0 ) // found ! { diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.cpp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.cpp index 2c49c73cac..7c8c4790d9 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.cpp @@ -1,342 +1,364 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Aug 24 2011) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_edit_module_for_BoardEditor_base.h" - -/////////////////////////////////////////////////////////////////////////// - -DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL ); - - m_NoteBook = new wxNotebook( this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, 0 ); - m_PanelProperties = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); - wxBoxSizer* m_PanelPropertiesBoxSizer; - m_PanelPropertiesBoxSizer = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer13; - bSizer13 = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sbSizerRef; - sbSizerRef = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Reference") ), wxHORIZONTAL ); - - m_ReferenceCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - sbSizerRef->Add( m_ReferenceCtrl, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 ); - - m_button4 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); - sbSizerRef->Add( m_button4, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 ); - - bSizer13->Add( sbSizerRef, 0, wxALL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizerValue; - sbSizerValue = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Value") ), wxHORIZONTAL ); - - m_ValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - sbSizerValue->Add( m_ValueCtrl, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 ); - - m_button5 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); - sbSizerValue->Add( m_button5, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 ); - - bSizer13->Add( sbSizerValue, 0, wxALL|wxEXPAND, 5 ); - - wxString m_LayerCtrlChoices[] = { _("Top"), _("Bottom") }; - int m_LayerCtrlNChoices = sizeof( m_LayerCtrlChoices ) / sizeof( wxString ); - m_LayerCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Side"), wxDefaultPosition, wxDefaultSize, m_LayerCtrlNChoices, m_LayerCtrlChoices, 1, 0 ); - m_LayerCtrl->SetSelection( 0 ); - bSizer13->Add( m_LayerCtrl, 0, wxALL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizerOrientation; - sbSizerOrientation = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Orientation") ), wxVERTICAL ); - - wxString m_OrientCtrlChoices[] = { _("Normal"), _("+90.0"), _("-90.0"), _("180.0"), _("User") }; - int m_OrientCtrlNChoices = sizeof( m_OrientCtrlChoices ) / sizeof( wxString ); - m_OrientCtrl = new wxRadioBox( m_PanelProperties, ID_LISTBOX_ORIENT_SELECT, _("Orientation"), wxDefaultPosition, wxDefaultSize, m_OrientCtrlNChoices, m_OrientCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_OrientCtrl->SetSelection( 1 ); - sbSizerOrientation->Add( m_OrientCtrl, 0, wxALL|wxEXPAND, 5 ); - - m_staticText4 = new wxStaticText( m_PanelProperties, wxID_ANY, _("User orientation (in 0.1 degrees):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText4->Wrap( -1 ); - sbSizerOrientation->Add( m_staticText4, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_OrientValue = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerOrientation->Add( m_OrientValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - bSizer13->Add( sbSizerOrientation, 0, wxALL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizerPosition; - sbSizerPosition = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Position") ), wxVERTICAL ); - - wxFlexGridSizer* fgSizer2; - fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 ); - fgSizer2->AddGrowableCol( 1 ); - fgSizer2->AddGrowableRow( 2 ); - fgSizer2->SetFlexibleDirection( wxHORIZONTAL ); - fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - XPositionStatic = new wxStaticText( m_PanelProperties, wxID_ANY, _("X"), wxDefaultPosition, wxDefaultSize, 0 ); - XPositionStatic->Wrap( -1 ); - fgSizer2->Add( XPositionStatic, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_ModPositionX = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer2->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); - - YPositionStatic = new wxStaticText( m_PanelProperties, wxID_ANY, _("Y"), wxDefaultPosition, wxDefaultSize, 0 ); - YPositionStatic->Wrap( -1 ); - fgSizer2->Add( YPositionStatic, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_ModPositionY = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer2->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); - - sbSizerPosition->Add( fgSizer2, 1, wxEXPAND, 5 ); - - bSizer13->Add( sbSizerPosition, 0, wxALL|wxEXPAND, 5 ); - - m_PanelPropertiesBoxSizer->Add( bSizer13, 1, wxEXPAND, 5 ); - - m_PropRightSizer = new wxBoxSizer( wxVERTICAL ); - - m_buttonExchange = new wxButton( m_PanelProperties, ID_MODULE_PROPERTIES_EXCHANGE, _("Change Module(s)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PropRightSizer->Add( m_buttonExchange, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_buttonModuleEditor = new wxButton( m_PanelProperties, ID_GOTO_MODULE_EDITOR, _("Module Editor"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PropRightSizer->Add( m_buttonModuleEditor, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer12; - bSizer12 = new wxBoxSizer( wxHORIZONTAL ); - - wxString m_AttributsCtrlChoices[] = { _("Normal"), _("Normal+Insert"), _("Virtual") }; - int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString ); - m_AttributsCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Attributes"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_AttributsCtrl->SetSelection( 0 ); - bSizer12->Add( m_AttributsCtrl, 1, wxALL|wxEXPAND, 5 ); - - wxString m_AutoPlaceCtrlChoices[] = { _("Free"), _("Locked") }; - int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString ); - m_AutoPlaceCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Move and Auto Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_AutoPlaceCtrl->SetSelection( 0 ); - bSizer12->Add( m_AutoPlaceCtrl, 1, wxALL|wxEXPAND, 5 ); - - m_PropRightSizer->Add( bSizer12, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizerAutoplace; - sbSizerAutoplace = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Move and Place") ), wxHORIZONTAL ); - - wxBoxSizer* bSizerRotOpt; - bSizerRotOpt = new wxBoxSizer( wxVERTICAL ); - - m_staticText11 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Rotation 90 degree"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText11->Wrap( -1 ); - bSizerRotOpt->Add( m_staticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); - - m_CostRot90Ctrl = new wxSlider( m_PanelProperties, wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS ); - bSizerRotOpt->Add( m_CostRot90Ctrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - sbSizerAutoplace->Add( bSizerRotOpt, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizerMoveOpt; - bSizerMoveOpt = new wxBoxSizer( wxVERTICAL ); - - m_staticText12 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Rotation 180 degree"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText12->Wrap( -1 ); - bSizerMoveOpt->Add( m_staticText12, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); - - m_CostRot180Ctrl = new wxSlider( m_PanelProperties, wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS ); - bSizerMoveOpt->Add( m_CostRot180Ctrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - sbSizerAutoplace->Add( bSizerMoveOpt, 1, wxEXPAND, 5 ); - - m_PropRightSizer->Add( sbSizerAutoplace, 1, wxEXPAND|wxALL, 5 ); - - wxStaticBoxSizer* sbSizerLocalProperties; - sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Local Settings") ), wxVERTICAL ); - - wxBoxSizer* bSizer11; - bSizer11 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer10; - bSizer10 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText16 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16->Wrap( -1 ); - bSizer10->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - wxString m_ZoneConnectionChoiceChoices[] = { _("Use zone setting"), _("Solid"), _("Thermal relief"), _("None") }; - int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString ); - m_ZoneConnectionChoice = new wxChoice( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 ); - m_ZoneConnectionChoice->SetSelection( 0 ); - bSizer10->Add( m_ZoneConnectionChoice, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); - - bSizer11->Add( bSizer10, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticTextInfo = new wxStaticText( m_PanelProperties, wxID_ANY, _("Set clearances to 0 to use global values"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextInfo->Wrap( -1 ); - m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); - - bSizer11->Add( m_staticTextInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); - - sbSizerLocalProperties->Add( bSizer11, 0, 0, 5 ); - - wxFlexGridSizer* fgSizerClearances; - fgSizerClearances = new wxFlexGridSizer( 5, 3, 0, 0 ); - fgSizerClearances->SetFlexibleDirection( wxBOTH ); - fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticTextNetClearance = new wxStaticText( m_PanelProperties, wxID_ANY, _("All pads nets clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextNetClearance->Wrap( -1 ); - m_staticTextNetClearance->SetToolTip( _("This is the local net clearance for all pad of this footprint\nIf 0, the Netclass values are used\nThis value can be superseded by a pad local value.") ); - - fgSizerClearances->Add( m_staticTextNetClearance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_NetClearanceValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerClearances->Add( m_NetClearanceValueCtrl, 0, wxALL|wxEXPAND, 5 ); - - m_NetClearanceUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_NetClearanceUnits->Wrap( -1 ); - fgSizerClearances->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - m_staticline1 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerClearances->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_staticline2 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerClearances->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_staticline3 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerClearances->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_MaskClearanceTitle = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_MaskClearanceTitle->Wrap( -1 ); - m_MaskClearanceTitle->SetToolTip( _("This is the local clearance between pads and the solder mask\nfor this footprint\nThis value can be superseded by a pad local value.\nIf 0, the global value is used") ); - - fgSizerClearances->Add( m_MaskClearanceTitle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_SolderMaskMarginCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerClearances->Add( m_SolderMaskMarginCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); - - m_SolderMaskMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SolderMaskMarginUnits->Wrap( -1 ); - fgSizerClearances->Add( m_SolderMaskMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - m_staticTextSolderPaste = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSolderPaste->Wrap( -1 ); - m_staticTextSolderPaste->SetToolTip( _("This is the local clearance between pads and the solder paste\nfor this footprint.\nThis value can be superseded by a pad local values.\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") ); - - fgSizerClearances->Add( m_staticTextSolderPaste, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_SolderPasteMarginCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerClearances->Add( m_SolderPasteMarginCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_SolderPasteMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SolderPasteMarginUnits->Wrap( -1 ); - fgSizerClearances->Add( m_SolderPasteMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); - - m_staticTextRatio = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder mask ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextRatio->Wrap( -1 ); - m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in per cent between pads and the solder paste\nfor this footprint.\nA value of 10 means the clearance value is 10 per cent of the pad size\nThis value can be superseded by a pad local value.\nThe final clearance value is the sum of this value and the clearance value\nA negative value means a smaller mask size than pad size.") ); - - fgSizerClearances->Add( m_staticTextRatio, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_SolderPasteMarginRatioCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerClearances->Add( m_SolderPasteMarginRatioCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); - - m_SolderPasteRatioMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SolderPasteRatioMarginUnits->Wrap( -1 ); - fgSizerClearances->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 ); - - m_PropRightSizer->Add( sbSizerLocalProperties, 0, wxALL|wxEXPAND, 5 ); - - m_PanelPropertiesBoxSizer->Add( m_PropRightSizer, 0, 0, 5 ); - - m_PanelProperties->SetSizer( m_PanelPropertiesBoxSizer ); - m_PanelProperties->Layout(); - m_PanelPropertiesBoxSizer->Fit( m_PanelProperties ); - m_NoteBook->AddPage( m_PanelProperties, _("Properties"), true ); - m_Panel3D = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); - wxBoxSizer* bSizerMain3D; - bSizerMain3D = new wxBoxSizer( wxVERTICAL ); - - m_staticText3Dname = new wxStaticText( m_Panel3D, wxID_ANY, _("3D Shape Name"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText3Dname->Wrap( -1 ); - bSizerMain3D->Add( m_staticText3Dname, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_3D_ShapeNameListBox = new wxListBox( m_Panel3D, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE ); - bSizerMain3D->Add( m_3D_ShapeNameListBox, 0, wxALL|wxEXPAND, 5 ); - - wxBoxSizer* bLowerSizer3D; - bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL ); - - m_Sizer3DValues = new wxStaticBoxSizer( new wxStaticBox( m_Panel3D, wxID_ANY, _("3D Scale and Position") ), wxVERTICAL ); - - bLowerSizer3D->Add( m_Sizer3DValues, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer3DButtons; - bSizer3DButtons = new wxBoxSizer( wxVERTICAL ); - - m_buttonBrowse = new wxButton( m_Panel3D, ID_BROWSE_3D_LIB, _("Browse Shapes"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer3DButtons->Add( m_buttonBrowse, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_buttonAdd = new wxButton( m_Panel3D, ID_ADD_3D_SHAPE, _("Add 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer3DButtons->Add( m_buttonAdd, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_buttonRemove = new wxButton( m_Panel3D, ID_REMOVE_3D_SHAPE, _("Remove 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer3DButtons->Add( m_buttonRemove, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - bLowerSizer3D->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerMain3D->Add( bLowerSizer3D, 1, wxEXPAND, 5 ); - - m_Panel3D->SetSizer( bSizerMain3D ); - m_Panel3D->Layout(); - bSizerMain3D->Fit( m_Panel3D ); - m_NoteBook->AddPage( m_Panel3D, _("3D settings"), false ); - - m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND | wxALL, 5 ); - - m_sdbSizerStdButtons = new wxStdDialogButtonSizer(); - m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK ); - m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsOK ); - m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL ); - m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel ); - m_sdbSizerStdButtons->Realize(); - m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxALIGN_RIGHT|wxALL, 5 ); - - this->SetSizer( m_GeneralBoxSizer ); - this->Layout(); - - // Connect Events - m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); - m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); - m_OrientCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); - m_buttonExchange->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); - m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); - m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); - m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Browse3DLib ), NULL, this ); - m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); - m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); - m_sdbSizerStdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this ); - m_sdbSizerStdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this ); -} - -DIALOG_MODULE_BOARD_EDITOR_BASE::~DIALOG_MODULE_BOARD_EDITOR_BASE() -{ - // Disconnect Events - m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); - m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); - m_OrientCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); - m_buttonExchange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); - m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); - m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); - m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Browse3DLib ), NULL, this ); - m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); - m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); - m_sdbSizerStdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this ); - m_sdbSizerStdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this ); - -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_edit_module_for_BoardEditor_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL ); + + m_NoteBook = new wxNotebook( this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, 0 ); + m_PanelProperties = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* m_PanelPropertiesBoxSizer; + m_PanelPropertiesBoxSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer13; + bSizer13 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizerRef; + sbSizerRef = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Reference") ), wxHORIZONTAL ); + + m_ReferenceCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + sbSizerRef->Add( m_ReferenceCtrl, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 ); + + m_button4 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + sbSizerRef->Add( m_button4, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 ); + + + bSizer13->Add( sbSizerRef, 0, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerValue; + sbSizerValue = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Value") ), wxHORIZONTAL ); + + m_ValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + sbSizerValue->Add( m_ValueCtrl, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 ); + + m_button5 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + sbSizerValue->Add( m_button5, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 ); + + + bSizer13->Add( sbSizerValue, 0, wxALL|wxEXPAND, 5 ); + + wxString m_LayerCtrlChoices[] = { _("Top"), _("Bottom") }; + int m_LayerCtrlNChoices = sizeof( m_LayerCtrlChoices ) / sizeof( wxString ); + m_LayerCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Side"), wxDefaultPosition, wxDefaultSize, m_LayerCtrlNChoices, m_LayerCtrlChoices, 1, 0 ); + m_LayerCtrl->SetSelection( 0 ); + bSizer13->Add( m_LayerCtrl, 0, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerOrientation; + sbSizerOrientation = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Orientation") ), wxVERTICAL ); + + wxString m_OrientCtrlChoices[] = { _("Normal"), _("+90.0"), _("-90.0"), _("180.0"), _("User") }; + int m_OrientCtrlNChoices = sizeof( m_OrientCtrlChoices ) / sizeof( wxString ); + m_OrientCtrl = new wxRadioBox( m_PanelProperties, ID_LISTBOX_ORIENT_SELECT, _("Orientation"), wxDefaultPosition, wxDefaultSize, m_OrientCtrlNChoices, m_OrientCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_OrientCtrl->SetSelection( 1 ); + sbSizerOrientation->Add( m_OrientCtrl, 0, wxALL|wxEXPAND, 5 ); + + m_staticText4 = new wxStaticText( m_PanelProperties, wxID_ANY, _("User orientation (in 0.1 degrees):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + sbSizerOrientation->Add( m_staticText4, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_OrientValue = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerOrientation->Add( m_OrientValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + bSizer13->Add( sbSizerOrientation, 0, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerPosition; + sbSizerPosition = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Position") ), wxVERTICAL ); + + wxFlexGridSizer* fgSizer2; + fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer2->AddGrowableCol( 1 ); + fgSizer2->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + XPositionStatic = new wxStaticText( m_PanelProperties, wxID_ANY, _("X"), wxDefaultPosition, wxDefaultSize, 0 ); + XPositionStatic->Wrap( -1 ); + fgSizer2->Add( XPositionStatic, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_ModPositionX = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); + + YPositionStatic = new wxStaticText( m_PanelProperties, wxID_ANY, _("Y"), wxDefaultPosition, wxDefaultSize, 0 ); + YPositionStatic->Wrap( -1 ); + fgSizer2->Add( YPositionStatic, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_ModPositionY = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); + + + sbSizerPosition->Add( fgSizer2, 1, wxEXPAND, 5 ); + + + bSizer13->Add( sbSizerPosition, 0, wxALL|wxEXPAND, 5 ); + + + m_PanelPropertiesBoxSizer->Add( bSizer13, 1, wxEXPAND, 5 ); + + m_PropRightSizer = new wxBoxSizer( wxVERTICAL ); + + m_buttonExchange = new wxButton( m_PanelProperties, ID_MODULE_PROPERTIES_EXCHANGE, _("Change Module(s)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PropRightSizer->Add( m_buttonExchange, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_buttonModuleEditor = new wxButton( m_PanelProperties, ID_GOTO_MODULE_EDITOR, _("Module Editor"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PropRightSizer->Add( m_buttonModuleEditor, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer12; + bSizer12 = new wxBoxSizer( wxHORIZONTAL ); + + wxString m_AttributsCtrlChoices[] = { _("Normal"), _("Normal+Insert"), _("Virtual") }; + int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString ); + m_AttributsCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Attributes"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_AttributsCtrl->SetSelection( 0 ); + bSizer12->Add( m_AttributsCtrl, 1, wxALL|wxEXPAND, 5 ); + + wxString m_AutoPlaceCtrlChoices[] = { _("Free"), _("Locked") }; + int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString ); + m_AutoPlaceCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Move and Auto Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_AutoPlaceCtrl->SetSelection( 0 ); + bSizer12->Add( m_AutoPlaceCtrl, 1, wxALL|wxEXPAND, 5 ); + + + m_PropRightSizer->Add( bSizer12, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerAutoplace; + sbSizerAutoplace = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Move and Place") ), wxHORIZONTAL ); + + wxBoxSizer* bSizerRotOpt; + bSizerRotOpt = new wxBoxSizer( wxVERTICAL ); + + m_staticText11 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Rotation 90 degree"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + bSizerRotOpt->Add( m_staticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + + m_CostRot90Ctrl = new wxSlider( m_PanelProperties, wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS ); + bSizerRotOpt->Add( m_CostRot90Ctrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + + sbSizerAutoplace->Add( bSizerRotOpt, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizerMoveOpt; + bSizerMoveOpt = new wxBoxSizer( wxVERTICAL ); + + m_staticText12 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Rotation 180 degree"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12->Wrap( -1 ); + bSizerMoveOpt->Add( m_staticText12, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + + m_CostRot180Ctrl = new wxSlider( m_PanelProperties, wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS ); + bSizerMoveOpt->Add( m_CostRot180Ctrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + + sbSizerAutoplace->Add( bSizerMoveOpt, 1, wxEXPAND, 5 ); + + + m_PropRightSizer->Add( sbSizerAutoplace, 1, wxEXPAND|wxALL, 5 ); + + wxStaticBoxSizer* sbSizerLocalProperties; + sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Local Settings") ), wxVERTICAL ); + + wxBoxSizer* bSizer11; + bSizer11 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText16 = new wxStaticText( m_PanelProperties, wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + bSizer10->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + wxString m_ZoneConnectionChoiceChoices[] = { _("Use zone setting"), _("Solid"), _("Thermal relief"), _("None") }; + int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString ); + m_ZoneConnectionChoice = new wxChoice( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 ); + m_ZoneConnectionChoice->SetSelection( 0 ); + bSizer10->Add( m_ZoneConnectionChoice, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); + + + bSizer11->Add( bSizer10, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticTextInfo = new wxStaticText( m_PanelProperties, wxID_ANY, _("Set clearances to 0 to use global values"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextInfo->Wrap( -1 ); + m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + + bSizer11->Add( m_staticTextInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); + + + sbSizerLocalProperties->Add( bSizer11, 0, 0, 5 ); + + wxFlexGridSizer* fgSizerClearances; + fgSizerClearances = new wxFlexGridSizer( 5, 3, 0, 0 ); + fgSizerClearances->AddGrowableCol( 1 ); + fgSizerClearances->SetFlexibleDirection( wxBOTH ); + fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticTextNetClearance = new wxStaticText( m_PanelProperties, wxID_ANY, _("All pads nets clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextNetClearance->Wrap( -1 ); + m_staticTextNetClearance->SetToolTip( _("This is the local net clearance for all pad of this footprint\nIf 0, the Netclass values are used\nThis value can be superseded by a pad local value.") ); + + fgSizerClearances->Add( m_staticTextNetClearance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_NetClearanceValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerClearances->Add( m_NetClearanceValueCtrl, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_NetClearanceUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_NetClearanceUnits->Wrap( -1 ); + fgSizerClearances->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_staticline1 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerClearances->Add( m_staticline1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_staticline2 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerClearances->Add( m_staticline2, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_staticline3 = new wxStaticLine( m_PanelProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerClearances->Add( m_staticline3, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_MaskClearanceTitle = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MaskClearanceTitle->Wrap( -1 ); + m_MaskClearanceTitle->SetToolTip( _("This is the local clearance between pads and the solder mask\nfor this footprint\nThis value can be superseded by a pad local value.\nIf 0, the global value is used") ); + + fgSizerClearances->Add( m_MaskClearanceTitle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_SolderMaskMarginCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerClearances->Add( m_SolderMaskMarginCtrl, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); + + m_SolderMaskMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SolderMaskMarginUnits->Wrap( -1 ); + fgSizerClearances->Add( m_SolderMaskMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_staticTextSolderPaste = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSolderPaste->Wrap( -1 ); + m_staticTextSolderPaste->SetToolTip( _("This is the local clearance between pads and the solder paste\nfor this footprint.\nThis value can be superseded by a pad local values.\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") ); + + fgSizerClearances->Add( m_staticTextSolderPaste, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_SolderPasteMarginCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerClearances->Add( m_SolderPasteMarginCtrl, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_SolderPasteMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SolderPasteMarginUnits->Wrap( -1 ); + fgSizerClearances->Add( m_SolderPasteMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); + + m_staticTextRatio = new wxStaticText( m_PanelProperties, wxID_ANY, _("Solder mask ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextRatio->Wrap( -1 ); + m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in per cent between pads and the solder paste\nfor this footprint.\nA value of 10 means the clearance value is 10 per cent of the pad size\nThis value can be superseded by a pad local value.\nThe final clearance value is the sum of this value and the clearance value\nA negative value means a smaller mask size than pad size.") ); + + fgSizerClearances->Add( m_staticTextRatio, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_SolderPasteMarginRatioCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerClearances->Add( m_SolderPasteMarginRatioCtrl, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); + + m_SolderPasteRatioMarginUnits = new wxStaticText( m_PanelProperties, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SolderPasteRatioMarginUnits->Wrap( -1 ); + fgSizerClearances->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + + sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 ); + + + m_PropRightSizer->Add( sbSizerLocalProperties, 0, wxALL|wxEXPAND, 5 ); + + + m_PanelPropertiesBoxSizer->Add( m_PropRightSizer, 0, 0, 5 ); + + + m_PanelProperties->SetSizer( m_PanelPropertiesBoxSizer ); + m_PanelProperties->Layout(); + m_PanelPropertiesBoxSizer->Fit( m_PanelProperties ); + m_NoteBook->AddPage( m_PanelProperties, _("Properties"), true ); + m_Panel3D = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* bSizerMain3D; + bSizerMain3D = new wxBoxSizer( wxVERTICAL ); + + m_staticText3Dname = new wxStaticText( m_Panel3D, wxID_ANY, _("3D Shape Name"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3Dname->Wrap( -1 ); + bSizerMain3D->Add( m_staticText3Dname, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_3D_ShapeNameListBox = new wxListBox( m_Panel3D, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE ); + bSizerMain3D->Add( m_3D_ShapeNameListBox, 0, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bLowerSizer3D; + bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL ); + + m_Sizer3DValues = new wxStaticBoxSizer( new wxStaticBox( m_Panel3D, wxID_ANY, _("3D Scale and Position") ), wxVERTICAL ); + + + bLowerSizer3D->Add( m_Sizer3DValues, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer3DButtons; + bSizer3DButtons = new wxBoxSizer( wxVERTICAL ); + + m_buttonBrowse = new wxButton( m_Panel3D, ID_BROWSE_3D_LIB, _("Browse Shapes"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3DButtons->Add( m_buttonBrowse, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_buttonAdd = new wxButton( m_Panel3D, ID_ADD_3D_SHAPE, _("Add 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3DButtons->Add( m_buttonAdd, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_buttonRemove = new wxButton( m_Panel3D, ID_REMOVE_3D_SHAPE, _("Remove 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3DButtons->Add( m_buttonRemove, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + + bLowerSizer3D->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerMain3D->Add( bLowerSizer3D, 1, wxEXPAND, 5 ); + + + m_Panel3D->SetSizer( bSizerMain3D ); + m_Panel3D->Layout(); + bSizerMain3D->Fit( m_Panel3D ); + m_NoteBook->AddPage( m_Panel3D, _("3D settings"), false ); + + m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND | wxALL, 5 ); + + m_sdbSizerStdButtons = new wxStdDialogButtonSizer(); + m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK ); + m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsOK ); + m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel ); + m_sdbSizerStdButtons->Realize(); + + m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxALIGN_RIGHT|wxALL, 5 ); + + + this->SetSizer( m_GeneralBoxSizer ); + this->Layout(); + + // Connect Events + m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); + m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); + m_OrientCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); + m_buttonExchange->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); + m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); + m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); + m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Browse3DLib ), NULL, this ); + m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); + m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); + m_sdbSizerStdButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this ); + m_sdbSizerStdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this ); +} + +DIALOG_MODULE_BOARD_EDITOR_BASE::~DIALOG_MODULE_BOARD_EDITOR_BASE() +{ + // Disconnect Events + m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); + m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); + m_OrientCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); + m_buttonExchange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); + m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); + m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); + m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Browse3DLib ), NULL, this ); + m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); + m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); + m_sdbSizerStdButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnCancelClick ), NULL, this ); + m_sdbSizerStdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnOkClick ), NULL, this ); + +} diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.fbp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.fbp index 97752a50c5..8528a0780f 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.fbp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.fbp @@ -1,4489 +1,4370 @@ - - - - - - C++ - 1 - source_name - 0 - res - UTF-8 - connect - dialog_edit_module_for_BoardEditor_base - 1000 - none - 1 - dialog_edit_module_for_BoardEditor_base - - . - - 1 - 1 - 0 - 0 - - 1 - 1 - 1 - 1 - 0 - - - - - 1 - - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - impl_virtual - - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - DIALOG_MODULE_BOARD_EDITOR_BASE - 1 - - - 1 - - - Resizable - - 1 - 550,800 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - Module properties - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - m_GeneralBoxSizer - wxVERTICAL - private - - 5 - wxEXPAND | wxALL - 1 - - 1 - 1 - 1 - 1 - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_NOTEBOOK - - - 0 - - - 0 - - 1 - m_NoteBook - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Properties - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_PanelProperties - 1 - - - protected - 1 - - - Resizable - - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - wxSUNKEN_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - m_PanelPropertiesBoxSizer - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - bSizer13 - wxVERTICAL - none - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Reference - - sbSizerRef - wxHORIZONTAL - none - - - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_ReferenceCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - wxTE_READONLY - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Edit - - - 0 - - - 0 - - 1 - m_button4 - 1 - - - protected - 1 - - - Resizable - - 1 - - wxBU_EXACTFIT - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnEditReference - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Value - - sbSizerValue - wxHORIZONTAL - none - - - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_ValueCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - wxTE_READONLY - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Edit - - - 0 - - - 0 - - 1 - m_button5 - 1 - - - protected - 1 - - - Resizable - - 1 - - wxBU_EXACTFIT - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnEditValue - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Top" "Bottom" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Side - - 1 - - 0 - - - 0 - - 1 - m_LayerCtrl - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Orientation - - sbSizerOrientation - wxVERTICAL - none - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Normal" "+90.0" "-90.0" "180.0" "User" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_LISTBOX_ORIENT_SELECT - Orientation - - 1 - - 0 - - - 0 - - 1 - m_OrientCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - ModuleOrientEvent - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - User orientation (in 0.1 degrees): - - - 0 - - - 0 - - 1 - m_staticText4 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_OrientValue - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Position - - sbSizerPosition - wxVERTICAL - none - - - 5 - wxEXPAND - 1 - - 2 - wxHORIZONTAL - 1 - 2 - 0 - - fgSizer2 - wxFLEX_GROWMODE_SPECIFIED - none - 2 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxALL|wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - X - - - 0 - - - 0 - - 1 - XPositionStatic - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_ModPositionX - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Y - - - 0 - - - 0 - - 1 - YPositionStatic - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_ModPositionY - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - - m_PropRightSizer - wxVERTICAL - private - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_MODULE_PROPERTIES_EXCHANGE - Change Module(s) - - - 0 - - - 0 - - 1 - m_buttonExchange - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - ExchangeModule - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_GOTO_MODULE_EDITOR - Module Editor - - - 0 - - - 0 - - 1 - m_buttonModuleEditor - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - GotoModuleEditor - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizer12 - wxHORIZONTAL - none - - 5 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Normal" "Normal+Insert" "Virtual" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Attributes - - 1 - - 0 - - - 0 - - 1 - m_AttributsCtrl - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Free" "Locked" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Move and Auto Place - - 1 - - 0 - - - 0 - - 1 - m_AutoPlaceCtrl - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALL - 1 - - wxID_ANY - Auto Move and Place - - sbSizerAutoplace - wxHORIZONTAL - none - - - 5 - wxEXPAND - 1 - - - bSizerRotOpt - wxVERTICAL - none - - 5 - wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Rotation 90 degree - - - 0 - - - 0 - - 1 - m_staticText11 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 10 - - 0 - - 0 - - 0 - - 1 - m_CostRot90Ctrl - 1 - - - protected - 1 - - - Resizable - - 1 - - wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizerMoveOpt - wxVERTICAL - none - - 5 - wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Rotation 180 degree - - - 0 - - - 0 - - 1 - m_staticText12 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 10 - - 0 - - 0 - - 0 - - 1 - m_CostRot180Ctrl - 1 - - - protected - 1 - - - Resizable - - 1 - - wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Local Settings - - sbSizerLocalProperties - wxVERTICAL - none - - - 5 - - 0 - - - bSizer11 - wxVERTICAL - none - - 5 - wxEXPAND|wxALIGN_CENTER_HORIZONTAL - 1 - - - bSizer10 - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pad connection to zones: - - - 0 - - - 0 - - 1 - m_staticText16 - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Use zone setting" "Solid" "Thermal relief" "None" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_ZoneConnectionChoice - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - ,90,92,-1,70,0 - 0 - 0 - wxID_ANY - Set clearances to 0 to use global values - - - 0 - - - 0 - - 1 - m_staticTextInfo - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 3 - wxBOTH - - - 0 - - fgSizerClearances - wxFLEX_GROWMODE_SPECIFIED - none - 5 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - All pads nets clearance: - - - 0 - - - 0 - - 1 - m_staticTextNetClearance - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - This is the local net clearance for all pad of this footprint If 0, the Netclass values are used This value can be superseded by a pad local value. - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_NetClearanceValueCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Inch - - - 0 - - - 0 - - 1 - m_NetClearanceUnits - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_staticline1 - 1 - - - protected - 1 - - - Resizable - - 1 - - wxLI_HORIZONTAL - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_staticline2 - 1 - - - protected - 1 - - - Resizable - - 1 - - wxLI_HORIZONTAL - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_staticline3 - 1 - - - protected - 1 - - - Resizable - - 1 - - wxLI_HORIZONTAL - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Solder mask clearance: - - - 0 - - - 0 - - 1 - m_MaskClearanceTitle - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - This is the local clearance between pads and the solder mask for this footprint This value can be superseded by a pad local value. If 0, the global value is used - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_SolderMaskMarginCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Inch - - - 0 - - - 0 - - 1 - m_SolderMaskMarginUnits - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Solder paste clearance: - - - 0 - - - 0 - - 1 - m_staticTextSolderPaste - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - This is the local clearance between pads and the solder paste for this footprint. This value can be superseded by a pad local values. The final clearance value is the sum of this value and the clearance value ratio A negative value means a smaller mask size than pad size - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_SolderPasteMarginCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Inch - - - 0 - - - 0 - - 1 - m_SolderPasteMarginUnits - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Solder mask ratio clearance: - - - 0 - - - 0 - - 1 - m_staticTextRatio - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - This is the local clearance ratio in per cent between pads and the solder paste for this footprint. A value of 10 means the clearance value is 10 per cent of the pad size This value can be superseded by a pad local value. The final clearance value is the sum of this value and the clearance value A negative value means a smaller mask size than pad size. - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_SolderPasteMarginRatioCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - % - - - 0 - - - 0 - - 1 - m_SolderPasteRatioMarginUnits - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3D settings - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_Panel3D - 1 - - - protected - 1 - - - Resizable - - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - wxSUNKEN_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bSizerMain3D - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - 3D Shape Name - - - 0 - - - 0 - - 1 - m_staticText3Dname - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_3D_ShapeNameListBox - 1 - - - protected - 1 - - - Resizable - - 1 - - wxLB_SINGLE - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - On3DShapeNameSelected - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bLowerSizer3D - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - wxID_ANY - 3D Scale and Position - - m_Sizer3DValues - wxVERTICAL - public - - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - - bSizer3DButtons - wxVERTICAL - none - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_BROWSE_3D_LIB - Browse Shapes - - - 0 - - - 0 - - 1 - m_buttonBrowse - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - Browse3DLib - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_ADD_3D_SHAPE - Add 3D Shape - - - 0 - - - 0 - - 1 - m_buttonAdd - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - Add3DShape - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_REMOVE_3D_SHAPE - Remove 3D Shape - - - 0 - - - 0 - - 1 - m_buttonRemove - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - Remove3DShape - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALIGN_RIGHT|wxALL - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_sdbSizerStdButtons - protected - - OnCancelClick - - - - OnOkClick - - - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_edit_module_for_BoardEditor_base + 1000 + none + 1 + dialog_edit_module_for_BoardEditor_base + + . + + 1 + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_MODULE_BOARD_EDITOR_BASE + + 544,599 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Module properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + m_GeneralBoxSizer + wxVERTICAL + private + + 5 + wxEXPAND | wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_NOTEBOOK + + 0 + + + 0 + + 1 + m_NoteBook + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Properties + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_PanelProperties + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxSUNKEN_BORDER|wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + m_PanelPropertiesBoxSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer13 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Reference + + sbSizerRef + wxHORIZONTAL + none + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ReferenceCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_READONLY + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Edit + + 0 + + + 0 + + 1 + m_button4 + 1 + + + protected + 1 + + Resizable + 1 + + wxBU_EXACTFIT + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnEditReference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Value + + sbSizerValue + wxHORIZONTAL + none + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ValueCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_READONLY + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Edit + + 0 + + + 0 + + 1 + m_button5 + 1 + + + protected + 1 + + Resizable + 1 + + wxBU_EXACTFIT + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnEditValue + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Top" "Bottom" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Side + 1 + + 0 + + + 0 + + 1 + m_LayerCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Orientation + + sbSizerOrientation + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Normal" "+90.0" "-90.0" "180.0" "User" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_LISTBOX_ORIENT_SELECT + Orientation + 1 + + 0 + + + 0 + + 1 + m_OrientCtrl + 1 + + + protected + 1 + + Resizable + 1 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + ModuleOrientEvent + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + User orientation (in 0.1 degrees): + + 0 + + + 0 + + 1 + m_staticText4 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_OrientValue + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Position + + sbSizerPosition + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 2 + wxHORIZONTAL + 1 + + 0 + + fgSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALIGN_CENTER_VERTICAL|wxALL|wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + X + + 0 + + + 0 + + 1 + XPositionStatic + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ModPositionX + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Y + + 0 + + + 0 + + 1 + YPositionStatic + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ModPositionY + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + + m_PropRightSizer + wxVERTICAL + private + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_MODULE_PROPERTIES_EXCHANGE + Change Module(s) + + 0 + + + 0 + + 1 + m_buttonExchange + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + ExchangeModule + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_GOTO_MODULE_EDITOR + Module Editor + + 0 + + + 0 + + 1 + m_buttonModuleEditor + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + GotoModuleEditor + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer12 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Normal" "Normal+Insert" "Virtual" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Attributes + 1 + + 0 + + + 0 + + 1 + m_AttributsCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Free" "Locked" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Move and Auto Place + 1 + + 0 + + + 0 + + 1 + m_AutoPlaceCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 1 + + wxID_ANY + Auto Move and Place + + sbSizerAutoplace + wxHORIZONTAL + none + + + 5 + wxEXPAND + 1 + + + bSizerRotOpt + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Rotation 90 degree + + 0 + + + 0 + + 1 + m_staticText11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 10 + + 0 + + 0 + + 0 + + 1 + m_CostRot90Ctrl + 1 + + + protected + 1 + + Resizable + 1 + + wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizerMoveOpt + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Rotation 180 degree + + 0 + + + 0 + + 1 + m_staticText12 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 10 + + 0 + + 0 + + 0 + + 1 + m_CostRot180Ctrl + 1 + + + protected + 1 + + Resizable + 1 + + wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Local Settings + + sbSizerLocalProperties + wxVERTICAL + none + + + 5 + + 0 + + + bSizer11 + wxVERTICAL + none + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL + 1 + + + bSizer10 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pad connection to zones: + + 0 + + + 0 + + 1 + m_staticText16 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Use zone setting" "Solid" "Thermal relief" "None" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_ZoneConnectionChoice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,-1,70,0 + 0 + 0 + wxID_ANY + Set clearances to 0 to use global values + + 0 + + + 0 + + 1 + m_staticTextInfo + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 3 + wxBOTH + 1 + + 0 + + fgSizerClearances + wxFLEX_GROWMODE_SPECIFIED + none + 5 + 0 + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + All pads nets clearance: + + 0 + + + 0 + + 1 + m_staticTextNetClearance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the local net clearance for all pad of this footprint If 0, the Netclass values are used This value can be superseded by a pad local value. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_NetClearanceValueCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Inch + + 0 + + + 0 + + 1 + m_NetClearanceUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline2 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline3 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder mask clearance: + + 0 + + + 0 + + 1 + m_MaskClearanceTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the local clearance between pads and the solder mask for this footprint This value can be superseded by a pad local value. If 0, the global value is used + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SolderMaskMarginCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Inch + + 0 + + + 0 + + 1 + m_SolderMaskMarginUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder paste clearance: + + 0 + + + 0 + + 1 + m_staticTextSolderPaste + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the local clearance between pads and the solder paste for this footprint. This value can be superseded by a pad local values. The final clearance value is the sum of this value and the clearance value ratio A negative value means a smaller mask size than pad size + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxLEFT|wxRIGHT|wxTOP + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SolderPasteMarginCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Inch + + 0 + + + 0 + + 1 + m_SolderPasteMarginUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder mask ratio clearance: + + 0 + + + 0 + + 1 + m_staticTextRatio + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the local clearance ratio in per cent between pads and the solder paste for this footprint. A value of 10 means the clearance value is 10 per cent of the pad size This value can be superseded by a pad local value. The final clearance value is the sum of this value and the clearance value A negative value means a smaller mask size than pad size. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SolderPasteMarginRatioCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + % + + 0 + + + 0 + + 1 + m_SolderPasteRatioMarginUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3D settings + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_Panel3D + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxSUNKEN_BORDER|wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerMain3D + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 3D Shape Name + + 0 + + + 0 + + 1 + m_staticText3Dname + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_3D_ShapeNameListBox + 1 + + + protected + 1 + + Resizable + 1 + + wxLB_SINGLE + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + On3DShapeNameSelected + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bLowerSizer3D + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + wxID_ANY + 3D Scale and Position + + m_Sizer3DValues + wxVERTICAL + public + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + + bSizer3DButtons + wxVERTICAL + none + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_BROWSE_3D_LIB + Browse Shapes + + 0 + + + 0 + + 1 + m_buttonBrowse + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + Browse3DLib + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_ADD_3D_SHAPE + Add 3D Shape + + 0 + + + 0 + + 1 + m_buttonAdd + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + Add3DShape + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_REMOVE_3D_SHAPE + Remove 3D Shape + + 0 + + + 0 + + 1 + m_buttonRemove + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + Remove3DShape + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_RIGHT|wxALL + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizerStdButtons + protected + + OnCancelClick + + + + OnOkClick + + + + + + + + diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.h b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.h index 8b25ef71cb..e2894069f2 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.h +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.h @@ -1,128 +1,128 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Aug 24 2011) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ -#define __DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -#define ID_NOTEBOOK 1000 -#define ID_LISTBOX_ORIENT_SELECT 1001 -#define ID_MODULE_PROPERTIES_EXCHANGE 1002 -#define ID_GOTO_MODULE_EDITOR 1003 -#define ID_BROWSE_3D_LIB 1004 -#define ID_ADD_3D_SHAPE 1005 -#define ID_REMOVE_3D_SHAPE 1006 - -/////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_MODULE_BOARD_EDITOR_BASE -/////////////////////////////////////////////////////////////////////////////// -class DIALOG_MODULE_BOARD_EDITOR_BASE : public wxDialog -{ - private: - wxBoxSizer* m_GeneralBoxSizer; - wxBoxSizer* m_PropRightSizer; - - protected: - wxNotebook* m_NoteBook; - wxPanel* m_PanelProperties; - wxTextCtrl* m_ReferenceCtrl; - wxButton* m_button4; - wxTextCtrl* m_ValueCtrl; - wxButton* m_button5; - wxRadioBox* m_LayerCtrl; - wxRadioBox* m_OrientCtrl; - wxStaticText* m_staticText4; - wxTextCtrl* m_OrientValue; - wxStaticText* XPositionStatic; - wxTextCtrl* m_ModPositionX; - wxStaticText* YPositionStatic; - wxTextCtrl* m_ModPositionY; - wxButton* m_buttonExchange; - wxButton* m_buttonModuleEditor; - wxRadioBox* m_AttributsCtrl; - wxRadioBox* m_AutoPlaceCtrl; - wxStaticText* m_staticText11; - wxSlider* m_CostRot90Ctrl; - wxStaticText* m_staticText12; - wxSlider* m_CostRot180Ctrl; - wxStaticText* m_staticText16; - wxChoice* m_ZoneConnectionChoice; - wxStaticText* m_staticTextInfo; - wxStaticText* m_staticTextNetClearance; - wxTextCtrl* m_NetClearanceValueCtrl; - wxStaticText* m_NetClearanceUnits; - wxStaticLine* m_staticline1; - wxStaticLine* m_staticline2; - wxStaticLine* m_staticline3; - wxStaticText* m_MaskClearanceTitle; - wxTextCtrl* m_SolderMaskMarginCtrl; - wxStaticText* m_SolderMaskMarginUnits; - wxStaticText* m_staticTextSolderPaste; - wxTextCtrl* m_SolderPasteMarginCtrl; - wxStaticText* m_SolderPasteMarginUnits; - wxStaticText* m_staticTextRatio; - wxTextCtrl* m_SolderPasteMarginRatioCtrl; - wxStaticText* m_SolderPasteRatioMarginUnits; - wxPanel* m_Panel3D; - wxStaticText* m_staticText3Dname; - wxListBox* m_3D_ShapeNameListBox; - wxButton* m_buttonBrowse; - wxButton* m_buttonAdd; - wxButton* m_buttonRemove; - wxStdDialogButtonSizer* m_sdbSizerStdButtons; - wxButton* m_sdbSizerStdButtonsOK; - wxButton* m_sdbSizerStdButtonsCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnEditReference( wxCommandEvent& event ) { event.Skip(); } - virtual void OnEditValue( wxCommandEvent& event ) { event.Skip(); } - virtual void ModuleOrientEvent( wxCommandEvent& event ) { event.Skip(); } - virtual void ExchangeModule( wxCommandEvent& event ) { event.Skip(); } - virtual void GotoModuleEditor( wxCommandEvent& event ) { event.Skip(); } - virtual void On3DShapeNameSelected( wxCommandEvent& event ) { event.Skip(); } - virtual void Browse3DLib( wxCommandEvent& event ) { event.Skip(); } - virtual void Add3DShape( wxCommandEvent& event ) { event.Skip(); } - virtual void Remove3DShape( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } - - - public: - wxStaticBoxSizer* m_Sizer3DValues; - - DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Module properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,800 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_MODULE_BOARD_EDITOR_BASE(); - -}; - -#endif //__DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ +#define __DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +#define ID_NOTEBOOK 1000 +#define ID_LISTBOX_ORIENT_SELECT 1001 +#define ID_MODULE_PROPERTIES_EXCHANGE 1002 +#define ID_GOTO_MODULE_EDITOR 1003 +#define ID_BROWSE_3D_LIB 1004 +#define ID_ADD_3D_SHAPE 1005 +#define ID_REMOVE_3D_SHAPE 1006 + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_MODULE_BOARD_EDITOR_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_MODULE_BOARD_EDITOR_BASE : public wxDialog +{ + private: + wxBoxSizer* m_GeneralBoxSizer; + wxBoxSizer* m_PropRightSizer; + + protected: + wxNotebook* m_NoteBook; + wxPanel* m_PanelProperties; + wxTextCtrl* m_ReferenceCtrl; + wxButton* m_button4; + wxTextCtrl* m_ValueCtrl; + wxButton* m_button5; + wxRadioBox* m_LayerCtrl; + wxRadioBox* m_OrientCtrl; + wxStaticText* m_staticText4; + wxTextCtrl* m_OrientValue; + wxStaticText* XPositionStatic; + wxTextCtrl* m_ModPositionX; + wxStaticText* YPositionStatic; + wxTextCtrl* m_ModPositionY; + wxButton* m_buttonExchange; + wxButton* m_buttonModuleEditor; + wxRadioBox* m_AttributsCtrl; + wxRadioBox* m_AutoPlaceCtrl; + wxStaticText* m_staticText11; + wxSlider* m_CostRot90Ctrl; + wxStaticText* m_staticText12; + wxSlider* m_CostRot180Ctrl; + wxStaticText* m_staticText16; + wxChoice* m_ZoneConnectionChoice; + wxStaticText* m_staticTextInfo; + wxStaticText* m_staticTextNetClearance; + wxTextCtrl* m_NetClearanceValueCtrl; + wxStaticText* m_NetClearanceUnits; + wxStaticLine* m_staticline1; + wxStaticLine* m_staticline2; + wxStaticLine* m_staticline3; + wxStaticText* m_MaskClearanceTitle; + wxTextCtrl* m_SolderMaskMarginCtrl; + wxStaticText* m_SolderMaskMarginUnits; + wxStaticText* m_staticTextSolderPaste; + wxTextCtrl* m_SolderPasteMarginCtrl; + wxStaticText* m_SolderPasteMarginUnits; + wxStaticText* m_staticTextRatio; + wxTextCtrl* m_SolderPasteMarginRatioCtrl; + wxStaticText* m_SolderPasteRatioMarginUnits; + wxPanel* m_Panel3D; + wxStaticText* m_staticText3Dname; + wxListBox* m_3D_ShapeNameListBox; + wxButton* m_buttonBrowse; + wxButton* m_buttonAdd; + wxButton* m_buttonRemove; + wxStdDialogButtonSizer* m_sdbSizerStdButtons; + wxButton* m_sdbSizerStdButtonsOK; + wxButton* m_sdbSizerStdButtonsCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnEditReference( wxCommandEvent& event ) { event.Skip(); } + virtual void OnEditValue( wxCommandEvent& event ) { event.Skip(); } + virtual void ModuleOrientEvent( wxCommandEvent& event ) { event.Skip(); } + virtual void ExchangeModule( wxCommandEvent& event ) { event.Skip(); } + virtual void GotoModuleEditor( wxCommandEvent& event ) { event.Skip(); } + virtual void On3DShapeNameSelected( wxCommandEvent& event ) { event.Skip(); } + virtual void Browse3DLib( wxCommandEvent& event ) { event.Skip(); } + virtual void Add3DShape( wxCommandEvent& event ) { event.Skip(); } + virtual void Remove3DShape( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + wxStaticBoxSizer* m_Sizer3DValues; + + DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Module properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 544,599 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_MODULE_BOARD_EDITOR_BASE(); + +}; + +#endif //__DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index fd56d27267..3ddc148331 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1713,13 +1713,11 @@ void LEGACY_PLUGIN::loadPCB_LINE() THROW_IO_ERROR( "Missing '$EndDRAWSEGMENT'" ); } - void LEGACY_PLUGIN::loadNETINFO_ITEM() { char buf[1024]; NETINFO_ITEM* net = new NETINFO_ITEM( m_board ); - m_board->AppendNet( net ); while( READLINE( m_reader ) ) { @@ -1738,7 +1736,15 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() } else if( TESTLINE( "$EndEQUIPOT" ) ) + { + // net 0 should be already in list, so store this net + // if it is not the net 0, or if the net 0 does not exists. + if( net->GetNet() > 0 || m_board->FindNet( 0 ) == NULL ) + m_board->AppendNet( net ); + else + delete net; return; // preferred exit + } } THROW_IO_ERROR( "Missing '$EndEQUIPOT'" ); @@ -2135,8 +2141,11 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() } zc->SetTimeStamp( timestamp ); - zc->SetNet( netcode ); - zc->SetNetName( FROM_UTF8( buf ) ); + // Init the net code only, not the netname, to be sure + // the zone net name is the name read in file. + // (When mismatch, the user will be prompted in DRC, to fix the actual name) + zc->BOARD_CONNECTED_ITEM::SetNet( netcode ); + zc->SetNetName( FROM_UTF8( buf ) ); // init the net name here } else if( TESTLINE( "ZLayer" ) ) // layer found diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 0419f62587..2334f7fd7c 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -605,7 +605,7 @@ void PCB_PARSER::parseTITLE_BLOCK() throw( IO_ERROR, PARSE_ERROR ) default: wxString err; - err.Printf( _( "%d is not a valid title block comment number" ), commentNumber ); + err.Printf( wxT( "%d is not a valid title block comment number" ), commentNumber ); THROW_PARSE_ERROR( err, CurSource(), CurLine(), CurLineNumber(), CurOffset() ); } @@ -705,7 +705,7 @@ int PCB_PARSER::lookUpLayer() throw( PARSE_ERROR, IO_ERROR ) if( it == m_layerMap.end() ) { wxString error; - error.Printf( _( "Layer '%s' in file <%s> at line %d, position %d was not defined in the layers section" ), + error.Printf( wxT( "Layer '%s' in file <%s> at line %d, position %d was not defined in the layers section" ), GetChars( name ), GetChars( CurSource() ), CurLineNumber(), CurOffset() ); THROW_IO_ERROR( error ); } @@ -720,7 +720,7 @@ int PCB_PARSER::lookUpLayer() throw( PARSE_ERROR, IO_ERROR ) if( !m_board->IsLayerEnabled( layerIndex ) ) { wxString error; - error.Printf( _( "Layer index %d in file <%s> at line %d, offset %d was not defined in the layers section" ), + error.Printf( wxT( "Layer index %d in file <%s> at line %d, offset %d was not defined in the layers section" ), layerIndex, GetChars( CurSource() ), CurLineNumber(), CurOffset() ); THROW_IO_ERROR( error ); } @@ -1003,10 +1003,16 @@ void PCB_PARSER::parseNETINFO_ITEM() throw( IO_ERROR, PARSE_ERROR ) wxString name = FromUTF8(); NeedRIGHT(); - NETINFO_ITEM* net = new NETINFO_ITEM( m_board ); - net->SetNet( number ); - net->SetNetname( name ); - m_board->AppendNet( net ); + // net 0 should be already in list, so store this net + // if it is not the net 0, or if the net 0 does not exists. + // (TODO: a better test.) + if( number > 0 || m_board->FindNet( 0 ) == NULL ) + { + NETINFO_ITEM* net = new NETINFO_ITEM( m_board ); + net->SetNet( number ); + net->SetNetname( name ); + m_board->AppendNet( net ); + } } @@ -2322,7 +2328,10 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) switch( token ) { case T_net: - zone->SetNet( parseInt( "net number" ) ); + // Init the net code only, not the netname, to be sure + // the zone net name is the name read in file. + // (When mismatch, the user will be prompted in DRC, to fix the actual name) + zone->BOARD_CONNECTED_ITEM::SetNet( parseInt( "net number" ) ); NeedRIGHT(); break; From 1f1a7703d9b285f1ac3c864f4dbcd3ad07c470e6 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 3 Jul 2012 15:46:58 +0200 Subject: [PATCH 12/25] Pcbnew, gen Excellon files: fix truncation coordinates in decimal format, units = inches (old bug) Coordinates were using always 3 digits (1/1000 inch for mantissa). Uses now 4 digits max in inches and 3 digits max in mm The resolution is therefore 1/10000 inch or 1/1000 mm. Note this is a limitation of Excellon format. --- pcbnew/gendrill.cpp | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/pcbnew/gendrill.cpp b/pcbnew/gendrill.cpp index 83d032eef4..2da9d6a257 100644 --- a/pcbnew/gendrill.cpp +++ b/pcbnew/gendrill.cpp @@ -424,17 +424,39 @@ void EXCELLON_WRITER::WriteCoordinates( char* aLine, double aCoordX, double aCoo int xpad = m_precision.m_lhs + m_precision.m_rhs; int ypad = xpad; - /* I need to come up with an algorithm that handles any lhs:rhs format.*/ - /* one idea is to take more inputs for xpad/ypad when metric is used. */ - switch( DIALOG_GENDRILL::m_ZerosFormat ) { default: case DECIMAL_FORMAT: - sprintf( aLine, "X%.3fY%.3f\n", aCoordX, aCoordY ); + /* In Excellon files, resolution is 1/1000 mm or 1/10000 inch (0.1 mil) + * Although in decimal format, Excellon specifications do not specify + * clearly the resolution. However it seems to be 1/1000mm or 0.1 mil + * like in non decimal formats, so we trunk coordinates to 3 or 4 digits in mantissa + * Decimal format just prohibit useless leading 0: + * 0.45 or .45 is right, but 00.54 is incorrect. + */ + if( m_unitsDecimal ) + { + // resolution is 1/1000 mm + xs.Printf( wxT( "%.3f" ), aCoordX ); + ys.Printf( wxT( "%.3f" ), aCoordY ); + } + else + { + // resolution is 1/10000 inch + xs.Printf( wxT( "%.4f" ), aCoordX ); + ys.Printf( wxT( "%.4f" ), aCoordY ); + } + + //Remove useless trailing 0 + while( xs.Last() == '0' ) + xs.RemoveLast(); + while( ys.Last() == '0' ) + ys.RemoveLast(); + sprintf( aLine, "X%sY%s\n", TO_UTF8( xs ), TO_UTF8( ys ) ); break; - case SUPPRESS_LEADING: /* that should work now */ + case SUPPRESS_LEADING: for( int i = 0; i< m_precision.m_rhs; i++ ) { aCoordX *= 10; aCoordY *= 10; From b7c5649463a628d48674f553735648e077124246 Mon Sep 17 00:00:00 2001 From: Marco Mattila Date: Wed, 4 Jul 2012 22:50:47 +0300 Subject: [PATCH 13/25] Add copy to text items in pcbnew. Automatically mirror text items added to back silkscreen (bug 1017446). --- include/wxPcbStruct.h | 11 ++++- pcbnew/edit.cpp | 8 +++ pcbnew/edit_pcb_text.cpp | 87 +++++++++++++++++---------------- pcbnew/hotkeys.cpp | 3 +- pcbnew/hotkeys.h | 1 + pcbnew/hotkeys_board_editor.cpp | 38 +++++++++++++- pcbnew/onleftclick.cpp | 2 +- pcbnew/onrightclick.cpp | 16 ++++-- pcbnew/pcbnew_id.h | 1 + 9 files changed, 115 insertions(+), 52 deletions(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 99867a7a33..e6ba96a238 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -439,6 +439,13 @@ public: bool OnHotkeyEditItem( int aIdCommand ); + /** + * Function OnHotkeyCopyItem + * returns the copy event id for copyable items. + * @return Event id of a suitable copy event, zero when no copyable item found. + */ + int OnHotkeyCopyItem(); + /** * Function OnHotkeyMoveItem * Moves or drag the item (footprint, track, text .. ) found under the mouse cursor @@ -911,9 +918,9 @@ public: // Handling texts on the board void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); void FlipTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC ); - TEXTE_PCB* Create_Texte_Pcb( wxDC* DC ); + TEXTE_PCB* CreateTextePcb( wxDC* aDC, TEXTE_PCB* aText = NULL ); void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); - void StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC ); + void StartMoveTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC, bool aErase = true ); void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); void InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB, wxDC* DC ); diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 194d94b742..fa57f44f08 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -83,6 +84,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR: case ID_POPUP_PCB_ROTATE_TEXTEPCB: case ID_POPUP_PCB_FLIP_TEXTEPCB: + case ID_POPUP_PCB_COPY_TEXTEPCB: case ID_POPUP_PCB_EDIT_TEXTEPCB: case ID_POPUP_PCB_EDIT_MIRE: case ID_POPUP_PCB_ROTATE_TEXTMODULE: @@ -939,6 +941,12 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) m_canvas->MoveCursorToCrossHair(); break; + case ID_POPUP_PCB_COPY_TEXTEPCB: + CreateTextePcb( &dc, (TEXTE_PCB*) GetCurItem() ); + m_canvas->MoveCursorToCrossHair(); + m_canvas->SetAutoPanRequest( true ); + break; + case ID_POPUP_PCB_FLIP_TEXTEPCB: FlipTextePcb( (TEXTE_PCB*) GetCurItem(), &dc ); m_canvas->MoveCursorToCrossHair(); diff --git a/pcbnew/edit_pcb_text.cpp b/pcbnew/edit_pcb_text.cpp index c04f6556fa..25ef6f389f 100644 --- a/pcbnew/edit_pcb_text.cpp +++ b/pcbnew/edit_pcb_text.cpp @@ -76,7 +76,7 @@ void Abort_Edit_Pcb_Text( EDA_DRAW_PANEL* Panel, wxDC* DC ) } - SwapData(TextePcb, &s_TextCopy); + SwapData( TextePcb, &s_TextCopy ); TextePcb->ClearFlags(); TextePcb->Draw( Panel, DC, GR_OR ); } @@ -110,10 +110,10 @@ void PCB_EDIT_FRAME::Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ) else { // Restore initial params - SwapData( TextePcb, &s_TextCopy); + SwapData( TextePcb, &s_TextCopy ); // Prepare undo command SaveCopyInUndoList( TextePcb, UR_CHANGED ); - SwapData( TextePcb, &s_TextCopy); + SwapData( TextePcb, &s_TextCopy ); // Restore current params } @@ -121,27 +121,24 @@ void PCB_EDIT_FRAME::Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ) } -/* Initialize parameters to move a pcb text - */ -void PCB_EDIT_FRAME::StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC ) +void PCB_EDIT_FRAME::StartMoveTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC, bool aErase ) { - if( TextePcb == NULL ) + if( aTextePcb == NULL ) return; // if it is an existing item: prepare a copy to undo/abort command - if( !TextePcb->IsNew() ) - s_TextCopy.Copy( TextePcb ); + if( !aTextePcb->IsNew() ) + s_TextCopy.Copy( aTextePcb ); - TextePcb->Draw( m_canvas, DC, GR_XOR ); - TextePcb->SetFlags( IS_MOVED ); - TextePcb->DisplayInfo( this ); + aTextePcb->SetFlags( IS_MOVED ); + aTextePcb->DisplayInfo( this ); - GetScreen()->SetCrossHairPosition( TextePcb->GetPosition() ); + GetScreen()->SetCrossHairPosition( aTextePcb->GetPosition() ); m_canvas->MoveCursorToCrossHair(); m_canvas->SetMouseCapture( Move_Texte_Pcb, Abort_Edit_Pcb_Text ); - SetCurItem( TextePcb ); - m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); + SetCurItem( aTextePcb ); + m_canvas->CallMouseCapture( aDC, wxDefaultPosition, aErase ); } @@ -157,7 +154,7 @@ static void Move_Texte_Pcb( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aP if( aErase ) TextePcb->Draw( aPanel, aDC, GR_XOR ); - TextePcb->m_Pos = aPanel->GetScreen()->GetCrossHairPosition(); + TextePcb->SetPosition( aPanel->GetScreen()->GetCrossHairPosition() ); TextePcb->Draw( aPanel, aDC, GR_XOR ); } @@ -177,40 +174,46 @@ void PCB_EDIT_FRAME::Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ) } -TEXTE_PCB* PCB_EDIT_FRAME::Create_Texte_Pcb( wxDC* DC ) +TEXTE_PCB* PCB_EDIT_FRAME::CreateTextePcb( wxDC* aDC, TEXTE_PCB* aText ) { - TEXTE_PCB* TextePcb; + TEXTE_PCB* textePcb = new TEXTE_PCB( GetBoard() ); - TextePcb = new TEXTE_PCB( GetBoard() ); - - /* Add text to the board item list. */ - GetBoard()->Add( TextePcb ); - - /* Update text properties. */ - TextePcb->SetFlags( IS_NEW ); - TextePcb->SetLayer( ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer ); - TextePcb->m_Mirror = false; - - if( TextePcb->GetLayer() == LAYER_N_BACK ) - TextePcb->m_Mirror = true; - - TextePcb->m_Size = GetBoard()->GetDesignSettings().m_PcbTextSize; - TextePcb->m_Pos = GetScreen()->GetCrossHairPosition(); - TextePcb->m_Thickness = GetBoard()->GetDesignSettings().m_PcbTextWidth; - - InstallTextPCBOptionsFrame( TextePcb, DC ); - - if( TextePcb->m_Text.IsEmpty() ) + if( aText ) { - TextePcb->DeleteStructure(); - TextePcb = NULL; + textePcb->Copy( aText ); + GetBoard()->Add( textePcb ); + textePcb->SetFlags( IS_NEW ); + StartMoveTextePcb( textePcb, aDC, false ); // Don't erase aText when copying } else { - StartMoveTextePcb( TextePcb, DC ); + GetBoard()->Add( textePcb ); + textePcb->SetFlags( IS_NEW ); + int layer = ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; + textePcb->SetLayer( layer ); + + if( layer == LAYER_N_BACK + || layer == SILKSCREEN_N_BACK ) + textePcb->SetMirrored( true ); + + textePcb->SetSize( GetBoard()->GetDesignSettings().m_PcbTextSize ); + textePcb->SetPosition( GetScreen()->GetCrossHairPosition() ); + textePcb->SetThickness( GetBoard()->GetDesignSettings().m_PcbTextWidth ); + + InstallTextPCBOptionsFrame( textePcb, aDC ); + + if( textePcb->GetText().IsEmpty() ) + { + textePcb->DeleteStructure(); + textePcb = NULL; + } + else + { + StartMoveTextePcb( textePcb, aDC ); + } } - return TextePcb; + return textePcb; } diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index bc64a74db8..df174ba838 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -70,6 +70,7 @@ static EDA_HOTKEY HkEditBoardItem( wxT( "Edit Item" ), HK_EDIT_ITEM, 'E' ); static EDA_HOTKEY HkFlipItem( wxT( "Flip Item" ), HK_FLIP_ITEM, 'F' ); static EDA_HOTKEY HkRotateItem( wxT( "Rotate Item" ), HK_ROTATE_ITEM, 'R' ); static EDA_HOTKEY HkMoveItem( wxT( "Move Item" ), HK_MOVE_ITEM, 'M' ); +static EDA_HOTKEY HkCopyItem( wxT( "Copy Item" ), HK_COPY_ITEM, 'C' ); static EDA_HOTKEY HkDragFootprint( wxT( "Drag Footprint" ), HK_DRAG_ITEM, 'G' ); static EDA_HOTKEY HkGetAndMoveFootprint( wxT( "Get and Move Footprint" ), HK_GET_AND_MOVE_FOOTPRINT, 'T' ); @@ -209,7 +210,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = &HkAddNewTrack, &HkAddVia, &HkAddMicroVia, &HkSwitchTrackPosture, &HkDragTrackKeepSlope, - &HkPlaceItem, + &HkPlaceItem, &HkCopyItem, &HkEndTrack, &HkMoveItem, &HkFlipItem, &HkRotateItem, &HkDragFootprint, &HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile, diff --git a/pcbnew/hotkeys.h b/pcbnew/hotkeys.h index c6f4413f44..8fd8506588 100644 --- a/pcbnew/hotkeys.h +++ b/pcbnew/hotkeys.h @@ -15,6 +15,7 @@ enum hotkey_id_commnand { HK_BACK_SPACE, HK_ROTATE_ITEM, HK_FLIP_ITEM, + HK_COPY_ITEM, HK_MOVE_ITEM, HK_DRAG_ITEM, HK_GET_AND_MOVE_FOOTPRINT, diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 4b71934430..416507b60c 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -620,6 +620,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit OnHotkeyMoveItem( HK_MOVE_ITEM ); break; + case HK_COPY_ITEM: + evt_type = OnHotkeyCopyItem(); + break; + case HK_ROTATE_ITEM: // Rotation OnHotkeyRotateItem( HK_ROTATE_ITEM ); break; @@ -631,7 +635,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit case HK_SWITCH_HIGHCONTRAST_MODE: // switch to high contrast mode and refresh the canvas DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay; m_canvas->Refresh(); - break; + break; } if( evt_type != 0 ) @@ -715,6 +719,7 @@ bool PCB_EDIT_FRAME::OnHotkeyDeleteItem( wxDC* aDC ) return true; } + bool PCB_EDIT_FRAME::OnHotkeyEditItem( int aIdCommand ) { BOARD_ITEM* item = GetCurItem(); @@ -810,6 +815,37 @@ bool PCB_EDIT_FRAME::OnHotkeyEditItem( int aIdCommand ) } +int PCB_EDIT_FRAME::OnHotkeyCopyItem() +{ + BOARD_ITEM* item = GetCurItem(); + bool itemCurrentlyEdited = item && item->GetFlags(); + + if( itemCurrentlyEdited ) + return 0; + + item = PcbGeneralLocateAndDisplay(); + + if( item == NULL ) + return 0; + + SetCurItem( item ); + + int eventId = 0; + + switch( item->Type() ) + { + case PCB_TEXT_T: + eventId = ID_POPUP_PCB_COPY_TEXTEPCB; + break; + default: + eventId = 0; + break; + } + + return eventId; +} + + bool PCB_EDIT_FRAME::OnHotkeyMoveItem( int aIdCommand ) { BOARD_ITEM* item = GetCurItem(); diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index 15b8e1f5ea..f037e987b2 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -346,7 +346,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) case ID_PCB_ADD_TEXT_BUTT: if( (DrawStruct == NULL) || (DrawStruct->GetFlags() == 0) ) { - SetCurItem( Create_Texte_Pcb( aDC ) ); + SetCurItem( CreateTextePcb( aDC ) ); m_canvas->MoveCursorToCrossHair(); m_canvas->SetAutoPanRequest( true ); } diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index 51d8dc87ed..49098f3cd2 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -839,6 +839,9 @@ void PCB_EDIT_FRAME::createPopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu ) msg = AddHotkeyName( _( "Move" ), g_Board_Editor_Hokeys_Descr, HK_MOVE_ITEM ); AddMenuItem( sub_menu_Text, ID_POPUP_PCB_MOVE_TEXTEPCB_REQUEST, msg, KiBitmap( move_text_xpm ) ); + msg = AddHotkeyName( _( "Copy" ), g_Board_Editor_Hokeys_Descr, HK_COPY_ITEM ); + AddMenuItem( sub_menu_Text, ID_POPUP_PCB_COPY_TEXTEPCB, + msg, KiBitmap( copyblock_xpm ) ); } msg = AddHotkeyName( _( "Rotate" ), g_Board_Editor_Hokeys_Descr, HK_ROTATE_ITEM ); @@ -847,12 +850,15 @@ void PCB_EDIT_FRAME::createPopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu ) AddMenuItem( sub_menu_Text, ID_POPUP_PCB_FLIP_TEXTEPCB, msg, KiBitmap( invert_module_xpm ) ); msg = AddHotkeyName( _( "Edit" ), g_Board_Editor_Hokeys_Descr, HK_EDIT_ITEM ); AddMenuItem( sub_menu_Text, ID_POPUP_PCB_EDIT_TEXTEPCB, msg, KiBitmap( edit_text_xpm ) ); - AddMenuItem( sub_menu_Text, ID_POPUP_PCB_RESET_TEXT_SIZE, - _( "Reset Size" ), KiBitmap( reset_text_xpm ) ); + if( !flags ) + { + AddMenuItem( sub_menu_Text, ID_POPUP_PCB_RESET_TEXT_SIZE, + _( "Reset Size" ), KiBitmap( reset_text_xpm ) ); - sub_menu_Text->AppendSeparator(); - msg = AddHotkeyName( _( "Delete" ), g_Board_Editor_Hokeys_Descr, HK_DELETE ); - AddMenuItem( sub_menu_Text, ID_POPUP_PCB_DELETE_TEXTEPCB, msg, KiBitmap( delete_text_xpm ) ); + sub_menu_Text->AppendSeparator(); + msg = AddHotkeyName( _( "Delete" ), g_Board_Editor_Hokeys_Descr, HK_DELETE ); + AddMenuItem( sub_menu_Text, ID_POPUP_PCB_DELETE_TEXTEPCB, msg, KiBitmap( delete_text_xpm ) ); + } } diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index b1fa634428..527bac274f 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -66,6 +66,7 @@ enum pcbnew_ids ID_POPUP_PCB_MOVE_TEXTEPCB_REQUEST, ID_POPUP_PCB_ROTATE_TEXTEPCB, + ID_POPUP_PCB_COPY_TEXTEPCB, ID_POPUP_PCB_FLIP_TEXTEPCB, ID_POPUP_PCB_EDIT_TEXTEPCB, ID_POPUP_PCB_DELETE_TEXTEPCB, From 0459b4dafa46a61a31c222df14438db26f7f889f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 5 Jul 2012 11:29:42 +0200 Subject: [PATCH 14/25] Pcbnew: fix incorrect detection of arcs having angles != 90 degrees --- pcbnew/class_board.cpp | 4 +- pcbnew/class_drawsegment.cpp | 88 ++++++++++++++++-------------------- pcbnew/class_drawsegment.h | 6 +++ 3 files changed, 48 insertions(+), 50 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 02a07d1ec7..a495faf219 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -376,8 +376,8 @@ wxString BOARD::GetLayerName( int aLayerIndex, bool aTranslate ) const // Default layer names are statically initialized, -// because we want the Enghish name and the translation -// The Enghish name is stored here, and to get the tranlation +// because we want the English name and the translation +// The English name is stored here, and to get the tranlation // wxGetTranslation must be called explicitely static const wxChar * layer_FRONT_name = _( "Front" ); static const wxChar * layer_INNER1_name = _( "Inner1" ); diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 2984d7c6c1..157f52907e 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -112,7 +112,6 @@ void DRAWSEGMENT::Flip( const wxPoint& aCentre ) SetLayer( BOARD::ReturnFlippedLayerNumber( GetLayer() ) ); } - const wxPoint DRAWSEGMENT::GetArcEnd() const { wxPoint endPoint; // start of arc @@ -134,45 +133,23 @@ const wxPoint DRAWSEGMENT::GetArcEnd() const return endPoint; // after rotation, the end of the arc. } - -/* use GetArcStart() now -const wxPoint DRAWSEGMENT::GetStart() const +const double DRAWSEGMENT::GetArcAngleStart() const { - switch( m_Shape ) - { - case S_ARC: - return m_End; // the start of the arc is held in field m_End, center point is in m_Start. + // due to the Y axis orient atan2 needs - y value + double angleStart = atan2( (double)(GetArcStart().y - GetCenter().y), + (double)(GetArcStart().x - GetCenter().x) ); + // angleStart is in radians, convert it in 1/10 degrees + angleStart = angleStart / M_PI * 1800.0; - case S_SEGMENT: - default: - return m_Start; - } + // Normalize it to 0 ... 360 deg, to avoid discontinuity for angles near 180 deg + // because 180 deg and -180 are very near angles when ampping betewwen -180 ... 180 deg. + // and this is not easy to handle in calculations + if( angleStart < 0 ) + angleStart += 3600.0; + + return angleStart; } - -const wxPoint DRAWSEGMENT::GetEnd() const -{ - wxPoint endPoint; // start of arc - - switch( m_Shape ) - { - case S_ARC: - // rotate the starting point of the arc, given by m_End, through the - // angle m_Angle to get the ending point of the arc. - // m_Start is the arc centre - endPoint = m_End; // m_End = start point of arc - RotatePoint( &endPoint, m_Start, -m_Angle ); - return endPoint; // after rotation, the end of the arc. - break; - - case S_SEGMENT: - default: - return m_End; - } -} -*/ - - void DRAWSEGMENT::SetAngle( double aAngle ) { NORMALIZE_ANGLE_360( aAngle ); @@ -450,14 +427,12 @@ EDA_RECT DRAWSEGMENT::GetBoundingBox() const bool DRAWSEGMENT::HitTest( const wxPoint& aPosition ) { - /* Calculate coordinates to test relative to segment origin. */ - wxPoint relPos = aPosition - m_Start; - switch( m_Shape ) { case S_CIRCLE: case S_ARC: { + wxPoint relPos = aPosition - GetCenter(); int radius = GetRadius(); int dist = (int) hypot( (double) relPos.x, (double) relPos.y ); @@ -466,18 +441,35 @@ bool DRAWSEGMENT::HitTest( const wxPoint& aPosition ) if( m_Shape == S_CIRCLE ) return true; - wxPoint startVec = wxPoint( m_End.x - m_Start.x, m_End.y - m_Start.y ); - wxPoint endVec = m_End - m_Start; - RotatePoint( &endVec, -m_Angle ); + // For arcs, the test point angle must be >= arc angle start + // and <= arc angle end + // However angle values > 360 deg are not easy to handle + // so we calculate the relative angle between arc start point and teast point + // this relative arc should be < arc angle if arc angle > 0 (CW arc) + // and > arc angle if arc angle < 0 (CCW arc) + double arc_angle_start = GetArcAngleStart(); // Always 0.0 ... 360 deg, in 0.1 deg - // Check dot products - if( (long long)relPos.x*startVec.x + (long long)relPos.y*startVec.y < 0 ) - return false; + double arc_hittest = atan2( (double) relPos.y, (double) relPos.x ); + arc_hittest = arc_hittest / M_PI * 1800; // angles are in 1/10 deg - if( (long long)relPos.x*endVec.x + (long long)relPos.y*endVec.y < 0 ) - return false; + // Calculate relative angle between the starting point of the arc, and the test point + arc_hittest -= arc_angle_start; - return true; + // Normalise arc_hittest between 0 ... 360 deg + NORMALIZE_ANGLE_POS( arc_hittest ); + + // Check angle: inside the arc angle when it is > 0 + // and outside the not drawn arc when it is < 0 + if( GetAngle() >= 0.0 ) + { + if( arc_hittest <= GetAngle() ) + return true; + } + else + { + if( arc_hittest >= (3600.0 + GetAngle()) ) + return true; + } } } break; diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h index 048d355251..dc2b745919 100644 --- a/pcbnew/class_drawsegment.h +++ b/pcbnew/class_drawsegment.h @@ -120,6 +120,12 @@ public: const wxPoint& GetArcStart() const { return m_End; } const wxPoint GetArcEnd() const; + /** + * function GetArcAngleStart() + * @return the angle of the stating point of this arc, between 0 and 3600 in 0.1 deg + */ + const double GetArcAngleStart() const; + /** * Function GetRadius * returns the radius of this item From 7f16520498f7dc75623014856f3cc058153c4f7e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 5 Jul 2012 13:37:48 +0200 Subject: [PATCH 15/25] Eeschema: bug fix: when creating new connections, junctions were not always automatically added when needed. Fix an other minor bug. --- eeschema/bus-wire-junction.cpp | 55 ++++++++++++++-------------------- 1 file changed, 22 insertions(+), 33 deletions(-) diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index 8f642869e6..724ed17dcc 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -50,10 +50,10 @@ static void AbortCreateNewLine( EDA_DRAW_PANEL* Panel, wxDC* DC ); static void ComputeBreakPoint( SCH_LINE* segment, const wxPoint& new_pos ); -static DLIST< SCH_ITEM > s_wires; -static DLIST< SCH_ITEM > s_oldWires; - -static wxPoint s_startPoint; +static DLIST< SCH_ITEM > s_wires; // when creating a new set of wires, + // stores here the new wires. +static DLIST< SCH_ITEM > s_oldWires; // when creating a new set of wires, + // stores here the old wires (for undo command) /** @@ -125,7 +125,6 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type ) if( !segment ) /* first point : Create first wire or bus */ { - s_startPoint = cursorpos; GetScreen()->ExtractWires( s_oldWires, true ); GetScreen()->SchematicCleanUp( m_canvas ); @@ -228,50 +227,40 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC ) wxCHECK_RET( item->Type() == SCH_LINE_T, wxT( "Unexpected object type in wire list." ) ); segment = (SCH_LINE*) item; + item = item->Next(); if( segment->IsNull() ) - { - wxLogDebug( wxT( "Removing null segment: " ) + segment->GetSelectMenuText() ); - - SCH_ITEM* previousSegment = item->Back(); - - delete s_wires.Remove( item ); - - if( previousSegment == NULL ) - item = s_wires.begin(); - else - item = previousSegment; - wxLogDebug( wxT( "Segment count after removal: %d" ), s_wires.GetCount() ); - } - - item = item->Next(); + delete s_wires.Remove( segment ); } if( s_wires.GetCount() == 0 ) return; - // Get the last non-null wire. + // Get the last non-null wire (this is the last created segment). m_itemToRepeat = segment = (SCH_LINE*) s_wires.GetLast(); screen->SetCurItem( NULL ); m_canvas->EndMouseCapture( -1, -1, wxEmptyString, false ); + // store the terminal point of this last segment: a junction could be needed + // (the last wire could be merged/deleted/modified, and lost) + wxPoint endpoint = segment->GetEndPoint(); + + // store the starting point of this first segment: a junction could be needed + SCH_LINE* firstsegment = (SCH_LINE*) s_wires.GetFirst(); + wxPoint startPoint = firstsegment->GetStartPoint(); + screen->Append( s_wires ); - // Correct and remove segments that need merged. + // Correct and remove segments that need to be merged. screen->SchematicCleanUp( NULL, DC ); - // A junction may be needed to connect the last segment. If the last segment was - // removed by a cleanup, a junction may be needed to connect the segment's end point - // which is also the same as the previous segment's start point. - if( screen->IsJunctionNeeded( segment->GetEndPoint() ) ) - screen->Append( AddJunction( DC, segment->GetEndPoint() ) ); - else if( screen->IsJunctionNeeded( segment->GetStartPoint() ) ) - screen->Append( AddJunction( DC, segment->GetStartPoint() ) ); + // A junction could be needed to connect the end point of the last created segment. + if( screen->IsJunctionNeeded( endpoint ) ) + screen->Append( AddJunction( DC, endpoint ) ); - // Automatically place a junction on the start point if necessary because the cleanup - // can suppress intermediate points by merging wire segments. - if( screen->IsJunctionNeeded( s_startPoint ) ) - screen->Append( AddJunction( DC, s_startPoint ) ); + // A junction could be needed to connect the start point of the set of new created wires + if( screen->IsJunctionNeeded( startPoint ) ) + screen->Append( AddJunction( DC, startPoint ) ); m_canvas->Refresh(); From 04a17d3347d9af6992d3ab1fb75c2e8cd2b1f64f Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 5 Jul 2012 13:02:45 -0400 Subject: [PATCH 16/25] Save and load print parameters and minor code cleaning in new Pcbnew file format. --- pcbnew/kicad_plugin.cpp | 29 ----------------------------- pcbnew/pcb_parser.cpp | 32 ++++++++------------------------ pcbnew/pcb_parser.h | 7 ++----- 3 files changed, 10 insertions(+), 58 deletions(-) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index fea888811a..6a2eedf0d7 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -134,11 +134,7 @@ void PCB_IO::Format( BOARD_ITEM* aItem, int aNestLevel ) const void PCB_IO::formatLayer( const BOARD_ITEM* aItem ) const { -#if 1 m_out->Print( 0, " (layer %s)", m_out->Quotew( aItem->GetLayerName() ).c_str() ); -#else - m_out->Print( 0, " (layer %d)", aItem->GetLayer() ); -#endif } @@ -181,15 +177,9 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const { if( mask & aBoard->GetEnabledLayers() ) { -#if USE_LAYER_NAMES m_out->Print( aNestLevel+1, "(%d %s %s", layer, m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str(), LAYER::ShowType( aBoard->GetLayerType( layer ) ) ); -#else - m_out->Print( aNestLevel+1, "(%d %s %s", layer, - m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str(), - LAYER::ShowType( aBoard->GetLayerType( layer ) ) ); -#endif if( !( aBoard->GetVisibleLayers() & mask ) ) m_out->Print( 0, " hide" ); @@ -209,13 +199,8 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const { if( mask & aBoard->GetEnabledLayers() ) { -#if USE_LAYER_NAMES m_out->Print( aNestLevel+1, "(%d %s user", layer, m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str() ); -#else - m_out->Print( aNestLevel+1, "(%d %s user", layer, - m_out->Quotew( aBoard->GetLayerName( layer ) ).c_str() ); -#endif if( !( aBoard->GetVisibleLayers() & mask ) ) m_out->Print( 0, " hide" ); @@ -325,9 +310,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( aNestLevel+1, "(visible_elements %X)\n", aBoard->GetDesignSettings().GetVisibleElements() ); -#if SAVE_PCB_PLOT_PARAMS aBoard->GetPlotOptions().Format( m_out, aNestLevel+1 ); -#endif m_out->Print( aNestLevel, ")\n\n" ); @@ -792,11 +775,7 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const { if( layerMask & 1 ) { -#if 1 m_out->Print( 0, " %s", m_out->Quotew( m_board->GetLayerName( layer ) ).c_str() ); -#else - m_out->Print( 0, " %d", layer ); -#endif } } @@ -951,13 +930,9 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const if( aTrack->GetDrill() != UNDEFINED_DRILL_DIAMETER ) m_out->Print( 0, " (drill %s)", FMT_IU( aTrack->GetDrill() ).c_str() ); -#if 1 m_out->Print( 0, " (layers %s %s)", m_out->Quotew( m_board->GetLayerName( layer1 ) ).c_str(), m_out->Quotew( m_board->GetLayerName( layer2 ) ).c_str() ); -#else - m_out->Print( 0, " (layers %d %d)", layer1, layer2 ); -#endif } else { @@ -965,11 +940,7 @@ void PCB_IO::format( TRACK* aTrack, int aNestLevel ) const FMT_IU( aTrack->GetStart() ).c_str(), FMT_IU( aTrack->GetEnd() ).c_str(), FMT_IU( aTrack->GetWidth() ).c_str() ); -#if 1 m_out->Print( 0, " (layer %s)", m_out->Quotew( aTrack->GetLayerName() ).c_str() ); -#else - m_out->Print( 0, " (layer %d)", aTrack->GetLayer() ); -#endif } m_out->Print( 0, " (net %d)", aTrack->GetNet() ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 2334f7fd7c..c1aa57f3e5 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -698,7 +698,6 @@ void PCB_PARSER::parseLayers() throw( IO_ERROR, PARSE_ERROR ) int PCB_PARSER::lookUpLayer() throw( PARSE_ERROR, IO_ERROR ) { -#if USE_LAYER_NAMES wxString name = FromUTF8(); const LAYER_HASH_MAP::iterator it = m_layerMap.find( name ); @@ -711,22 +710,6 @@ int PCB_PARSER::lookUpLayer() throw( PARSE_ERROR, IO_ERROR ) } return m_layerMap[ name ]; -#else - if( CurTok() != T_NUMBER ) - Expecting( T_NUMBER ); - - int layerIndex = parseInt(); - - if( !m_board->IsLayerEnabled( layerIndex ) ) - { - wxString error; - error.Printf( wxT( "Layer index %d in file <%s> at line %d, offset %d was not defined in the layers section" ), - layerIndex, GetChars( CurSource() ), CurLineNumber(), CurOffset() ); - THROW_IO_ERROR( error ); - } - - return layerIndex; -#endif } @@ -941,8 +924,8 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) case T_aux_axis_origin: { - int x = parseBoardUnits( "auxilary origin X" ); - int y = parseBoardUnits( "auxilary origin Y" ); + int x = parseBoardUnits( "auxiliary origin X" ); + int y = parseBoardUnits( "auxiliary origin Y" ); // x, y are not evaluated left to right, since they are push on stack right to left m_board->SetOriginAxisPosition( wxPoint( x, y ) ); NeedRIGHT(); @@ -954,7 +937,6 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) NeedRIGHT(); break; -#if SAVE_PCB_PLOT_PARAMS case T_pcbplotparams: { PCB_PLOT_PARAMS plotParams; @@ -962,9 +944,11 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) plotParams.Parse( &parser ); m_board->SetPlotOptions( plotParams ); + + // I don't know why but this seems to fix a problem in PCB_PLOT_PARAMS::Parse(). + NextTok(); break; } -#endif default: Unexpected( CurText() ); @@ -2308,12 +2292,12 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as ZONE_CONTAINER." ) ); - int hatchStyle = CPolyLine::NO_HATCH; // Fix compil warning - int hatchPitch = 0; // Fix compil warning + int hatchStyle = CPolyLine::NO_HATCH; // Fix compile warning + int hatchPitch = 0; // Fix compile warning wxPoint pt; T token; - // bigger scope since each filled_polygon is concatonated in here + // bigger scope since each filled_polygon is concatenated in here std::vector< CPolyPt > pts; auto_ptr< ZONE_CONTAINER > zone( new ZONE_CONTAINER( m_board ) ); diff --git a/pcbnew/pcb_parser.h b/pcbnew/pcb_parser.h index f94d9c558e..cbbbe7ecd9 100644 --- a/pcbnew/pcb_parser.h +++ b/pcbnew/pcb_parser.h @@ -54,12 +54,9 @@ class ZONE_CONTAINER; WX_DECLARE_STRING_HASH_MAP( int, LAYER_HASH_MAP ); -#define USE_LAYER_NAMES 1 // Set to 0 to format and parse layers by index number. -#define SAVE_PCB_PLOT_PARAMS 0 // Set to 1 to save and load the PCB plot dialog data. - /** * Class PCB_PARSER - * reads a Pcbnew s-expression fromatted #LINE_READER object and returns the appropriate + * reads a Pcbnew s-expression formatted #LINE_READER object and returns the appropriate * #BOARD_ITEM object. */ class PCB_PARSER : public PCB_LEXER @@ -124,7 +121,7 @@ class PCB_PARSER : public PCB_LEXER * parses a coordinate pair (xy X Y) in board units (mm). * * The parser checks if the previous token was T_LEFT and parses the remainder of - * the token syntax. This is used when parsing a list of coorinate points. This + * the token syntax. This is used when parsing a list of coordinate points. This * way the parser can be used in either case. * * @throw PARSE_ERROR if the coordinate pair syntax is incorrect. From 1da099dd1f9c6404fbf13460dd421c42352db8af Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 7 Jul 2012 13:27:44 -0500 Subject: [PATCH 17/25] fix for bug 1022026 --- pcbnew/legacy_plugin.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 3ddc148331..5e194ae943 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -106,10 +106,16 @@ typedef LEGACY_PLUGIN::BIU BIU; #define SZ( x ) (sizeof(x)-1) +static const char delims[] = " \t\r\n"; + + +static bool inline isSpace( int c ) { return strchr( delims, c ) != 0; } + + //-------------------------------------------------------- /// C string compare test for a specific length of characters. -#define TESTLINE( x ) ( !strnicmp( line, x, SZ( x ) ) && isspace( line[SZ( x )] ) ) +#define TESTLINE( x ) ( !strnicmp( line, x, SZ( x ) ) && isSpace( line[SZ( x )] ) ) /// C sub-string compare test for a specific length of characters. #define TESTSUBSTR( x ) ( !strnicmp( line, x, SZ( x ) ) ) @@ -141,7 +147,6 @@ static inline unsigned ReadLine( LINE_READER* rdr, const char* caller ) #define READLINE( rdr ) ReadLine( rdr, __FUNCTION__ ) #endif -static const char delims[] = " \t\r\n"; using namespace std; // auto_ptr @@ -1101,8 +1106,10 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) data = data + ReadDelimitedText( mypadname, data, sizeof(mypadname) ) + 1; // +1 trailing whitespace // sscanf( PtLine, " %s %d %d %d %d %d", BufCar, &m_Size.x, &m_Size.y, &m_DeltaSize.x, &m_DeltaSize.y, &m_Orient ); - + while( isSpace( *data ) ) + ++data; int padshape = *data++; + BIU size_x = biuParse( data, &data ); BIU size_y = biuParse( data, &data ); BIU delta_x = biuParse( data, &data ); From 096f4a1080b1b422bfa38c079d41c72f25a85d2a Mon Sep 17 00:00:00 2001 From: Marco Mattila Date: Mon, 9 Jul 2012 01:02:00 +0300 Subject: [PATCH 18/25] Add rotation field to pcbnew text item property dialog. --- pcbnew/dialogs/dialog_pcb_text_properties.cpp | 29 +- .../dialog_pcb_text_properties_base.cpp | 153 +- .../dialog_pcb_text_properties_base.fbp | 3572 ++++++++--------- .../dialogs/dialog_pcb_text_properties_base.h | 32 +- 4 files changed, 1832 insertions(+), 1954 deletions(-) diff --git a/pcbnew/dialogs/dialog_pcb_text_properties.cpp b/pcbnew/dialogs/dialog_pcb_text_properties.cpp index ded9a99770..9de5af6f5b 100644 --- a/pcbnew/dialogs/dialog_pcb_text_properties.cpp +++ b/pcbnew/dialogs/dialog_pcb_text_properties.cpp @@ -135,27 +135,9 @@ void DIALOG_PCB_TEXT_PROPERTIES::MyInit() } } - switch( (int) m_SelectedPCBText->GetOrientation() ) - { - default: - m_OrientationCtrl->SetSelection( 0 ); - break; - - case 900: - case -2700: - m_OrientationCtrl->SetSelection( 1 ); - break; - - case 1800: - case -1800: - m_OrientationCtrl->SetSelection( 2 ); - break; - - case 2700: - case -900: - m_OrientationCtrl->SetSelection( 3 ); - break; - } + wxString orientationStr; + orientationStr << m_SelectedPCBText->GetOrientation(); + m_OrientationCtrl->SetValue( orientationStr ); if( m_SelectedPCBText->m_Mirror ) m_DisplayCtrl->SetSelection( 1 ); @@ -263,7 +245,10 @@ void DIALOG_PCB_TEXT_PROPERTIES::OnOkClick( wxCommandEvent& event ) m_SelectedPCBText->m_Mirror = (m_DisplayCtrl->GetSelection() == 1) ? true : false; // Set the text orientation - m_SelectedPCBText->m_Orient = m_OrientationCtrl->GetSelection() * 900; + long orientation; + m_OrientationCtrl->GetValue().ToLong( &orientation ); + orientation = orientation % 3600; + m_SelectedPCBText->SetOrientation( orientation ); // Set whether the PCB text is slanted (it is not italics, as italics has additional curves in style) m_SelectedPCBText->m_Italic = m_StyleCtrl->GetSelection() ? 1 : 0; diff --git a/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp b/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp index aa857d718b..c68284866e 100644 --- a/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp +++ b/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 19 2012) +// C++ code generated with wxFormBuilder (version Apr 11 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -29,121 +29,106 @@ DIALOG_PCB_TEXT_PROPERTIES_BASE::DIALOG_PCB_TEXT_PROPERTIES_BASE( wxWindow* pare bSizer9->Add( m_TextContentCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - wxBoxSizer* bSizerLower; - bSizerLower = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizerLeft; - bSizerLeft = new wxBoxSizer( wxVERTICAL ); + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 6, 4, 0, 0 ); + fgSizer1->AddGrowableCol( 0 ); + fgSizer1->AddGrowableCol( 1 ); + fgSizer1->AddGrowableCol( 2 ); + fgSizer1->AddGrowableCol( 3 ); + fgSizer1->SetFlexibleDirection( wxBOTH ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); m_SizeXLabel = new wxStaticText( this, wxID_ANY, _("Size X"), wxDefaultPosition, wxDefaultSize, 0 ); m_SizeXLabel->Wrap( -1 ); - bSizerLeft->Add( m_SizeXLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_SizeXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerLeft->Add( m_SizeXCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_SizeYLabel = new wxStaticText( this, wxID_ANY, _("Size Y"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SizeYLabel->Wrap( -1 ); - bSizerLeft->Add( m_SizeYLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_SizeYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerLeft->Add( m_SizeYCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_ThicknessLabel = new wxStaticText( this, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ThicknessLabel->Wrap( -1 ); - bSizerLeft->Add( m_ThicknessLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_ThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerLeft->Add( m_ThicknessCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - - bSizerLower->Add( bSizerLeft, 1, 0, 5 ); - - wxBoxSizer* bSizerRight; - bSizerRight = new wxBoxSizer( wxVERTICAL ); + fgSizer1->Add( m_SizeXLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_PositionXLabel = new wxStaticText( this, wxID_ANY, _("Position X"), wxDefaultPosition, wxDefaultSize, 0 ); m_PositionXLabel->Wrap( -1 ); - bSizerRight->Add( m_PositionXLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_PositionXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerRight->Add( m_PositionXCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_PositionYLabel = new wxStaticText( this, wxID_ANY, _("Position Y"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PositionYLabel->Wrap( -1 ); - bSizerRight->Add( m_PositionYLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_PositionYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerRight->Add( m_PositionYCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + fgSizer1->Add( m_PositionXLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_LayerLabel = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayerLabel->Wrap( -1 ); - bSizerRight->Add( m_LayerLabel, 0, wxLEFT|wxRIGHT, 5 ); + fgSizer1->Add( m_LayerLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_staticText10 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText10->Wrap( -1 ); + fgSizer1->Add( m_staticText10, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_SizeXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_SizeXCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_PositionXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_PositionXCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxArrayString m_LayerSelectionCtrlChoices; m_LayerSelectionCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_LayerSelectionCtrlChoices, 0 ); m_LayerSelectionCtrl->SetSelection( 0 ); m_LayerSelectionCtrl->SetToolTip( _("Select the layer on which text should lay.") ); - bSizerRight->Add( m_LayerSelectionCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - - bSizerLower->Add( bSizerRight, 1, 0, 5 ); - - wxBoxSizer* bSizer5; - bSizer5 = new wxBoxSizer( wxVERTICAL ); - - m_staticText8 = new wxStaticText( this, wxID_ANY, _("Orientation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText8->Wrap( -1 ); - bSizer5->Add( m_staticText8, 0, wxLEFT|wxRIGHT, 5 ); - - wxString m_OrientationCtrlChoices[] = { _("0"), _("90"), _("180"), _("-90") }; - int m_OrientationCtrlNChoices = sizeof( m_OrientationCtrlChoices ) / sizeof( wxString ); - m_OrientationCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_OrientationCtrlNChoices, m_OrientationCtrlChoices, 0 ); - m_OrientationCtrl->SetSelection( 0 ); - bSizer5->Add( m_OrientationCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_staticText9 = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText9->Wrap( -1 ); - bSizer5->Add( m_staticText9, 0, wxLEFT|wxRIGHT, 5 ); - - wxString m_StyleCtrlChoices[] = { _("Normal"), _("Italic") }; - int m_StyleCtrlNChoices = sizeof( m_StyleCtrlChoices ) / sizeof( wxString ); - m_StyleCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_StyleCtrlNChoices, m_StyleCtrlChoices, 0 ); - m_StyleCtrl->SetSelection( 0 ); - bSizer5->Add( m_StyleCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - - bSizerLower->Add( bSizer5, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer6; - bSizer6 = new wxBoxSizer( wxVERTICAL ); - - m_staticText10 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText10->Wrap( -1 ); - bSizer6->Add( m_staticText10, 0, wxLEFT|wxRIGHT, 5 ); + fgSizer1->Add( m_LayerSelectionCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxString m_DisplayCtrlChoices[] = { _("Normal"), _("Mirrored") }; int m_DisplayCtrlNChoices = sizeof( m_DisplayCtrlChoices ) / sizeof( wxString ); m_DisplayCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_DisplayCtrlNChoices, m_DisplayCtrlChoices, 0 ); m_DisplayCtrl->SetSelection( 0 ); - bSizer6->Add( m_DisplayCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + fgSizer1->Add( m_DisplayCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_SizeYLabel = new wxStaticText( this, wxID_ANY, _("Size Y"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SizeYLabel->Wrap( -1 ); + fgSizer1->Add( m_SizeYLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_PositionYLabel = new wxStaticText( this, wxID_ANY, _("Position Y"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PositionYLabel->Wrap( -1 ); + fgSizer1->Add( m_PositionYLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_staticText9 = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( -1 ); + fgSizer1->Add( m_staticText9, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_staticText11 = new wxStaticText( this, wxID_ANY, _("Justification:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText11->Wrap( -1 ); - bSizer6->Add( m_staticText11, 0, wxLEFT|wxRIGHT, 5 ); + fgSizer1->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_SizeYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_SizeYCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_PositionYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_PositionYCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + wxString m_StyleCtrlChoices[] = { _("Normal"), _("Italic") }; + int m_StyleCtrlNChoices = sizeof( m_StyleCtrlChoices ) / sizeof( wxString ); + m_StyleCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_StyleCtrlNChoices, m_StyleCtrlChoices, 0 ); + m_StyleCtrl->SetSelection( 0 ); + fgSizer1->Add( m_StyleCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); wxString m_justifyChoiceChoices[] = { _("Left"), _("Center"), _("Right") }; int m_justifyChoiceNChoices = sizeof( m_justifyChoiceChoices ) / sizeof( wxString ); m_justifyChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_justifyChoiceNChoices, m_justifyChoiceChoices, 0 ); m_justifyChoice->SetSelection( 0 ); - bSizer6->Add( m_justifyChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + fgSizer1->Add( m_justifyChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_ThicknessLabel = new wxStaticText( this, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ThicknessLabel->Wrap( -1 ); + fgSizer1->Add( m_ThicknessLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_orientationLabel = new wxStaticText( this, wxID_ANY, _("Orientation (0.1 deg):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_orientationLabel->Wrap( -1 ); + fgSizer1->Add( m_orientationLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - bSizerLower->Add( bSizer6, 0, wxEXPAND, 5 ); + fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); - bSizer9->Add( bSizerLower, 0, wxEXPAND, 5 ); + fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_ThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_ThicknessCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_OrientationCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_OrientationCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + bSizer9->Add( fgSizer1, 1, wxEXPAND, 5 ); m_StandardSizer = new wxStdDialogButtonSizer(); m_StandardSizerOK = new wxButton( this, wxID_OK ); diff --git a/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp b/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp index ae7eed6d19..ba2d76916c 100644 --- a/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp +++ b/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp @@ -25,62 +25,28 @@ 0 0 - 1 - 1 - 1 - 1 - 0 - - - - + wxAUI_MGR_DEFAULT - - 1 wxBOTH - 0 - 1 1 - 0 - Dock - 0 - Left 1 impl_virtual - 1 - 0 0 wxID_ANY - - 0 - - 0 -1,-1 - 1 DIALOG_PCB_TEXT_PROPERTIES_BASE - 1 - - - 1 - Resizable - 1 - 433,465 + 433,450 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU DIALOG_SHIM; dialog_shim.h Text Properties - 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -188,10 +154,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -315,1819 +277,1765 @@ 5 wxEXPAND - 0 - + 1 + + 4 + wxBOTH + 0,1,2,3 + + 0 - bSizerLower - wxHORIZONTAL + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED none + 6 + 0 5 - - 1 - + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Size X + + 0 + + + 0 - bSizerLeft - wxVERTICAL - none - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Size X - - 0 - - - 0 - - 1 - m_SizeXLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_SizeXCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Size Y - - 0 - - - 0 - - 1 - m_SizeYLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_SizeYCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Thickness - - 0 - - - 0 - - 1 - m_ThicknessLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ThicknessCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + m_SizeXLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + 5 - - 1 - + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Position X + + 0 + + + 0 - bSizerRight - wxVERTICAL - none - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Position X - - 0 - - - 0 - - 1 - m_PositionXLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_PositionXCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Position Y - - 0 - - - 0 - - 1 - m_PositionYLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_PositionYCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Layer: - - 0 - - - 0 - - 1 - m_LayerLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_LayerSelectionCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - Select the layer on which text should lay. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + m_PositionXLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Layer: + + 0 + + + 0 + + 1 + m_LayerLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Display: + + 0 + + + 0 + + 1 + m_staticText10 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SizeXCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_PositionXCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_LayerSelectionCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + Select the layer on which text should lay. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Normal" "Mirrored" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_DisplayCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Size Y + + 0 + + + 0 + + 1 + m_SizeYLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Position Y + + 0 + + + 0 + + 1 + m_PositionYLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Style: + + 0 + + + 0 + + 1 + m_staticText9 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Justification: + + 0 + + + 0 + + 1 + m_staticText11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SizeYCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_PositionYCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Normal" "Italic" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_StyleCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Left" "Center" "Right" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_justifyChoice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Thickness + + 0 + + + 0 + + 1 + m_ThicknessLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Orientation (0.1 deg): + + 0 + + + 0 + + 1 + m_orientationLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxEXPAND - 0 - - - bSizer5 - wxVERTICAL - none - - 5 - wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Orientation: - - 0 - - - 0 - - 1 - m_staticText8 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "0" "90" "180" "-90" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_OrientationCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Style: - - 0 - - - 0 - - 1 - m_staticText9 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Normal" "Italic" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_StyleCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 5 - wxEXPAND + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT 0 - + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 - bSizer6 - wxVERTICAL - none - - 5 - wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Display: - - 0 - - - 0 - - 1 - m_staticText10 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Normal" "Mirrored" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_DisplayCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Justification: - - 0 - - - 0 - - 1 - m_staticText11 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Left" "Center" "Right" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_justifyChoice - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + m_ThicknessCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_OrientationCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_pcb_text_properties_base.h b/pcbnew/dialogs/dialog_pcb_text_properties_base.h index 193cc9e404..e5062b8b94 100644 --- a/pcbnew/dialogs/dialog_pcb_text_properties_base.h +++ b/pcbnew/dialogs/dialog_pcb_text_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 19 2012) +// C++ code generated with wxFormBuilder (version Apr 11 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -19,8 +19,8 @@ #include #include #include -#include #include +#include #include #include @@ -38,25 +38,25 @@ class DIALOG_PCB_TEXT_PROPERTIES_BASE : public DIALOG_SHIM wxStaticText* m_TextLabel; wxTextCtrl* m_TextContentCtrl; wxStaticText* m_SizeXLabel; - wxTextCtrl* m_SizeXCtrl; - wxStaticText* m_SizeYLabel; - wxTextCtrl* m_SizeYCtrl; - wxStaticText* m_ThicknessLabel; - wxTextCtrl* m_ThicknessCtrl; wxStaticText* m_PositionXLabel; - wxTextCtrl* m_PositionXCtrl; - wxStaticText* m_PositionYLabel; - wxTextCtrl* m_PositionYCtrl; wxStaticText* m_LayerLabel; - wxChoice* m_LayerSelectionCtrl; - wxStaticText* m_staticText8; - wxChoice* m_OrientationCtrl; - wxStaticText* m_staticText9; - wxChoice* m_StyleCtrl; wxStaticText* m_staticText10; + wxTextCtrl* m_SizeXCtrl; + wxTextCtrl* m_PositionXCtrl; + wxChoice* m_LayerSelectionCtrl; wxChoice* m_DisplayCtrl; + wxStaticText* m_SizeYLabel; + wxStaticText* m_PositionYLabel; + wxStaticText* m_staticText9; wxStaticText* m_staticText11; + wxTextCtrl* m_SizeYCtrl; + wxTextCtrl* m_PositionYCtrl; + wxChoice* m_StyleCtrl; wxChoice* m_justifyChoice; + wxStaticText* m_ThicknessLabel; + wxStaticText* m_orientationLabel; + wxTextCtrl* m_ThicknessCtrl; + wxTextCtrl* m_OrientationCtrl; wxStdDialogButtonSizer* m_StandardSizer; wxButton* m_StandardSizerOK; wxButton* m_StandardSizerCancel; @@ -69,7 +69,7 @@ class DIALOG_PCB_TEXT_PROPERTIES_BASE : public DIALOG_SHIM public: - DIALOG_PCB_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 433,465 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU ); + DIALOG_PCB_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 433,450 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU ); ~DIALOG_PCB_TEXT_PROPERTIES_BASE(); }; From af0d21474dd80143021b32180e1574da91fcce49 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 9 Jul 2012 09:10:07 +0200 Subject: [PATCH 19/25] Pcbnew: commit Lorenzo Marcantonio's patch for THT thermals (added loading/saving using S. expr). Fix incorrect import of smd pads from Gpcb. Very minor change in dialog print. --- common/pcb.keywords | 1 + .../dialogs/dialog_print_using_printer.cpp | 17 +- eeschema/dialogs/dialog_print_using_printer.h | 2 + .../dialog_print_using_printer_base.cpp | 20 +- .../dialog_print_using_printer_base.fbp | 141 ++++- .../dialogs/dialog_print_using_printer_base.h | 30 +- pcbnew/dialogs/dialog_copper_zones.cpp | 18 +- pcbnew/dialogs/dialog_copper_zones_base.cpp | 536 +++++++++--------- pcbnew/dialogs/dialog_copper_zones_base.fbp | 2 +- pcbnew/dialogs/dialog_copper_zones_base.h | 264 ++++----- pcbnew/gpcb_exchange.cpp | 1 + pcbnew/kicad_plugin.cpp | 4 + pcbnew/legacy_plugin.cpp | 2 + pcbnew/pcb_parser.cpp | 4 + pcbnew/zones.h | 3 +- ...nvert_brd_items_to_polygons_with_Boost.cpp | 8 +- ...ones_convert_to_polygons_aux_functions.cpp | 8 +- 17 files changed, 603 insertions(+), 458 deletions(-) diff --git a/common/pcb.keywords b/common/pcb.keywords index ec20b0b7ae..5e0f9a7b43 100644 --- a/common/pcb.keywords +++ b/common/pcb.keywords @@ -164,6 +164,7 @@ trace_clearance trapezoid thru thru_hole +thru_hole_only tstamp user user_trace_width diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index c9a74cc03d..ca20a621f4 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -149,6 +149,14 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) m_buttonPrint->SetDefault(); } +void DIALOG_PRINT_USING_PRINTER::GetPrintOptions() +{ + SCH_EDIT_FRAME* parent = GetParent(); + + parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() ); + parent->SetPrintSheetReference( m_checkReference->IsChecked() ); +} + void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) { @@ -160,8 +168,7 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) parent->SetPrintDialogSize( GetSize() ); } - parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() ); - parent->SetPrintSheetReference( m_checkReference->IsChecked() ); + GetPrintOptions(); EndDialog( wxID_CANCEL ); } @@ -187,8 +194,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) { SCH_EDIT_FRAME* parent = GetParent(); - parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() ); - parent->SetPrintSheetReference( m_checkReference->IsChecked() ); + GetPrintOptions(); // Pass two printout objects: for preview, and possible printing. wxString title = _( "Preview" ); @@ -216,8 +222,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) { SCH_EDIT_FRAME* parent = GetParent(); - parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() ); - parent->SetPrintSheetReference( m_checkReference->IsChecked() ); + GetPrintOptions(); wxPrintDialogData printDialogData( parent->GetPageSetupData().GetPrintData() ); printDialogData.SetMaxPage( g_RootSheet->CountSheets() ); diff --git a/eeschema/dialogs/dialog_print_using_printer.h b/eeschema/dialogs/dialog_print_using_printer.h index 662babed60..5924d45fb4 100644 --- a/eeschema/dialogs/dialog_print_using_printer.h +++ b/eeschema/dialogs/dialog_print_using_printer.h @@ -26,6 +26,8 @@ private: void OnPrintPreview( wxCommandEvent& event ); void OnPrintButtonClick( wxCommandEvent& event ); void OnButtonCancelClick( wxCommandEvent& event ){ Close(); } + + void GetPrintOptions(); }; diff --git a/eeschema/dialogs/dialog_print_using_printer_base.cpp b/eeschema/dialogs/dialog_print_using_printer_base.cpp index 7cdb88f6c1..e3e584456c 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.cpp +++ b/eeschema/dialogs/dialog_print_using_printer_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Mar 17 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -19,16 +19,22 @@ DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* pare wxBoxSizer* bleftSizer; bleftSizer = new wxBoxSizer( wxVERTICAL ); - m_checkReference = new wxCheckBox( this, wxID_ANY, _("Print sheet &reference and title block"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkReference->SetValue(true); + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Print options:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + m_staticText1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + bleftSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT, 5 ); + + m_checkReference = new wxCheckBox( this, wxID_ANY, _("Print sheet &reference and title block"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkReference->SetValue(true); m_checkReference->SetToolTip( _("Print (or not) the Frame references.") ); - bleftSizer->Add( m_checkReference, 0, wxALL, 5 ); + bleftSizer->Add( m_checkReference, 0, wxALL, 10 ); m_checkMonochrome = new wxCheckBox( this, wxID_ANY, _("Print in &black and white only"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkMonochrome->SetValue(true); + bleftSizer->Add( m_checkMonochrome, 0, wxBOTTOM|wxRIGHT|wxLEFT, 10 ); - bleftSizer->Add( m_checkMonochrome, 0, wxALL, 5 ); bMainSizer->Add( bleftSizer, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 12 ); @@ -47,11 +53,12 @@ DIALOG_PRINT_USING_PRINTER_BASE::DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* pare m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + bMainSizer->Add( bbuttonsSizer, 0, wxALL, 12 ); + this->SetSizer( bMainSizer ); this->Layout(); - bMainSizer->Fit( this ); // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnCloseWindow ) ); @@ -71,4 +78,5 @@ DIALOG_PRINT_USING_PRINTER_BASE::~DIALOG_PRINT_USING_PRINTER_BASE() m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintPreview ), NULL, this ); m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnPrintButtonClick ), NULL, this ); m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_BASE::OnButtonCancelClick ), NULL, this ); + } diff --git a/eeschema/dialogs/dialog_print_using_printer_base.fbp b/eeschema/dialogs/dialog_print_using_printer_base.fbp index 007188f6ac..b8cfa1792b 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.fbp +++ b/eeschema/dialogs/dialog_print_using_printer_base.fbp @@ -1,11 +1,12 @@ - + C++ 1 source_name + 0 0 res UTF-8 @@ -19,6 +20,7 @@ . 1 + 1 1 1 0 @@ -27,8 +29,11 @@ 1 1 1 + 0 + + @@ -51,7 +56,6 @@ 0 0 wxID_ANY - 0 @@ -65,11 +69,9 @@ 1 - Resizable - 1 - -1,-1 + 388,185 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Print @@ -134,6 +136,93 @@ none 5 + wxTOP|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,-1,70,0 + 0 + 0 + wxID_ANY + Print options: + + 0 + + + 0 + + 1 + m_staticText1 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 wxALL 0 @@ -141,7 +230,10 @@ 1 1 1 + + + @@ -163,7 +255,6 @@ 0 wxID_ANY Print sheet &reference and title block - 0 @@ -178,9 +269,7 @@ protected 1 - Resizable - 1 @@ -221,21 +310,24 @@ - 5 - wxALL + 10 + wxBOTTOM|wxRIGHT|wxLEFT 0 1 1 1 1 + + + 1 0 - 0 + 1 1 1 @@ -251,7 +343,6 @@ 0 wxID_ANY Print in &black and white only - 0 @@ -266,9 +357,7 @@ protected 1 - Resizable - 1 @@ -328,7 +417,10 @@ 1 1 1 + + + @@ -350,7 +442,6 @@ 0 wxID_ANY Page Setup - 0 @@ -365,9 +456,7 @@ protected 1 - Resizable - 1 @@ -416,7 +505,10 @@ 1 1 1 + + + @@ -438,7 +530,6 @@ 0 wxID_ANY Preview - 0 @@ -453,9 +544,7 @@ protected 1 - Resizable - 1 @@ -504,7 +593,10 @@ 1 1 1 + + + @@ -526,7 +618,6 @@ 0 wxID_ANY Print - 0 @@ -541,9 +632,7 @@ protected 1 - Resizable - 1 @@ -592,7 +681,10 @@ 1 1 1 + + + @@ -614,7 +706,6 @@ 0 wxID_CANCEL Close - 0 @@ -629,9 +720,7 @@ protected 1 - Resizable - 1 diff --git a/eeschema/dialogs/dialog_print_using_printer_base.h b/eeschema/dialogs/dialog_print_using_printer_base.h index 44e03da97d..3bc79205cc 100644 --- a/eeschema/dialogs/dialog_print_using_printer_base.h +++ b/eeschema/dialogs/dialog_print_using_printer_base.h @@ -1,21 +1,23 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Mar 17 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __dialog_print_using_printer_base__ -#define __dialog_print_using_printer_base__ +#ifndef __DIALOG_PRINT_USING_PRINTER_BASE_H__ +#define __DIALOG_PRINT_USING_PRINTER_BASE_H__ +#include +#include #include - #include -#include +#include #include #include #include #include +#include #include #include #include @@ -30,6 +32,7 @@ class DIALOG_PRINT_USING_PRINTER_BASE : public wxDialog private: protected: + wxStaticText* m_staticText1; wxCheckBox* m_checkReference; wxCheckBox* m_checkMonochrome; wxButton* m_buttonPageSetup; @@ -38,18 +41,19 @@ class DIALOG_PRINT_USING_PRINTER_BASE : public wxDialog wxButton* m_buttonQuit; // Virtual event handlers, overide them in your derived class - virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); } - virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } - virtual void OnPageSetup( wxCommandEvent& event ){ event.Skip(); } - virtual void OnPrintPreview( wxCommandEvent& event ){ event.Skip(); } - virtual void OnPrintButtonClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); } + virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } + virtual void OnPageSetup( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPrintPreview( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPrintButtonClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } public: - DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_PRINT_USING_PRINTER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 388,185 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PRINT_USING_PRINTER_BASE(); }; -#endif //__dialog_print_using_printer_base__ +#endif //__DIALOG_PRINT_USING_PRINTER_BASE_H__ diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index b5426adced..0bf5e95949 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -199,10 +199,14 @@ void DIALOG_COPPER_ZONE::initDialog() switch( m_settings.GetPadConnection() ) { - case PAD_NOT_IN_ZONE: // Pads are not covered + case THT_THERMAL: // Thermals only for THT pads m_PadInZoneOpt->SetSelection( 2 ); break; + case PAD_NOT_IN_ZONE: // Pads are not covered + m_PadInZoneOpt->SetSelection( 3 ); + break; + default: case THERMAL_PAD: // Use thermal relief for pads m_PadInZoneOpt->SetSelection( 1 ); @@ -213,7 +217,9 @@ void DIALOG_COPPER_ZONE::initDialog() break; } - if( m_settings.GetPadConnection() != THERMAL_PAD ) + // Antipad and spokes are significant only for thermals + if( m_settings.GetPadConnection() != THERMAL_PAD && + m_settings.GetPadConnection() != THT_THERMAL ) { m_AntipadSizeValue->Enable( false ); m_CopperWidthValue->Enable( false ); @@ -341,11 +347,16 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab { switch( m_PadInZoneOpt->GetSelection() ) { - case 2: + case 3: // Pads are not covered m_settings.SetPadConnection( PAD_NOT_IN_ZONE ); break; + case 2: + // Use thermal relief for THT pads + m_settings.SetPadConnection( THT_THERMAL ); + break; + case 1: // Use thermal relief for pads m_settings.SetPadConnection( THERMAL_PAD ); @@ -566,6 +577,7 @@ void DIALOG_COPPER_ZONE::OnPadsInZoneClick( wxCommandEvent& event ) m_CopperWidthValue->Enable( false ); break; + case 2: case 1: m_AntipadSizeValue->Enable( true ); m_CopperWidthValue->Enable( true ); diff --git a/pcbnew/dialogs/dialog_copper_zones_base.cpp b/pcbnew/dialogs/dialog_copper_zones_base.cpp index b793d06e6c..4bd894adb9 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.cpp +++ b/pcbnew/dialogs/dialog_copper_zones_base.cpp @@ -1,268 +1,268 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 11 2012) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_copper_zones_base.h" - -/////////////////////////////////////////////////////////////////////////// - -BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, DIALOG_SHIM ) - EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose ) - EVT_SIZE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnSize ) - EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected ) - EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) - EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) - EVT_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) - EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice ) - EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick ) - EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones ) - EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick ) - EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick ) -END_EVENT_TABLE() - -DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - m_MainBoxSizer = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* m_OptionsBoxSizer; - m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL ); - - m_layerSizer = new wxBoxSizer( wxVERTICAL ); - - m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText17->Wrap( -1 ); - m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - - m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxVERTICAL ); - - m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText2->Wrap( -1 ); - bSizer7->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - bSizer7->Add( m_ListNetNameSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - - m_OptionsBoxSizer->Add( bSizer7, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* m_NetSortOptSizer; - m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL ); - - m_staticText16 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16->Wrap( -1 ); - m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (advanced)"), _("Filtered (alphabetical)"), _("Filtered (advanced)") }; - int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString ); - m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 ); - m_NetDisplayOption->SetSelection( 0 ); - m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_staticText5 = new wxStaticText( this, wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText5->Wrap( -1 ); - m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") ); - - m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_staticText51 = new wxStaticText( this, wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText51->Wrap( -1 ); - m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") ); - - m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 ); - m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 ); - - - m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxALL, 5 ); - - - m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxALL|wxEXPAND, 5 ); - - wxStaticBoxSizer* m_ExportableSetupSizer; - m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL ); - - wxBoxSizer* bSizer9; - bSizer9 = new wxBoxSizer( wxVERTICAL ); - - m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ClearanceValueTitle->Wrap( -1 ); - bSizer9->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ZoneClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer9->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 ); - m_MinThicknessValueTitle->Wrap( -1 ); - m_MinThicknessValueTitle->SetToolTip( _("Minimun thickness of filled areas.") ); - - bSizer9->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer9->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_staticText151 = new wxStaticText( this, wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText151->Wrap( -1 ); - bSizer9->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") }; - int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString ); - m_cornerSmoothingChoice = new wxChoice( this, ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 ); - m_cornerSmoothingChoice->SetSelection( 0 ); - bSizer9->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_cornerSmoothingTitle = new wxStaticText( this, wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_cornerSmoothingTitle->Wrap( -1 ); - bSizer9->Add( m_cornerSmoothingTitle, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer9->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - - m_ExportableSetupSizer->Add( bSizer9, 0, wxEXPAND, 5 ); - - wxBoxSizer* m_LeftBox; - m_LeftBox = new wxBoxSizer( wxVERTICAL ); - - m_staticText13 = new wxStaticText( this, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText13->Wrap( -1 ); - m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("None") }; - int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString ); - m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 ); - m_PadInZoneOpt->SetSelection( 0 ); - m_LeftBox->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - wxStaticBoxSizer* m_ThermalShapesParamsSizer; - m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL ); - - m_AntipadSizeText = new wxStaticText( this, wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); - m_AntipadSizeText->Wrap( -1 ); - m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_AntipadSizeValue = new wxTextCtrl( this, wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") ); - - m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_CopperBridgeWidthText = new wxStaticText( this, wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 ); - m_CopperBridgeWidthText->Wrap( -1 ); - m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_CopperWidthValue = new wxTextCtrl( this, wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") ); - - m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - - m_LeftBox->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 ); - - - m_ExportableSetupSizer->Add( m_LeftBox, 0, wxEXPAND, 5 ); - - wxBoxSizer* m_MiddleBox; - m_MiddleBox = new wxBoxSizer( wxVERTICAL ); - - m_staticText171 = new wxStaticText( this, wxID_ANY, _("Priority level:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText171->Wrap( -1 ); - m_staticText171->SetToolTip( _("On each copper layer, zones are filled by priority order.\nSo when a zone is inside an other zone:\n* If its priority is highter: its outlines are removed from the other layer.\n* If its priority is equal: a DRC error is set.") ); - - m_MiddleBox->Add( m_staticText171, 0, wxRIGHT|wxLEFT, 5 ); - - m_PriorityLevelCtrl = new wxSpinCtrl( this, ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 ); - m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_staticText11 = new wxStaticText( this, wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText11->Wrap( -1 ); - m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") }; - int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString ); - m_FillModeCtrl = new wxChoice( this, ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 ); - m_FillModeCtrl->SetSelection( 0 ); - m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_staticText12 = new wxStaticText( this, wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText12->Wrap( -1 ); - m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") }; - int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString ); - m_ArcApproximationOpt = new wxChoice( this, ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 ); - m_ArcApproximationOpt->SetSelection( 0 ); - m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - - m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer81; - bSizer81 = new wxBoxSizer( wxVERTICAL ); - - m_staticText14 = new wxStaticText( this, wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText14->Wrap( -1 ); - bSizer81->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") }; - int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); - m_OrientEdgesOpt = new wxChoice( this, ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 ); - m_OrientEdgesOpt->SetSelection( 0 ); - bSizer81->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - m_staticText15 = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText15->Wrap( -1 ); - bSizer81->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") }; - int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); - m_OutlineAppearanceCtrl = new wxChoice( this, ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 ); - m_OutlineAppearanceCtrl->SetSelection( 0 ); - bSizer81->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - - m_ExportableSetupSizer->Add( bSizer81, 0, wxEXPAND, 5 ); - - - m_MainBoxSizer->Add( m_ExportableSetupSizer, 1, wxALL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer10; - bSizer10 = new wxBoxSizer( wxHORIZONTAL ); - - m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") ); - - bSizer10->Add( m_ExportSetupButton, 0, wxALL|wxEXPAND, 5 ); - - m_OkButton = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 ); - m_OkButton->SetDefault(); - bSizer10->Add( m_OkButton, 0, wxALL|wxEXPAND, 5 ); - - m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer10->Add( m_ButtonCancel, 0, wxALL|wxEXPAND, 5 ); - - - m_MainBoxSizer->Add( bSizer10, 0, wxALIGN_RIGHT|wxALL, 5 ); - - - this->SetSizer( m_MainBoxSizer ); - this->Layout(); -} - -DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE() -{ -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_copper_zones_base.h" + +/////////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, DIALOG_SHIM ) + EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose ) + EVT_SIZE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnSize ) + EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected ) + EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) + EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) + EVT_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick ) + EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice ) + EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick ) + EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones ) + EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick ) + EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick ) +END_EVENT_TABLE() + +DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + m_MainBoxSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* m_OptionsBoxSizer; + m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_layerSizer = new wxBoxSizer( wxVERTICAL ); + + m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText17->Wrap( -1 ); + m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + + m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + bSizer7->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer7->Add( m_ListNetNameSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + m_OptionsBoxSizer->Add( bSizer7, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* m_NetSortOptSizer; + m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL ); + + m_staticText16 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (advanced)"), _("Filtered (alphabetical)"), _("Filtered (advanced)") }; + int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString ); + m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 ); + m_NetDisplayOption->SetSelection( 0 ); + m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_staticText5 = new wxStaticText( this, wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") ); + + m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText51 = new wxStaticText( this, wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText51->Wrap( -1 ); + m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") ); + + m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 ); + m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 ); + + + m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxALL, 5 ); + + + m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* m_ExportableSetupSizer; + m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL ); + + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxVERTICAL ); + + m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ClearanceValueTitle->Wrap( -1 ); + bSizer9->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ZoneClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer9->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MinThicknessValueTitle->Wrap( -1 ); + m_MinThicknessValueTitle->SetToolTip( _("Minimun thickness of filled areas.") ); + + bSizer9->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer9->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText151 = new wxStaticText( this, wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText151->Wrap( -1 ); + bSizer9->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") }; + int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString ); + m_cornerSmoothingChoice = new wxChoice( this, ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 ); + m_cornerSmoothingChoice->SetSelection( 0 ); + bSizer9->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_cornerSmoothingTitle = new wxStaticText( this, wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cornerSmoothingTitle->Wrap( -1 ); + bSizer9->Add( m_cornerSmoothingTitle, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer9->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_ExportableSetupSizer->Add( bSizer9, 0, wxEXPAND, 5 ); + + wxBoxSizer* m_LeftBox; + m_LeftBox = new wxBoxSizer( wxVERTICAL ); + + m_staticText13 = new wxStaticText( this, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText13->Wrap( -1 ); + m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("THT Thermal"), _("None") }; + int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString ); + m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 ); + m_PadInZoneOpt->SetSelection( 0 ); + m_LeftBox->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + wxStaticBoxSizer* m_ThermalShapesParamsSizer; + m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL ); + + m_AntipadSizeText = new wxStaticText( this, wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AntipadSizeText->Wrap( -1 ); + m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + m_AntipadSizeValue = new wxTextCtrl( this, wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") ); + + m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_CopperBridgeWidthText = new wxStaticText( this, wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 ); + m_CopperBridgeWidthText->Wrap( -1 ); + m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_CopperWidthValue = new wxTextCtrl( this, wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") ); + + m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_LeftBox->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 ); + + + m_ExportableSetupSizer->Add( m_LeftBox, 0, wxEXPAND, 5 ); + + wxBoxSizer* m_MiddleBox; + m_MiddleBox = new wxBoxSizer( wxVERTICAL ); + + m_staticText171 = new wxStaticText( this, wxID_ANY, _("Priority level:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText171->Wrap( -1 ); + m_staticText171->SetToolTip( _("On each copper layer, zones are filled by priority order.\nSo when a zone is inside an other zone:\n* If its priority is highter: its outlines are removed from the other layer.\n* If its priority is equal: a DRC error is set.") ); + + m_MiddleBox->Add( m_staticText171, 0, wxRIGHT|wxLEFT, 5 ); + + m_PriorityLevelCtrl = new wxSpinCtrl( this, ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 ); + m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText11 = new wxStaticText( this, wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") }; + int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString ); + m_FillModeCtrl = new wxChoice( this, ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 ); + m_FillModeCtrl->SetSelection( 0 ); + m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_staticText12 = new wxStaticText( this, wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12->Wrap( -1 ); + m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") }; + int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString ); + m_ArcApproximationOpt = new wxChoice( this, ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 ); + m_ArcApproximationOpt->SetSelection( 0 ); + m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer81; + bSizer81 = new wxBoxSizer( wxVERTICAL ); + + m_staticText14 = new wxStaticText( this, wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText14->Wrap( -1 ); + bSizer81->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") }; + int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); + m_OrientEdgesOpt = new wxChoice( this, ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 ); + m_OrientEdgesOpt->SetSelection( 0 ); + bSizer81->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + m_staticText15 = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + bSizer81->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + + wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") }; + int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); + m_OutlineAppearanceCtrl = new wxChoice( this, ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 ); + m_OutlineAppearanceCtrl->SetSelection( 0 ); + bSizer81->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + + m_ExportableSetupSizer->Add( bSizer81, 0, wxEXPAND, 5 ); + + + m_MainBoxSizer->Add( m_ExportableSetupSizer, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxHORIZONTAL ); + + m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") ); + + bSizer10->Add( m_ExportSetupButton, 0, wxALL|wxEXPAND, 5 ); + + m_OkButton = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 ); + m_OkButton->SetDefault(); + bSizer10->Add( m_OkButton, 0, wxALL|wxEXPAND, 5 ); + + m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer10->Add( m_ButtonCancel, 0, wxALL|wxEXPAND, 5 ); + + + m_MainBoxSizer->Add( bSizer10, 0, wxALIGN_RIGHT|wxALL, 5 ); + + + this->SetSizer( m_MainBoxSizer ); + this->Layout(); +} + +DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE() +{ +} diff --git a/pcbnew/dialogs/dialog_copper_zones_base.fbp b/pcbnew/dialogs/dialog_copper_zones_base.fbp index bb67a02271..078e126f50 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.fbp +++ b/pcbnew/dialogs/dialog_copper_zones_base.fbp @@ -1825,7 +1825,7 @@ 1 0 - "Solid" "Thermal relief" "None" + "Solid" "Thermal relief" "THT Thermal" "None" 1 1 diff --git a/pcbnew/dialogs/dialog_copper_zones_base.h b/pcbnew/dialogs/dialog_copper_zones_base.h index 14617522f2..b48bfc2c77 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.h +++ b/pcbnew/dialogs/dialog_copper_zones_base.h @@ -1,132 +1,132 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 11 2012) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __DIALOG_COPPER_ZONES_BASE_H__ -#define __DIALOG_COPPER_ZONES_BASE_H__ - -#include -#include -#include -#include "dialog_shim.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_COPPER_ZONE_BASE -/////////////////////////////////////////////////////////////////////////////// -class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM -{ - DECLARE_EVENT_TABLE() - private: - - // Private event handlers - void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); } - void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); } - void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); } - void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); } - void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); } - void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); } - void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); } - void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); } - void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); } - - - protected: - enum - { - ID_DIALOG_COPPER_ZONE_BASE = 1000, - ID_NETNAME_SELECTION, - ID_M_NETDISPLAYOPTION, - ID_TEXTCTRL_NETNAMES_FILTER, - wxID_APPLY_FILTERS, - ID_CORNER_SMOOTHING, - ID_M_CORNERSMOOTHINGCTRL, - ID_M_PADINZONEOPT, - wxID_ANTIPAD_SIZE, - wxID_COPPER_BRIDGE_VALUE, - ID_M_PRIORITYLEVELCTRL, - ID_M_FILLMODECTRL, - ID_M_ARCAPPROXIMATIONOPT, - ID_M_ORIENTEDGESOPT, - ID_M_OUTLINEAPPEARANCECTRL, - wxID_BUTTON_EXPORT - }; - - wxBoxSizer* m_MainBoxSizer; - wxBoxSizer* m_layerSizer; - wxStaticText* m_staticText17; - wxStaticText* m_staticText2; - wxListBox* m_ListNetNameSelection; - wxStaticText* m_staticText16; - wxChoice* m_NetDisplayOption; - wxStaticText* m_staticText5; - wxTextCtrl* m_DoNotShowNetNameFilter; - wxStaticText* m_staticText51; - wxTextCtrl* m_ShowNetNameFilter; - wxButton* m_buttonRunFilter; - wxStaticText* m_ClearanceValueTitle; - wxTextCtrl* m_ZoneClearanceCtrl; - wxStaticText* m_MinThicknessValueTitle; - wxTextCtrl* m_ZoneMinThicknessCtrl; - wxStaticText* m_staticText151; - wxChoice* m_cornerSmoothingChoice; - wxStaticText* m_cornerSmoothingTitle; - wxTextCtrl* m_cornerSmoothingCtrl; - wxStaticText* m_staticText13; - wxChoice* m_PadInZoneOpt; - wxStaticText* m_AntipadSizeText; - wxTextCtrl* m_AntipadSizeValue; - wxStaticText* m_CopperBridgeWidthText; - wxTextCtrl* m_CopperWidthValue; - wxStaticText* m_staticText171; - wxSpinCtrl* m_PriorityLevelCtrl; - wxStaticText* m_staticText11; - wxChoice* m_FillModeCtrl; - wxStaticText* m_staticText12; - wxChoice* m_ArcApproximationOpt; - wxStaticText* m_staticText14; - wxChoice* m_OrientEdgesOpt; - wxStaticText* m_staticText15; - wxChoice* m_OutlineAppearanceCtrl; - wxButton* m_ExportSetupButton; - wxButton* m_OkButton; - wxButton* m_ButtonCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnSize( wxSizeEvent& event ) { event.Skip(); } - virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); } - virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); } - virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); } - virtual void OnButtonOkClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } - - - public: - - DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_COPPER_ZONE_BASE(); - -}; - -#endif //__DIALOG_COPPER_ZONES_BASE_H__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_COPPER_ZONES_BASE_H__ +#define __DIALOG_COPPER_ZONES_BASE_H__ + +#include +#include +#include +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_COPPER_ZONE_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM +{ + DECLARE_EVENT_TABLE() + private: + + // Private event handlers + void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); } + void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); } + void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); } + void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); } + void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); } + void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); } + void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); } + void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); } + void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); } + + + protected: + enum + { + ID_DIALOG_COPPER_ZONE_BASE = 1000, + ID_NETNAME_SELECTION, + ID_M_NETDISPLAYOPTION, + ID_TEXTCTRL_NETNAMES_FILTER, + wxID_APPLY_FILTERS, + ID_CORNER_SMOOTHING, + ID_M_CORNERSMOOTHINGCTRL, + ID_M_PADINZONEOPT, + wxID_ANTIPAD_SIZE, + wxID_COPPER_BRIDGE_VALUE, + ID_M_PRIORITYLEVELCTRL, + ID_M_FILLMODECTRL, + ID_M_ARCAPPROXIMATIONOPT, + ID_M_ORIENTEDGESOPT, + ID_M_OUTLINEAPPEARANCECTRL, + wxID_BUTTON_EXPORT + }; + + wxBoxSizer* m_MainBoxSizer; + wxBoxSizer* m_layerSizer; + wxStaticText* m_staticText17; + wxStaticText* m_staticText2; + wxListBox* m_ListNetNameSelection; + wxStaticText* m_staticText16; + wxChoice* m_NetDisplayOption; + wxStaticText* m_staticText5; + wxTextCtrl* m_DoNotShowNetNameFilter; + wxStaticText* m_staticText51; + wxTextCtrl* m_ShowNetNameFilter; + wxButton* m_buttonRunFilter; + wxStaticText* m_ClearanceValueTitle; + wxTextCtrl* m_ZoneClearanceCtrl; + wxStaticText* m_MinThicknessValueTitle; + wxTextCtrl* m_ZoneMinThicknessCtrl; + wxStaticText* m_staticText151; + wxChoice* m_cornerSmoothingChoice; + wxStaticText* m_cornerSmoothingTitle; + wxTextCtrl* m_cornerSmoothingCtrl; + wxStaticText* m_staticText13; + wxChoice* m_PadInZoneOpt; + wxStaticText* m_AntipadSizeText; + wxTextCtrl* m_AntipadSizeValue; + wxStaticText* m_CopperBridgeWidthText; + wxTextCtrl* m_CopperWidthValue; + wxStaticText* m_staticText171; + wxSpinCtrl* m_PriorityLevelCtrl; + wxStaticText* m_staticText11; + wxChoice* m_FillModeCtrl; + wxStaticText* m_staticText12; + wxChoice* m_ArcApproximationOpt; + wxStaticText* m_staticText14; + wxChoice* m_OrientEdgesOpt; + wxStaticText* m_staticText15; + wxChoice* m_OutlineAppearanceCtrl; + wxButton* m_ExportSetupButton; + wxButton* m_OkButton; + wxButton* m_ButtonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnSize( wxSizeEvent& event ) { event.Skip(); } + virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); } + virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonOkClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_COPPER_ZONE_BASE(); + +}; + +#endif //__DIALOG_COPPER_ZONES_BASE_H__ diff --git a/pcbnew/gpcb_exchange.cpp b/pcbnew/gpcb_exchange.cpp index 878ff12422..8018f2fc2b 100644 --- a/pcbnew/gpcb_exchange.cpp +++ b/pcbnew/gpcb_exchange.cpp @@ -399,6 +399,7 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName ) // format: Pad [x1 y1 x2 y2 thickness clearance mask "name" "pad_number" flags] pad = new D_PAD( this ); pad->SetShape( PAD_RECT ); + pad->SetAttribute( PAD_SMD ); pad->SetLayerMask( LAYER_FRONT | SOLDERMASK_LAYER_FRONT | SOLDERPASTE_LAYER_FRONT ); // Set shape from flags diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 6a2eedf0d7..42ff20c0a3 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -990,6 +990,10 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const case THERMAL_PAD: // Default option not saved or loaded. break; + case THT_THERMAL: + m_out->Print( 0, " thru_hole_only" ); + break; + case PAD_IN_ZONE: m_out->Print( 0, " yes" ); break; diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 5e194ae943..c3c83ff1a5 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2239,6 +2239,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() { case 'I': popt = PAD_IN_ZONE; break; case 'T': popt = THERMAL_PAD; break; + case 'H': popt = THT_THERMAL; break; case 'X': popt = PAD_NOT_IN_ZONE; break; default: @@ -3548,6 +3549,7 @@ void LEGACY_PLUGIN::saveZONE_CONTAINER( const ZONE_CONTAINER* me ) const default: case PAD_IN_ZONE: padoption = 'I'; break; case THERMAL_PAD: padoption = 'T'; break; + case THT_THERMAL: padoption = 'H'; break; // H is for 'hole' since it reliefs holes only case PAD_NOT_IN_ZONE: padoption = 'X'; break; } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index c1aa57f3e5..7e78a61f80 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2374,6 +2374,10 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) zone->SetPadConnection( PAD_NOT_IN_ZONE ); break; + case T_thru_hole_only: + zone->SetPadConnection( THT_THERMAL ); + break; + case T_clearance: zone->SetZoneClearance( parseBoardUnits( "zone clearance" ) ); NeedRIGHT(); diff --git a/pcbnew/zones.h b/pcbnew/zones.h index 69a2b61720..4c6b6c3e54 100644 --- a/pcbnew/zones.h +++ b/pcbnew/zones.h @@ -36,7 +36,8 @@ enum ZoneConnection { UNDEFINED_CONNECTION = -1, PAD_NOT_IN_ZONE, ///< Pads are not covered THERMAL_PAD, ///< Use thermal relief for pads - PAD_IN_ZONE ///< pads are covered by copper + PAD_IN_ZONE, ///< pads are covered by copper + THT_THERMAL ///< Thermal relief only for THT pads }; class ZONE_CONTAINER; diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index 20edbff31d..e6de77f223 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -385,7 +385,13 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) { for( D_PAD* pad = module->m_Pads; pad != NULL; pad = pad->Next() ) { - if( GetPadConnection( pad ) != THERMAL_PAD ) + // Rejects non-standard pads with tht-only thermal reliefs + if( GetPadConnection( pad ) == THT_THERMAL + && pad->GetAttribute() != PAD_STANDARD ) + continue; + + if( GetPadConnection( pad ) != THERMAL_PAD + && GetPadConnection( pad ) != THT_THERMAL ) continue; if( !pad->IsOnLayer( GetLayer() ) ) diff --git a/pcbnew/zones_convert_to_polygons_aux_functions.cpp b/pcbnew/zones_convert_to_polygons_aux_functions.cpp index 8b3376fe63..6c48611839 100644 --- a/pcbnew/zones_convert_to_polygons_aux_functions.cpp +++ b/pcbnew/zones_convert_to_polygons_aux_functions.cpp @@ -78,7 +78,13 @@ void BuildUnconnectedThermalStubsPolygonList( std::vector& aCornerBuffe { for( D_PAD* pad = module->m_Pads; pad != NULL; pad = pad->Next() ) { - if( aZone->GetPadConnection( pad ) != THERMAL_PAD ) + // Rejects non-standard pads with tht-only thermal reliefs + if( aZone->GetPadConnection( pad ) == THT_THERMAL + && pad->GetAttribute() != PAD_STANDARD ) + continue; + + if( aZone->GetPadConnection( pad ) != THERMAL_PAD + && aZone->GetPadConnection( pad ) != THT_THERMAL ) continue; // check From 701140a6dd6d264249c18459471adf1b90225770 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 10 Jul 2012 14:26:26 +0200 Subject: [PATCH 20/25] Eeschema: fix wrong bitmap size in hierarchy navigator tree --- bitmaps_png/CMakeLists.txt | 4 +- bitmaps_png/cpp_16/tree_nosel.cpp | 60 ++++++++++++++++++ bitmaps_png/cpp_16/tree_sel.cpp | 54 ++++++++++++++++ bitmaps_png/cpp_26/tree_nosel.cpp | 101 ------------------------------ bitmaps_png/cpp_26/tree_sel.cpp | 89 -------------------------- eeschema/hierarch.cpp | 40 ++++++------ 6 files changed, 135 insertions(+), 213 deletions(-) create mode 100644 bitmaps_png/cpp_16/tree_nosel.cpp create mode 100644 bitmaps_png/cpp_16/tree_sel.cpp delete mode 100644 bitmaps_png/cpp_26/tree_nosel.cpp delete mode 100644 bitmaps_png/cpp_26/tree_sel.cpp diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt index b9bc5c3382..b9371a7ad5 100644 --- a/bitmaps_png/CMakeLists.txt +++ b/bitmaps_png/CMakeLists.txt @@ -109,6 +109,8 @@ set( BMAPS_SMALL pintype_opencoll pintype_openemit pintype_noconnect + tree_nosel + tree_sel ) # image basenames that go into the toolbar sized destinations, i.e. 26x26 @@ -472,8 +474,6 @@ set( BMAPS_MID track_sketch track_unlocked transistor - tree_nosel - tree_sel undelete undo unit_inch diff --git a/bitmaps_png/cpp_16/tree_nosel.cpp b/bitmaps_png/cpp_16/tree_nosel.cpp new file mode 100644 index 0000000000..cdaf012ebf --- /dev/null +++ b/bitmaps_png/cpp_16/tree_nosel.cpp @@ -0,0 +1,60 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, + 0x61, 0x00, 0x00, 0x02, 0xb0, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0x8d, 0x93, 0x5f, 0x48, 0x53, + 0x51, 0x1c, 0xc7, 0x45, 0xa7, 0x25, 0x61, 0x26, 0xb6, 0xfc, 0x93, 0x88, 0x92, 0xa9, 0x60, 0x11, + 0xf4, 0x22, 0xfd, 0x7b, 0xe8, 0x21, 0xea, 0x2d, 0xf2, 0x25, 0xa8, 0x27, 0x03, 0x85, 0x88, 0xd0, + 0xd5, 0x9a, 0x48, 0x77, 0x76, 0x23, 0x14, 0xb7, 0x74, 0x9b, 0xcb, 0x35, 0x77, 0xe7, 0xbd, 0x57, + 0xaf, 0x05, 0x35, 0x88, 0x56, 0xd6, 0x96, 0x63, 0x81, 0xf3, 0xc6, 0xc0, 0x6a, 0x43, 0x27, 0xcb, + 0x6d, 0xa0, 0xb8, 0xd9, 0x9d, 0x9b, 0xdb, 0xfc, 0x13, 0xb8, 0xb5, 0x72, 0x3b, 0x9d, 0x2b, 0x53, + 0xdc, 0x34, 0xea, 0xe1, 0xc3, 0xb9, 0x70, 0xee, 0xf7, 0x7b, 0x7e, 0xbf, 0x73, 0xbe, 0xbf, 0x34, + 0x00, 0x40, 0xda, 0x76, 0x50, 0x14, 0x4d, 0x57, 0xa9, 0x5a, 0x72, 0xe5, 0xf2, 0xdb, 0x7b, 0x52, + 0xf7, 0x76, 0x63, 0xeb, 0x83, 0x24, 0xd1, 0x42, 0x92, 0x14, 0x4a, 0x29, 0x02, 0xf1, 0x93, 0x84, + 0x70, 0x99, 0xc4, 0x85, 0x5e, 0x92, 0x44, 0x9e, 0xa9, 0xd5, 0x48, 0xf9, 0x3f, 0x0d, 0x28, 0x0a, + 0x3d, 0x04, 0x45, 0x06, 0x63, 0x67, 0xc3, 0x77, 0xa6, 0xfe, 0x6c, 0xd4, 0x7b, 0xad, 0x36, 0xea, + 0xa9, 0x3f, 0x17, 0x99, 0xe4, 0x5f, 0x59, 0x26, 0x08, 0xa1, 0x19, 0x9a, 0x57, 0x4b, 0x64, 0x5d, + 0xbc, 0x7e, 0x1c, 0xa3, 0xbb, 0xa5, 0xe2, 0x1b, 0x3b, 0x0c, 0x48, 0x1c, 0x11, 0x8e, 0x35, 0x5d, + 0x76, 0xcf, 0x9e, 0x3f, 0xf2, 0x2b, 0x50, 0x96, 0x09, 0x36, 0x99, 0x3b, 0x7d, 0x78, 0x7d, 0xf4, + 0x6e, 0xdd, 0x8c, 0xba, 0xbf, 0xc7, 0x69, 0xff, 0x66, 0x8f, 0x98, 0xc6, 0x46, 0x43, 0xa2, 0xae, + 0x8e, 0xba, 0x24, 0x03, 0x8d, 0x46, 0x93, 0x31, 0x80, 0x23, 0x83, 0xe6, 0x4b, 0x35, 0xab, 0x73, + 0xa5, 0x1c, 0x90, 0x0a, 0x7d, 0xe1, 0x58, 0xd8, 0x60, 0xd0, 0x45, 0x7c, 0x3e, 0x1f, 0x90, 0xf7, + 0x4a, 0xdf, 0x6e, 0x0a, 0x3b, 0x44, 0x8f, 0xea, 0x05, 0x02, 0x41, 0xce, 0xc6, 0xa5, 0xb1, 0xbd, + 0xeb, 0x4f, 0x95, 0xaf, 0xda, 0x4b, 0x38, 0x20, 0x15, 0x43, 0x6d, 0x59, 0xf8, 0xa3, 0x51, 0x1f, + 0xf6, 0xfb, 0xfd, 0x40, 0xd9, 0xa7, 0xb0, 0xb2, 0xa2, 0xc7, 0xdd, 0xa2, 0x66, 0xfd, 0x88, 0x2e, + 0x2c, 0x16, 0xb7, 0x37, 0x6d, 0xb8, 0x11, 0x04, 0x72, 0x13, 0x3f, 0x53, 0xe9, 0xa4, 0x4b, 0xb2, + 0xe2, 0x9f, 0x8b, 0x33, 0xc0, 0x26, 0xe3, 0xc5, 0x1c, 0x40, 0x9c, 0x2c, 0x0d, 0xbc, 0x78, 0xf9, + 0x7c, 0x29, 0x18, 0x0c, 0x02, 0xdb, 0x94, 0x2d, 0xa6, 0x1d, 0xd6, 0x7a, 0x69, 0xda, 0xf4, 0xc3, + 0x62, 0xb1, 0xac, 0x77, 0x76, 0x76, 0x34, 0x6c, 0x18, 0x0c, 0x0d, 0xa1, 0x15, 0xb8, 0xec, 0x4e, + 0x83, 0xa4, 0xe2, 0xe0, 0xbc, 0xb6, 0x28, 0x0b, 0x18, 0x0a, 0x39, 0x40, 0x5f, 0x98, 0x19, 0x97, + 0x55, 0x72, 0x19, 0xec, 0xa9, 0xd4, 0xbd, 0x18, 0x58, 0x8c, 0xb1, 0x06, 0x0e, 0x87, 0x03, 0x30, + 0x0c, 0x03, 0x2c, 0x56, 0xcb, 0x6f, 0x95, 0xba, 0x6f, 0x0a, 0x56, 0xcf, 0xd9, 0xba, 0x0c, 0x8a, + 0x42, 0xca, 0x65, 0xf7, 0xae, 0x5f, 0x7d, 0x50, 0x5b, 0xd5, 0x83, 0x54, 0x14, 0xbc, 0x41, 0x2a, + 0x8b, 0xde, 0x63, 0x58, 0xef, 0xd7, 0xf9, 0x79, 0xcf, 0x7a, 0x34, 0x1a, 0x05, 0xb3, 0xb3, 0x33, + 0x31, 0xf8, 0x0a, 0x93, 0x0a, 0xa5, 0x1c, 0x53, 0x28, 0x9f, 0xdc, 0x6f, 0x6c, 0x6c, 0xcc, 0x4c, + 0xca, 0x01, 0x0b, 0x1b, 0x1e, 0x82, 0x68, 0xe5, 0x8e, 0x8f, 0x7f, 0x38, 0x81, 0xa9, 0x95, 0xc3, + 0x2e, 0x97, 0xf3, 0xe7, 0xda, 0xda, 0x1a, 0x58, 0xf0, 0x2d, 0xc4, 0x70, 0x02, 0xa3, 0x57, 0x56, + 0x56, 0xd8, 0x4c, 0xec, 0x87, 0xec, 0x85, 0x14, 0x40, 0xf2, 0x76, 0x0d, 0x87, 0x1a, 0x57, 0x11, + 0x56, 0xab, 0x25, 0x1c, 0x0a, 0x85, 0x00, 0xe3, 0x65, 0x62, 0x03, 0x83, 0xb8, 0x19, 0x96, 0x9b, + 0x95, 0x10, 0x97, 0x42, 0x32, 0x12, 0x06, 0xf9, 0x3b, 0xc4, 0x32, 0xb9, 0xa4, 0x8d, 0xfe, 0x44, + 0xaf, 0x7a, 0x3c, 0x1e, 0xe0, 0x76, 0xbb, 0xe3, 0x83, 0xd4, 0xc0, 0x17, 0xf8, 0x84, 0xc7, 0xe1, + 0x5e, 0x0d, 0xa4, 0x2a, 0xf1, 0x1f, 0x77, 0x47, 0x94, 0x59, 0x60, 0xca, 0x6e, 0x19, 0x8c, 0x23, + 0x4b, 0xd3, 0xd3, 0xd3, 0xc0, 0xe5, 0x72, 0x41, 0x31, 0x61, 0xa5, 0x28, 0x6a, 0x5f, 0xca, 0x21, + 0x6c, 0xf9, 0x79, 0x90, 0xec, 0x24, 0x03, 0x14, 0x6d, 0xad, 0x7e, 0xad, 0x7d, 0x15, 0x34, 0x9b, + 0xcd, 0x60, 0x62, 0x72, 0x02, 0x50, 0x43, 0xa4, 0xcd, 0x31, 0xe7, 0x60, 0x7b, 0xce, 0x87, 0x14, + 0x43, 0x38, 0x89, 0x35, 0x37, 0xb1, 0x1e, 0x48, 0x32, 0x78, 0xd8, 0xde, 0x76, 0x51, 0xa7, 0x7b, + 0x17, 0x35, 0x99, 0x46, 0xe3, 0xb0, 0x67, 0x2b, 0x9f, 0xcf, 0xdf, 0x7e, 0x72, 0x0e, 0xe4, 0x28, + 0x24, 0xfd, 0xaf, 0xd3, 0xc8, 0x22, 0x12, 0xb5, 0xb7, 0xc0, 0xa1, 0x91, 0xf0, 0x78, 0xbc, 0xec, + 0xff, 0x19, 0x65, 0x96, 0x3f, 0xa1, 0x97, 0xae, 0x1c, 0xfc, 0x3f, 0x7e, 0xea, 0x00, 0x00, 0x00, + 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE tree_nosel_xpm[1] = {{ png, sizeof( png ), "tree_nosel_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_16/tree_sel.cpp b/bitmaps_png/cpp_16/tree_sel.cpp new file mode 100644 index 0000000000..3b70faa095 --- /dev/null +++ b/bitmaps_png/cpp_16/tree_sel.cpp @@ -0,0 +1,54 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, + 0x61, 0x00, 0x00, 0x02, 0x4a, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0x63, 0xf8, 0xff, 0xff, 0x3f, + 0x03, 0x32, 0x9e, 0x37, 0xaf, 0x52, 0x74, 0xee, 0xdc, 0x1a, 0xf5, 0x99, 0x33, 0x1b, 0x44, 0xd0, + 0xe5, 0xb0, 0x61, 0x38, 0x03, 0xa4, 0x69, 0xc1, 0xbc, 0xba, 0x65, 0x33, 0x56, 0x14, 0xbe, 0x9f, + 0xb9, 0xac, 0xe8, 0xfd, 0xfc, 0x79, 0xb5, 0xaf, 0x80, 0x78, 0xc3, 0xbc, 0x79, 0x0d, 0x4a, 0x04, + 0x0d, 0x98, 0x3f, 0xbf, 0x41, 0x01, 0xa8, 0xf9, 0x70, 0xc1, 0x61, 0xfb, 0x57, 0xee, 0x57, 0x84, + 0x7f, 0xb9, 0x5c, 0x12, 0xfc, 0xed, 0x7d, 0x45, 0xec, 0x67, 0xd2, 0x19, 0xfd, 0x0f, 0xf3, 0xe6, + 0xd5, 0x1e, 0xeb, 0xe9, 0x6b, 0x2e, 0x5d, 0xb0, 0x68, 0xde, 0xb1, 0xce, 0xce, 0xb6, 0x10, 0xac, + 0x06, 0x2c, 0x98, 0x57, 0xdb, 0x1c, 0xb1, 0x4f, 0xf7, 0x85, 0xc9, 0x01, 0x8e, 0x3f, 0x1a, 0xbb, + 0x19, 0xfe, 0xc3, 0xb0, 0xe9, 0x7e, 0xae, 0x3f, 0xb5, 0x4b, 0xd3, 0xdf, 0x9c, 0x3a, 0x7d, 0xe2, + 0xe7, 0xee, 0x3d, 0xbb, 0x5e, 0x34, 0x37, 0xd7, 0x68, 0x82, 0xd4, 0x37, 0x34, 0x34, 0xf0, 0xc0, + 0x0d, 0x98, 0x34, 0x29, 0x97, 0x7d, 0xf6, 0xfc, 0xca, 0x25, 0x56, 0x9b, 0x44, 0x3f, 0xa9, 0x6d, + 0x62, 0xf8, 0x8f, 0x8e, 0x67, 0x6d, 0x9c, 0xf8, 0xe7, 0xed, 0xdb, 0xb7, 0xff, 0x17, 0x2f, 0x59, + 0x78, 0x0c, 0xac, 0x81, 0x81, 0x81, 0x71, 0xf6, 0xdc, 0x59, 0xa7, 0xa6, 0x4c, 0x9b, 0x38, 0x0d, + 0xcc, 0x07, 0x9a, 0xc6, 0x32, 0x67, 0x5e, 0x55, 0x9f, 0xfe, 0x02, 0xe1, 0x8f, 0x2a, 0x2b, 0x19, + 0xfe, 0xa3, 0xe3, 0xfe, 0xa5, 0xed, 0xbf, 0x3f, 0x7c, 0xf8, 0xf0, 0x7f, 0xff, 0xfe, 0x7d, 0xaf, + 0xa6, 0x4e, 0x9f, 0x3c, 0x7f, 0xf2, 0x94, 0x09, 0xbb, 0x2e, 0x5d, 0xba, 0xf8, 0x73, 0xc1, 0xc2, + 0x79, 0xc7, 0xe1, 0x5e, 0x00, 0xfa, 0x33, 0xc5, 0xa4, 0x5b, 0xf9, 0xb2, 0xe2, 0x1c, 0x96, 0xbf, + 0x4a, 0x0b, 0x19, 0xfe, 0xc3, 0xf1, 0x7c, 0xc6, 0xff, 0xe1, 0x5d, 0x7e, 0x2f, 0x6f, 0xdf, 0xbe, + 0xfd, 0xf7, 0xd1, 0xa3, 0x47, 0xff, 0x5f, 0xbe, 0x7c, 0xf9, 0x1f, 0x44, 0x03, 0x0d, 0xf8, 0xdd, + 0xdb, 0xdf, 0xdd, 0x8a, 0x12, 0x88, 0x93, 0x67, 0x94, 0x24, 0xca, 0x97, 0x4a, 0xde, 0x93, 0xe9, + 0xe0, 0xf8, 0x25, 0xdb, 0xc7, 0xf2, 0x5f, 0xb6, 0x8b, 0xfd, 0xa7, 0x56, 0x99, 0xea, 0x8d, 0x35, + 0xeb, 0x57, 0xbe, 0x7e, 0xf6, 0xec, 0xd9, 0xff, 0x3b, 0x77, 0xee, 0xfc, 0xdf, 0xba, 0x6d, 0xf3, + 0xd3, 0xb5, 0xeb, 0x56, 0x5f, 0x9f, 0x30, 0xa9, 0xa7, 0x2b, 0x34, 0x34, 0x94, 0x19, 0x25, 0x1a, + 0xe7, 0xcd, 0xab, 0x96, 0x6d, 0x99, 0x94, 0xe5, 0xeb, 0x55, 0xe8, 0x56, 0xa8, 0x9f, 0xa5, 0x3f, + 0xd1, 0x28, 0xcb, 0xa8, 0x6f, 0xee, 0x82, 0x99, 0xe7, 0x1f, 0x3f, 0x7e, 0xfc, 0xff, 0xd5, 0xab, + 0x57, 0xff, 0xb7, 0x6d, 0xdf, 0xfa, 0xb4, 0xa6, 0xb9, 0x46, 0x1d, 0x67, 0x3a, 0x00, 0xe1, 0x99, + 0x33, 0xd3, 0x58, 0xe7, 0xcc, 0x69, 0x10, 0x5a, 0xb4, 0xa8, 0x41, 0x6c, 0xd2, 0xa4, 0x9e, 0xe6, + 0xcb, 0x97, 0x2f, 0x7d, 0x03, 0x39, 0xfb, 0xc2, 0xc5, 0xf3, 0x1f, 0xfa, 0x26, 0xf6, 0xa6, 0xe2, + 0x4d, 0x48, 0xc8, 0xb8, 0xa1, 0xb5, 0x41, 0x67, 0xd7, 0xae, 0x1d, 0xcf, 0x9f, 0x3c, 0x79, 0xf2, + 0xff, 0xc1, 0x83, 0xfb, 0x7f, 0x66, 0xcf, 0x99, 0xbe, 0x92, 0x60, 0x4a, 0x84, 0xe1, 0xdc, 0xdc, + 0x5c, 0xf6, 0xc5, 0x8b, 0x17, 0x5c, 0x06, 0xf9, 0x19, 0x64, 0xc0, 0x92, 0x65, 0x8b, 0x2e, 0x02, + 0x63, 0x8a, 0x8d, 0x68, 0x03, 0xa6, 0x4c, 0x9b, 0xb4, 0xec, 0xc2, 0x85, 0xf3, 0x7f, 0xee, 0xdd, + 0xbb, 0xf7, 0x7f, 0xcb, 0xd6, 0x4d, 0x8f, 0x1b, 0x1a, 0x2a, 0x14, 0x88, 0xca, 0x0b, 0x20, 0xdc, + 0xdc, 0xdc, 0xe0, 0xb2, 0x7d, 0xfb, 0xd6, 0x4f, 0x67, 0xcf, 0x9e, 0xfd, 0x7f, 0xe8, 0xf0, 0xa1, + 0x77, 0x3d, 0xfd, 0x9d, 0x31, 0x44, 0x67, 0x26, 0x10, 0x6e, 0xef, 0x6c, 0x2d, 0xda, 0xb3, 0x77, + 0xcf, 0x9f, 0xfd, 0x07, 0xf6, 0xfd, 0x9a, 0x3e, 0x73, 0xca, 0x3c, 0x92, 0x72, 0x23, 0x34, 0x8d, + 0x33, 0xf5, 0xf4, 0x75, 0xd5, 0xf7, 0x4d, 0xe8, 0x2e, 0x22, 0x46, 0x33, 0x08, 0x03, 0x00, 0xa3, + 0x36, 0xa6, 0x81, 0xc6, 0x70, 0x96, 0x32, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, + 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE tree_sel_xpm[1] = {{ png, sizeof( png ), "tree_sel_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/tree_nosel.cpp b/bitmaps_png/cpp_26/tree_nosel.cpp deleted file mode 100644 index 2b8bc7b2aa..0000000000 --- a/bitmaps_png/cpp_26/tree_nosel.cpp +++ /dev/null @@ -1,101 +0,0 @@ - -/* Do not modify this file, it was automatically generated by the - * PNG2cpp CMake script, using a *.png file as input. - */ - -#include - -static const unsigned char png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, - 0xce, 0x00, 0x00, 0x05, 0x39, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x96, 0x7b, 0x4c, 0x53, - 0x57, 0x1c, 0xc7, 0x71, 0x80, 0x20, 0x2c, 0xf3, 0x3d, 0x61, 0x20, 0x28, 0xe8, 0xa6, 0x6e, 0x6c, - 0x73, 0x31, 0x8b, 0x0b, 0x7b, 0x28, 0x3e, 0x82, 0x4b, 0x96, 0xfd, 0xb1, 0xb9, 0x30, 0xb3, 0xb9, - 0xb9, 0x87, 0x9a, 0x65, 0x4e, 0x54, 0x14, 0xa1, 0xb7, 0xf5, 0xd2, 0x96, 0xb6, 0x14, 0x2a, 0xd1, - 0x81, 0x58, 0x68, 0xef, 0x6d, 0xe9, 0x40, 0x29, 0xaf, 0xa1, 0x08, 0x91, 0xc7, 0x98, 0x4f, 0x8c, - 0x0e, 0xc9, 0x14, 0xb0, 0x16, 0xa4, 0x22, 0xb6, 0x80, 0xa0, 0xd0, 0x27, 0x4f, 0xf9, 0xed, 0x9c, - 0xe6, 0x62, 0xee, 0x98, 0x14, 0x96, 0x99, 0xfd, 0xf1, 0xcd, 0xed, 0x4d, 0x7f, 0xe7, 0xf7, 0x39, - 0xf7, 0xf7, 0x3a, 0xc7, 0x0d, 0x00, 0xdc, 0xfe, 0x0f, 0x4d, 0xf8, 0x07, 0x4d, 0x93, 0x8b, 0x68, - 0x25, 0xf1, 0x3d, 0x4d, 0x73, 0xf7, 0xd2, 0x34, 0x71, 0x48, 0x45, 0xf1, 0xb6, 0x51, 0x54, 0xdc, - 0xfc, 0x67, 0x06, 0xd2, 0x28, 0x89, 0x57, 0x28, 0x8a, 0x2b, 0x57, 0x51, 0xdc, 0x6e, 0x9a, 0xe2, - 0xf6, 0x22, 0x3d, 0x62, 0xa9, 0x07, 0x81, 0x4b, 0xd1, 0x26, 0x96, 0xfd, 0x27, 0x10, 0x72, 0xf0, - 0x26, 0x02, 0x34, 0xa9, 0x15, 0x44, 0xdb, 0x79, 0xe9, 0x8e, 0x9e, 0x07, 0x7b, 0x22, 0x87, 0xcd, - 0x3f, 0x6d, 0x18, 0xb5, 0x20, 0x75, 0xed, 0xd9, 0x34, 0x74, 0x4d, 0xf8, 0x55, 0xef, 0x2f, 0x59, - 0x71, 0x6d, 0x08, 0xd8, 0xa0, 0xa6, 0x88, 0xf5, 0xec, 0xb5, 0x71, 0x64, 0xdc, 0x0a, 0x0e, 0x19, - 0xfb, 0xfe, 0xa4, 0x20, 0x95, 0x8a, 0x08, 0x45, 0x0e, 0xce, 0xe7, 0x1c, 0x8f, 0x6d, 0x34, 0xec, - 0x5c, 0x3f, 0xd8, 0xf9, 0xc9, 0xca, 0x11, 0x73, 0xd8, 0x2c, 0xb0, 0x86, 0x4c, 0x07, 0xeb, 0x62, - 0x4f, 0x30, 0x87, 0xcd, 0x84, 0x07, 0x1f, 0x2e, 0x1b, 0x35, 0xec, 0x88, 0x18, 0x2a, 0x48, 0x8f, - 0x69, 0xa2, 0x29, 0x5e, 0x7d, 0xb6, 0x92, 0x5c, 0x25, 0x14, 0x91, 0x3c, 0x89, 0x34, 0xd1, 0x9c, - 0xad, 0x51, 0x99, 0x8f, 0xcb, 0x8f, 0xd9, 0xb9, 0x24, 0x67, 0xaf, 0x4b, 0x10, 0xad, 0xe4, 0xca, - 0xd4, 0x59, 0xf1, 0x17, 0x6f, 0x6c, 0xfb, 0xc0, 0xd1, 0x1e, 0x1e, 0x38, 0xda, 0xb3, 0xc8, 0x13, - 0x9e, 0x26, 0xe3, 0xaa, 0x05, 0xd0, 0xb8, 0x35, 0x7c, 0x48, 0xad, 0xe0, 0x5c, 0x48, 0x91, 0x91, - 0x8d, 0x05, 0x45, 0xf9, 0x8e, 0xf6, 0xf6, 0x76, 0xd0, 0xdd, 0xd6, 0x81, 0x2c, 0x35, 0xb9, 0x8f, - 0x20, 0x0e, 0x2c, 0x9f, 0x10, 0xa4, 0x50, 0x90, 0x73, 0x50, 0x5e, 0x4a, 0x4e, 0xf1, 0xbe, 0xac, - 0xbb, 0xb9, 0x61, 0xd9, 0x90, 0x31, 0x18, 0x39, 0x74, 0xa1, 0x9b, 0x11, 0x4b, 0x46, 0xb4, 0xfb, - 0xb7, 0x18, 0xd4, 0xd9, 0xca, 0x91, 0xde, 0xde, 0x5e, 0xc0, 0xa0, 0xb4, 0xf4, 0xa3, 0x76, 0x1e, - 0x2f, 0x7e, 0x83, 0xcb, 0xd0, 0xa9, 0x94, 0xc4, 0x46, 0x14, 0xb6, 0x9c, 0xca, 0x4f, 0x57, 0x77, - 0x35, 0xad, 0x98, 0x09, 0x86, 0x20, 0x8f, 0x27, 0x6a, 0x7d, 0x8a, 0x6e, 0x2f, 0xf5, 0x05, 0x6a, - 0x67, 0xd4, 0xc0, 0xf5, 0xfa, 0xba, 0xc7, 0x7d, 0x7d, 0x7d, 0x70, 0xe7, 0x4e, 0x0b, 0x08, 0x45, - 0x09, 0xf5, 0xe3, 0x9d, 0x93, 0x7c, 0xee, 0x11, 0x04, 0xdf, 0xf4, 0x04, 0x44, 0x51, 0x44, 0x04, - 0x2a, 0xdf, 0x63, 0xa7, 0x37, 0x86, 0x3d, 0xba, 0x11, 0xe2, 0x03, 0xba, 0x40, 0x0f, 0x97, 0x6a, - 0x0c, 0xf6, 0x82, 0xb4, 0xdd, 0xdf, 0x8e, 0xe8, 0xf5, 0x3a, 0xc0, 0xa0, 0xe6, 0xe6, 0x66, 0x10, - 0x24, 0x92, 0x37, 0xdd, 0xdc, 0xdc, 0xa6, 0x8d, 0x41, 0x12, 0x04, 0xbc, 0xd8, 0xdc, 0x13, 0x39, - 0xb6, 0x24, 0xa9, 0x78, 0x80, 0x05, 0x22, 0xdf, 0x42, 0x65, 0x2b, 0xce, 0x8d, 0x58, 0x6e, 0xbc, - 0xbc, 0xd8, 0x17, 0xfe, 0x0c, 0xf0, 0x70, 0xa9, 0xab, 0xc1, 0xde, 0x20, 0xff, 0xf8, 0x3d, 0xeb, - 0x99, 0xb2, 0x92, 0x21, 0x8b, 0xc5, 0x02, 0x46, 0xa3, 0x11, 0x4a, 0x4e, 0x15, 0xdb, 0x85, 0xe2, - 0x84, 0x53, 0x1c, 0x92, 0xb3, 0x1a, 0x7d, 0xc5, 0x3e, 0x79, 0x66, 0x86, 0xe5, 0xfe, 0xfd, 0xfb, - 0x70, 0x38, 0x35, 0xd9, 0xb1, 0x79, 0xf3, 0x66, 0x77, 0x27, 0x48, 0xad, 0xe6, 0x04, 0xa0, 0x62, - 0x38, 0x98, 0x19, 0xb5, 0xb6, 0x24, 0x77, 0xf9, 0xbc, 0xc1, 0x6b, 0x2f, 0xb9, 0x03, 0xd6, 0xd5, - 0x09, 0x54, 0xb4, 0x74, 0xd6, 0x70, 0x5a, 0xd4, 0xba, 0x1a, 0x89, 0x54, 0xf4, 0x18, 0x83, 0x4c, - 0x26, 0x13, 0xb4, 0xb6, 0xb6, 0xc2, 0xa5, 0x4b, 0x17, 0x06, 0x0a, 0x8a, 0xf3, 0xcd, 0x55, 0x55, - 0x15, 0xfd, 0xfa, 0x66, 0x3d, 0xb4, 0xb5, 0xb5, 0x81, 0x48, 0x22, 0x70, 0x6c, 0xdf, 0xbe, 0xdd, - 0x93, 0xd5, 0x43, 0xbc, 0x8f, 0x14, 0x19, 0x07, 0x7e, 0x4c, 0x79, 0xf9, 0xc5, 0xbe, 0x92, 0x40, - 0xef, 0xd1, 0x8b, 0xfe, 0xee, 0x30, 0x5e, 0x17, 0x90, 0x4e, 0x07, 0x78, 0x81, 0xf4, 0xb5, 0x85, - 0xb6, 0xa4, 0x24, 0xc1, 0xa3, 0x5b, 0xb7, 0x9a, 0x9c, 0xa0, 0x8e, 0x8e, 0x0e, 0x67, 0xf8, 0xcc, - 0x66, 0x33, 0x74, 0x76, 0x76, 0xa2, 0x9c, 0xdd, 0x01, 0x83, 0xc1, 0x00, 0x95, 0x95, 0x67, 0x07, - 0xf8, 0xc2, 0x43, 0xe9, 0x7f, 0x2b, 0x6f, 0xb5, 0x5a, 0x34, 0x17, 0x85, 0x6f, 0xcb, 0xcf, 0xfb, - 0xbf, 0xd8, 0x4d, 0x06, 0xcd, 0xee, 0x91, 0xfb, 0xcf, 0x18, 0x3e, 0xe3, 0xe7, 0x01, 0xd5, 0x7e, - 0xee, 0x4e, 0x95, 0xa3, 0xdf, 0x72, 0x7f, 0x9f, 0x61, 0x5e, 0xf0, 0x5c, 0x8b, 0x58, 0x44, 0x9a, - 0xea, 0xeb, 0xaf, 0x8f, 0x0c, 0x0e, 0x0e, 0xc2, 0x18, 0xa8, 0xa5, 0xa5, 0x05, 0x4c, 0x1d, 0x26, - 0xb8, 0x77, 0xef, 0x1e, 0xe8, 0x74, 0x3a, 0x28, 0xfe, 0xb5, 0xd0, 0xce, 0x4f, 0x24, 0x9b, 0x63, - 0x62, 0x62, 0x7c, 0x9f, 0x36, 0x19, 0xfc, 0x68, 0x05, 0x11, 0x99, 0xc1, 0xdf, 0xf9, 0x59, 0xdc, - 0xab, 0x41, 0xf9, 0xfb, 0xe6, 0xfa, 0xf4, 0xec, 0x9d, 0xed, 0xe5, 0x88, 0x9e, 0xe5, 0x35, 0x10, - 0x8d, 0x9e, 0xfc, 0x77, 0xdf, 0xa8, 0x12, 0x27, 0xf2, 0x74, 0xb5, 0xb5, 0x97, 0x86, 0xfb, 0xfb, - 0xfb, 0x01, 0x83, 0xac, 0x56, 0xab, 0xb3, 0xbc, 0xb3, 0x94, 0x99, 0xd6, 0x94, 0xc3, 0xd2, 0x5b, - 0xd2, 0x14, 0x49, 0x8b, 0x24, 0x29, 0xb1, 0x39, 0x51, 0xcc, 0xff, 0x06, 0xe7, 0x66, 0xc2, 0x59, - 0x97, 0x9d, 0x1d, 0xe3, 0xab, 0x50, 0x70, 0x57, 0xaa, 0x54, 0xdc, 0x70, 0xac, 0x23, 0xc4, 0xd7, - 0x91, 0x59, 0xa9, 0xd1, 0x6b, 0x34, 0x1a, 0xc1, 0x9a, 0x64, 0x99, 0xe8, 0x8f, 0xdf, 0x7e, 0xaf, - 0x1e, 0xb4, 0xdb, 0xed, 0xe0, 0x70, 0x38, 0x9c, 0xa0, 0x87, 0x0f, 0x1f, 0x02, 0x45, 0x2b, 0xec, - 0x85, 0xc5, 0xf9, 0x02, 0xb4, 0x7e, 0x1e, 0xe3, 0x07, 0x57, 0x5f, 0xc8, 0x94, 0xa6, 0xb7, 0x56, - 0x4b, 0x4e, 0x97, 0xcb, 0xc9, 0x79, 0x57, 0xae, 0x94, 0xbf, 0xde, 0xd8, 0x78, 0xf9, 0x6d, 0xd9, - 0xe1, 0xa4, 0xf2, 0xf2, 0xf2, 0x33, 0xfd, 0x38, 0x0f, 0x36, 0x9b, 0xcd, 0x09, 0xb2, 0x58, 0xcc, - 0x90, 0xad, 0xa1, 0xac, 0xbc, 0x04, 0xce, 0xe7, 0x8c, 0xf3, 0x75, 0x2c, 0x1f, 0x78, 0xd2, 0x2f, - 0x61, 0x80, 0x2f, 0x4c, 0x65, 0xf2, 0x2e, 0xe5, 0x0b, 0xc9, 0xd4, 0xe2, 0x92, 0x22, 0x7b, 0x57, - 0x57, 0x97, 0xb3, 0x6f, 0x30, 0x08, 0x3f, 0x35, 0x39, 0x6a, 0x1b, 0x6a, 0xca, 0xad, 0x2c, 0xdb, - 0xb5, 0x48, 0xee, 0xac, 0x77, 0x0c, 0x7f, 0x1e, 0xc3, 0x26, 0x05, 0xc9, 0x52, 0xa5, 0x49, 0x79, - 0xda, 0x13, 0x0e, 0x9c, 0x64, 0x0c, 0xc2, 0x23, 0x07, 0xeb, 0x64, 0x5e, 0x0e, 0x4e, 0xf6, 0x77, - 0xe3, 0xec, 0xd9, 0x13, 0x3d, 0x10, 0x29, 0x98, 0xf9, 0x32, 0x4f, 0x97, 0x10, 0xb4, 0xdb, 0x1f, - 0xd4, 0x1a, 0x95, 0x1d, 0x97, 0x2e, 0x06, 0xe1, 0xd2, 0xed, 0xee, 0xee, 0x86, 0x13, 0x79, 0xb9, - 0x36, 0xb5, 0x86, 0x96, 0x21, 0x9b, 0x70, 0xa4, 0x19, 0x48, 0x41, 0x48, 0x91, 0x48, 0x0b, 0x58, - 0xeb, 0x43, 0xa7, 0x94, 0x23, 0x2e, 0x19, 0x1f, 0xa5, 0xa4, 0xb2, 0x6c, 0x0d, 0x0d, 0x0d, 0x30, - 0x06, 0x32, 0x9a, 0x8c, 0x90, 0xa7, 0x3d, 0x69, 0x43, 0xa1, 0x8c, 0x66, 0xec, 0xbc, 0x91, 0xde, - 0x61, 0x72, 0xc1, 0x5e, 0x8f, 0xe1, 0x0b, 0x27, 0x05, 0x11, 0xe4, 0xc1, 0xc8, 0xe3, 0x99, 0xe9, - 0xb6, 0xba, 0xba, 0x3a, 0x18, 0x03, 0xdd, 0xbd, 0x7b, 0x17, 0xf2, 0x0b, 0xb5, 0x0e, 0x04, 0x39, - 0x80, 0x6c, 0x9e, 0x73, 0x11, 0x09, 0x1f, 0xe6, 0x89, 0xe1, 0x5e, 0x13, 0x82, 0xb8, 0xdc, 0xd8, - 0xb0, 0xb4, 0x63, 0x47, 0xad, 0xb5, 0xb5, 0xb5, 0x30, 0x06, 0xd2, 0xeb, 0xf5, 0x50, 0x88, 0xce, - 0x1d, 0x91, 0x84, 0x9f, 0x80, 0x6c, 0xf0, 0x31, 0xbe, 0x98, 0xa9, 0x26, 0x3f, 0x26, 0xe1, 0xee, - 0x4c, 0x3e, 0xb0, 0xf3, 0x00, 0xc6, 0x66, 0x3e, 0xbb, 0xc4, 0xff, 0x01, 0xe2, 0x0b, 0x0e, 0xe5, - 0x54, 0x57, 0x57, 0x8e, 0x96, 0x96, 0x96, 0x42, 0x4d, 0x4d, 0x8d, 0x13, 0x84, 0x7a, 0xc4, 0x26, - 0x91, 0x0a, 0xc5, 0x0c, 0x60, 0x1a, 0xcb, 0x7e, 0x0e, 0xd3, 0x3b, 0x0b, 0x99, 0x30, 0xb2, 0x7d, - 0x2d, 0x70, 0x19, 0x3a, 0x54, 0x49, 0x74, 0x45, 0xc5, 0xd9, 0xc7, 0x65, 0x65, 0x65, 0x70, 0xee, - 0xdc, 0x39, 0x04, 0x29, 0xb0, 0xa3, 0x70, 0x25, 0x4f, 0x10, 0xa6, 0xb1, 0xc6, 0x0c, 0xfd, 0xd7, - 0xb7, 0x20, 0x92, 0x3c, 0xb8, 0x24, 0x59, 0x26, 0xb6, 0x16, 0x14, 0x68, 0xad, 0x19, 0xf2, 0x74, - 0x2b, 0x3a, 0x57, 0x38, 0x93, 0x38, 0xf1, 0x1f, 0xbf, 0xfb, 0x29, 0xdf, 0xeb, 0x76, 0xed, 0xda, - 0xe5, 0x85, 0x0a, 0x62, 0x7d, 0x7c, 0x7c, 0xbc, 0xff, 0xb3, 0xba, 0x40, 0xfe, 0x05, 0xa3, 0x0e, - 0x44, 0xc1, 0xe1, 0x8b, 0x0f, 0x11, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, - 0x60, 0x82, -}; - -const BITMAP_OPAQUE tree_nosel_xpm[1] = {{ png, sizeof( png ), "tree_nosel_xpm" }}; - -//EOF diff --git a/bitmaps_png/cpp_26/tree_sel.cpp b/bitmaps_png/cpp_26/tree_sel.cpp deleted file mode 100644 index 8302bd9b74..0000000000 --- a/bitmaps_png/cpp_26/tree_sel.cpp +++ /dev/null @@ -1,89 +0,0 @@ - -/* Do not modify this file, it was automatically generated by the - * PNG2cpp CMake script, using a *.png file as input. - */ - -#include - -static const unsigned char png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, - 0xce, 0x00, 0x00, 0x04, 0x83, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0x96, 0x7b, 0x4c, 0x5b, - 0x75, 0x14, 0xc7, 0x2f, 0x8f, 0x6c, 0xea, 0x5c, 0x9c, 0x65, 0x4c, 0x98, 0xa0, 0x22, 0x2e, 0x28, - 0x53, 0x8c, 0x9b, 0xba, 0xcd, 0x10, 0x13, 0x67, 0xcc, 0x36, 0x1d, 0x71, 0x92, 0xe0, 0xe3, 0x9f, - 0x65, 0x71, 0x11, 0x13, 0x32, 0xa2, 0x8b, 0x90, 0x42, 0xdb, 0x5b, 0x7e, 0x40, 0x4b, 0x69, 0x79, - 0x8f, 0x81, 0x1b, 0xa5, 0xf7, 0xb6, 0x8d, 0x80, 0xbc, 0x84, 0x86, 0xcd, 0x61, 0xa1, 0x10, 0x60, - 0x66, 0x93, 0x8d, 0x42, 0x99, 0x19, 0x30, 0x28, 0x8f, 0x8e, 0x95, 0x16, 0xcb, 0x08, 0xe5, 0xe1, - 0x18, 0x2d, 0xc7, 0xdf, 0xaf, 0xc4, 0x05, 0xe6, 0xc0, 0x09, 0xcc, 0x3f, 0xbe, 0xb9, 0xe9, 0x6d, - 0x7b, 0x3e, 0x39, 0xe7, 0x7b, 0xce, 0xf9, 0xfd, 0x28, 0x00, 0xa0, 0xfe, 0x0f, 0x2d, 0xfb, 0x05, - 0xc3, 0x08, 0xf6, 0x33, 0x8c, 0x30, 0x05, 0x3f, 0xf3, 0x59, 0x86, 0x2e, 0x62, 0x59, 0x41, 0x82, - 0xba, 0x10, 0xbd, 0xba, 0x6e, 0x20, 0x02, 0x60, 0x59, 0xfa, 0x17, 0x1c, 0xdc, 0x26, 0x57, 0xc7, - 0x8f, 0xe5, 0x97, 0x7d, 0x73, 0xfb, 0x54, 0x55, 0xd4, 0x38, 0xc3, 0x0a, 0x6c, 0xe4, 0x1d, 0xcb, - 0x08, 0x7f, 0x55, 0x2a, 0xe9, 0x9d, 0x6b, 0x02, 0x61, 0xc8, 0x61, 0x1c, 0xac, 0x2f, 0xb7, 0x22, - 0xca, 0x14, 0x79, 0xfd, 0xb5, 0xa9, 0x70, 0xdb, 0x16, 0xe7, 0x11, 0x33, 0xc7, 0xf1, 0xf1, 0x2d, - 0x8e, 0x23, 0xfc, 0x0f, 0x8e, 0xf3, 0x2b, 0xfc, 0x2e, 0xbf, 0xe4, 0xe4, 0x20, 0xa3, 0x10, 0x5c, - 0x63, 0x59, 0x74, 0x90, 0xfc, 0x07, 0xa1, 0x58, 0x1f, 0x01, 0x8a, 0x0f, 0x47, 0x08, 0x79, 0x3e, - 0x14, 0x88, 0x61, 0xf8, 0xef, 0x28, 0x19, 0xc1, 0x15, 0x69, 0xd5, 0xb1, 0x1b, 0x1f, 0x19, 0x39, - 0x8e, 0x3d, 0xfa, 0x8d, 0xf3, 0xc1, 0xcd, 0x14, 0xbc, 0xd2, 0xb4, 0xa0, 0xe0, 0x66, 0x37, 0xd8, - 0xdb, 0xbe, 0x71, 0x3e, 0xec, 0x86, 0xf7, 0x5c, 0x66, 0x65, 0xe4, 0x75, 0xb9, 0x5c, 0xd0, 0x29, - 0x91, 0x26, 0xb7, 0x9d, 0x29, 0xc8, 0xb7, 0x97, 0x57, 0x96, 0xde, 0x41, 0xc9, 0x74, 0xcd, 0x43, - 0x81, 0x94, 0x0c, 0x2d, 0x3f, 0x55, 0x14, 0x7d, 0xe9, 0x03, 0xbd, 0xd7, 0x5c, 0x48, 0x93, 0x07, - 0xbc, 0x5c, 0x4f, 0x2d, 0x55, 0xdd, 0x82, 0x5e, 0x6f, 0xf2, 0x84, 0x43, 0x97, 0x9f, 0x9d, 0x4d, - 0xcf, 0x4a, 0x99, 0xe9, 0x30, 0xb4, 0xcf, 0x9b, 0x4c, 0x26, 0x60, 0xd8, 0x42, 0x3b, 0x1f, 0xf1, - 0xdf, 0xfc, 0x57, 0x90, 0x5c, 0x8e, 0xfc, 0x18, 0x86, 0xd6, 0x1c, 0xaf, 0x09, 0xed, 0xde, 0x55, - 0xff, 0x84, 0x33, 0xe8, 0x67, 0x0a, 0x56, 0xd2, 0x71, 0xe6, 0x88, 0xf3, 0xb7, 0xd6, 0x4b, 0xf3, - 0xa3, 0xa3, 0xa3, 0x70, 0xf1, 0x62, 0x8b, 0x43, 0x24, 0x46, 0x67, 0x17, 0x07, 0xe5, 0x72, 0xb9, - 0x4f, 0xa1, 0x44, 0x41, 0x31, 0x42, 0x71, 0x2f, 0x2c, 0x01, 0xe1, 0x8e, 0xfa, 0x90, 0x55, 0x08, - 0xd4, 0xa1, 0xd5, 0xbe, 0xf6, 0x20, 0x8d, 0x07, 0xec, 0xd0, 0x50, 0x2b, 0xea, 0xe4, 0xe9, 0x48, - 0x30, 0x9b, 0xcd, 0x60, 0xb3, 0xd9, 0xa0, 0xb9, 0xa5, 0xc9, 0x49, 0xd3, 0x71, 0x27, 0x16, 0x83, - 0x92, 0x44, 0xa8, 0xe2, 0xdc, 0xf9, 0x1a, 0x87, 0x44, 0x2a, 0x6a, 0x59, 0x02, 0x52, 0x29, 0x84, - 0xef, 0xe1, 0xd2, 0xe5, 0xee, 0x56, 0xfb, 0xd8, 0x77, 0x94, 0xbb, 0xc3, 0x4b, 0x15, 0xd4, 0xf2, - 0x2a, 0xa7, 0x20, 0x36, 0xeb, 0x04, 0x98, 0x47, 0xcc, 0x30, 0x3e, 0x3e, 0x0e, 0x9d, 0xd7, 0x0c, - 0x20, 0x96, 0x24, 0x19, 0x69, 0x9a, 0xbb, 0x33, 0x22, 0x22, 0xc2, 0x83, 0x46, 0xbc, 0x63, 0x4a, - 0x35, 0x6b, 0x1f, 0x1e, 0x1e, 0x86, 0x54, 0x59, 0x8a, 0x6d, 0x09, 0x08, 0xb7, 0xeb, 0x6e, 0x3c, - 0x33, 0xa2, 0x5d, 0x79, 0xfe, 0xe6, 0x40, 0xb5, 0x27, 0x04, 0x96, 0x50, 0x10, 0x58, 0xbc, 0xbc, - 0x42, 0xf3, 0x82, 0xa0, 0xac, 0xfa, 0x47, 0xa7, 0xdd, 0x6e, 0x87, 0x91, 0x91, 0x11, 0xe8, 0xec, - 0x34, 0x60, 0x9f, 0xe4, 0x13, 0x99, 0xd9, 0x19, 0x13, 0x15, 0x95, 0xa5, 0x13, 0xdd, 0x3d, 0xdd, - 0x30, 0x30, 0x30, 0x00, 0x12, 0xa9, 0xf8, 0xf6, 0x7d, 0xa5, 0x43, 0x3e, 0xb8, 0x74, 0xb1, 0x9f, - 0x65, 0xef, 0x2f, 0x09, 0x48, 0xdb, 0x72, 0xe7, 0x45, 0x15, 0x05, 0x2b, 0x29, 0x40, 0xea, 0x35, - 0x93, 0x2c, 0x41, 0xd3, 0x56, 0xab, 0x05, 0xac, 0x56, 0x2b, 0x18, 0x8d, 0x46, 0x18, 0x1b, 0x1b, - 0x03, 0xe2, 0xd9, 0xe0, 0xe0, 0x20, 0xf4, 0xf7, 0xf7, 0x43, 0x63, 0xa3, 0x6e, 0x2e, 0x49, 0x94, - 0x20, 0xfd, 0x47, 0xd7, 0x61, 0x9f, 0x0e, 0x32, 0x85, 0x82, 0xaf, 0x9f, 0x8f, 0xf3, 0xb5, 0xf8, - 0xa7, 0x3f, 0xee, 0x08, 0x28, 0xc4, 0x01, 0x1f, 0x20, 0x3f, 0xf1, 0xe6, 0xd9, 0x4f, 0x84, 0x61, - 0x96, 0x0b, 0xb5, 0xe7, 0x67, 0x49, 0xe0, 0xde, 0xde, 0x5e, 0x57, 0x70, 0xe2, 0x19, 0xf9, 0xdc, - 0xd7, 0xd7, 0x0b, 0xd5, 0x9a, 0x9f, 0xa6, 0x71, 0x39, 0x3b, 0xf1, 0x6c, 0x71, 0x1e, 0x00, 0x42, - 0x5b, 0x58, 0x56, 0x18, 0x21, 0x3e, 0x1d, 0xfd, 0xa5, 0x6f, 0x94, 0x9f, 0x71, 0x5b, 0xcc, 0xd3, - 0x7f, 0x6e, 0x97, 0x6e, 0x80, 0xe7, 0x72, 0xdd, 0xc0, 0x3f, 0xdb, 0x1d, 0xb6, 0xa7, 0x6e, 0x80, - 0xad, 0xd1, 0x5e, 0xd3, 0x21, 0xd1, 0x21, 0x83, 0xdf, 0x17, 0xe4, 0x4d, 0x93, 0x0c, 0x2c, 0x16, - 0x0b, 0x74, 0x77, 0x77, 0xbb, 0x82, 0xcb, 0x15, 0x67, 0xa7, 0x72, 0x72, 0x32, 0x2d, 0xb2, 0x34, - 0x89, 0x01, 0x37, 0xc3, 0xb7, 0x14, 0x45, 0xb9, 0x2d, 0xbb, 0x19, 0x0a, 0x0b, 0x11, 0x47, 0xa9, - 0x14, 0xbe, 0x9f, 0x77, 0x86, 0x1b, 0xb6, 0x2f, 0x6a, 0x4f, 0x9a, 0xf7, 0x51, 0x7f, 0xc3, 0xa6, - 0x4f, 0x9f, 0xb1, 0x6f, 0xfe, 0xc2, 0xc7, 0xb6, 0xf5, 0xa8, 0xdf, 0xef, 0x87, 0x63, 0x0f, 0xd0, - 0x69, 0x19, 0x12, 0xcb, 0xcd, 0x9b, 0x26, 0x20, 0x66, 0x93, 0xb2, 0x11, 0x98, 0x52, 0xa5, 0x98, - 0x14, 0x0a, 0x79, 0x07, 0xfe, 0xd3, 0xae, 0xc3, 0x99, 0x3d, 0xc6, 0x30, 0xf1, 0xc1, 0xf8, 0xb9, - 0x57, 0xa5, 0xa0, 0xf7, 0x2d, 0x56, 0xaa, 0x34, 0xe9, 0x5c, 0x6b, 0xeb, 0xe5, 0xbb, 0xa4, 0x4c, - 0x24, 0x23, 0xd2, 0xde, 0x0d, 0x0d, 0xf5, 0x33, 0xc9, 0x62, 0x24, 0x5b, 0xf5, 0xf6, 0x2e, 0x2b, - 0x8b, 0xf0, 0x20, 0xe5, 0xc4, 0x50, 0x6f, 0x92, 0xa9, 0x58, 0x22, 0xfc, 0xbc, 0xb4, 0xac, 0x78, - 0x92, 0x64, 0x41, 0x00, 0x0b, 0x65, 0xeb, 0x72, 0x48, 0x65, 0x29, 0x57, 0xb0, 0x17, 0xee, 0xab, - 0x06, 0x2d, 0x16, 0x8f, 0xc7, 0xf3, 0xcd, 0xce, 0xcd, 0x1a, 0x33, 0x99, 0x86, 0x5c, 0xa6, 0x13, - 0x88, 0xd9, 0x7c, 0x0b, 0xb2, 0x72, 0x32, 0x6c, 0x08, 0xc5, 0x6c, 0x5b, 0xd3, 0x79, 0x74, 0xef, - 0x07, 0xd8, 0x54, 0x3c, 0xe1, 0x57, 0x3b, 0x3a, 0xda, 0xe7, 0x87, 0x86, 0x86, 0xee, 0x6d, 0x04, - 0xa5, 0x8a, 0x99, 0xe4, 0x23, 0xee, 0xbb, 0x6b, 0x3e, 0xf8, 0xfe, 0x56, 0x62, 0xb2, 0x30, 0x01, - 0xb7, 0xf2, 0x34, 0x99, 0x15, 0xb2, 0x40, 0x49, 0x36, 0x5a, 0x6d, 0xed, 0x14, 0xee, 0x2c, 0xe1, - 0xba, 0x9c, 0xb0, 0x44, 0x78, 0x87, 0xbd, 0xa5, 0x60, 0xe5, 0xf6, 0x9e, 0x9e, 0x1e, 0xdc, 0xc2, - 0x7d, 0x2e, 0x90, 0x5e, 0xdf, 0x36, 0x27, 0x91, 0x89, 0x5b, 0xee, 0x6f, 0xdf, 0x55, 0x83, 0xb0, - 0xc1, 0x4f, 0xa6, 0x67, 0xca, 0x46, 0xda, 0xda, 0xae, 0x42, 0x57, 0x57, 0x97, 0x6b, 0xfa, 0xb1, - 0xf9, 0x90, 0x99, 0x95, 0x66, 0x5d, 0x3c, 0x88, 0x6b, 0x06, 0xa5, 0x48, 0x92, 0x35, 0x3a, 0x5d, - 0xdd, 0x9c, 0x5e, 0xaf, 0x77, 0x0d, 0x25, 0xd9, 0x00, 0x0c, 0x53, 0x40, 0xce, 0x9d, 0xb7, 0xd7, - 0xed, 0x72, 0xc2, 0xe7, 0xf3, 0xfd, 0x95, 0x4a, 0xc5, 0x84, 0x4e, 0xa7, 0x83, 0xba, 0xba, 0x3a, - 0x30, 0x18, 0x0c, 0xa0, 0xd1, 0x54, 0x4d, 0x61, 0xbf, 0xbe, 0x5b, 0xd7, 0x5b, 0x10, 0xf6, 0xe6, - 0x0d, 0x56, 0xa5, 0x98, 0xd0, 0x6a, 0xb5, 0x50, 0x5b, 0x5b, 0x0b, 0x0d, 0x8d, 0xf5, 0x77, 0x53, - 0x52, 0x45, 0xda, 0x47, 0x72, 0xdd, 0x12, 0x89, 0x13, 0xd5, 0x2c, 0xce, 0xea, 0x87, 0x22, 0xb5, - 0x5d, 0x92, 0x2a, 0xba, 0x10, 0x13, 0x13, 0xb3, 0xe9, 0x91, 0x80, 0x48, 0x57, 0x91, 0x1b, 0x0e, - 0x0f, 0xf1, 0x42, 0xd6, 0xe3, 0x02, 0xf9, 0x17, 0x7f, 0x4e, 0x23, 0x68, 0x48, 0x3d, 0x71, 0xa9, - 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -}; - -const BITMAP_OPAQUE tree_sel_xpm[1] = {{ png, sizeof( png ), "tree_sel_xpm" }}; - -//EOF diff --git a/eeschema/hierarch.cpp b/eeschema/hierarch.cpp index 8906933fbe..7afbbf1972 100644 --- a/eeschema/hierarch.cpp +++ b/eeschema/hierarch.cpp @@ -85,9 +85,12 @@ HIERARCHY_TREE::HIERARCHY_TREE( HIERARCHY_NAVIG_DLG* parent ) : m_Parent = parent; // Make an image list containing small icons - imageList = new wxImageList( 16, 15, true, 2 ); + // All icons are expected having the same size. + wxBitmap tree_nosel_bm( KiBitmap( tree_nosel_xpm ) ); + imageList = new wxImageList( tree_nosel_bm.GetSize().x, + tree_nosel_bm.GetSize().y, true, 2 ); - imageList->Add( KiBitmap( tree_nosel_xpm ) ); + imageList->Add( tree_nosel_bm ); imageList->Add( KiBitmap( tree_sel_xpm ) ); AssignImageList( imageList ); @@ -147,36 +150,31 @@ HIERARCHY_NAVIG_DLG::HIERARCHY_NAVIG_DLG( SCH_EDIT_FRAME* parent, wxDC* DC, cons cellule = m_Tree->AddRoot( _( "Root" ), 0, 1 ); m_Tree->SetItemBold( cellule, true ); + SCH_SHEET_PATH list; list.Push( g_RootSheet ); m_Tree->SetItemData( cellule, new TreeItemData( list ) ); - wxRect itemrect; -#ifdef __UNIX__ - itemrect.SetWidth( 100 ); - itemrect.SetHeight( 20 ); -#else - m_Tree->GetBoundingRect( cellule, itemrect ); -#endif - m_TreeSize.x = itemrect.GetWidth() + 10; - m_TreeSize.y = 20; - if( m_Parent->GetCurrentSheet().Last() == g_RootSheet ) m_Tree->SelectItem( cellule ); //root. maxposx = 15; BuildSheetsTree( &list, &cellule ); - if( m_nbsheets > 1 ) - { - m_Tree->Expand( cellule ); + m_Tree->Expand( cellule ); - // Readjust the size of the frame to an optimal value. - m_TreeSize.y += m_nbsheets * itemrect.GetHeight(); - m_TreeSize.x = MIN( m_TreeSize.x, 250 ); - m_TreeSize.y = MIN( m_TreeSize.y, 350 ); - SetClientSize( m_TreeSize ); - } + wxRect itemrect; + m_Tree->GetBoundingRect( cellule, itemrect ); + + // Set dialog window size to be large enough + m_TreeSize.x = itemrect.GetWidth() + 20; + m_TreeSize.x = max( m_TreeSize.x, 250 ); + + // Readjust the size of the frame to an optimal value. + m_TreeSize.y = m_nbsheets * itemrect.GetHeight(); + m_TreeSize.y += 10; + + SetClientSize( m_TreeSize ); } From 8234b9e184ee0e8eb555e77657be8a075d1b996d Mon Sep 17 00:00:00 2001 From: "l." Date: Wed, 11 Jul 2012 10:02:47 +0200 Subject: [PATCH 21/25] All: Fix Assertion on sheet properties, in debug mode --- common/dialogs/dialog_page_settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index 1fdd63845c..a8dc43fe6c 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -624,8 +624,8 @@ void DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample() // Prepare DC. wxSize example_size( lyWidth, lyHeight ); wxMemoryDC memDC; - memDC.SetClippingRegion( wxPoint( 0, 0 ), example_size ); memDC.SelectObject( *m_page_bitmap ); + memDC.SetClippingRegion( wxPoint( 0, 0 ), example_size ); memDC.Clear(); memDC.SetUserScale( scaleW, scaleH ); From 8439dc450ff8972b55ad70f5352a6f365fd9adb6 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 12 Jul 2012 16:59:06 +0200 Subject: [PATCH 22/25] Eeschema: fix compatibility issue with wxWidgets 2.8.12 --- eeschema/hierarch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eeschema/hierarch.cpp b/eeschema/hierarch.cpp index 7afbbf1972..1df71898f5 100644 --- a/eeschema/hierarch.cpp +++ b/eeschema/hierarch.cpp @@ -87,8 +87,8 @@ HIERARCHY_TREE::HIERARCHY_TREE( HIERARCHY_NAVIG_DLG* parent ) : // Make an image list containing small icons // All icons are expected having the same size. wxBitmap tree_nosel_bm( KiBitmap( tree_nosel_xpm ) ); - imageList = new wxImageList( tree_nosel_bm.GetSize().x, - tree_nosel_bm.GetSize().y, true, 2 ); + imageList = new wxImageList( tree_nosel_bm.GetWidth(), + tree_nosel_bm.GetHeight(), true, 2 ); imageList->Add( tree_nosel_bm ); imageList->Add( KiBitmap( tree_sel_xpm ) ); From 018b0800011a3832898573325e1112d889cad985 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 13 Jul 2012 20:55:29 +0200 Subject: [PATCH 23/25] Pcbnew: Add keepout areas (Copper zones without tracks or/and vias). This is *a work in progress*, so some features are missing, and/or could be modified. Mainly keepout zones are not yet exported to autorouters, and pads are not taken in account. Some code cleanup in polygon.* --- bitmaps_png/CMakeLists.txt | 1 + bitmaps_png/cpp_26/add_keepout_area.cpp | 82 + bitmaps_png/sources/add_keepout_area.svg | 178 + common/pcb.keywords | 6 + include/bitmaps.h | 1 + pcbnew/CMakeLists.txt | 2 + pcbnew/class_drc_item.cpp | 15 +- pcbnew/class_zone.cpp | 27 +- pcbnew/class_zone.h | 59 +- pcbnew/class_zone_settings.cpp | 25 +- pcbnew/class_zone_settings.h | 43 +- pcbnew/controle.cpp | 1 + pcbnew/dialogs/dialog_copper_zones.cpp | 18 +- pcbnew/dialogs/dialog_copper_zones_base.cpp | 14 +- pcbnew/dialogs/dialog_copper_zones_base.fbp | 7047 +++++++++-------- pcbnew/dialogs/dialog_copper_zones_base.h | 7 +- pcbnew/dialogs/dialog_drc.cpp | 14 +- .../dialog_keepout_area_properties.cpp | 277 + .../dialog_keepout_area_properties_base.cpp | 103 + .../dialog_keepout_area_properties_base.fbp | 897 +++ .../dialog_keepout_area_properties_base.h | 70 + ...ialog_non_copper_zones_properties_base.cpp | 191 +- ...ialog_non_copper_zones_properties_base.fbp | 1714 ++-- .../dialog_non_copper_zones_properties_base.h | 136 +- pcbnew/drc.cpp | 121 + pcbnew/drc_stuff.h | 30 +- pcbnew/edit.cpp | 4 + pcbnew/kicad_plugin.cpp | 10 +- pcbnew/legacy_plugin.cpp | 40 +- pcbnew/menubar_pcbframe.cpp | 4 + pcbnew/onleftclick.cpp | 29 +- pcbnew/onrightclick.cpp | 15 +- pcbnew/pcb_parser.cpp | 43 + pcbnew/pcbnew_id.h | 1 + pcbnew/tool_pcb.cpp | 4 + pcbnew/zone_filling_algorithm.cpp | 30 +- pcbnew/zones.h | 11 + pcbnew/zones_by_polygon.cpp | 47 +- pcbnew/zones_by_polygon_fill_functions.cpp | 12 +- ...nvert_brd_items_to_polygons_with_Boost.cpp | 9 +- pcbnew/zones_functions_for_undo_redo.cpp | 28 +- pcbnew/zones_non_copper_type_functions.cpp | 10 +- pcbnew/zones_test_and_combine_areas.cpp | 103 +- polygon/PolyLine.cpp | 221 +- polygon/PolyLine.h | 42 +- 45 files changed, 6968 insertions(+), 4774 deletions(-) create mode 100644 bitmaps_png/cpp_26/add_keepout_area.cpp create mode 100644 bitmaps_png/sources/add_keepout_area.svg create mode 100644 pcbnew/dialogs/dialog_keepout_area_properties.cpp create mode 100644 pcbnew/dialogs/dialog_keepout_area_properties_base.cpp create mode 100644 pcbnew/dialogs/dialog_keepout_area_properties_base.fbp create mode 100644 pcbnew/dialogs/dialog_keepout_area_properties_base.h diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt index b9371a7ad5..3347843124 100644 --- a/bitmaps_png/CMakeLists.txt +++ b/bitmaps_png/CMakeLists.txt @@ -129,6 +129,7 @@ set( BMAPS_MID add_hierar_pin add_hierarchical_subsheet add_junction + add_keepout_area add_line2bus add_line_label add_line diff --git a/bitmaps_png/cpp_26/add_keepout_area.cpp b/bitmaps_png/cpp_26/add_keepout_area.cpp new file mode 100644 index 0000000000..cd8d4d0c19 --- /dev/null +++ b/bitmaps_png/cpp_26/add_keepout_area.cpp @@ -0,0 +1,82 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x04, 0x0b, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xbd, 0xd6, 0x5f, 0x4c, 0x53, + 0x57, 0x1c, 0x07, 0xf0, 0x5b, 0x4a, 0x59, 0x41, 0x18, 0xcc, 0x44, 0xd4, 0x42, 0x81, 0xd2, 0xd6, + 0x21, 0xd3, 0x0d, 0xc7, 0xc0, 0xc4, 0xd0, 0x0c, 0x1a, 0x61, 0xe8, 0x58, 0x04, 0x16, 0x15, 0x87, + 0x32, 0x08, 0x43, 0x83, 0xcc, 0x4c, 0x37, 0x56, 0xa0, 0x02, 0x86, 0xe0, 0xa4, 0x30, 0x81, 0xc1, + 0x1c, 0x6a, 0x41, 0xf9, 0x53, 0x6a, 0xe5, 0x6f, 0x0b, 0x88, 0x80, 0xe0, 0xda, 0x52, 0xda, 0x42, + 0xf4, 0x61, 0xcf, 0x4b, 0x7c, 0x59, 0x32, 0x93, 0xbd, 0x2c, 0xf1, 0xdf, 0x93, 0x8c, 0xef, 0x7a, + 0x6f, 0xd3, 0xd3, 0x15, 0xda, 0x72, 0xb7, 0x87, 0x3d, 0x7c, 0xdb, 0xdb, 0x7b, 0xcf, 0xf9, 0x7d, + 0xee, 0x39, 0x3d, 0xf7, 0x0f, 0x05, 0x80, 0xfa, 0x3f, 0xc2, 0x7c, 0xc4, 0xbe, 0x1d, 0xf4, 0x4b, + 0x94, 0x24, 0xe0, 0x35, 0x9d, 0xb4, 0x0c, 0xce, 0x6a, 0xe1, 0x29, 0xce, 0x5a, 0x45, 0x05, 0xb5, + 0x76, 0xfe, 0x3c, 0x85, 0xa2, 0x62, 0xce, 0x5a, 0xd6, 0x61, 0xce, 0x5f, 0xd1, 0x52, 0xe7, 0xf1, + 0xff, 0x90, 0x17, 0x04, 0x12, 0xef, 0x09, 0x7d, 0xd2, 0xa0, 0x56, 0xe1, 0x72, 0x6b, 0x2a, 0x6a, + 0xaa, 0x29, 0xaf, 0x69, 0xb8, 0x22, 0x85, 0xfa, 0x7e, 0x3f, 0x7a, 0x8d, 0x73, 0xac, 0x73, 0x7d, + 0x7a, 0x0c, 0x51, 0x52, 0xee, 0x6b, 0x0f, 0xe8, 0x92, 0x6a, 0x3d, 0xc2, 0xc1, 0xc5, 0xda, 0x10, + 0x8f, 0x7d, 0x8d, 0xcd, 0x89, 0xd0, 0x2d, 0x5b, 0x70, 0x77, 0xc5, 0xca, 0x2a, 0x34, 0xe6, 0x01, + 0xa5, 0x65, 0xf0, 0x9f, 0xba, 0x8a, 0x29, 0x6b, 0xb8, 0x68, 0xef, 0x2d, 0xc2, 0x80, 0x71, 0xd4, + 0xd1, 0x78, 0x09, 0x3d, 0xd3, 0xd7, 0x50, 0xdf, 0x10, 0x49, 0x30, 0x65, 0xf7, 0x51, 0xd4, 0x4c, + 0xb4, 0x42, 0x61, 0x68, 0xc1, 0x80, 0xed, 0xe7, 0x7f, 0x07, 0xe5, 0x1d, 0xe3, 0xfd, 0xe9, 0x2a, + 0xa4, 0xea, 0x90, 0x6d, 0xe8, 0xd0, 0x35, 0x5c, 0x43, 0xa0, 0xfc, 0x2a, 0x0a, 0x5c, 0x85, 0x33, + 0x1f, 0xb4, 0x1d, 0x80, 0x76, 0x79, 0x91, 0x3d, 0x54, 0x52, 0xca, 0x7d, 0xe5, 0x2a, 0x74, 0xd3, + 0xd0, 0xb4, 0xa1, 0xc3, 0x1d, 0xc7, 0x99, 0x2b, 0x95, 0x3c, 0xe6, 0xf8, 0x99, 0x6a, 0x37, 0x44, + 0x47, 0xf6, 0x63, 0x16, 0x74, 0x8e, 0x91, 0xb3, 0x82, 0x0a, 0x0a, 0x03, 0x9f, 0xb9, 0xa0, 0x1f, + 0xfa, 0x4a, 0x36, 0x74, 0x18, 0x5c, 0x9c, 0x22, 0x23, 0x3a, 0xb9, 0x0e, 0xa2, 0x93, 0x7d, 0x33, + 0x9f, 0x1d, 0x74, 0xf0, 0xd0, 0x1b, 0x7f, 0xd4, 0x56, 0x52, 0x68, 0xfa, 0x82, 0x83, 0xba, 0x4b, + 0x6f, 0x41, 0x63, 0x9e, 0x20, 0x8d, 0x75, 0x76, 0x13, 0x5a, 0xba, 0xb2, 0x09, 0x54, 0xd6, 0x24, + 0xc5, 0xc7, 0xea, 0x63, 0x4c, 0xc2, 0x6b, 0xc3, 0x09, 0xf6, 0xe9, 0xed, 0xe2, 0xcd, 0x21, 0xc9, + 0xde, 0xd0, 0x27, 0x5a, 0xf9, 0x56, 0x98, 0xb7, 0x71, 0x61, 0xd8, 0xcb, 0x45, 0xc7, 0x09, 0x2e, + 0x9a, 0x3b, 0xe5, 0x68, 0xeb, 0x39, 0x8e, 0xba, 0xfa, 0x70, 0xf7, 0x42, 0x70, 0x4c, 0x5f, 0xdf, + 0x82, 0x96, 0x14, 0xba, 0x7a, 0xa7, 0x15, 0x29, 0xc5, 0x7c, 0x82, 0x15, 0x0d, 0x9e, 0xf3, 0x0f, + 0xe5, 0x8a, 0x42, 0x7e, 0xb7, 0x08, 0x22, 0x61, 0x8e, 0x0c, 0x62, 0x30, 0x3a, 0x33, 0x62, 0x2e, + 0x5a, 0x4a, 0x38, 0x1e, 0xcb, 0xbb, 0x53, 0x53, 0xce, 0x14, 0x98, 0xe8, 0xbe, 0x01, 0x53, 0xce, + 0x61, 0x2c, 0x8b, 0xe2, 0x60, 0x16, 0xee, 0x40, 0xe1, 0x47, 0x3c, 0x06, 0x0a, 0x54, 0x70, 0x50, + 0x3e, 0xa4, 0xf4, 0x0d, 0xc9, 0xa4, 0x21, 0xbf, 0x8d, 0xe6, 0xe5, 0xc0, 0x26, 0x15, 0xc3, 0xb2, + 0x63, 0x0b, 0xc1, 0x4c, 0x91, 0x5c, 0xdc, 0xca, 0x0a, 0x40, 0x7d, 0x7d, 0x04, 0x6e, 0x8c, 0x37, + 0x62, 0xb2, 0xb3, 0x1d, 0x66, 0x79, 0x3a, 0x03, 0xd0, 0x59, 0x4c, 0xff, 0x10, 0xe3, 0x43, 0x5a, + 0x5c, 0x18, 0x6b, 0x44, 0x60, 0x55, 0x00, 0x83, 0xf1, 0x1c, 0xdf, 0x95, 0xfa, 0x2b, 0xde, 0x21, + 0xfa, 0x82, 0x6d, 0x1e, 0x54, 0x63, 0x78, 0x61, 0x0e, 0x33, 0xca, 0x2a, 0x2c, 0xbd, 0x93, 0x00, + 0xab, 0x70, 0x3b, 0xac, 0xd1, 0xdb, 0x60, 0x8b, 0x11, 0xc0, 0x94, 0x99, 0x81, 0x87, 0xc7, 0x8f, + 0x12, 0xc0, 0x2e, 0x11, 0x63, 0x56, 0xf1, 0x0d, 0x86, 0x6c, 0xee, 0xa5, 0x7d, 0xfa, 0xae, 0x82, + 0x4c, 0x21, 0xbf, 0x9a, 0x87, 0xba, 0xa9, 0x0e, 0xdf, 0x90, 0xab, 0xd3, 0xc8, 0x83, 0xfb, 0xee, + 0xc2, 0x31, 0x42, 0x3c, 0x0a, 0x0b, 0x73, 0x24, 0x14, 0xcb, 0xb1, 0x31, 0x58, 0x7a, 0x7f, 0x1f, + 0xc6, 0x47, 0x74, 0x5e, 0x57, 0xd9, 0x89, 0xfe, 0x33, 0x04, 0xdb, 0xa2, 0x0c, 0x46, 0xbd, 0xa1, + 0xd3, 0x3f, 0xe4, 0xca, 0x6c, 0xe5, 0xd7, 0x0c, 0xf2, 0x98, 0xcf, 0x67, 0xf2, 0x28, 0x22, 0x02, + 0xfa, 0x81, 0x5e, 0xbf, 0x77, 0x83, 0x4f, 0xba, 0x0b, 0x08, 0xf6, 0xe6, 0xc5, 0x30, 0x6c, 0x4f, + 0x0e, 0x58, 0xf5, 0x0b, 0xdd, 0x53, 0x7d, 0x07, 0xbb, 0x54, 0x82, 0x95, 0xe8, 0x28, 0x3c, 0x0e, + 0x09, 0x61, 0xb2, 0x22, 0x8c, 0x86, 0xf9, 0xa0, 0x1c, 0x43, 0x56, 0xb3, 0x4f, 0x88, 0xbe, 0x78, + 0xd3, 0x7f, 0x3a, 0x44, 0xb0, 0xa0, 0x2f, 0x69, 0xc2, 0x07, 0x34, 0x79, 0xad, 0xc3, 0x31, 0x6d, + 0x22, 0xf7, 0x7f, 0xe2, 0x00, 0xed, 0x12, 0x09, 0xf9, 0x3d, 0x5f, 0x56, 0xea, 0x77, 0x54, 0xf4, + 0x6d, 0x29, 0xa5, 0x3d, 0xcd, 0x89, 0x55, 0xfa, 0x80, 0xe8, 0xf9, 0xb7, 0xed, 0x4e, 0x20, 0x45, + 0x6d, 0x89, 0xbb, 0x31, 0xae, 0xd3, 0x40, 0xaf, 0xed, 0x67, 0xb6, 0x5d, 0xfb, 0xa7, 0xda, 0xbe, + 0xf7, 0x8b, 0x69, 0x6c, 0x46, 0x24, 0xaa, 0xde, 0x05, 0xf7, 0x5b, 0x2f, 0x10, 0xbd, 0xea, 0x96, + 0x52, 0x53, 0x48, 0x31, 0x3a, 0xf7, 0xae, 0x36, 0x93, 0xce, 0x7a, 0x4d, 0x1f, 0x39, 0x09, 0x6b, + 0xd2, 0x7b, 0x18, 0x36, 0x2d, 0xf8, 0xc5, 0xba, 0xe6, 0xf5, 0xe0, 0x9f, 0xe6, 0xac, 0x6d, 0x80, + 0x16, 0x8a, 0x8b, 0x3c, 0x10, 0x63, 0xee, 0x91, 0x0d, 0x9d, 0x0d, 0xbd, 0x3d, 0xb0, 0xc7, 0x3b, + 0xa7, 0x75, 0xee, 0xdc, 0xd9, 0x4d, 0x1f, 0x13, 0x3b, 0xf7, 0xac, 0x5b, 0x75, 0xd7, 0x2f, 0xd7, + 0x7a, 0xfc, 0x2f, 0xf4, 0x99, 0x8f, 0x4e, 0x4f, 0x7a, 0x2d, 0xf0, 0xa0, 0xa2, 0x9c, 0x5c, 0x4f, + 0x63, 0x86, 0x51, 0xf6, 0x8f, 0x09, 0xa9, 0x03, 0x9a, 0x4b, 0x4e, 0xf2, 0x18, 0xcd, 0x4c, 0xb5, + 0xc2, 0x67, 0x81, 0xa1, 0x45, 0x23, 0x2c, 0xfb, 0x53, 0x9d, 0xa3, 0xce, 0x3b, 0xc2, 0x1e, 0xca, + 0x8f, 0x0b, 0x7e, 0x6a, 0x89, 0x12, 0xfc, 0x63, 0x01, 0x24, 0x62, 0xd8, 0x38, 0xef, 0x77, 0x5a, + 0x0c, 0xb7, 0xd4, 0xa4, 0xbd, 0xbe, 0xff, 0x36, 0x3b, 0x88, 0x9e, 0xba, 0x81, 0xb3, 0xa5, 0xb0, + 0x8b, 0xe3, 0x99, 0x8e, 0xb3, 0x17, 0xbe, 0x62, 0xf5, 0x4e, 0xb0, 0xf0, 0xf9, 0x29, 0xa6, 0xfd, + 0xc3, 0xcf, 0x0a, 0xd8, 0x41, 0xa2, 0xc4, 0xe0, 0x5f, 0x93, 0x64, 0xb1, 0x2f, 0x4f, 0xa6, 0xc4, + 0xbe, 0x1c, 0xd9, 0x1a, 0xba, 0x2a, 0x4f, 0xdf, 0xf5, 0x7c, 0x7f, 0x66, 0xc2, 0xb3, 0xcd, 0x92, + 0x2d, 0x93, 0xbc, 0xa0, 0xdb, 0x97, 0xed, 0x13, 0xbe, 0xf2, 0x76, 0x3c, 0x55, 0xbe, 0xeb, 0x39, + 0xfd, 0xca, 0x45, 0x20, 0x81, 0x98, 0x3a, 0xb0, 0x53, 0x4c, 0x65, 0xd3, 0x49, 0x8e, 0xa3, 0x72, + 0x5d, 0xdb, 0x6c, 0x22, 0x8d, 0xa7, 0x72, 0xfc, 0x1d, 0x17, 0x88, 0xa8, 0x4c, 0xda, 0xf8, 0x1b, + 0x60, 0x76, 0x60, 0xa1, 0x4e, 0x22, 0xae, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, + 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE add_keepout_area_xpm[1] = {{ png, sizeof( png ), "add_keepout_area_xpm" }}; + +//EOF diff --git a/bitmaps_png/sources/add_keepout_area.svg b/bitmaps_png/sources/add_keepout_area.svg new file mode 100644 index 0000000000..cefa8a3720 --- /dev/null +++ b/bitmaps_png/sources/add_keepout_area.svg @@ -0,0 +1,178 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/pcb.keywords b/common/pcb.keywords index 5e0f9a7b43..90767b1437 100644 --- a/common/pcb.keywords +++ b/common/pcb.keywords @@ -24,6 +24,7 @@ # These are the keywords for the Pcbnew s-expression file format. add_net +allowed angle arc arc_segments @@ -84,6 +85,7 @@ hatch hide italic justify +keepout kicad_pcb last_trace_width layer @@ -107,10 +109,12 @@ nets no no_connects none +not_allowed np_thru_hole offset oval pad +pads pad_drill pad_size pad_to_mask_clearance @@ -178,6 +182,7 @@ uvias_allowed value version via +vias via_dia via_drill via_min_drill @@ -194,4 +199,5 @@ zone zone_45_only zone_clearance zone_connect +zone_type zones diff --git a/include/bitmaps.h b/include/bitmaps.h index 0f8dd57e9b..a9c6331d81 100644 --- a/include/bitmaps.h +++ b/include/bitmaps.h @@ -62,6 +62,7 @@ EXTERN_BITMAP( add_hierarchical_label_xpm ) EXTERN_BITMAP( add_hierarchical_subsheet_xpm ) EXTERN_BITMAP( add_hierar_pin_xpm ) EXTERN_BITMAP( add_junction_xpm ) +EXTERN_BITMAP( add_keepout_area_xpm ) EXTERN_BITMAP( add_line2bus_xpm ) EXTERN_BITMAP( add_line_label_xpm ) EXTERN_BITMAP( add_line_xpm ) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 8aed49b338..b944320db3 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -61,6 +61,8 @@ set(PCBNEW_DIALOGS dialogs/dialog_graphic_item_properties_for_Modedit.cpp dialogs/dialog_global_deletion.cpp dialogs/dialog_global_deletion_base.cpp + dialogs/dialog_keepout_area_properties.cpp + dialogs/dialog_keepout_area_properties_base.cpp dialogs/dialog_layers_setup.cpp dialogs/dialog_layers_setup_base.cpp dialogs/dialog_netlist.cpp diff --git a/pcbnew/class_drc_item.cpp b/pcbnew/class_drc_item.cpp index 402e3643af..edbdf94308 100644 --- a/pcbnew/class_drc_item.cpp +++ b/pcbnew/class_drc_item.cpp @@ -102,8 +102,21 @@ wxString DRC_ITEM::GetErrorText() const case DRCE_NETCLASS_uVIADRILLSIZE: return wxString( _("NetClass uVia Drill < global limit")); + case DRCE_VIA_INSIDE_KEEPOUT: + return wxString( _("Via inside a keepout area")); + + case DRCE_TRACK_INSIDE_KEEPOUT: + return wxString( _("Track inside a keepout area")); + + case DRCE_PAD_INSIDE_KEEPOUT: + return wxString( _("Pad inside a keepout area")); + default: - return wxString( wxT("PROGRAM BUG, PLEASE LEAVE THE ROOM.") ); + { + wxString msg; + msg.Printf( wxT( "Unknown DRC error code %d" ), m_ErrorCode ); + return ( msg ); + } } } diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index d23a58cce2..bebae50f0e 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -56,9 +56,13 @@ ZONE_CONTAINER::ZONE_CONTAINER( BOARD* aBoard ) : m_IsFilled = false; // fill status : true when the zone is filled m_FillMode = 0; // How to fill areas: 0 = use filled polygons, != 0 fill with segments m_priority = 0; - smoothedPoly = NULL; - cornerSmoothingType = ZONE_SETTINGS::SMOOTHING_NONE; - cornerRadius = 0; + m_smoothedPoly = NULL; + m_cornerSmoothingType = ZONE_SETTINGS::SMOOTHING_NONE; + m_isKeepout = false; + m_doNotAllowPads = true; // has meaning only if m_isKeepout == true + m_doNotAllowVias = true; // has meaning only if m_isKeepout == true + m_doNotAllowTracks = true; // has meaning only if m_isKeepout == true + m_cornerRadius = 0; utility = 0; // flags used in polygon calculations utility2 = 0; // flags used in polygon calculations m_Poly = new CPolyLine(); // Outlines @@ -87,8 +91,15 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) : m_FilledPolysList = aZone.m_FilledPolysList; m_FillSegmList = aZone.m_FillSegmList; - cornerSmoothingType = aZone.cornerSmoothingType; - cornerRadius = aZone.cornerRadius; + m_isKeepout = aZone.m_isKeepout; + m_doNotAllowPads = aZone.m_doNotAllowPads; + m_doNotAllowVias = aZone.m_doNotAllowVias; + m_doNotAllowTracks = aZone.m_doNotAllowTracks; + + m_cornerSmoothingType = aZone.m_cornerSmoothingType; + m_cornerRadius = aZone.m_cornerRadius; + + utility = aZone.utility; utility2 = aZone.utility; } @@ -221,10 +232,8 @@ void ZONE_CONTAINER::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, const for( unsigned ic = 0; ic < m_Poly->m_HatchLines.size(); ic++ ) { - seg_start.x = m_Poly->m_HatchLines[ic].xi + offset.x; - seg_start.y = m_Poly->m_HatchLines[ic].yi + offset.y; - seg_end.x = m_Poly->m_HatchLines[ic].xf + offset.x; - seg_end.y = m_Poly->m_HatchLines[ic].yf + offset.y; + seg_start = m_Poly->m_HatchLines[ic].m_Start + offset; + seg_end = m_Poly->m_HatchLines[ic].m_End + offset; lines.push_back( seg_start ); lines.push_back( seg_end ); } diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index 2a2c9099a8..c3b715ae45 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -498,24 +498,24 @@ public: */ CPolyLine* GetSmoothedPoly() const { - if( smoothedPoly ) - return smoothedPoly; + if( m_smoothedPoly ) + return m_smoothedPoly; else return m_Poly; }; - void SetCornerSmoothingType( int aType ) { cornerSmoothingType = aType; }; + void SetCornerSmoothingType( int aType ) { m_cornerSmoothingType = aType; }; - int GetCornerSmoothingType() const { return cornerSmoothingType; }; + int GetCornerSmoothingType() const { return m_cornerSmoothingType; }; void SetCornerRadius( unsigned int aRadius ) { - cornerRadius = aRadius; - if( cornerRadius > (unsigned int) Mils2iu( MAX_ZONE_CORNER_RADIUS_MILS ) ) - cornerRadius = Mils2iu( MAX_ZONE_CORNER_RADIUS_MILS ); + m_cornerRadius = aRadius; + if( m_cornerRadius > (unsigned int) Mils2iu( MAX_ZONE_CORNER_RADIUS_MILS ) ) + m_cornerRadius = Mils2iu( MAX_ZONE_CORNER_RADIUS_MILS ); }; - unsigned int GetCornerRadius() const { return cornerRadius; }; + unsigned int GetCornerRadius() const { return m_cornerRadius; }; void AddPolygon( std::vector< wxPoint >& aPolygon ); @@ -535,6 +535,20 @@ public: virtual EDA_ITEM* Clone() const; + /** + * Accessors to parameters used in Keepout zones: + */ + bool GetIsKeepout() const { return m_isKeepout; } + bool GetDoNotAllowPads() const { return m_doNotAllowPads; } + bool GetDoNotAllowVias() const { return m_doNotAllowVias; } + bool GetDoNotAllowTracks() const { return m_doNotAllowTracks; } + + void SetIsKeepout( bool aEnable ) { m_isKeepout = aEnable; } + void SetDoNotAllowPads( bool aEnable ) { m_doNotAllowPads = aEnable; } + void SetDoNotAllowVias( bool aEnable ) { m_doNotAllowVias = aEnable; } + void SetDoNotAllowTracks( bool aEnable ) { m_doNotAllowTracks = aEnable; } + + #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif @@ -572,14 +586,29 @@ public: private: - wxString m_Netname; // Net Name - CPolyLine* smoothedPoly; // Corner-smoothed version of m_Poly - int cornerSmoothingType; - unsigned int cornerRadius; - // Priority: when a zone outline is inside and other zone, if its priority is higher - // the other zone priority, it will be created inside. - // if priorities are equal, a DRC error is set + wxString m_Netname; // Net Name + CPolyLine* m_smoothedPoly; // Corner-smoothed version of m_Poly + int m_cornerSmoothingType; + unsigned int m_cornerRadius; + + /* Priority: when a zone outline is inside and other zone, if its priority is higher + * the other zone priority, it will be created inside. + * if priorities are equal, a DRC error is set + */ unsigned m_priority; + + /* A zone outline can be a keepout zone. + * It will be never filled, and DRC should test for pads, tracks and vias + */ + bool m_isKeepout; + + /* For keepout zones only: + * what is not allowed inside the keepout ( pads, tracks and vias ) + */ + bool m_doNotAllowPads; + bool m_doNotAllowVias; + bool m_doNotAllowTracks; + ZoneConnection m_PadConnection; /* set of filled polygons used to draw a zone as a filled area. diff --git a/pcbnew/class_zone_settings.cpp b/pcbnew/class_zone_settings.cpp index 174033d77f..b4ff1340fd 100644 --- a/pcbnew/class_zone_settings.cpp +++ b/pcbnew/class_zone_settings.cpp @@ -60,8 +60,13 @@ ZONE_SETTINGS::ZONE_SETTINGS() m_Zone_45_Only = false; - cornerSmoothingType = SMOOTHING_NONE; - cornerRadius = 0; + m_cornerSmoothingType = SMOOTHING_NONE; + m_cornerRadius = 0; + + SetIsKeepout( false ); + SetDoNotAllowPads( false ); + SetDoNotAllowVias( true ); + SetDoNotAllowTracks( true ); } @@ -78,8 +83,12 @@ ZONE_SETTINGS& ZONE_SETTINGS::operator << ( const ZONE_CONTAINER& aSource ) m_ThermalReliefGap = aSource.m_ThermalReliefGap; m_ThermalReliefCopperBridge = aSource.m_ThermalReliefCopperBridge; m_PadConnection = aSource.GetPadConnection(); - cornerSmoothingType = aSource.GetCornerSmoothingType(); - cornerRadius = aSource.GetCornerRadius(); + m_cornerSmoothingType = aSource.GetCornerSmoothingType(); + m_cornerRadius = aSource.GetCornerRadius(); + m_isKeepout = aSource.GetIsKeepout(); + m_keepoutDoNotAllowPads = aSource.GetDoNotAllowPads(); + m_keepoutDoNotAllowVias = aSource.GetDoNotAllowVias(); + m_keepoutDoNotAllowTracks = aSource.GetDoNotAllowTracks(); return *this; } @@ -95,8 +104,12 @@ void ZONE_SETTINGS::ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport ) c aTarget.m_ThermalReliefGap = m_ThermalReliefGap; aTarget.m_ThermalReliefCopperBridge = m_ThermalReliefCopperBridge; aTarget.SetPadConnection( m_PadConnection ); - aTarget.SetCornerSmoothingType( cornerSmoothingType ); - aTarget.SetCornerRadius( cornerRadius ); + aTarget.SetCornerSmoothingType( m_cornerSmoothingType ); + aTarget.SetCornerRadius( m_cornerRadius ); + aTarget.SetIsKeepout( GetIsKeepout() ); + aTarget.SetDoNotAllowPads( GetDoNotAllowPads() ); + aTarget.SetDoNotAllowVias( GetDoNotAllowVias() ); + aTarget.SetDoNotAllowTracks( GetDoNotAllowTracks() ); if( aFullExport ) { diff --git a/pcbnew/class_zone_settings.h b/pcbnew/class_zone_settings.h index 2b2760d462..6808885a9f 100644 --- a/pcbnew/class_zone_settings.h +++ b/pcbnew/class_zone_settings.h @@ -18,6 +18,8 @@ class ZONE_CONTAINER; /** * Class ZONE_SETTINGS * handles zones parameters. + * Because a zone can be on copper or non copper layers, and can be also + * a keepout area, some parameters are irrelevant depending on the type of zone */ class ZONE_SETTINGS { @@ -51,10 +53,23 @@ public: bool m_Zone_45_Only; private: - int cornerSmoothingType; ///< Corner smoothing type - unsigned int cornerRadius; ///< Corner chamfer distance / fillet radius + int m_cornerSmoothingType; ///< Corner smoothing type + unsigned int m_cornerRadius; ///< Corner chamfer distance / fillet radius ZoneConnection m_PadConnection; + /* A zone outline can be a keepout zone. + * It will be never filled, and DRC should test for pads, tracks and vias + */ + bool m_isKeepout; + + /* For keepout zones only: + * what is not allowed inside the keepout ( pads, tracks and vias ) + */ + bool m_keepoutDoNotAllowPads; + bool m_keepoutDoNotAllowVias; + bool m_keepoutDoNotAllowTracks; + + public: ZONE_SETTINGS(); @@ -77,25 +92,37 @@ public: */ void ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport = true ) const; - void SetCornerSmoothingType( int aType) { cornerSmoothingType = aType; } + void SetCornerSmoothingType( int aType) { m_cornerSmoothingType = aType; } - int GetCornerSmoothingType() const { return cornerSmoothingType; } + int GetCornerSmoothingType() const { return m_cornerSmoothingType; } void SetCornerRadius( int aRadius ) { if( aRadius > Mils2iu( MAX_ZONE_CORNER_RADIUS_MILS ) ) - cornerRadius = Mils2iu( MAX_ZONE_CORNER_RADIUS_MILS ); + m_cornerRadius = Mils2iu( MAX_ZONE_CORNER_RADIUS_MILS ); else if( aRadius < 0 ) - cornerRadius = 0; + m_cornerRadius = 0; else - cornerRadius = aRadius; + m_cornerRadius = aRadius; }; - unsigned int GetCornerRadius() const { return cornerRadius; } + unsigned int GetCornerRadius() const { return m_cornerRadius; } ZoneConnection GetPadConnection() const { return m_PadConnection; } void SetPadConnection( ZoneConnection aPadConnection ) { m_PadConnection = aPadConnection; } + /** + * Accessors to parameters used in Keepout zones: + */ + const bool GetIsKeepout() const { return m_isKeepout; } + const bool GetDoNotAllowPads() const { return m_keepoutDoNotAllowPads; } + const bool GetDoNotAllowVias() const { return m_keepoutDoNotAllowVias; } + const bool GetDoNotAllowTracks() const { return m_keepoutDoNotAllowTracks; } + + void SetIsKeepout( bool aEnable ) { m_isKeepout = aEnable; } + void SetDoNotAllowPads( bool aEnable ) { m_keepoutDoNotAllowPads = aEnable; } + void SetDoNotAllowVias( bool aEnable ) { m_keepoutDoNotAllowVias = aEnable; } + void SetDoNotAllowTracks( bool aEnable ) { m_keepoutDoNotAllowTracks = aEnable; } }; diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index 74f697e8e0..69bc0550f2 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -133,6 +133,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) break; case ID_PCB_ZONES_BUTT: + case ID_PCB_KEEPOUT_AREA_BUTT: scanList = GENERAL_COLLECTOR::Zones; break; diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index 0bf5e95949..1cb1b13588 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -76,8 +76,6 @@ private: static wxString m_netNameShowFilter; ///< the filter to show nets (default * "*"). ///< static to keep this pattern for an entire pcbnew session - wxListView* m_LayerSelectionCtrl; - /** * Function initDialog * fills in the dialog controls using the current settings. @@ -155,16 +153,6 @@ DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* SetReturnCode( ZONE_ABORT ); // Will be changed on buttons click - m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, - wxDefaultPosition, wxDefaultSize, - wxLC_NO_HEADER | wxLC_REPORT - | wxLC_SINGLE_SEL | wxRAISED_BORDER ); - wxListItem col0; - col0.SetId( 0 ); - m_LayerSelectionCtrl->InsertColumn( 0, col0 ); - m_layerSizer->Add( m_LayerSelectionCtrl, 1, - wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); - // Fix static text widget minimum width to a suitable value so that // resizing the dialog is not necessary when changing the corner smoothing type. // Depends on the default text in the widget. @@ -173,8 +161,6 @@ DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* initDialog(); GetSizer()->SetSizeHints( this ); - - Center(); } @@ -259,6 +245,10 @@ void DIALOG_COPPER_ZONE::initDialog() m_ArcApproximationOpt->SetSelection( m_settings.m_ArcToSegmentsCount == ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF ? 1 : 0 ); + // Create one column in m_LayerSelectionCtrl + wxListItem col0; + col0.SetId( 0 ); + m_LayerSelectionCtrl->InsertColumn( 0, col0 ); // Build copper layer list and append to layer widget int layerCount = board->GetCopperLayerCount(); int layerNumber, itemIndex, layerColor; diff --git a/pcbnew/dialogs/dialog_copper_zones_base.cpp b/pcbnew/dialogs/dialog_copper_zones_base.cpp index 4bd894adb9..3c36d7b185 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.cpp +++ b/pcbnew/dialogs/dialog_copper_zones_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Mar 17 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -32,12 +32,16 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i wxBoxSizer* m_OptionsBoxSizer; m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* m_layerSizer; m_layerSizer = new wxBoxSizer( wxVERTICAL ); m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText17->Wrap( -1 ); m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_SMALL_ICON ); + m_layerSizer->Add( m_LayerSelectionCtrl, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 ); @@ -128,7 +132,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i m_cornerSmoothingTitle = new wxStaticText( this, wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 ); m_cornerSmoothingTitle->Wrap( -1 ); - bSizer9->Add( m_cornerSmoothingTitle, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + bSizer9->Add( m_cornerSmoothingTitle, 0, wxRIGHT|wxLEFT, 5 ); m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); bSizer9->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); @@ -143,7 +147,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i m_staticText13->Wrap( -1 ); m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); - wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("THT Thermal"), _("None") }; + wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("THT thermal"), _("None") }; int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString ); m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 ); m_PadInZoneOpt->SetSelection( 0 ); @@ -183,7 +187,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i m_staticText171->Wrap( -1 ); m_staticText171->SetToolTip( _("On each copper layer, zones are filled by priority order.\nSo when a zone is inside an other zone:\n* If its priority is highter: its outlines are removed from the other layer.\n* If its priority is equal: a DRC error is set.") ); - m_MiddleBox->Add( m_staticText171, 0, wxRIGHT|wxLEFT, 5 ); + m_MiddleBox->Add( m_staticText171, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PriorityLevelCtrl = new wxSpinCtrl( this, ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 ); m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -238,7 +242,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i m_ExportableSetupSizer->Add( bSizer81, 0, wxEXPAND, 5 ); - m_MainBoxSizer->Add( m_ExportableSetupSizer, 1, wxALL|wxEXPAND, 5 ); + m_MainBoxSizer->Add( m_ExportableSetupSizer, 0, wxALL|wxEXPAND, 5 ); wxBoxSizer* bSizer10; bSizer10 = new wxBoxSizer( wxHORIZONTAL ); diff --git a/pcbnew/dialogs/dialog_copper_zones_base.fbp b/pcbnew/dialogs/dialog_copper_zones_base.fbp index 078e126f50..9d9ded4636 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.fbp +++ b/pcbnew/dialogs/dialog_copper_zones_base.fbp @@ -1,3418 +1,3629 @@ - - - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - table - dialog_copper_zones_base - 1000 - none - 1 - dialog_copper_zones_base - - . - - 1 - 1 - 1 - 1 - 0 - - 0 - wxAUI_MGR_DEFAULT - - - - 1 - 1 - impl_virtual - - - - 0 - ID_DIALOG_COPPER_ZONE_BASE - - - DIALOG_COPPER_ZONE_BASE - - 550,500 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - DIALOG_SHIM; dialog_shim.h - Zone Properties - - - - - - - - - - - - - - OnClose - - - - - - - - - - - - - - - - - - - - - - - - - OnSize - - - - m_MainBoxSizer - wxVERTICAL - protected - - 5 - wxALL|wxEXPAND - 1 - - - m_OptionsBoxSizer - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - m_layerSizer - wxVERTICAL - protected - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Layer: - - 0 - - - 0 - - 1 - m_staticText17 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizer7 - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Net: - - 0 - - - 0 - - 1 - m_staticText2 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_NETNAME_SELECTION - - 0 - - - 0 - -1,-1 - 1 - m_ListNetNameSelection - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - wxID_ANY - Net Filtering - - m_NetSortOptSizer - wxVERTICAL - none - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Display: - - 0 - - - 0 - - 1 - m_staticText16 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Show all (alphabetical)" "Show all (advanced)" "Filtered (alphabetical)" "Filtered (advanced)" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_NETDISPLAYOPTION - - 0 - - - 0 - - 1 - m_NetDisplayOption - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnNetSortingOptionSelected - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Hidden net filter: - - 0 - - - 0 - - 1 - m_staticText5 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_TEXTCTRL_NETNAMES_FILTER - - 0 - - 0 - - 0 - - 1 - m_DoNotShowNetNameFilter - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_PROCESS_ENTER - - 0 - Pattern to filter net names in filtered list. Net names matching this pattern are not displayed. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OnRunFiltersButtonClick - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Visible net filter: - - 0 - - - 0 - - 1 - m_staticText51 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_TEXTCTRL_NETNAMES_FILTER - - 0 - - 0 - - 0 - - 1 - m_ShowNetNameFilter - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_PROCESS_ENTER - - 0 - Pattern to filter net names in filtered list. Only net names matching this pattern are displayed. - - wxFILTER_NONE - wxDefaultValidator - - * - - - - - - - - - - - - - - - - - - - - - - - - - - - OnRunFiltersButtonClick - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_APPLY_FILTERS - Apply Filters - - 0 - - - 0 - - 1 - m_buttonRunFilter - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnRunFiltersButtonClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - wxID_ANY - Settings - - m_ExportableSetupSizer - wxHORIZONTAL - none - - - 5 - wxEXPAND - 0 - - - bSizer9 - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Clearance - - 0 - - - 0 - - 1 - m_ClearanceValueTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ZoneClearanceCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Minimum width - - 0 - - - 0 - - 1 - m_MinThicknessValueTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Minimun thickness of filled areas. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ZoneMinThicknessCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Corner smoothing: - - 0 - - - 0 - - 1 - m_staticText151 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "None" "Chamfer" "Fillet" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_CORNER_SMOOTHING - - 0 - - - 0 - - 1 - m_cornerSmoothingChoice - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnCornerSmoothingModeChoice - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Chamfer distance (mm): - - 0 - - - 0 - - 1 - m_cornerSmoothingTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_CORNERSMOOTHINGCTRL - - 0 - - 0 - - 0 - - 1 - m_cornerSmoothingCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - m_LeftBox - wxVERTICAL - none - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pad connection: - - 0 - - - 0 - - 1 - m_staticText13 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Solid" "Thermal relief" "THT Thermal" "None" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_PADINZONEOPT - - 0 - - - 0 - - 1 - m_PadInZoneOpt - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnPadsInZoneClick - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Thermal Reliefs - - m_ThermalShapesParamsSizer - wxVERTICAL - none - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Antipad clearance - - 0 - - - 0 - - 1 - m_AntipadSizeText - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANTIPAD_SIZE - - 0 - - 0 - - 0 - - 1 - m_AntipadSizeValue - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Clearance between pads in the same net and filled areas. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Spoke width - - 0 - - - 0 - - 1 - m_CopperBridgeWidthText - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_COPPER_BRIDGE_VALUE - - 0 - - 0 - - 0 - - 1 - m_CopperWidthValue - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Width of copper in thermal reliefs. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - m_MiddleBox - wxVERTICAL - none - - 5 - wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Priority level: - - 0 - - - 0 - - 1 - m_staticText171 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - On each copper layer, zones are filled by priority order. So when a zone is inside an other zone: * If its priority is highter: its outlines are removed from the other layer. * If its priority is equal: a DRC error is set. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_PRIORITYLEVELCTRL - 0 - 100 - - 0 - - 0 - - 0 - - 1 - m_PriorityLevelCtrl - 1 - - - protected - 1 - - Resizable - 1 - - wxSP_ARROW_KEYS - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Fill mode: - - 0 - - - 0 - - 1 - m_staticText11 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Polygon" "Segment" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_FILLMODECTRL - - 0 - - - 0 - - 1 - m_FillModeCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Segments / 360 deg: - - 0 - - - 0 - - 1 - m_staticText12 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "16" "32" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_ARCAPPROXIMATIONOPT - - 0 - - - 0 - - 1 - m_ArcApproximationOpt - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - bSizer81 - wxVERTICAL - none - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Outline slope: - - 0 - - - 0 - - 1 - m_staticText14 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Arbitrary" "H, V, and 45 deg only" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_ORIENTEDGESOPT - - 0 - - - 0 - - 1 - m_OrientEdgesOpt - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Outline style: - - 0 - - - 0 - - 1 - m_staticText15 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Line" "Hatched" "Fully hatched" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_M_OUTLINEAPPEARANCECTRL - - 0 - - - 0 - - 1 - m_OutlineAppearanceCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_RIGHT|wxALL - 0 - - - bSizer10 - wxHORIZONTAL - none - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_BUTTON_EXPORT - Export Settings to Other Zones - - 0 - - - 0 - - 1 - m_ExportSetupButton - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Export this zone setup (excluding layer and net selection) to all other copper zones. - - wxFILTER_NONE - wxDefaultValidator - - - - - ExportSetupToOtherCopperZones - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_OK - Ok - - 0 - - - 0 - - 1 - m_OkButton - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnButtonOkClick - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_CANCEL - Cancel - - 0 - - - 0 - - 1 - m_ButtonCancel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnButtonCancelClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + table + dialog_copper_zones_base + 1000 + none + 1 + dialog_copper_zones_base + + . + + 1 + 1 + 1 + 1 + 0 + + 1 + 1 + 1 + 1 + + 0 + + + + + + + 1 + + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + impl_virtual + + + 1 + + 0 + 0 + ID_DIALOG_COPPER_ZONE_BASE + + 0 + + + 0 + + 1 + DIALOG_COPPER_ZONE_BASE + 1 + + + 1 + + Resizable + 1 + 567,500 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Zone Properties + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + OnClose + + + + + + + + + + + + + + + + + + + + + + + + + OnSize + + + + m_MainBoxSizer + wxVERTICAL + protected + + 5 + wxALL|wxEXPAND + 1 + + + m_OptionsBoxSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + m_layerSizer + wxVERTICAL + none + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Layer: + + 0 + + + 0 + + 1 + m_staticText17 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_LayerSelectionCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxLC_ALIGN_LEFT|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_SMALL_ICON + wxListView; + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer7 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Net: + + 0 + + + 0 + + 1 + m_staticText2 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_NETNAME_SELECTION + + 0 + + + 0 + -1,-1 + 1 + m_ListNetNameSelection + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + wxID_ANY + Net Filtering + + m_NetSortOptSizer + wxVERTICAL + none + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Display: + + 0 + + + 0 + + 1 + m_staticText16 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Show all (alphabetical)" "Show all (advanced)" "Filtered (alphabetical)" "Filtered (advanced)" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_NETDISPLAYOPTION + + 0 + + + 0 + + 1 + m_NetDisplayOption + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnNetSortingOptionSelected + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Hidden net filter: + + 0 + + + 0 + + 1 + m_staticText5 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_TEXTCTRL_NETNAMES_FILTER + + 0 + + 0 + + 0 + + 1 + m_DoNotShowNetNameFilter + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_PROCESS_ENTER + + 0 + Pattern to filter net names in filtered list. Net names matching this pattern are not displayed. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnRunFiltersButtonClick + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Visible net filter: + + 0 + + + 0 + + 1 + m_staticText51 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_TEXTCTRL_NETNAMES_FILTER + + 0 + + 0 + + 0 + + 1 + m_ShowNetNameFilter + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_PROCESS_ENTER + + 0 + Pattern to filter net names in filtered list. Only net names matching this pattern are displayed. + + wxFILTER_NONE + wxDefaultValidator + + * + + + + + + + + + + + + + + + + + + + + + + + + + + + OnRunFiltersButtonClick + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_APPLY_FILTERS + Apply Filters + + 0 + + + 0 + + 1 + m_buttonRunFilter + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnRunFiltersButtonClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Settings + + m_ExportableSetupSizer + wxHORIZONTAL + none + + + 5 + wxEXPAND + 0 + + + bSizer9 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Clearance + + 0 + + + 0 + + 1 + m_ClearanceValueTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ZoneClearanceCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Minimum width + + 0 + + + 0 + + 1 + m_MinThicknessValueTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Minimun thickness of filled areas. + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ZoneMinThicknessCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Corner smoothing: + + 0 + + + 0 + + 1 + m_staticText151 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "None" "Chamfer" "Fillet" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_CORNER_SMOOTHING + + 0 + + + 0 + + 1 + m_cornerSmoothingChoice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnCornerSmoothingModeChoice + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Chamfer distance (mm): + + 0 + + + 0 + + 1 + m_cornerSmoothingTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_CORNERSMOOTHINGCTRL + + 0 + + 0 + + 0 + + 1 + m_cornerSmoothingCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + m_LeftBox + wxVERTICAL + none + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pad connection: + + 0 + + + 0 + + 1 + m_staticText13 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Solid" "Thermal relief" "THT thermal" "None" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_PADINZONEOPT + + 0 + + + 0 + + 1 + m_PadInZoneOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnPadsInZoneClick + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Thermal Reliefs + + m_ThermalShapesParamsSizer + wxVERTICAL + none + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Antipad clearance + + 0 + + + 0 + + 1 + m_AntipadSizeText + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANTIPAD_SIZE + + 0 + + 0 + + 0 + + 1 + m_AntipadSizeValue + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Clearance between pads in the same net and filled areas. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Spoke width + + 0 + + + 0 + + 1 + m_CopperBridgeWidthText + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_COPPER_BRIDGE_VALUE + + 0 + + 0 + + 0 + + 1 + m_CopperWidthValue + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Width of copper in thermal reliefs. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + m_MiddleBox + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Priority level: + + 0 + + + 0 + + 1 + m_staticText171 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + On each copper layer, zones are filled by priority order. So when a zone is inside an other zone: * If its priority is highter: its outlines are removed from the other layer. * If its priority is equal: a DRC error is set. + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_PRIORITYLEVELCTRL + 0 + 100 + + 0 + + 0 + + 0 + + 1 + m_PriorityLevelCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Fill mode: + + 0 + + + 0 + + 1 + m_staticText11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Polygon" "Segment" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_FILLMODECTRL + + 0 + + + 0 + + 1 + m_FillModeCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Segments / 360 deg: + + 0 + + + 0 + + 1 + m_staticText12 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "16" "32" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_ARCAPPROXIMATIONOPT + + 0 + + + 0 + + 1 + m_ArcApproximationOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer81 + wxVERTICAL + none + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outline slope: + + 0 + + + 0 + + 1 + m_staticText14 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Arbitrary" "H, V, and 45 deg only" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_ORIENTEDGESOPT + + 0 + + + 0 + + 1 + m_OrientEdgesOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outline style: + + 0 + + + 0 + + 1 + m_staticText15 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Line" "Hatched" "Fully hatched" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_M_OUTLINEAPPEARANCECTRL + + 0 + + + 0 + + 1 + m_OutlineAppearanceCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer10 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_BUTTON_EXPORT + Export Settings to Other Zones + + 0 + + + 0 + + 1 + m_ExportSetupButton + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Export this zone setup (excluding layer and net selection) to all other copper zones. + + wxFILTER_NONE + wxDefaultValidator + + + + + ExportSetupToOtherCopperZones + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_OK + Ok + + 0 + + + 0 + + 1 + m_OkButton + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnButtonOkClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_CANCEL + Cancel + + 0 + + + 0 + + 1 + m_ButtonCancel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnButtonCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_copper_zones_base.h b/pcbnew/dialogs/dialog_copper_zones_base.h index b48bfc2c77..ec77cbeb36 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.h +++ b/pcbnew/dialogs/dialog_copper_zones_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Mar 17 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -71,8 +72,8 @@ class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM }; wxBoxSizer* m_MainBoxSizer; - wxBoxSizer* m_layerSizer; wxStaticText* m_staticText17; + wxListView* m_LayerSelectionCtrl; wxStaticText* m_staticText2; wxListBox* m_ListNetNameSelection; wxStaticText* m_staticText16; @@ -124,7 +125,7 @@ class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM public: - DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 567,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_COPPER_ZONE_BASE(); }; diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index d32cc939a8..a8d7690caf 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -163,9 +163,10 @@ void DIALOG_DRC_CONTROL::OnStartdrcClick( wxCommandEvent& event ) SetDrcParmeters(); m_tester->SetSettings( true, // Pad to pad DRC test enabled - true, // unconnected pdas DRC test enabled - true, // DRC test for zones enabled - reportName, m_CreateRptCtrl->IsChecked() ); + true, // unconnected pdas DRC test enabled + true, // DRC test for zones enabled + true, // DRC test for keepout areas enabled + reportName, m_CreateRptCtrl->IsChecked() ); DelDRCMarkers(); @@ -241,9 +242,10 @@ void DIALOG_DRC_CONTROL::OnListUnconnectedClick( wxCommandEvent& event ) SetDrcParmeters(); m_tester->SetSettings( true, // Pad to pad DRC test enabled - true, // unconnected pdas DRC test enabled - true, // DRC test for zones enabled - reportName, m_CreateRptCtrl->IsChecked() ); + true, // unconnected pdas DRC test enabled + true, // DRC test for zones enabled + true, // DRC test for keepout areas enabled + reportName, m_CreateRptCtrl->IsChecked() ); DelDRCMarkers(); diff --git a/pcbnew/dialogs/dialog_keepout_area_properties.cpp b/pcbnew/dialogs/dialog_keepout_area_properties.cpp new file mode 100644 index 0000000000..8a04849cdc --- /dev/null +++ b/pcbnew/dialogs/dialog_keepout_area_properties.cpp @@ -0,0 +1,277 @@ +/** + * @file dialog_keepout_area_properties.cpp + */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 1992-2012 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 2 + * 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, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include // needed for wx/listctrl.h, in wxGTK 2.8.12 +#include + + + +/** + * Class DIALOG_KEEPOUT_AREA_PROPERTIES + * is the derived class from dialog_copper_zone_frame created by wxFormBuilder + */ +class DIALOG_KEEPOUT_AREA_PROPERTIES : public DIALOG_KEEPOUT_AREA_PROPERTIES_BASE +{ +public: + DIALOG_KEEPOUT_AREA_PROPERTIES( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ); + +private: + PCB_BASE_FRAME* m_Parent; + wxConfig* m_Config; ///< Current config + ZONE_SETTINGS m_zonesettings; + ZONE_SETTINGS* m_ptr; + + std::vector m_LayerId; ///< Handle the real layer number from layer + ///< name position in m_LayerSelectionCtrl + + /** + * Function initDialog + * fills in the dialog controls using the current settings. + */ + void initDialog(); + + void OnOkClick( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ); + void OnSize( wxSizeEvent& event ); + + /** + * Function AcceptOptionsForKeepOut + * Test validity of options, and copy options in m_zonesettings, for keepout zones + * @return bool - false if incorrect options, true if ok. + */ + bool AcceptOptionsForKeepOut(); + + /** + * Function makeLayerBitmap + * creates the colored rectangle bitmaps used in the layer selection widget. + * @param aColor is the color to fill the rectangle with. + */ + wxBitmap makeLayerBitmap( int aColor ); +}; + + +#define LAYER_BITMAP_SIZE_X 20 +#define LAYER_BITMAP_SIZE_Y 10 + +ZONE_EDIT_T InvokeKeepoutAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings ) +{ + DIALOG_KEEPOUT_AREA_PROPERTIES dlg( aCaller, aSettings ); + + ZONE_EDIT_T result = ZONE_EDIT_T( dlg.ShowModal() ); + + return result; +} + + +DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ) : + DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( aParent ) +{ + m_Parent = aParent; + m_Config = wxGetApp().GetSettings(); + + m_ptr = aSettings; + m_zonesettings = *aSettings; + + SetReturnCode( ZONE_ABORT ); // Will be changed on button OK ckick + + initDialog(); + + GetSizer()->SetSizeHints( this ); +} + + +void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog() +{ + BOARD* board = m_Parent->GetBoard(); + + wxString msg; + + if( m_zonesettings.m_Zone_45_Only ) + m_OrientEdgesOpt->SetSelection( 1 ); + + switch( m_zonesettings.m_Zone_HatchingStyle ) + { + case CPolyLine::NO_HATCH: + m_OutlineAppearanceCtrl->SetSelection( 0 ); + break; + + case CPolyLine::DIAGONAL_EDGE: + m_OutlineAppearanceCtrl->SetSelection( 1 ); + break; + + case CPolyLine::DIAGONAL_FULL: + m_OutlineAppearanceCtrl->SetSelection( 2 ); + break; + } + + // Create one column in m_LayerSelectionCtrl + wxListItem col0; + col0.SetId( 0 ); + m_LayerSelectionCtrl->InsertColumn( 0, col0 ); + // Build copper layer list and append to layer widget + int layerCount = board->GetCopperLayerCount(); + int layerNumber, itemIndex, layerColor; + wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); + m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL ); + for( int ii = 0; ii < layerCount; ii++ ) + { + layerNumber = LAYER_N_BACK; + + if( layerCount <= 1 || ii < layerCount - 1 ) + layerNumber = ii; + else if( ii == layerCount - 1 ) + layerNumber = LAYER_N_FRONT; + + m_LayerId.insert( m_LayerId.begin(), layerNumber ); + + msg = board->GetLayerName( layerNumber ); + layerColor = board->GetLayerColor( layerNumber ); + imageList->Add( makeLayerBitmap( layerColor ) ); + itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, ii ); + + if( m_zonesettings.m_CurrentZone_Layer == layerNumber ) + m_LayerSelectionCtrl->Select( itemIndex ); + } + + // Init keepout parameters: + m_cbTracksCtrl->SetValue( m_zonesettings.GetDoNotAllowTracks() ); + m_cbViasCtrl->SetValue( m_zonesettings.GetDoNotAllowVias() ); + m_cbPadsCtrl->SetValue( m_zonesettings.GetDoNotAllowPads() ); +} + +void DIALOG_KEEPOUT_AREA_PROPERTIES::OnCancelClick( wxCommandEvent& event ) +{ + EndModal( ZONE_ABORT ); +} + +void DIALOG_KEEPOUT_AREA_PROPERTIES::OnOkClick( wxCommandEvent& event ) +{ + if( AcceptOptionsForKeepOut() ) + { + *m_ptr = m_zonesettings; + EndModal( ZONE_OK ); + } +} + + +void DIALOG_KEEPOUT_AREA_PROPERTIES::OnSize( wxSizeEvent& event ) +{ + Layout(); + + // Set layer list column width to widget width minus a few pixels + m_LayerSelectionCtrl->SetColumnWidth( 0, m_LayerSelectionCtrl->GetSize().x - 5 ); + event.Skip(); +} + +bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut() +{ + // Init keepout parameters: + m_zonesettings.SetIsKeepout( true ); + m_zonesettings.SetDoNotAllowTracks( m_cbTracksCtrl->GetValue() ); + m_zonesettings.SetDoNotAllowVias( m_cbViasCtrl->GetValue() ); + m_zonesettings.SetDoNotAllowPads( m_cbPadsCtrl->GetValue() ); + + // Test for not allowed items: should have at least one item not allowed: + if( ! m_zonesettings.GetDoNotAllowTracks() && + ! m_zonesettings.GetDoNotAllowVias() && + ! m_zonesettings.GetDoNotAllowPads() ) + { + DisplayError( NULL, + _("Tracks, vias and pads are allowed. The keepout is useless" ) ); + return false; + } + + // Get the layer selection for this zone + int ii = m_LayerSelectionCtrl->GetFirstSelected(); + + if( ii < 0 ) + { + DisplayError( NULL, _( "No layer selected." ) ); + return false; + } + + m_zonesettings.m_CurrentZone_Layer = m_LayerId[ii]; + switch( m_OutlineAppearanceCtrl->GetSelection() ) + { + case 0: + m_zonesettings.m_Zone_HatchingStyle = CPolyLine::NO_HATCH; + break; + + case 1: + m_zonesettings.m_Zone_HatchingStyle = CPolyLine::DIAGONAL_EDGE; + break; + + case 2: + m_zonesettings.m_Zone_HatchingStyle = CPolyLine::DIAGONAL_FULL; + break; + } + + if( m_Config ) + { + m_Config->Write( ZONE_NET_OUTLINES_HATCH_OPTION_KEY, + (long) m_zonesettings.m_Zone_HatchingStyle ); + } + + if( m_OrientEdgesOpt->GetSelection() == 0 ) + m_zonesettings.m_Zone_45_Only = false; + else + m_zonesettings.m_Zone_45_Only = true; + + m_zonesettings.m_ZonePriority = 0; //m_PriorityLevelCtrl->GetValue(); + + return true; +} + +wxBitmap DIALOG_KEEPOUT_AREA_PROPERTIES::makeLayerBitmap( int aColor ) +{ + wxBitmap bitmap( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); + wxBrush brush; + wxMemoryDC iconDC; + + iconDC.SelectObject( bitmap ); + brush.SetColour( MakeColour( aColor ) ); + brush.SetStyle( wxSOLID ); + iconDC.SetBrush( brush ); + iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); + + return bitmap; +} diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp b/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp new file mode 100644 index 0000000000..01340b0856 --- /dev/null +++ b/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp @@ -0,0 +1,103 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_keepout_area_properties_base.h" + +/////////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE( DIALOG_KEEPOUT_AREA_PROPERTIES_BASE, DIALOG_SHIM ) + EVT_BUTTON( wxID_CANCEL, DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::_wxFB_OnCancelClick ) + EVT_BUTTON( wxID_OK, DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::_wxFB_OnOkClick ) +END_EVENT_TABLE() + +DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* m_MainSizer; + m_MainSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* m_UpperSizer; + m_UpperSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* m_layersListSizer; + m_layersListSizer = new wxBoxSizer( wxVERTICAL ); + + m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Layer selection:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextLayerSelection->Wrap( -1 ); + m_layersListSizer->Add( m_staticTextLayerSelection, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_LayerSelectionCtrl = new wxListView( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_ICON|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_SMALL_ICON ); + m_layersListSizer->Add( m_LayerSelectionCtrl, 1, wxALL|wxEXPAND, 5 ); + + + m_UpperSizer->Add( m_layersListSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizerRight; + bSizerRight = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* m_OutilinesBoxOpt; + m_OutilinesBoxOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Outlines Options:") ), wxVERTICAL ); + + wxString m_OrientEdgesOptChoices[] = { _("Any"), _("H, V and 45 deg") }; + int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); + m_OrientEdgesOpt = new wxRadioBox( this, wxID_ANY, _("Zone Edges Orient"), wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 1, wxRA_SPECIFY_COLS ); + m_OrientEdgesOpt->SetSelection( 0 ); + m_OutilinesBoxOpt->Add( m_OrientEdgesOpt, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched Outline"), _("Full Hatched") }; + int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); + m_OutlineAppearanceCtrl = new wxRadioBox( this, wxID_ANY, _("Outlines Appearence"), wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_OutlineAppearanceCtrl->SetSelection( 1 ); + m_OutilinesBoxOpt->Add( m_OutlineAppearanceCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + bSizerRight->Add( m_OutilinesBoxOpt, 0, wxEXPAND|wxALL, 5 ); + + wxStaticBoxSizer* sbSizerCutoutOpts; + sbSizerCutoutOpts = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Keepout Options:") ), wxVERTICAL ); + + m_cbTracksCtrl = new wxCheckBox( this, wxID_ANY, _("No Tracks"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerCutoutOpts->Add( m_cbTracksCtrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_cbViasCtrl = new wxCheckBox( this, wxID_ANY, _("No Vias"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerCutoutOpts->Add( m_cbViasCtrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_cbPadsCtrl = new wxCheckBox( this, wxID_ANY, _("No Pads"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerCutoutOpts->Add( m_cbPadsCtrl, 0, wxALL|wxEXPAND, 5 ); + + + bSizerRight->Add( sbSizerCutoutOpts, 0, wxEXPAND|wxALL, 5 ); + + + m_UpperSizer->Add( bSizerRight, 0, wxEXPAND, 5 ); + + + m_MainSizer->Add( m_UpperSizer, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + m_MainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + m_sdbSizerButtons = new wxStdDialogButtonSizer(); + m_sdbSizerButtonsOK = new wxButton( this, wxID_OK ); + m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK ); + m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel ); + m_sdbSizerButtons->Realize(); + + m_MainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND, 5 ); + + + this->SetSizer( m_MainSizer ); + this->Layout(); + + this->Centre( wxBOTH ); +} + +DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::~DIALOG_KEEPOUT_AREA_PROPERTIES_BASE() +{ +} diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp b/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp new file mode 100644 index 0000000000..93aefed21e --- /dev/null +++ b/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp @@ -0,0 +1,897 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + table + dialog_keepout_area_properties_base + 1000 + none + 1 + dialog_keepout_areas_properties_base + + . + + 1 + 1 + 1 + 1 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_KEEPOUT_AREA_PROPERTIES_BASE + + 308,355 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Keepout Area Properties + + + + wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + m_MainSizer + wxVERTICAL + none + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL + 1 + + + m_UpperSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + m_layersListSizer + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Layer selection: + + 0 + + + 0 + + 1 + m_staticTextLayerSelection + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_LayerSelectionCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxLC_ALIGN_LEFT|wxLC_ICON|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_SMALL_ICON + wxListView; + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizerRight + wxVERTICAL + none + + 5 + wxEXPAND|wxALL + 0 + + wxID_ANY + Outlines Options: + + m_OutilinesBoxOpt + wxVERTICAL + none + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Any" "H, V and 45 deg" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Zone Edges Orient + 1 + + 0 + + + 0 + + 1 + m_OrientEdgesOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Line" "Hatched Outline" "Full Hatched" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outlines Appearence + 1 + + 0 + + + 0 + + 1 + m_OutlineAppearanceCtrl + 1 + + + protected + 1 + + Resizable + 1 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + wxID_ANY + Keepout Options: + + sbSizerCutoutOpts + wxVERTICAL + none + + + 5 + wxTOP|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + No Tracks + + 0 + + + 0 + + 1 + m_cbTracksCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + No Vias + + 0 + + + 0 + + 1 + m_cbViasCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + No Pads + + 0 + + + 0 + + 1 + m_cbPadsCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizerButtons + protected + + OnCancelClick + + + + OnOkClick + + + + + + + + diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.h b/pcbnew/dialogs/dialog_keepout_area_properties_base.h new file mode 100644 index 0000000000..ac1aa7c18e --- /dev/null +++ b/pcbnew/dialogs/dialog_keepout_area_properties_base.h @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_KEEPOUT_AREA_PROPERTIES_BASE_H__ +#define __DIALOG_KEEPOUT_AREA_PROPERTIES_BASE_H__ + +#include +#include +#include +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM +{ + DECLARE_EVENT_TABLE() + private: + + // Private event handlers + void _wxFB_OnCancelClick( wxCommandEvent& event ){ OnCancelClick( event ); } + void _wxFB_OnOkClick( wxCommandEvent& event ){ OnOkClick( event ); } + + + protected: + wxStaticText* m_staticTextLayerSelection; + wxListView* m_LayerSelectionCtrl; + wxRadioBox* m_OrientEdgesOpt; + wxRadioBox* m_OutlineAppearanceCtrl; + wxCheckBox* m_cbTracksCtrl; + wxCheckBox* m_cbViasCtrl; + wxCheckBox* m_cbPadsCtrl; + wxStaticLine* m_staticline1; + wxStdDialogButtonSizer* m_sdbSizerButtons; + wxButton* m_sdbSizerButtonsOK; + wxButton* m_sdbSizerButtonsCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Keepout Area Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 308,355 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ); + ~DIALOG_KEEPOUT_AREA_PROPERTIES_BASE(); + +}; + +#endif //__DIALOG_KEEPOUT_AREA_PROPERTIES_BASE_H__ diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp index a27b59790a..58e8edd011 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp @@ -1,96 +1,95 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 11 2012) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_non_copper_zones_properties_base.h" - -/////////////////////////////////////////////////////////////////////////// - -BEGIN_EVENT_TABLE( DialogNonCopperZonesPropertiesBase, DIALOG_SHIM ) - EVT_BUTTON( wxID_OK, DialogNonCopperZonesPropertiesBase::_wxFB_OnOkClick ) - EVT_BUTTON( wxID_CANCEL, DialogNonCopperZonesPropertiesBase::_wxFB_OnCancelClick ) -END_EVENT_TABLE() - -DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* m_MainSizer; - m_MainSizer = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* m_UpperSizer; - m_UpperSizer = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbLeftSizer_; - sbLeftSizer_ = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Zone Fill Options:") ), wxVERTICAL ); - - wxString m_FillModeCtrlChoices[] = { _("Use polygons"), _("Use segments") }; - int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString ); - m_FillModeCtrl = new wxRadioBox( this, wxID_ANY, _("Filling Mode:"), wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_FillModeCtrl->SetSelection( 0 ); - sbLeftSizer_->Add( m_FillModeCtrl, 0, wxALL|wxEXPAND, 5 ); - - m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Zone min thickness value"), wxDefaultPosition, wxDefaultSize, 0 ); - m_MinThicknessValueTitle->Wrap( -1 ); - sbLeftSizer_->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - sbLeftSizer_->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - - m_UpperSizer->Add( sbLeftSizer_, 0, 0, 5 ); - - wxStaticBoxSizer* m_OutilinesBoxOpt; - m_OutilinesBoxOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Outlines Options:") ), wxVERTICAL ); - - wxString m_OrientEdgesOptChoices[] = { _("Any"), _("H, V and 45 deg") }; - int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); - m_OrientEdgesOpt = new wxRadioBox( this, wxID_ANY, _("Zone Edges Orient"), wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 1, wxRA_SPECIFY_COLS ); - m_OrientEdgesOpt->SetSelection( 0 ); - m_OutilinesBoxOpt->Add( m_OrientEdgesOpt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched Outline"), _("Full Hatched") }; - int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); - m_OutlineAppearanceCtrl = new wxRadioBox( this, wxID_ANY, _("Outlines Appearence"), wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_OutlineAppearanceCtrl->SetSelection( 1 ); - m_OutilinesBoxOpt->Add( m_OutlineAppearanceCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - - m_UpperSizer->Add( m_OutilinesBoxOpt, 0, 0, 5 ); - - wxBoxSizer* m_ButtonsSizer; - m_ButtonsSizer = new wxBoxSizer( wxVERTICAL ); - - m_buttonOk = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonOk->SetDefault(); - m_ButtonsSizer->Add( m_buttonOk, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ButtonsSizer->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - m_UpperSizer->Add( m_ButtonsSizer, 1, wxALIGN_CENTER_VERTICAL, 5 ); - - - m_MainSizer->Add( m_UpperSizer, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Layer selection:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextLayerSelection->Wrap( -1 ); - m_MainSizer->Add( m_staticTextLayerSelection, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_LayerSelectionCtrl = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - m_MainSizer->Add( m_LayerSelectionCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - - this->SetSizer( m_MainSizer ); - this->Layout(); - - this->Centre( wxBOTH ); -} - -DialogNonCopperZonesPropertiesBase::~DialogNonCopperZonesPropertiesBase() -{ -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_non_copper_zones_properties_base.h" + +/////////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE( DialogNonCopperZonesPropertiesBase, DIALOG_SHIM ) + EVT_BUTTON( wxID_CANCEL, DialogNonCopperZonesPropertiesBase::_wxFB_OnCancelClick ) + EVT_BUTTON( wxID_OK, DialogNonCopperZonesPropertiesBase::_wxFB_OnOkClick ) +END_EVENT_TABLE() + +DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* m_MainSizer; + m_MainSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* m_UpperSizer; + m_UpperSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizerLeft; + bSizerLeft = new wxBoxSizer( wxVERTICAL ); + + m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Layer selection:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextLayerSelection->Wrap( -1 ); + bSizerLeft->Add( m_staticTextLayerSelection, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_LayerSelectionCtrl = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizerLeft->Add( m_LayerSelectionCtrl, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + m_UpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizerRight; + bSizerRight = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* m_OutilinesBoxOpt; + m_OutilinesBoxOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Outlines Options:") ), wxVERTICAL ); + + wxString m_OrientEdgesOptChoices[] = { _("Any"), _("H, V and 45 deg") }; + int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); + m_OrientEdgesOpt = new wxRadioBox( this, wxID_ANY, _("Zone Edges Orient"), wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 1, wxRA_SPECIFY_COLS ); + m_OrientEdgesOpt->SetSelection( 0 ); + m_OutilinesBoxOpt->Add( m_OrientEdgesOpt, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched Outline"), _("Full Hatched") }; + int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); + m_OutlineAppearanceCtrl = new wxRadioBox( this, wxID_ANY, _("Outlines Appearence"), wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_OutlineAppearanceCtrl->SetSelection( 1 ); + m_OutilinesBoxOpt->Add( m_OutlineAppearanceCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + bSizerRight->Add( m_OutilinesBoxOpt, 0, wxEXPAND|wxALL, 5 ); + + m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Zone min thickness value"), wxDefaultPosition, wxDefaultSize, 0 ); + m_MinThicknessValueTitle->Wrap( -1 ); + bSizerRight->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerRight->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + m_UpperSizer->Add( bSizerRight, 0, wxEXPAND, 5 ); + + + m_MainSizer->Add( m_UpperSizer, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + m_MainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + m_sdbSizerButtons = new wxStdDialogButtonSizer(); + m_sdbSizerButtonsOK = new wxButton( this, wxID_OK ); + m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK ); + m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel ); + m_sdbSizerButtons->Realize(); + + m_MainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND, 5 ); + + + this->SetSizer( m_MainSizer ); + this->Layout(); + + this->Centre( wxBOTH ); +} + +DialogNonCopperZonesPropertiesBase::~DialogNonCopperZonesPropertiesBase() +{ +} diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp index 6562e17508..2e0cdbdb28 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp @@ -1,938 +1,776 @@ - - - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - table - dialog_non_copper_zones_properties_base - 1000 - none - 1 - dialog_non_copper_zones_properties_base - - . - - 1 - 1 - 1 - 1 - 0 - - 0 - wxAUI_MGR_DEFAULT - - wxBOTH - - 1 - 1 - impl_virtual - - - - 0 - wxID_ANY - - - DialogNonCopperZonesPropertiesBase - - 416,287 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - DIALOG_SHIM; dialog_shim.h - Non Copper Zones Properties - - - - wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - m_MainSizer - wxVERTICAL - none - - 5 - wxEXPAND|wxALIGN_CENTER_HORIZONTAL - 1 - - - m_UpperSizer - wxHORIZONTAL - none - - 5 - - 0 - - wxID_ANY - Zone Fill Options: - - sbLeftSizer_ - wxVERTICAL - none - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Use polygons" "Use segments" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Filling Mode: - 1 - - 0 - - - 0 - - 1 - m_FillModeCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Zone min thickness value - - 0 - - - 0 - - 1 - m_MinThicknessValueTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ZoneMinThicknessCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - wxID_ANY - Outlines Options: - - m_OutilinesBoxOpt - wxVERTICAL - none - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Any" "H, V and 45 deg" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Zone Edges Orient - 1 - - 0 - - - 0 - - 1 - m_OrientEdgesOpt - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Line" "Hatched Outline" "Full Hatched" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Outlines Appearence - 1 - - 0 - - - 0 - - 1 - m_OutlineAppearanceCtrl - 1 - - - protected - 1 - - Resizable - 1 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL - 1 - - - m_ButtonsSizer - wxVERTICAL - none - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_OK - OK - - 0 - - - 0 - - 1 - m_buttonOk - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnOkClick - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_CANCEL - Cancel - - 0 - - - 0 - - 1 - m_buttonCancel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnCancelClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Layer selection: - - 0 - - - 0 - - 1 - m_staticTextLayerSelection - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_LayerSelectionCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + table + dialog_non_copper_zones_properties_base + 1000 + none + 1 + dialog_non_copper_zones_properties_base + + . + + 1 + 1 + 1 + 1 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DialogNonCopperZonesPropertiesBase + + 369,317 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Non Copper Zones Properties + + + + wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + m_MainSizer + wxVERTICAL + none + + 5 + wxEXPAND|wxALIGN_CENTER_HORIZONTAL + 1 + + + m_UpperSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizerLeft + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Layer selection: + + 0 + + + 0 + + 1 + m_staticTextLayerSelection + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_LayerSelectionCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizerRight + wxVERTICAL + none + + 5 + wxEXPAND|wxALL + 0 + + wxID_ANY + Outlines Options: + + m_OutilinesBoxOpt + wxVERTICAL + none + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Any" "H, V and 45 deg" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Zone Edges Orient + 1 + + 0 + + + 0 + + 1 + m_OrientEdgesOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Line" "Hatched Outline" "Full Hatched" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outlines Appearence + 1 + + 0 + + + 0 + + 1 + m_OutlineAppearanceCtrl + 1 + + + protected + 1 + + Resizable + 1 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Zone min thickness value + + 0 + + + 0 + + 1 + m_MinThicknessValueTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ZoneMinThicknessCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizerButtons + protected + + OnCancelClick + + + + OnOkClick + + + + + + + + diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h index d0aba70995..89b206fb8f 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h @@ -1,67 +1,69 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 11 2012) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__ -#define __DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__ - -#include -#include -#include -#include "dialog_shim.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -/// Class DialogNonCopperZonesPropertiesBase -/////////////////////////////////////////////////////////////////////////////// -class DialogNonCopperZonesPropertiesBase : public DIALOG_SHIM -{ - DECLARE_EVENT_TABLE() - private: - - // Private event handlers - void _wxFB_OnOkClick( wxCommandEvent& event ){ OnOkClick( event ); } - void _wxFB_OnCancelClick( wxCommandEvent& event ){ OnCancelClick( event ); } - - - protected: - wxRadioBox* m_FillModeCtrl; - wxStaticText* m_MinThicknessValueTitle; - wxTextCtrl* m_ZoneMinThicknessCtrl; - wxRadioBox* m_OrientEdgesOpt; - wxRadioBox* m_OutlineAppearanceCtrl; - wxButton* m_buttonOk; - wxButton* m_buttonCancel; - wxStaticText* m_staticTextLayerSelection; - wxListBox* m_LayerSelectionCtrl; - - // Virtual event handlers, overide them in your derived class - virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } - - - public: - - DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Non Copper Zones Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 416,287 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ); - ~DialogNonCopperZonesPropertiesBase(); - -}; - -#endif //__DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__ +#define __DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__ + +#include +#include +#include +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DialogNonCopperZonesPropertiesBase +/////////////////////////////////////////////////////////////////////////////// +class DialogNonCopperZonesPropertiesBase : public DIALOG_SHIM +{ + DECLARE_EVENT_TABLE() + private: + + // Private event handlers + void _wxFB_OnCancelClick( wxCommandEvent& event ){ OnCancelClick( event ); } + void _wxFB_OnOkClick( wxCommandEvent& event ){ OnOkClick( event ); } + + + protected: + wxStaticText* m_staticTextLayerSelection; + wxListBox* m_LayerSelectionCtrl; + wxRadioBox* m_OrientEdgesOpt; + wxRadioBox* m_OutlineAppearanceCtrl; + wxStaticText* m_MinThicknessValueTitle; + wxTextCtrl* m_ZoneMinThicknessCtrl; + wxStaticLine* m_staticline1; + wxStdDialogButtonSizer* m_sdbSizerButtons; + wxButton* m_sdbSizerButtonsOK; + wxButton* m_sdbSizerButtonsCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Non Copper Zones Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 369,317 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ); + ~DialogNonCopperZonesPropertiesBase(); + +}; + +#endif //__DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__ diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index f9a4b421c7..c690c2c70e 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -136,6 +136,14 @@ int DRC::Drc( TRACK* aRefSegm, TRACK* aList ) return BAD_DRC; } + if( !doTrackKeepoutDrc( aRefSegm ) ) + { + wxASSERT( m_currentMarker ); + + m_currentMarker->DisplayInfo( m_mainWindow ); + return BAD_DRC; + } + return OK_DRC; } @@ -252,6 +260,18 @@ void DRC::RunTests( wxTextCtrl* aMessages ) testUnconnected(); } + // find and gather vias, tracks, pads inside keepout areas. + if( m_doKeepoutTest ) + { + if( aMessages ) + { + aMessages->AppendText( _( "Keepout areas ...\n" ) ); + aMessages->Refresh(); + } + + testKeepoutAreas(); + } + // update the m_ui listboxes updatePointers(); @@ -556,6 +576,107 @@ void DRC::testZones() } +void DRC::testKeepoutAreas() +{ + // Test keepout areas for vias, tracks and pads inside keepout areas + for( int ii = 0; ii < m_pcb->GetAreaCount(); ii++ ) + { + ZONE_CONTAINER* area = m_pcb->GetArea( ii ); + + if( !area->GetIsKeepout() ) + continue; + + for( TRACK* segm = m_pcb->m_Track; segm != NULL; segm = segm->Next() ) + { + if( segm->Type() == PCB_TRACE_T ) + { + if( ! area->GetDoNotAllowTracks() ) + continue; + + if( segm->GetLayer() != area->GetLayer() ) + continue; + + if( area->m_Poly->Distance( segm->GetStart(), segm->GetEnd(), segm->GetWidth() ) == 0 ) + { + m_currentMarker = fillMarker( segm, NULL, + DRCE_TRACK_INSIDE_KEEPOUT, m_currentMarker ); + m_pcb->Add( m_currentMarker ); + m_currentMarker = 0; + } + } + else if( segm->Type() == PCB_VIA_T ) + { + if( ! area->GetDoNotAllowVias() ) + continue; + + if( ! ((SEGVIA*)segm)->IsOnLayer( area->GetLayer() ) ) + continue; + + if( area->m_Poly->Distance( segm->GetPosition() ) < segm->GetWidth()/2 ) + { + m_currentMarker = fillMarker( segm, NULL, + DRCE_VIA_INSIDE_KEEPOUT, m_currentMarker ); + m_pcb->Add( m_currentMarker ); + m_currentMarker = 0; + } + } + } + // Test pads: TODO + } +} + +/* + * Function doTrackKeepoutDrc + * tests the current segment or via. + * aRefSeg is the segment to test + * return true if no DRC err + */ +bool DRC::doTrackKeepoutDrc( TRACK* aRefSeg ) +{ + // Test keepout areas for vias, tracks and pads inside keepout areas + for( int ii = 0; ii < m_pcb->GetAreaCount(); ii++ ) + { + ZONE_CONTAINER* area = m_pcb->GetArea( ii ); + + if( !area->GetIsKeepout() ) + continue; + + if( aRefSeg->Type() == PCB_TRACE_T ) + { + if( ! area->GetDoNotAllowTracks() ) + continue; + + if( aRefSeg->GetLayer() != area->GetLayer() ) + continue; + + if( area->m_Poly->Distance( aRefSeg->GetStart(), aRefSeg->GetEnd(), aRefSeg->GetWidth() ) == 0 ) + { + m_currentMarker = fillMarker( aRefSeg, NULL, + DRCE_TRACK_INSIDE_KEEPOUT, m_currentMarker ); + return false; + } + } + else if( aRefSeg->Type() == PCB_VIA_T ) + { + if( ! area->GetDoNotAllowVias() ) + continue; + + if( ! ((SEGVIA*)aRefSeg)->IsOnLayer( area->GetLayer() ) ) + continue; + + if( area->m_Poly->Distance( aRefSeg->GetPosition() ) < aRefSeg->GetWidth()/2 ) + { + m_currentMarker = fillMarker( aRefSeg, NULL, + DRCE_VIA_INSIDE_KEEPOUT, m_currentMarker ); + return false; + } + } + } + + return true; +} + + bool DRC::doPadToPadsDrc( D_PAD* aRefPad, D_PAD** aStart, D_PAD** aEnd, int x_limit ) { int layerMask = aRefPad->GetLayerMask() & ALL_CU_LAYERS; diff --git a/pcbnew/drc_stuff.h b/pcbnew/drc_stuff.h index 086ce4be25..65eec4d0d9 100644 --- a/pcbnew/drc_stuff.h +++ b/pcbnew/drc_stuff.h @@ -32,7 +32,6 @@ #include - #define OK_DRC 0 #define BAD_DRC 1 @@ -73,6 +72,9 @@ #define DRCE_NETCLASS_VIADRILLSIZE 33 ///< netclass has ViaDrillSize < board.m_designSettings->m_ViasMinDrill #define DRCE_NETCLASS_uVIASIZE 34 ///< netclass has ViaSize < board.m_designSettings->m_MicroViasMinSize #define DRCE_NETCLASS_uVIADRILLSIZE 35 ///< netclass has ViaSize < board.m_designSettings->m_MicroViasMinDrill +#define DRCE_VIA_INSIDE_KEEPOUT 36 ///< Via in inside a keepout area +#define DRCE_TRACK_INSIDE_KEEPOUT 37 ///< Track in inside a keepout area +#define DRCE_PAD_INSIDE_KEEPOUT 38 ///< Pad in inside a keepout area class EDA_DRAW_PANEL; @@ -155,15 +157,14 @@ private: bool m_doPad2PadTest; bool m_doUnconnectedTest; bool m_doZonesTest; + bool m_doKeepoutTest; bool m_doCreateRptFile; wxString m_rptFilename; - // int m_errorCount; - MARKER_PCB* m_currentMarker; - bool m_aboartDRC; + bool m_abortDRC; bool m_drcInProgress; /* In DRC functions, many calculations are using coordinates relative @@ -182,7 +183,7 @@ private: int m_segmLength; // length of the reference segment /* variables used in checkLine to test DRC segm to segm: - * define the area relative to the ref segment that does not contains anu other segment + * define the area relative to the ref segment that does not contains any other segment */ int m_xcliplo; int m_ycliplo; @@ -278,6 +279,7 @@ private: void testZones(); + void testKeepoutAreas(); //---------------------------------------------- @@ -305,6 +307,15 @@ private: */ bool doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool doPads = true ); + /** + * Function doTrackKeepoutDrc + * tests the current segment or via. + * @param aRefSeg The segment to test + * @return bool - true if no poblems, else false and m_currentMarker is + * filled in with the problem information. + */ + bool doTrackKeepoutDrc( TRACK* aRefSeg ); + /** * Function doEdgeZoneDrc @@ -412,7 +423,10 @@ public: { updatePointers(); - return doTrackDrc( aRefSeg, aList ) ? OK_DRC : BAD_DRC; + if( ! doTrackDrc( aRefSeg, aList ) ) + return BAD_DRC; + + return doTrackKeepoutDrc( aRefSeg ) ? OK_DRC : BAD_DRC; } @@ -443,11 +457,13 @@ public: * @param aSaveReport A boolean telling whether to generate disk file report. */ void SetSettings( bool aPad2PadTest, bool aUnconnectedTest, - bool aZonesTest, const wxString& aReportName, bool aSaveReport ) + bool aZonesTest, bool aKeepoutTest, + const wxString& aReportName, bool aSaveReport ) { m_doPad2PadTest = aPad2PadTest; m_doUnconnectedTest = aUnconnectedTest; m_doZonesTest = aZonesTest; + m_doKeepoutTest = aKeepoutTest; m_rptFilename = aReportName; m_doCreateRptFile = aSaveReport; } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index fa57f44f08..b6adee5749 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1343,6 +1343,10 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) break; + case ID_PCB_KEEPOUT_AREA_BUTT: + SetToolID( id, wxCURSOR_PENCIL, _( "Add keepout" ) ); + break; + case ID_PCB_MIRE_BUTT: SetToolID( id, wxCURSOR_PENCIL, _( "Add layer alignment target" ) ); break; diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 42ff20c0a3..cd8ec788da 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -980,7 +980,7 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const FMT_IU( aZone->m_Poly->GetHatchPitch() ).c_str() ); if( aZone->GetPriority() > 0 ) - m_out->Print( aNestLevel+1, " (priority %d)\n", aZone->GetPriority() ); + m_out->Print( aNestLevel+1, "(priority %d)\n", aZone->GetPriority() ); m_out->Print( aNestLevel+1, "(connect_pads" ); @@ -1009,6 +1009,14 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const m_out->Print( aNestLevel+1, "(min_thickness %s)\n", FMT_IU( aZone->GetMinThickness() ).c_str() ); + if( aZone->GetIsKeepout() ) + { + m_out->Print( aNestLevel+1, "(keepout (tracks %s) (vias %s) (pads %s))\n", + aZone->GetDoNotAllowTracks() ? "not_allowed" : "allowed", + aZone->GetDoNotAllowVias() ? "not_allowed" : "allowed", + aZone->GetDoNotAllowPads() ? "not_allowed" : "allowed" ); + } + m_out->Print( aNestLevel+1, "(fill" ); // Default is not filled. diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index c3c83ff1a5..1407a0fbf2 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -3,8 +3,8 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2007-2012 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2004 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr - * Copyright (C) 1992-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2004 Jean-Pierre Charras, jp.charras@wanadoo.fr + * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or @@ -2205,6 +2205,34 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() zc->SetCornerRadius( cornerRadius ); } + else if( TESTLINE( "ZKeepout" ) ) + { + zc->SetIsKeepout( true ); + // e.g. "ZKeepout tracks N vias N pads Y" + data = strtok( line + SZ( "ZKeepout" ), delims ); + + while( data ) + { + if( !strcmp( data, "tracks" ) ) + { + data = strtok( NULL, delims ); + zc->SetDoNotAllowTracks( data && *data == 'N' ); + } + else if( !strcmp( data, "vias" ) ) + { + data = strtok( NULL, delims ); + zc->SetDoNotAllowVias( data && *data == 'N' ); + } + else if( !strcmp( data, "pads" ) ) + { + data = strtok( NULL, delims ); + zc->SetDoNotAllowPads( data && *data == 'N' ); + } + + data = strtok( NULL, delims ); + } + } + else if( TESTLINE( "ZOptions" ) ) { // e.g. "ZOptions 0 32 F 200 200" @@ -3566,6 +3594,14 @@ void LEGACY_PLUGIN::saveZONE_CONTAINER( const ZONE_CONTAINER* me ) const fmtBIU( me->GetThermalReliefGap() ).c_str(), fmtBIU( me->GetThermalReliefCopperBridge() ).c_str() ); + if( me->GetIsKeepout() ) + { + fprintf( m_fp, "ZKeepout tracks %c vias %c pads %c\n", + me->GetDoNotAllowTracks() ? 'N' : 'Y', + me->GetDoNotAllowVias() ? 'N' : 'Y', + me->GetDoNotAllowPads() ? 'N' : 'Y' ); + } + fprintf( m_fp, "ZSmoothing %d %s\n", me->GetCornerSmoothingType(), fmtBIU( me->GetCornerRadius() ).c_str() ); diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 64389263e0..1be09ce1cc 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -370,6 +370,10 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() AddMenuItem( placeMenu, ID_PCB_ZONES_BUTT, _( "&Zone" ), _( "Add filled zones" ), KiBitmap( add_zone_xpm ) ); + // Keepout areas + AddMenuItem( placeMenu, ID_PCB_KEEPOUT_AREA_BUTT, + _( "&Zone" ), _( "Add keepout areas" ), KiBitmap( add_keepout_area_xpm ) ); + // Text AddMenuItem( placeMenu, ID_PCB_ADD_TEXT_BUTT, _( "Te&xt" ), _( "Add text on copper layers or graphic text" ), diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index f037e987b2..65c21b087e 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -291,37 +291,13 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_PCB_ZONES_BUTT: - - /* ZONE Tool is selected. Determine action for a left click: + case ID_PCB_KEEPOUT_AREA_BUTT: + /* ZONE or KEEPOUT Tool is selected. Determine action for a left click: * this can be start a new zone or select and move an existing zone outline corner * if found near the mouse cursor */ if( (DrawStruct == NULL) || (DrawStruct->GetFlags() == 0) ) { -#if 0 // Set to 1 to automatically edit a zone found under the mouse - // there is no current item, try to find something under the mouse cursor - DrawStruct = PcbGeneralLocateAndDisplay(); - bool hit_on_corner = false; - - if( DrawStruct && (DrawStruct->Type() == PCB_ZONE_AREA_T) ) - { - // We have a hit under mouse (a zone outline corner or segment) - // test for a corner only because want to move corners only. - ZONE_CONTAINER* edge_zone = (ZONE_CONTAINER*) DrawStruct; - - if( edge_zone->HitTestForCorner( GetScreen()->RefPos( true ) ) ) // corner located! - hit_on_corner = true; - } - - if( hit_on_corner ) - { - m_canvas->MoveCursorToCrossHair(); - ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); - m_canvas->SetAutoPanRequest( true ); - Start_Move_Zone_Corner( aDC, zone_cont, zone_cont->m_CornerSelection, false ); - } - else -#endif if( Begin_Zone( aDC ) ) { m_canvas->SetAutoPanRequest( true ); @@ -521,6 +497,7 @@ void PCB_EDIT_FRAME::OnLeftDClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_PCB_ZONES_BUTT: + case ID_PCB_KEEPOUT_AREA_BUTT: if( End_Zone( aDC ) ) { m_canvas->SetAutoPanRequest( false ); diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index 49098f3cd2..9d2111589a 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -329,6 +329,12 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) aPopMenu->AppendSeparator(); break; + case ID_PCB_KEEPOUT_AREA_BUTT: + AddMenuItem( aPopMenu, ID_POPUP_PCB_SELECT_LAYER, + _( "Select Working Layer" ), KiBitmap( select_w_layer_xpm ) ); + aPopMenu->AppendSeparator(); + break; + case ID_TRACK_BUTT: if ( ! locate_track ) // This menu is already added when a track is located AddMenuItem( aPopMenu, Append_Track_Width_List( GetBoard() ), @@ -601,7 +607,9 @@ void PCB_EDIT_FRAME::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* { wxMenu* zones_menu = new wxMenu(); - AddMenuItem( aPopMenu, zones_menu, -1, _( "Zones" ), KiBitmap( add_zone_xpm ) ); + AddMenuItem( aPopMenu, zones_menu, -1, + edge_zone->GetIsKeepout() ? _("Keepout Area") : _( "Zones" ), + KiBitmap( add_zone_xpm ) ); if( edge_zone->HitTestForCorner( GetScreen()->RefPos( true ) ) ) { @@ -632,8 +640,9 @@ void PCB_EDIT_FRAME::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* zones_menu->AppendSeparator(); - AddMenuItem( zones_menu, ID_POPUP_PCB_FILL_ZONE, _( "Fill Zone" ), - KiBitmap( fill_zone_xpm ) ); + if( ! edge_zone->GetIsKeepout() ) + AddMenuItem( zones_menu, ID_POPUP_PCB_FILL_ZONE, _( "Fill Zone" ), + KiBitmap( fill_zone_xpm ) ); if( edge_zone->GetFilledPolysList().size() > 0 ) { diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 7e78a61f80..c438041333 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2464,6 +2464,49 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) break; + case T_keepout: + zone->SetIsKeepout( true ); + + for( token = NextTok(); token != T_RIGHT; token = NextTok() ) + { + if( token == T_LEFT ) + token = NextTok(); + + switch( token ) + { + case T_tracks: + token = NextTok(); + + if( token != T_allowed && token != T_not_allowed ) + Expecting( "allowed or not_allowed" ); + zone->SetDoNotAllowTracks( token == T_not_allowed ); + break; + + case T_vias: + token = NextTok(); + + if( token != T_allowed && token != T_not_allowed ) + Expecting( "allowed or not_allowed" ); + zone->SetDoNotAllowVias( token == T_not_allowed ); + break; + + case T_pads: + token = NextTok(); + + if( token != T_allowed && token != T_not_allowed ) + Expecting( "allowed or not_allowed" ); + zone->SetDoNotAllowPads( token == T_not_allowed ); + break; + + default: + Expecting( "tracks, vias or pads" ); + } + + NeedRIGHT(); + } + + break; + case T_polygon: { std::vector< wxPoint > corners; diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 527bac274f..cb35fc1931 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -26,6 +26,7 @@ enum pcbnew_ids ID_PCB_MODULE_BUTT, ID_TRACK_BUTT, ID_PCB_ZONES_BUTT, + ID_PCB_KEEPOUT_AREA_BUTT, ID_PCB_ADD_LINE_BUTT, ID_PCB_CIRCLE_BUTT, ID_PCB_ARC_BUTT, diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index 5d0c5a60d1..4c4b8ff73f 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -429,6 +429,10 @@ void PCB_EDIT_FRAME::ReCreateVToolbar() m_drawToolBar->AddTool( ID_PCB_ZONES_BUTT, wxEmptyString, KiBitmap( add_zone_xpm ), _( "Add filled zones" ), wxITEM_CHECK ); + m_drawToolBar->AddTool( ID_PCB_KEEPOUT_AREA_BUTT, wxEmptyString, + KiBitmap( add_keepout_area_xpm ), + _( "Add keepout areas" ), wxITEM_CHECK ); + m_drawToolBar->AddSeparator(); m_drawToolBar->AddTool( ID_PCB_ADD_LINE_BUTT, wxEmptyString, KiBitmap( add_dashed_line_xpm ), _( "Add graphic line or polygon" ), wxITEM_CHECK ); diff --git a/pcbnew/zone_filling_algorithm.cpp b/pcbnew/zone_filling_algorithm.cpp index aadd43472c..539d6a0f0c 100644 --- a/pcbnew/zone_filling_algorithm.cpp +++ b/pcbnew/zone_filling_algorithm.cpp @@ -69,35 +69,35 @@ int ZONE_CONTAINER::BuildFilledPolysListData( BOARD* aPcb, std::vector return 0; // Make a smoothed polygon out of the user-drawn polygon if required - if( smoothedPoly ) + if( m_smoothedPoly ) { - delete smoothedPoly; - smoothedPoly = NULL; + delete m_smoothedPoly; + m_smoothedPoly = NULL; } - switch( cornerSmoothingType ) + switch( m_cornerSmoothingType ) { case ZONE_SETTINGS::SMOOTHING_CHAMFER: - smoothedPoly = m_Poly->Chamfer( cornerRadius ); + m_smoothedPoly = m_Poly->Chamfer( m_cornerRadius ); break; case ZONE_SETTINGS::SMOOTHING_FILLET: - smoothedPoly = m_Poly->Fillet( cornerRadius, m_ArcToSegmentsCount ); + m_smoothedPoly = m_Poly->Fillet( m_cornerRadius, m_ArcToSegmentsCount ); break; default: - smoothedPoly = new CPolyLine; - smoothedPoly->Copy( m_Poly ); + m_smoothedPoly = new CPolyLine; + m_smoothedPoly->Copy( m_Poly ); break; } - smoothedPoly->MakeKboolPoly( -1, -1, NULL, true ); + m_smoothedPoly->MakeKboolPoly( -1, -1, NULL, true ); int count = 0; - while( smoothedPoly->GetKboolEngine()->StartPolygonGet() ) + while( m_smoothedPoly->GetKboolEngine()->StartPolygonGet() ) { CPolyPt corner( 0, 0, false ); - while( smoothedPoly->GetKboolEngine()->PolygonHasMorePoints() ) + while( m_smoothedPoly->GetKboolEngine()->PolygonHasMorePoints() ) { - corner.x = (int) smoothedPoly->GetKboolEngine()->GetPolygonXPoint(); - corner.y = (int) smoothedPoly->GetKboolEngine()->GetPolygonYPoint(); + corner.x = (int) m_smoothedPoly->GetKboolEngine()->GetPolygonXPoint(); + corner.y = (int) m_smoothedPoly->GetKboolEngine()->GetPolygonYPoint(); corner.end_contour = false; if( aCornerBuffer ) aCornerBuffer->push_back( corner ); @@ -117,10 +117,10 @@ int ZONE_CONTAINER::BuildFilledPolysListData( BOARD* aPcb, std::vector m_FilledPolysList.pop_back(); m_FilledPolysList.push_back( corner ); } - smoothedPoly->GetKboolEngine()->EndPolygonGet(); + m_smoothedPoly->GetKboolEngine()->EndPolygonGet(); } - smoothedPoly->FreeKboolEngine(); + m_smoothedPoly->FreeKboolEngine(); /* For copper layers, we now must add holes in the Polygon list. * holes are pads and tracks with their clearance area diff --git a/pcbnew/zones.h b/pcbnew/zones.h index 4c6b6c3e54..3ac9331da9 100644 --- a/pcbnew/zones.h +++ b/pcbnew/zones.h @@ -68,4 +68,15 @@ ZONE_EDIT_T InvokeNonCopperZonesEditor( PCB_BASE_FRAME* aParent, ZONE_CONTAINER* */ ZONE_EDIT_T InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings ); +/** + * Function InvokeKeepoutAreaEditor + * invokes up a modal dialog window for copper zone editing. + * + * @param aCaller is the PCB_BASE_FRAME calling parent window for the modal dialog, + * and it gives access to the BOARD through PCB_BASE_FRAME::GetBoard(). + * @param aSettings points to the ZONE_SETTINGS to edit. + * @return ZONE_EDIT_T - tells if user aborted, changed only one zone, or all of them. + */ +ZONE_EDIT_T InvokeKeepoutAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings ); + #endif // ZONES_H_ diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 0d5dcf999f..12462939a7 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -83,7 +83,7 @@ void PCB_EDIT_FRAME::Add_Similar_Zone( wxDC* DC, ZONE_CONTAINER* aZone ) // Use the general event handler to set others params (like toolbar) wxCommandEvent evt; - evt.SetId( ID_PCB_ZONES_BUTT ); + evt.SetId( aZone->GetIsKeepout() ? ID_PCB_KEEPOUT_AREA_BUTT : ID_PCB_ZONES_BUTT ); OnSelectTool( evt ); } @@ -103,7 +103,7 @@ void PCB_EDIT_FRAME::Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* aZone ) // Use the general event handle to set others params (like toolbar) wxCommandEvent evt; - evt.SetId( ID_PCB_ZONES_BUTT ); + evt.SetId( aZone->GetIsKeepout() ? ID_PCB_KEEPOUT_AREA_BUTT : ID_PCB_ZONES_BUTT ); OnSelectTool( evt ); } @@ -116,7 +116,16 @@ void PCB_EDIT_FRAME::duplicateZone( wxDC* aDC, ZONE_CONTAINER* aZone ) ZONE_SETTINGS zoneSettings; zoneSettings << *aZone; - if( InvokeCopperZonesEditor( this, &zoneSettings ) ) + bool success; + + if( aZone->GetIsKeepout() ) + success = InvokeKeepoutAreaEditor( this, &zoneSettings ); + else if( aZone->IsOnCopperLayer() ) + success = InvokeCopperZonesEditor( this, &zoneSettings ); + else + success = InvokeNonCopperZonesEditor( this, aZone, &zoneSettings ); + + if( success ) { zoneSettings.ExportSetting( *newZone ); newZone->m_Poly->Hatch(); @@ -510,7 +519,17 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) // If no zone contour in progress, a new zone is being created: if( !GetBoard()->m_CurrentZoneContour ) - GetBoard()->m_CurrentZoneContour = new ZONE_CONTAINER( GetBoard() ); + { + if( GetToolId() == ID_PCB_KEEPOUT_AREA_BUTT && + getActiveLayer() >= FIRST_NON_COPPER_LAYER ) + { + DisplayError( this, + _( "Error: a keepout area is allowed only on copper layers" ) ); + return 0; + } + else + GetBoard()->m_CurrentZoneContour = new ZONE_CONTAINER( GetBoard() ); + } ZONE_CONTAINER* zone = GetBoard()->m_CurrentZoneContour; @@ -557,12 +576,17 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) zoneInfo.m_CurrentZone_Layer = zone->GetLayer(); - edited = InvokeCopperZonesEditor( this, &zoneInfo ); + if( GetToolId() == ID_PCB_KEEPOUT_AREA_BUTT ) + { + zoneInfo.SetIsKeepout( true ); + edited = InvokeKeepoutAreaEditor( this, &zoneInfo ); + } + else + edited = InvokeCopperZonesEditor( this, &zoneInfo ); } else // Put a zone on a non copper layer (technical layer) { zoneInfo.m_NetcodeSelection = 0; // No net for non copper zones - edited = InvokeNonCopperZonesEditor( this, zone, &zoneInfo ); } @@ -591,7 +615,8 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) } // Show the Net for zones on copper layers - if( zoneInfo.m_CurrentZone_Layer < FIRST_NO_COPPER_LAYER ) + if( zoneInfo.m_CurrentZone_Layer < FIRST_NO_COPPER_LAYER && + ! zoneInfo.GetIsKeepout() ) { if( s_CurrentZone ) { @@ -815,7 +840,13 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone ) s_PickedList.ClearListAndDeleteItems(); SaveCopyOfZones(s_PickedList, GetBoard(), -1, -1 ); - if( aZone->GetLayer() < FIRST_NO_COPPER_LAYER ) + if( aZone->GetIsKeepout() ) + { + // edit a keepout area on a copper layer + zoneInfo << *aZone; + edited = InvokeKeepoutAreaEditor( this, &zoneInfo ); + } + else if( aZone->GetLayer() < FIRST_NO_COPPER_LAYER ) { // edit a zone on a copper layer diff --git a/pcbnew/zones_by_polygon_fill_functions.cpp b/pcbnew/zones_by_polygon_fill_functions.cpp index 88126a0c4a..4fe1adc89b 100644 --- a/pcbnew/zones_by_polygon_fill_functions.cpp +++ b/pcbnew/zones_by_polygon_fill_functions.cpp @@ -87,6 +87,13 @@ void PCB_EDIT_FRAME::Delete_OldZone_Fill( SEGZONE* aZone, time_t aTimestamp ) int PCB_EDIT_FRAME::Fill_Zone( ZONE_CONTAINER* aZone ) { + aZone->ClearFilledPolysList(); + aZone->UnFill(); + + // Cannot fill keepout zones: + if( aZone->GetIsKeepout() ) + return 1; + wxString msg; ClearMsgPanel(); @@ -105,8 +112,6 @@ int PCB_EDIT_FRAME::Fill_Zone( ZONE_CONTAINER* aZone ) wxBusyCursor dummy; // Shows an hourglass cursor (removed by its destructor) - aZone->ClearFilledPolysList(); - aZone->UnFill(); aZone->BuildFilledPolysListData( GetBoard() ); OnModify(); @@ -142,6 +147,9 @@ int PCB_EDIT_FRAME::Fill_All_Zones( wxWindow * aActiveWindow, bool aVerbose ) for( ii = 0; ii < areaCount; ii++ ) { ZONE_CONTAINER* zoneContainer = GetBoard()->GetArea( ii ); + if( zoneContainer->GetIsKeepout() ) + continue; + msg.Printf( FORMAT_STRING, ii+1, areaCount, GetChars( zoneContainer->GetNetName() ) ); if( progressDialog ) diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index e6de77f223..282234a7a2 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -360,6 +360,9 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) if( zone->GetLayer() != GetLayer() ) continue; + if( zone->GetIsKeepout() ) + continue; + if( zone->GetPriority() <= GetPriority() ) continue; @@ -372,8 +375,12 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) // However if the zone has the same net as the current zone, // do not add clearance. // the zone will be connected to the current zone, but filled areas - // will use different parameters (clearnce, thermal shapes ) + // will use different parameters (clearance, thermal shapes ) bool addclearance = GetNet() != zone->GetNet(); + + if( zone->GetIsKeepout() ) + addclearance = false; + zone->TransformShapeWithClearanceToPolygon( cornerBufferPolysToSubstract, zone_clearance, s_CircleToSegmentsCount, diff --git a/pcbnew/zones_functions_for_undo_redo.cpp b/pcbnew/zones_functions_for_undo_redo.cpp index 8dc105be0b..6d546d7874 100644 --- a/pcbnew/zones_functions_for_undo_redo.cpp +++ b/pcbnew/zones_functions_for_undo_redo.cpp @@ -70,7 +70,28 @@ bool ZONE_CONTAINER::IsSame( const ZONE_CONTAINER& aZoneToCompare ) if( m_Netname != aZoneToCompare.m_Netname ) return false; - // Compare zone specfic parameters + if( GetPriority() != aZoneToCompare.GetPriority() ) + return false; + + // Compare zone specific parameters + if( GetIsKeepout() != aZoneToCompare.GetIsKeepout() ) + return false; + + if( GetIsKeepout() ) + { + if( GetDoNotAllowPads() != aZoneToCompare.GetDoNotAllowPads() ) + return false; + + if( GetDoNotAllowVias() != aZoneToCompare.GetDoNotAllowVias() ) + return false; + + if( GetDoNotAllowTracks() != aZoneToCompare.GetDoNotAllowTracks() ) + return false; + } + + if( m_ArcToSegmentsCount != aZoneToCompare.m_ArcToSegmentsCount ) + return false; + if( m_ZoneClearance != aZoneToCompare.m_ZoneClearance ) return false; @@ -80,9 +101,6 @@ bool ZONE_CONTAINER::IsSame( const ZONE_CONTAINER& aZoneToCompare ) if( m_FillMode != aZoneToCompare.m_FillMode ) return false; - if( m_ArcToSegmentsCount != aZoneToCompare.m_ArcToSegmentsCount ) - return false; - if( m_PadConnection != aZoneToCompare.m_PadConnection ) return false; @@ -92,8 +110,6 @@ bool ZONE_CONTAINER::IsSame( const ZONE_CONTAINER& aZoneToCompare ) if( m_ThermalReliefCopperBridge != aZoneToCompare.m_ThermalReliefCopperBridge ) return false; - if( GetPriority() != aZoneToCompare.GetPriority() ) - return false; // Compare outlines wxASSERT( m_Poly ); // m_Poly == NULL Should never happen diff --git a/pcbnew/zones_non_copper_type_functions.cpp b/pcbnew/zones_non_copper_type_functions.cpp index 28af1f3fdb..5305c4e137 100644 --- a/pcbnew/zones_non_copper_type_functions.cpp +++ b/pcbnew/zones_non_copper_type_functions.cpp @@ -29,7 +29,7 @@ private: PCB_BASE_FRAME* m_Parent; ZONE_CONTAINER* m_zone; ZONE_SETTINGS* m_ptr; - ZONE_SETTINGS m_settings; + ZONE_SETTINGS m_settings; // working copy of zone settings void OnOkClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ); @@ -76,8 +76,6 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::Init() { SetReturnCode( ZONE_ABORT ); // Will be changed on button click - m_FillModeCtrl->SetSelection( m_settings.m_FillMode ? 1 : 0 ); - AddUnitSymbol( *m_MinThicknessValueTitle, g_UserUnit ); wxString msg = ReturnStringFromValue( g_UserUnit, m_settings.m_ZoneMinThickness ); m_ZoneMinThicknessCtrl->SetValue( msg ); @@ -125,18 +123,18 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::Init() void DIALOG_NON_COPPER_ZONES_EDITOR::OnOkClick( wxCommandEvent& event ) { - wxString txtvalue = m_ZoneMinThicknessCtrl->GetValue(); + wxString txtvalue = m_ZoneMinThicknessCtrl->GetValue(); m_settings.m_ZoneMinThickness = ReturnValueFromString( g_UserUnit, txtvalue ); if( m_settings.m_ZoneMinThickness < 10 ) { DisplayError( this, - _( "Error :\nyou must choose a copper min thickness value bigger than 0.001 inch (or 0.0254 mm)" ) ); + _( "Error :\nyou must choose a min thickness value bigger than 0.001 inch (or 0.0254 mm)" ) ); return; } - m_settings.m_FillMode = (m_FillModeCtrl->GetSelection() == 0) ? 0 : 1; + m_settings.m_FillMode = 0; // Use always polygon fill mode switch( m_OutlineAppearanceCtrl->GetSelection() ) { diff --git a/pcbnew/zones_test_and_combine_areas.cpp b/pcbnew/zones_test_and_combine_areas.cpp index c06e96feac..d790a8eb9e 100644 --- a/pcbnew/zones_test_and_combine_areas.cpp +++ b/pcbnew/zones_test_and_combine_areas.cpp @@ -261,7 +261,7 @@ int BOARD::TestAreaPolygon( ZONE_CONTAINER* CurrArea ) * @param bMessageBoxInt == true, shows message when clipping occurs. * @param bMessageBoxArc == true, shows message when clipping can't be done due to arcs. * @param bRetainArcs = true to handle arcs (not really used in KiCad) - * @return: + * @return * -1 if arcs intersect other sides, so polygon can't be clipped * 0 if no intersecting sides * 1 if intersecting sides @@ -454,9 +454,13 @@ int BOARD::CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList, int aNetCode, if( area2->GetNet() != aNetCode ) continue; + if( curr_area->GetPriority() != area2->GetPriority() ) continue; + if( curr_area->GetIsKeepout() != area2->GetIsKeepout() ) + continue; + if( curr_area->GetLayer() == area2->GetLayer() && curr_area->utility2 != -1 && area2->utility2 != -1 ) { @@ -525,9 +529,14 @@ bool BOARD::TestAreaIntersections( ZONE_CONTAINER* area_to_test ) if( area_to_test->GetLayer() != area2->GetLayer() ) continue; + // test for different priorities if( area_to_test->GetPriority() != area2->GetPriority() ) continue; + // test for different types + if( area_to_test->GetIsKeepout() != area2->GetIsKeepout() ) + continue; + CPolyLine* poly2 = area2->m_Poly; // test bounding rects @@ -912,6 +921,10 @@ int BOARD::CombineAreas( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_r } +/* Tests area outlines for DRC: areas inside other areas or too close. + * aArea_To_Examine: area to compare with other areas, + * or if NULL then all areas are compared to all others. + */ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_Examine, bool aCreate_Markers ) { @@ -927,38 +940,42 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E if( !Area_Ref->IsOnCopperLayer() ) continue; - // If testing only a single area, then skip all others + // When testing only a single area, skip all others if( aArea_To_Examine && (aArea_To_Examine != Area_Ref) ) continue; for( int ia2 = 0; ia2 < GetAreaCount(); ia2++ ) { - ZONE_CONTAINER* Area_To_Test = GetArea( ia2 ); - CPolyLine* testSmoothedPoly = Area_To_Test->GetSmoothedPoly(); + ZONE_CONTAINER* area_to_test = GetArea( ia2 ); + CPolyLine* testSmoothedPoly = area_to_test->GetSmoothedPoly(); - if( Area_Ref == Area_To_Test ) + if( Area_Ref == area_to_test ) continue; // test for same layer - if( Area_Ref->GetLayer() != Area_To_Test->GetLayer() ) + if( Area_Ref->GetLayer() != area_to_test->GetLayer() ) continue; // Test for same net - if( Area_Ref->GetNet() == Area_To_Test->GetNet() && Area_Ref->GetNet() >= 0 ) + if( Area_Ref->GetNet() == area_to_test->GetNet() && Area_Ref->GetNet() >= 0 ) continue; // test for different priorities - if( Area_Ref->GetPriority() != Area_To_Test->GetPriority() ) + if( Area_Ref->GetPriority() != area_to_test->GetPriority() ) continue; - // Examine a candidate zone: compare Area_To_Test to Area_Ref + // test for different types + if( Area_Ref->GetIsKeepout() != area_to_test->GetIsKeepout() ) + continue; + + // Examine a candidate zone: compare area_to_test to Area_Ref // Get clearance used in zone to zone test. The policy used to // obtain that value is now part of the zone object itself by way of // ZONE_CONTAINER::GetClearance(). - int zone2zoneClearance = Area_Ref->GetClearance( Area_To_Test ); + int zone2zoneClearance = Area_Ref->GetClearance( area_to_test ); - // test for some corners of Area_Ref inside Area_To_Test + // test for some corners of Area_Ref inside area_to_test for( int ic = 0; ic < refSmoothedPoly->GetNumCorners(); ic++ ) { int x = refSmoothedPoly->GetX( ic ); @@ -970,7 +987,7 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E if( aCreate_Markers ) { wxString msg1 = Area_Ref->GetSelectMenuText(); - wxString msg2 = Area_To_Test->GetSelectMenuText(); + wxString msg2 = area_to_test->GetSelectMenuText(); MARKER_PCB* marker = new MARKER_PCB( COPPERAREA_INSIDE_COPPERAREA, wxPoint( x, y ), msg1, wxPoint( x, y ), @@ -982,7 +999,7 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E } } - // test for some corners of Area_To_Test inside Area_Ref + // test for some corners of area_to_test inside Area_Ref for( int ic2 = 0; ic2 < testSmoothedPoly->GetNumCorners(); ic2++ ) { int x = testSmoothedPoly->GetX( ic2 ); @@ -993,7 +1010,7 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E // COPPERAREA_COPPERAREA error: copper area corner inside copper area ref if( aCreate_Markers ) { - wxString msg1 = Area_To_Test->GetSelectMenuText(); + wxString msg1 = area_to_test->GetSelectMenuText(); wxString msg2 = Area_Ref->GetSelectMenuText(); MARKER_PCB* marker = new MARKER_PCB( COPPERAREA_INSIDE_COPPERAREA, wxPoint( x, y ), @@ -1070,7 +1087,7 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E if( aCreate_Markers ) { wxString msg1 = Area_Ref->GetSelectMenuText(); - wxString msg2 = Area_To_Test->GetSelectMenuText(); + wxString msg2 = area_to_test->GetSelectMenuText(); MARKER_PCB* marker = new MARKER_PCB( COPPERAREA_CLOSE_TO_COPPERAREA, wxPoint( x, y ), msg1, wxPoint( x, y ), @@ -1091,14 +1108,13 @@ int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_E } -/** - * Function doEdgeZoneDrc - * tests a segment in ZONE_CONTAINER * aArea: +/* tests a segment in ZONE_CONTAINER * aArea: * Test Edge inside other areas * Test Edge too close other areas - * @param aArea The current area. - * @param aCornerIndex The first corner of the segment to test. - * @return bool - false if DRC error or true if OK + * aArea is the current area. + * aCornerIndex is the index of the first corner (starting point) + * of the edge segment to test. + * return false if DRC error or true if OK */ bool DRC::doEdgeZoneDrc( ZONE_CONTAINER* aArea, int aCornerIndex ) @@ -1136,30 +1152,31 @@ bool DRC::doEdgeZoneDrc( ZONE_CONTAINER* aArea, int aCornerIndex ) // iterate through all areas for( int ia2 = 0; ia2 < m_pcb->GetAreaCount(); ia2++ ) { - ZONE_CONTAINER* Area_To_Test = m_pcb->GetArea( ia2 ); - int zone_clearance = max( Area_To_Test->m_ZoneClearance, + ZONE_CONTAINER* area_to_test = m_pcb->GetArea( ia2 ); + int zone_clearance = max( area_to_test->m_ZoneClearance, aArea->m_ZoneClearance ); // test for same layer - if( Area_To_Test->GetLayer() != aArea->GetLayer() ) + if( area_to_test->GetLayer() != aArea->GetLayer() ) continue; // Test for same net - if( ( aArea->GetNet() == Area_To_Test->GetNet() ) && (aArea->GetNet() >= 0) ) + if( ( aArea->GetNet() == area_to_test->GetNet() ) && (aArea->GetNet() >= 0) ) continue; // test for same priority - if( Area_To_Test->GetPriority() != aArea->GetPriority() ) + if( area_to_test->GetPriority() != aArea->GetPriority() ) continue; - // test for ending line inside Area_To_Test - int x = end.x; - int y = end.y; + // test for same type + if( area_to_test->GetIsKeepout() != aArea->GetIsKeepout() ) + continue; - if( Area_To_Test->m_Poly->TestPointInside( x, y ) ) + // test for ending line inside area_to_test + if( area_to_test->m_Poly->TestPointInside( end.x, end.y ) ) { // COPPERAREA_COPPERAREA error: corner inside copper area - m_currentMarker = fillMarker( aArea, wxPoint( x, y ), + m_currentMarker = fillMarker( aArea, end, COPPERAREA_INSIDE_COPPERAREA, m_currentMarker ); return false; @@ -1172,35 +1189,35 @@ bool DRC::doEdgeZoneDrc( ZONE_CONTAINER* aArea, int aCornerIndex ) int ax2 = end.x; int ay2 = end.y; - for( int icont2 = 0; icont2 < Area_To_Test->m_Poly->GetNumContours(); icont2++ ) + for( int icont2 = 0; icont2 < area_to_test->m_Poly->GetNumContours(); icont2++ ) { - int ic_start2 = Area_To_Test->m_Poly->GetContourStart( icont2 ); - int ic_end2 = Area_To_Test->m_Poly->GetContourEnd( icont2 ); + int ic_start2 = area_to_test->m_Poly->GetContourStart( icont2 ); + int ic_end2 = area_to_test->m_Poly->GetContourEnd( icont2 ); for( int ic2 = ic_start2; ic2<=ic_end2; ic2++ ) { - int bx1 = Area_To_Test->m_Poly->GetX( ic2 ); - int by1 = Area_To_Test->m_Poly->GetY( ic2 ); + int bx1 = area_to_test->m_Poly->GetX( ic2 ); + int by1 = area_to_test->m_Poly->GetY( ic2 ); int bx2, by2; if( ic2 == ic_end2 ) { - bx2 = Area_To_Test->m_Poly->GetX( ic_start2 ); - by2 = Area_To_Test->m_Poly->GetY( ic_start2 ); + bx2 = area_to_test->m_Poly->GetX( ic_start2 ); + by2 = area_to_test->m_Poly->GetY( ic_start2 ); } else { - bx2 = Area_To_Test->m_Poly->GetX( ic2 + 1 ); - by2 = Area_To_Test->m_Poly->GetY( ic2 + 1 ); + bx2 = area_to_test->m_Poly->GetX( ic2 + 1 ); + by2 = area_to_test->m_Poly->GetY( ic2 + 1 ); } - int bstyle = Area_To_Test->m_Poly->GetSideStyle( ic2 ); - int x, y; + int bstyle = area_to_test->m_Poly->GetSideStyle( ic2 ); + int x, y; // variables containing the intersecting point coordinates int d = GetClearanceBetweenSegments( bx1, by1, bx2, by2, bstyle, 0, ax1, ay1, ax2, ay2, astyle, 0, - zone_clearance, + 0, &x, &y ); if( d < zone_clearance ) diff --git a/polygon/PolyLine.cpp b/polygon/PolyLine.cpp index 58cc8f5f48..4630e9dbbc 100644 --- a/polygon/PolyLine.cpp +++ b/polygon/PolyLine.cpp @@ -14,18 +14,6 @@ #include #include - -#define to_int( x ) KiROUND( (x) ) - -#ifndef MIN -#define MIN( x1, x2 ) ( (x1) > (x2) ? (x2) : (x1) ) -#endif -#ifndef MAX -#define MAX( x1, x2 ) ( (x1) > (x2) ? (x1) : (x2) ) -#endif - -#define pi M_PI - CPolyLine::CPolyLine() { m_hatchStyle = NO_HATCH; @@ -282,7 +270,10 @@ int CPolyLine::MakeKboolPoly( int aStart_contour, int aEnd_contour, std::vector< delete m_Kbool_Poly_Engine; m_Kbool_Poly_Engine = NULL; } - if( !GetClosed() && (aStart_contour == (GetNumContours() - 1) || aStart_contour == -1) ) + + int polycount = GetNumContours(); + + if( !GetClosed() && (aStart_contour == (polycount - 1) || aStart_contour == -1) ) return 1; // error int n_arcs = 0; @@ -292,11 +283,11 @@ int CPolyLine::MakeKboolPoly( int aStart_contour, int aEnd_contour, std::vector< if( aStart_contour == -1 ) { first_contour = 0; - last_contour = GetNumContours() - 1; + last_contour = polycount - 1; } if( aEnd_contour == -1 ) { - last_contour = GetNumContours() - 1; + last_contour = polycount - 1; } if( arc_array ) arc_array->clear(); @@ -389,30 +380,30 @@ int CPolyLine::MakeKboolPoly( int aStart_contour, int aEnd_contour, std::vector< // first quadrant, draw second quadrant of ellipse xo = x2; yo = y1; - theta1 = pi; - theta2 = pi / 2.0; + theta1 = M_PI; + theta2 = M_PI / 2.0; } else if( x2 < x1 && y2 > y1 ) { // second quadrant, draw third quadrant of ellipse xo = x1; yo = y2; - theta1 = 3.0 * pi / 2.0; - theta2 = pi; + theta1 = 3.0 * M_PI / 2.0; + theta2 = M_PI; } else if( x2 < x1 && y2 < y1 ) { // third quadrant, draw fourth quadrant of ellipse xo = x2; yo = y1; - theta1 = 2.0 * pi; - theta2 = 3.0 * pi / 2.0; + theta1 = 2.0 * M_PI; + theta2 = 3.0 * M_PI / 2.0; } else { xo = x1; // fourth quadrant, draw first quadrant of ellipse yo = y2; - theta1 = pi / 2.0; + theta1 = M_PI / 2.0; theta2 = 0.0; } } @@ -423,29 +414,29 @@ int CPolyLine::MakeKboolPoly( int aStart_contour, int aEnd_contour, std::vector< { xo = x1; // first quadrant, draw fourth quadrant of ellipse yo = y2; - theta1 = 3.0 * pi / 2.0; - theta2 = 2.0 * pi; + theta1 = 3.0 * M_PI / 2.0; + theta2 = 2.0 * M_PI; } else if( x2 < x1 && y2 > y1 ) { xo = x2; // second quadrant yo = y1; theta1 = 0.0; - theta2 = pi / 2.0; + theta2 = M_PI / 2.0; } else if( x2 < x1 && y2 < y1 ) { xo = x1; // third quadrant yo = y2; - theta1 = pi / 2.0; - theta2 = pi; + theta1 = M_PI / 2.0; + theta2 = M_PI; } else { xo = x2; // fourth quadrant yo = y1; - theta1 = pi; - theta2 = 3.0 * pi / 2.0; + theta1 = M_PI; + theta2 = 3.0 * M_PI / 2.0; } } @@ -658,7 +649,8 @@ int CPolyLine::RestoreArcs( std::vector * arc_array, std::vectorGetNumContours(); icont++ ) + int polycount = poly->GetNumContours(); + for( int icont = 0; icont < polycount; icont++ ) { int ic_start = poly->GetContourStart( icont ); int ic_end = poly->GetContourEnd( icont ); @@ -877,12 +869,13 @@ void CPolyLine::RemoveContour( int icont ) int istart = GetContourStart( icont ); int iend = GetContourEnd( icont ); - if( icont == 0 && GetNumContours() == 1 ) + int polycount = GetNumContours(); + if( icont == 0 && polycount == 1 ) { // remove the only contour wxASSERT( 0 ); } - else if( icont == GetNumContours() - 1 ) + else if( icont == polycount - 1 ) { // remove last contour corner.erase( corner.begin() + istart, corner.end() ); @@ -911,7 +904,8 @@ CPolyLine* CPolyLine::Chamfer( unsigned int aDistance ) return newPoly; } - for( int contour = 0; contour < GetNumContours(); contour++ ) + int polycount = GetNumContours(); + for( int contour = 0; contour < polycount; contour++ ) { unsigned int startIndex = GetContourStart( contour ); unsigned int endIndex = GetContourEnd( contour ); @@ -986,7 +980,8 @@ CPolyLine* CPolyLine::Fillet( unsigned int aRadius, unsigned int aSegments ) return newPoly; } - for( int contour = 0; contour < GetNumContours(); contour++ ) + int polycount = GetNumContours(); + for( int contour = 0; contour < polycount; contour++ ) { unsigned int startIndex = GetContourStart( contour ); unsigned int endIndex = GetContourEnd( contour ); @@ -1199,10 +1194,10 @@ CRect CPolyLine::GetCornerBounds( int icont ) int iend = GetContourEnd( icont ); for( int i = istart; i<=iend; i++ ) { - r.left = MIN( r.left, corner[i].x ); - r.right = MAX( r.right, corner[i].x ); - r.bottom = MIN( r.bottom, corner[i].y ); - r.top = MAX( r.top, corner[i].y ); + r.left = min( r.left, corner[i].x ); + r.right = max( r.right, corner[i].x ); + r.bottom = min( r.bottom, corner[i].y ); + r.top = max( r.top, corner[i].y ); } return r; @@ -1309,7 +1304,7 @@ int CPolyLine::GetContourSize( int icont ) void CPolyLine::SetSideStyle( int is, int style ) { UnHatch(); - CPoint p1, p2; + wxPoint p1, p2; if( is == (int) (corner.size() - 1) ) { p1.x = corner[corner.size() - 1].x; @@ -1349,8 +1344,8 @@ int CPolyLine::GetClosed() // Creates hatch lines inside the outline of the complex polygon // -// sort function used in ::Hatch to sort points by descending CPoint.x values -bool sort_ends_by_descending_X( const CPoint& ref, const CPoint& tst ) +// sort function used in ::Hatch to sort points by descending wxPoint.x values +bool sort_ends_by_descending_X( const wxPoint& ref, const wxPoint& tst ) { return tst.x < ref.x; } @@ -1420,7 +1415,7 @@ void CPolyLine::Hatch() #define MAXPTS 200 // Usually we store only few values per one hatch line // depending on the compexity of the zone outline - static std::vector pointbuffer; + static std::vector pointbuffer; pointbuffer.clear(); pointbuffer.reserve(MAXPTS+2); @@ -1458,12 +1453,12 @@ void CPolyLine::Hatch() } if( ok ) { - CPoint point( (int) x, (int) y); + wxPoint point( (int) x, (int) y); pointbuffer.push_back( point ); } if( ok == 2 ) { - CPoint point( (int) x2, (int) y2); + wxPoint point( (int) x2, (int) y2); pointbuffer.push_back( point ); } if( pointbuffer.size() >= MAXPTS ) // overflow @@ -1495,10 +1490,7 @@ void CPolyLine::Hatch() // else push 2 small lines if( m_hatchStyle == DIAGONAL_FULL || fabs( dx ) < 2 * hatch_line_len ) { - m_HatchLines.push_back( CSegment( pointbuffer[ip].x, - pointbuffer[ip].y, - pointbuffer[ip + 1].x, - pointbuffer[ip + 1].y ) ); + m_HatchLines.push_back( CSegment( pointbuffer[ip], pointbuffer[ip + 1] ) ); } else { @@ -1517,11 +1509,11 @@ void CPolyLine::Hatch() m_HatchLines.push_back( CSegment( pointbuffer[ip].x, pointbuffer[ip].y, - to_int( x1 ), to_int( y1 ) ) ); + KiROUND( x1 ), KiROUND( y1 ) ) ); m_HatchLines.push_back( CSegment( pointbuffer[ip + 1].x, pointbuffer[ip + 1].y, - to_int( x2 ), to_int( y2 ) ) ); + KiROUND( x2 ), KiROUND( y2 ) ) ); } } } @@ -1538,7 +1530,7 @@ bool CPolyLine::TestPointInside( int px, int py ) } // Test all polygons. - // Since the first is the main outline, and other are hole, + // Since the first is the main outline, and other are holes, // if the tested point is inside only one contour, it is inside the whole polygon // (in fact inside the main outline, and outside all holes). // if inside 2 contours (the main outline + an hole), it is outside the poly. @@ -1636,8 +1628,8 @@ void CPolyLine::AppendArc( int xi, int yi, int xf, int yf, int xc, int yc, int n // generate arc for( int ic = 0; ic bezier_points; bezier_points = Bezier2Poly(x1,y1,x2,y2,x3,y3); @@ -1654,10 +1647,128 @@ void CPolyLine::AppendBezier(int x1, int y1, int x2, int y2, int x3, int y3) { AppendCorner( bezier_points[i].x, bezier_points[i].y); } -void CPolyLine::AppendBezier(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4){ +void CPolyLine::AppendBezier(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) +{ std::vector bezier_points; bezier_points = Bezier2Poly(x1,y1,x2,y2,x3,y3,x4,y4); for( unsigned int i = 0; i < bezier_points.size() ; i++) AppendCorner( bezier_points[i].x, bezier_points[i].y); } + + +/* + * Function Distance + * Calculates the distance between a segment and a polygon (with holes): + * param aStart is the starting point of the segment. + * param aEnd is the ending point of the segment. + * param aWidth is the width of the segment. + * return distance between the segment and outline. + * 0 if segment intersects or is inside + */ +int CPolyLine::Distance( wxPoint aStart, wxPoint aEnd, int aWidth ) +{ + // We calculate the min dist between the segment and each outline segment + // However, if the segment to test is inside the outline, and does not cross + // any edge, it can be seen outside the polygon. + // Therefore test if a segment end is inside ( testing only one end is enough ) + if( TestPointInside( aStart.x, aStart.y ) ) + return 0; + + int distance = INT_MAX; + int polycount = GetNumContours(); + + for( int icont = 0; icont < polycount; icont++ ) + { + int ic_start = GetContourStart( icont ); + int ic_end = GetContourEnd( icont ); + + // now test spacing between area outline and segment + for( int ic2 = ic_start; ic2 <= ic_end; ic2++ ) + { + int bx1 = GetX( ic2 ); + int by1 = GetY( ic2 ); + int bx2, by2; + + if( ic2 == ic_end ) + { + bx2 = GetX( ic_start ); + by2 = GetY( ic_start ); + } + else + { + bx2 = GetX( ic2 + 1 ); + by2 = GetY( ic2 + 1 ); + } + + int bstyle = GetSideStyle( ic2 ); + int d = GetClearanceBetweenSegments( bx1, by1, bx2, by2, bstyle, 0, + aStart.x, aStart.y, aEnd.x, aEnd.y, + CPolyLine::STRAIGHT, aWidth, + 1, // min clearance, should be > 0 + NULL, NULL ); + if( distance > d ) + distance = d; + if( distance <= 0 ) + return 0; + } + } + + return distance; +} + +/* + * Function Distance + * Calculates the distance between a point and polygon (with holes): + * param aPoint is the coordinate of the point. + * return distance between the point and outline. + * 0 if the point is inside + */ +int CPolyLine::Distance( const wxPoint& aPoint ) +{ + // We calculate the dist between the point and each outline segment + // If the point is inside the outline, the dist is 0. + if( TestPointInside( aPoint.x, aPoint.y ) ) + return 0; + + int distance = INT_MAX; + int polycount = GetNumContours(); + + for( int icont = 0; icont < polycount; icont++ ) + { + int ic_start = GetContourStart( icont ); + int ic_end = GetContourEnd( icont ); + + // now test spacing between area outline and segment + for( int ic2 = ic_start; ic2 <= ic_end; ic2++ ) + { + int bx1 = GetX( ic2 ); + int by1 = GetY( ic2 ); + int bx2, by2; + + if( ic2 == ic_end ) + { + bx2 = GetX( ic_start ); + by2 = GetY( ic_start ); + } + else + { + bx2 = GetX( ic2 + 1 ); + by2 = GetY( ic2 + 1 ); + } + + // Here we expect only straight lines for vertices + // (no arcs, not yet supported in Pcbnew) + int d = KiROUND( GetPointToLineSegmentDistance( aPoint.x, aPoint.y, + bx1, by1, bx2, by2 ) ); + + + if( distance > d ) + distance = d; + if( distance <= 0 ) + return 0; + } + } + + return distance; +} diff --git a/polygon/PolyLine.h b/polygon/PolyLine.h index 2a6ac81220..a27478dae4 100644 --- a/polygon/PolyLine.h +++ b/polygon/PolyLine.h @@ -49,25 +49,22 @@ public: int left, right, top, bottom; }; - -class CPoint -{ -public: - int x, y; -public: - CPoint( void ) { x = y = 0; }; - CPoint( int i, int j ) { x = i; y = j; }; -}; - - class CSegment { public: - int xi, yi, xf, yf; + wxPoint m_Start; + wxPoint m_End; + CSegment() { }; + CSegment( const wxPoint & aStart, const wxPoint & aEnd ) + { + m_Start = aStart; + m_End = aEnd; + } CSegment( int x0, int y0, int x1, int y1 ) { - xi = x0; yi = y0; xf = x1; yf = y1; + m_Start.x = x0; m_Start.y = y0; + m_End.x = x1; m_End.y = y1; } }; @@ -282,6 +279,25 @@ public: void AppendBezier(int x1, int y1, int x2, int y2, int x3, int y3); void AppendBezier(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4); + /** + * Function Distance + * Calculates the distance between a point and the zone: + * @param aPoint the coordinate of the point. + * @return int = distance between the point and outline. + * 0 if the point is inside + */ + int Distance( const wxPoint& aPoint ); + + /** + * Function Distance + * Calculates the distance between a segment and the zone: + * @param aStart the starting point of the segment. + * @param aEnd the ending point of the segment. + * @param aWidth the width of the segment. + * @return int = distance between the segment and outline. + * 0 if segment intersects or is inside + */ + int Distance( wxPoint aStart, wxPoint aEnd, int aWidth ); private: int m_layer; // layer to draw on From f20bf0d2170876f630e8ccb0e4c0f5dd997eb49c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 14 Jul 2012 18:27:25 +0200 Subject: [PATCH 24/25] Pcbnew: more about keepout areas: remove keepout for pads option and add keepout for copper zones option. Export keepout to Specctra DSN file. --- common/pcb.keywords | 1 + pcbnew/class_zone.cpp | 10 +-- pcbnew/class_zone.h | 6 +- pcbnew/class_zone_settings.cpp | 6 +- pcbnew/class_zone_settings.h | 6 +- .../dialog_keepout_area_properties.cpp | 6 +- .../dialog_keepout_area_properties_base.cpp | 4 +- .../dialog_keepout_area_properties_base.fbp | 4 +- .../dialog_keepout_area_properties_base.h | 2 +- pcbnew/kicad_plugin.cpp | 4 +- pcbnew/legacy_plugin.cpp | 8 +- pcbnew/pcb_parser.cpp | 6 +- pcbnew/specctra_export.cpp | 81 ++++++++++++++++++- ...nvert_brd_items_to_polygons_with_Boost.cpp | 16 ++-- pcbnew/zones_functions_for_undo_redo.cpp | 24 +++--- 15 files changed, 133 insertions(+), 51 deletions(-) diff --git a/common/pcb.keywords b/common/pcb.keywords index 90767b1437..aa5892082f 100644 --- a/common/pcb.keywords +++ b/common/pcb.keywords @@ -49,6 +49,7 @@ comment company connect connect_pads +copperpour crossbar date descr diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index bebae50f0e..d67142aaa8 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -58,10 +58,10 @@ ZONE_CONTAINER::ZONE_CONTAINER( BOARD* aBoard ) : m_priority = 0; m_smoothedPoly = NULL; m_cornerSmoothingType = ZONE_SETTINGS::SMOOTHING_NONE; - m_isKeepout = false; - m_doNotAllowPads = true; // has meaning only if m_isKeepout == true - m_doNotAllowVias = true; // has meaning only if m_isKeepout == true - m_doNotAllowTracks = true; // has meaning only if m_isKeepout == true + SetIsKeepout( false ); + SetDoNotAllowCopperPour( false ); // has meaning only if m_isKeepout == true + SetDoNotAllowVias( true ); // has meaning only if m_isKeepout == true + SetDoNotAllowTracks( true ); // has meaning only if m_isKeepout == true m_cornerRadius = 0; utility = 0; // flags used in polygon calculations utility2 = 0; // flags used in polygon calculations @@ -92,7 +92,7 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) : m_FillSegmList = aZone.m_FillSegmList; m_isKeepout = aZone.m_isKeepout; - m_doNotAllowPads = aZone.m_doNotAllowPads; + m_doNotAllowCopperPour = aZone.m_doNotAllowCopperPour; m_doNotAllowVias = aZone.m_doNotAllowVias; m_doNotAllowTracks = aZone.m_doNotAllowTracks; diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index c3b715ae45..e6e33cc06b 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -539,12 +539,12 @@ public: * Accessors to parameters used in Keepout zones: */ bool GetIsKeepout() const { return m_isKeepout; } - bool GetDoNotAllowPads() const { return m_doNotAllowPads; } + bool GetDoNotAllowCopperPour() const { return m_doNotAllowCopperPour; } bool GetDoNotAllowVias() const { return m_doNotAllowVias; } bool GetDoNotAllowTracks() const { return m_doNotAllowTracks; } void SetIsKeepout( bool aEnable ) { m_isKeepout = aEnable; } - void SetDoNotAllowPads( bool aEnable ) { m_doNotAllowPads = aEnable; } + void SetDoNotAllowCopperPour( bool aEnable ) { m_doNotAllowCopperPour = aEnable; } void SetDoNotAllowVias( bool aEnable ) { m_doNotAllowVias = aEnable; } void SetDoNotAllowTracks( bool aEnable ) { m_doNotAllowTracks = aEnable; } @@ -605,7 +605,7 @@ private: /* For keepout zones only: * what is not allowed inside the keepout ( pads, tracks and vias ) */ - bool m_doNotAllowPads; + bool m_doNotAllowCopperPour; bool m_doNotAllowVias; bool m_doNotAllowTracks; diff --git a/pcbnew/class_zone_settings.cpp b/pcbnew/class_zone_settings.cpp index b4ff1340fd..750f6b48c4 100644 --- a/pcbnew/class_zone_settings.cpp +++ b/pcbnew/class_zone_settings.cpp @@ -64,7 +64,7 @@ ZONE_SETTINGS::ZONE_SETTINGS() m_cornerRadius = 0; SetIsKeepout( false ); - SetDoNotAllowPads( false ); + SetDoNotAllowCopperPour( false ); SetDoNotAllowVias( true ); SetDoNotAllowTracks( true ); } @@ -86,7 +86,7 @@ ZONE_SETTINGS& ZONE_SETTINGS::operator << ( const ZONE_CONTAINER& aSource ) m_cornerSmoothingType = aSource.GetCornerSmoothingType(); m_cornerRadius = aSource.GetCornerRadius(); m_isKeepout = aSource.GetIsKeepout(); - m_keepoutDoNotAllowPads = aSource.GetDoNotAllowPads(); + m_keepoutDoNotAllowCopperPour = aSource.GetDoNotAllowCopperPour(); m_keepoutDoNotAllowVias = aSource.GetDoNotAllowVias(); m_keepoutDoNotAllowTracks = aSource.GetDoNotAllowTracks(); @@ -107,7 +107,7 @@ void ZONE_SETTINGS::ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport ) c aTarget.SetCornerSmoothingType( m_cornerSmoothingType ); aTarget.SetCornerRadius( m_cornerRadius ); aTarget.SetIsKeepout( GetIsKeepout() ); - aTarget.SetDoNotAllowPads( GetDoNotAllowPads() ); + aTarget.SetDoNotAllowCopperPour( GetDoNotAllowCopperPour() ); aTarget.SetDoNotAllowVias( GetDoNotAllowVias() ); aTarget.SetDoNotAllowTracks( GetDoNotAllowTracks() ); diff --git a/pcbnew/class_zone_settings.h b/pcbnew/class_zone_settings.h index 6808885a9f..b26db0c7b8 100644 --- a/pcbnew/class_zone_settings.h +++ b/pcbnew/class_zone_settings.h @@ -65,7 +65,7 @@ private: /* For keepout zones only: * what is not allowed inside the keepout ( pads, tracks and vias ) */ - bool m_keepoutDoNotAllowPads; + bool m_keepoutDoNotAllowCopperPour; bool m_keepoutDoNotAllowVias; bool m_keepoutDoNotAllowTracks; @@ -115,12 +115,12 @@ public: * Accessors to parameters used in Keepout zones: */ const bool GetIsKeepout() const { return m_isKeepout; } - const bool GetDoNotAllowPads() const { return m_keepoutDoNotAllowPads; } + const bool GetDoNotAllowCopperPour() const { return m_keepoutDoNotAllowCopperPour; } const bool GetDoNotAllowVias() const { return m_keepoutDoNotAllowVias; } const bool GetDoNotAllowTracks() const { return m_keepoutDoNotAllowTracks; } void SetIsKeepout( bool aEnable ) { m_isKeepout = aEnable; } - void SetDoNotAllowPads( bool aEnable ) { m_keepoutDoNotAllowPads = aEnable; } + void SetDoNotAllowCopperPour( bool aEnable ) { m_keepoutDoNotAllowCopperPour = aEnable; } void SetDoNotAllowVias( bool aEnable ) { m_keepoutDoNotAllowVias = aEnable; } void SetDoNotAllowTracks( bool aEnable ) { m_keepoutDoNotAllowTracks = aEnable; } }; diff --git a/pcbnew/dialogs/dialog_keepout_area_properties.cpp b/pcbnew/dialogs/dialog_keepout_area_properties.cpp index 8a04849cdc..7963f6d29b 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties.cpp +++ b/pcbnew/dialogs/dialog_keepout_area_properties.cpp @@ -175,7 +175,7 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog() // Init keepout parameters: m_cbTracksCtrl->SetValue( m_zonesettings.GetDoNotAllowTracks() ); m_cbViasCtrl->SetValue( m_zonesettings.GetDoNotAllowVias() ); - m_cbPadsCtrl->SetValue( m_zonesettings.GetDoNotAllowPads() ); + m_cbCopperPourCtrl->SetValue( m_zonesettings.GetDoNotAllowCopperPour() ); } void DIALOG_KEEPOUT_AREA_PROPERTIES::OnCancelClick( wxCommandEvent& event ) @@ -208,12 +208,12 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut() m_zonesettings.SetIsKeepout( true ); m_zonesettings.SetDoNotAllowTracks( m_cbTracksCtrl->GetValue() ); m_zonesettings.SetDoNotAllowVias( m_cbViasCtrl->GetValue() ); - m_zonesettings.SetDoNotAllowPads( m_cbPadsCtrl->GetValue() ); + m_zonesettings.SetDoNotAllowCopperPour( m_cbCopperPourCtrl->GetValue() ); // Test for not allowed items: should have at least one item not allowed: if( ! m_zonesettings.GetDoNotAllowTracks() && ! m_zonesettings.GetDoNotAllowVias() && - ! m_zonesettings.GetDoNotAllowPads() ) + ! m_zonesettings.GetDoNotAllowCopperPour() ) { DisplayError( NULL, _("Tracks, vias and pads are allowed. The keepout is useless" ) ); diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp b/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp index 01340b0856..507de0d24e 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp +++ b/pcbnew/dialogs/dialog_keepout_area_properties_base.cpp @@ -67,8 +67,8 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind m_cbViasCtrl = new wxCheckBox( this, wxID_ANY, _("No Vias"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizerCutoutOpts->Add( m_cbViasCtrl, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - m_cbPadsCtrl = new wxCheckBox( this, wxID_ANY, _("No Pads"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerCutoutOpts->Add( m_cbPadsCtrl, 0, wxALL|wxEXPAND, 5 ); + m_cbCopperPourCtrl = new wxCheckBox( this, wxID_ANY, _("No Copper Pour"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizerCutoutOpts->Add( m_cbCopperPourCtrl, 0, wxALL|wxEXPAND, 5 ); bSizerRight->Add( sbSizerCutoutOpts, 0, wxEXPAND|wxALL, 5 ); diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp b/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp index 93aefed21e..d3b2aa9699 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp +++ b/pcbnew/dialogs/dialog_keepout_area_properties_base.fbp @@ -723,7 +723,7 @@ 0 0 wxID_ANY - No Pads + No Copper Pour 0 @@ -731,7 +731,7 @@ 0 1 - m_cbPadsCtrl + m_cbCopperPourCtrl 1 diff --git a/pcbnew/dialogs/dialog_keepout_area_properties_base.h b/pcbnew/dialogs/dialog_keepout_area_properties_base.h index ac1aa7c18e..bd16619914 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties_base.h +++ b/pcbnew/dialogs/dialog_keepout_area_properties_base.h @@ -49,7 +49,7 @@ class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM wxRadioBox* m_OutlineAppearanceCtrl; wxCheckBox* m_cbTracksCtrl; wxCheckBox* m_cbViasCtrl; - wxCheckBox* m_cbPadsCtrl; + wxCheckBox* m_cbCopperPourCtrl; wxStaticLine* m_staticline1; wxStdDialogButtonSizer* m_sdbSizerButtons; wxButton* m_sdbSizerButtonsOK; diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index cd8ec788da..9387c24cc3 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1011,10 +1011,10 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, int aNestLevel ) const if( aZone->GetIsKeepout() ) { - m_out->Print( aNestLevel+1, "(keepout (tracks %s) (vias %s) (pads %s))\n", + m_out->Print( aNestLevel+1, "(keepout (tracks %s) (vias %s) (copperpour %s))\n", aZone->GetDoNotAllowTracks() ? "not_allowed" : "allowed", aZone->GetDoNotAllowVias() ? "not_allowed" : "allowed", - aZone->GetDoNotAllowPads() ? "not_allowed" : "allowed" ); + aZone->GetDoNotAllowCopperPour() ? "not_allowed" : "allowed" ); } m_out->Print( aNestLevel+1, "(fill" ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 1407a0fbf2..028b2f9248 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2223,10 +2223,10 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() data = strtok( NULL, delims ); zc->SetDoNotAllowVias( data && *data == 'N' ); } - else if( !strcmp( data, "pads" ) ) + else if( !strcmp( data, "copperpour" ) ) { data = strtok( NULL, delims ); - zc->SetDoNotAllowPads( data && *data == 'N' ); + zc->SetDoNotAllowCopperPour( data && *data == 'N' ); } data = strtok( NULL, delims ); @@ -3596,10 +3596,10 @@ void LEGACY_PLUGIN::saveZONE_CONTAINER( const ZONE_CONTAINER* me ) const if( me->GetIsKeepout() ) { - fprintf( m_fp, "ZKeepout tracks %c vias %c pads %c\n", + fprintf( m_fp, "ZKeepout tracks %c vias %c copperpour %c\n", me->GetDoNotAllowTracks() ? 'N' : 'Y', me->GetDoNotAllowVias() ? 'N' : 'Y', - me->GetDoNotAllowPads() ? 'N' : 'Y' ); + me->GetDoNotAllowCopperPour() ? 'N' : 'Y' ); } fprintf( m_fp, "ZSmoothing %d %s\n", diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index c438041333..babb050af0 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2490,16 +2490,16 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) zone->SetDoNotAllowVias( token == T_not_allowed ); break; - case T_pads: + case T_copperpour: token = NextTok(); if( token != T_allowed && token != T_not_allowed ) Expecting( "allowed or not_allowed" ); - zone->SetDoNotAllowPads( token == T_not_allowed ); + zone->SetDoNotAllowCopperPour( token == T_not_allowed ); break; default: - Expecting( "tracks, vias or pads" ); + Expecting( "tracks, vias or copperpour" ); } NeedRIGHT(); diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index d00185fbd0..be1a66e462 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -1135,7 +1135,8 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) } - //------------------------------------- + //------------------------------------- + // Note: only zones are output here, keepout areas be be created later { int netlessZones = 0; @@ -1146,6 +1147,9 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) { ZONE_CONTAINER* item = (ZONE_CONTAINER*) items[i]; + if( item->GetIsKeepout() ) + continue; + COPPER_PLANE* plane = new COPPER_PLANE( pcb->structure ); pcb->structure->planes.push_back( plane ); @@ -1214,7 +1218,80 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) } } - // keepouts could go here, there are none in Kicad at this time. + //------------------------------------- + { + static const KICAD_T scanZONEs[] = { PCB_ZONE_AREA_T, EOT }; + items.Collect( aBoard, scanZONEs ); + + for( int i=0; iGetIsKeepout() ) + continue; + + // keepout areas have a type. types are + // T_place_keepout, T_via_keepout, T_wire_keepout, + // T_bend_keepout, T_elongate_keepout, T_keepout. + // Pcbnew knows only T_keepout, T_via_keepout and T_wire_keepout + DSN_T keepout_type; + + if( item->GetDoNotAllowVias() && item->GetDoNotAllowTracks() ) + keepout_type = T_keepout; + else if( item->GetDoNotAllowVias() ) + keepout_type = T_via_keepout; + else if( item->GetDoNotAllowTracks() ) + keepout_type = T_wire_keepout; + else + keepout_type = T_keepout; + + KEEPOUT* keepout = new KEEPOUT( pcb->structure, keepout_type ); + pcb->structure->keepouts.push_back( keepout ); + + PATH* mainPolygon = new PATH( keepout, T_polygon ); + keepout->SetShape( mainPolygon ); + + mainPolygon->layer_id = layerIds[ kicadLayer2pcb[ item->GetLayer() ] ]; + + int count = item->m_Poly->corner.size(); + int ndx = 0; // used in 2 for() loops below + for( ; ndxm_Poly->corner[ndx].x, + item->m_Poly->corner[ndx].y ); + mainPolygon->AppendPoint( mapPt(point) ); + + // this was the end of the main polygon + if( item->m_Poly->corner[ndx].end_contour ) + break; + } + + WINDOW* window = 0; + PATH* cutout = 0; + + // handle the cutouts + for( ++ndx; ndxm_Poly->corner[ndx-1].end_contour ) + { + window = new WINDOW( keepout ); + keepout->AddWindow( window ); + + cutout = new PATH( window, T_polygon ); + window->SetShape( cutout ); + + cutout->layer_id = layerIds[ kicadLayer2pcb[ item->GetLayer() ] ]; + } + + wxASSERT( window ); + wxASSERT( cutout ); + + wxPoint point(item->m_Poly->corner[ndx].x, + item->m_Poly->corner[ndx].y ); + cutout->AppendPoint( mapPt(point) ); + } + } + } //---------------------------- { diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp index 282234a7a2..487ce0110d 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp @@ -353,20 +353,20 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) } } - // Add zones outlines having an higher priority + // Add zones outlines having an higher priority and keepout for( int ii = 0; ii < GetBoard()->GetAreaCount(); ii++ ) { ZONE_CONTAINER* zone = GetBoard()->GetArea( ii ); if( zone->GetLayer() != GetLayer() ) continue; - if( zone->GetIsKeepout() ) + if( !zone->GetIsKeepout() && zone->GetPriority() <= GetPriority() ) continue; - if( zone->GetPriority() <= GetPriority() ) + if( zone->GetIsKeepout() && ! zone->GetDoNotAllowCopperPour() ) continue; - // A highter priority zone is found: remove its area + // A highter priority zone or keepout area is found: remove its area item_boundingbox = zone->GetBoundingBox(); if( !item_boundingbox.Intersects( zone_boundingbox ) ) continue; @@ -377,13 +377,17 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) // the zone will be connected to the current zone, but filled areas // will use different parameters (clearance, thermal shapes ) bool addclearance = GetNet() != zone->GetNet(); + int clearance = zone_clearance; if( zone->GetIsKeepout() ) - addclearance = false; + { + addclearance = true; + clearance = m_ZoneMinThickness / 2; + } zone->TransformShapeWithClearanceToPolygon( cornerBufferPolysToSubstract, - zone_clearance, s_CircleToSegmentsCount, + clearance, s_CircleToSegmentsCount, s_Correction, addclearance ); } diff --git a/pcbnew/zones_functions_for_undo_redo.cpp b/pcbnew/zones_functions_for_undo_redo.cpp index 6d546d7874..d3971a44fd 100644 --- a/pcbnew/zones_functions_for_undo_redo.cpp +++ b/pcbnew/zones_functions_for_undo_redo.cpp @@ -5,7 +5,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Jean-Pierre Charras + * Copyright (C) 2009 Jean-Pierre Charras * Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or @@ -70,16 +70,16 @@ bool ZONE_CONTAINER::IsSame( const ZONE_CONTAINER& aZoneToCompare ) if( m_Netname != aZoneToCompare.m_Netname ) return false; - if( GetPriority() != aZoneToCompare.GetPriority() ) + if( GetPriority() != aZoneToCompare.GetPriority() ) return false; // Compare zone specific parameters - if( GetIsKeepout() != aZoneToCompare.GetIsKeepout() ) + if( GetIsKeepout() != aZoneToCompare.GetIsKeepout() ) return false; - if( GetIsKeepout() ) + if( GetIsKeepout() ) { - if( GetDoNotAllowPads() != aZoneToCompare.GetDoNotAllowPads() ) + if( GetDoNotAllowCopperPour() != aZoneToCompare.GetDoNotAllowCopperPour() ) return false; if( GetDoNotAllowVias() != aZoneToCompare.GetDoNotAllowVias() ) @@ -89,25 +89,25 @@ bool ZONE_CONTAINER::IsSame( const ZONE_CONTAINER& aZoneToCompare ) return false; } - if( m_ArcToSegmentsCount != aZoneToCompare.m_ArcToSegmentsCount ) + if( m_ArcToSegmentsCount != aZoneToCompare.m_ArcToSegmentsCount ) return false; - if( m_ZoneClearance != aZoneToCompare.m_ZoneClearance ) + if( m_ZoneClearance != aZoneToCompare.m_ZoneClearance ) return false; - if( m_ZoneMinThickness != aZoneToCompare.m_ZoneMinThickness ) + if( m_ZoneMinThickness != aZoneToCompare.m_ZoneMinThickness ) return false; - if( m_FillMode != aZoneToCompare.m_FillMode ) + if( m_FillMode != aZoneToCompare.m_FillMode ) return false; - if( m_PadConnection != aZoneToCompare.m_PadConnection ) + if( m_PadConnection != aZoneToCompare.m_PadConnection ) return false; - if( m_ThermalReliefGap != aZoneToCompare.m_ThermalReliefGap ) + if( m_ThermalReliefGap != aZoneToCompare.m_ThermalReliefGap ) return false; - if( m_ThermalReliefCopperBridge != aZoneToCompare.m_ThermalReliefCopperBridge ) + if( m_ThermalReliefCopperBridge != aZoneToCompare.m_ThermalReliefCopperBridge ) return false; From 5a6c088bd9311aaf5dc967f1cc6782ff94722b5c Mon Sep 17 00:00:00 2001 From: Marco Mattila Date: Sun, 15 Jul 2012 20:28:52 +0300 Subject: [PATCH 25/25] Use circular interpolation for circles and arcs in pcbnew gerber plots. --- common/common_plotGERBER_functions.cpp | 40 +++++++++++++++----------- include/plot_common.h | 2 ++ 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index 05a0202605..c1995d623b 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -274,27 +274,35 @@ void GERBER_PLOTTER::Rect( const wxPoint& p1, const wxPoint& p2, FILL_T fill, } -void GERBER_PLOTTER::Circle( const wxPoint& aCentre, int aDiameter, FILL_T aFill, - int aWidth ) +void GERBER_PLOTTER::Circle( const wxPoint& aCenter, int aDiameter, FILL_T aFill, + int aWidth ) +{ + Arc( aCenter, 0, 3600, aDiameter / 2, aFill, aWidth ); +} + + +void GERBER_PLOTTER::Arc( const wxPoint& aCenter, int aStAngle, int aEndAngle, + int aRadius, FILL_T aFill, int aWidth ) { wxASSERT( outputFile ); - wxPoint start, end; - double radius = aDiameter / 2; - const int delta = 3600 / 32; /* increment (in 0.1 degrees) to draw circles */ - - start.x = aCentre.x + KiROUND( radius ); - start.y = aCentre.y; + wxPoint start, end; + start.x = aCenter.x + KiROUND( aRadius*cos( DEG2RAD( aStAngle/10.0 ) ) ); + start.y = aCenter.y - KiROUND( aRadius*sin( DEG2RAD( aStAngle/10.0 ) ) ); SetCurrentLineWidth( aWidth ); MoveTo( start ); + end.x = aCenter.x + KiROUND( aRadius*cos( DEG2RAD( aEndAngle/10.0 ) ) ); + end.y = aCenter.y - KiROUND( aRadius*sin( DEG2RAD( aEndAngle/10.0 ) ) ); + DPOINT devEnd = userToDeviceCoordinates( end ); + DPOINT devCenter = userToDeviceCoordinates( aCenter - start ); + fprintf( outputFile, "G75*\n" ); // Multiquadrant mode - for( int ii = delta; ii < 3600; ii += delta ) - { - end.x = aCentre.x + (int) ( radius * cos( DEG2RAD( ii / 10.0 ) ) ); - end.y = aCentre.y + (int) ( radius * sin( DEG2RAD( ii / 10.0 ) ) ); - LineTo( end ); - } - - FinishTo( start ); + if( aStAngle < aEndAngle ) + fprintf( outputFile, "G03" ); + else + fprintf( outputFile, "G02" ); + fprintf( outputFile, "X%dY%dI%dJ%dD01*\n", int( devEnd.x ), int( devEnd.y ), + int( devCenter.x ), int( devCenter.y ) ); + fprintf( outputFile, "G74*\nG01*\n" ); // Back to single quadrant and linear interp. } diff --git a/include/plot_common.h b/include/plot_common.h index dd5ff393f3..662226a6a7 100644 --- a/include/plot_common.h +++ b/include/plot_common.h @@ -679,6 +679,8 @@ public: int width = -1 ); virtual void Circle( const wxPoint& pos, int diametre, FILL_T fill, int width = -1 ); + virtual void Arc( const wxPoint& aCenter, int aStAngle, int aEndAngle, int aRadius, + FILL_T aFill, int aWidth = -1 ); virtual void PlotPoly( const std::vector< wxPoint >& aCornerList, FILL_T aFill, int aWidth = -1);