48 IDF_ERROR(
const char* aSourceFile,
const char* aSourceMethod,
int aSourceLine,
49 const std::string& aMessage )
noexcept;
53 virtual const
char*
what() const noexcept override;
225void GetOutline( std::list<IDF_SEGMENT*>& aLines,
IDF_OUTLINE& aOutline );
245 void SetText(
const std::string& aText );
255 void SetSize(
double aHeight,
double aLength );
270 void GetSize(
double& aHeight,
double& aLength );
332 const std::string& aRefDes,
333 const std::string& aHoleType,
345 bool Matches(
double aDrillDia,
double aPosX,
double aPosY )
const;
447 bool Matches(
const IDF_POINT& aPoint,
double aRadius = 1e-5 )
const;
455 double CalcDistance(
const IDF_POINT& aPoint )
const;
615 std::list<IDF_SEGMENT*>::iterator
begin()
623 std::list<IDF_SEGMENT*>::iterator
end()
void write(std::ostream &aBoardFile, IDF3::IDF_UNIT aBoardUnit)
Write a single line representing a hole within a .DRILLED_HOLES section.
double GetDrillXPos() const
IDF3::KEY_PLATING GetDrillPlating()
double GetDrillYPos() const
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_DR...
double GetDrillDia() const
const std::string & GetDrillRefDes()
const std::string & GetDrillHoleType()
IDF3::KEY_OWNER GetDrillOwner() const
IDF_DRILL_DATA()
Create an empty drill entry which can be populated by the read() function.
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.
friend class IDF3_COMPONENT
IDF3::KEY_PLATING plating
const std::string & GetText()
void SetSize(double aHeight, double aLength)
Set the height and length (mm) of the NOTE entry.
bool readNote(std::istream &aBoardFile, IDF3::FILE_STATE &aBoardState, IDF3::IDF_UNIT aBoardUnit)
Read a note entry from an IDFv3 file.
void GetPosition(double &aXpos, double &aYpos)
bool writeNote(std::ostream &aBoardFile, IDF3::IDF_UNIT aBoardUnit)
Write a note entry to an IDFv3 file.
void SetPosition(double aXpos, double aYpos)
Set the position (mm) of the NOTE entry.
void GetSize(double &aHeight, double &aLength)
void SetText(const std::string &aText)
Set the text to be stored as a NOTE entry.
A segment and winding information for an IDF outline.
std::list< IDF_SEGMENT * >::iterator end()
std::list< IDF_SEGMENT * >::iterator begin()
std::list< IDF_SEGMENT * > outline
void Clear()
Clear the internal list of outline segments.
A point as used by the various IDF related classes.
IDF_POINT(double aX, double aY)
A segment as used in IDFv3 outlines.
double radius
radius of the arc or circle; internally calculated
void CalcCenterAndRadius()
IDF_POINT endPoint
end point coordinates in mm
bool MatchesEnd(const IDF_POINT &aPoint, double aRadius=1e-3)
Return true if the given coordinate is within a radius 'rad' of the end point.
IDF_POINT startPoint
starting point coordinates in mm
void SwapEnds()
Swap the start and end points and alters internal variables as necessary for arcs.
double angle
included angle (degrees) according to IDFv3 specification
IDF_SEGMENT()
Initialize the internal variables.
bool MatchesStart(const IDF_POINT &aPoint, double aRadius=1e-3)
Return true if the given coordinate is within a radius 'rad' of the start point.
double offsetAngle
angle between center and start of arc; internally calculated
IDF_POINT center
center of an arc or circle; internally calculated and not to be set by the user.
FILE_STATE
State values for the IDF parser's input.
KEY_REFDES
A component's Reference Designator.
KEY_PLATING
The plating condition of a hole.
IDF_PLACEMENT
The placement status of a component.
CAD_TYPE
The class of CAD program which is opening or modifying a file.
OUTLINE_TYPE
The class of outline.
IDF_VERSION
The supported IDF versions (3.0 and 2.0 ONLY).
IDF_UNIT
The native unit of the board and of component outlines.
IDF_LAYER
The various IDF layer classes and groupings.
KEY_OWNER
The type of CAD which has ownership an object.
KEY_HOLETYPE
The purpose of an IDF hole.
COMP_TYPE
Whether a component is a mechanical or electrical part.
virtual const char * what() const noexcept override
IDF_ERROR(const char *aSourceFile, const char *aSourceMethod, int aSourceLine, const std::string &aMessage) noexcept
virtual ~IDF_ERROR() noexcept