|
KiCad PCB EDA Suite
|
#include <idf_common.h>
Public Member Functions | |
| IDF_DRILL_DATA () | |
| Create an empty drill entry which can be populated by the read() function. | |
| IDF_DRILL_DATA (double aDrillDia, double aPosX, double aPosY, IDF3::KEY_PLATING aPlating, const std::string &aRefDes, const std::string &aHoleType, IDF3::KEY_OWNER aOwner) | |
| Create a drill entry with information compliant with the IDFv3 specifications. | |
| bool | Matches (double aDrillDia, double aPosX, double aPosY) const |
| Return true if the given drill diameter and location matches the diameter and location of this IDF_DRILL_DATA object. | |
| double | GetDrillDia () const |
| double | GetDrillXPos () const |
| double | GetDrillYPos () const |
| IDF3::KEY_PLATING | GetDrillPlating () |
| const std::string & | GetDrillRefDes () |
| const std::string & | GetDrillHoleType () |
| IDF3::KEY_OWNER | GetDrillOwner () const |
Private Member Functions | |
| bool | read (std::istream &aBoardFile, IDF3::IDF_UNIT aBoardUnit, IDF3::FILE_STATE aBoardState, IDF3::IDF_VERSION aIdfVersion) |
| Read a drill entry from an IDFv3 file. | |
| void | write (std::ostream &aBoardFile, IDF3::IDF_UNIT aBoardUnit) |
| Write a single line representing a hole within a .DRILLED_HOLES section. | |
Private Attributes | |
| double | dia |
| double | x |
| double | y |
| IDF3::KEY_PLATING | plating |
| IDF3::KEY_REFDES | kref |
| IDF3::KEY_HOLETYPE | khole |
| std::string | refdes |
| std::string | holetype |
| IDF3::KEY_OWNER | owner |
Friends | |
| class | IDF3_BOARD |
| class | IDF3_COMPONENT |
A drilled hole.
Responsible for writing this information to a file in compliance with the IDFv3 specification.
Definition at line 311 of file idf_common.h.
| IDF_DRILL_DATA::IDF_DRILL_DATA | ( | ) |
Create an empty drill entry which can be populated by the read() function.
Definition at line 320 of file idf_common.cpp.
References dia, khole, kref, IDF3::MTG, IDF3::NOREFDES, IDF3::NPTH, owner, plating, IDF3::UNOWNED, x, and y.
| IDF_DRILL_DATA::IDF_DRILL_DATA | ( | double | aDrillDia, |
| double | aPosX, | ||
| double | aPosY, | ||
| IDF3::KEY_PLATING | aPlating, | ||
| const std::string & | aRefDes, | ||
| const std::string & | aHoleType, | ||
| IDF3::KEY_OWNER | aOwner ) |
Create a drill entry with information compliant with the IDFv3 specifications.
| aDrillDia | is the drill diameter. |
| aPosX | is the X coordinate of the drill center. |
| aPosY | is the Y coordinate of the drill center. |
| aPlating | is a plating flag, PTH or NPTH. |
| aRefDes | is the component Reference Designator. |
| aHoleType | is the type of hole. |
| aOwner | is one of MCAD, ECAD, UNOWNED. |
Definition at line 332 of file idf_common.cpp.
References IDF3::BOARD, dia, holetype, khole, kref, IDF3::MTG, IDF3::NOREFDES, IDF3::OTHER, owner, IDF3::PANEL, IDF3::PIN, plating, IDF3::REFDES, refdes, IDF3::TOOL, IDF3::VIA, x, and y.
| double IDF_DRILL_DATA::GetDrillDia | ( | ) | const |
| const std::string & IDF_DRILL_DATA::GetDrillHoleType | ( | ) |
Definition at line 781 of file idf_common.cpp.
References holetype, khole, IDF3::OTHER, IDF3::PIN, IDF3::TOOL, and IDF3::VIA.
|
inline |
Definition at line 379 of file idf_common.h.
References owner.
| IDF3::KEY_PLATING IDF_DRILL_DATA::GetDrillPlating | ( | ) |
Definition at line 761 of file idf_common.cpp.
References plating.
| const std::string & IDF_DRILL_DATA::GetDrillRefDes | ( | ) |
Definition at line 767 of file idf_common.cpp.
References IDF3::BOARD, kref, IDF3::PANEL, IDF3::REFDES, and refdes.
Referenced by IDF3_BOARD::addCompDrill(), IDF3_BOARD::AddDrill(), and IDF3_COMPONENT::AddDrill().
| double IDF_DRILL_DATA::GetDrillXPos | ( | ) | const |
| double IDF_DRILL_DATA::GetDrillYPos | ( | ) | const |
| bool IDF_DRILL_DATA::Matches | ( | double | aDrillDia, |
| double | aPosX, | ||
| double | aPosY ) const |
Return true if the given drill diameter and location matches the diameter and location of this IDF_DRILL_DATA object.
| aDrillDia | is the drill diameter (mm). |
| aPosX | is the X position (mm) of the drilled hole. |
| aPosY | is the Y position (mm) of the drilled hole. |
Definition at line 389 of file idf_common.cpp.
References dia, IDF_POINT::Matches(), x, IDF_POINT::x, y, and IDF_POINT::y.
|
private |
Read a drill entry from an IDFv3 file.
| aBoardFile | is an open IDFv3 file; the file position must be within the DRILLED_HOLES section. |
| aBoardUnit | is the board file's native unit (MM or THOU). |
| aBoardState | is the state value of the parser. |
| in | case of an unrecoverable error. |
Definition at line 406 of file idf_common.cpp.
References IDF3::BOARD, IDF3::CompareToken(), dia, IDF3::FetchIDFLine(), IDF3::GetIDFString(), holetype, IDF_MIN_DIA_MM, IDF_MIN_DIA_THOU, IDF_MIN_DIA_TNM, IDF_THOU_TO_MM, IDF_TNM_TO_MM, IDF3::IDF_V2, khole, kref, IDF3::MTG, IDF3::NOREFDES, IDF3::NPTH, IDF3::OTHER, owner, IDF3::PANEL, IDF3::ParseOwner(), IDF3::PIN, plating, IDF3::PTH, IDF3::REFDES, refdes, IDF3::TOOL, IDF3::UNIT_MM, IDF3::UNIT_THOU, IDF3::UNIT_TNM, IDF3::UNOWNED, IDF3::VIA, x, and y.
Referenced by IDF3_COMPONENT, and IDF3_BOARD::readBrdDrills().
|
private |
Write a single line representing a hole within a .DRILLED_HOLES section.
| aBoardFile | is an open BOARD file |
| aBoardUnit | is the native unit of the output file |
| in | case of an unrecoverable error. |
Definition at line 690 of file idf_common.cpp.
References IDF3::BOARD, dia, IDF3::ECAD, holetype, IDF_THOU_TO_MM, khole, kref, IDF3::MCAD, IDF3::OTHER, owner, IDF3::PANEL, IDF3::PIN, plating, IDF3::PTH, IDF3::REFDES, refdes, IDF3::TOOL, IDF3::UNIT_MM, IDF3::VIA, x, and y.
Referenced by IDF3_COMPONENT.
|
friend |
|
friend |
Definition at line 386 of file idf_common.h.
References IDF3_COMPONENT, read(), and write().
Referenced by IDF3_COMPONENT.
|
private |
Definition at line 410 of file idf_common.h.
Referenced by GetDrillDia(), IDF_DRILL_DATA(), IDF_DRILL_DATA(), Matches(), read(), and write().
|
private |
Definition at line 417 of file idf_common.h.
Referenced by GetDrillHoleType(), IDF_DRILL_DATA(), read(), and write().
|
private |
Definition at line 415 of file idf_common.h.
Referenced by GetDrillHoleType(), IDF_DRILL_DATA(), IDF_DRILL_DATA(), read(), and write().
|
private |
Definition at line 414 of file idf_common.h.
Referenced by GetDrillRefDes(), IDF_DRILL_DATA(), IDF_DRILL_DATA(), read(), and write().
|
private |
Definition at line 418 of file idf_common.h.
Referenced by GetDrillOwner(), IDF_DRILL_DATA(), IDF_DRILL_DATA(), read(), and write().
|
private |
Definition at line 413 of file idf_common.h.
Referenced by GetDrillPlating(), IDF_DRILL_DATA(), IDF_DRILL_DATA(), read(), and write().
|
private |
Definition at line 416 of file idf_common.h.
Referenced by GetDrillRefDes(), IDF_DRILL_DATA(), read(), and write().
|
private |
Definition at line 411 of file idf_common.h.
Referenced by GetDrillXPos(), IDF_DRILL_DATA(), IDF_DRILL_DATA(), Matches(), read(), and write().
|
private |
Definition at line 412 of file idf_common.h.
Referenced by GetDrillYPos(), IDF_DRILL_DATA(), IDF_DRILL_DATA(), Matches(), read(), and write().