Pcbnew: Add NPTH pads (seen changelog).
Minor fixes and enhancements.
This commit is contained in:
parent
c64a6937f4
commit
1e2b145a2f
|
@ -4,6 +4,14 @@ KiCad ChangeLog 2010
|
||||||
Please add newer entries at the top, list the date and your name with
|
Please add newer entries at the top, list the date and your name with
|
||||||
email address.
|
email address.
|
||||||
|
|
||||||
|
2011-Aug-19, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
|
||||||
|
================================================================================
|
||||||
|
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 <xor.gate.engineering@gmail.com>
|
2011-Apr-12, UPDATE Jerry Jacobs <xor.gate.engineering@gmail.com>
|
||||||
================================================================================
|
================================================================================
|
||||||
Minor UI changes that affect OS X platform.
|
Minor UI changes that affect OS X platform.
|
||||||
|
|
|
@ -33,6 +33,8 @@ bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFile, bool aSetFieldAttributeToVis
|
||||||
SCH_REFERENCE_LIST referencesList;
|
SCH_REFERENCE_LIST referencesList;
|
||||||
SheetList.GetComponents( referencesList, false );
|
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) ) )
|
while( GetLine( aFile, Line, &LineNum, sizeof(Line) ) )
|
||||||
{
|
{
|
||||||
if( sscanf( Line, "comp = \"%s module = \"%s", Ref, FootPrint ) == 2 )
|
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
|
// So we do not stop the search here
|
||||||
SCH_COMPONENT* component = referencesList[ii].GetComponent();
|
SCH_COMPONENT* component = referencesList[ii].GetComponent();
|
||||||
SCH_FIELD * fpfield = component->GetField( FOOTPRINT );
|
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()
|
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_Orient = component->GetField( VALUE )->m_Orient;
|
||||||
fpfield->m_Pos = component->GetField( VALUE )->m_Pos;
|
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;
|
fpfield->m_Text = footprint;
|
||||||
|
|
|
@ -1065,20 +1065,25 @@ bool SCH_SCREEN::SetComponentFootprint( SCH_SHEET_PATH* aSheetPath, const wxStri
|
||||||
* orientation, if the text is empty at position 0, because
|
* orientation, if the text is empty at position 0, because
|
||||||
* it is probably not yet initialized
|
* it is probably not yet initialized
|
||||||
*/
|
*/
|
||||||
if( component->GetField( FOOTPRINT )->m_Text.IsEmpty()
|
SCH_FIELD * fpfield = component->GetField( FOOTPRINT );
|
||||||
&& ( component->GetField( FOOTPRINT )->m_Pos == wxPoint( 0, 0 ) ) )
|
if( fpfield->m_Text.IsEmpty()
|
||||||
|
&& ( fpfield->m_Pos == component->m_Pos ) )
|
||||||
{
|
{
|
||||||
component->GetField( FOOTPRINT )->m_Orient = component->GetField( VALUE )->m_Orient;
|
fpfield->m_Orient = component->GetField( VALUE )->m_Orient;
|
||||||
component->GetField( FOOTPRINT )->m_Pos = component->GetField( VALUE )->m_Pos;
|
fpfield->m_Pos = component->GetField( VALUE )->m_Pos;
|
||||||
component->GetField( FOOTPRINT )->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;
|
||||||
}
|
}
|
||||||
|
|
||||||
component->GetField( FOOTPRINT )->m_Text = aFootPrint;
|
fpfield->m_Text = aFootPrint;
|
||||||
|
|
||||||
if( aSetVisible )
|
if( aSetVisible )
|
||||||
component->GetField( FOOTPRINT )->m_Attributs &= ~TEXT_NO_VISIBLE;
|
fpfield->m_Attributs &= ~TEXT_NO_VISIBLE;
|
||||||
else
|
else
|
||||||
component->GetField( FOOTPRINT )->m_Attributs |= TEXT_NO_VISIBLE;
|
fpfield->m_Attributs |= TEXT_NO_VISIBLE;
|
||||||
|
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -406,8 +406,23 @@ public:
|
||||||
void Plot_Layer( PLOTTER* plotter,
|
void Plot_Layer( PLOTTER* plotter,
|
||||||
int Layer,
|
int Layer,
|
||||||
GRTraceMode trace_mode );
|
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,
|
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,
|
void Plot_Serigraphie( PLOTTER* plotter,
|
||||||
int masque_layer,
|
int masque_layer,
|
||||||
GRTraceMode trace_mode );
|
GRTraceMode trace_mode );
|
||||||
|
|
|
@ -53,6 +53,7 @@ const wxChar* s_AllowedExtensionsToList[] =
|
||||||
wxT( "^.*\\.html$" ),
|
wxT( "^.*\\.html$" ),
|
||||||
wxT( "^.*\\.rpt$" ),
|
wxT( "^.*\\.rpt$" ),
|
||||||
wxT( "^.*\\.csv$" ),
|
wxT( "^.*\\.csv$" ),
|
||||||
|
wxT( "^.*\\.drl$" ), // Excellon drill files
|
||||||
NULL // end of list
|
NULL // end of list
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
// Due to a bug in previous versions ( m_LengthDie not initialized in D_PAD ctor)
|
// Due to a bug in previous versions ( m_LengthDie not initialized in D_PAD ctor)
|
||||||
// m_LengthDie is no more read from .brd files
|
// m_LengthDie is no more read from .brd files
|
||||||
// Uncomment this next line to read m_LengthDie 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
|
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
|
else
|
||||||
Line.Printf( wxT( "%3.1f" ), (float) m_Orient / 10 );
|
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 );
|
valeur_param( m_Pos.x, Line );
|
||||||
frame->AppendMsgPanel( _( "X Pos" ), Line, BLUE );
|
frame->AppendMsgPanel( _( "X Pos" ), Line, LIGHTBLUE );
|
||||||
|
|
||||||
valeur_param( m_Pos.y, Line );
|
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 D_PAD::GetSelectMenuText() const
|
||||||
{
|
{
|
||||||
wxString text;
|
wxString text;
|
||||||
|
BOARD * board = GetBoard();
|
||||||
|
|
||||||
text << _( "Pad" ) << wxT( " \"" ) << ReturnStringPadName() << wxT( "\" (" );
|
text << _( "Pad" ) << wxT( " \"" ) << ReturnStringPadName() << wxT( "\" (" );
|
||||||
|
|
||||||
if ( (m_Masque_Layer & ALL_CU_LAYERS) == ALL_CU_LAYERS )
|
if ( (m_Masque_Layer & ALL_CU_LAYERS) == ALL_CU_LAYERS )
|
||||||
text << _("all copper layers");
|
text << _("all copper layers");
|
||||||
else if( (m_Masque_Layer & LAYER_BACK) == LAYER_BACK )
|
else if( (m_Masque_Layer & LAYER_BACK ) == LAYER_BACK )
|
||||||
text << GetLayerName();
|
text << board->GetLayerName(LAYER_N_BACK);
|
||||||
else if( (m_Masque_Layer & LAYER_FRONT) == LAYER_FRONT )
|
else if( (m_Masque_Layer & LAYER_FRONT) == LAYER_FRONT )
|
||||||
text << GetLayerName();
|
text << board->GetLayerName(LAYER_N_FRONT);
|
||||||
else
|
else
|
||||||
text << _( "???" );
|
text << _( "???" );
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Pcb3D_GLCanvas;
|
||||||
#define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT
|
#define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT
|
||||||
|
|
||||||
//PAD_HOLE_NOT_PLATED:
|
//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
|
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
|
int m_Color; // color used to draw the pad shape , from pad layers and
|
||||||
// visible layers
|
// visible layers
|
||||||
int m_HoleColor; // color used to draw the pad hole
|
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
|
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
|
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_padnum; // true to show pad number
|
||||||
bool m_Display_netname; // true to show net name
|
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_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_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.
|
bool m_IsPrinting; // true to print, false to display on screen.
|
||||||
wxPoint m_Offset; // general draw offset
|
wxPoint m_Offset; // general draw offset
|
||||||
|
|
||||||
|
@ -103,13 +105,12 @@ public:
|
||||||
// module anchor, orientation 0
|
// module anchor, orientation 0
|
||||||
|
|
||||||
int m_ShapeMaxRadius; // radius of the circle containing the pad shape
|
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
|
int m_Orient; // in 1/10 degrees
|
||||||
static int m_PadSketchModePenSize; // Pen size used to draw pads in sketch mode
|
static int m_PadSketchModePenSize; // Pen size used to draw pads in sketch mode
|
||||||
// (mode used to print pads on silkscreen layer)
|
// (mode used to print pads on silkscreen layer)
|
||||||
|
|
||||||
// Length net from pad to die on chip
|
int m_LengthDie; // Length net from pad to die on chip
|
||||||
int m_LengthDie;
|
|
||||||
|
|
||||||
// Local clearance. When null, the module default value is used.
|
// Local clearance. When null, the module default value is used.
|
||||||
// when the module default value is null, the netclass value is used
|
// when the module default value is null, the netclass value is used
|
||||||
|
|
|
@ -32,11 +32,13 @@ PAD_DRAWINFO::PAD_DRAWINFO()
|
||||||
m_DrawMode = 0;
|
m_DrawMode = 0;
|
||||||
m_Color = BLACK;
|
m_Color = BLACK;
|
||||||
m_HoleColor = BLACK; // could be DARKGRAY;
|
m_HoleColor = BLACK; // could be DARKGRAY;
|
||||||
|
m_NPHoleColor = YELLOW;
|
||||||
m_PadClearance = 0;
|
m_PadClearance = 0;
|
||||||
m_Display_padnum = true;
|
m_Display_padnum = true;
|
||||||
m_Display_netname = true;
|
m_Display_netname = true;
|
||||||
m_ShowPadFilled = true;
|
m_ShowPadFilled = true;
|
||||||
m_ShowNCMark = true;
|
m_ShowNCMark = true;
|
||||||
|
m_ShowNotPlatedHole = false;
|
||||||
m_IsPrinting = 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 )
|
if( ( m_Masque_Layer & ALL_CU_LAYERS ) == 0 )
|
||||||
DisplayIsol = FALSE;
|
DisplayIsol = FALSE;
|
||||||
|
|
||||||
|
if( m_Attribut == PAD_HOLE_NOT_PLATED )
|
||||||
|
drawInfo.m_ShowNotPlatedHole = true;
|
||||||
|
|
||||||
drawInfo.m_DrawMode = aDraw_mode;
|
drawInfo.m_DrawMode = aDraw_mode;
|
||||||
drawInfo.m_Color = color;
|
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;
|
drawInfo.m_Display_netname = false;
|
||||||
|
|
||||||
// Display net names is restricted to pads that are on the active layer
|
// 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 )
|
if( !IsOnLayer( screen->m_Active_Layer ) && DisplayOpt.ContrastModeDisplay )
|
||||||
drawInfo.m_Display_netname = false;
|
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;
|
wxPoint holepos = m_Pos - aDrawInfo.m_Offset;
|
||||||
int hole = m_Drill.x >> 1;
|
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;
|
bool blackpenstate = false;
|
||||||
if( aDrawInfo.m_IsPrinting )
|
if( aDrawInfo.m_IsPrinting )
|
||||||
|
@ -468,13 +475,16 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
|
||||||
else
|
else
|
||||||
GRSetDrawMode( aDC, GR_XOR );
|
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 )
|
switch( m_DrillShape )
|
||||||
{
|
{
|
||||||
case PAD_CIRCLE:
|
case PAD_CIRCLE:
|
||||||
|
|
||||||
if( aDC->LogicalToDeviceXRel( hole ) > 1 )
|
if( aDC->LogicalToDeviceXRel( hole ) > 1 )
|
||||||
GRFilledCircle( aClipBox, aDC, holepos.x, holepos.y, hole, 0,
|
GRFilledCircle( aClipBox, aDC, holepos.x, holepos.y, hole, 0,
|
||||||
aDrawInfo.m_Color, aDrawInfo.m_HoleColor );
|
aDrawInfo.m_Color, hole_color );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PAD_OVAL:
|
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,
|
GRFillCSegm( aClipBox, aDC, holepos.x + delta_cx, holepos.y + delta_cy,
|
||||||
holepos.x - delta_cx, holepos.y - delta_cy, seg_width,
|
holepos.x - delta_cx, holepos.y - delta_cy, seg_width,
|
||||||
aDrawInfo.m_HoleColor );
|
hole_color );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -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.
|
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
|
@ -43,16 +44,16 @@
|
||||||
#define UnitDrillInchKey wxT( "DrillUnit" )
|
#define UnitDrillInchKey wxT( "DrillUnit" )
|
||||||
#define DrillOriginIsAuxAxisKey wxT( "DrillAuxAxis" )
|
#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,
|
// Due to difference between inches and mm,
|
||||||
// there are 2 set of reasonnable precision values, one for inches and one for metric
|
// there are 2 set of reasonnable precision values, one for inches and one for metric
|
||||||
static DRILL_PRECISION precisionListForInches[] =
|
static DRILL_PRECISION precisionListForInches[] =
|
||||||
{
|
{
|
||||||
DRILL_PRECISION(2,3), DRILL_PRECISION(2,4)
|
DRILL_PRECISION( 2, 3 ), DRILL_PRECISION( 2, 4 )
|
||||||
};
|
};
|
||||||
static DRILL_PRECISION precisionListForMetric[] =
|
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_Mirror = true;
|
||||||
bool DIALOG_GENDRILL::m_DrillOriginIsAuxAxis = false;
|
bool DIALOG_GENDRILL::m_DrillOriginIsAuxAxis = false;
|
||||||
int DIALOG_GENDRILL:: m_PrecisionFormat = 1;
|
int DIALOG_GENDRILL:: m_PrecisionFormat = 1;
|
||||||
|
bool DIALOG_GENDRILL::m_createRpt = false;
|
||||||
|
int DIALOG_GENDRILL::m_createMap = 0;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* DIALOG_GENDRILL destructor
|
* DIALOG_GENDRILL destructor
|
||||||
|
@ -107,6 +110,7 @@ void DIALOG_GENDRILL::initDialog()
|
||||||
InitDisplayParams();
|
InitDisplayParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* some param values initialization before display dialog window
|
/* some param values initialization before display dialog window
|
||||||
*/
|
*/
|
||||||
void DIALOG_GENDRILL::InitDisplayParams( void )
|
void DIALOG_GENDRILL::InitDisplayParams( void )
|
||||||
|
@ -119,7 +123,7 @@ void DIALOG_GENDRILL::InitDisplayParams( void )
|
||||||
if( m_ZerosFormat == EXCELLON_WRITER::DECIMAL_FORMAT )
|
if( m_ZerosFormat == EXCELLON_WRITER::DECIMAL_FORMAT )
|
||||||
m_Choice_Precision->Enable( false );
|
m_Choice_Precision->Enable( false );
|
||||||
|
|
||||||
UpdatePrecisionOptions( );
|
UpdatePrecisionOptions();
|
||||||
|
|
||||||
m_Check_Minimal->SetValue( m_MinimalHeader );
|
m_Check_Minimal->SetValue( m_MinimalHeader );
|
||||||
|
|
||||||
|
@ -128,6 +132,9 @@ void DIALOG_GENDRILL::InitDisplayParams( void )
|
||||||
|
|
||||||
m_Check_Mirror->SetValue( m_Mirror );
|
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_ViaDrillValue->SetLabel( _( "Use Netclasses values" ) );
|
||||||
|
|
||||||
m_MicroViaDrillValue->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
|
// See if we have some buried vias or/and microvias, and display
|
||||||
// microvias drill value if so
|
// microvias drill value if so
|
||||||
m_ThroughViasCount = 0;
|
m_throughViasCount = 0;
|
||||||
m_MicroViasCount = 0;
|
m_microViasCount = 0;
|
||||||
m_BlindOrBuriedViasCount = 0;
|
m_blindOrBuriedViasCount = 0;
|
||||||
for( TRACK* track = m_Parent->GetBoard()->m_Track; track != NULL;
|
for( TRACK* track = m_Parent->GetBoard()->m_Track; track != NULL;
|
||||||
track = track->Next() )
|
track = track->Next() )
|
||||||
{
|
{
|
||||||
if( track->Type() != TYPE_VIA )
|
if( track->Type() != TYPE_VIA )
|
||||||
continue;
|
continue;
|
||||||
if( track->Shape() == VIA_THROUGH )
|
if( track->Shape() == VIA_THROUGH )
|
||||||
m_ThroughViasCount++;
|
m_throughViasCount++;
|
||||||
else if( track->Shape() == VIA_MICROVIA )
|
else if( track->Shape() == VIA_MICROVIA )
|
||||||
m_MicroViasCount++;
|
m_microViasCount++;
|
||||||
else if( track->Shape() == VIA_BLIND_BURIED )
|
else if( track->Shape() == VIA_BLIND_BURIED )
|
||||||
m_BlindOrBuriedViasCount++;
|
m_blindOrBuriedViasCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_MicroViaDrillValue->Enable( m_MicroViasCount );
|
m_MicroViaDrillValue->Enable( m_microViasCount );
|
||||||
|
|
||||||
// Pads holes round:
|
/* Count plated pad holes and not plated pad holes:
|
||||||
m_PadsHoleCount = 0;
|
*/
|
||||||
|
m_platedPadsHoleCount = 0;
|
||||||
|
m_notplatedPadsHoleCount = 0;
|
||||||
for( MODULE* module = m_Parent->GetBoard()->m_Modules;
|
for( MODULE* module = m_Parent->GetBoard()->m_Modules;
|
||||||
module != NULL; module = module->Next() )
|
module != NULL; module = module->Next() )
|
||||||
{
|
{
|
||||||
|
@ -170,31 +179,47 @@ void DIALOG_GENDRILL::InitDisplayParams( void )
|
||||||
if( pad->m_DrillShape == PAD_CIRCLE )
|
if( pad->m_DrillShape == PAD_CIRCLE )
|
||||||
{
|
{
|
||||||
if( pad->m_Drill.x != 0 )
|
if( pad->m_Drill.x != 0 )
|
||||||
m_PadsHoleCount++;
|
{
|
||||||
|
if( pad->m_Attribut == PAD_HOLE_NOT_PLATED )
|
||||||
|
m_notplatedPadsHoleCount++;
|
||||||
|
else
|
||||||
|
m_platedPadsHoleCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if( MIN( pad->m_Drill.x, pad->m_Drill.y ) != 0 )
|
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();
|
// Display hole counts:
|
||||||
msg << wxT( " " ) << m_PadsHoleCount;
|
msg = m_PlatedPadsCountInfoMsg->GetLabel();
|
||||||
m_PadsCountInfoMsg->SetLabel( msg );
|
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 = m_ThroughViasInfoMsg->GetLabel();
|
||||||
msg << wxT( " " ) << m_ThroughViasCount;
|
msg << wxT( " " ) << m_throughViasCount;
|
||||||
m_ThroughViasInfoMsg->SetLabel( msg );
|
m_ThroughViasInfoMsg->SetLabel( msg );
|
||||||
|
|
||||||
msg = m_MicroViasInfoMsg->GetLabel();
|
msg = m_MicroViasInfoMsg->GetLabel();
|
||||||
msg << wxT( " " ) << m_MicroViasCount;
|
msg << wxT( " " ) << m_microViasCount;
|
||||||
m_MicroViasInfoMsg->SetLabel( msg );
|
m_MicroViasInfoMsg->SetLabel( msg );
|
||||||
|
|
||||||
msg = m_BuriedViasInfoMsg->GetLabel();
|
msg = m_BuriedViasInfoMsg->GetLabel();
|
||||||
msg << wxT( " " ) << m_BlindOrBuriedViasCount;
|
msg << wxT( " " ) << m_blindOrBuriedViasCount;
|
||||||
m_BuriedViasInfoMsg->SetLabel( msg );
|
m_BuriedViasInfoMsg->SetLabel( msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Save drill options: */
|
/* Save drill options: */
|
||||||
void DIALOG_GENDRILL::UpdateConfig()
|
void DIALOG_GENDRILL::UpdateConfig()
|
||||||
{
|
{
|
||||||
|
@ -213,13 +238,14 @@ void DIALOG_GENDRILL::UpdateConfig()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX
|
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void DIALOG_GENDRILL::OnSelDrillUnitsSelected( wxCommandEvent& event )
|
void DIALOG_GENDRILL::OnSelDrillUnitsSelected( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
UpdatePrecisionOptions( );
|
UpdatePrecisionOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -229,8 +255,8 @@ void DIALOG_GENDRILL::OnSelDrillUnitsSelected( wxCommandEvent& event )
|
||||||
|
|
||||||
void DIALOG_GENDRILL::OnOkClick( wxCommandEvent& event )
|
void DIALOG_GENDRILL::OnOkClick( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
GenDrillAndReportFiles( );
|
GenDrillAndReportFiles();
|
||||||
EndModal( wxID_OK);
|
EndModal( wxID_OK );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -241,7 +267,7 @@ void DIALOG_GENDRILL::OnOkClick( wxCommandEvent& event )
|
||||||
void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event )
|
void DIALOG_GENDRILL::OnCancelClick( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
UpdateConfig(); /* Save drill options: */
|
UpdateConfig(); /* Save drill options: */
|
||||||
EndModal( wxID_CANCEL); // Process the default cancel event (close dialog)
|
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 )
|
void DIALOG_GENDRILL::OnSelZerosFmtSelected( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
UpdatePrecisionOptions( );
|
UpdatePrecisionOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_GENDRILL::UpdatePrecisionOptions( )
|
void DIALOG_GENDRILL::UpdatePrecisionOptions()
|
||||||
{
|
{
|
||||||
if( m_Choice_Unit->GetSelection()== 1 ) // Units = inches
|
if( m_Choice_Unit->GetSelection()== 1 ) // Units = inches
|
||||||
{
|
{
|
||||||
|
@ -281,6 +307,9 @@ void DIALOG_GENDRILL::SetParams( void )
|
||||||
wxString msg;
|
wxString msg;
|
||||||
long ltmp;
|
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_UnitDrillIsInch = (m_Choice_Unit->GetSelection() == 0) ? FALSE : TRUE;
|
||||||
m_MinimalHeader = m_Check_Minimal->IsChecked();
|
m_MinimalHeader = m_Check_Minimal->IsChecked();
|
||||||
m_Mirror = m_Check_Mirror->IsChecked();
|
m_Mirror = m_Check_Mirror->IsChecked();
|
||||||
|
|
|
@ -46,10 +46,13 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PCB_EDIT_FRAME* m_Parent;
|
PCB_EDIT_FRAME* m_Parent;
|
||||||
int m_PadsHoleCount;
|
int m_platedPadsHoleCount;
|
||||||
int m_ThroughViasCount;
|
int m_notplatedPadsHoleCount;
|
||||||
int m_MicroViasCount;
|
int m_throughViasCount;
|
||||||
int m_BlindOrBuriedViasCount;
|
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 );
|
public: DIALOG_GENDRILL( PCB_EDIT_FRAME* parent );
|
||||||
~DIALOG_GENDRILL();
|
~DIALOG_GENDRILL();
|
||||||
|
|
|
@ -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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -127,17 +127,21 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con
|
||||||
wxStaticBoxSizer* sbSizerHoles;
|
wxStaticBoxSizer* sbSizerHoles;
|
||||||
sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Holes Count:") ), wxVERTICAL );
|
sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Holes Count:") ), wxVERTICAL );
|
||||||
|
|
||||||
m_PadsCountInfoMsg = new wxStaticText( this, wxID_ANY, _("Pads:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_PlatedPadsCountInfoMsg = new wxStaticText( this, wxID_ANY, _("Plated Pads:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_PadsCountInfoMsg->Wrap( -1 );
|
m_PlatedPadsCountInfoMsg->Wrap( -1 );
|
||||||
sbSizerHoles->Add( m_PadsCountInfoMsg, 0, wxALL, 5 );
|
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 = new wxStaticText( this, wxID_ANY, _("Through Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_ThroughViasInfoMsg->Wrap( -1 );
|
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 = new wxStaticText( this, wxID_ANY, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_MicroViasInfoMsg->Wrap( -1 );
|
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 = new wxStaticText( this, wxID_ANY, _("Buried Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_BuriedViasInfoMsg->Wrap( -1 );
|
m_BuriedViasInfoMsg->Wrap( -1 );
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef __dialog_gendrill_base__
|
#ifndef __DIALOG_GENDRILL_BASE_H__
|
||||||
#define __dialog_gendrill_base__
|
#define __DIALOG_GENDRILL_BASE_H__
|
||||||
|
|
||||||
|
#include <wx/artprov.h>
|
||||||
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/radiobox.h>
|
#include <wx/radiobox.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
|
@ -51,11 +52,11 @@ class DIALOG_GENDRILL_BASE : public wxDialog
|
||||||
wxStaticText* m_ViaDrillValue;
|
wxStaticText* m_ViaDrillValue;
|
||||||
wxStaticBoxSizer* m_MicroViasDrillSizer;
|
wxStaticBoxSizer* m_MicroViasDrillSizer;
|
||||||
wxStaticText* m_MicroViaDrillValue;
|
wxStaticText* m_MicroViaDrillValue;
|
||||||
wxStaticText* m_PadsCountInfoMsg;
|
wxStaticText* m_PlatedPadsCountInfoMsg;
|
||||||
|
wxStaticText* m_NotPlatedPadsCountInfoMsg;
|
||||||
wxStaticText* m_ThroughViasInfoMsg;
|
wxStaticText* m_ThroughViasInfoMsg;
|
||||||
wxStaticText* m_MicroViasInfoMsg;
|
wxStaticText* m_MicroViasInfoMsg;
|
||||||
wxStaticText* m_BuriedViasInfoMsg;
|
wxStaticText* m_BuriedViasInfoMsg;
|
||||||
|
|
||||||
wxButton* m_OkButton;
|
wxButton* m_OkButton;
|
||||||
wxButton* m_CancelButton;
|
wxButton* m_CancelButton;
|
||||||
|
|
||||||
|
@ -73,4 +74,4 @@ class DIALOG_GENDRILL_BASE : public wxDialog
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__dialog_gendrill_base__
|
#endif //__DIALOG_GENDRILL_BASE_H__
|
||||||
|
|
|
@ -26,6 +26,7 @@ void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC )
|
||||||
{
|
{
|
||||||
fn = GetScreen()->GetFileName();
|
fn = GetScreen()->GetFileName();
|
||||||
fn.SetExt( NetExtBuffer );
|
fn.SetExt( NetExtBuffer );
|
||||||
|
lastNetlistName = fn.GetFullPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
DIALOG_NETLIST frame( this, DC, lastNetlistName );
|
DIALOG_NETLIST frame( this, DC, lastNetlistName );
|
||||||
|
|
|
@ -79,7 +79,7 @@ private:
|
||||||
void PadTypeSelected( wxCommandEvent& event );
|
void PadTypeSelected( wxCommandEvent& event );
|
||||||
void PadPropertiesAccept( wxCommandEvent& event );
|
void PadPropertiesAccept( wxCommandEvent& event );
|
||||||
void SetPadLayersList( long layer_mask );
|
void SetPadLayersList( long layer_mask );
|
||||||
void OnSetLayer( wxCommandEvent& event );
|
void OnSetLayers( wxCommandEvent& event );
|
||||||
void OnCancelButtonClick( wxCommandEvent& event );
|
void OnCancelButtonClick( wxCommandEvent& event );
|
||||||
void OnPaintShowPanel( wxPaintEvent& event );
|
void OnPaintShowPanel( wxPaintEvent& event );
|
||||||
bool TransfertDataToPad( D_PAD* aPad, bool aPromptOnError = false );
|
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_Offset = m_dummyPad->m_Pos;
|
||||||
drawInfo.m_Display_padnum = true;
|
drawInfo.m_Display_padnum = true;
|
||||||
drawInfo.m_Display_netname = true;
|
drawInfo.m_Display_netname = true;
|
||||||
|
if( m_dummyPad->m_Attribut == PAD_HOLE_NOT_PLATED )
|
||||||
|
drawInfo.m_ShowNotPlatedHole = true;
|
||||||
|
|
||||||
// Shows the local pad clearance
|
// Shows the local pad clearance
|
||||||
drawInfo.m_PadClearance = m_dummyPad->m_LocalClearance;
|
drawInfo.m_PadClearance = m_dummyPad->m_LocalClearance;
|
||||||
|
@ -217,6 +219,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
||||||
m_PadShapeOffsetX_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) );
|
m_PadShapeOffsetX_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) );
|
||||||
m_PadShapeOffsetY_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) );
|
m_PadShapeOffsetY_Unit->SetLabel( GetUnitsLabel( g_UserUnit ) );
|
||||||
m_PadShapeDelta_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 ) );
|
m_NetClearanceUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
|
||||||
|
|
||||||
// Display current pad masks clearances units
|
// Display current pad masks clearances units
|
||||||
|
@ -248,6 +251,8 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
||||||
m_radioBtnDeltaYdir->SetValue(true);
|
m_radioBtnDeltaYdir->SetValue(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PutValueInLocalUnits( *m_LengthDieCtrl, m_dummyPad->m_LengthDie, internalUnits );
|
||||||
|
|
||||||
PutValueInLocalUnits( *m_NetClearanceValueCtrl, m_dummyPad->m_LocalClearance, internalUnits );
|
PutValueInLocalUnits( *m_NetClearanceValueCtrl, m_dummyPad->m_LocalClearance, internalUnits );
|
||||||
PutValueInLocalUnits( *m_SolderMaskMarginCtrl,
|
PutValueInLocalUnits( *m_SolderMaskMarginCtrl,
|
||||||
m_dummyPad->m_LocalSolderMaskMargin,
|
m_dummyPad->m_LocalSolderMaskMargin,
|
||||||
|
@ -333,7 +338,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
||||||
msg.Printf( wxT( "%d" ), m_dummyPad->m_Orient );
|
msg.Printf( wxT( "%d" ), m_dummyPad->m_Orient );
|
||||||
m_PadOrientCtrl->SetValue( msg );
|
m_PadOrientCtrl->SetValue( msg );
|
||||||
|
|
||||||
// Selection du type
|
// Type of pad selection
|
||||||
m_PadType->SetSelection( 0 );
|
m_PadType->SetSelection( 0 );
|
||||||
for( int ii = 0; ii < NBTYPES; ii++ )
|
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 )
|
if( m_dummyPad->m_DrillShape != PAD_OVAL )
|
||||||
m_DrillShapeCtrl->SetSelection( 0 );
|
m_DrillShapeCtrl->SetSelection( 0 );
|
||||||
else
|
else
|
||||||
m_DrillShapeCtrl->SetSelection( 1 );
|
m_DrillShapeCtrl->SetSelection( 1 );
|
||||||
|
|
||||||
// Setup layers names from board
|
// 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_PadLayerAdhCmp->SetLabel( m_Board->GetLayerName( ADHESIVE_N_FRONT ) );
|
||||||
m_PadLayerAdhCu->SetLabel( m_Board->GetLayerName( ADHESIVE_N_BACK ) );
|
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:
|
// Enable/disable drill dialog items:
|
||||||
event.SetId( m_DrillShapeCtrl->GetSelection() );
|
event.SetId( m_DrillShapeCtrl->GetSelection() );
|
||||||
OnDrillShapeSelected( event );
|
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)
|
* @param layer_mask = pad layer mask (ORed layers bit mask)
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
m_PadLayerCu->SetValue( ( layer_mask & LAYER_BACK ) );
|
if( ( layer_mask & ALL_CU_LAYERS ) == LAYER_FRONT )
|
||||||
m_PadLayerCmp->SetValue( ( layer_mask & 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_PadLayerAdhCmp->SetValue( ( layer_mask & ADHESIVE_LAYER_FRONT ) );
|
||||||
m_PadLayerAdhCu->SetValue( ( layer_mask & ADHESIVE_LAYER_BACK ) );
|
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.
|
// Called when select/deselect a layer.
|
||||||
void DIALOG_PAD_PROPERTIES::OnSetLayer( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::OnSetLayers( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
TransfertDataToPad( m_dummyPad );
|
TransfertDataToPad( m_dummyPad );
|
||||||
m_panelShowPad->Refresh();
|
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_DrillShape = g_Pad_Master.m_DrillShape;
|
||||||
m_CurrentPad->m_Offset = g_Pad_Master.m_Offset;
|
m_CurrentPad->m_Offset = g_Pad_Master.m_Offset;
|
||||||
m_CurrentPad->m_Offset.y *= isign;
|
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 )
|
if( m_CurrentPad->m_Masque_Layer != g_Pad_Master.m_Masque_Layer )
|
||||||
{
|
{
|
||||||
rastnestIsChanged = true;
|
rastnestIsChanged = true;
|
||||||
|
@ -645,7 +674,9 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
|
||||||
m_Parent->GetBoard()->m_Status_Pcb = 0;
|
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 )
|
bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError )
|
||||||
{
|
{
|
||||||
long PadLayerMask;
|
long PadLayerMask;
|
||||||
|
@ -704,6 +735,9 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError
|
||||||
delta.y = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl, internalUnits );
|
delta.y = ReturnValueFromTextCtrl( *m_ShapeDelta_Ctrl, internalUnits );
|
||||||
aPad->m_DeltaSize = delta;
|
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)
|
// Test bad values (be sure delta values are not to large)
|
||||||
// remember DeltaSize.x is the Y size variation
|
// remember DeltaSize.x is the Y size variation
|
||||||
bool error = false;
|
bool error = false;
|
||||||
|
@ -774,20 +808,37 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PAD_HOLE_NOT_PLATED:
|
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DisplayError( this, wxT( "Error: unknown pad type" ) );
|
DisplayError( NULL, wxT( "Error: unknown pad type" ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PadLayerMask = 0;
|
PadLayerMask = 0;
|
||||||
if( m_PadLayerCu->GetValue() )
|
switch( m_rbCopperLayersSel->GetSelection() )
|
||||||
PadLayerMask |= LAYER_BACK;
|
{
|
||||||
if( m_PadLayerCmp->GetValue() )
|
case 0:
|
||||||
PadLayerMask |= LAYER_FRONT;
|
PadLayerMask |= LAYER_FRONT;
|
||||||
if( ( PadLayerMask & (LAYER_BACK | LAYER_FRONT) ) == (LAYER_BACK | LAYER_FRONT) )
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
PadLayerMask |= LAYER_BACK;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
PadLayerMask |= ALL_CU_LAYERS;
|
PadLayerMask |= ALL_CU_LAYERS;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3: // No copper layers
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if( m_PadLayerAdhCmp->GetValue() )
|
if( m_PadLayerAdhCmp->GetValue() )
|
||||||
PadLayerMask |= ADHESIVE_LAYER_FRONT;
|
PadLayerMask |= ADHESIVE_LAYER_FRONT;
|
||||||
if( m_PadLayerAdhCu->GetValue() )
|
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)
|
if( (aPad->m_Size.x < aPad->m_Drill.x)
|
||||||
|| (aPad->m_Size.y < aPad->m_Drill.y) )
|
|| (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;
|
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 )
|
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;
|
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 ) )
|
if( ( aPad->m_Size.x / 2 <= ABS( aPad->m_Offset.x ) )
|
||||||
|| ( aPad->m_Size.y / 2 <= ABS( aPad->m_Offset.y ) ) )
|
|| ( 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( error )
|
if( error )
|
||||||
{
|
{
|
||||||
DisplayError( this, _( "Too large value for pad delta size" ) );
|
DisplayError( NULL, _( "Too large value for pad delta size" ) );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// 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 );
|
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Geometry:") ), wxVERTICAL );
|
||||||
|
|
||||||
wxFlexGridSizer* fgSizerGeometry;
|
wxFlexGridSizer* fgSizerGeometry;
|
||||||
fgSizerGeometry = new wxFlexGridSizer( 12, 3, 0, 0 );
|
fgSizerGeometry = new wxFlexGridSizer( 14, 3, 0, 0 );
|
||||||
fgSizerGeometry->SetFlexibleDirection( wxBOTH );
|
fgSizerGeometry->SetFlexibleDirection( wxBOTH );
|
||||||
fgSizerGeometry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
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 );
|
m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
fgSizerGeometry->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 );
|
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 );
|
m_textPadDrillX->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_textPadDrillX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxALIGN_RIGHT, 5 );
|
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 );
|
m_PadDrill_X_Unit->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_PadDrill_X_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
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 );
|
m_textPadDrillY->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_textPadDrillY, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
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 );
|
m_PadShapeSizeY_Unit->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_PadShapeSizeY_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
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 );
|
m_staticText17->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_staticText17, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
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 );
|
m_PadShapeOffsetX_Unit->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_PadShapeOffsetX_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
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 );
|
m_staticText19->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_staticText19, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
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 );
|
m_PadShapeOffsetY_Unit->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_PadShapeOffsetY_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
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 );
|
m_staticText21->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
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 );
|
m_PadShapeDelta_Unit->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_PadShapeDelta_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
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 );
|
m_staticText23->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_staticText23, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
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 );
|
m_staticTextDDirInfo->Wrap( -1 );
|
||||||
fgSizerGeometry->Add( m_staticTextDDirInfo, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
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 );
|
sbSizer2->Add( fgSizerGeometry, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_LeftBoxSizer->Add( sbSizer2, 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;
|
wxBoxSizer* m_RightBoxSizer;
|
||||||
m_RightBoxSizer = new wxBoxSizer( wxVERTICAL );
|
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 );
|
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 = new wxRadioBox( this, ID_LISTBOX_TYPE_PAD, _("Pad Type:"), wxDefaultPosition, wxDefaultSize, m_PadTypeNChoices, m_PadTypeChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
m_PadType->SetSelection( 0 );
|
m_PadType->SetSelection( 0 );
|
||||||
|
@ -362,47 +384,49 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
||||||
wxStaticBoxSizer* m_LayersSizer;
|
wxStaticBoxSizer* m_LayersSizer;
|
||||||
m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL );
|
m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL );
|
||||||
|
|
||||||
m_PadLayerCmp = new wxCheckBox( this, wxID_ANY, _("Component layer"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxString m_rbCopperLayersSelChoices[] = { _("Front Layer"), _("Back Layer"), _("All Copper Layers"), _("No Copper Layers") };
|
||||||
m_LayersSizer->Add( m_PadLayerCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
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 );
|
wxStaticBoxSizer* sbSizerTechlayers;
|
||||||
m_LayersSizer->Add( m_PadLayerCu, 0, wxALL, 5 );
|
sbSizerTechlayers = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Technical Layers:") ), wxVERTICAL );
|
||||||
|
|
||||||
|
|
||||||
m_LayersSizer->Add( 0, 8, 1, wxEXPAND, 5 );
|
|
||||||
|
|
||||||
m_PadLayerAdhCmp = new wxCheckBox( this, wxID_ANY, _("Adhesive Cmp"), wxDefaultPosition, wxDefaultSize, 0 );
|
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_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_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_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_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_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_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_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_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_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_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 );
|
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_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_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_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_rbCopperLayersSel->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), NULL, this );
|
||||||
m_PadLayerECO2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this );
|
|
||||||
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancelButtonClick ), 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 );
|
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_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_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_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_rbCopperLayersSel->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), 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::OnSetLayers ), NULL, this );
|
||||||
m_PadLayerECO2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayer ), NULL, this );
|
|
||||||
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancelButtonClick ), 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 );
|
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this );
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef __dialog_pad_properties_base__
|
#ifndef __DIALOG_PAD_PROPERTIES_BASE_H__
|
||||||
#define __dialog_pad_properties_base__
|
#define __DIALOG_PAD_PROPERTIES_BASE_H__
|
||||||
|
|
||||||
|
#include <wx/artprov.h>
|
||||||
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
|
@ -91,6 +92,12 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
|
||||||
wxRadioButton* m_radioBtnDeltaXdir;
|
wxRadioButton* m_radioBtnDeltaXdir;
|
||||||
wxRadioButton* m_radioBtnDeltaYdir;
|
wxRadioButton* m_radioBtnDeltaYdir;
|
||||||
wxStaticText* m_staticTextDDirInfo;
|
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;
|
wxBoxSizer* m_DrillShapeBoxSizer;
|
||||||
wxRadioBox* m_PadShape;
|
wxRadioBox* m_PadShape;
|
||||||
wxRadioBox* m_DrillShapeCtrl;
|
wxRadioBox* m_DrillShapeCtrl;
|
||||||
|
@ -120,9 +127,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
|
||||||
wxTextCtrl* m_SolderPasteMarginRatioCtrl;
|
wxTextCtrl* m_SolderPasteMarginRatioCtrl;
|
||||||
wxStaticText* m_SolderPasteRatioMarginUnits;
|
wxStaticText* m_SolderPasteRatioMarginUnits;
|
||||||
wxRadioBox* m_PadType;
|
wxRadioBox* m_PadType;
|
||||||
wxCheckBox* m_PadLayerCmp;
|
wxRadioBox* m_rbCopperLayersSel;
|
||||||
wxCheckBox* m_PadLayerCu;
|
|
||||||
|
|
||||||
wxCheckBox* m_PadLayerAdhCmp;
|
wxCheckBox* m_PadLayerAdhCmp;
|
||||||
wxCheckBox* m_PadLayerAdhCu;
|
wxCheckBox* m_PadLayerAdhCu;
|
||||||
wxCheckBox* m_PadLayerPateCmp;
|
wxCheckBox* m_PadLayerPateCmp;
|
||||||
|
@ -145,16 +150,16 @@ class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
|
||||||
virtual void PadOrientEvent( wxCommandEvent& event ) { event.Skip(); }
|
virtual void PadOrientEvent( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
|
virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
|
||||||
virtual void PadTypeSelected( wxCommandEvent& 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 OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void PadPropertiesAccept( wxCommandEvent& event ) { event.Skip(); }
|
virtual void PadPropertiesAccept( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
public:
|
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();
|
~DIALOG_PAD_PROPERTIES_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__dialog_pad_properties_base__
|
#endif //__DIALOG_PAD_PROPERTIES_BASE_H__
|
||||||
|
|
|
@ -266,8 +266,7 @@ void Gen_Drill_PcbMap( BOARD* aPcb, PLOTTER* aPlotter,
|
||||||
// Plot the drill map:
|
// Plot the drill map:
|
||||||
for( unsigned ii = 0; ii < aHoleListBuffer.size(); ii++ )
|
for( unsigned ii = 0; ii < aHoleListBuffer.size(); ii++ )
|
||||||
{
|
{
|
||||||
pos.x = aHoleListBuffer[ii].m_Hole_Pos_X;
|
pos = aHoleListBuffer[ii].m_Hole_Pos;
|
||||||
pos.y = aHoleListBuffer[ii].m_Hole_Pos_Y;
|
|
||||||
|
|
||||||
/* Always plot the drill symbol (for slots identifies the needed
|
/* Always plot the drill symbol (for slots identifies the needed
|
||||||
* cutter!) */
|
* cutter!) */
|
||||||
|
@ -276,8 +275,7 @@ void Gen_Drill_PcbMap( BOARD* aPcb, PLOTTER* aPlotter,
|
||||||
if( aHoleListBuffer[ii].m_Hole_Shape != 0 )
|
if( aHoleListBuffer[ii].m_Hole_Shape != 0 )
|
||||||
{
|
{
|
||||||
wxSize oblong_size;
|
wxSize oblong_size;
|
||||||
oblong_size.x = aHoleListBuffer[ii].m_Hole_SizeX;
|
oblong_size = aHoleListBuffer[ii].m_Hole_Size;
|
||||||
oblong_size.y = aHoleListBuffer[ii].m_Hole_SizeY;
|
|
||||||
aPlotter->flash_pad_oval( pos, oblong_size,
|
aPlotter->flash_pad_oval( pos, oblong_size,
|
||||||
aHoleListBuffer[ii].m_Hole_Orient, FILAIRE );
|
aHoleListBuffer[ii].m_Hole_Orient, FILAIRE );
|
||||||
}
|
}
|
||||||
|
@ -299,6 +297,7 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb,
|
||||||
int layer1 = LAYER_N_BACK;
|
int layer1 = LAYER_N_BACK;
|
||||||
int layer2 = LAYER_N_FRONT;
|
int layer2 = LAYER_N_FRONT;
|
||||||
bool gen_through_holes = true;
|
bool gen_through_holes = true;
|
||||||
|
bool gen_NPTH_holes = false;
|
||||||
|
|
||||||
|
|
||||||
fprintf( aFile, "Drill report for %s\n", TO_UTF8( aBoardFilename ) );
|
fprintf( aFile, "Drill report for %s\n", TO_UTF8( aBoardFilename ) );
|
||||||
|
@ -314,6 +313,7 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb,
|
||||||
/* build hole lists:
|
/* build hole lists:
|
||||||
* 1 - through holes
|
* 1 - through holes
|
||||||
* 2 - for partial holes only: by layer pair
|
* 2 - for partial holes only: by layer pair
|
||||||
|
* 3 - Not Plated through holes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for( ; ; )
|
for( ; ; )
|
||||||
|
@ -323,11 +323,16 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb,
|
||||||
aToolListBuffer,
|
aToolListBuffer,
|
||||||
layer1,
|
layer1,
|
||||||
layer2,
|
layer2,
|
||||||
gen_through_holes ? false : true );
|
gen_through_holes ? false : true, gen_NPTH_holes );
|
||||||
|
|
||||||
TotalHoleCount = 0;
|
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" );
|
sprintf( line, "Drill report for through holes :\n" );
|
||||||
}
|
}
|
||||||
|
@ -384,18 +389,33 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb,
|
||||||
TotalHoleCount += aToolListBuffer[ii].m_TotalCount;
|
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 );
|
fputs( line, aFile );
|
||||||
|
|
||||||
if( aPcb->GetCopperLayerCount() <= 2 )
|
if( gen_NPTH_holes )
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( aPcb->GetCopperLayerCount() <= 2 )
|
||||||
|
{
|
||||||
|
gen_NPTH_holes = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if( gen_through_holes )
|
if( gen_through_holes )
|
||||||
layer2 = layer1 + 1;
|
layer2 = layer1 + 1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider
|
if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider
|
||||||
break;
|
{
|
||||||
|
gen_NPTH_holes = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
layer1++; layer2++; // use next layer pair
|
layer1++; layer2++; // use next layer pair
|
||||||
|
|
||||||
if( layer2 == aPcb->GetCopperLayerCount() - 1 )
|
if( layer2 == aPcb->GetCopperLayerCount() - 1 )
|
||||||
|
@ -404,6 +424,7 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb,
|
||||||
}
|
}
|
||||||
gen_through_holes = false;
|
gen_through_holes = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fclose( aFile );
|
fclose( aFile );
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,28 +24,32 @@ static bool CmpHoleDiameterValue( const HOLE_INFO& a, const HOLE_INFO& b )
|
||||||
{
|
{
|
||||||
if( a.m_Hole_Diameter != b.m_Hole_Diameter )
|
if( a.m_Hole_Diameter != b.m_Hole_Diameter )
|
||||||
return 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 )
|
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.x < b.m_Hole_Pos.x;
|
||||||
return a.m_Hole_Pos_Y < b.m_Hole_Pos_Y;
|
return a.m_Hole_Pos.y < b.m_Hole_Pos.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Function BuildHolesList
|
* Function BuildHolesList
|
||||||
* Create the list of holes and tools for a given board
|
* Create the list of holes and tools for a given board
|
||||||
* The list is sorted by increasing drill values
|
* 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)
|
* 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 aPcb : the given board
|
||||||
* @param aHoleListBuffer : the std::vector<HOLE_INFO> to fill with pcb holes info
|
* param aHoleListBuffer : the std::vector<HOLE_INFO> to fill with pcb holes info
|
||||||
* @param aToolListBuffer : the std::vector<DRILL_TOOL> to fill with tools to use
|
* param aToolListBuffer : the std::vector<DRILL_TOOL> to fill with tools to use
|
||||||
* @param aFirstLayer = first layer to consider. if < 0 aFirstLayer is ignored (used to creates report file)
|
* 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 aLastLayer = last layer to consider. if < 0 aLastLayer is ignored
|
||||||
* @param aExcludeThroughHoles : if true, exclude through holes ( pads and vias through )
|
* 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,
|
void Build_Holes_List( BOARD* aPcb,
|
||||||
std::vector<HOLE_INFO>& aHoleListBuffer,
|
std::vector<HOLE_INFO>& aHoleListBuffer,
|
||||||
std::vector<DRILL_TOOL>& aToolListBuffer,
|
std::vector<DRILL_TOOL>& aToolListBuffer,
|
||||||
int aFirstLayer, int aLastLayer, bool aExcludeThroughHoles )
|
int aFirstLayer, int aLastLayer, bool aExcludeThroughHoles,
|
||||||
|
bool aGenerateNPTH_list )
|
||||||
{
|
{
|
||||||
HOLE_INFO new_hole;
|
HOLE_INFO new_hole;
|
||||||
int hole_value;
|
int hole_value;
|
||||||
|
@ -59,7 +63,10 @@ void Build_Holes_List( BOARD* aPcb,
|
||||||
EXCHG( aFirstLayer, aLastLayer );
|
EXCHG( aFirstLayer, aLastLayer );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* build hole list for vias */
|
/* build hole list for vias
|
||||||
|
*/
|
||||||
|
if( ! aGenerateNPTH_list ) // vias are always plated !
|
||||||
|
{
|
||||||
TRACK* track = aPcb->m_Track;
|
TRACK* track = aPcb->m_Track;
|
||||||
for( ; track != NULL; track = track->Next() )
|
for( ; track != NULL; track = track->Next() )
|
||||||
{
|
{
|
||||||
|
@ -72,10 +79,9 @@ void Build_Holes_List( BOARD* aPcb,
|
||||||
new_hole.m_Tool_Reference = -1; // Flag value for Not initialized
|
new_hole.m_Tool_Reference = -1; // Flag value for Not initialized
|
||||||
new_hole.m_Hole_Orient = 0;
|
new_hole.m_Hole_Orient = 0;
|
||||||
new_hole.m_Hole_Diameter = hole_value;
|
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_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_Shape = 0; // hole shape: round
|
||||||
new_hole.m_Hole_Pos_X = via->m_Start.x;
|
new_hole.m_Hole_Pos = via->m_Start;
|
||||||
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 );
|
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
|
// ReturnLayerPair return params with m_Hole_Bottom_Layer < m_Hole_Top_Layer
|
||||||
|
@ -90,9 +96,10 @@ void Build_Holes_List( BOARD* aPcb,
|
||||||
|
|
||||||
aHoleListBuffer.push_back( new_hole );
|
aHoleListBuffer.push_back( new_hole );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* build hole list for pads (assumed always through holes) */
|
/* build hole list for pads (assumed always through holes) */
|
||||||
if( !aExcludeThroughHoles )
|
if( !aExcludeThroughHoles || aGenerateNPTH_list )
|
||||||
{
|
{
|
||||||
MODULE* Module = aPcb->m_Modules;
|
MODULE* Module = aPcb->m_Modules;
|
||||||
for( ; Module != NULL; Module = Module->Next() )
|
for( ; Module != NULL; Module = Module->Next() )
|
||||||
|
@ -101,21 +108,24 @@ void Build_Holes_List( BOARD* aPcb,
|
||||||
D_PAD* pad = Module->m_Pads;
|
D_PAD* pad = Module->m_Pads;
|
||||||
for( ; pad != NULL; pad = pad->Next() )
|
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 )
|
if( pad->m_Drill.x == 0 )
|
||||||
continue;
|
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_Tool_Reference = -1; // Flag is: Not initialized
|
||||||
new_hole.m_Hole_Orient = pad->m_Orient;
|
new_hole.m_Hole_Orient = pad->m_Orient;
|
||||||
new_hole.m_Hole_Shape = 0; // hole shape: round
|
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_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 )
|
if( pad->m_DrillShape != PAD_CIRCLE )
|
||||||
new_hole.m_Hole_Shape = 1; // oval flag set
|
new_hole.m_Hole_Shape = 1; // oval flag set
|
||||||
new_hole.m_Hole_SizeX = pad->m_Drill.x;
|
new_hole.m_Hole_Size = pad->m_Drill;
|
||||||
new_hole.m_Hole_SizeY = pad->m_Drill.y;
|
new_hole.m_Hole_Pos = pad->m_Pos; // hole position
|
||||||
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_Bottom_Layer = LAYER_N_BACK;
|
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 );
|
aHoleListBuffer.push_back( new_hole );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,8 @@
|
||||||
|
|
||||||
const wxString DrillFileExtension( wxT( "drl" ) );
|
const wxString DrillFileExtension( wxT( "drl" ) );
|
||||||
const wxString DrillFileWildcard( _( "Drill files (*.drl)|*.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
|
* Creates the drill files in EXCELLON format
|
||||||
|
@ -81,12 +83,12 @@ static std::vector<DRILL_TOOL> s_ToolListBuffer;
|
||||||
static std::vector<HOLE_INFO> s_HoleListBuffer;
|
static std::vector<HOLE_INFO> s_HoleListBuffer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* This function displays the dialog frame for drill tools
|
/* This function displays the dialog frame for drill tools
|
||||||
*/
|
*/
|
||||||
void PCB_EDIT_FRAME::InstallDrillFrame( wxCommandEvent& event )
|
void PCB_EDIT_FRAME::InstallDrillFrame( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
DIALOG_GENDRILL dlg( this );
|
DIALOG_GENDRILL dlg( this );
|
||||||
|
|
||||||
dlg.ShowModal();
|
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
|
* 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 all holes are through, only one excellon file is created.
|
||||||
* >When there are some partial holes (some blind or buried vias),
|
* >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
|
* and one file per layer pair, which have one or more holes, excluding
|
||||||
* through holes, already in the first file.
|
* 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;
|
wxFileName fn;
|
||||||
wxString layer_extend; /* added to the Board FileName to
|
wxString layer_extend; /* added to the Board FileName to
|
||||||
|
@ -113,26 +116,33 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( )
|
||||||
int layer1 = LAYER_N_BACK;
|
int layer1 = LAYER_N_BACK;
|
||||||
int layer2 = LAYER_N_FRONT;
|
int layer2 = LAYER_N_FRONT;
|
||||||
bool gen_through_holes = true;
|
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();
|
m_Parent->MsgPanel->EraseMsgBox();
|
||||||
|
|
||||||
if( m_MicroViasCount || m_BlindOrBuriedViasCount )
|
if( m_microViasCount || m_blindOrBuriedViasCount )
|
||||||
hasBuriedVias = true;
|
hasBuriedVias = true;
|
||||||
|
|
||||||
for( ; ; )
|
for( ; ; )
|
||||||
{
|
{
|
||||||
Build_Holes_List( m_Parent->GetBoard(), s_HoleListBuffer,
|
Build_Holes_List( m_Parent->GetBoard(), s_HoleListBuffer,
|
||||||
s_ToolListBuffer, layer1, layer2,
|
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();
|
fn = m_Parent->GetScreen()->GetFileName();
|
||||||
layer_extend.Empty();
|
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 )
|
if( layer1 == LAYER_N_BACK )
|
||||||
layer_extend << wxT( "-copper" );
|
layer_extend << wxT( "-copper" );
|
||||||
|
@ -147,9 +157,9 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( )
|
||||||
fn.SetName( fn.GetName() + layer_extend );
|
fn.SetName( fn.GetName() + layer_extend );
|
||||||
fn.SetExt( DrillFileExtension );
|
fn.SetExt( DrillFileExtension );
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Save Drill File" ), fn.GetPath(),
|
wxFileDialog dlg( this, _( "Save Drill File" ), ::wxGetCwd(),
|
||||||
fn.GetFullName(), DrillFileWildcard,
|
fn.GetFullName(), wxGetTranslation( DrillFileWildcard ),
|
||||||
wxFD_SAVE );
|
wxFD_SAVE | wxFD_CHANGE_DIR );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
break;
|
break;
|
||||||
|
@ -158,11 +168,13 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( )
|
||||||
|
|
||||||
if( aFile == 0 )
|
if( aFile == 0 )
|
||||||
{
|
{
|
||||||
msg = _( "Unable to create file " ) + dlg.GetPath();
|
msg.Printf( _( "Unable to create drill file %s" ), GetChars( dlg.GetPath() ) );
|
||||||
DisplayError( this, msg );
|
wxMessageBox( msg );
|
||||||
|
::wxSetWorkingDirectory( currentWD );
|
||||||
EndModal( 0 );
|
EndModal( 0 );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXCELLON_WRITER excellonWriter( m_Parent->GetBoard(),
|
EXCELLON_WRITER excellonWriter( m_Parent->GetBoard(),
|
||||||
aFile, m_FileDrillOffset,
|
aFile, m_FileDrillOffset,
|
||||||
&s_HoleListBuffer, &s_ToolListBuffer );
|
&s_HoleListBuffer, &s_ToolListBuffer );
|
||||||
|
@ -170,7 +182,7 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( )
|
||||||
(EXCELLON_WRITER::zeros_fmt) m_ZerosFormat,
|
(EXCELLON_WRITER::zeros_fmt) m_ZerosFormat,
|
||||||
m_Precision.m_lhs, m_Precision.m_rhs );
|
m_Precision.m_lhs, m_Precision.m_rhs );
|
||||||
excellonWriter.SetOptions( m_Mirror, m_MinimalHeader, m_FileDrillOffset );
|
excellonWriter.SetOptions( m_Mirror, m_MinimalHeader, m_FileDrillOffset );
|
||||||
excellonWriter.CreateDrillFile( );
|
excellonWriter.CreateDrillFile();
|
||||||
|
|
||||||
switch( m_Choice_Drill_Map->GetSelection() )
|
switch( m_Choice_Drill_Map->GetSelection() )
|
||||||
{
|
{
|
||||||
|
@ -197,16 +209,26 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( )
|
||||||
PLOT_FORMAT_DXF );
|
PLOT_FORMAT_DXF );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( gen_NPTH_holes ) // The last drill file was created
|
||||||
|
break;
|
||||||
|
|
||||||
if( !hasBuriedVias )
|
if( !hasBuriedVias )
|
||||||
break;
|
gen_NPTH_holes = true;
|
||||||
}
|
else
|
||||||
|
{
|
||||||
if( gen_through_holes )
|
if( gen_through_holes )
|
||||||
layer2 = layer1 + 1;
|
layer2 = layer1 + 1; // prepare generation of first layer pair
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider
|
if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider
|
||||||
break;
|
{
|
||||||
|
layer1 = LAYER_N_BACK;
|
||||||
|
layer2 = LAYER_N_FRONT;
|
||||||
|
gen_NPTH_holes = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
layer1++;
|
layer1++;
|
||||||
layer2++; // use next layer pair
|
layer2++; // use next layer pair
|
||||||
|
|
||||||
|
@ -217,11 +239,15 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( )
|
||||||
|
|
||||||
gen_through_holes = false;
|
gen_through_holes = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( m_Choice_Drill_Report->GetSelection() > 0 )
|
if( m_Choice_Drill_Report->GetSelection() > 0 )
|
||||||
{
|
{
|
||||||
GenDrillReport( m_Parent->GetScreen()->GetFileName() );
|
fn = m_Parent->GetScreen()->GetFileName();
|
||||||
|
GenDrillReport( fn.GetFullName() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::wxSetWorkingDirectory( currentWD );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -229,7 +255,7 @@ void DIALOG_GENDRILL::GenDrillAndReportFiles( )
|
||||||
* Create the drill file in EXCELLON format
|
* Create the drill file in EXCELLON format
|
||||||
* @return hole count
|
* @return hole count
|
||||||
*/
|
*/
|
||||||
int EXCELLON_WRITER::CreateDrillFile( )
|
int EXCELLON_WRITER::CreateDrillFile()
|
||||||
{
|
{
|
||||||
int diam, holes_count;
|
int diam, holes_count;
|
||||||
int x0, y0, xf, yf, xc, yc;
|
int x0, y0, xf, yf, xc, yc;
|
||||||
|
@ -238,7 +264,7 @@ int EXCELLON_WRITER::CreateDrillFile( )
|
||||||
|
|
||||||
SetLocaleTo_C_standard(); // Use the standard notation for double numbers
|
SetLocaleTo_C_standard(); // Use the standard notation for double numbers
|
||||||
|
|
||||||
WriteHeader( );
|
WriteHeader();
|
||||||
|
|
||||||
holes_count = 0;
|
holes_count = 0;
|
||||||
|
|
||||||
|
@ -278,8 +304,8 @@ int EXCELLON_WRITER::CreateDrillFile( )
|
||||||
fprintf( m_file, "T%d\n", tool_reference );
|
fprintf( m_file, "T%d\n", tool_reference );
|
||||||
}
|
}
|
||||||
|
|
||||||
x0 = hole_descr.m_Hole_Pos_X - m_offset.x;
|
x0 = hole_descr.m_Hole_Pos.x - m_offset.x;
|
||||||
y0 = hole_descr.m_Hole_Pos_Y - m_offset.y;
|
y0 = hole_descr.m_Hole_Pos.y - m_offset.y;
|
||||||
|
|
||||||
if( !m_mirror )
|
if( !m_mirror )
|
||||||
y0 *= -1;
|
y0 *= -1;
|
||||||
|
@ -307,24 +333,24 @@ int EXCELLON_WRITER::CreateDrillFile( )
|
||||||
fprintf( m_file, "T%d\n", tool_reference );
|
fprintf( m_file, "T%d\n", tool_reference );
|
||||||
}
|
}
|
||||||
|
|
||||||
diam = MIN( hole_descr.m_Hole_SizeX,
|
diam = MIN( hole_descr.m_Hole_Size.x,
|
||||||
hole_descr.m_Hole_SizeY );
|
hole_descr.m_Hole_Size.y );
|
||||||
if( diam == 0 )
|
if( diam == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Compute the hole coordinates: */
|
/* Compute the hole coordinates: */
|
||||||
xc = x0 = xf = hole_descr.m_Hole_Pos_X - m_offset.x;
|
xc = x0 = xf = hole_descr.m_Hole_Pos.x - m_offset.x;
|
||||||
yc = y0 = yf = hole_descr.m_Hole_Pos_Y - m_offset.y;
|
yc = y0 = yf = hole_descr.m_Hole_Pos.y - m_offset.y;
|
||||||
|
|
||||||
/* Compute the start and end coordinates for the shape */
|
/* 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;
|
y0 -= delta; yf += delta;
|
||||||
}
|
}
|
||||||
else
|
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;
|
x0 -= delta; xf += delta;
|
||||||
}
|
}
|
||||||
RotatePoint( &x0, &y0, xc, yc, hole_descr.m_Hole_Orient );
|
RotatePoint( &x0, &y0, xc, yc, hole_descr.m_Hole_Orient );
|
||||||
|
@ -359,13 +385,14 @@ int EXCELLON_WRITER::CreateDrillFile( )
|
||||||
holes_count++;
|
holes_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteEndOfFile( );
|
WriteEndOfFile();
|
||||||
|
|
||||||
SetLocaleTo_Default(); // Revert to locale double notation
|
SetLocaleTo_Default(); // Revert to locale double notation
|
||||||
|
|
||||||
return holes_count;
|
return holes_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SetFormat
|
* SetFormat
|
||||||
* Initialize internal parameters to match the given format
|
* Initialize internal parameters to match the given format
|
||||||
|
@ -374,7 +401,10 @@ int EXCELLON_WRITER::CreateDrillFile( )
|
||||||
* @param aLeftDigits = number of digits for integer part of coordinates
|
* @param aLeftDigits = number of digits for integer part of coordinates
|
||||||
* @param aRightDigits = number of digits for mantissa 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_unitsDecimal = aMetric;
|
||||||
m_zeroFormat = aZerosFmt;
|
m_zeroFormat = aZerosFmt;
|
||||||
|
@ -389,11 +419,12 @@ void EXCELLON_WRITER::SetFormat( bool aMetric, zeros_fmt aZerosFmt, int aLeftDig
|
||||||
m_precision.m_rhs = aRightDigits;
|
m_precision.m_rhs = aRightDigits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Created a line like:
|
/* Created a line like:
|
||||||
* X48000Y19500
|
* X48000Y19500
|
||||||
* According to the selected format
|
* 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;
|
wxString xs, ys;
|
||||||
int xpad = m_precision.m_lhs + m_precision.m_rhs;
|
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
|
* FMAT,2
|
||||||
* INCH,TZ
|
* INCH,TZ
|
||||||
*/
|
*/
|
||||||
void EXCELLON_WRITER::WriteHeader( )
|
void EXCELLON_WRITER::WriteHeader()
|
||||||
{
|
{
|
||||||
char Line[256];
|
char Line[256];
|
||||||
|
|
||||||
|
@ -537,7 +568,7 @@ void EXCELLON_WRITER::WriteHeader( )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EXCELLON_WRITER::WriteEndOfFile( )
|
void EXCELLON_WRITER::WriteEndOfFile()
|
||||||
{
|
{
|
||||||
//add if minimal here
|
//add if minimal here
|
||||||
fputs( "T0\nM30\n", m_file );
|
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(),
|
wxFileDialog dlg( this, _( "Save Drill Plot File" ), fn.GetPath(),
|
||||||
fn.GetFullName(), wildcard,
|
fn.GetFullName(), wildcard,
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
wxFD_SAVE );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
return;
|
return;
|
||||||
|
@ -602,7 +633,7 @@ void DIALOG_GENDRILL::GenDrillMap( const wxString aFileName,
|
||||||
{
|
{
|
||||||
msg = _( "Unable to create file" );
|
msg = _( "Unable to create file" );
|
||||||
msg << wxT( " <" ) << dlg.GetPath() << wxT( ">" );
|
msg << wxT( " <" ) << dlg.GetPath() << wxT( ">" );
|
||||||
DisplayError( this, msg );
|
wxMessageBox( msg );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -624,15 +655,14 @@ void DIALOG_GENDRILL::GenDrillReport( const wxString aFileName )
|
||||||
{
|
{
|
||||||
wxFileName fn;
|
wxFileName fn;
|
||||||
wxString msg;
|
wxString msg;
|
||||||
wxString wildcard = _( "Drill report files (.rpt)|*.rpt" );
|
|
||||||
|
|
||||||
fn = aFileName;
|
fn = aFileName;
|
||||||
fn.SetName( fn.GetName() + wxT( "-drl" ) );
|
fn.SetName( fn.GetName() + wxT( "-drl" ) );
|
||||||
fn.SetExt( wxT( "rpt" ) );
|
fn.SetExt( RptFileExtension );
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Save Drill Report File" ), fn.GetPath(),
|
wxFileDialog dlg( this, _( "Save Drill Report File" ), fn.GetPath(),
|
||||||
fn.GetFullName(), wildcard,
|
fn.GetFullName(), wxGetTranslation( RptFileWildcard ),
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
wxFD_SAVE );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
return;
|
return;
|
||||||
|
@ -642,7 +672,7 @@ void DIALOG_GENDRILL::GenDrillReport( const wxString aFileName )
|
||||||
if( report_dest == 0 )
|
if( report_dest == 0 )
|
||||||
{
|
{
|
||||||
msg = _( "Unable to create file " ) + dlg.GetPath();
|
msg = _( "Unable to create file " ) + dlg.GetPath();
|
||||||
DisplayError( this, msg );
|
wxMessageBox( msg );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
class HOLE_INFO
|
||||||
{
|
{
|
||||||
public:
|
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_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
|
wxSize m_Hole_Size; // hole size for oblong holes
|
||||||
int m_Hole_SizeY; // hole size y for oblong holes
|
|
||||||
int m_Hole_Orient; // Hole rotation (= pad rotation) 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_Shape; // hole shape: round (0) or oval (1)
|
||||||
int m_Hole_Pos_X; // hole position X
|
wxPoint m_Hole_Pos; // hole position
|
||||||
int m_Hole_Pos_Y; // hole position Y
|
int m_Hole_Bottom_Layer; // hole starting layer (usually back layer)
|
||||||
int m_Hole_Bottom_Layer; // hole starting layer (usually copper)
|
int m_Hole_Top_Layer; // hole ending layer (usually front layer):
|
||||||
int m_Hole_Top_Layer; // hole ending layer (usually component): m_Hole_First_Layer < m_Hole_Last_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<DRILL_TOOL> to fill with tools to use
|
* @param aToolListBuffer : the std::vector<DRILL_TOOL> to fill with tools to use
|
||||||
* @param aFirstLayer = first layer to consider. if < 0 aFirstLayer is ignored
|
* @param aFirstLayer = first layer to consider. if < 0 aFirstLayer is ignored
|
||||||
* @param aLastLayer = last layer to consider. if < 0 aLastLayer 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<HOLE_INFO>& aHoleListBuffer,
|
void Build_Holes_List( BOARD* aPcb, std::vector<HOLE_INFO>& aHoleListBuffer,
|
||||||
std::vector<DRILL_TOOL>& aToolListBuffer,
|
std::vector<DRILL_TOOL>& aToolListBuffer,
|
||||||
int aFirstLayer, int aLastLayer, bool aExcludeThroughHoles );
|
int aFirstLayer, int aLastLayer, bool aExcludeThroughHoles,
|
||||||
|
bool aGenerateNPTH_list );
|
||||||
|
|
||||||
void GenDrillMapFile( BOARD* aPcb,
|
void GenDrillMapFile( BOARD* aPcb,
|
||||||
FILE* aFile,
|
FILE* aFile,
|
||||||
|
|
|
@ -169,8 +169,9 @@ private:
|
||||||
/**
|
/**
|
||||||
* Function loadNewModules
|
* Function loadNewModules
|
||||||
* Load from libraries new modules found in netlist and add them to the current Board.
|
* 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
|
* function readModuleComponentLinkfile
|
||||||
|
@ -417,7 +418,9 @@ bool NETLIST_READER::ReadNetList( FILE* aFile,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load new footprints */
|
/* Load new footprints */
|
||||||
loadNewModules();
|
bool success = loadNewModules();
|
||||||
|
if( ! success )
|
||||||
|
wxMessageBox( _("Some footprints are not found in libraries") );
|
||||||
|
|
||||||
/* Second read , All footprints are on board.
|
/* Second read , All footprints are on board.
|
||||||
* One must update the schematic info (pad netnames)
|
* One must update the schematic info (pad netnames)
|
||||||
|
@ -1042,16 +1045,18 @@ bool NETLIST_READER::readModuleComponentLinkfile( const wxString* aCmpIdent,
|
||||||
/* Load new modules from library.
|
/* Load new modules from library.
|
||||||
* If a new module is already loaded it is duplicated, which avoids multiple
|
* If a new module is already loaded it is duplicated, which avoids multiple
|
||||||
* unnecessary disk or net access to read libraries.
|
* 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_INFO* ref, * cmp;
|
||||||
MODULE* Module = NULL;
|
MODULE* Module = NULL;
|
||||||
wxPoint ModuleBestPosition;
|
wxPoint ModuleBestPosition;
|
||||||
BOARD* pcb = m_pcbframe->GetBoard();
|
BOARD* pcb = m_pcbframe->GetBoard();
|
||||||
|
bool success = true;
|
||||||
|
|
||||||
if( m_newModulesList.size() == 0 )
|
if( m_newModulesList.size() == 0 )
|
||||||
return;
|
return true;
|
||||||
|
|
||||||
sort( m_newModulesList.begin(), m_newModulesList.end(), SortByLibName );
|
sort( m_newModulesList.begin(), m_newModulesList.end(), SortByLibName );
|
||||||
|
|
||||||
|
@ -1075,10 +1080,17 @@ void NETLIST_READER::loadNewModules()
|
||||||
ref = cmp;
|
ref = cmp;
|
||||||
if( Module == NULL )
|
if( Module == NULL )
|
||||||
{
|
{
|
||||||
|
success = false;
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "Component [%s]: footprint <%s> not found" ),
|
msg.Printf( _( "Component [%s]: footprint <%s> not found" ),
|
||||||
GetChars( cmp->m_CmpName ),
|
GetChars( cmp->m_CmpName ),
|
||||||
GetChars( cmp->m_LibName ) );
|
GetChars( cmp->m_LibName ) );
|
||||||
|
if( m_messageWindow )
|
||||||
|
{
|
||||||
|
msg += wxT("\n");
|
||||||
|
m_messageWindow->AppendText( msg );
|
||||||
|
}
|
||||||
|
else
|
||||||
DisplayError( NULL, msg );
|
DisplayError( NULL, msg );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1108,4 +1120,6 @@ void NETLIST_READER::loadNewModules()
|
||||||
Module->m_Path = cmp->m_TimeStampPath;
|
Module->m_Path = cmp->m_TimeStampPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
|
||||||
layerSelection = LAYER_BACK | LAYER_FRONT
|
layerSelection = LAYER_BACK | LAYER_FRONT
|
||||||
| SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK;
|
| SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK;
|
||||||
useGerberExtensions = true;
|
useGerberExtensions = true;
|
||||||
|
m_SkipNPTH_Pads = false;
|
||||||
m_ExcludeEdgeLayer = true;
|
m_ExcludeEdgeLayer = true;
|
||||||
m_PlotLineWidth = g_DrawDefaultLineThickness;
|
m_PlotLineWidth = g_DrawDefaultLineThickness;
|
||||||
m_PlotFrameRef = false;
|
m_PlotFrameRef = false;
|
||||||
|
|
|
@ -59,6 +59,8 @@ public:
|
||||||
bool m_PlotPSNegative; // True to create a negative board ps plot
|
bool m_PlotPSNegative; // True to create a negative board ps plot
|
||||||
|
|
||||||
// Flags to enable or disable ploting of various PCB elements.
|
// 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_PlotReference;
|
||||||
bool m_PlotValue;
|
bool m_PlotValue;
|
||||||
bool m_PlotTextOther;
|
bool m_PlotTextOther;
|
||||||
|
|
|
@ -681,7 +681,8 @@ void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, GRTraceMode trace_
|
||||||
case LAYER_N_14:
|
case LAYER_N_14:
|
||||||
case LAYER_N_15:
|
case LAYER_N_15:
|
||||||
case LAST_COPPER_LAYER:
|
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
|
// Adding drill marks, if required and if the plotter is able to plot
|
||||||
// them:
|
// them:
|
||||||
|
@ -738,7 +739,8 @@ void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, GRTraceMode trace_
|
||||||
void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter,
|
void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter,
|
||||||
int aLayerMask,
|
int aLayerMask,
|
||||||
bool aPlotVia,
|
bool aPlotVia,
|
||||||
GRTraceMode aPlotMode )
|
GRTraceMode aPlotMode,
|
||||||
|
bool aSkipNPTH_Pads )
|
||||||
{
|
{
|
||||||
wxPoint pos;
|
wxPoint pos;
|
||||||
wxSize size;
|
wxSize size;
|
||||||
|
@ -772,8 +774,7 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DisplayError( this,
|
wxMessageBox( wxT( "Plot_Standard_Layer() error : Unexpected Draw Type" ) );
|
||||||
wxT( "Plot_Standard_Layer() error : Unexpected Draw Type" ) );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -838,10 +839,18 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter,
|
||||||
switch( pad->m_PadShape )
|
switch( pad->m_PadShape )
|
||||||
{
|
{
|
||||||
case PAD_CIRCLE:
|
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 );
|
aPlotter->flash_pad_circle( pos, size.x, aPlotMode );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PAD_OVAL:
|
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 );
|
aPlotter->flash_pad_oval( pos, size, pad->m_Orient, aPlotMode );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -61,12 +61,18 @@ bool PCB_BASE_FRAME::Genere_GERBER( const wxString& FullFileName, int Layer,
|
||||||
|
|
||||||
if( plotter->start_plot( output_file ) )
|
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
|
// Sheet refs on gerber CAN be useful... and they're always 1:1
|
||||||
if( g_PcbPlotOptions.m_PlotFrameRef )
|
if( g_PcbPlotOptions.m_PlotFrameRef )
|
||||||
PlotWorkSheet( plotter, GetScreen() );
|
PlotWorkSheet( plotter, GetScreen() );
|
||||||
|
|
||||||
Plot_Layer( plotter, Layer, trace_mode );
|
Plot_Layer( plotter, Layer, trace_mode );
|
||||||
plotter->end_plot();
|
plotter->end_plot();
|
||||||
|
|
||||||
|
g_PcbPlotOptions.m_SkipNPTH_Pads = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
else // error in start_plot( ): failed opening a temporary file
|
else // error in start_plot( ): failed opening a temporary file
|
||||||
|
|
Loading…
Reference in New Issue