88 double aXoff,
double aYoff,
double aZoff,
double aAngleOff );
102 bool SetOffsets(
double aXoff,
double aYoff,
double aZoff,
double aAngleOff );
112 void GetOffsets(
double& aXoff,
double& aYoff,
double& aZoff,
double& aAngleOff );
146#ifndef DISABLE_IDF_OWNERSHIP
165 bool aNoSubstituteOutlines );
179 void writePlaceData( std::ostream& aBoardFile,
double aXpos,
double aYpos,
double aAngle,
235 bool SetRefDes(
const std::string& aRefDes );
257 const std::string& aHoleType,
282 bool DelDrill(
double aDia,
double aXpos,
double aYpos );
300 const std::list<IDF_DRILL_DATA*>*
GetDrills(
void );
400#ifndef DISABLE_IDF_OWNERSHIP
442 bool ReadFile(
const wxString& aFullFileName,
bool aNoSubstituteOutlines =
false );
539 const std::string& aHoleType,
544 bool DelBoardDrill(
double aDia,
double aXpos,
double aYpos );
549 bool AddSlot(
double aWidth,
double aLength,
double aOrientation,
double aX,
double aY );
555 std::map< std::string, IDF3_COMPONENT* >*
GetComponents(
void );
569 const std::string& aPartName );
574 const std::string& aPartName );
591 const std::string& aHoleType,
593 const std::string& aRefDes );
597 bool delCompDrill(
double aDia,
double aXpos,
double aYpos,
const std::string& aRefDes );
607 bool aNoSubstituteOutlines );
616 bool aNoSubstituteOutlines );
618 void readBoardFile(
const std::string& aFileName,
bool aNoSubstituteOutlines );
635#ifndef DISABLE_IDF_OWNERSHIP
IDFv3 BOARD OUTLINE data and is the basis of other IDFv3 outline objects.
void GetUserOffset(double &aXoff, double &aYoff)
bool WriteFile(const wxString &aFullFileName, IDF3::IDF_UNIT aUnits, REPORTER *aReporter=nullptr)
std::list< std::string > m_uidLibList
std::list< IDF_DRILL_DATA * > m_drills
void readLibFile(const std::string &aFileName)
void readLibSection(std::istream &aLibFile, IDF3::FILE_STATE &aLibState, IDF3_BOARD *aBoard)
std::list< VIA_KO_OUTLINE * > m_viaKeepoutOutlines
bool SetBoardThickness(double aBoardThickness)
bool SetLibraryVersion(int aVersion)
std::map< std::string, OTHER_OUTLINE * > m_otherOutlines
bool setUnit(IDF3::IDF_UNIT aUnit, bool convert=false)
std::list< std::string > m_placeComments
IDF3_COMP_OUTLINE * GetComponentOutline(const wxString &aFullFileName)
const std::string & GetNewRefDes(void)
std::map< std::string, IDF3_COMP_OUTLINE * > m_componentOutlines
const std::string & GetBoardDate(void) const
std::list< IDF_NOTE * > m_notes
double GetUserScale(void) const
int GetBoardVersion(void) const
bool writeLibFile(const std::string &aFileName)
const std::string & GetLibrarySource(void) const
int GetLibraryVersion(void) const
void SetUserOffset(double aXoff, double aYoff)
const std::string & GetLibraryDate(void) const
void readBrdNotes(std::istream &aBoardFile, IDF3::FILE_STATE &aBoardState)
std::map< std::string, std::string > m_uidFileList
std::list< PLACE_OUTLINE * > m_placeOutlines
const std::string & GetIDFSource(void) const
const std::string & GetError(void)
std::list< ROUTE_KO_OUTLINE * > m_routeKeepoutOutlines
IDF3::CAD_TYPE GetCadType(void)
std::string m_refDesString
std::multimap< std::string, GROUP_OUTLINE * > m_groupOutlines
bool DelBoardOutline(IDF_OUTLINE *aOutline)
IDF_DRILL_DATA * AddBoardDrill(double aDia, double aXpos, double aYpos, IDF3::KEY_PLATING aPlating, const std::string &aHoleType, IDF3::KEY_OWNER aOwner)
IDF3::IDF_VERSION m_idfVer
bool ReadFile(const wxString &aFullFileName, bool aNoSubstituteOutlines=false)
void SetIDFSource(const std::string &aIDFSource)
bool delCompDrill(double aDia, double aXpos, double aYpos, const std::string &aRefDes)
void writeBoardFile(const std::string &aFileName)
std::map< std::string, IDF3_COMPONENT * > * GetComponents(void)
IDF3_COMPONENT * FindComponent(const std::string &aRefDes)
std::list< IDF_DRILL_DATA * > & GetBoardDrills(void)
XXX - TO BE IMPLEMENTED.
IDF_DRILL_DATA * AddDrill(IDF_DRILL_DATA *aDrilledHole)
void readBrdHeader(std::istream &aBoardFile, IDF3::FILE_STATE &aBoardState)
size_t GetComponentsSize(void)
double GetBoardThickness(void)
const std::string & GetBoardSource(void) const
void readLibHeader(std::istream &aLibFile, IDF3::FILE_STATE &aLibState)
const std::map< std::string, OTHER_OUTLINE * > * GetOtherOutlines(void) const
int GetUserPrecision(void) const
bool AddComponent(IDF3_COMPONENT *aComponent)
void readBrdDrills(std::istream &aBoardFile, IDF3::FILE_STATE &aBoardState)
size_t GetBoardOutlinesSize(void)
bool SetUserScale(double aScaleFactor)
std::list< ROUTE_OUTLINE * > m_routeOutlines
bool checkComponentOwnership(int aSourceLine, const char *aSourceFunc, IDF3_COMPONENT *aComponent)
void readBoardFile(const std::string &aFileName, bool aNoSubstituteOutlines)
const std::string & GetBoardName(void) const
void readBrdPlacement(std::istream &aBoardFile, IDF3::FILE_STATE &aBoardState, bool aNoSubstituteOutlines)
void readBrdSection(std::istream &aBoardFile, IDF3::FILE_STATE &aBoardState, bool aNoSubstituteOutlines)
IDF3::IDF_UNIT GetUnit(void) const
void SetBoardName(const std::string &aBoardName)
bool SetUserPrecision(int aPrecision)
std::list< PLACE_KO_OUTLINE * > m_placeKeepoutOutlines
bool DelBoardDrill(double aDia, double aXpos, double aYpos)
BOARD_OUTLINE m_boardOutline
IDF3_BOARD(IDF3::CAD_TYPE aCadType)
IDF3_COMP_OUTLINE * GetInvalidOutline(const std::string &aGeomName, const std::string &aPartName)
std::list< std::string > m_drillComments
bool DelComponent(IDF3_COMPONENT *aComponent)
bool AddSlot(double aWidth, double aLength, double aOrientation, double aX, double aY)
bool SetBoardVersion(int aVersion)
bool AddBoardOutline(IDF_OUTLINE *aOutline)
std::map< std::string, IDF3_COMPONENT * > m_components
BOARD_OUTLINE * GetBoardOutline(void)
IDF_DRILL_DATA * addCompDrill(double aDia, double aXpos, double aYpos, IDF3::KEY_PLATING aPlating, const std::string &aHoleType, IDF3::KEY_OWNER aOwner, const std::string &aRefDes)
std::list< std::string > m_noteComments
const std::list< IDF3_COMP_OUTLINE_DATA * > * GetOutlinesData(void)
IDF3::IDF_PLACEMENT placement
const std::string & GetRefDes(void)
Retrieve the Reference Designator (RefDes) of this component.
bool SetPlacement(IDF3::IDF_PLACEMENT aPlacementValue)
Set the placement value of the component subject to ownership rules.
bool writeDrillData(std::ostream &aBoardFile)
Write the internal drill data to an IDFv3 .DRILLED_HOLES section.
const std::string & GetError(void)
bool DeleteOutlineData(IDF3_COMP_OUTLINE_DATA *aComponentOutline)
Remove outline data based on the pointer provided.
std::list< IDF_DRILL_DATA * > drills
IDF3_COMPONENT(IDF3_BOARD *aParent)
Set the parent object and initializes other internal parameters to default values.
bool SetPosition(double aXpos, double aYpos, double aAngle, IDF3::IDF_LAYER aLayer)
Set the internal position parameters and returns true if the position was set, false if the position ...
std::list< IDF3_COMP_OUTLINE_DATA * > components
const std::list< IDF_DRILL_DATA * > * GetDrills(void)
Return the internal list of drills.
bool SetRefDes(const std::string &aRefDes)
Set the Reference Designator (RefDes) of this component.
void SetParent(IDF3_BOARD *aParent)
Set the parent object.
IDF3::IDF_UNIT GetUnit(void)
IDF3::CAD_TYPE GetCadType(void)
bool hasPosition
True after SetPosition is called once.
bool checkOwnership(int aSourceLine, const char *aSourceFunc)
bool writePlaceData(std::ostream &aBoardFile)
Write the component placement data to an IDFv3 .PLACEMENT section.
IDF_DRILL_DATA * AddDrill(double aDia, double aXpos, double aYpos, IDF3::KEY_PLATING aPlating, const std::string &aHoleType, IDF3::KEY_OWNER aOwner)
Add a drill entry to the component and returns its pointer.
std::string refdes
Reference Description (MUST BE UNIQUE)
size_t GetOutlinesSize(void)
bool GetPosition(double &aXpos, double &aYpos, double &aAngle, IDF3::IDF_LAYER &aLayer)
Retrieve the internal position parameters and returns true if the position was previously set,...
bool DelDrill(double aDia, double aXpos, double aYpos)
Delete a drill entry based on its size and location.
IDF3::IDF_PLACEMENT GetPlacement(void)
bool AddOutlineData(IDF3_COMP_OUTLINE_DATA *aComponentOutline)
Add the given component outline data to this component.
bool checkOwnership(int aSourceLine, const char *aSourceFunc)
bool readPlaceData(std::istream &aBoardFile, IDF3::FILE_STATE &aBoardState, IDF3_BOARD *aBoard, IDF3::IDF_VERSION aIdfVersion, bool aNoSubstituteOutlines)
Read placement data from an open IDFv3 file.
void GetOffsets(double &aXoff, double &aYoff, double &aZoff, double &aAngleOff)
Retrieve the position and orientation of this outline item in relation to its parent.
IDF3_COMP_OUTLINE * outline
void writePlaceData(std::ostream &aBoardFile, double aXpos, double aYpos, double aAngle, const std::string &aRefDes, IDF3::IDF_PLACEMENT aPlacement, IDF3::IDF_LAYER aSide)
Write RECORD 2 and RECORD 3 of a PLACEMENT section as per IDFv3 specification.
IDF3_COMP_OUTLINE_DATA()
Create an object with default settings and no parent or associated outline.
~IDF3_COMP_OUTLINE_DATA()
void SetParent(IDF3_COMPONENT *aParent)
Set the parent object.
const std::string & GetError(void)
bool SetOutline(IDF3_COMP_OUTLINE *aOutline)
Set the outline whose position is managed by this object.
IDF3_COMP_OUTLINE * GetOutline(void)
Retrieve the outline whose position is managed by this object.
bool SetOffsets(double aXoff, double aYoff, double aZoff, double aAngleOff)
Set the position and orientation of this outline item in relation to its parent.
friend class IDF3_COMPONENT
A component's outline as stored in an IDF library file.
A segment and winding information for an IDF outline.
A pure virtual class used to derive REPORTER objects from.
FILE_STATE
State values for the IDF parser's input.
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.
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.