Pcbnew, dialog create drill file: remove option to merge plated holes and not plated holes:

reasons: 
* This option is called "bad practice" in gerber files format specifications and is even forbidden in gerber drill files.
* Generates problems with some board makers because these holes are not identified in a single NC file.
* No one was able to explain us how to identified them in a single NC file.
* Recent change in drill file generation is not compatible with merged holes (minor reason)
This commit is contained in:
unknown 2015-10-26 08:43:30 +01:00 committed by jean-pierre charras
parent c721c21bdf
commit 1af9b46ada
8 changed files with 12 additions and 125 deletions

View File

@ -50,7 +50,6 @@
#define PrecisionKey wxT( "DrilltPrecisionOpt" )
#define MirrorKey wxT( "DrillMirrorYOpt" )
#define MinimalHeaderKey wxT( "DrillMinHeader" )
#define MergePTHNPTHKey wxT( "DrillMergePTHNPTH" )
#define UnitDrillInchKey wxT( "DrillUnit" )
#define DrillOriginIsAuxAxisKey wxT( "DrillAuxAxis" )
#define DrillMapFileTypeKey wxT( "DrillMapFileType" )
@ -91,7 +90,6 @@ int DIALOG_GENDRILL::m_UnitDrillIsInch = true;
int DIALOG_GENDRILL::m_ZerosFormat = EXCELLON_WRITER::DECIMAL_FORMAT;
bool DIALOG_GENDRILL::m_MinimalHeader = false;
bool DIALOG_GENDRILL::m_Mirror = false;
bool DIALOG_GENDRILL::m_Merge_PTH_NPTH = false;
bool DIALOG_GENDRILL::m_DrillOriginIsAuxAxis = false;
int DIALOG_GENDRILL::m_mapFileType = 1;
@ -106,7 +104,6 @@ void DIALOG_GENDRILL::initDialog()
{
m_config->Read( ZerosFormatKey, &m_ZerosFormat );
m_config->Read( MirrorKey, &m_Mirror );
m_config->Read( MergePTHNPTHKey, &m_Merge_PTH_NPTH );
m_config->Read( MinimalHeaderKey, &m_MinimalHeader );
m_config->Read( UnitDrillInchKey, &m_UnitDrillIsInch );
m_config->Read( DrillOriginIsAuxAxisKey, &m_DrillOriginIsAuxAxis );
@ -129,7 +126,6 @@ void DIALOG_GENDRILL::InitDisplayParams()
m_Choice_Drill_Offset->SetSelection( 1 );
m_Check_Mirror->SetValue( m_Mirror );
m_Check_Merge_PTH_NPTH->SetValue( m_Merge_PTH_NPTH );
m_Choice_Drill_Map->SetSelection( m_mapFileType );
m_ViaDrillValue->SetLabel( _( "Use Netclasses values" ) );
m_MicroViaDrillValue->SetLabel( _( "Use Netclasses values" ) );
@ -231,7 +227,6 @@ void DIALOG_GENDRILL::UpdateConfig()
m_config->Write( ZerosFormatKey, m_ZerosFormat );
m_config->Write( MirrorKey, m_Mirror );
m_config->Write( MinimalHeaderKey, m_MinimalHeader );
m_config->Write( MergePTHNPTHKey, m_Merge_PTH_NPTH );
m_config->Write( UnitDrillInchKey, m_UnitDrillIsInch );
m_config->Write( DrillOriginIsAuxAxisKey, m_DrillOriginIsAuxAxis );
m_config->Write( DrillMapFileTypeKey, m_mapFileType );
@ -333,7 +328,6 @@ void DIALOG_GENDRILL::SetParams()
m_UnitDrillIsInch = (m_Choice_Unit->GetSelection() == 0) ? false : true;
m_MinimalHeader = m_Check_Minimal->IsChecked();
m_Mirror = m_Check_Mirror->IsChecked();
m_Merge_PTH_NPTH = m_Check_Merge_PTH_NPTH->IsChecked();
m_ZerosFormat = m_Choice_Zeros_Format->GetSelection();
m_DrillOriginIsAuxAxis = m_Choice_Drill_Offset->GetSelection();
@ -373,7 +367,7 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap)
excellonWriter.SetFormat( !m_UnitDrillIsInch,
(EXCELLON_WRITER::ZEROS_FMT) m_ZerosFormat,
m_Precision.m_lhs, m_Precision.m_rhs );
excellonWriter.SetOptions( m_Mirror, m_MinimalHeader, m_FileDrillOffset, m_Merge_PTH_NPTH );
excellonWriter.SetOptions( m_Mirror, m_MinimalHeader, m_FileDrillOffset );
excellonWriter.SetMapFileFormat( filefmt[choice] );
excellonWriter.CreateDrillandMapFilesSet( defaultPath, aGenDrill, aGenMap,
@ -406,7 +400,7 @@ void DIALOG_GENDRILL::OnGenReportFile( wxCommandEvent& event )
excellonWriter.SetFormat( !m_UnitDrillIsInch,
(EXCELLON_WRITER::ZEROS_FMT) m_ZerosFormat,
m_Precision.m_lhs, m_Precision.m_rhs );
excellonWriter.SetOptions( m_Mirror, m_MinimalHeader, m_FileDrillOffset, m_Merge_PTH_NPTH );
excellonWriter.SetOptions( m_Mirror, m_MinimalHeader, m_FileDrillOffset );
bool success = excellonWriter.GenDrillReportFile( dlg.GetPath() );

View File

@ -41,7 +41,6 @@ public:
static int m_ZerosFormat;
static bool m_MinimalHeader;
static bool m_Mirror;
static bool m_Merge_PTH_NPTH;
static bool m_DrillOriginIsAuxAxis; /* Axis selection (main / auxiliary)
* for drill origin coordinates */
DRILL_PRECISION m_Precision; // Selected precision for drill files

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Mar 9 2015)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -88,9 +88,6 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con
m_Check_Minimal = new wxCheckBox( this, wxID_ANY, _("Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
sbOptSizer->Add( m_Check_Minimal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_Check_Merge_PTH_NPTH = new wxCheckBox( this, wxID_ANY, _("Merge PTH and NPTH holes into one file"), wxDefaultPosition, wxDefaultSize, 0 );
sbOptSizer->Add( m_Check_Merge_PTH_NPTH, 0, wxALL, 5 );
bMiddleBoxSizer->Add( sbOptSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );

View File

@ -881,94 +881,6 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Merge PTH and NPTH holes into one file</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_Check_Merge_PTH_NPTH</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Mar 9 2015)
// C++ code generated with wxFormBuilder (version Jun 6 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -48,7 +48,6 @@ class DIALOG_GENDRILL_BASE : public DIALOG_SHIM
wxRadioBox* m_Choice_Drill_Map;
wxCheckBox* m_Check_Mirror;
wxCheckBox* m_Check_Minimal;
wxCheckBox* m_Check_Merge_PTH_NPTH;
wxRadioBox* m_Choice_Drill_Offset;
wxStaticBoxSizer* m_DefaultViasDrillSizer;
wxStaticText* m_ViaDrillValue;

View File

@ -328,7 +328,7 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName )
{
LAYER_PAIR pair = hole_sets[pair_ndx];
BuildHolesList( pair, false, false );
BuildHolesList( pair, false );
if( pair == LAYER_PAIR( F_Cu, B_Cu ) )
{
@ -360,7 +360,7 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName )
}
// NPTHoles:
BuildHolesList( LAYER_PAIR( F_Cu, B_Cu ), true, false );
BuildHolesList( LAYER_PAIR( F_Cu, B_Cu ), true );
// if( m_toolListBuffer.size() ) nothing wrong with an empty NPTH file.
{

View File

@ -67,7 +67,6 @@ EXCELLON_WRITER::EXCELLON_WRITER( BOARD* aPcb )
m_conversionUnits = 0.0001;
m_unitsDecimal = true;
m_mirror = false;
m_merge_PTH_NPTH = false;
m_minimalHeader = false;
m_ShortHeader = false;
m_mapFileFmt = PLOT_FORMAT_PDF;
@ -93,7 +92,7 @@ void EXCELLON_WRITER::CreateDrillandMapFilesSet( const wxString& aPlotDirectory
LAYER_PAIR pair = *it;
bool doing_npth = ( it == hole_sets.end() - 1 );
BuildHolesList( pair, doing_npth, m_merge_PTH_NPTH );
BuildHolesList( pair, doing_npth );
if( GetHolesCount() > 0 ) // has holes?
{
@ -537,8 +536,7 @@ static bool CmpHoleDiameterValue( const HOLE_INFO& a, const HOLE_INFO& b )
void EXCELLON_WRITER::BuildHolesList( LAYER_PAIR aLayerPair,
bool aGenerateNPTH_list,
bool aMerge_PTH_NPTH )
bool aGenerateNPTH_list )
{
HOLE_INFO new_hole;
@ -547,11 +545,6 @@ void EXCELLON_WRITER::BuildHolesList( LAYER_PAIR aLayerPair,
wxASSERT( aLayerPair.first < aLayerPair.second ); // fix the caller
if( aGenerateNPTH_list && aMerge_PTH_NPTH )
{
return;
}
// build hole list for vias
if( ! aGenerateNPTH_list ) // vias are always plated !
{
@ -590,9 +583,7 @@ void EXCELLON_WRITER::BuildHolesList( LAYER_PAIR aLayerPair,
{
for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() )
{
if( ! aGenerateNPTH_list &&
pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED &&
! aMerge_PTH_NPTH )
if( !aGenerateNPTH_list && pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED )
continue;
if( aGenerateNPTH_list && pad->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED )

View File

@ -145,7 +145,6 @@ private:
// (i.e inches or mm)
bool m_mirror;
wxPoint m_offset; // Drill offset coordinates
bool m_merge_PTH_NPTH;
std::vector<HOLE_INFO> m_holeListBuffer; // Buffer containing holes
std::vector<DRILL_TOOL> m_toolListBuffer; // Buffer containing tools
@ -204,14 +203,12 @@ public:
* @param aMirror = true to create mirrored coordinates (Y coordinates negated)
* @param aMinimalHeader = true to use a minimal header (no comments, no info)
* @param aOffset = drill coordinates offset
* @param aMerge_PTH_NPTH : true to create only one list which contains both PTH and NPTH
*/
void SetOptions( bool aMirror, bool aMinimalHeader, wxPoint aOffset, bool aMerge_PTH_NPTH )
void SetOptions( bool aMirror, bool aMinimalHeader, wxPoint aOffset )
{
m_mirror = aMirror;
m_offset = aOffset;
m_minimalHeader = aMinimalHeader;
m_merge_PTH_NPTH = aMerge_PTH_NPTH;
}
/**
@ -226,11 +223,9 @@ public:
* @param aGenerateNPTH_list :
* true to create NPTH only list (with no plated holes)
* false to created plated holes list (with no NPTH )
* @param aMerge_PTH_NPTH : true to create only one list which contains both PTH and NPTH
*/
void BuildHolesList( LAYER_PAIR aLayerPair,
bool aGenerateNPTH_list,
bool aMerge_PTH_NPTH );
bool aGenerateNPTH_list );
int GetHolesCount() const { return m_holeListBuffer.size(); }