KiCad PCB EDA Suite
Loading...
Searching...
No Matches
VIA_KO_OUTLINE Class Reference

Region in which vias are prohibited. More...

#include <idf_outlines.h>

Inheritance diagram for VIA_KO_OUTLINE:
OTHER_OUTLINE BOARD_OUTLINE

Public Member Functions

 VIA_KO_OUTLINE (IDF3_BOARD *aParent)
 
virtual bool SetOutlineIdentifier (const std::string &aUniqueID)
 Function SetOutlineIdentifier sets the Outline Identifier string of this OTHER_OUTLINE object as per IDFv3 spec.
 
virtual const std::string & GetOutlineIdentifier (void)
 Function GetOutlineIdentifier returns the object's Outline Identifier.
 
virtual bool SetSide (IDF3::IDF_LAYER aSide)
 Function SetSide sets the side which this outline is applicable to (TOP, BOTTOM).
 
virtual IDF3::IDF_LAYER GetSide (void)
 Function GetSide returns the side which this outline is applicable to.
 
virtual bool Clear (void) override
 Function Clear deletes internal data except for the parent object.
 
virtual bool SetUnit (IDF3::IDF_UNIT aUnit)
 Function SetUnit sets the native unit of the outline; except for component outlines this must be the same as the native unit of the parent IDF_BOARD object.
 
virtual IDF3::IDF_UNIT GetUnit (void)
 Return the native unit type of the outline.
 
virtual bool SetThickness (double aThickness)
 Set the thickness or height of the outline (mm).
 
virtual double GetThickness (void)
 
IDF3::OUTLINE_TYPE GetOutlineType (void)
 
IDF3_BOARD * GetParent (void)
 
bool AddOutline (IDF_OUTLINE *aOutline)
 Add the specified outline to this object.
 
bool DelOutline (IDF_OUTLINE *aOutline)
 Remove the given outline, subject to IDF ownership rules, if it is owned by this object.
 
bool DelOutline (size_t aIndex)
 Delete the outline specified by the given index, subject to IDF ownership rules.
 
const std::list< IDF_OUTLINE * > * GetOutlines (void)
 Return outlines list.
 
size_t OutlinesSize (void)
 
IDF_OUTLINE * GetOutline (size_t aIndex)
 Return a pointer to the outline as specified by aIndex.
 
IDF3::KEY_OWNER GetOwner (void)
 
bool SetOwner (IDF3::KEY_OWNER aOwner)
 Set the ownership status of the outline subject to IDF ownership rules.
 
bool IsSingle (void)
 
void ClearOutlines (void)
 Clear internal data except for the parent pointer.
 
void AddComment (const std::string &aComment)
 Add a comment to the outline data.
 
size_t CommentsSize (void)
 
std::list< std::string > * GetComments (void)
 
const std::string * GetComment (size_t aIndex)
 
bool DeleteComment (size_t aIndex)
 Deletes a comment based on the given index.
 
void ClearComments (void)
 Deletes all comments.
 
const std::string & GetError (void)
 

Protected Member Functions

void readOutlines (std::istream &aBoardFile, IDF3::IDF_VERSION aIdfVersion)
 
bool writeComments (std::ostream &aBoardFile)
 
bool writeOwner (std::ostream &aBoardFile)
 
void writeOutline (std::ostream &aBoardFile, IDF_OUTLINE *aOutline, size_t aIndex)
 
void writeOutlines (std::ostream &aBoardFile)
 
void clearOutlines (void)
 
void setParent (IDF3_BOARD *aParent)
 Set the parent IDF_BOARD object.
 
bool addOutline (IDF_OUTLINE *aOutline)
 
virtual bool setThickness (double aThickness)
 
virtual void clear (void)
 

Protected Attributes

std::string errormsg
 
std::list< IDF_OUTLINE * > outlines
 
IDF3::KEY_OWNER owner
 
IDF3::OUTLINE_TYPE outlineType
 
bool single
 
std::list< std::string > comments
 
IDF3::IDF_UNIT unit
 
IDF3_BOARD * parent
 
double thickness
 

Private Member Functions

virtual void readData (std::istream &aBoardFile, const std::string &aHeader, IDF3::IDF_VERSION aIdfVersion) override
 Read an OTHER_OUTLINE data from an IDFv3 file.
 
virtual void writeData (std::ostream &aBoardFile) override
 Write the OTHER_OUTLINE data to an open IDFv3 file.
 

Private Attributes

std::string uniqueID
 
IDF3::IDF_LAYER side
 

Detailed Description

Region in which vias are prohibited.

Note
IDFv3 only considers thru-hole vias and makes no statement regarding behavior with blind or buried vias.

Definition at line 528 of file idf_outlines.h.

Constructor & Destructor Documentation

◆ VIA_KO_OUTLINE()

Member Function Documentation

◆ AddComment()

void BOARD_OUTLINE::AddComment ( const std::string & aComment)
inherited

Add a comment to the outline data.

This function is not subject to IDF ownership rules.

Definition at line 1520 of file idf_outlines.cpp.

References comments.

Referenced by IDF3_BOARD::GetComponentOutline(), IDF3_BOARD::readBrdSection(), and IDF3_BOARD::readLibSection().

◆ AddOutline()

bool BOARD_OUTLINE::AddOutline ( IDF_OUTLINE * aOutline)
inherited

Add the specified outline to this object.

Parameters
aOutlineis a valid IDF outline.
Returns
true if the outline was added; false if the outline already existed or an ownership violation occurs.

Definition at line 1326 of file idf_outlines.cpp.

References addOutline(), CheckOwnership(), errormsg, outlineType, owner, and parent.

Referenced by IDF_EXPORTER::createOutlineFromExtrudedBody().

◆ addOutline()

bool BOARD_OUTLINE::addOutline ( IDF_OUTLINE * aOutline)
protectedinherited

Definition at line 1296 of file idf_outlines.cpp.

References errormsg, and outlines.

Referenced by AddOutline().

◆ Clear()

bool OTHER_OUTLINE::Clear ( void )
overridevirtualinherited

Function Clear deletes internal data except for the parent object.

Reimplemented from BOARD_OUTLINE.

Definition at line 1962 of file idf_outlines.cpp.

References CheckOwnership(), BOARD_OUTLINE::clear(), BOARD_OUTLINE::errormsg, IDF3::LYR_INVALID, BOARD_OUTLINE::outlineType, BOARD_OUTLINE::owner, BOARD_OUTLINE::parent, side, and uniqueID.

◆ clear()

void BOARD_OUTLINE::clear ( void )
protectedvirtualinherited

◆ ClearComments()

void BOARD_OUTLINE::ClearComments ( void )
inherited

Deletes all comments.

Definition at line 1570 of file idf_outlines.cpp.

References comments.

◆ ClearOutlines()

void BOARD_OUTLINE::ClearOutlines ( void )
inherited

Clear internal data except for the parent pointer.

◆ clearOutlines()

void BOARD_OUTLINE::clearOutlines ( void )
protectedinherited

Definition at line 1505 of file idf_outlines.cpp.

References outlines.

Referenced by clear(), and readOutlines().

◆ CommentsSize()

size_t BOARD_OUTLINE::CommentsSize ( void )
inherited
Returns
the number of comments in the internal list.

Definition at line 1529 of file idf_outlines.cpp.

References comments.

◆ DeleteComment()

bool BOARD_OUTLINE::DeleteComment ( size_t aIndex)
inherited

Deletes a comment based on the given index.

Returns
true if a comment was deleted, false if the index is out of bounds.

Definition at line 1555 of file idf_outlines.cpp.

References comments.

◆ DelOutline() [1/2]

bool BOARD_OUTLINE::DelOutline ( IDF_OUTLINE * aOutline)
inherited

Remove the given outline, subject to IDF ownership rules, if it is owned by this object.

The outline pointer remains valid and it is the user's responsibility to delete the object. The first outline in the list will never be deleted unless it is the sole remaining outline; this is to ensure that a board outline is not removed while the cutouts remain.

Parameters
aOutlineis a pointer to the outline to remove from the list.
Returns
true if the outline was found and removed; false if the outline was not found or an ownership violation occurs.

Definition at line 1337 of file idf_outlines.cpp.

References errormsg, GetOutlineTypeString(), outlines, and outlineType.

◆ DelOutline() [2/2]

bool BOARD_OUTLINE::DelOutline ( size_t aIndex)
inherited

Delete the outline specified by the given index, subject to IDF ownership rules.

The outline data is destroyed. The first outline in the list will never be deleted unless it is the sole remaining outline; this is to ensure that a board outline is not removed while the cutouts remain.

Parameters
aIndexis an index to the outline to delete
Returns
true if the outline was found and deleted; false if the outline was not found or an ownership violation or indexation error occurs.

Definition at line 1395 of file idf_outlines.cpp.

References errormsg, GetOutlineTypeString(), outlines, and outlineType.

◆ GetComment()

const std::string * BOARD_OUTLINE::GetComment ( size_t aIndex)
inherited
Returns
indexed comment or NULL if the index is out of bounds.

Definition at line 1541 of file idf_outlines.cpp.

References comments.

◆ GetComments()

std::list< std::string > * BOARD_OUTLINE::GetComments ( void )
inherited
Returns
the internal list of comments.

Definition at line 1535 of file idf_outlines.cpp.

References comments.

◆ GetError()

const std::string & BOARD_OUTLINE::GetError ( void )
inlineinherited

Definition at line 253 of file idf_outlines.h.

References errormsg.

◆ GetOutline()

IDF_OUTLINE * BOARD_OUTLINE::GetOutline ( size_t aIndex)
inherited

Return a pointer to the outline as specified by aIndex.

If the index is out of bounds NULL is returned and the error message is set. It is the responsibility of the user to observe IDF ownership rules.

Definition at line 1460 of file idf_outlines.cpp.

References errormsg, and outlines.

Referenced by MatchCompOutline().

◆ GetOutlineIdentifier()

const std::string & OTHER_OUTLINE::GetOutlineIdentifier ( void )
virtualinherited

Function GetOutlineIdentifier returns the object's Outline Identifier.

Definition at line 1598 of file idf_outlines.cpp.

References uniqueID.

Referenced by IDF3_BOARD::readBrdSection().

◆ GetOutlines()

const std::list< IDF_OUTLINE * > * BOARD_OUTLINE::GetOutlines ( void )
inherited

Return outlines list.

It is up to the user to respect the IDFv3 specification and avoid changes to this list which are in violation of the specification.

Definition at line 1448 of file idf_outlines.cpp.

References outlines.

Referenced by addOutline(), makeBoard(), and makeOtherOutlines().

◆ GetOutlineType()

IDF3::OUTLINE_TYPE BOARD_OUTLINE::GetOutlineType ( void )
inherited
Returns
the type of outline according to the IDFv3 classification.

Definition at line 145 of file idf_outlines.cpp.

References outlineType.

◆ GetOwner()

IDF3::KEY_OWNER BOARD_OUTLINE::GetOwner ( void )
inherited
Returns
the ownership status of the outline (ECAD, MCAD, UNOWNED).

Definition at line 1481 of file idf_outlines.cpp.

References owner.

◆ GetParent()

IDF3_BOARD * BOARD_OUTLINE::GetParent ( void )
inherited
Returns
the parent IDF_BOARD object.

Definition at line 1290 of file idf_outlines.cpp.

References IDF3_BOARD, and parent.

◆ GetSide()

IDF3::IDF_LAYER OTHER_OUTLINE::GetSide ( void )
virtualinherited

Function GetSide returns the side which this outline is applicable to.

Definition at line 1638 of file idf_outlines.cpp.

References side.

Referenced by makeOtherOutlines().

◆ GetThickness()

double BOARD_OUTLINE::GetThickness ( void )
virtualinherited
Returns
the thickness or height of an outline (mm).

Definition at line 1040 of file idf_outlines.cpp.

References thickness.

Referenced by addOutline(), and makeOtherOutlines().

◆ GetUnit()

IDF3::IDF_UNIT BOARD_OUTLINE::GetUnit ( void )
virtualinherited

Return the native unit type of the outline.

Returns
IDF_UNIT is the native unit (UNIT_MM or UNIT_THOU).

Definition at line 1005 of file idf_outlines.cpp.

References unit.

◆ IsSingle()

bool BOARD_OUTLINE::IsSingle ( void )
inherited
Returns
true if this type of outline only supports a single outline. All outlines except for BOARD_OUTLINE are single.

Definition at line 1499 of file idf_outlines.cpp.

References single.

◆ OutlinesSize()

size_t BOARD_OUTLINE::OutlinesSize ( void )
inherited
Returns
the number of items in the internal outline list.

Definition at line 1454 of file idf_outlines.cpp.

References outlines.

Referenced by IDF_EXPORTER::createOutlineFromExtrudedBody(), and MatchCompOutline().

◆ readData()

void OTHER_OUTLINE::readData ( std::istream & aBoardFile,
const std::string & aHeader,
IDF3::IDF_VERSION aIdfVersion )
overrideprivatevirtualinherited

Read an OTHER_OUTLINE data from an IDFv3 file.

If an unrecoverable error occurs an exception is thrown.

Parameters
aBoardFileis an IDFv3 file open for reading.
aHeaderis the .OTHER_OUTLINE header as read via FetchIDFLine.

Reimplemented from BOARD_OUTLINE.

Definition at line 1644 of file idf_outlines.cpp.

References IDF3::CompareToken(), ERROR_IDF, IDF3::FetchIDFLine(), IDF3::GetIDFString(), GetOutlineTypeString(), IDF_THOU_TO_MM, IDF_TNM_TO_MM, IDF3::IDF_V2, IDF3::LYR_BOTTOM, IDF3::LYR_TOP, IDF3::OTLN_OTHER, BOARD_OUTLINE::outlineType, BOARD_OUTLINE::owner, IDF3::ParseIDFLayer(), IDF3::ParseOwner(), BOARD_OUTLINE::readOutlines(), side, BOARD_OUTLINE::thickness, uniqueID, BOARD_OUTLINE::unit, IDF3::UNIT_MM, IDF3::UNIT_THOU, IDF3::UNIT_TNM, and IDF3::UNOWNED.

Referenced by IDF3_BOARD::readBrdSection().

◆ readOutlines()

◆ SetOutlineIdentifier()

bool OTHER_OUTLINE::SetOutlineIdentifier ( const std::string & aUniqueID)
virtualinherited

Function SetOutlineIdentifier sets the Outline Identifier string of this OTHER_OUTLINE object as per IDFv3 spec.

Definition at line 1585 of file idf_outlines.cpp.

References CheckOwnership(), BOARD_OUTLINE::errormsg, BOARD_OUTLINE::outlineType, BOARD_OUTLINE::owner, BOARD_OUTLINE::parent, and uniqueID.

◆ SetOwner()

bool BOARD_OUTLINE::SetOwner ( IDF3::KEY_OWNER aOwner)
inherited

Set the ownership status of the outline subject to IDF ownership rules.

Returns
true if the ownership was changed and false if a specification violation occurred.

Definition at line 1487 of file idf_outlines.cpp.

References CheckOwnership(), errormsg, outlineType, owner, and parent.

◆ setParent()

void BOARD_OUTLINE::setParent ( IDF3_BOARD * aParent)
protectedinherited

◆ SetSide()

bool OTHER_OUTLINE::SetSide ( IDF3::IDF_LAYER aSide)
virtualinherited

Function SetSide sets the side which this outline is applicable to (TOP, BOTTOM).

Returns
bool: true if the side was set, false if the side is invalid or there is a violation of IDF ownership rules.

Definition at line 1604 of file idf_outlines.cpp.

References CheckOwnership(), BOARD_OUTLINE::errormsg, GetOutlineTypeString(), IDF3::LYR_BOTTOM, IDF3::LYR_INVALID, IDF3::LYR_TOP, BOARD_OUTLINE::outlineType, BOARD_OUTLINE::owner, BOARD_OUTLINE::parent, and side.

◆ SetThickness()

bool BOARD_OUTLINE::SetThickness ( double aThickness)
virtualinherited

Set the thickness or height of the outline (mm).

Parameters
aThicknessis the thickness or height of the outline in mm.

Definition at line 1029 of file idf_outlines.cpp.

References CheckOwnership(), errormsg, outlineType, owner, parent, and setThickness().

Referenced by IDF_EXPORTER::createOutlineFromExtrudedBody().

◆ setThickness()

bool BOARD_OUTLINE::setThickness ( double aThickness)
protectedvirtualinherited

Definition at line 1011 of file idf_outlines.cpp.

References errormsg, GetOutlineTypeString(), outlineType, and thickness.

Referenced by SetThickness().

◆ SetUnit()

bool BOARD_OUTLINE::SetUnit ( IDF3::IDF_UNIT aUnit)
virtualinherited

Function SetUnit sets the native unit of the outline; except for component outlines this must be the same as the native unit of the parent IDF_BOARD object.

Parameters
aUnitis the native unit (UNIT_MM or UNIT_THOU)

Definition at line 985 of file idf_outlines.cpp.

References errormsg, GetOutlineTypeString(), outlineType, unit, IDF3::UNIT_MM, IDF3::UNIT_THOU, and IDF3::UNIT_TNM.

Referenced by IDF_EXPORTER::createOutlineFromExtrudedBody(), and IDF3_BOARD::readBrdSection().

◆ writeComments()

bool BOARD_OUTLINE::writeComments ( std::ostream & aBoardFile)
protectedinherited

◆ writeData()

void OTHER_OUTLINE::writeData ( std::ostream & aBoardFile)
overrideprivatevirtualinherited

Write the OTHER_OUTLINE data to an open IDFv3 file.

Parameters
aBoardFileis an IDFv3 file open for writing.
Returns
true if the data was successfully written, otherwise false.

Reimplemented from BOARD_OUTLINE.

Definition at line 1904 of file idf_outlines.cpp.

References IDF_THOU_TO_MM, IDF3::LYR_BOTTOM, IDF3::LYR_TOP, IDF3::OTLN_OTHER, BOARD_OUTLINE::outlines, BOARD_OUTLINE::outlineType, side, BOARD_OUTLINE::thickness, uniqueID, BOARD_OUTLINE::unit, IDF3::UNIT_THOU, BOARD_OUTLINE::writeComments(), IDF3::WriteLayersText(), BOARD_OUTLINE::writeOutlines(), and BOARD_OUTLINE::writeOwner().

◆ writeOutline()

◆ writeOutlines()

void BOARD_OUTLINE::writeOutlines ( std::ostream & aBoardFile)
protectedinherited

◆ writeOwner()

bool BOARD_OUTLINE::writeOwner ( std::ostream & aBoardFile)
protectedinherited

Member Data Documentation

◆ comments

std::list< std::string > BOARD_OUTLINE::comments
protectedinherited

◆ errormsg

◆ outlines

◆ outlineType

◆ owner

◆ parent

◆ side

IDF3::IDF_LAYER OTHER_OUTLINE::side
privateinherited

Definition at line 388 of file idf_outlines.h.

Referenced by Clear(), GetSide(), OTHER_OUTLINE(), readData(), SetSide(), and writeData().

◆ single

◆ thickness

◆ uniqueID

std::string OTHER_OUTLINE::uniqueID
privateinherited

◆ unit


The documentation for this class was generated from the following files: