2010-11-24 19:54:59 +00:00
|
|
|
/**
|
|
|
|
*@file dialog_gendrill.h
|
|
|
|
*/
|
2010-11-24 15:10:33 +00:00
|
|
|
|
2010-11-24 19:54:59 +00:00
|
|
|
/*
|
2011-09-30 18:15:37 +00:00
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
2010-11-24 19:54:59 +00:00
|
|
|
*
|
2010-11-26 11:55:34 +00:00
|
|
|
* Copyright (C) 1992-2010 Jean_Pierre Charras <jp.charras@ujf-grenoble.fr>
|
2011-09-30 18:15:37 +00:00
|
|
|
* Copyright (C) 1992-2010 KiCad Developers, see change_log.txt for contributors.
|
2010-11-24 19:54:59 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
2010-11-24 15:10:33 +00:00
|
|
|
|
2012-04-05 18:27:56 +00:00
|
|
|
#ifndef DIALOG_GENDRILL_H_
|
|
|
|
#define DIALOG_GENDRILL_H_
|
2010-11-24 15:10:33 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <dialog_gendrill_base.h>
|
2010-11-24 15:10:33 +00:00
|
|
|
|
|
|
|
class DIALOG_GENDRILL : public DIALOG_GENDRILL_BASE
|
|
|
|
{
|
|
|
|
public:
|
2012-04-05 18:27:56 +00:00
|
|
|
DIALOG_GENDRILL( PCB_EDIT_FRAME* parent );
|
|
|
|
~DIALOG_GENDRILL();
|
|
|
|
|
2010-11-24 19:54:59 +00:00
|
|
|
static int m_UnitDrillIsInch;
|
|
|
|
static int m_ZerosFormat;
|
|
|
|
static bool m_MinimalHeader;
|
|
|
|
static bool m_Mirror;
|
2014-03-03 14:28:05 +00:00
|
|
|
static bool m_Merge_PTH_NPTH;
|
2010-11-24 19:54:59 +00:00
|
|
|
static bool m_DrillOriginIsAuxAxis; /* Axis selection (main / auxiliary)
|
|
|
|
* for drill origin coordinates */
|
2012-08-29 12:40:09 +00:00
|
|
|
DRILL_PRECISION m_Precision; // Selected precision for drill files
|
|
|
|
wxPoint m_FileDrillOffset; // Drill offset: 0,0 for absolute coordinates,
|
|
|
|
// or origin of the auxiliary axis
|
2010-11-24 15:10:33 +00:00
|
|
|
|
2012-04-05 18:27:56 +00:00
|
|
|
|
2010-11-24 15:10:33 +00:00
|
|
|
private:
|
2012-04-05 18:27:56 +00:00
|
|
|
PCB_EDIT_FRAME* m_parent;
|
2012-10-05 12:25:12 +00:00
|
|
|
wxConfig* m_config;
|
2012-04-05 18:27:56 +00:00
|
|
|
BOARD* m_board;
|
2012-10-05 12:25:12 +00:00
|
|
|
PCB_PLOT_PARAMS m_plotOpts;
|
2012-04-05 18:27:56 +00:00
|
|
|
|
2011-08-19 13:08:24 +00:00
|
|
|
int m_platedPadsHoleCount;
|
|
|
|
int m_notplatedPadsHoleCount;
|
|
|
|
int m_throughViasCount;
|
|
|
|
int m_microViasCount;
|
|
|
|
int m_blindOrBuriedViasCount;
|
2012-04-05 18:27:56 +00:00
|
|
|
|
2012-10-05 12:25:12 +00:00
|
|
|
static int m_mapFileType; // HPGL, PS ...
|
2010-11-24 15:10:33 +00:00
|
|
|
|
2010-11-24 19:54:59 +00:00
|
|
|
|
|
|
|
void initDialog();
|
|
|
|
void InitDisplayParams( void );
|
|
|
|
|
2010-11-24 15:10:33 +00:00
|
|
|
// event functions
|
2010-11-24 19:54:59 +00:00
|
|
|
void OnSelDrillUnitsSelected( wxCommandEvent& event );
|
|
|
|
void OnSelZerosFmtSelected( wxCommandEvent& event );
|
2014-03-03 14:28:05 +00:00
|
|
|
void OnGenDrillFile( wxCommandEvent& event );
|
|
|
|
void OnGenMapFile( wxCommandEvent& event );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a plain text report file giving a list of drill values and drill count
|
|
|
|
* for through holes, oblong holes, and for buried vias,
|
|
|
|
* drill values and drill count per layer pair
|
|
|
|
*/
|
|
|
|
void OnGenReportFile( wxCommandEvent& event );
|
|
|
|
|
2010-11-24 19:54:59 +00:00
|
|
|
void OnCancelClick( wxCommandEvent& event );
|
2012-10-05 12:25:12 +00:00
|
|
|
void OnOutputDirectoryBrowseClicked( wxCommandEvent& event );
|
2010-11-24 19:54:59 +00:00
|
|
|
|
2010-11-24 15:10:33 +00:00
|
|
|
// Specific functions:
|
2010-11-24 19:54:59 +00:00
|
|
|
void SetParams( void );
|
2014-03-03 14:28:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GenDrillAndMapFiles
|
|
|
|
* Calls the functions to create EXCELLON drill files and/or drill map files
|
|
|
|
* >When all holes are through holes, only one excellon file is created.
|
|
|
|
* >When there are some partial holes (some blind or buried vias),
|
|
|
|
* one excellon file is created, for all plated through holes,
|
|
|
|
* and one file per layer pair, which have one or more holes, excluding
|
|
|
|
* through holes, already in the first file.
|
|
|
|
* one file for all Not Plated through holes
|
|
|
|
*/
|
|
|
|
void GenDrillAndMapFiles( bool aGenDrill, bool aGenMap );
|
|
|
|
|
2012-10-05 12:25:12 +00:00
|
|
|
void GenDrillMap( const wxString aFileName,
|
|
|
|
EXCELLON_WRITER& aExcellonWriter,
|
|
|
|
PlotFormat format );
|
|
|
|
|
2010-11-24 19:54:59 +00:00
|
|
|
void UpdatePrecisionOptions();
|
|
|
|
void UpdateConfig();
|
2012-10-05 12:25:12 +00:00
|
|
|
int Create_Drill_File_EXCELLON( FILE* aFile,
|
|
|
|
wxPoint aOffset );
|
|
|
|
int Gen_Liste_Tools( std::vector<DRILL_TOOL>& buffer,
|
|
|
|
bool print_header );
|
2010-11-24 19:54:59 +00:00
|
|
|
|
2010-11-24 15:10:33 +00:00
|
|
|
/**
|
|
|
|
* Return the selected format for coordinates, if not decimal
|
|
|
|
*/
|
|
|
|
DRILL_PRECISION GetPrecison();
|
|
|
|
};
|
|
|
|
|
2012-04-05 18:27:56 +00:00
|
|
|
#endif // DIALOG_GENDRILL_H_
|