From 1e2b145a2f99a7a9452fe5f39dbf25d454e4f4b7 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 19 Aug 2011 15:08:24 +0200 Subject: [PATCH] Pcbnew: Add NPTH pads (seen changelog). Minor fixes and enhancements. --- CHANGELOG.txt | 8 + eeschema/backanno.cpp | 14 +- eeschema/sch_screen.cpp | 21 +- include/wxBasePcbFrame.h | 17 +- kicad/tree_project_frame.cpp | 13 +- pcbnew/class_pad.cpp | 21 +- pcbnew/class_pad.h | 9 +- pcbnew/class_pad_draw_functions.cpp | 20 +- pcbnew/dialogs/dialog_gendrill.cpp | 89 +- pcbnew/dialogs/dialog_gendrill.h | 11 +- pcbnew/dialogs/dialog_gendrill_base.cpp | 16 +- pcbnew/dialogs/dialog_gendrill_base.fbp | 756 ++- pcbnew/dialogs/dialog_gendrill_base.h | 17 +- pcbnew/dialogs/dialog_netlist.cpp | 1 + pcbnew/dialogs/dialog_pad_properties.cpp | 96 +- pcbnew/dialogs/dialog_pad_properties_base.cpp | 128 +- pcbnew/dialogs/dialog_pad_properties_base.fbp | 4429 ++++++++++++++--- pcbnew/dialogs/dialog_pad_properties_base.h | 25 +- pcbnew/gen_drill_report_files.cpp | 57 +- .../gen_holes_and_tools_lists_for_drill.cpp | 98 +- pcbnew/gendrill.cpp | 162 +- pcbnew/gendrill.h | 34 +- pcbnew/netlist.cpp | 24 +- pcbnew/pcb_plot_params.cpp | 1 + pcbnew/pcb_plot_params.h | 2 + pcbnew/plot_rtn.cpp | 21 +- pcbnew/plotgerb.cpp | 6 + 27 files changed, 5073 insertions(+), 1023 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fa61dd14af..0bab2c5b21 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,14 @@ KiCad ChangeLog 2010 Please add newer entries at the top, list the date and your name with email address. +2011-Aug-19, UPDATE Jean-Pierre Charras +================================================================================ +Pcbnew: + Add support for not plated through holes (NPTH) pads + * These NPTH pads are used for mechanical purpose only, and cannot be connected to a net. + * When these pads have a same size and shape for the hole and the pad, the pad is not plotted + in GERBER files. + 2011-Apr-12, UPDATE Jerry Jacobs ================================================================================ Minor UI changes that affect OS X platform. diff --git a/eeschema/backanno.cpp b/eeschema/backanno.cpp index 8585ae6981..d71c649e6b 100644 --- a/eeschema/backanno.cpp +++ b/eeschema/backanno.cpp @@ -33,6 +33,8 @@ bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFile, bool aSetFieldAttributeToVis SCH_REFERENCE_LIST referencesList; SheetList.GetComponents( referencesList, false ); + // Now, foe each component found in file, + // replace footprint field value by the new value: while( GetLine( aFile, Line, &LineNum, sizeof(Line) ) ) { if( sscanf( Line, "comp = \"%s module = \"%s", Ref, FootPrint ) == 2 ) @@ -58,12 +60,20 @@ bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFile, bool aSetFieldAttributeToVis // So we do not stop the search here SCH_COMPONENT* component = referencesList[ii].GetComponent(); SCH_FIELD * fpfield = component->GetField( FOOTPRINT ); + /* Give a reasonable value to the field position and + * orientation, if the text is empty at position 0, because + * it is probably not yet initialized + */ if( fpfield->m_Text.IsEmpty() - && ( fpfield->m_Pos == wxPoint( 0, 0 ) ) ) + && ( fpfield->m_Pos == component->m_Pos ) ) { fpfield->m_Orient = component->GetField( VALUE )->m_Orient; fpfield->m_Pos = component->GetField( VALUE )->m_Pos; - fpfield->m_Pos.y -= 100; + fpfield->m_Size = component->GetField( VALUE )->m_Size; + if( fpfield->m_Orient == 0 ) + fpfield->m_Pos.y += 100; + else + fpfield->m_Pos.x += 100; } fpfield->m_Text = footprint; diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 1ab5bae529..e9248ad84d 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -1065,20 +1065,25 @@ bool SCH_SCREEN::SetComponentFootprint( SCH_SHEET_PATH* aSheetPath, const wxStri * orientation, if the text is empty at position 0, because * it is probably not yet initialized */ - if( component->GetField( FOOTPRINT )->m_Text.IsEmpty() - && ( component->GetField( FOOTPRINT )->m_Pos == wxPoint( 0, 0 ) ) ) + SCH_FIELD * fpfield = component->GetField( FOOTPRINT ); + if( fpfield->m_Text.IsEmpty() + && ( fpfield->m_Pos == component->m_Pos ) ) { - component->GetField( FOOTPRINT )->m_Orient = component->GetField( VALUE )->m_Orient; - component->GetField( FOOTPRINT )->m_Pos = component->GetField( VALUE )->m_Pos; - component->GetField( FOOTPRINT )->m_Pos.y -= 100; + fpfield->m_Orient = component->GetField( VALUE )->m_Orient; + fpfield->m_Pos = component->GetField( VALUE )->m_Pos; + fpfield->m_Size = component->GetField( VALUE )->m_Size; + if( fpfield->m_Orient == 0 ) + fpfield->m_Pos.y += 100; + else + fpfield->m_Pos.x += 100; } - component->GetField( FOOTPRINT )->m_Text = aFootPrint; + fpfield->m_Text = aFootPrint; if( aSetVisible ) - component->GetField( FOOTPRINT )->m_Attributs &= ~TEXT_NO_VISIBLE; + fpfield->m_Attributs &= ~TEXT_NO_VISIBLE; else - component->GetField( FOOTPRINT )->m_Attributs |= TEXT_NO_VISIBLE; + fpfield->m_Attributs |= TEXT_NO_VISIBLE; found = true; } diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index d4f40d4c85..4f8de5ad12 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -406,8 +406,23 @@ public: void Plot_Layer( PLOTTER* plotter, int Layer, GRTraceMode trace_mode ); + /** + * Function Plot_Standard_Layer + * plot copper or technical layers. + * not used for silk screen layers, because these layers have specific + * requirements, mainly for pads + * @param aPlotter = the plotter to use + * @param aLayerMask = the mask to define the layers to plot + * @param aPlotVia = true to plot vias, false to skip vias (has meaning + * only for solder mask layers). + * @param aPlotMode = the plot mode (files, sketch). Has meaning for some formats only + * @param aSkipNPTH_Pads = true to skip NPTH Pads, when the pad size and the pad hole + * have the same size. Used in GERBER format only. + */ void Plot_Standard_Layer( PLOTTER* aPlotter, int aLayerMask, - bool aPlotVia, GRTraceMode aPlotMode ); + bool aPlotVia, GRTraceMode aPlotMode, + bool aSkipNPTH_Pads = false ); + void Plot_Serigraphie( PLOTTER* plotter, int masque_layer, GRTraceMode trace_mode ); diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index 3d35085355..41397a9bad 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -42,18 +42,19 @@ const wxChar* s_AllowedExtensionsToList[] = wxT( "^[^$].*\\.brd$" ), wxT( "^.*\\.net$" ), wxT( "^.*\\.txt$" ), - wxT( "^.*\\.pho$" ), // Gerber file - wxT( "^.*\\.gbr$" ), // Gerber file - wxT( "^.*\\.gb[alops]$" ), // Gerber back (or bottom) layer file - wxT( "^.*\\.gt[alops]$" ), // Gerber front (or top) layer file - wxT( "^.*\\.g[0-9]{1,2}$" ), // Gerber inner layer file + wxT( "^.*\\.pho$" ), // Gerber file + wxT( "^.*\\.gbr$" ), // Gerber file + wxT( "^.*\\.gb[alops]$" ), // Gerber back (or bottom) layer file + wxT( "^.*\\.gt[alops]$" ), // Gerber front (or top) layer file + wxT( "^.*\\.g[0-9]{1,2}$" ), // Gerber inner layer file wxT( "^.*\\.odt$" ), wxT( "^.*\\.sxw$" ), wxT( "^.*\\.htm$" ), wxT( "^.*\\.html$" ), wxT( "^.*\\.rpt$" ), wxT( "^.*\\.csv$" ), - NULL // end of list + wxT( "^.*\\.drl$" ), // Excellon drill files + NULL // end of list }; diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index d674c60dc5..9e07b0f842 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -17,7 +17,7 @@ // Due to a bug in previous versions ( m_LengthDie not initialized in D_PAD ctor) // m_LengthDie is no more read from .brd files // Uncomment this next line to read m_LengthDie from .brd files -// #define READ_PAD_LENGTH_DIE +#define READ_PAD_LENGTH_DIE int D_PAD::m_PadSketchModePenSize = 0; // Pen size used to draw pads in sketch mode @@ -758,13 +758,19 @@ void D_PAD::DisplayInfo( EDA_DRAW_FRAME* frame ) else Line.Printf( wxT( "%3.1f" ), (float) m_Orient / 10 ); - frame->AppendMsgPanel( _( "Orient" ), Line, BLUE ); + frame->AppendMsgPanel( _( "Orient" ), Line, LIGHTBLUE ); valeur_param( m_Pos.x, Line ); - frame->AppendMsgPanel( _( "X Pos" ), Line, BLUE ); + frame->AppendMsgPanel( _( "X Pos" ), Line, LIGHTBLUE ); valeur_param( m_Pos.y, Line ); - frame->AppendMsgPanel( _( "Y pos" ), Line, BLUE ); + frame->AppendMsgPanel( _( "Y pos" ), Line, LIGHTBLUE ); + + if( m_LengthDie ) + { + valeur_param( m_LengthDie, Line ); + frame->AppendMsgPanel( _( "Length on die" ), Line, CYAN ); + } } @@ -900,15 +906,16 @@ wxString D_PAD::ShowPadAttr() const wxString D_PAD::GetSelectMenuText() const { wxString text; + BOARD * board = GetBoard(); text << _( "Pad" ) << wxT( " \"" ) << ReturnStringPadName() << wxT( "\" (" ); if ( (m_Masque_Layer & ALL_CU_LAYERS) == ALL_CU_LAYERS ) text << _("all copper layers"); - else if( (m_Masque_Layer & LAYER_BACK) == LAYER_BACK ) - text << GetLayerName(); + else if( (m_Masque_Layer & LAYER_BACK ) == LAYER_BACK ) + text << board->GetLayerName(LAYER_N_BACK); else if( (m_Masque_Layer & LAYER_FRONT) == LAYER_FRONT ) - text << GetLayerName(); + text << board->GetLayerName(LAYER_N_FRONT); else text << _( "???" ); diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 1b38d36185..e19c871953 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -27,7 +27,7 @@ class Pcb3D_GLCanvas; #define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT //PAD_HOLE_NOT_PLATED: -#define PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS LAYER_BACK | SILKSCREEN_LAYER_FRONT | \ +#define PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS ALL_CU_LAYERS | SILKSCREEN_LAYER_FRONT | \ SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT @@ -40,12 +40,14 @@ public: int m_Color; // color used to draw the pad shape , from pad layers and // visible layers int m_HoleColor; // color used to draw the pad hole + int m_NPHoleColor; // color used to draw a pad Not Plated hole int m_PadClearance; // clearance value, used to draw the pad area outlines wxSize m_Mask_margin; // margin, used to draw solder paste when only one layer is shown bool m_Display_padnum; // true to show pad number bool m_Display_netname; // true to show net name bool m_ShowPadFilled; // true to show pad as solid area, false to show pas in sketch mode bool m_ShowNCMark; // true to show pad not connected mark + bool m_ShowNotPlatedHole; // true when the pad hole in not plated, to draw a specifib pad shape bool m_IsPrinting; // true to print, false to display on screen. wxPoint m_Offset; // general draw offset @@ -103,13 +105,12 @@ public: // module anchor, orientation 0 int m_ShapeMaxRadius; // radius of the circle containing the pad shape - int m_Attribut; // NORMAL, PAD_SMD, PAD_CONN + int m_Attribut; // NORMAL, PAD_SMD, PAD_CONN, PAD_HOLE_NOT_PLATED int m_Orient; // in 1/10 degrees static int m_PadSketchModePenSize; // Pen size used to draw pads in sketch mode // (mode used to print pads on silkscreen layer) - // Length net from pad to die on chip - int m_LengthDie; + int m_LengthDie; // Length net from pad to die on chip // Local clearance. When null, the module default value is used. // when the module default value is null, the netclass value is used diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index 983bbb3b8e..bd1eaf1d70 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -32,11 +32,13 @@ PAD_DRAWINFO::PAD_DRAWINFO() m_DrawMode = 0; m_Color = BLACK; m_HoleColor = BLACK; // could be DARKGRAY; + m_NPHoleColor = YELLOW; m_PadClearance = 0; m_Display_padnum = true; m_Display_netname = true; m_ShowPadFilled = true; m_ShowNCMark = true; + m_ShowNotPlatedHole = false; m_IsPrinting = false; } @@ -320,6 +322,8 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoi if( ( m_Masque_Layer & ALL_CU_LAYERS ) == 0 ) DisplayIsol = FALSE; + if( m_Attribut == PAD_HOLE_NOT_PLATED ) + drawInfo.m_ShowNotPlatedHole = true; drawInfo.m_DrawMode = aDraw_mode; drawInfo.m_Color = color; @@ -344,7 +348,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoi drawInfo.m_Display_netname = false; // Display net names is restricted to pads that are on the active layer - // in cotranst mode displae + // in hight contrast mode display if( !IsOnLayer( screen->m_Active_Layer ) && DisplayOpt.ContrastModeDisplay ) drawInfo.m_Display_netname = false; @@ -453,7 +457,10 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) wxPoint holepos = m_Pos - aDrawInfo.m_Offset; int hole = m_Drill.x >> 1; - if( aDrawInfo.m_ShowPadFilled && hole ) + bool drawhole = hole > 0; + if( !aDrawInfo.m_ShowPadFilled && !aDrawInfo. m_ShowNotPlatedHole ) + drawhole = false; + if( drawhole ) { bool blackpenstate = false; if( aDrawInfo.m_IsPrinting ) @@ -468,13 +475,16 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) else GRSetDrawMode( aDC, GR_XOR ); + int hole_color = aDrawInfo.m_HoleColor; + if( aDrawInfo. m_ShowNotPlatedHole ) // Draw a specific hole color + hole_color = aDrawInfo.m_NPHoleColor; + switch( m_DrillShape ) { case PAD_CIRCLE: - if( aDC->LogicalToDeviceXRel( hole ) > 1 ) GRFilledCircle( aClipBox, aDC, holepos.x, holepos.y, hole, 0, - aDrawInfo.m_Color, aDrawInfo.m_HoleColor ); + aDrawInfo.m_Color, hole_color ); break; case PAD_OVAL: @@ -497,7 +507,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) GRFillCSegm( aClipBox, aDC, holepos.x + delta_cx, holepos.y + delta_cy, holepos.x - delta_cx, holepos.y - delta_cy, seg_width, - aDrawInfo.m_HoleColor ); + hole_color ); break; default: diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index 27d64b03a9..7dd631199d 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -1,6 +1,7 @@ /** - ** @file dialog_gendrill.cpp - */ +** @file dialog_gendrill.cpp +*/ + /* * This program source code file is part of KICAD, a free EDA CAD application. * @@ -43,16 +44,16 @@ #define UnitDrillInchKey wxT( "DrillUnit" ) #define DrillOriginIsAuxAxisKey wxT( "DrillAuxAxis" ) -// list of allowed precision for EXCELLON files, when interger format: +// list of allowed precision for EXCELLON files, for integer format: // Due to difference between inches and mm, // there are 2 set of reasonnable precision values, one for inches and one for metric static DRILL_PRECISION precisionListForInches[] = { - DRILL_PRECISION(2,3), DRILL_PRECISION(2,4) + DRILL_PRECISION( 2, 3 ), DRILL_PRECISION( 2, 4 ) }; static DRILL_PRECISION precisionListForMetric[] = { - DRILL_PRECISION(3,2), DRILL_PRECISION(3,3) + DRILL_PRECISION( 3, 2 ), DRILL_PRECISION( 3, 3 ) }; @@ -75,6 +76,8 @@ bool DIALOG_GENDRILL::m_MinimalHeader = false; bool DIALOG_GENDRILL::m_Mirror = true; bool DIALOG_GENDRILL::m_DrillOriginIsAuxAxis = false; int DIALOG_GENDRILL:: m_PrecisionFormat = 1; +bool DIALOG_GENDRILL::m_createRpt = false; +int DIALOG_GENDRILL::m_createMap = 0; /*! * DIALOG_GENDRILL destructor @@ -107,6 +110,7 @@ void DIALOG_GENDRILL::initDialog() InitDisplayParams(); } + /* some param values initialization before display dialog window */ void DIALOG_GENDRILL::InitDisplayParams( void ) @@ -119,7 +123,7 @@ void DIALOG_GENDRILL::InitDisplayParams( void ) if( m_ZerosFormat == EXCELLON_WRITER::DECIMAL_FORMAT ) m_Choice_Precision->Enable( false ); - UpdatePrecisionOptions( ); + UpdatePrecisionOptions(); m_Check_Minimal->SetValue( m_MinimalHeader ); @@ -128,6 +132,9 @@ void DIALOG_GENDRILL::InitDisplayParams( void ) m_Check_Mirror->SetValue( m_Mirror ); + m_Choice_Drill_Map->SetSelection( m_createMap ); + m_Choice_Drill_Report->SetSelection( m_createRpt ); + m_ViaDrillValue->SetLabel( _( "Use Netclasses values" ) ); m_MicroViaDrillValue->SetLabel( _( "Use Netclasses values" ) ); @@ -142,26 +149,28 @@ void DIALOG_GENDRILL::InitDisplayParams( void ) // See if we have some buried vias or/and microvias, and display // microvias drill value if so - m_ThroughViasCount = 0; - m_MicroViasCount = 0; - m_BlindOrBuriedViasCount = 0; + m_throughViasCount = 0; + m_microViasCount = 0; + m_blindOrBuriedViasCount = 0; for( TRACK* track = m_Parent->GetBoard()->m_Track; track != NULL; track = track->Next() ) { if( track->Type() != TYPE_VIA ) continue; if( track->Shape() == VIA_THROUGH ) - m_ThroughViasCount++; + m_throughViasCount++; else if( track->Shape() == VIA_MICROVIA ) - m_MicroViasCount++; + m_microViasCount++; else if( track->Shape() == VIA_BLIND_BURIED ) - m_BlindOrBuriedViasCount++; + m_blindOrBuriedViasCount++; } - m_MicroViaDrillValue->Enable( m_MicroViasCount ); + m_MicroViaDrillValue->Enable( m_microViasCount ); - // Pads holes round: - m_PadsHoleCount = 0; + /* Count plated pad holes and not plated pad holes: + */ + m_platedPadsHoleCount = 0; + m_notplatedPadsHoleCount = 0; for( MODULE* module = m_Parent->GetBoard()->m_Modules; module != NULL; module = module->Next() ) { @@ -170,31 +179,47 @@ void DIALOG_GENDRILL::InitDisplayParams( void ) if( pad->m_DrillShape == PAD_CIRCLE ) { if( pad->m_Drill.x != 0 ) - m_PadsHoleCount++; + { + if( pad->m_Attribut == PAD_HOLE_NOT_PLATED ) + m_notplatedPadsHoleCount++; + else + m_platedPadsHoleCount++; + } } else if( MIN( pad->m_Drill.x, pad->m_Drill.y ) != 0 ) - m_PadsHoleCount++; + { + if( pad->m_Attribut == PAD_HOLE_NOT_PLATED ) + m_notplatedPadsHoleCount++; + else + m_platedPadsHoleCount++; + } } } - msg = m_PadsCountInfoMsg->GetLabel(); - msg << wxT( " " ) << m_PadsHoleCount; - m_PadsCountInfoMsg->SetLabel( msg ); + // Display hole counts: + msg = m_PlatedPadsCountInfoMsg->GetLabel(); + msg << wxT( " " ) << m_platedPadsHoleCount; + m_PlatedPadsCountInfoMsg->SetLabel( msg ); + + msg = m_NotPlatedPadsCountInfoMsg->GetLabel(); + msg << wxT( " " ) << m_notplatedPadsHoleCount; + m_NotPlatedPadsCountInfoMsg->SetLabel( msg ); msg = m_ThroughViasInfoMsg->GetLabel(); - msg << wxT( " " ) << m_ThroughViasCount; + msg << wxT( " " ) << m_throughViasCount; m_ThroughViasInfoMsg->SetLabel( msg ); msg = m_MicroViasInfoMsg->GetLabel(); - msg << wxT( " " ) << m_MicroViasCount; + msg << wxT( " " ) << m_microViasCount; m_MicroViasInfoMsg->SetLabel( msg ); msg = m_BuriedViasInfoMsg->GetLabel(); - msg << wxT( " " ) << m_BlindOrBuriedViasCount; + msg << wxT( " " ) << m_blindOrBuriedViasCount; m_BuriedViasInfoMsg->SetLabel( msg ); } + /* Save drill options: */ void DIALOG_GENDRILL::UpdateConfig() { @@ -213,13 +238,14 @@ void DIALOG_GENDRILL::UpdateConfig() } } + /*! * wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX */ void DIALOG_GENDRILL::OnSelDrillUnitsSelected( wxCommandEvent& event ) { - UpdatePrecisionOptions( ); + UpdatePrecisionOptions(); } @@ -229,8 +255,8 @@ void DIALOG_GENDRILL::OnSelDrillUnitsSelected( wxCommandEvent& event ) void DIALOG_GENDRILL::OnOkClick( wxCommandEvent& event ) { - GenDrillAndReportFiles( ); - EndModal( wxID_OK); + GenDrillAndReportFiles(); + EndModal( wxID_OK ); } @@ -240,8 +266,8 @@ void DIALOG_GENDRILL::OnOkClick( wxCommandEvent& event ) void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event ) { - UpdateConfig(); /* Save drill options: */ - EndModal( wxID_CANCEL); // Process the default cancel event (close dialog) + UpdateConfig(); /* Save drill options: */ + EndModal( wxID_CANCEL ); // Process the default cancel event (close dialog) } @@ -251,11 +277,11 @@ void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event ) void DIALOG_GENDRILL::OnSelZerosFmtSelected( wxCommandEvent& event ) { - UpdatePrecisionOptions( ); + UpdatePrecisionOptions(); } -void DIALOG_GENDRILL::UpdatePrecisionOptions( ) +void DIALOG_GENDRILL::UpdatePrecisionOptions() { if( m_Choice_Unit->GetSelection()== 1 ) // Units = inches { @@ -281,6 +307,9 @@ void DIALOG_GENDRILL::SetParams( void ) wxString msg; long ltmp; + m_createMap = m_Choice_Drill_Map->GetSelection(); + m_createRpt = m_Choice_Drill_Report->GetSelection(); + m_UnitDrillIsInch = (m_Choice_Unit->GetSelection() == 0) ? FALSE : TRUE; m_MinimalHeader = m_Check_Minimal->IsChecked(); m_Mirror = m_Check_Mirror->IsChecked(); diff --git a/pcbnew/dialogs/dialog_gendrill.h b/pcbnew/dialogs/dialog_gendrill.h index b705037865..7d0b584c96 100644 --- a/pcbnew/dialogs/dialog_gendrill.h +++ b/pcbnew/dialogs/dialog_gendrill.h @@ -46,10 +46,13 @@ public: private: PCB_EDIT_FRAME* m_Parent; - int m_PadsHoleCount; - int m_ThroughViasCount; - int m_MicroViasCount; - int m_BlindOrBuriedViasCount; + int m_platedPadsHoleCount; + int m_notplatedPadsHoleCount; + int m_throughViasCount; + int m_microViasCount; + int m_blindOrBuriedViasCount; + static bool m_createRpt; // true to create a drill file report + static int m_createMap; // > 0 to create a map file report public: DIALOG_GENDRILL( PCB_EDIT_FRAME* parent ); ~DIALOG_GENDRILL(); diff --git a/pcbnew/dialogs/dialog_gendrill_base.cpp b/pcbnew/dialogs/dialog_gendrill_base.cpp index d1ef9b55ee..dbff8143b3 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.cpp +++ b/pcbnew/dialogs/dialog_gendrill_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Jun 30 2011) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -127,17 +127,21 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con wxStaticBoxSizer* sbSizerHoles; sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Holes Count:") ), wxVERTICAL ); - m_PadsCountInfoMsg = new wxStaticText( this, wxID_ANY, _("Pads:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadsCountInfoMsg->Wrap( -1 ); - sbSizerHoles->Add( m_PadsCountInfoMsg, 0, wxALL, 5 ); + m_PlatedPadsCountInfoMsg = new wxStaticText( this, wxID_ANY, _("Plated Pads:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PlatedPadsCountInfoMsg->Wrap( -1 ); + sbSizerHoles->Add( m_PlatedPadsCountInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_NotPlatedPadsCountInfoMsg = new wxStaticText( this, wxID_ANY, _("Not Plated Pads:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_NotPlatedPadsCountInfoMsg->Wrap( -1 ); + sbSizerHoles->Add( m_NotPlatedPadsCountInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_ThroughViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Through Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); m_ThroughViasInfoMsg->Wrap( -1 ); - sbSizerHoles->Add( m_ThroughViasInfoMsg, 0, wxALL, 5 ); + sbSizerHoles->Add( m_ThroughViasInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_MicroViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); m_MicroViasInfoMsg->Wrap( -1 ); - sbSizerHoles->Add( m_MicroViasInfoMsg, 0, wxALL, 5 ); + sbSizerHoles->Add( m_MicroViasInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_BuriedViasInfoMsg = new wxStaticText( this, wxID_ANY, _("Buried Vias:"), wxDefaultPosition, wxDefaultSize, 0 ); m_BuriedViasInfoMsg->Wrap( -1 ); diff --git a/pcbnew/dialogs/dialog_gendrill_base.fbp b/pcbnew/dialogs/dialog_gendrill_base.fbp index 7be5978631..68ef7d83ba 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.fbp +++ b/pcbnew/dialogs/dialog_gendrill_base.fbp @@ -7,6 +7,7 @@ 1 source_name 0 + res UTF-8 connect dialog_gendrill_base @@ -22,25 +23,57 @@ 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_GENDRILL_BASE + 1 + + + 1 + + Resizable + + 1 447,385 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Drill Files Generation + 0 wxFILTER_NONE @@ -51,6 +84,12 @@ + + + + + + @@ -98,26 +137,57 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 "Millimeters" "Inches" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Drill Units: + 1 + + 0 + + 0 + 1 m_Choice_Unit + 1 + + protected + 1 + + Resizable + 1 + 1 wxRA_SPECIFY_COLS + 0 wxFILTER_NONE @@ -157,26 +227,57 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 "Decimal format" "Suppress leading zeros" "Suppress trailing zeros" "Keep zeros" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Zeros Format + 1 + + 0 + + 0 + 1 m_Choice_Zeros_Format + 1 + + protected + 1 + + Resizable + 0 + 1 wxRA_SPECIFY_COLS + 0 Choose EXCELLON numbers notation wxFILTER_NONE @@ -216,26 +317,57 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 "2:3" "2:4" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Precision + 1 + + 0 + + 0 + 1 m_Choice_Precision + 1 + + protected + 1 + + Resizable + 1 + 1 wxRA_SPECIFY_COLS + 0 Choose EXCELLON numbers precision wxFILTER_NONE @@ -275,26 +407,57 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 "Absolute" "Auxiliary axis" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Drill Origin: + 1 + + 0 + + 0 + 1 m_Choice_Drill_Offset + 1 + + protected + 1 + + Resizable + 0 + 1 wxRA_SPECIFY_COLS + 0 Choose the coordinate origin: absolute or relative to the auxiliray axis wxFILTER_NONE @@ -345,26 +508,57 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 "None" "Drill map (HPGL)" "Drill map (PostScript)" "Drill map (Gerber)" "Drill map (DXF)" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Drill Sheet: + 1 + + 0 + + 0 + 1 m_Choice_Drill_Map + 1 + + protected + 1 + + Resizable + 0 + 1 wxRA_SPECIFY_COLS + 0 Creates a drill map in PS, HPGL or other formats wxFILTER_NONE @@ -404,26 +598,57 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 "None" "Drill report" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Drill Report: + 1 + + 0 + + 0 + 1 m_Choice_Drill_Report + 1 + + protected + 1 + + Resizable + 0 + 1 wxRA_SPECIFY_COLS + 0 Creates a plain text report wxFILTER_NONE @@ -475,23 +700,54 @@ wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Speed (cm/s) + + + 0 + + 0 + 1 m_staticText1 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -531,23 +787,54 @@ wxBOTTOM|wxRIGHT|wxLEFT|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_PenSpeed + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -591,23 +878,54 @@ wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Pen Number + + + 0 + + 0 + 1 m_staticText2 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -647,23 +965,54 @@ wxEXPAND|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_PenNum + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -721,24 +1070,55 @@ wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Mirror y axis + + + 0 + + 0 + 1 m_Check_Mirror + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -778,24 +1158,55 @@ wxTOP|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Minimal header + + + 0 + + 0 + 1 m_Check_Minimal + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -872,23 +1283,54 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Via Drill Value + + + 0 + + 0 + 1 m_ViaDrillValue + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -942,23 +1384,54 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Micro Via Drill Value + + + 0 + + 0 + 1 m_MicroViaDrillValue + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1009,26 +1482,57 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY - Pads: + Plated Pads: + + + 0 + + 0 - m_PadsCountInfoMsg + 1 + m_PlatedPadsCountInfoMsg + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1065,26 +1569,144 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 + 0 + wxID_ANY + Not Plated Pads: + + + 0 + + + 0 + + 1 + m_NotPlatedPadsCountInfoMsg + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 0 wxID_ANY Through Vias: + + + 0 + + 0 + 1 m_ThroughViasInfoMsg + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1121,26 +1743,57 @@ 5 - wxALL + wxTOP|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Micro Vias: + + + 0 + + 0 + 1 m_MicroViasInfoMsg + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1180,23 +1833,54 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Buried Vias: + + + 0 + + 0 + 1 m_BuriedViasInfoMsg + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1250,24 +1934,55 @@ wxALL|wxALIGN_CENTER_HORIZONTAL|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 @@ -1307,24 +2022,55 @@ wxALL|wxALIGN_CENTER_HORIZONTAL|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_CancelButton + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE diff --git a/pcbnew/dialogs/dialog_gendrill_base.h b/pcbnew/dialogs/dialog_gendrill_base.h index e15e2365d1..6fe8fcf446 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.h +++ b/pcbnew/dialogs/dialog_gendrill_base.h @@ -1,15 +1,16 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Jun 30 2011) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __dialog_gendrill_base__ -#define __dialog_gendrill_base__ +#ifndef __DIALOG_GENDRILL_BASE_H__ +#define __DIALOG_GENDRILL_BASE_H__ +#include +#include #include - #include #include #include @@ -51,11 +52,11 @@ class DIALOG_GENDRILL_BASE : public wxDialog wxStaticText* m_ViaDrillValue; wxStaticBoxSizer* m_MicroViasDrillSizer; wxStaticText* m_MicroViaDrillValue; - wxStaticText* m_PadsCountInfoMsg; + wxStaticText* m_PlatedPadsCountInfoMsg; + wxStaticText* m_NotPlatedPadsCountInfoMsg; wxStaticText* m_ThroughViasInfoMsg; wxStaticText* m_MicroViasInfoMsg; wxStaticText* m_BuriedViasInfoMsg; - wxButton* m_OkButton; wxButton* m_CancelButton; @@ -68,9 +69,9 @@ class DIALOG_GENDRILL_BASE : public wxDialog public: - DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Drill Files Generation"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 447,385 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Drill Files Generation"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 447,385 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_GENDRILL_BASE(); }; -#endif //__dialog_gendrill_base__ +#endif //__DIALOG_GENDRILL_BASE_H__ diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index ac9f1e6ade..0ed10dc067 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -26,6 +26,7 @@ void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC ) { fn = GetScreen()->GetFileName(); fn.SetExt( NetExtBuffer ); + lastNetlistName = fn.GetFullPath(); } DIALOG_NETLIST frame( this, DC, lastNetlistName ); diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index db124b71fc..d4be7d7597 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -79,7 +79,7 @@ private: void PadTypeSelected( wxCommandEvent& event ); void PadPropertiesAccept( wxCommandEvent& event ); void SetPadLayersList( long layer_mask ); - void OnSetLayer( wxCommandEvent& event ); + void OnSetLayers( wxCommandEvent& event ); void OnCancelButtonClick( wxCommandEvent& event ); void OnPaintShowPanel( wxPaintEvent& event ); bool TransfertDataToPad( D_PAD* aPad, bool aPromptOnError = false ); @@ -112,6 +112,8 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event ) drawInfo.m_Offset = m_dummyPad->m_Pos; drawInfo.m_Display_padnum = true; drawInfo.m_Display_netname = true; + if( m_dummyPad->m_Attribut == PAD_HOLE_NOT_PLATED ) + drawInfo.m_ShowNotPlatedHole = true; // Shows the local pad clearance drawInfo.m_PadClearance = m_dummyPad->m_LocalClearance; @@ -217,6 +219,7 @@ void DIALOG_PAD_PROPERTIES::initValues() m_PadShapeOffsetX_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_PadShapeOffsetY_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_PadShapeDelta_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); + m_PadLengthDie_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_NetClearanceUnits->SetLabel( GetUnitsLabel( g_UserUnit ) ); // Display current pad masks clearances units @@ -248,6 +251,8 @@ void DIALOG_PAD_PROPERTIES::initValues() m_radioBtnDeltaYdir->SetValue(true); } + PutValueInLocalUnits( *m_LengthDieCtrl, m_dummyPad->m_LengthDie, internalUnits ); + PutValueInLocalUnits( *m_NetClearanceValueCtrl, m_dummyPad->m_LocalClearance, internalUnits ); PutValueInLocalUnits( *m_SolderMaskMarginCtrl, m_dummyPad->m_LocalSolderMaskMargin, @@ -333,7 +338,7 @@ void DIALOG_PAD_PROPERTIES::initValues() msg.Printf( wxT( "%d" ), m_dummyPad->m_Orient ); m_PadOrientCtrl->SetValue( msg ); - // Selection du type + // Type of pad selection m_PadType->SetSelection( 0 ); for( int ii = 0; ii < NBTYPES; ii++ ) { @@ -344,14 +349,22 @@ void DIALOG_PAD_PROPERTIES::initValues() } } + // Enable/disable Pad name,and pad length die + // (disable for NPTH pads (mechanical pads) + bool enable = m_dummyPad->m_Attribut != PAD_HOLE_NOT_PLATED; + m_PadNumCtrl->Enable( enable ); + m_PadNetNameCtrl->Enable( enable ); + m_LengthDieCtrl->Enable( enable ); + if( m_dummyPad->m_DrillShape != PAD_OVAL ) m_DrillShapeCtrl->SetSelection( 0 ); else m_DrillShapeCtrl->SetSelection( 1 ); // Setup layers names from board - m_PadLayerCu->SetLabel( m_Board->GetLayerName( LAYER_N_BACK ) ); - m_PadLayerCmp->SetLabel( m_Board->GetLayerName( LAYER_N_FRONT ) ); + + m_rbCopperLayersSel->SetString( 0, m_Board->GetLayerName( LAYER_N_FRONT ) ); + m_rbCopperLayersSel->SetString( 1, m_Board->GetLayerName( LAYER_N_BACK ) ); m_PadLayerAdhCmp->SetLabel( m_Board->GetLayerName( ADHESIVE_N_FRONT ) ); m_PadLayerAdhCu->SetLabel( m_Board->GetLayerName( ADHESIVE_N_BACK ) ); @@ -500,6 +513,13 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event ) // Enable/disable drill dialog items: event.SetId( m_DrillShapeCtrl->GetSelection() ); OnDrillShapeSelected( event ); + + // Enable/disable Pad name,and pad length die + // (disable for NPTH pads (mechanical pads) + bool enable = ii != 3; + m_PadNumCtrl->Enable( enable ); + m_PadNetNameCtrl->Enable( enable ); + m_LengthDieCtrl->Enable( enable ); } @@ -512,8 +532,14 @@ void DIALOG_PAD_PROPERTIES::SetPadLayersList( long layer_mask ) * @param layer_mask = pad layer mask (ORed layers bit mask) */ { - m_PadLayerCu->SetValue( ( layer_mask & LAYER_BACK ) ); - m_PadLayerCmp->SetValue( ( layer_mask & LAYER_FRONT ) ); + if( ( layer_mask & ALL_CU_LAYERS ) == LAYER_FRONT ) + m_rbCopperLayersSel->SetSelection(0); + else if( ( layer_mask & ALL_CU_LAYERS ) == LAYER_BACK) + m_rbCopperLayersSel->SetSelection(1); + else if( ( layer_mask & ALL_CU_LAYERS ) != 0 ) + m_rbCopperLayersSel->SetSelection(2); + else + m_rbCopperLayersSel->SetSelection(3); m_PadLayerAdhCmp->SetValue( ( layer_mask & ADHESIVE_LAYER_FRONT ) ); m_PadLayerAdhCu->SetValue( ( layer_mask & ADHESIVE_LAYER_BACK ) ); @@ -535,7 +561,7 @@ void DIALOG_PAD_PROPERTIES::SetPadLayersList( long layer_mask ) // Called when select/deselect a layer. -void DIALOG_PAD_PROPERTIES::OnSetLayer( wxCommandEvent& event ) +void DIALOG_PAD_PROPERTIES::OnSetLayers( wxCommandEvent& event ) { TransfertDataToPad( m_dummyPad ); m_panelShowPad->Refresh(); @@ -592,6 +618,9 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) m_CurrentPad->m_DrillShape = g_Pad_Master.m_DrillShape; m_CurrentPad->m_Offset = g_Pad_Master.m_Offset; m_CurrentPad->m_Offset.y *= isign; + + m_CurrentPad->m_LengthDie = g_Pad_Master.m_LengthDie; + if( m_CurrentPad->m_Masque_Layer != g_Pad_Master.m_Masque_Layer ) { rastnestIsChanged = true; @@ -645,7 +674,9 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) m_Parent->GetBoard()->m_Status_Pcb = 0; } - +// Copy values from dialog to aPad parameters. +// If aPromptOnError is true, and an incorrect value is detected, +// user will be prompted for an error bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError ) { long PadLayerMask; @@ -704,6 +735,9 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError delta.y = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl, internalUnits ); aPad->m_DeltaSize = delta; + // Read pad lenght die + aPad->m_LengthDie = ReturnValueFromTextCtrl( *m_LengthDieCtrl, internalUnits ); + // Test bad values (be sure delta values are not to large) // remember DeltaSize.x is the Y size variation bool error = false; @@ -774,20 +808,37 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError break; case PAD_HOLE_NOT_PLATED: + // Mechanical purpose only: + // no offset, no net name, no pad name allowed + aPad->m_Offset = wxSize( 0, 0 ); + aPad->SetPadName( wxEmptyString ); + aPad->SetNetname( wxEmptyString ); break; default: - DisplayError( this, wxT( "Error: unknown pad type" ) ); + DisplayError( NULL, wxT( "Error: unknown pad type" ) ); break; } PadLayerMask = 0; - if( m_PadLayerCu->GetValue() ) - PadLayerMask |= LAYER_BACK; - if( m_PadLayerCmp->GetValue() ) - PadLayerMask |= LAYER_FRONT; - if( ( PadLayerMask & (LAYER_BACK | LAYER_FRONT) ) == (LAYER_BACK | LAYER_FRONT) ) - PadLayerMask |= ALL_CU_LAYERS; + switch( m_rbCopperLayersSel->GetSelection() ) + { + case 0: + PadLayerMask |= LAYER_FRONT; + break; + + case 1: + PadLayerMask |= LAYER_BACK; + break; + + case 2: + PadLayerMask |= ALL_CU_LAYERS; + break; + + case 3: // No copper layers + break; + } + if( m_PadLayerAdhCmp->GetValue() ) PadLayerMask |= ADHESIVE_LAYER_FRONT; if( m_PadLayerAdhCu->GetValue() ) @@ -819,7 +870,7 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError if( (aPad->m_Size.x < aPad->m_Drill.x) || (aPad->m_Size.y < aPad->m_Drill.y) ) { - DisplayError( this, _( "Incorrect value for pad drill: pad drill bigger than pad size" ) ); + DisplayError( NULL, _( "Incorrect value for pad drill: pad drill bigger than pad size" ) ); return false; } @@ -828,7 +879,14 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError { if( aPad->m_Drill.x || aPad->m_Drill.y ) { - DisplayError( this, _( "Error: pad is not on a copper layer and has a hole" ) ); + msg = _( "Error: pad is not on a copper layer and has a hole" ); + if( aPad->m_Attribut == PAD_HOLE_NOT_PLATED ) + { + msg += wxT("\n"); + msg += _( "For NPTH pad, set pad drill value to pad size value,\n\ +if you do not want this pad plotted in gerber files"); + } + DisplayError( NULL, msg ); return false; } } @@ -836,13 +894,13 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError if( ( aPad->m_Size.x / 2 <= ABS( aPad->m_Offset.x ) ) || ( aPad->m_Size.y / 2 <= ABS( aPad->m_Offset.y ) ) ) { - DisplayError( this, _( "Incorrect value for pad offset" ) ); + DisplayError( NULL, _( "Incorrect value for pad offset" ) ); return false; } if( error ) { - DisplayError( this, _( "Too large value for pad delta size" ) ); + DisplayError( NULL, _( "Too large value for pad delta size" ) ); return false; } } diff --git a/pcbnew/dialogs/dialog_pad_properties_base.cpp b/pcbnew/dialogs/dialog_pad_properties_base.cpp index 30d98348ad..aa4e8d956f 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.cpp +++ b/pcbnew/dialogs/dialog_pad_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Jun 30 2011) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -40,7 +40,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Geometry:") ), wxVERTICAL ); wxFlexGridSizer* fgSizerGeometry; - fgSizerGeometry = new wxFlexGridSizer( 12, 3, 0, 0 ); + fgSizerGeometry = new wxFlexGridSizer( 14, 3, 0, 0 ); fgSizerGeometry->SetFlexibleDirection( wxBOTH ); fgSizerGeometry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); @@ -75,7 +75,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); fgSizerGeometry->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 ); - m_textPadDrillX = new wxStaticText( this, wxID_ANY, _("Pad Drill X"), wxDefaultPosition, wxDefaultSize, 0 ); + m_textPadDrillX = new wxStaticText( this, wxID_ANY, _("Pad drill X"), wxDefaultPosition, wxDefaultSize, 0 ); m_textPadDrillX->Wrap( -1 ); fgSizerGeometry->Add( m_textPadDrillX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxALIGN_RIGHT, 5 ); @@ -86,7 +86,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_PadDrill_X_Unit->Wrap( -1 ); fgSizerGeometry->Add( m_PadDrill_X_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_textPadDrillY = new wxStaticText( this, wxID_ANY, _("Pad Drill Y"), wxDefaultPosition, wxDefaultSize, 0 ); + m_textPadDrillY = new wxStaticText( this, wxID_ANY, _("Pad drill Y"), wxDefaultPosition, wxDefaultSize, 0 ); m_textPadDrillY->Wrap( -1 ); fgSizerGeometry->Add( m_textPadDrillY, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); @@ -128,7 +128,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_PadShapeSizeY_Unit->Wrap( -1 ); fgSizerGeometry->Add( m_PadShapeSizeY_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText17 = new wxStaticText( this, wxID_ANY, _("Shape Offset X"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText17 = new wxStaticText( this, wxID_ANY, _("Shape offset X"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText17->Wrap( -1 ); fgSizerGeometry->Add( m_staticText17, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); @@ -139,7 +139,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_PadShapeOffsetX_Unit->Wrap( -1 ); fgSizerGeometry->Add( m_PadShapeOffsetX_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText19 = new wxStaticText( this, wxID_ANY, _("Shape Offset Y"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText19 = new wxStaticText( this, wxID_ANY, _("Shape offset Y"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText19->Wrap( -1 ); fgSizerGeometry->Add( m_staticText19, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); @@ -150,7 +150,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_PadShapeOffsetY_Unit->Wrap( -1 ); fgSizerGeometry->Add( m_PadShapeOffsetY_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText21 = new wxStaticText( this, wxID_ANY, _("Shape Delta Dim"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21 = new wxStaticText( this, wxID_ANY, _("Shape delta dim"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText21->Wrap( -1 ); fgSizerGeometry->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); @@ -161,7 +161,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_PadShapeDelta_Unit->Wrap( -1 ); fgSizerGeometry->Add( m_PadShapeDelta_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText23 = new wxStaticText( this, wxID_ANY, _("Trap. Direction"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText23 = new wxStaticText( this, wxID_ANY, _("Trap. direction"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText23->Wrap( -1 ); fgSizerGeometry->Add( m_staticText23, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); @@ -181,6 +181,28 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_staticTextDDirInfo->Wrap( -1 ); fgSizerGeometry->Add( m_staticTextDDirInfo, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerGeometry->Add( m_staticline10, 0, wxEXPAND | wxALL, 5 ); + + m_staticline101 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerGeometry->Add( m_staticline101, 0, wxEXPAND | wxALL, 5 ); + + m_staticline1011 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerGeometry->Add( m_staticline1011, 0, wxEXPAND | wxALL, 5 ); + + m_staticText38 = new wxStaticText( this, wxID_ANY, _("Length die"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText38->Wrap( -1 ); + m_staticText38->SetToolTip( _("Wire length from pad to die on chip ( used to calculate actual track length)") ); + + fgSizerGeometry->Add( m_staticText38, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); + + m_LengthDieCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerGeometry->Add( m_LengthDieCtrl, 0, wxALL, 5 ); + + m_PadLengthDie_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PadLengthDie_Unit->Wrap( -1 ); + fgSizerGeometry->Add( m_PadLengthDie_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + sbSizer2->Add( fgSizerGeometry, 1, wxEXPAND, 5 ); m_LeftBoxSizer->Add( sbSizer2, 1, wxEXPAND, 5 ); @@ -353,7 +375,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind wxBoxSizer* m_RightBoxSizer; m_RightBoxSizer = new wxBoxSizer( wxVERTICAL ); - wxString m_PadTypeChoices[] = { _("Standard"), _("SMD"), _("Conn") }; + wxString m_PadTypeChoices[] = { _("Standard"), _("SMD"), _("Conn"), _("NPTH, Mechanical") }; int m_PadTypeNChoices = sizeof( m_PadTypeChoices ) / sizeof( wxString ); m_PadType = new wxRadioBox( this, ID_LISTBOX_TYPE_PAD, _("Pad Type:"), wxDefaultPosition, wxDefaultSize, m_PadTypeNChoices, m_PadTypeChoices, 1, wxRA_SPECIFY_COLS ); m_PadType->SetSelection( 0 ); @@ -362,47 +384,49 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind wxStaticBoxSizer* m_LayersSizer; m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL ); - m_PadLayerCmp = new wxCheckBox( this, wxID_ANY, _("Component layer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + wxString m_rbCopperLayersSelChoices[] = { _("Front Layer"), _("Back Layer"), _("All Copper Layers"), _("No Copper Layers") }; + int m_rbCopperLayersSelNChoices = sizeof( m_rbCopperLayersSelChoices ) / sizeof( wxString ); + m_rbCopperLayersSel = new wxRadioBox( this, wxID_ANY, _("Copper Layers:"), wxDefaultPosition, wxDefaultSize, m_rbCopperLayersSelNChoices, m_rbCopperLayersSelChoices, 1, wxRA_SPECIFY_COLS ); + m_rbCopperLayersSel->SetSelection( 0 ); + m_LayersSizer->Add( m_rbCopperLayersSel, 0, wxALL, 5 ); - m_PadLayerCu = new wxCheckBox( this, wxID_ANY, _("Copper layer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerCu, 0, wxALL, 5 ); - - - m_LayersSizer->Add( 0, 8, 1, wxEXPAND, 5 ); + wxStaticBoxSizer* sbSizerTechlayers; + sbSizerTechlayers = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL ); m_PadLayerAdhCmp = new wxCheckBox( this, wxID_ANY, _("Adhesive Cmp"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerAdhCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + sbSizerTechlayers->Add( m_PadLayerAdhCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerAdhCu = new wxCheckBox( this, wxID_ANY, _("Adhesive Copper"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerAdhCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + sbSizerTechlayers->Add( m_PadLayerAdhCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerPateCmp = new wxCheckBox( this, wxID_ANY, _("Solder paste Cmp"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerPateCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + sbSizerTechlayers->Add( m_PadLayerPateCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerPateCu = new wxCheckBox( this, wxID_ANY, _("Solder paste Copper"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerPateCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + sbSizerTechlayers->Add( m_PadLayerPateCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerSilkCmp = new wxCheckBox( this, wxID_ANY, _("Silkscreen Cmp"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerSilkCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + sbSizerTechlayers->Add( m_PadLayerSilkCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerSilkCu = new wxCheckBox( this, wxID_ANY, _("Silkscreen Copper"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerSilkCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + sbSizerTechlayers->Add( m_PadLayerSilkCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerMaskCmp = new wxCheckBox( this, wxID_ANY, _("Solder mask Cmp"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerMaskCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + sbSizerTechlayers->Add( m_PadLayerMaskCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerMaskCu = new wxCheckBox( this, wxID_ANY, _("Solder mask Copper"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + sbSizerTechlayers->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerDraft = new wxCheckBox( this, wxID_ANY, _("Draft layer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerDraft, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + sbSizerTechlayers->Add( m_PadLayerDraft, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerECO1 = new wxCheckBox( this, wxID_ANY, _("E.C.O.1 layer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + sbSizerTechlayers->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLayerECO2 = new wxCheckBox( this, wxID_ANY, _("E.C.O.2 layer"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerECO2, 0, wxALL, 5 ); + sbSizerTechlayers->Add( m_PadLayerECO2, 0, wxALL, 5 ); + + m_LayersSizer->Add( sbSizerTechlayers, 1, wxEXPAND, 5 ); m_RightBoxSizer->Add( m_LayersSizer, 0, 0, 5 ); @@ -442,19 +466,18 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_panelShowPad->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this ); m_NetClearanceValueCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_PadType->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this ); - m_PadLayerCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerAdhCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerAdhCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerPateCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerPateCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerSilkCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerSilkCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerMaskCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerMaskCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerDraft->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerECO1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerECO2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); + m_rbCopperLayersSel->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerAdhCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerAdhCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerPateCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerPateCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerSilkCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerSilkCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerMaskCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerMaskCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerDraft->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerECO1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerECO2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this ); m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this ); } @@ -480,19 +503,18 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE() m_panelShowPad->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this ); m_NetClearanceValueCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_PadType->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this ); - m_PadLayerCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerAdhCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerAdhCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerPateCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerPateCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerSilkCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerSilkCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerMaskCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerMaskCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerDraft->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerECO1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); - m_PadLayerECO2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this ); + m_rbCopperLayersSel->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerAdhCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerAdhCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerPateCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerPateCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerSilkCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerSilkCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerMaskCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerMaskCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerDraft->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerECO1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_PadLayerECO2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_pad_properties_base.fbp b/pcbnew/dialogs/dialog_pad_properties_base.fbp index 4cf8586330..a36950414b 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.fbp +++ b/pcbnew/dialogs/dialog_pad_properties_base.fbp @@ -7,6 +7,7 @@ 1 source_name 0 + res UTF-8 connect dialog_pad_properties_base @@ -22,25 +23,57 @@ 1 0 + 1 + 1 + 1 + 1 + 0 + + + + 1 wxBOTH + 0 + 1 1 + 0 + Dock + 0 + Left 1 impl_virtual + 1 + 0 0 wxID_DIALOG_EDIT_PAD + + + 0 + + 0 + 1 DIALOG_PAD_PROPERTIES_BASE + 1 + + + 1 - 733,486 + + Resizable + + 1 + 733,535 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Pad Properties + 0 wxFILTER_NONE @@ -51,6 +84,12 @@ wxSUNKEN_BORDER + + + + + + @@ -107,23 +146,54 @@ wxTOP|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Pad Num : + + + 0 + + 0 + 1 m_PadNumText + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -163,23 +233,54 @@ wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_PADNUMCTRL + + + 0 0 + + 0 + 1 m_PadNumCtrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -223,23 +324,54 @@ wxTOP|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Pad Net Name : + + + 0 + + 0 + 1 m_PadNameText + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -279,23 +411,54 @@ wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_PADNETNAMECTRL + + + 0 0 + + 0 + 1 m_PadNetNameCtrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -360,30 +523,61 @@ fgSizerGeometry wxFLEX_GROWMODE_SPECIFIED none - 12 + 14 0 5 wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Pad pos X + + + 0 + + 0 + 1 m_staticText4 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -423,23 +617,54 @@ wxTOP|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_PadPosition_X_Ctrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -483,23 +708,54 @@ wxALIGN_CENTER_VERTICAL|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_PadPosX_Unit + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -539,23 +795,54 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Pad pos Y + + + 0 + + 0 + 1 m_staticText41 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -595,23 +882,54 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + + 0 0 + + 0 + 1 m_PadPosition_Y_Ctrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -655,23 +973,54 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Inch + + + 0 + + 0 + 1 m_PadPosY_Unit + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -711,22 +1060,53 @@ 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_staticline7 + 1 + + protected + 1 + + Resizable + + 1 wxLI_HORIZONTAL + 0 wxFILTER_NONE @@ -765,22 +1145,53 @@ 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_staticline8 + 1 + + protected + 1 + + Resizable + + 1 wxLI_HORIZONTAL + 0 wxFILTER_NONE @@ -819,22 +1230,53 @@ 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_staticline9 + 1 + + protected + 1 + + Resizable + + 1 wxLI_HORIZONTAL + 0 wxFILTER_NONE @@ -873,23 +1315,54 @@ wxALIGN_CENTER_VERTICAL|wxLEFT|wxALIGN_RIGHT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY - Pad Drill X + Pad drill X + + + 0 + + 0 + 1 m_textPadDrillX + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -929,23 +1402,54 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + + 0 0 + + 0 + 1 m_PadDrill_X_Ctrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -989,23 +1493,54 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Inch + + + 0 + + 0 + 1 m_PadDrill_X_Unit + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1045,23 +1580,54 @@ wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY - Pad Drill Y + Pad drill Y + + + 0 + + 0 + 1 m_textPadDrillY + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1101,23 +1667,54 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + + 0 0 + + 0 + 1 m_PadDrill_Y_Ctrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1161,23 +1758,54 @@ wxALIGN_CENTER_VERTICAL|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_PadDrill_Y_Unit + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1217,22 +1845,53 @@ 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_staticline4 + 1 + + protected + 1 + + Resizable + + 1 wxLI_HORIZONTAL + 0 wxFILTER_NONE @@ -1271,22 +1930,53 @@ 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_staticline5 + 1 + + protected + 1 + + Resizable + + 1 wxLI_HORIZONTAL + 0 wxFILTER_NONE @@ -1325,22 +2015,53 @@ 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_staticline6 + 1 + + protected + 1 + + Resizable + + 1 wxLI_HORIZONTAL + 0 wxFILTER_NONE @@ -1379,23 +2100,54 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Shape size X + + + 0 + + 0 + 1 m_staticText12 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1435,23 +2187,54 @@ wxTOP|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_ShapeSize_X_Ctrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1495,23 +2278,54 @@ wxALIGN_CENTER_VERTICAL|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_PadShapeSizeX_Unit + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1551,23 +2365,54 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Shape size Y + + + 0 + + 0 + 1 m_staticText15 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1607,23 +2452,54 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + + 0 0 + + 0 + 1 m_ShapeSize_Y_Ctrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1667,23 +2543,54 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Inch + + + 0 + + 0 + 1 m_PadShapeSizeY_Unit + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1723,23 +2630,54 @@ wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY - Shape Offset X + Shape offset X + + + 0 + + 0 + 1 m_staticText17 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1779,23 +2717,54 @@ wxTOP|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_ShapeOffset_X_Ctrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1839,23 +2808,54 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Inch + + + 0 + + 0 + 1 m_PadShapeOffsetX_Unit + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1895,23 +2895,54 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY - Shape Offset Y + Shape offset Y + + + 0 + + 0 + 1 m_staticText19 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1951,23 +2982,54 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + + 0 0 + + 0 + 1 m_ShapeOffset_Y_Ctrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2011,23 +3073,54 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Inch + + + 0 + + 0 + 1 m_PadShapeOffsetY_Unit + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2067,23 +3160,54 @@ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY - Shape Delta Dim + Shape delta dim + + + 0 + + 0 + 1 m_staticText21 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2123,23 +3247,54 @@ wxTOP|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_ShapeDelta_Ctrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2183,23 +3338,54 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Inch + + + 0 + + 0 + 1 m_PadShapeDelta_Unit + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2239,23 +3425,54 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY - Trap. Direction + Trap. direction + + + 0 + + 0 + 1 m_staticText23 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2304,23 +3521,54 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_DDIRX > + + + 0 + + 0 + 1 m_radioBtnDeltaXdir + 1 + + protected + 1 + + Resizable + + 1 wxRB_GROUP + 0 wxFILTER_NONE @@ -2361,23 +3609,54 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_DDIRY ^ + + + 0 + + 0 + 1 m_radioBtnDeltaYdir + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2420,23 +3699,574 @@ wxALIGN_CENTER_VERTICAL|wxRIGHT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Rot 0 + + + 0 + + 0 + 1 m_staticTextDDirInfo + 1 + + protected + 1 + + Resizable + + 1 + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 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_staticline10 + 1 + + + protected + 1 + + + Resizable + + 1 + + wxLI_HORIZONTAL + + 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_staticline101 + 1 + + + protected + 1 + + + Resizable + + 1 + + wxLI_HORIZONTAL + + 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_staticline1011 + 1 + + + protected + 1 + + + Resizable + + 1 + + wxLI_HORIZONTAL + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Length die + + + 0 + + + 0 + + 1 + m_staticText38 + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + Wire length from pad to die on chip ( used to calculate actual track length) + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + 0 + + 0 + + 1 + m_LengthDieCtrl + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|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_PadLengthDie_Unit + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 wxFILTER_NONE @@ -2509,26 +4339,57 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 "Circle" "Oval" "Rect" "Trapezoidal" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 ID_LISTBOX_SHAPE_PAD Pad Shape: + 1 + + 0 + + 0 + 1 m_PadShape + 1 + + protected + 1 + + Resizable + 0 + 1 wxRA_SPECIFY_COLS + 0 wxFILTER_NONE @@ -2568,26 +4429,57 @@ wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 "Circle" "Oval" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 ID_RADIOBOX_DRILL_SHAPE Drill Shape: + 1 + + 0 + + 0 + 1 m_DrillShapeCtrl + 1 + + protected + 1 + + Resizable + 0 + 1 wxRA_SPECIFY_COLS + 0 wxFILTER_NONE @@ -2638,26 +4530,57 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 "0" "90" "-90" "180" "Custom" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 ID_LISTBOX_ORIENT_PAD Pad Orient: + 1 + + 0 + + 0 + 1 m_PadOrient + 1 + + protected + 1 + + Resizable + 0 + 1 wxRA_SPECIFY_COLS + 0 wxFILTER_NONE @@ -2697,23 +4620,54 @@ wxTOP|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Pad Orient (0.1 deg) + + + 0 + + 0 + 1 m_PadOrientText + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2753,23 +4707,54 @@ 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_PadOrientCtrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2815,21 +4800,52 @@ wxEXPAND 1 + 1 + 1 + 1 + 1 + + 0,0,0 + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + + 0 + + 0 + 1 m_panelShowPad + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2898,23 +4914,54 @@ wxALIGN_RIGHT|wxTOP|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Rotation: + + + 0 + + 0 + 1 m_staticTitleModuleRot + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2954,23 +5001,54 @@ wxTOP|wxRIGHT|wxLEFT|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_staticModuleRotValue + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -3010,23 +5088,54 @@ wxALL|wxALIGN_RIGHT 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Board side: + + + 0 + + 0 + 1 m_staticTitleModuleSide + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -3066,23 +5175,54 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Front side + + + 0 + + 0 + 1 m_staticModuleSideValue + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -3124,23 +5264,54 @@ wxALIGN_CENTER_VERTICAL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 ,90,92,-1,70,0 + 0 0 wxID_ANY Warning: This pad is flipped on board. Back and front layers will be swapped. + + + 0 + + 0 + 1 m_staticTextWarningPadFlipped + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -3194,23 +5365,54 @@ wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT 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 these values to 0 to use Parent footprint or global values + + + 0 + + 0 + 1 m_staticTextWarning + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -3266,23 +5468,54 @@ wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL 0 + 1 + 1 + 1 + 1 + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Net pad clearance + + + 0 + + 0 + 1 m_staticTextNetClearance + 1 + + protected + 1 + + Resizable + + 1 + 0 This is the local net clearance for pad. If 0, the footprint local value or the Netclass value is used wxFILTER_NONE @@ -3322,23 +5555,54 @@ wxALL 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 @@ -3382,23 +5646,54 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 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 @@ -3438,22 +5733,53 @@ 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 @@ -3492,22 +5818,53 @@ 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 @@ -3546,22 +5903,53 @@ 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 @@ -3600,23 +5988,54 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 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 this pad and the solder mask If 0, the footprint local value or the global value is used wxFILTER_NONE @@ -3656,23 +6075,54 @@ wxALL 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 @@ -3716,23 +6166,54 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 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 @@ -3772,23 +6253,54 @@ wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL 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 this pad and the solder paste. If 0 the footprint value or the global value is used.. 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 @@ -3828,23 +6340,54 @@ wxTOP|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_SolderPasteMarginCtrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -3888,23 +6431,54 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 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 @@ -3944,23 +6518,54 @@ wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT 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 this pad and the solder paste. A value of 10 means the clearance value is 10 per cent of the pad size If 0 the footprint value or the global value is used.. 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 @@ -4000,23 +6605,54 @@ wxALL 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 @@ -4060,23 +6696,54 @@ wxRIGHT|wxALIGN_CENTER_VERTICAL 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 @@ -4121,7 +6788,7 @@ 5 wxBOTTOM|wxRIGHT|wxEXPAND 0 - + m_RightBoxSizer wxVERTICAL @@ -4131,26 +6798,57 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + - "Standard" "SMD" "Conn" + + 1 + 0 + "Standard" "SMD" "Conn" "NPTH, Mechanical" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 ID_LISTBOX_TYPE_PAD Pad Type: + 1 + + 0 + + 0 + 1 m_PadType + 1 + + protected + 1 + + Resizable + 0 + 1 wxRA_SPECIFY_COLS + 0 wxFILTER_NONE @@ -4185,11 +6883,11 @@ - + 5 0 - + wxID_ANY Layers: @@ -4197,86 +6895,62 @@ wxVERTICAL none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - 0 - - 1 - 1 - - - 0 - wxID_ANY - Component layer - - - m_PadLayerCmp - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - - - - - + 5 wxALL 0 - + + 1 + 1 + 1 + 1 + + - 0 + + 1 + 0 + "Front Layer" "Back Layer" "All Copper Layers" "No Copper Layers" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY - Copper layer + Copper Layers: + + 1 + + 0 + + 0 - m_PadLayerCu + 1 + m_rbCopperLayersSel + 1 + + protected + 1 + + Resizable + + 0 + 1 - + wxRA_SPECIFY_COLS + 0 wxFILTER_NONE @@ -4286,7 +6960,6 @@ - OnSetLayer @@ -4303,6 +6976,7 @@ + OnSetLayers @@ -4311,641 +6985,986 @@ - + 5 wxEXPAND 1 - - 8 - protected - 0 - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - 0 - - 1 - 1 - - - 0 + wxID_ANY - Adhesive Cmp - + Technical Layers: - m_PadLayerAdhCmp - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - 0 - - 1 - 1 - - - 0 - wxID_ANY - Adhesive Copper - - - m_PadLayerAdhCu - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - 0 - - 1 - 1 - - - 0 - wxID_ANY - Solder paste Cmp - - - m_PadLayerPateCmp - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - 0 - - 1 - 1 - - - 0 - wxID_ANY - Solder paste Copper - - - m_PadLayerPateCu - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - 0 - - 1 - 1 - - - 0 - wxID_ANY - Silkscreen Cmp - - - m_PadLayerSilkCmp - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - 0 - - 1 - 1 - - - 0 - wxID_ANY - Silkscreen Copper - - - m_PadLayerSilkCu - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - 0 - - 1 - 1 - - - 0 - wxID_ANY - Solder mask Cmp - - - m_PadLayerMaskCmp - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - 0 - - 1 - 1 - - - 0 - wxID_ANY - Solder mask Copper - - - m_PadLayerMaskCu - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - 0 - - 1 - 1 - - - 0 - wxID_ANY - Draft layer - - - m_PadLayerDraft - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - 0 - - 1 - 1 - - - 0 - wxID_ANY - E.C.O.1 layer - - - m_PadLayerECO1 - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - - 0 - - 1 - 1 - - - 0 - wxID_ANY - E.C.O.2 layer - - - m_PadLayerECO2 - protected - - - - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnSetLayer - - - - - - - - - - - - - - - - - - - - - + sbSizerTechlayers + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Adhesive Cmp + + + 0 + + + 0 + + 1 + m_PadLayerAdhCmp + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetLayers + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Adhesive Copper + + + 0 + + + 0 + + 1 + m_PadLayerAdhCu + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetLayers + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder paste Cmp + + + 0 + + + 0 + + 1 + m_PadLayerPateCmp + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetLayers + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder paste Copper + + + 0 + + + 0 + + 1 + m_PadLayerPateCu + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetLayers + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Silkscreen Cmp + + + 0 + + + 0 + + 1 + m_PadLayerSilkCmp + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetLayers + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Silkscreen Copper + + + 0 + + + 0 + + 1 + m_PadLayerSilkCu + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetLayers + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder mask Cmp + + + 0 + + + 0 + + 1 + m_PadLayerMaskCmp + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetLayers + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder mask Copper + + + 0 + + + 0 + + 1 + m_PadLayerMaskCu + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetLayers + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Draft layer + + + 0 + + + 0 + + 1 + m_PadLayerDraft + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetLayers + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + E.C.O.1 layer + + + 0 + + + 0 + + 1 + m_PadLayerECO1 + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetLayers + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + E.C.O.2 layer + + + 0 + + + 0 + + 1 + m_PadLayerECO2 + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnSetLayers + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_pad_properties_base.h b/pcbnew/dialogs/dialog_pad_properties_base.h index ab9530776b..14937d4489 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.h +++ b/pcbnew/dialogs/dialog_pad_properties_base.h @@ -1,15 +1,16 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Jun 30 2011) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __dialog_pad_properties_base__ -#define __dialog_pad_properties_base__ +#ifndef __DIALOG_PAD_PROPERTIES_BASE_H__ +#define __DIALOG_PAD_PROPERTIES_BASE_H__ +#include +#include #include - #include #include #include @@ -91,6 +92,12 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog wxRadioButton* m_radioBtnDeltaXdir; wxRadioButton* m_radioBtnDeltaYdir; wxStaticText* m_staticTextDDirInfo; + wxStaticLine* m_staticline10; + wxStaticLine* m_staticline101; + wxStaticLine* m_staticline1011; + wxStaticText* m_staticText38; + wxTextCtrl* m_LengthDieCtrl; + wxStaticText* m_PadLengthDie_Unit; wxBoxSizer* m_DrillShapeBoxSizer; wxRadioBox* m_PadShape; wxRadioBox* m_DrillShapeCtrl; @@ -120,9 +127,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog wxTextCtrl* m_SolderPasteMarginRatioCtrl; wxStaticText* m_SolderPasteRatioMarginUnits; wxRadioBox* m_PadType; - wxCheckBox* m_PadLayerCmp; - wxCheckBox* m_PadLayerCu; - + wxRadioBox* m_rbCopperLayersSel; wxCheckBox* m_PadLayerAdhCmp; wxCheckBox* m_PadLayerAdhCu; wxCheckBox* m_PadLayerPateCmp; @@ -145,16 +150,16 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog virtual void PadOrientEvent( wxCommandEvent& event ) { event.Skip(); } virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); } virtual void PadTypeSelected( wxCommandEvent& event ) { event.Skip(); } - virtual void OnSetLayer( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSetLayers( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void PadPropertiesAccept( wxCommandEvent& event ) { event.Skip(); } public: - DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 733,486 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSUNKEN_BORDER ); + DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 733,535 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSUNKEN_BORDER ); ~DIALOG_PAD_PROPERTIES_BASE(); }; -#endif //__dialog_pad_properties_base__ +#endif //__DIALOG_PAD_PROPERTIES_BASE_H__ diff --git a/pcbnew/gen_drill_report_files.cpp b/pcbnew/gen_drill_report_files.cpp index 7c2fedc010..f558fe1d1f 100644 --- a/pcbnew/gen_drill_report_files.cpp +++ b/pcbnew/gen_drill_report_files.cpp @@ -266,8 +266,7 @@ void Gen_Drill_PcbMap( BOARD* aPcb, PLOTTER* aPlotter, // Plot the drill map: for( unsigned ii = 0; ii < aHoleListBuffer.size(); ii++ ) { - pos.x = aHoleListBuffer[ii].m_Hole_Pos_X; - pos.y = aHoleListBuffer[ii].m_Hole_Pos_Y; + pos = aHoleListBuffer[ii].m_Hole_Pos; /* Always plot the drill symbol (for slots identifies the needed * cutter!) */ @@ -276,8 +275,7 @@ void Gen_Drill_PcbMap( BOARD* aPcb, PLOTTER* aPlotter, if( aHoleListBuffer[ii].m_Hole_Shape != 0 ) { wxSize oblong_size; - oblong_size.x = aHoleListBuffer[ii].m_Hole_SizeX; - oblong_size.y = aHoleListBuffer[ii].m_Hole_SizeY; + oblong_size = aHoleListBuffer[ii].m_Hole_Size; aPlotter->flash_pad_oval( pos, oblong_size, aHoleListBuffer[ii].m_Hole_Orient, FILAIRE ); } @@ -299,6 +297,7 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb, int layer1 = LAYER_N_BACK; int layer2 = LAYER_N_FRONT; bool gen_through_holes = true; + bool gen_NPTH_holes = false; fprintf( aFile, "Drill report for %s\n", TO_UTF8( aBoardFilename ) ); @@ -314,6 +313,7 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb, /* build hole lists: * 1 - through holes * 2 - for partial holes only: by layer pair + * 3 - Not Plated through holes */ for( ; ; ) @@ -323,11 +323,16 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb, aToolListBuffer, layer1, layer2, - gen_through_holes ? false : true ); + gen_through_holes ? false : true, gen_NPTH_holes ); TotalHoleCount = 0; - if( gen_through_holes ) + if( gen_NPTH_holes ) + { + sprintf( line, "Drill report for Not Plated through holes :\n" ); + } + + else if( gen_through_holes ) { sprintf( line, "Drill report for through holes :\n" ); } @@ -384,25 +389,41 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb, TotalHoleCount += aToolListBuffer[ii].m_TotalCount; } - sprintf( line, "\ntotal holes count %d\n\n\n", TotalHoleCount ); + if( gen_NPTH_holes ) + sprintf( line, "\ntotal Not Plated holes count %d\n\n\n", TotalHoleCount ); + else + sprintf( line, "\ntotal plated holes count %d\n\n\n", TotalHoleCount ); fputs( line, aFile ); - if( aPcb->GetCopperLayerCount() <= 2 ) + if( gen_NPTH_holes ) + { break; - - if( gen_through_holes ) - layer2 = layer1 + 1; + } else { - if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider - break; - layer1++; layer2++; // use next layer pair + if( aPcb->GetCopperLayerCount() <= 2 ) + { + gen_NPTH_holes = true; + continue; + } - if( layer2 == aPcb->GetCopperLayerCount() - 1 ) - layer2 = LAYER_N_FRONT; // the last layer is always the - // component layer + if( gen_through_holes ) + layer2 = layer1 + 1; + else + { + if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider + { + gen_NPTH_holes = true; + continue; + } + layer1++; layer2++; // use next layer pair + + if( layer2 == aPcb->GetCopperLayerCount() - 1 ) + layer2 = LAYER_N_FRONT; // the last layer is always the + // component layer + } + gen_through_holes = false; } - gen_through_holes = false; } fclose( aFile ); diff --git a/pcbnew/gen_holes_and_tools_lists_for_drill.cpp b/pcbnew/gen_holes_and_tools_lists_for_drill.cpp index b07e143105..350eae708c 100644 --- a/pcbnew/gen_holes_and_tools_lists_for_drill.cpp +++ b/pcbnew/gen_holes_and_tools_lists_for_drill.cpp @@ -24,28 +24,32 @@ static bool CmpHoleDiameterValue( const HOLE_INFO& a, const HOLE_INFO& b ) { if( a.m_Hole_Diameter != b.m_Hole_Diameter ) return a.m_Hole_Diameter < b.m_Hole_Diameter; - if( a.m_Hole_Pos_X != b.m_Hole_Pos_X ) - return a.m_Hole_Pos_X < b.m_Hole_Pos_X; - return a.m_Hole_Pos_Y < b.m_Hole_Pos_Y; + if( a.m_Hole_Pos.x != b.m_Hole_Pos.x ) + return a.m_Hole_Pos.x < b.m_Hole_Pos.x; + return a.m_Hole_Pos.y < b.m_Hole_Pos.y; } -/** +/* * Function BuildHolesList * Create the list of holes and tools for a given board * The list is sorted by increasing drill values * Only holes from aFirstLayer to aLastLayer copper layers are listed (for vias, because pad holes are always through holes) - * @param aPcb : the given board - * @param aHoleListBuffer : the std::vector to fill with pcb holes info - * @param aToolListBuffer : the std::vector to fill with tools to use - * @param aFirstLayer = first layer to consider. if < 0 aFirstLayer is ignored (used to creates report file) - * @param aLastLayer = last layer to consider. if < 0 aLastLayer is ignored - * @param aExcludeThroughHoles : if true, exclude through holes ( pads and vias through ) + * param aPcb : the given board + * param aHoleListBuffer : the std::vector to fill with pcb holes info + * param aToolListBuffer : the std::vector to fill with tools to use + * param aFirstLayer = first layer to consider. if < 0 aFirstLayer is ignored (used to creates report file) + * param aLastLayer = last layer to consider. if < 0 aLastLayer is ignored + * param aExcludeThroughHoles : if true, exclude through holes ( pads and vias through ) + * param aGenerateNPTH_list : + * true to create NPTH only list (with no plated holes) + * false to created plated holes list (with no NPTH ) */ void Build_Holes_List( BOARD* aPcb, std::vector& aHoleListBuffer, std::vector& aToolListBuffer, - int aFirstLayer, int aLastLayer, bool aExcludeThroughHoles ) + int aFirstLayer, int aLastLayer, bool aExcludeThroughHoles, + bool aGenerateNPTH_list ) { HOLE_INFO new_hole; int hole_value; @@ -59,40 +63,43 @@ void Build_Holes_List( BOARD* aPcb, EXCHG( aFirstLayer, aLastLayer ); } - /* build hole list for vias */ - TRACK* track = aPcb->m_Track; - for( ; track != NULL; track = track->Next() ) + /* build hole list for vias + */ + if( ! aGenerateNPTH_list ) // vias are always plated ! { - if( track->Type() != TYPE_VIA ) - continue; - SEGVIA* via = (SEGVIA*) track; - hole_value = via->GetDrillValue(); - if( hole_value == 0 ) - continue; - new_hole.m_Tool_Reference = -1; // Flag value for Not initialized - new_hole.m_Hole_Orient = 0; - new_hole.m_Hole_Diameter = hole_value; - new_hole.m_Hole_SizeX = new_hole.m_Hole_SizeY = new_hole.m_Hole_Diameter; - new_hole.m_Hole_Shape = 0; // hole shape: round - new_hole.m_Hole_Pos_X = via->m_Start.x; - new_hole.m_Hole_Pos_Y = via->m_Start.y; // hole position - via->ReturnLayerPair( &new_hole.m_Hole_Top_Layer, &new_hole.m_Hole_Bottom_Layer ); + TRACK* track = aPcb->m_Track; + for( ; track != NULL; track = track->Next() ) + { + if( track->Type() != TYPE_VIA ) + continue; + SEGVIA* via = (SEGVIA*) track; + hole_value = via->GetDrillValue(); + if( hole_value == 0 ) + continue; + new_hole.m_Tool_Reference = -1; // Flag value for Not initialized + new_hole.m_Hole_Orient = 0; + new_hole.m_Hole_Diameter = hole_value; + new_hole.m_Hole_Size.x = new_hole.m_Hole_Size.y = new_hole.m_Hole_Diameter; + new_hole.m_Hole_Shape = 0; // hole shape: round + new_hole.m_Hole_Pos = via->m_Start; + via->ReturnLayerPair( &new_hole.m_Hole_Top_Layer, &new_hole.m_Hole_Bottom_Layer ); - // ReturnLayerPair return params with m_Hole_Bottom_Layer < m_Hole_Top_Layer - if( (new_hole.m_Hole_Bottom_Layer > aFirstLayer) && (aFirstLayer >= 0) ) - continue; - if( (new_hole.m_Hole_Top_Layer < aLastLayer) && (aLastLayer >= 0) ) - continue; + // ReturnLayerPair return params with m_Hole_Bottom_Layer < m_Hole_Top_Layer + if( (new_hole.m_Hole_Bottom_Layer > aFirstLayer) && (aFirstLayer >= 0) ) + continue; + if( (new_hole.m_Hole_Top_Layer < aLastLayer) && (aLastLayer >= 0) ) + continue; - if( aExcludeThroughHoles && (new_hole.m_Hole_Bottom_Layer == LAYER_N_BACK) - && (new_hole.m_Hole_Top_Layer == LAYER_N_FRONT) ) - continue; + if( aExcludeThroughHoles && (new_hole.m_Hole_Bottom_Layer == LAYER_N_BACK) + && (new_hole.m_Hole_Top_Layer == LAYER_N_FRONT) ) + continue; - aHoleListBuffer.push_back( new_hole ); + aHoleListBuffer.push_back( new_hole ); + } } /* build hole list for pads (assumed always through holes) */ - if( !aExcludeThroughHoles ) + if( !aExcludeThroughHoles || aGenerateNPTH_list ) { MODULE* Module = aPcb->m_Modules; for( ; Module != NULL; Module = Module->Next() ) @@ -101,21 +108,24 @@ void Build_Holes_List( BOARD* aPcb, D_PAD* pad = Module->m_Pads; for( ; pad != NULL; pad = pad->Next() ) { + if( ! aGenerateNPTH_list && pad->m_Attribut == PAD_HOLE_NOT_PLATED ) + continue; + if( aGenerateNPTH_list && pad->m_Attribut != PAD_HOLE_NOT_PLATED ) + continue; if( pad->m_Drill.x == 0 ) continue; + new_hole.m_Hole_NotPlated = (pad->m_Attribut == PAD_HOLE_NOT_PLATED); new_hole.m_Tool_Reference = -1; // Flag is: Not initialized new_hole.m_Hole_Orient = pad->m_Orient; new_hole.m_Hole_Shape = 0; // hole shape: round new_hole.m_Hole_Diameter = min( pad->m_Drill.x, pad->m_Drill.y ); - new_hole.m_Hole_SizeX = new_hole.m_Hole_SizeY = new_hole.m_Hole_Diameter; + new_hole.m_Hole_Size.x = new_hole.m_Hole_Size.y = new_hole.m_Hole_Diameter; if( pad->m_DrillShape != PAD_CIRCLE ) new_hole.m_Hole_Shape = 1; // oval flag set - new_hole.m_Hole_SizeX = pad->m_Drill.x; - new_hole.m_Hole_SizeY = pad->m_Drill.y; - new_hole.m_Hole_Pos_X = pad->m_Pos.x; - new_hole.m_Hole_Pos_Y = pad->m_Pos.y; // hole position + new_hole.m_Hole_Size = pad->m_Drill; + new_hole.m_Hole_Pos = pad->m_Pos; // hole position new_hole.m_Hole_Bottom_Layer = LAYER_N_BACK; - new_hole.m_Hole_Top_Layer = LAYER_N_FRONT; // pad holes are through holes + new_hole.m_Hole_Top_Layer = LAYER_N_FRONT;// pad holes are through holes aHoleListBuffer.push_back( new_hole ); } } diff --git a/pcbnew/gendrill.cpp b/pcbnew/gendrill.cpp index caef4b4fa5..6acd986b49 100644 --- a/pcbnew/gendrill.cpp +++ b/pcbnew/gendrill.cpp @@ -60,6 +60,8 @@ const wxString DrillFileExtension( wxT( "drl" ) ); const wxString DrillFileWildcard( _( "Drill files (*.drl)|*.drl" ) ); +const wxString RptFileExtension( wxT( "rpt" ) ); +const wxString RptFileWildcard = _( "Drill report files (*.rpt)|*.rpt" ); /* * Creates the drill files in EXCELLON format @@ -81,12 +83,12 @@ static std::vector s_ToolListBuffer; static std::vector s_HoleListBuffer; - /* This function displays the dialog frame for drill tools */ void PCB_EDIT_FRAME::InstallDrillFrame( wxCommandEvent& event ) { DIALOG_GENDRILL dlg( this ); + dlg.ShowModal(); } @@ -96,11 +98,12 @@ void PCB_EDIT_FRAME::InstallDrillFrame( wxCommandEvent& event ) * Calls the functions to create EXCELLON drill files and/or drill map files * >When all holes are through, only one excellon file is created. * >When there are some partial holes (some blind or buried vias), - * one excellon file is created, for all through holes, + * one excellon file is created, for all plated through holes, * and one file per layer pair, which have one or more holes, excluding * through holes, already in the first file. + * one file for all Not Plated through holes */ -void DIALOG_GENDRILL::GenDrillAndReportFiles( ) +void DIALOG_GENDRILL::GenDrillAndReportFiles() { wxFileName fn; wxString layer_extend; /* added to the Board FileName to @@ -108,31 +111,38 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( ) * FileName + layer pair names) */ wxString msg; bool hasBuriedVias = false; /* If true, drill files are created - * layer pair by layer pair for - * buried vias */ + * layer pair by layer pair for + * buried vias */ int layer1 = LAYER_N_BACK; int layer2 = LAYER_N_FRONT; bool gen_through_holes = true; + bool gen_NPTH_holes = false; - UpdateConfig(); /* set params and Save drill options */ + wxString currentWD = ::wxGetCwd(); + + UpdateConfig(); // set params and Save drill options m_Parent->MsgPanel->EraseMsgBox(); - if( m_MicroViasCount || m_BlindOrBuriedViasCount ) + if( m_microViasCount || m_blindOrBuriedViasCount ) hasBuriedVias = true; for( ; ; ) { Build_Holes_List( m_Parent->GetBoard(), s_HoleListBuffer, s_ToolListBuffer, layer1, layer2, - gen_through_holes ? false : true ); + gen_through_holes ? false : true, gen_NPTH_holes ); - if( s_ToolListBuffer.size() > 0 ) //holes? + if( s_ToolListBuffer.size() > 0 ) // holes? { fn = m_Parent->GetScreen()->GetFileName(); layer_extend.Empty(); - if( !gen_through_holes ) + if( gen_NPTH_holes ) + { + layer_extend << wxT( "-NPTH" ); + } + else if( !gen_through_holes ) { if( layer1 == LAYER_N_BACK ) layer_extend << wxT( "-copper" ); @@ -147,9 +157,9 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( ) fn.SetName( fn.GetName() + layer_extend ); fn.SetExt( DrillFileExtension ); - wxFileDialog dlg( this, _( "Save Drill File" ), fn.GetPath(), - fn.GetFullName(), DrillFileWildcard, - wxFD_SAVE ); + wxFileDialog dlg( this, _( "Save Drill File" ), ::wxGetCwd(), + fn.GetFullName(), wxGetTranslation( DrillFileWildcard ), + wxFD_SAVE | wxFD_CHANGE_DIR ); if( dlg.ShowModal() == wxID_CANCEL ) break; @@ -158,19 +168,21 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( ) if( aFile == 0 ) { - msg = _( "Unable to create file " ) + dlg.GetPath(); - DisplayError( this, msg ); + msg.Printf( _( "Unable to create drill file %s" ), GetChars( dlg.GetPath() ) ); + wxMessageBox( msg ); + ::wxSetWorkingDirectory( currentWD ); EndModal( 0 ); return; } + EXCELLON_WRITER excellonWriter( m_Parent->GetBoard(), - aFile, m_FileDrillOffset, - &s_HoleListBuffer, &s_ToolListBuffer ); + aFile, m_FileDrillOffset, + &s_HoleListBuffer, &s_ToolListBuffer ); excellonWriter.SetFormat( !m_UnitDrillIsInch, (EXCELLON_WRITER::zeros_fmt) m_ZerosFormat, m_Precision.m_lhs, m_Precision.m_rhs ); excellonWriter.SetOptions( m_Mirror, m_MinimalHeader, m_FileDrillOffset ); - excellonWriter.CreateDrillFile( ); + excellonWriter.CreateDrillFile(); switch( m_Choice_Drill_Map->GetSelection() ) { @@ -197,31 +209,45 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( ) PLOT_FORMAT_DXF ); break; } - - if( !hasBuriedVias ) - break; } - if( gen_through_holes ) - layer2 = layer1 + 1; + + if( gen_NPTH_holes ) // The last drill file was created + break; + + if( !hasBuriedVias ) + gen_NPTH_holes = true; else { - if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider - break; - layer1++; - layer2++; // use next layer pair + if( gen_through_holes ) + layer2 = layer1 + 1; // prepare generation of first layer pair + else + { + if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider + { + layer1 = LAYER_N_BACK; + layer2 = LAYER_N_FRONT; + gen_NPTH_holes = true; + continue; + } + layer1++; + layer2++; // use next layer pair - if( layer2 == m_Parent->GetBoard()->GetCopperLayerCount() - 1 ) - layer2 = LAYER_N_FRONT; // the last layer is always the - // component layer + if( layer2 == m_Parent->GetBoard()->GetCopperLayerCount() - 1 ) + layer2 = LAYER_N_FRONT; // the last layer is always the + // component layer + } + + gen_through_holes = false; } - - gen_through_holes = false; } if( m_Choice_Drill_Report->GetSelection() > 0 ) { - GenDrillReport( m_Parent->GetScreen()->GetFileName() ); + fn = m_Parent->GetScreen()->GetFileName(); + GenDrillReport( fn.GetFullName() ); } + + ::wxSetWorkingDirectory( currentWD ); } @@ -229,16 +255,16 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( ) * Create the drill file in EXCELLON format * @return hole count */ -int EXCELLON_WRITER::CreateDrillFile( ) +int EXCELLON_WRITER::CreateDrillFile() { - int diam, holes_count; - int x0, y0, xf, yf, xc, yc; + int diam, holes_count; + int x0, y0, xf, yf, xc, yc; double xt, yt; - char line[1024]; + char line[1024]; SetLocaleTo_C_standard(); // Use the standard notation for double numbers - WriteHeader( ); + WriteHeader(); holes_count = 0; @@ -250,17 +276,17 @@ int EXCELLON_WRITER::CreateDrillFile( ) tool_descr.m_Diameter * m_conversionUnits ); } - fputs( "%\n", m_file ); // End of header info + fputs( "%\n", m_file ); // End of header info - fputs( "G90\n", m_file ); // Absolute mode - fputs( "G05\n", m_file ); // Drill mode + fputs( "G90\n", m_file ); // Absolute mode + fputs( "G05\n", m_file ); // Drill mode /* Units : */ if( !m_minimalHeader ) { if( m_unitsDecimal ) - fputs( "M71\n", m_file ); /* M71 = metric mode */ + fputs( "M71\n", m_file ); /* M71 = metric mode */ else - fputs( "M72\n", m_file ); /* M72 = inch mode */ + fputs( "M72\n", m_file ); /* M72 = inch mode */ } /* Read the hole file and generate lines for normal holes (oblong @@ -278,8 +304,8 @@ int EXCELLON_WRITER::CreateDrillFile( ) fprintf( m_file, "T%d\n", tool_reference ); } - x0 = hole_descr.m_Hole_Pos_X - m_offset.x; - y0 = hole_descr.m_Hole_Pos_Y - m_offset.y; + x0 = hole_descr.m_Hole_Pos.x - m_offset.x; + y0 = hole_descr.m_Hole_Pos.y - m_offset.y; if( !m_mirror ) y0 *= -1; @@ -307,24 +333,24 @@ int EXCELLON_WRITER::CreateDrillFile( ) fprintf( m_file, "T%d\n", tool_reference ); } - diam = MIN( hole_descr.m_Hole_SizeX, - hole_descr.m_Hole_SizeY ); + diam = MIN( hole_descr.m_Hole_Size.x, + hole_descr.m_Hole_Size.y ); if( diam == 0 ) continue; /* Compute the hole coordinates: */ - xc = x0 = xf = hole_descr.m_Hole_Pos_X - m_offset.x; - yc = y0 = yf = hole_descr.m_Hole_Pos_Y - m_offset.y; + xc = x0 = xf = hole_descr.m_Hole_Pos.x - m_offset.x; + yc = y0 = yf = hole_descr.m_Hole_Pos.y - m_offset.y; /* Compute the start and end coordinates for the shape */ - if( hole_descr.m_Hole_SizeX < hole_descr.m_Hole_SizeY ) + if( hole_descr.m_Hole_Size.x < hole_descr.m_Hole_Size.y ) { - int delta = ( hole_descr.m_Hole_SizeY - hole_descr.m_Hole_SizeX ) / 2; + int delta = ( hole_descr.m_Hole_Size.y - hole_descr.m_Hole_Size.x ) / 2; y0 -= delta; yf += delta; } else { - int delta = ( hole_descr.m_Hole_SizeX - hole_descr.m_Hole_SizeY ) / 2; + int delta = ( hole_descr.m_Hole_Size.x - hole_descr.m_Hole_Size.y ) / 2; x0 -= delta; xf += delta; } RotatePoint( &x0, &y0, xc, yc, hole_descr.m_Hole_Orient ); @@ -359,13 +385,14 @@ int EXCELLON_WRITER::CreateDrillFile( ) holes_count++; } - WriteEndOfFile( ); + WriteEndOfFile(); SetLocaleTo_Default(); // Revert to locale double notation return holes_count; } + /** * SetFormat * Initialize internal parameters to match the given format @@ -374,14 +401,17 @@ int EXCELLON_WRITER::CreateDrillFile( ) * @param aLeftDigits = number of digits for integer part of coordinates * @param aRightDigits = number of digits for mantissa part of coordinates */ -void EXCELLON_WRITER::SetFormat( bool aMetric, zeros_fmt aZerosFmt, int aLeftDigits, int aRightDigits ) +void EXCELLON_WRITER::SetFormat( bool aMetric, + zeros_fmt aZerosFmt, + int aLeftDigits, + int aRightDigits ) { m_unitsDecimal = aMetric; - m_zeroFormat = aZerosFmt; + m_zeroFormat = aZerosFmt; /* Set conversion scale depending on drill file units */ if( m_unitsDecimal ) - m_conversionUnits = 0.00254; // EXCELLON units = mm + m_conversionUnits = 0.00254; // EXCELLON units = mm else m_conversionUnits = 0.0001; // EXCELLON units = INCHES @@ -389,11 +419,12 @@ void EXCELLON_WRITER::SetFormat( bool aMetric, zeros_fmt aZerosFmt, int aLeftDig m_precision.m_rhs = aRightDigits; } + /* Created a line like: * X48000Y19500 * According to the selected format */ -void EXCELLON_WRITER::WriteCoordinates( char * aLine, double aCoordX, double aCoordY ) +void EXCELLON_WRITER::WriteCoordinates( char* aLine, double aCoordX, double aCoordY ) { wxString xs, ys; int xpad = m_precision.m_lhs + m_precision.m_rhs; @@ -471,7 +502,7 @@ void EXCELLON_WRITER::WriteCoordinates( char * aLine, double aCoordX, double aCo * FMAT,2 * INCH,TZ */ -void EXCELLON_WRITER::WriteHeader( ) +void EXCELLON_WRITER::WriteHeader() { char Line[256]; @@ -537,7 +568,7 @@ void EXCELLON_WRITER::WriteHeader( ) } -void EXCELLON_WRITER::WriteEndOfFile( ) +void EXCELLON_WRITER::WriteEndOfFile() { //add if minimal here fputs( "T0\nM30\n", m_file ); @@ -591,7 +622,7 @@ void DIALOG_GENDRILL::GenDrillMap( const wxString aFileName, wxFileDialog dlg( this, _( "Save Drill Plot File" ), fn.GetPath(), fn.GetFullName(), wildcard, - wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); + wxFD_SAVE ); if( dlg.ShowModal() == wxID_CANCEL ) return; @@ -602,7 +633,7 @@ void DIALOG_GENDRILL::GenDrillMap( const wxString aFileName, { msg = _( "Unable to create file" ); msg << wxT( " <" ) << dlg.GetPath() << wxT( ">" ); - DisplayError( this, msg ); + wxMessageBox( msg ); return; } @@ -624,15 +655,14 @@ void DIALOG_GENDRILL::GenDrillReport( const wxString aFileName ) { wxFileName fn; wxString msg; - wxString wildcard = _( "Drill report files (.rpt)|*.rpt" ); fn = aFileName; fn.SetName( fn.GetName() + wxT( "-drl" ) ); - fn.SetExt( wxT( "rpt" ) ); + fn.SetExt( RptFileExtension ); wxFileDialog dlg( this, _( "Save Drill Report File" ), fn.GetPath(), - fn.GetFullName(), wildcard, - wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); + fn.GetFullName(), wxGetTranslation( RptFileWildcard ), + wxFD_SAVE ); if( dlg.ShowModal() == wxID_CANCEL ) return; @@ -642,7 +672,7 @@ void DIALOG_GENDRILL::GenDrillReport( const wxString aFileName ) if( report_dest == 0 ) { msg = _( "Unable to create file " ) + dlg.GetPath(); - DisplayError( this, msg ); + wxMessageBox( msg ); return; } diff --git a/pcbnew/gendrill.h b/pcbnew/gendrill.h index 6edf9f77ea..ce89170a4c 100644 --- a/pcbnew/gendrill.h +++ b/pcbnew/gendrill.h @@ -44,20 +44,30 @@ public: DRILL_TOOL( int diametre ) }; -/* the HOLE_INFO class handle hole which must be drilled (diameter, position and layers) */ +/* the HOLE_INFO class handle hole which must be drilled (diameter, position and layers) + * For buried or micro vias, the hole is not on all layers. + * So we must generate a drill file for each layer pair (adjacent layers) + * Not plated holes are always through holes, and must be output on a specific drill file + * because they are drilled after the Pcb process is finished. +*/ class HOLE_INFO { public: - int m_Hole_Diameter; // hole value, and for oblong min(hole size x, hole size y) + int m_Hole_Diameter; // hole value, and for oblong: min(hole size x, hole size y) int m_Tool_Reference; // Tool reference for this hole = 1 ... n (values <=0 must not be used) - int m_Hole_SizeX; // hole size x for oblong holes - int m_Hole_SizeY; // hole size y for oblong holes + wxSize m_Hole_Size; // hole size for oblong holes int m_Hole_Orient; // Hole rotation (= pad rotation) for oblong holes int m_Hole_Shape; // hole shape: round (0) or oval (1) - int m_Hole_Pos_X; // hole position X - int m_Hole_Pos_Y; // hole position Y - int m_Hole_Bottom_Layer; // hole starting layer (usually copper) - int m_Hole_Top_Layer; // hole ending layer (usually component): m_Hole_First_Layer < m_Hole_Last_Layer + wxPoint m_Hole_Pos; // hole position + int m_Hole_Bottom_Layer; // hole starting layer (usually back layer) + int m_Hole_Top_Layer; // hole ending layer (usually front layer): + // m_Hole_First_Layer < m_Hole_Last_Layer + bool m_Hole_NotPlated; // hole not plated. Must be in a specific drill file +public: + HOLE_INFO() + { + m_Hole_NotPlated = false; + } }; @@ -184,12 +194,14 @@ private: * @param aToolListBuffer : the std::vector to fill with tools to use * @param aFirstLayer = first layer to consider. if < 0 aFirstLayer is ignored * @param aLastLayer = last layer to consider. if < 0 aLastLayer is ignored - * @param aExcludeThroughHoles : if true, exclude through holes ( pads and vias through ) + * @param aGenerateNPTH_list : + * true to create NPTH only list (with no plated holes) + * false to created plated holes list (with no NPTH ) */ void Build_Holes_List( BOARD* aPcb, std::vector& aHoleListBuffer, std::vector& aToolListBuffer, - int aFirstLayer, int aLastLayer, bool aExcludeThroughHoles ); - + int aFirstLayer, int aLastLayer, bool aExcludeThroughHoles, + bool aGenerateNPTH_list ); void GenDrillMapFile( BOARD* aPcb, FILE* aFile, diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index f57d3c6a1b..c50f33dc39 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -169,8 +169,9 @@ private: /** * Function loadNewModules * Load from libraries new modules found in netlist and add them to the current Board. + * @return false if a footprint is not found, true if all footprints are loaded */ - void loadNewModules(); + bool loadNewModules(); /** * function readModuleComponentLinkfile @@ -417,7 +418,9 @@ bool NETLIST_READER::ReadNetList( FILE* aFile, } /* Load new footprints */ - loadNewModules(); + bool success = loadNewModules(); + if( ! success ) + wxMessageBox( _("Some footprints are not found in libraries") ); /* Second read , All footprints are on board. * One must update the schematic info (pad netnames) @@ -1042,16 +1045,18 @@ bool NETLIST_READER::readModuleComponentLinkfile( const wxString* aCmpIdent, /* Load new modules from library. * If a new module is already loaded it is duplicated, which avoids multiple * unnecessary disk or net access to read libraries. + * return false if a footprint is not found, true if OK */ -void NETLIST_READER::loadNewModules() +bool NETLIST_READER::loadNewModules() { MODULE_INFO* ref, * cmp; MODULE* Module = NULL; wxPoint ModuleBestPosition; BOARD* pcb = m_pcbframe->GetBoard(); + bool success = true; if( m_newModulesList.size() == 0 ) - return; + return true; sort( m_newModulesList.begin(), m_newModulesList.end(), SortByLibName ); @@ -1075,11 +1080,18 @@ void NETLIST_READER::loadNewModules() ref = cmp; if( Module == NULL ) { + success = false; wxString msg; msg.Printf( _( "Component [%s]: footprint <%s> not found" ), GetChars( cmp->m_CmpName ), GetChars( cmp->m_LibName ) ); - DisplayError( NULL, msg ); + if( m_messageWindow ) + { + msg += wxT("\n"); + m_messageWindow->AppendText( msg ); + } + else + DisplayError( NULL, msg ); continue; } Module->SetPosition( ModuleBestPosition ); @@ -1108,4 +1120,6 @@ void NETLIST_READER::loadNewModules() Module->m_Path = cmp->m_TimeStampPath; } } + + return success; } diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index 35bd9ad6db..a378fc7231 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -74,6 +74,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() layerSelection = LAYER_BACK | LAYER_FRONT | SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK; useGerberExtensions = true; + m_SkipNPTH_Pads = false; m_ExcludeEdgeLayer = true; m_PlotLineWidth = g_DrawDefaultLineThickness; m_PlotFrameRef = false; diff --git a/pcbnew/pcb_plot_params.h b/pcbnew/pcb_plot_params.h index c01c48432e..23402a7e9c 100644 --- a/pcbnew/pcb_plot_params.h +++ b/pcbnew/pcb_plot_params.h @@ -59,6 +59,8 @@ public: bool m_PlotPSNegative; // True to create a negative board ps plot // Flags to enable or disable ploting of various PCB elements. + bool m_SkipNPTH_Pads; // true to disable plot NPTH pads if hole and size have same value + // GERBER only bool m_PlotReference; bool m_PlotValue; bool m_PlotTextOther; diff --git a/pcbnew/plot_rtn.cpp b/pcbnew/plot_rtn.cpp index f707fef64d..ad4bc1c486 100644 --- a/pcbnew/plot_rtn.cpp +++ b/pcbnew/plot_rtn.cpp @@ -681,7 +681,8 @@ void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, GRTraceMode trace_ case LAYER_N_14: case LAYER_N_15: case LAST_COPPER_LAYER: - Plot_Standard_Layer( plotter, layer_mask, true, trace_mode ); + Plot_Standard_Layer( plotter, layer_mask, true, trace_mode, + g_PcbPlotOptions.m_SkipNPTH_Pads ); // Adding drill marks, if required and if the plotter is able to plot // them: @@ -736,9 +737,10 @@ void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, GRTraceMode trace_ * HPGL unit = 0.98 mils (1 mil = 1.02041 unit HPGL). */ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter, - int aLayerMask, - bool aPlotVia, - GRTraceMode aPlotMode ) + int aLayerMask, + bool aPlotVia, + GRTraceMode aPlotMode, + bool aSkipNPTH_Pads ) { wxPoint pos; wxSize size; @@ -772,8 +774,7 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter, break; default: - DisplayError( this, - wxT( "Plot_Standard_Layer() error : Unexpected Draw Type" ) ); + wxMessageBox( wxT( "Plot_Standard_Layer() error : Unexpected Draw Type" ) ); break; } } @@ -838,10 +839,18 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter, switch( pad->m_PadShape ) { case PAD_CIRCLE: + if( aSkipNPTH_Pads && + (pad->m_Size == pad->m_Drill) && + (pad->m_Attribut == PAD_HOLE_NOT_PLATED) ) + break; aPlotter->flash_pad_circle( pos, size.x, aPlotMode ); break; case PAD_OVAL: + if( aSkipNPTH_Pads && + (pad->m_Size == pad->m_Drill) && + (pad->m_Attribut == PAD_HOLE_NOT_PLATED) ) + break; aPlotter->flash_pad_oval( pos, size, pad->m_Orient, aPlotMode ); break; diff --git a/pcbnew/plotgerb.cpp b/pcbnew/plotgerb.cpp index 905de31379..acb2365615 100644 --- a/pcbnew/plotgerb.cpp +++ b/pcbnew/plotgerb.cpp @@ -61,12 +61,18 @@ bool PCB_BASE_FRAME::Genere_GERBER( const wxString& FullFileName, int Layer, if( plotter->start_plot( output_file ) ) { + // Skip NPTH pads on copper layers + // ( only if hole size == pad size ): + if( (Layer >= LAYER_N_BACK) && (Layer <= LAYER_N_FRONT) ) + g_PcbPlotOptions.m_SkipNPTH_Pads = true; // Sheet refs on gerber CAN be useful... and they're always 1:1 if( g_PcbPlotOptions.m_PlotFrameRef ) PlotWorkSheet( plotter, GetScreen() ); Plot_Layer( plotter, Layer, trace_mode ); plotter->end_plot(); + + g_PcbPlotOptions.m_SkipNPTH_Pads = false; } else // error in start_plot( ): failed opening a temporary file