Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
c425aeb3
Commit
c425aeb3
authored
Jan 18, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svn ps svn:eol-style native
parent
a3ea4268
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
908 additions
and
908 deletions
+908
-908
gen_drill_report_files.cpp
pcbnew/gen_drill_report_files.cpp
+676
-676
gen_holes_and_tools_lists_for_drill.cpp
pcbnew/gen_holes_and_tools_lists_for_drill.cpp
+138
-138
gendrill.h
pcbnew/gendrill.h
+94
-94
No files found.
pcbnew/gen_drill_report_files.cpp
View file @
c425aeb3
This diff is collapsed.
Click to expand it.
pcbnew/gen_holes_and_tools_lists_for_drill.cpp
View file @
c425aeb3
This diff is collapsed.
Click to expand it.
pcbnew/gendrill.h
View file @
c425aeb3
/*******************************************************************************/
/*******************************************************************************/
/* classes and functions declaration unsed in drill file and report generation */
/* classes and functions declaration unsed in drill file and report generation */
/*******************************************************************************/
/*******************************************************************************/
#ifndef GENDRILL_H
#ifndef GENDRILL_H
#define GENDRILL_H
#define GENDRILL_H
/* the DRILL_TOOL class handle tools used in the excellon drill file */
/* the DRILL_TOOL class handle tools used in the excellon drill file */
class
DRILL_TOOL
class
DRILL_TOOL
{
{
public
:
public
:
int
m_Diameter
;
// the diameter of the used tool (for oblong, the smaller size)
int
m_Diameter
;
// the diameter of the used tool (for oblong, the smaller size)
int
m_TotalCount
;
// how many times it is used (round and oblong)
int
m_TotalCount
;
// how many times it is used (round and oblong)
int
m_OvalCount
;
// oblong count
int
m_OvalCount
;
// oblong count
public
:
public
:
DRILL_TOOL
(
int
diametre
)
DRILL_TOOL
(
int
diametre
)
{
{
m_TotalCount
=
0
;
m_TotalCount
=
0
;
m_OvalCount
=
0
;
m_OvalCount
=
0
;
m_Diameter
=
diametre
;
m_Diameter
=
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) */
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
int
m_Hole_SizeX
;
// hole size x for oblong holes
int
m_Hole_SizeY
;
// hole size y 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
int
m_Hole_Pos_X
;
// hole position X
int
m_Hole_Pos_Y
;
// hole position Y
int
m_Hole_Pos_Y
;
// hole position Y
int
m_Hole_Bottom_Layer
;
// hole starting layer (usually copper)
int
m_Hole_Bottom_Layer
;
// hole starting layer (usually copper)
int
m_Hole_Top_Layer
;
// hole ending layer (usually component): m_Hole_First_Layer < m_Hole_Last_Layer
int
m_Hole_Top_Layer
;
// hole ending layer (usually component): m_Hole_First_Layer < m_Hole_Last_Layer
};
};
/* the DrillPrecision class to handle drill precision format in excellon files*/
/* the DrillPrecision class to handle drill precision format in excellon files*/
class
DrillPrecision
class
DrillPrecision
{
{
public
:
public
:
int
m_lhs
;
int
m_lhs
;
int
m_rhs
;
int
m_rhs
;
public
:
public
:
DrillPrecision
(
int
l
,
int
r
)
{
m_lhs
=
l
;
m_rhs
=
r
;
}
DrillPrecision
(
int
l
,
int
r
)
{
m_lhs
=
l
;
m_rhs
=
r
;
}
};
};
/* zeros format */
/* zeros format */
enum
zeros_fmt
{
enum
zeros_fmt
{
DECIMAL_FORMAT
,
DECIMAL_FORMAT
,
SUPPRESS_LEADING
,
SUPPRESS_LEADING
,
SUPPRESS_TRAILING
,
SUPPRESS_TRAILING
,
KEEP_ZEROS
KEEP_ZEROS
};
};
/**
/**
* 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
* @param Pcb : the given board
* @param Pcb : the given board
* @param aHoleListBuffer : the std::vector<HOLE_INFO> to fill with pcb info
* @param aHoleListBuffer : the std::vector<HOLE_INFO> to fill with pcb 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
*/
*/
void
Build_Holes_List
(
BOARD
*
Pcb
,
std
::
vector
<
HOLE_INFO
>&
aHoleListBuffer
,
void
Build_Holes_List
(
BOARD
*
Pcb
,
std
::
vector
<
HOLE_INFO
>&
aHoleListBuffer
,
std
::
vector
<
DRILL_TOOL
>&
aToolListBuffer
,
std
::
vector
<
DRILL_TOOL
>&
aToolListBuffer
,
int
aFirstLayer
,
int
aLastLayer
);
int
aFirstLayer
,
int
aLastLayer
);
void
GenDrillMapFile
(
BOARD
*
aPcb
,
void
GenDrillMapFile
(
BOARD
*
aPcb
,
FILE
*
aFile
,
FILE
*
aFile
,
const
wxString
&
aFullFileName
,
const
wxString
&
aFullFileName
,
wxSize
aSheetSize
,
wxSize
aSheetSize
,
std
::
vector
<
HOLE_INFO
>
aHoleListBuffer
,
std
::
vector
<
HOLE_INFO
>
aHoleListBuffer
,
std
::
vector
<
DRILL_TOOL
>
aToolListBuffer
,
std
::
vector
<
DRILL_TOOL
>
aToolListBuffer
,
bool
aUnit_Drill_is_Inch
,
bool
aUnit_Drill_is_Inch
,
int
format
);
int
format
);
void
Gen_Drill_PcbMap
(
BOARD
*
aPcb
,
FILE
*
aFile
,
void
Gen_Drill_PcbMap
(
BOARD
*
aPcb
,
FILE
*
aFile
,
std
::
vector
<
HOLE_INFO
>&
aHoleListBuffer
,
std
::
vector
<
HOLE_INFO
>&
aHoleListBuffer
,
std
::
vector
<
DRILL_TOOL
>&
aToolListBuffer
,
std
::
vector
<
DRILL_TOOL
>&
aToolListBuffer
,
int
format
);
int
format
);
/*
/*
* Create a list of drill values and drill count
* Create a list of drill values and drill count
*/
*/
void
GenDrillReportFile
(
FILE
*
aFile
,
const
wxString
&
aBoardFilename
,
void
GenDrillReportFile
(
FILE
*
aFile
,
const
wxString
&
aBoardFilename
,
std
::
vector
<
DRILL_TOOL
>&
aToolListBuffer
,
bool
aUnit_Drill_is_Inch
);
std
::
vector
<
DRILL_TOOL
>&
aToolListBuffer
,
bool
aUnit_Drill_is_Inch
);
#endif // #ifndef GENDRILL_H
#endif // #ifndef GENDRILL_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment