|
KiCad PCB EDA Suite
|
Regions and layers in which user-specified features or components may be placed. More...
#include <idf_outlines.h>
Public Member Functions | |
| GROUP_OUTLINE (IDF3_BOARD *aParent) | |
| virtual bool | SetSide (IDF3::IDF_LAYER aSide) |
| Set the side which this outline applies to (TOP, BOTTOM, BOTH). | |
| virtual IDF3::IDF_LAYER | GetSide (void) |
| virtual bool | SetGroupName (std::string aGroupName) |
| Set the name of the group, subject to IDF ownership rules. | |
| virtual const std::string & | GetGroupName (void) |
| Return a reference to the (non-unique) group name. | |
| virtual bool | Clear (void) override |
| Delete internal data, subject to IDF ownership rules. | |
| 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 GROUP_OUTLINE data from an open IDFv3 file. | |
| virtual void | writeData (std::ostream &aBoardFile) override |
| Write the data to a .PLACE_REGION section of an IDFv3 file. | |
Private Attributes | |
| IDF3::IDF_LAYER | side |
| std::string | groupName |
Friends | |
| class | IDF3_BOARD |
Regions and layers in which user-specified features or components may be placed.
Definition at line 549 of file idf_outlines.h.
| GROUP_OUTLINE::GROUP_OUTLINE | ( | IDF3_BOARD * | aParent | ) |
Definition at line 2698 of file idf_outlines.cpp.
References IDF3_BOARD, IDF3::LYR_INVALID, IDF3::OTLN_GROUP_PLACE, BOARD_OUTLINE::outlineType, BOARD_OUTLINE::setParent(), side, BOARD_OUTLINE::single, and BOARD_OUTLINE::thickness.
|
inherited |
Add a comment to the outline data.
This function is not subject to IDF ownership rules.
Definition at line 1522 of file idf_outlines.cpp.
References comments.
Referenced by IDF3_BOARD::GetComponentOutline(), IDF3_BOARD::readBrdSection(), and IDF3_BOARD::readLibSection().
|
inherited |
Add the specified outline to this object.
| aOutline | is a valid IDF outline. |
Definition at line 1328 of file idf_outlines.cpp.
References addOutline(), CheckOwnership(), errormsg, outlineType, owner, and parent.
Referenced by IDF_EXPORTER::createOutlineFromExtrudedBody().
|
protectedinherited |
Definition at line 1298 of file idf_outlines.cpp.
References errormsg, and outlines.
Referenced by AddOutline().
|
overridevirtual |
Delete internal data, subject to IDF ownership rules.
Reimplemented from BOARD_OUTLINE.
Definition at line 2971 of file idf_outlines.cpp.
References CheckOwnership(), BOARD_OUTLINE::clear(), BOARD_OUTLINE::errormsg, groupName, IDF3::LYR_INVALID, BOARD_OUTLINE::outlineType, BOARD_OUTLINE::owner, BOARD_OUTLINE::parent, side, and BOARD_OUTLINE::thickness.
|
protectedvirtualinherited |
Definition at line 1263 of file idf_outlines.cpp.
References clearOutlines(), comments, owner, and IDF3::UNOWNED.
Referenced by Clear(), GROUP_OUTLINE::Clear(), IDF3_COMP_OUTLINE::Clear(), OTHER_OUTLINE::Clear(), PLACE_OUTLINE::Clear(), ROUTE_OUTLINE::Clear(), and ~BOARD_OUTLINE().
|
inherited |
|
inherited |
Clear internal data except for the parent pointer.
|
protectedinherited |
Definition at line 1507 of file idf_outlines.cpp.
References outlines.
Referenced by clear(), and readOutlines().
|
inherited |
Definition at line 1531 of file idf_outlines.cpp.
References comments.
|
inherited |
Deletes a comment based on the given index.
Definition at line 1557 of file idf_outlines.cpp.
References comments.
|
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.
| aOutline | is a pointer to the outline to remove from the list. |
Definition at line 1339 of file idf_outlines.cpp.
References errormsg, GetOutlineTypeString(), outlines, and outlineType.
|
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.
| aIndex | is an index to the outline to delete |
Definition at line 1397 of file idf_outlines.cpp.
References errormsg, GetOutlineTypeString(), outlines, and outlineType.
|
inherited |
Definition at line 1543 of file idf_outlines.cpp.
References comments.
|
inherited |
Definition at line 1537 of file idf_outlines.cpp.
References comments.
|
inlineinherited |
Definition at line 253 of file idf_outlines.h.
References errormsg.
|
virtual |
Return a reference to the (non-unique) group name.
Definition at line 2761 of file idf_outlines.cpp.
References groupName.
Referenced by IDF3_BOARD::readBrdSection().
|
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 1462 of file idf_outlines.cpp.
References errormsg, and outlines.
Referenced by MatchCompOutline().
|
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 1450 of file idf_outlines.cpp.
References outlines.
Referenced by addOutline(), makeBoard(), and makeOtherOutlines().
|
inherited |
Definition at line 147 of file idf_outlines.cpp.
References outlineType.
|
inherited |
Definition at line 1483 of file idf_outlines.cpp.
References owner.
|
inherited |
Definition at line 1292 of file idf_outlines.cpp.
References IDF3_BOARD, and parent.
|
virtual |
Definition at line 2742 of file idf_outlines.cpp.
References side.
|
virtualinherited |
Definition at line 1042 of file idf_outlines.cpp.
References thickness.
Referenced by addOutline(), makeComponents(), and makeOtherOutlines().
|
virtualinherited |
Return the native unit type of the outline.
Definition at line 1007 of file idf_outlines.cpp.
References unit.
|
inherited |
Definition at line 1501 of file idf_outlines.cpp.
References single.
|
inherited |
Definition at line 1456 of file idf_outlines.cpp.
References outlines.
Referenced by IDF_EXPORTER::createOutlineFromExtrudedBody(), and MatchCompOutline().
|
overrideprivatevirtual |
Read GROUP_OUTLINE data from an open IDFv3 file.
If an unrecoverable error occurs an exception is thrown.
| aBoardFile | is an open IDFv3 file. |
| aHeader | is the .PLACE_REGION header as returned by FetchIDFLine. |
Reimplemented from BOARD_OUTLINE.
Definition at line 2767 of file idf_outlines.cpp.
References IDF3::CompareToken(), ERROR_IDF, IDF3::FetchIDFLine(), IDF3::GetIDFString(), GetOutlineTypeString(), groupName, IDF3::IDF_V2, IDF3::LYR_BOTH, IDF3::LYR_BOTTOM, IDF3::LYR_TOP, BOARD_OUTLINE::outlineType, BOARD_OUTLINE::owner, IDF3::ParseIDFLayer(), IDF3::ParseOwner(), BOARD_OUTLINE::readOutlines(), side, and IDF3::UNOWNED.
Referenced by IDF3_BOARD::readBrdSection().
|
protectedinherited |
Definition at line 153 of file idf_outlines.cpp.
References clearOutlines(), IDF3::CompareToken(), ERROR_IDF, IDF3::FetchIDFLine(), IDF_OUTLINE::front(), IDF3::GetIDFString(), GetOutlineTypeString(), IDF_THOU_TO_MM, IDF_TNM_TO_MM, IDF3::IDF_V2, IDF_OUTLINE::IsCCW(), IDF_OUTLINE::IsCircle(), IDF_SEGMENT::IsCircle(), IDF_POINT::Matches(), MIN_ANG, IDF3::OTLN_COMPONENT, outlines, outlineType, IDF_OUTLINE::push(), single, IDF_OUTLINE::size(), IDF_SEGMENT::startPoint, unit, IDF3::UNIT_MM, IDF3::UNIT_THOU, IDF3::UNIT_TNM, IDF_POINT::x, and IDF_POINT::y.
Referenced by readData(), GROUP_OUTLINE::readData(), IDF3_COMP_OUTLINE::readData(), OTHER_OUTLINE::readData(), PLACE_OUTLINE::readData(), and ROUTE_OUTLINE::readData().
|
virtual |
Set the name of the group, subject to IDF ownership rules.
This function is subject to IDF ownership rules; true is returned on success, otherwise false is returned and the error message is set.
Definition at line 2748 of file idf_outlines.cpp.
References CheckOwnership(), BOARD_OUTLINE::errormsg, groupName, BOARD_OUTLINE::outlineType, BOARD_OUTLINE::owner, and BOARD_OUTLINE::parent.
|
inherited |
Set the ownership status of the outline subject to IDF ownership rules.
Definition at line 1489 of file idf_outlines.cpp.
References CheckOwnership(), errormsg, outlineType, owner, and parent.
|
protectedinherited |
Set the parent IDF_BOARD object.
Definition at line 1286 of file idf_outlines.cpp.
References IDF3_BOARD, and parent.
Referenced by GROUP_OUTLINE::GROUP_OUTLINE(), IDF3_COMP_OUTLINE::IDF3_COMP_OUTLINE(), OTHER_OUTLINE::OTHER_OUTLINE(), PLACE_OUTLINE::PLACE_OUTLINE(), and ROUTE_OUTLINE::ROUTE_OUTLINE().
|
virtual |
Set the side which this outline applies to (TOP, BOTTOM, BOTH).
This function is subject to IDF ownership rules; true is returned on success, otherwise false is returned and the error message is set.
Definition at line 2709 of file idf_outlines.cpp.
References CheckOwnership(), BOARD_OUTLINE::errormsg, GetOutlineTypeString(), IDF3::LYR_BOTH, IDF3::LYR_BOTTOM, IDF3::LYR_TOP, BOARD_OUTLINE::outlineType, BOARD_OUTLINE::owner, BOARD_OUTLINE::parent, and side.
|
virtualinherited |
Set the thickness or height of the outline (mm).
| aThickness | is the thickness or height of the outline in mm. |
Definition at line 1031 of file idf_outlines.cpp.
References CheckOwnership(), errormsg, outlineType, owner, parent, and setThickness().
Referenced by IDF_EXPORTER::createOutlineFromExtrudedBody().
|
protectedvirtualinherited |
Definition at line 1013 of file idf_outlines.cpp.
References errormsg, GetOutlineTypeString(), outlineType, and thickness.
Referenced by SetThickness().
|
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.
| aUnit | is the native unit (UNIT_MM or UNIT_THOU) |
Definition at line 987 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().
|
protectedinherited |
Definition at line 677 of file idf_outlines.cpp.
References comments.
Referenced by writeData(), GROUP_OUTLINE::writeData(), IDF3_COMP_OUTLINE::writeData(), OTHER_OUTLINE::writeData(), PLACE_OUTLINE::writeData(), and ROUTE_OUTLINE::writeData().
|
overrideprivatevirtual |
Write the data to a .PLACE_REGION section of an IDFv3 file.
| aBoardFile | is an IDFv3 file open for writing. |
Reimplemented from BOARD_OUTLINE.
Definition at line 2926 of file idf_outlines.cpp.
References CTX_QUOTED_STR, EscapeString(), groupName, IDF3::LYR_BOTH, IDF3::LYR_BOTTOM, IDF3::LYR_TOP, BOARD_OUTLINE::outlines, side, BOARD_OUTLINE::writeComments(), IDF3::WriteLayersText(), BOARD_OUTLINE::writeOutlines(), and BOARD_OUTLINE::writeOwner().
|
protectedinherited |
Definition at line 716 of file idf_outlines.cpp.
References IDF_SEGMENT::angle, IDF_OUTLINE::back(), IDF_OUTLINE::begin(), IDF_OUTLINE::end(), IDF_SEGMENT::endPoint, IDF_OUTLINE::front(), IDF_THOU_TO_MM, IDF_OUTLINE::IsCCW(), IDF_SEGMENT::IsCircle(), MIN_ANG, single, IDF_OUTLINE::size(), IDF_SEGMENT::startPoint, unit, IDF3::UNIT_THOU, IDF_POINT::x, and IDF_POINT::y.
Referenced by writeOutlines().
|
protectedinherited |
Definition at line 970 of file idf_outlines.cpp.
References outlines, and writeOutline().
Referenced by writeData(), GROUP_OUTLINE::writeData(), IDF3_COMP_OUTLINE::writeData(), OTHER_OUTLINE::writeData(), PLACE_OUTLINE::writeData(), and ROUTE_OUTLINE::writeData().
|
protectedinherited |
Definition at line 695 of file idf_outlines.cpp.
References IDF3::ECAD, IDF3::MCAD, and owner.
Referenced by writeData(), GROUP_OUTLINE::writeData(), OTHER_OUTLINE::writeData(), PLACE_OUTLINE::writeData(), and ROUTE_OUTLINE::writeData().
|
friend |
Definition at line 586 of file idf_outlines.h.
References IDF3_BOARD.
Referenced by GROUP_OUTLINE(), and IDF3_BOARD.
|
protectedinherited |
Definition at line 314 of file idf_outlines.h.
Referenced by AddComment(), clear(), ClearComments(), CommentsSize(), DeleteComment(), GetComment(), GetComments(), and writeComments().
|
protectedinherited |
Definition at line 307 of file idf_outlines.h.
Referenced by AddOutline(), addOutline(), Clear(), GROUP_OUTLINE::Clear(), IDF3_COMP_OUTLINE::Clear(), OTHER_OUTLINE::Clear(), PLACE_OUTLINE::Clear(), ROUTE_OUTLINE::Clear(), IDF3_COMP_OUTLINE::decrementRef(), DelOutline(), DelOutline(), GetError(), GetOutline(), IDF3_COMP_OUTLINE::SetComponentClass(), GROUP_OUTLINE::SetGroupName(), ROUTE_OUTLINE::SetLayers(), PLACE_OUTLINE::SetMaxHeight(), OTHER_OUTLINE::SetOutlineIdentifier(), SetOwner(), GROUP_OUTLINE::SetSide(), OTHER_OUTLINE::SetSide(), PLACE_OUTLINE::SetSide(), SetThickness(), setThickness(), and SetUnit().
|
private |
Definition at line 608 of file idf_outlines.h.
Referenced by Clear(), GetGroupName(), readData(), SetGroupName(), and writeData().
|
protectedinherited |
Definition at line 308 of file idf_outlines.h.
Referenced by addOutline(), clearOutlines(), IDF3_COMP_OUTLINE::CreateDefaultOutline(), DelOutline(), DelOutline(), GetOutline(), GetOutlines(), OutlinesSize(), readOutlines(), GROUP_OUTLINE::writeData(), OTHER_OUTLINE::writeData(), PLACE_OUTLINE::writeData(), ROUTE_OUTLINE::writeData(), and writeOutlines().
|
protectedinherited |
Definition at line 312 of file idf_outlines.h.
Referenced by AddOutline(), BOARD_OUTLINE(), Clear(), GROUP_OUTLINE::Clear(), IDF3_COMP_OUTLINE::Clear(), OTHER_OUTLINE::Clear(), PLACE_OUTLINE::Clear(), ROUTE_OUTLINE::Clear(), DelOutline(), DelOutline(), GetOutlineType(), GROUP_OUTLINE::GROUP_OUTLINE(), IDF3_COMP_OUTLINE::IDF3_COMP_OUTLINE(), OTHER_OUTLINE::OTHER_OUTLINE(), PLACE_KO_OUTLINE::PLACE_KO_OUTLINE(), PLACE_OUTLINE::PLACE_OUTLINE(), readData(), GROUP_OUTLINE::readData(), IDF3_COMP_OUTLINE::readData(), OTHER_OUTLINE::readData(), PLACE_OUTLINE::readData(), ROUTE_OUTLINE::readData(), readOutlines(), IDF3_COMP_OUTLINE::readProperties(), ROUTE_KO_OUTLINE::ROUTE_KO_OUTLINE(), ROUTE_OUTLINE::ROUTE_OUTLINE(), GROUP_OUTLINE::SetGroupName(), ROUTE_OUTLINE::SetLayers(), PLACE_OUTLINE::SetMaxHeight(), OTHER_OUTLINE::SetOutlineIdentifier(), SetOwner(), GROUP_OUTLINE::SetSide(), OTHER_OUTLINE::SetSide(), PLACE_OUTLINE::SetSide(), SetThickness(), setThickness(), SetUnit(), VIA_KO_OUTLINE::VIA_KO_OUTLINE(), OTHER_OUTLINE::writeData(), PLACE_OUTLINE::writeData(), and ROUTE_OUTLINE::writeData().
|
protectedinherited |
Definition at line 311 of file idf_outlines.h.
Referenced by AddOutline(), BOARD_OUTLINE(), Clear(), GROUP_OUTLINE::Clear(), IDF3_COMP_OUTLINE::Clear(), OTHER_OUTLINE::Clear(), PLACE_OUTLINE::Clear(), ROUTE_OUTLINE::Clear(), clear(), GetOwner(), readData(), GROUP_OUTLINE::readData(), OTHER_OUTLINE::readData(), PLACE_OUTLINE::readData(), ROUTE_OUTLINE::readData(), GROUP_OUTLINE::SetGroupName(), ROUTE_OUTLINE::SetLayers(), PLACE_OUTLINE::SetMaxHeight(), OTHER_OUTLINE::SetOutlineIdentifier(), SetOwner(), GROUP_OUTLINE::SetSide(), OTHER_OUTLINE::SetSide(), PLACE_OUTLINE::SetSide(), SetThickness(), and writeOwner().
|
protectedinherited |
Definition at line 316 of file idf_outlines.h.
Referenced by AddOutline(), BOARD_OUTLINE(), Clear(), GROUP_OUTLINE::Clear(), IDF3_COMP_OUTLINE::Clear(), OTHER_OUTLINE::Clear(), PLACE_OUTLINE::Clear(), ROUTE_OUTLINE::Clear(), GetParent(), GROUP_OUTLINE::SetGroupName(), ROUTE_OUTLINE::SetLayers(), PLACE_OUTLINE::SetMaxHeight(), OTHER_OUTLINE::SetOutlineIdentifier(), SetOwner(), setParent(), GROUP_OUTLINE::SetSide(), OTHER_OUTLINE::SetSide(), PLACE_OUTLINE::SetSide(), and SetThickness().
|
private |
Definition at line 607 of file idf_outlines.h.
Referenced by Clear(), GetSide(), GROUP_OUTLINE(), readData(), SetSide(), and writeData().
|
protectedinherited |
Definition at line 313 of file idf_outlines.h.
Referenced by BOARD_OUTLINE(), GROUP_OUTLINE::GROUP_OUTLINE(), IDF3_COMP_OUTLINE::IDF3_COMP_OUTLINE(), IsSingle(), OTHER_OUTLINE::OTHER_OUTLINE(), PLACE_OUTLINE::PLACE_OUTLINE(), readOutlines(), ROUTE_OUTLINE::ROUTE_OUTLINE(), VIA_KO_OUTLINE::VIA_KO_OUTLINE(), and writeOutline().
|
protectedinherited |
Definition at line 317 of file idf_outlines.h.
Referenced by BOARD_OUTLINE(), GROUP_OUTLINE::Clear(), PLACE_OUTLINE::Clear(), IDF3_COMP_OUTLINE::CreateDefaultOutline(), PLACE_OUTLINE::GetMaxHeight(), GetThickness(), GROUP_OUTLINE::GROUP_OUTLINE(), PLACE_OUTLINE::PLACE_OUTLINE(), readData(), IDF3_COMP_OUTLINE::readData(), OTHER_OUTLINE::readData(), PLACE_OUTLINE::readData(), PLACE_OUTLINE::SetMaxHeight(), setThickness(), writeData(), IDF3_COMP_OUTLINE::writeData(), OTHER_OUTLINE::writeData(), and PLACE_OUTLINE::writeData().
|
protectedinherited |
Definition at line 315 of file idf_outlines.h.
Referenced by BOARD_OUTLINE(), IDF3_COMP_OUTLINE::CreateDefaultOutline(), GetUnit(), readData(), IDF3_COMP_OUTLINE::readData(), OTHER_OUTLINE::readData(), PLACE_OUTLINE::readData(), readOutlines(), SetUnit(), writeData(), IDF3_COMP_OUTLINE::writeData(), OTHER_OUTLINE::writeData(), PLACE_OUTLINE::writeData(), and writeOutline().