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

Information pertinent to a Pcbnew printed circuit board. More...

#include <board.h>

Inheritance diagram for BOARD:
BOARD_ITEM_CONTAINER EMBEDDED_FILES BOARD_ITEM EDA_ITEM KIGFX::VIEW_ITEM SERIALIZABLE INSPECTABLE

Classes

struct  cmp_drawings
 
struct  cmp_items
 
struct  GroupLegalOpsField
 

Public Types

enum  COMPARE_FLAGS : int { DRC = 0x01 }
 
enum class  RETURN_CODE : int {
  OK , FILE_NOT_FOUND , PERMISSIONS_ERROR , FILE_ALREADY_EXISTS ,
  OUT_OF_MEMORY , CHECKSUM_ERROR
}
 

Public Member Functions

void SetBoardUse (BOARD_USE aUse)
 Set what the board is going to be used for.
 
BOARD_USE GetBoardUse () const
 Get what the board use is.
 
void IncrementTimeStamp ()
 
int GetTimeStamp () const
 
bool IsFootprintHolder () const
 Find out if the board is being used to hold a single footprint for editing/viewing.
 
void SetFileName (const wxString &aFileName)
 
const wxString & GetFileName () const
 
const TRACKS & Tracks () const
 
const FOOTPRINTS & Footprints () const
 
const DRAWINGS & Drawings () const
 
const ZONESZones () const
 
const GENERATORS & Generators () const
 
const MARKERS & Markers () const
 
const BOARD_ITEM_SET GetItemSet ()
 
const GROUPS & Groups () const
 The groups must maintain the following invariants.
 
const std::vector< BOARD_CONNECTED_ITEM * > AllConnectedItems ()
 
const std::map< wxString, wxString > & GetProperties () const
 
void SetProperties (const std::map< wxString, wxString > &aProps)
 
void GetContextualTextVars (wxArrayString *aVars) const
 
bool ResolveTextVar (wxString *token, int aDepth) const
 
 BOARD ()
 
 ~BOARD ()
 
VECTOR2I GetPosition () const override
 
void SetPosition (const VECTOR2I &aPos) override
 
const VECTOR2I GetFocusPosition () const override
 Similar to GetPosition, but allows items to return their visual center rather than their anchor.
 
bool IsEmpty () const
 
void Move (const VECTOR2I &aMoveVector) override
 Move this object.
 
void SetFileFormatVersionAtLoad (int aVersion)
 
int GetFileFormatVersionAtLoad () const
 
void SetGenerator (const wxString &aGenerator)
 
const wxString & GetGenerator () const
 Adds an item to the container.
 
void Add (BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
 Removes an item from the container.
 
void Remove (BOARD_ITEM *aBoardItem, REMOVE_MODE aMode=REMOVE_MODE::NORMAL) override
 Removes an item from the container.
 
void RemoveAll (std::initializer_list< KICAD_T > aTypes={ PCB_NETINFO_T, PCB_MARKER_T, PCB_GROUP_T, PCB_ZONE_T, PCB_GENERATOR_T, PCB_FOOTPRINT_T, PCB_TRACE_T, PCB_SHAPE_T })
 An efficient way to remove all items of a certain type from the board.
 
void FinalizeBulkAdd (std::vector< BOARD_ITEM * > &aNewItems)
 Must be used if Add() is used using a BULK_x ADD_MODE to generate a change event for listeners.
 
void FinalizeBulkRemove (std::vector< BOARD_ITEM * > &aRemovedItems)
 Must be used if Remove() is used using a BULK_x REMOVE_MODE to generate a change event for listeners.
 
void FixupEmbeddedData ()
 After loading a file from disk, the footprints do not yet contain the full data for their embedded files, only a reference.
 
void CacheTriangulation (PROGRESS_REPORTER *aReporter=nullptr, const std::vector< ZONE * > &aZones={})
 
FOOTPRINTGetFirstFootprint () const
 Get the first footprint on the board or nullptr.
 
void DeleteAllFootprints ()
 Remove all footprints from the deque and free the memory associated with them.
 
BOARD_ITEMGetItem (const KIID &aID) const
 
void FillItemMap (std::map< KIID, EDA_ITEM * > &aMap)
 
wxString ConvertCrossReferencesToKIIDs (const wxString &aSource) const
 Convert cross-references back and forth between ${refDes:field} and ${kiid:field}.
 
wxString ConvertKIIDsToCrossReferences (const wxString &aSource) const
 
std::shared_ptr< CONNECTIVITY_DATAGetConnectivity () const
 Return a list of missing connections between components/tracks.
 
bool BuildConnectivity (PROGRESS_REPORTER *aReporter=nullptr)
 Build or rebuild the board connectivity database for the board, especially the list of connected items, list of nets and rastnest data Needed after loading a board to have the connectivity database updated.
 
void DeleteMARKERs ()
 Delete all MARKERS from the board.
 
void DeleteMARKERs (bool aWarningsAndErrors, bool aExclusions)
 
PROJECTGetProject () const
 
void SetProject (PROJECT *aProject, bool aReferenceOnly=false)
 Link a board to a given project.
 
void ClearProject ()
 
std::vector< PCB_MARKER * > ResolveDRCExclusions (bool aCreateMarkers)
 Rebuild DRC markers from the serialized data in BOARD_DESIGN_SETTINGS.
 
void RecordDRCExclusions ()
 Scan existing markers and record data from any that are Excluded.
 
void UpdateRatsnestExclusions ()
 Update the visibility flags on the current unconnected ratsnest lines.
 
void ResetNetHighLight ()
 Reset all high light data to the init state.
 
const std::set< int > & GetHighLightNetCodes () const
 
void SetHighLightNet (int aNetCode, bool aMulti=false)
 Select the netcode to be highlighted.
 
bool IsHighLightNetON () const
 
void HighLightON (bool aValue=true)
 Enable or disable net highlighting.
 
void HighLightOFF ()
 Disable net highlight.
 
int GetCopperLayerCount () const
 
void SetCopperLayerCount (int aCount)
 
PCB_LAYER_ID FlipLayer (PCB_LAYER_ID aLayer) const
 
int LayerDepth (PCB_LAYER_ID aStartLayer, PCB_LAYER_ID aEndLayer) const
 
LSET GetEnabledLayers () const
 A proxy function that calls the corresponding function in m_BoardSettings.
 
void SetEnabledLayers (LSET aLayerMask)
 A proxy function that calls the correspondent function in m_BoardSettings.
 
bool IsLayerEnabled (PCB_LAYER_ID aLayer) const
 A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer is enabled.
 
bool IsLayerVisible (PCB_LAYER_ID aLayer) const
 A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer is visible.
 
LSET GetVisibleLayers () const
 A proxy function that calls the correspondent function in m_BoardSettings.
 
void SetVisibleLayers (LSET aLayerMask)
 A proxy function that calls the correspondent function in m_BoardSettings changes the bit-mask of visible layers.
 
GAL_SET GetVisibleElements () const
 Return a set of all the element categories that are visible.
 
void SetVisibleElements (const GAL_SET &aMask)
 A proxy function that calls the correspondent function in m_BoardSettings.
 
void SetVisibleAlls ()
 Change the bit-mask of visible element categories and layers.
 
bool IsElementVisible (GAL_LAYER_ID aLayer) const
 Test whether a given element category is visible.
 
void SetElementVisibility (GAL_LAYER_ID aLayer, bool aNewState)
 Change the visibility of an element category.
 
bool IsFootprintLayerVisible (PCB_LAYER_ID aLayer) const
 Expect either of the two layers on which a footprint can reside, and returns whether that layer is visible.
 
BOARD_DESIGN_SETTINGSGetDesignSettings () const
 
BOARD_STACKUP GetStackupOrDefault () const
 
const PAGE_INFOGetPageSettings () const
 
void SetPageSettings (const PAGE_INFO &aPageSettings)
 
const PCB_PLOT_PARAMSGetPlotOptions () const
 
void SetPlotOptions (const PCB_PLOT_PARAMS &aOptions)
 
TITLE_BLOCKGetTitleBlock ()
 
const TITLE_BLOCKGetTitleBlock () const
 
void SetTitleBlock (const TITLE_BLOCK &aTitleBlock)
 
wxString GetItemDescription (UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
 Return a user-visible description string of this item.
 
EDA_UNITS GetUserUnits ()
 
void SetUserUnits (EDA_UNITS aUnits)
 
void UpdateUserUnits (BOARD_ITEM *aItem, KIGFX::VIEW *aView)
 Update any references within aItem (or its descendants) to the user units.
 
bool GetBoardPolygonOutlines (SHAPE_POLY_SET &aOutlines, OUTLINE_ERROR_HANDLER *aErrorHandler=nullptr, bool aAllowUseArcsInPolygons=false, bool aIncludeNPTHAsOutlines=false)
 Extract the board outlines and build a closed polygon from lines, arcs and circle items on edge cut layer.
 
int GetOutlinesChainingEpsilon ()
 
void SetOutlinesChainingEpsilon (int aValue)
 
void ConvertBrdLayerToPolygonalContours (PCB_LAYER_ID aLayer, SHAPE_POLY_SET &aOutlines) const
 Build a set of polygons which are the outlines of copper items (pads, tracks, vias, texts, zones).
 
PCB_LAYER_ID GetLayerID (const wxString &aLayerName) const
 Return the ID of a layer.
 
const wxString GetLayerName (PCB_LAYER_ID aLayer) const
 Return the name of a aLayer.
 
bool SetLayerName (PCB_LAYER_ID aLayer, const wxString &aLayerName)
 Changes the name of the layer given by aLayer.
 
bool SetLayerDescr (PCB_LAYER_ID aIndex, const LAYER &aLayer)
 Return the type of the copper layer given by aLayer.
 
LAYER_T GetLayerType (PCB_LAYER_ID aLayer) const
 Return the type of the copper layer given by aLayer.
 
bool SetLayerType (PCB_LAYER_ID aLayer, LAYER_T aLayerType)
 Change the type of the layer given by aLayer.
 
unsigned GetNodesCount (int aNet=-1) const
 
const std::vector< PAD * > GetPads () const
 Return a reference to a list of all the pads.
 
void BuildListOfNets ()
 
NETINFO_ITEMFindNet (int aNetcode) const
 Search for a net with the given netcode.
 
NETINFO_ITEMFindNet (const wxString &aNetname) const
 Search for a net with the given name.
 
int MatchDpSuffix (const wxString &aNetName, wxString &aComplementNet)
 Fetch the coupled netname for a given net.
 
NETINFO_ITEMDpCoupledNet (const NETINFO_ITEM *aNet)
 
const NETINFO_LISTGetNetInfo () const
 
void RemoveUnusedNets (BOARD_COMMIT *aCommit)
 
NETINFO_LIST::iterator BeginNets () const
 
NETINFO_LIST::iterator EndNets () const
 
unsigned GetNetCount () const
 
BOX2I ComputeBoundingBox (bool aBoardEdgesOnly=false, bool aIncludeHiddenText=false) const
 Calculate the bounding box containing all board items (or board edge segments).
 
const BOX2I GetBoundingBox () const override
 Return the orthogonal bounding box of this object for display purposes.
 
const BOX2I GetBoardEdgesBoundingBox () const
 Return the board bounding box calculated using exclusively the board edges (graphics on Edge.Cuts layer).
 
void GetMsgPanelInfo (EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
 Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
 
INSPECT_RESULT Visit (INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &scanTypes) override
 May be re-implemented for each derived class in order to handle all the types given by its member data.
 
FOOTPRINTFindFootprintByReference (const wxString &aReference) const
 Search for a FOOTPRINT within this board with the given reference designator.
 
FOOTPRINTFindFootprintByPath (const KIID_PATH &aPath) const
 Search for a FOOTPRINT within this board with the given path.
 
std::set< wxString > GetNetClassAssignmentCandidates () const
 Return the set of netname candidates for netclass assignment.
 
void SynchronizeNetsAndNetClasses (bool aResetTrackAndViaSizes)
 Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
 
void SynchronizeProperties ()
 Copy the current project's text variables into the boards property cache.
 
double Similarity (const BOARD_ITEM &aOther) const override
 Return the Similarity.
 
bool operator== (const BOARD_ITEM &aOther) const override
 
wxString GetClass () const override
 Return the class name.
 
int SetAreasNetCodesFromNetNames ()
 Set the .m_NetCode member of all copper areas, according to the area Net Name The SetNetCodesFromNetNames is an equivalent to net name, for fast comparisons.
 
ZONEGetArea (int index) const
 Return the Zone at a given index.
 
std::list< ZONE * > GetZoneList (bool aIncludeZonesInFootprints=false) const
 
int GetAreaCount () const
 
ZONEAddArea (PICKED_ITEMS_LIST *aNewZonesList, int aNetcode, PCB_LAYER_ID aLayer, VECTOR2I aStartPointPosition, ZONE_BORDER_DISPLAY_STYLE aHatch)
 Add an empty copper area to board areas list.
 
bool TestZoneIntersection (ZONE *aZone1, ZONE *aZone2)
 Test for intersection of 2 copper areas.
 
PADGetPad (const VECTOR2I &aPosition, LSET aLayerMask) const
 Find a pad aPosition on aLayer.
 
PADGetPad (const VECTOR2I &aPosition) const
 
PADGetPad (const PCB_TRACK *aTrace, ENDPOINT_T aEndPoint) const
 Find a pad connected to aEndPoint of aTrace.
 
PADGetPadFast (const VECTOR2I &aPosition, LSET aLayerMask) const
 Return pad found at aPosition on aLayerMask using the fast search method.
 
PADGetPad (std::vector< PAD * > &aPadList, const VECTOR2I &aPosition, LSET aLayerMask) const
 Locate the pad connected at aPosition on aLayer starting at list position aPad.
 
void GetSortedPadListByXthenYCoord (std::vector< PAD * > &aVector, int aNetCode=-1) const
 First empties then fills the vector with all pads and sorts them by increasing x coordinate, and for increasing y coordinate for same values of x coordinates.
 
std::tuple< int, double, double > GetTrackLength (const PCB_TRACK &aTrack) const
 Return data on the length and number of track segments connected to a given track.
 
TRACKS TracksInNet (int aNetCode)
 Collect all the TRACKs and VIAs that are members of a net given by aNetCode.
 
FOOTPRINTGetFootprint (const VECTOR2I &aPosition, PCB_LAYER_ID aActiveLayer, bool aVisibleOnly, bool aIgnoreLocked=false) const
 Get a footprint by its bounding rectangle at aPosition on aLayer.
 
int GetMaxClearanceValue () const
 Returns the maximum clearance value for any object on the board.
 
void MapNets (BOARD *aDestBoard)
 Map all nets in the given board to nets with the same name (if any) in the destination board.
 
void SanitizeNetcodes ()
 
void AddListener (BOARD_LISTENER *aListener)
 Add a listener to the board to receive calls whenever something on the board has been modified.
 
void RemoveListener (BOARD_LISTENER *aListener)
 Remove the specified listener.
 
void RemoveAllListeners ()
 Remove all listeners.
 
void OnItemChanged (BOARD_ITEM *aItem)
 Notify the board and its listeners that an item on the board has been modified in some way.
 
void OnItemsChanged (std::vector< BOARD_ITEM * > &aItems)
 Notify the board and its listeners that an item on the board has been modified in some way.
 
void OnItemsCompositeUpdate (std::vector< BOARD_ITEM * > &aAddedItems, std::vector< BOARD_ITEM * > &aRemovedItems, std::vector< BOARD_ITEM * > &aChangedItems)
 Notify the board and its listeners that items on the board have been modified in a composite operations.
 
void OnRatsnestChanged ()
 Notify the board and its listeners that the ratsnest has been recomputed.
 
wxString GroupsSanityCheck (bool repair=false)
 Consistency check of internal m_groups structure.
 
wxString GroupsSanityCheckInternal (bool repair)
 
GroupLegalOpsField GroupLegalOps (const PCB_SELECTION &selection) const
 Check which selection tool group operations are legal given the selection.
 
bool LegacyTeardrops () const
 
void SetLegacyTeardrops (bool aFlag)
 
EMBEDDED_FILESGetEmbeddedFiles () override
 
const EMBEDDED_FILESGetEmbeddedFiles () const
 
void EmbedFonts () override
 Finds all fonts used in the board and embeds them in the file if permissions allow.
 
virtual void Delete (BOARD_ITEM *aItem)
 Removes an item from the container and deletes it.
 
void SetParentGroup (PCB_GROUP *aGroup)
 
PCB_GROUPGetParentGroup () const
 
int GetX () const
 
int GetY () const
 
virtual VECTOR2I GetCenter () const
 This defaults to the center of the bounding box if not overridden.
 
void SetX (int aX)
 
void SetY (int aY)
 
virtual bool IsConnected () const
 Returns information if the object is derived from BOARD_CONNECTED_ITEM.
 
virtual bool IsOnCopperLayer () const
 
virtual bool HasHole () const
 
virtual bool HasDrilledHole () const
 
virtual bool IsTented (PCB_LAYER_ID aLayer) const
 Checks if the given object is tented (its copper shape is covered by solder mask) on a given side of the board.
 
virtual std::shared_ptr< SHAPEGetEffectiveShape (PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const
 Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
 
virtual std::shared_ptr< SHAPE_SEGMENTGetEffectiveHoleShape () const
 
virtual void RunOnChildren (const std::function< void(BOARD_ITEM *)> &aFunction) const
 Invoke a function on all children.
 
virtual void RunOnDescendants (const std::function< void(BOARD_ITEM *)> &aFunction, int aDepth=0) const
 Invoke a function on all descendants.
 
BOARD_ITEM_CONTAINERGetParent () const
 
FOOTPRINTGetParentFootprint () const
 
VECTOR2I GetFPRelativePosition () const
 
void SetFPRelativePosition (const VECTOR2I &aPos)
 
virtual bool HasLineStroke () const
 Check if this item has line stoke properties.
 
virtual STROKE_PARAMS GetStroke () const
 
virtual void SetStroke (const STROKE_PARAMS &aStroke)
 
const KIFONT::METRICSGetFontMetrics () const
 
virtual PCB_LAYER_ID GetLayer () const
 Return the primary layer this item is on.
 
virtual LSET GetLayerSet () const
 Return a std::bitset of all layers on which the item physically resides.
 
virtual void SetLayerSet (LSET aLayers)
 
bool IsSideSpecific () const
 
virtual void SetLayer (PCB_LAYER_ID aLayer)
 Set the layer this item is on.
 
virtual BOARD_ITEMDuplicate () const
 Create a copy of this BOARD_ITEM.
 
void SwapItemData (BOARD_ITEM *aImage)
 Swap data between aItem and aImage.
 
virtual bool IsOnLayer (PCB_LAYER_ID aLayer) const
 Test to see if this object is on the given layer.
 
virtual bool IsKnockout () const
 
virtual void SetIsKnockout (bool aKnockout)
 
virtual bool IsLocked () const
 
virtual void SetLocked (bool aLocked)
 
virtual void StyleFromSettings (const BOARD_DESIGN_SETTINGS &settings)
 
void DeleteStructure ()
 Delete this object after removing from its parent if it has one.
 
virtual void Rotate (const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle)
 Rotate this object.
 
virtual void Flip (const VECTOR2I &aCentre, bool aFlipLeftRight)
 Flip this object, i.e.
 
virtual void Normalize ()
 Perform any normalization required after a user rotate and/or flip.
 
virtual const BOARDGetBoard () const
 Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
 
virtual BOARDGetBoard ()
 
wxString GetParentAsString () const
 For "parent" property.
 
wxString GetLayerName () const
 Return the name of the PCB layer on which the item resides.
 
virtual void ViewGetLayers (int aLayers[], int &aCount) const override
 Return the all the layers within the VIEW the object is painted on.
 
virtual void TransformShapeToPolygon (SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const
 Convert the item shape to a closed polygon.
 
KICAD_T Type () const
 Returns the type of object.
 
virtual void SetParent (EDA_ITEM *aParent)
 
bool IsModified () const
 
bool IsNew () const
 
bool IsMoving () const
 
bool IsSelected () const
 
bool IsEntered () const
 
bool IsBrightened () const
 
bool IsRollover () const
 
void SetSelected ()
 
void SetBrightened ()
 
void ClearSelected ()
 
void ClearBrightened ()
 
void SetModified ()
 
void SetFlags (EDA_ITEM_FLAGS aMask)
 
void XorFlags (EDA_ITEM_FLAGS aMask)
 
void ClearFlags (EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
 
EDA_ITEM_FLAGS GetFlags () const
 
bool HasFlag (EDA_ITEM_FLAGS aFlag) const
 
EDA_ITEM_FLAGS GetEditFlags () const
 
virtual void ClearEditFlags ()
 
EDA_ITEM_FLAGS GetTempFlags () const
 
virtual void ClearTempFlags ()
 
virtual bool RenderAsBitmap (double aWorldScale) const
 
void SetIsShownAsBitmap (bool aBitmap)
 
bool IsShownAsBitmap () const
 
virtual bool IsType (const std::vector< KICAD_T > &aScanTypes) const
 Check whether the item is one of the listed types.
 
void SetForceVisible (bool aEnable)
 Set and clear force visible flag used to force the item to be drawn even if it's draw attribute is set to not visible.
 
bool IsForceVisible () const
 
virtual wxString GetFriendlyName () const
 
virtual bool HitTest (const VECTOR2I &aPosition, int aAccuracy=0) const
 Test if aPosition is inside or on the boundary of this item.
 
virtual bool HitTest (const BOX2I &aRect, bool aContained, int aAccuracy=0) const
 Test if aRect intersects this item.
 
virtual VECTOR2I GetSortPosition () const
 Return the coordinates that should be used for sorting this element visually compared to other elements.
 
virtual EDA_ITEMClone () const
 Create a duplicate of this item with linked list members set to NULL.
 
wxString GetTypeDesc () const
 Return a translated description of the type for this EDA_ITEM for display in user facing messages.
 
virtual BITMAPS GetMenuImage () const
 Return a pointer to an image to be used in menus.
 
virtual bool Matches (const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const
 Compare the item against the search criteria in aSearchData.
 
virtual bool Replace (const EDA_SEARCH_DATA &aSearchData, void *aAuxData=nullptr)
 Perform a text replace using the find and replace criteria in aSearchData on items that support text find and replace.
 
virtual bool IsReplaceable () const
 Override this method in any derived object that supports test find and replace.
 
bool operator< (const EDA_ITEM &aItem) const
 Test if another item is less than this object.
 
virtual const BOX2I ViewBBox () const override
 Return the bounding box of the item covering all its layers.
 
virtual void ViewDraw (int aLayer, VIEW *aView) const
 Draw the parts of the object belonging to layer aLayer.
 
virtual double ViewGetLOD (int aLayer, VIEW *aView) const
 Return the level of detail (LOD) of the item.
 
VIEW_ITEM_DATA * viewPrivData () const
 
void SetForcedTransparency (double aForcedTransparency)
 
double GetForcedTransparency () const
 
bool Set (PROPERTY_BASE *aProperty, wxAny &aValue, bool aNotify=true)
 
template<typename T >
bool Set (PROPERTY_BASE *aProperty, T aValue, bool aNotify=true)
 
template<typename T >
bool Set (const wxString &aProperty, T aValue, bool aNotify=true)
 
wxAny Get (PROPERTY_BASE *aProperty) const
 
template<typename T >
Get (PROPERTY_BASE *aProperty) const
 
template<typename T >
std::optional< T > Get (const wxString &aProperty) const
 
virtual void Serialize (google::protobuf::Any &aContainer) const
 Serializes this object to the given Any message.
 
virtual bool Deserialize (const google::protobuf::Any &aContainer)
 Deserializes the given protobuf message into this object.
 
EMBEDDED_FILEAddFile (const wxFileName &aName, bool aOverwrite)
 Loads a file from disk and adds it to the collection.
 
void AddFile (EMBEDDED_FILE *aFile)
 Appends a file to the collection.
 
void RemoveFile (const wxString &name, bool aErase=true)
 Removes a file from the collection and frees the memory.
 
void WriteEmbeddedFiles (OUTPUTFORMATTER &aOut, int aNestLevel, bool aWriteData) const
 Output formatter for the embedded files.
 
wxString GetEmbeddedFileLink (const EMBEDDED_FILE &aFile) const
 Returns the link for an embedded file.
 
bool HasFile (const wxString &name) const
 
const std::vector< wxString > * UpdateFontFiles ()
 Helper function to get a list of fonts for fontconfig to add to the library.
 
const std::vector< wxString > * GetFontFiles () const
 If we just need the cached version of the font files, we can use this function which is const and will not update the font files.
 
void ClearEmbeddedFonts ()
 Removes all embedded fonts from the collection.
 
EMBEDDED_FILEGetEmbeddedFile (const wxString &aName) const
 Returns the embedded file with the given name or nullptr if it does not exist.
 
const std::map< wxString, EMBEDDED_FILE * > & EmbeddedFileMap () const
 
wxFileName GetTemporaryFileName (const wxString &aName) const
 
wxFileName GetTemporaryFileName (EMBEDDED_FILE *aFile) const
 
void ClearEmbeddedFiles (bool aDeleteFiles=true)
 
void SetAreFontsEmbedded (bool aEmbedFonts)
 
bool GetAreFontsEmbedded () const
 

Static Public Member Functions

static bool ClassOf (const EDA_ITEM *aItem)
 
static wxString GetStandardLayerName (PCB_LAYER_ID aLayerId)
 Return an "English Standard" name of a PCB layer when given aLayerNumber.
 
template<class T >
static INSPECT_RESULT IterateForward (std::deque< T > &aList, INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &scanTypes)
 This changes first parameter to avoid the DList and use the main queue instead.
 
template<class T >
static INSPECT_RESULT IterateForward (std::vector< T > &aList, INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &scanTypes)
 Change first parameter to avoid the DList and use std::vector instead.
 
static bool Replace (const EDA_SEARCH_DATA &aSearchData, wxString &aText)
 Perform a text replace on aText using the find and replace criteria in aSearchData on items that support text find and replace.
 
static bool Sort (const EDA_ITEM *aLeft, const EDA_ITEM *aRight)
 Helper function to be used by the C++ STL sort algorithm for sorting a STL container of EDA_ITEM pointers.
 
static RETURN_CODE CompressAndEncode (EMBEDDED_FILE &aFile)
 Takes data from the #decompressedData buffer and compresses it using ZSTD into the #compressedEncodedData buffer.
 
static RETURN_CODE DecompressAndDecode (EMBEDDED_FILE &aFile)
 Takes data from the #compressedEncodedData buffer and Base64 decodes it.
 

Public Attributes

LSET m_LegacyVisibleLayers
 Visibility settings stored in board prior to 6.0, only used for loading legacy files.
 
GAL_SET m_LegacyVisibleItems
 
bool m_LegacyDesignSettingsLoaded
 True if the legacy board design settings were loaded from a file.
 
bool m_LegacyCopperEdgeClearanceLoaded
 
bool m_LegacyNetclassesLoaded
 True if netclasses were loaded from the file.
 
std::shared_mutex m_CachesMutex
 
std::unordered_map< PTR_PTR_CACHE_KEY, bool > m_IntersectsCourtyardCache
 
std::unordered_map< PTR_PTR_CACHE_KEY, bool > m_IntersectsFCourtyardCache
 
std::unordered_map< PTR_PTR_CACHE_KEY, bool > m_IntersectsBCourtyardCache
 
std::unordered_map< PTR_PTR_LAYER_CACHE_KEY, bool > m_IntersectsAreaCache
 
std::unordered_map< PTR_PTR_LAYER_CACHE_KEY, bool > m_EnclosedByAreaCache
 
std::unordered_map< wxString, LSETm_LayerExpressionCache
 
std::unordered_map< ZONE *, std::unique_ptr< DRC_RTREE > > m_CopperZoneRTreeCache
 
std::shared_ptr< DRC_RTREEm_CopperItemRTreeCache
 
std::unordered_map< const ZONE *, BOX2Im_ZoneBBoxCache
 
std::optional< int > m_maxClearanceValue
 
std::vector< ZONE * > m_DRCZones
 
std::vector< ZONE * > m_DRCCopperZones
 
int m_DRCMaxClearance
 
int m_DRCMaxPhysicalClearance
 
ZONEm_SolderMaskBridges
 
std::map< ZONE *, std::map< PCB_LAYER_ID, ISOLATED_ISLANDS > > m_ZoneIsolatedIslandsMap
 
const KIID m_Uuid
 

Static Public Attributes

static VECTOR2I ZeroOffset
 A value of wxPoint(0,0) which can be passed to the Draw() functions.
 

Protected Member Functions

virtual wxString layerMaskDescribe () const
 Return a string (to be shown to the user) describing a layer mask.
 
virtual void swapData (BOARD_ITEM *aImage)
 
bool Matches (const wxString &aText, const EDA_SEARCH_DATA &aSearchData) const
 Compare aText against search criteria in aSearchData.
 

Protected Attributes

PCB_LAYER_ID m_layer
 
bool m_isKnockout
 
bool m_isLocked
 
PCB_GROUPm_group
 
EDA_ITEM_FLAGS m_flags
 
EDA_ITEMm_parent
 Linked list: Link (parent struct)
 
bool m_forceVisible
 

Private Member Functions

 BOARD (const BOARD &aOther)=delete
 
BOARDoperator= (const BOARD &aOther)=delete
 
template<typename Func , typename... Args>
void InvokeListeners (Func &&aFunc, Args &&... args)
 
void recalcOpposites ()
 

Private Attributes

int m_outlinesChainingEpsilon
 the max distance between 2 end point to see them connected when building the board outlines
 
BOARD_USE m_boardUse
 What is this board being used for.
 
int m_timeStamp
 
wxString m_fileName
 
MARKERS m_markers
 
DRAWINGS m_drawings
 
FOOTPRINTS m_footprints
 
TRACKS m_tracks
 
GROUPS m_groups
 
ZONES m_zones
 
GENERATORS m_generators
 
std::unordered_map< KIID, BOARD_ITEM * > m_itemByIdCache
 
LAYER m_layers [PCB_LAYER_ID_COUNT]
 
HIGH_LIGHT_INFO m_highLight
 
HIGH_LIGHT_INFO m_highLightPrevious
 
int m_fileFormatVersionAtLoad
 
wxString m_generator
 
std::map< wxString, wxString > m_properties
 
std::shared_ptr< CONNECTIVITY_DATAm_connectivity
 
PAGE_INFO m_paper
 
TITLE_BLOCK m_titles
 
PCB_PLOT_PARAMS m_plotOptions
 
PROJECTm_project
 
EDA_UNITS m_userUnits
 
std::unique_ptr< BOARD_DESIGN_SETTINGSm_designSettings
 All of the board design settings are stored as a JSON object inside the project file.
 
bool m_legacyTeardrops = false
 Teardrops in 7.0 were applied as a post-processing step (rather than from pad and via properties).
 
NETINFO_LIST m_NetInfo
 
std::vector< BOARD_LISTENER * > m_listeners
 
bool m_embedFonts
 
KICAD_T m_structType
 Run time identification, keep private so it can never be changed after a ctor sets it.
 
VIEW_ITEM_DATA * m_viewPrivData
 
double m_forcedTransparency
 Additional transparency for diff'ing items.
 
std::map< wxString, EMBEDDED_FILE * > m_files
 
std::vector< wxString > m_fontFiles
 

Friends

class PCB_EDIT_FRAME
 

Detailed Description

Information pertinent to a Pcbnew printed circuit board.

Definition at line 288 of file board.h.

Member Enumeration Documentation

◆ COMPARE_FLAGS

enum BOARD_ITEM::COMPARE_FLAGS : int
inherited
Enumerator
DRC 

Definition at line 390 of file board_item.h.

◆ RETURN_CODE

enum class EMBEDDED_FILES::RETURN_CODE : int
stronginherited
Enumerator
OK 
FILE_NOT_FOUND 
PERMISSIONS_ERROR 
FILE_ALREADY_EXISTS 
OUT_OF_MEMORY 
CHECKSUM_ERROR 

Definition at line 74 of file embedded_files.h.

Constructor & Destructor Documentation

◆ BOARD() [1/2]

◆ ~BOARD()

◆ BOARD() [2/2]

BOARD::BOARD ( const BOARD aOther)
privatedelete

Member Function Documentation

◆ Add()

void BOARD::Add ( BOARD_ITEM aItem,
ADD_MODE  aMode = ADD_MODE::INSERT,
bool  aSkipConnectivity = false 
)
overridevirtual

Removes an item from the container.

Implements BOARD_ITEM_CONTAINER.

Definition at line 983 of file board.cpp.

References NETINFO_LIST::AppendNet(), EDA_ITEM::ClearEditFlags(), BOARD_ITEM::GetLayer(), InvokeListeners(), IsCopperLayer(), m_connectivity, m_drawings, m_footprints, m_generators, m_groups, m_itemByIdCache, m_markers, m_NetInfo, m_tracks, EDA_ITEM::m_Uuid, m_zones, BOARD_LISTENER::OnBoardItemAdded(), PCB_ARC_T, PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_FIELD_T, PCB_FOOTPRINT_T, PCB_GENERATOR_T, PCB_GROUP_T, PCB_MARKER_T, PCB_NETINFO_T, PCB_REFERENCE_IMAGE_T, PCB_SHAPE_T, PCB_TABLE_T, PCB_TARGET_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_T, FOOTPRINT::RunOnChildren(), PCB_TABLE::RunOnChildren(), EDA_ITEM::SetParent(), and EDA_ITEM::Type().

Referenced by NET_SELECTOR_COMBOPOPUP::Accept(), PCB_BASE_FRAME::AddFootprintToBoard(), TEARDROP_MANAGER::AddTeardropsOnTracks(), PCAD2KICAD::PCAD_ARC::AddToBoard(), PCAD2KICAD::PCAD_FOOTPRINT::AddToBoard(), PCAD2KICAD::PCAD_LINE::AddToBoard(), PCAD2KICAD::PCAD_PAD::AddToBoard(), PCAD2KICAD::PCAD_PCB::AddToBoard(), PCAD2KICAD::PCAD_POLYGON::AddToBoard(), PCAD2KICAD::PCAD_TEXT::AddToBoard(), PCAD2KICAD::PCAD_PAD::AddToFootprint(), ALTIUM_PCB::ConvertArcs6ToBoardItem(), ALTIUM_PCB::ConvertArcs6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertFills6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertPads6ToBoardItem(), ALTIUM_PCB::ConvertPads6ToBoardItemOnNonCopper(), ALTIUM_PCB::ConvertShapeBasedRegions6ToBoardItem(), ALTIUM_PCB::ConvertShapeBasedRegions6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertTexts6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertTracks6ToBoardItem(), ALTIUM_PCB::ConvertTracks6ToBoardItemOnLayer(), CADSTAR_PCB_ARCHIVE_LOADER::createUniqueGroupID(), FOOTPRINT_VIEWER_FRAME::displayFootprint(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DSN::SPECCTRA_DB::FromSESSION(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet(), ZONE_SEARCH_HANDLER::getResultCell(), ALTIUM_PCB::HelperCreateBoardOutline(), ALTIUM_PCB::HelperParseDimensions6Center(), ALTIUM_PCB::HelperParseDimensions6Datum(), ALTIUM_PCB::HelperParseDimensions6Leader(), ALTIUM_PCB::HelperParseDimensions6Linear(), ALTIUM_PCB::HelperParseDimensions6Radial(), ALTIUM_PCB::HelperPcpShapeAsBoardKeepoutRegion(), DISPLAY_FOOTPRINTS_FRAME::InitDisplay(), PCB_IO_KICAD_LEGACY::loadAllSections(), CADSTAR_PCB_ARCHIVE_LOADER::loadAreas(), LoadBoard(), CADSTAR_PCB_ARCHIVE_LOADER::loadComponents(), CADSTAR_PCB_ARCHIVE_LOADER::loadCoppers(), PCB_IO_KICAD_LEGACY::loadDIMENSION(), CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions(), FABMASTER::loadEtch(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), CADSTAR_PCB_ARCHIVE_LOADER::loadGroups(), PCB_IO_KICAD_LEGACY::loadNETINFO_ITEM(), FABMASTER::loadNets(), CADSTAR_PCB_ARCHIVE_LOADER::loadNetVia(), FABMASTER::loadOutline(), PCB_IO_KICAD_LEGACY::loadPCB_LINE(), PCB_IO_KICAD_LEGACY::loadPCB_TARGET(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), FABMASTER::loadPolygon(), CADSTAR_PCB_ARCHIVE_LOADER::loadTemplates(), PCB_IO_KICAD_LEGACY::loadTrackList(), FABMASTER::loadVias(), FABMASTER::loadZone(), PCB_IO_KICAD_LEGACY::loadZONE_CONTAINER(), MapNets(), DIALOG_FOOTPRINT_CHOOSER::on3DviewReq(), PCB_NET_INSPECTOR_PANEL::onAddNet(), PCB_NET_INSPECTOR_PANEL::onRenameSelectedNet(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDA_PARSER::ParseBoard(), PCB_IO_KICAD_SEXPR_PARSER::parseBOARD_unchecked(), ALTIUM_PCB::ParseComponents6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseNETINFO_ITEM(), ALTIUM_PCB::ParseNets6Data(), ALTIUM_PCB::ParsePolygons6Data(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), ALTIUM_PCB::ParseVias6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseZONE(), BOARD_COMMIT::Push(), FOOTPRINT_WIZARD_FRAME::RegenerateFootprint(), DISPLAY_FOOTPRINTS_FRAME::ReloadFootprint(), BOARD_EDITOR_CONTROL::RepairBoard(), BOARD_COMMIT::Revert(), DIALOG_FOOTPRINT_CHECKER::runChecks(), TEARDROP_MANAGER::UpdateTeardrops(), and FOOTPRINT_CHOOSER_FRAME::updateViews().

◆ AddArea()

ZONE * BOARD::AddArea ( PICKED_ITEMS_LIST aNewZonesList,
int  aNetcode,
PCB_LAYER_ID  aLayer,
VECTOR2I  aStartPointPosition,
ZONE_BORDER_DISPLAY_STYLE  aHatch 
)

Add an empty copper area to board areas list.

Parameters
aNewZonesListis a PICKED_ITEMS_LIST * where to store new areas pickers (useful in undo commands) can be NULL.
aNetcodeis the netcode of the copper area (0 = no net).
aLayeris the layer of area.
aStartPointPositionis position of the first point of the polygon outline of this area.
aHatchis the hatch option.
Returns
a reference to the new area.

Definition at line 2449 of file board.cpp.

References ZONE::AppendCorner(), m_zones, PICKED_ITEMS_LIST::PushItem(), ZONE::SetHatchStyle(), ZONE::SetLayer(), and BOARD_CONNECTED_ITEM::SetNetCode().

◆ AddFile() [1/2]

◆ AddFile() [2/2]

void EMBEDDED_FILES::AddFile ( EMBEDDED_FILE aFile)
inherited

Appends a file to the collection.

Definition at line 108 of file embedded_files.cpp.

References EMBEDDED_FILES::m_files, and EMBEDDED_FILES::EMBEDDED_FILE::name.

◆ AddListener()

void BOARD::AddListener ( BOARD_LISTENER aListener)

Add a listener to the board to receive calls whenever something on the board has been modified.

The board does not take ownership of the listener object. Make sure to call RemoveListener before deleting the listener object. The order of listener invocations is not guaranteed. If the specified listener object has been added before, it will not be added again.

Definition at line 2643 of file board.cpp.

References alg::contains(), and m_listeners.

Referenced by DIALOG_GENERATORS::DIALOG_GENERATORS(), APPEARANCE_CONTROLS::OnBoardChanged(), PCB_NET_INSPECTOR_PANEL::OnBoardChanged(), DIALOG_GENERATORS::onBoardChanged(), PCB_SEARCH_PANE::onBoardChanged(), PCB_NET_INSPECTOR_PANEL::PCB_NET_INSPECTOR_PANEL(), and PCB_SEARCH_PANE::PCB_SEARCH_PANE().

◆ AllConnectedItems()

const std::vector< BOARD_CONNECTED_ITEM * > BOARD::AllConnectedItems ( )

◆ BeginNets()

NETINFO_LIST::iterator BOARD::BeginNets ( ) const
inline
Returns
iterator to the first element of the NETINFO_ITEMs list.

Definition at line 878 of file board.h.

References NETINFO_LIST::begin(), and m_NetInfo.

◆ BuildConnectivity()

◆ BuildListOfNets()

◆ CacheTriangulation()

void BOARD::CacheTriangulation ( PROGRESS_REPORTER aReporter = nullptr,
const std::vector< ZONE * > &  aZones = {} 
)

◆ ClassOf()

static bool BOARD::ClassOf ( const EDA_ITEM aItem)
inlinestatic

Definition at line 291 of file board.h.

References PCB_T, and EDA_ITEM::Type().

◆ ClearBrightened()

◆ ClearEditFlags()

◆ ClearEmbeddedFiles()

void EMBEDDED_FILES::ClearEmbeddedFiles ( bool  aDeleteFiles = true)
inlineinherited

◆ ClearEmbeddedFonts()

void EMBEDDED_FILES::ClearEmbeddedFonts ( )
inherited

◆ ClearFlags()

void EDA_ITEM::ClearFlags ( EDA_ITEM_FLAGS  aMask = EDA_ITEM_ALL_FLAGS)
inlineinherited

Definition at line 129 of file eda_item.h.

References EDA_ITEM::m_flags.

Referenced by FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PNS_KICAD_IFACE::AddItem(), PNS_KICAD_IFACE_GENERATOR::AddItem(), SCH_MOVE_TOOL::AlignToGrid(), SCH_EDIT_TOOL::BreakWire(), FOOTPRINT::BuildCourtyardCaches(), EDA_ITEM::ClearBrightened(), EDA_ITEM::ClearEditFlags(), EDA_ITEM::ClearSelected(), EDA_ITEM::ClearTempFlags(), ConnectBoardShapes(), SYMBOL_EDITOR_EDIT_TOOL::Copy(), FOOTPRINT_EDITOR_CONTROL::CreateFootprint(), SYMBOL_EDITOR_PIN_TOOL::CreateImagePins(), MICROWAVE_TOOL::createMicrowaveInductor(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), PCB_TOOL_BASE::doInteractiveItemPlacement(), KIGFX::SCH_PAINTER::draw(), SCH_ITEM::Duplicate(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PCB_TUNING_PATTERN::EditPush(), PCB_TUNING_PATTERN::EditRevert(), PCB_EDIT_FRAME::ExchangeFootprint(), PCB_SELECTION_TOOL::ExitGroup(), SCH_IO_KICAD_SEXPR::Format(), SYMBOL_EDIT_FRAME::GetSymbolFromRedoList(), SYMBOL_EDIT_FRAME::GetSymbolFromUndoList(), EE_SELECTION_TOOL::GuessSelectionCandidates(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::Init(), EE_COLLECTOR::Inspect(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromLibrary(), FOOTPRINT_EDITOR_CONTROL::NewFootprint(), DIALOG_SYMBOL_PROPERTIES::OnUnitChoice(), FOOTPRINT_EDIT_FRAME::OpenProjectFiles(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), PCB_BASE_FRAME::PlaceFootprint(), SYMBOL_EDITOR_PIN_TOOL::PlacePin(), SCH_COMMIT::pushSchEdit(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), PCB_SELECTION_TOOL::RebuildSelection(), PAD::Recombine(), GERBVIEW_FRAME::RemapLayers(), DRC_TEST_PROVIDER_DISALLOW::Run(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), SCH_IO_KICAD_SEXPR_LIB_CACHE::savePin(), EE_SELECTION_TOOL::selectMultiple(), EDA_ITEM::SetIsShownAsBitmap(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), EE_SELECTION_TOOL::unhighlight(), and SCOPED_FLAGS_CLEANER::~SCOPED_FLAGS_CLEANER().

◆ ClearProject()

◆ ClearSelected()

◆ ClearTempFlags()

virtual void EDA_ITEM::ClearTempFlags ( )
inlinevirtualinherited

◆ Clone()

EDA_ITEM * EDA_ITEM::Clone ( ) const
virtualinherited

Create a duplicate of this item with linked list members set to NULL.

The default version will return NULL in release builds and likely crash the program. In debug builds, a warning message indicating the derived class has not implemented cloning. This really should be a pure virtual function. Due to the fact that there are so many objects derived from EDA_ITEM, the decision was made to return NULL until all the objects derived from EDA_ITEM implement cloning. Once that happens, this function should be made pure.

Returns
A clone of the item.

Reimplemented in SCH_BITMAP, SCH_BUS_WIRE_ENTRY, SCH_BUS_BUS_ENTRY, SCH_FIELD, SCH_JUNCTION, SCH_LABEL, SCH_DIRECTIVE_LABEL, SCH_GLOBALLABEL, SCH_HIERLABEL, SCH_LINE, SCH_MARKER, SCH_NO_CONNECT, SCH_PIN, SCH_RULE_AREA, SCH_SHAPE, SCH_SHEET, SCH_SHEET_PIN, SCH_SYMBOL, SCH_TABLE, SCH_TABLECELL, SCH_TEXT, SCH_TEXTBOX, KIGFX::ORIGIN_VIEWITEM, FOOTPRINT, PCB_TUNING_PATTERN, NETINFO_ITEM, PAD, PCB_DIM_ALIGNED, PCB_DIM_ORTHOGONAL, PCB_DIM_RADIAL, PCB_DIM_LEADER, PCB_DIM_CENTER, PCB_FIELD, PCB_GROUP, PCB_MARKER, PCB_REFERENCE_IMAGE, PCB_SHAPE, PCB_TABLE, PCB_TABLECELL, PCB_TARGET, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, PCB_ARC, PCB_VIA, and ZONE.

Definition at line 82 of file eda_item.cpp.

References EDA_ITEM::GetClass().

Referenced by BOARD_ITEM::Duplicate(), SCH_ITEM::Duplicate(), LIB_SYMBOL::LIB_SYMBOL(), BOARD_COMMIT::MakeImage(), SCH_COMMIT::makeImage(), new_clone(), LIB_SYMBOL::operator=(), SCH_IO_LIB_CACHE::removeSymbol(), SCH_EDIT_FRAME::SaveCopyInUndoList(), CLIPBOARD_IO::SaveSelection(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().

◆ CompressAndEncode()

EMBEDDED_FILES::RETURN_CODE EMBEDDED_FILES::CompressAndEncode ( EMBEDDED_FILE aFile)
staticinherited

Takes data from the #decompressedData buffer and compresses it using ZSTD into the #compressedEncodedData buffer.

The data is then Base64 encoded.

This call is used when adding a new file to the collection from disk

Definition at line 210 of file embedded_files.cpp.

References EMBEDDED_FILES::EMBEDDED_FILE::compressedEncodedData, EMBEDDED_FILES::EMBEDDED_FILE::data_sha, EMBEDDED_FILES::EMBEDDED_FILE::decompressedData, EMBEDDED_FILES::OK, and EMBEDDED_FILES::OUT_OF_MEMORY.

Referenced by EMBEDDED_FILES::AddFile(), BOOST_AUTO_TEST_CASE(), ALTIUM_PCB::ConvertComponentBody6ToFootprintItem(), and ALTIUM_PCB::ParseComponentsBodies6Data().

◆ ComputeBoundingBox()

BOX2I BOARD::ComputeBoundingBox ( bool  aBoardEdgesOnly = false,
bool  aIncludeHiddenText = false 
) const

◆ ConvertBrdLayerToPolygonalContours()

void BOARD::ConvertBrdLayerToPolygonalContours ( PCB_LAYER_ID  aLayer,
SHAPE_POLY_SET aOutlines 
) const

Build a set of polygons which are the outlines of copper items (pads, tracks, vias, texts, zones).

Holes in vias or pads are ignored. The polygons are not merged. This is useful to export the shape of copper layers to dxf polygons or 3D viewer/

Parameters
aLayeris a copper layer, like B_Cu, etc.
aOutlinesis the SHAPE_POLY_SET to fill in with items outline.

Definition at line 2897 of file board.cpp.

References ERROR_INSIDE, GetDesignSettings(), m_drawings, m_footprints, BOARD_DESIGN_SETTINGS::m_MaxError, m_tracks, PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_FIELD_T, PCB_SHAPE_T, PCB_TABLE_T, PCB_TEXT_T, PCB_TEXTBOX_T, text, PCB_DIMENSION_BASE::TransformShapeToPolygon(), PCB_SHAPE::TransformShapeToPolygon(), PCB_TABLE::TransformShapeToPolygon(), PCB_TEXT::TransformTextToPolySet(), PCB_TEXTBOX::TransformTextToPolySet(), and Zones().

Referenced by EXPORTER_PCB_VRML::ExportStandardLayers(), EXPORTER_PCB_VRML::ExportVrmlSolderMask(), and PlotLayerOutlines().

◆ ConvertCrossReferencesToKIIDs()

wxString BOARD::ConvertCrossReferencesToKIIDs ( const wxString &  aSource) const

Convert cross-references back and forth between ${refDes:field} and ${kiid:field}.

Definition at line 1534 of file board.cpp.

References Footprints().

Referenced by DIALOG_FOOTPRINT_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), and DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog().

◆ ConvertKIIDsToCrossReferences()

wxString BOARD::ConvertKIIDsToCrossReferences ( const wxString &  aSource) const

◆ DecompressAndDecode()

EMBEDDED_FILES::RETURN_CODE EMBEDDED_FILES::DecompressAndDecode ( EMBEDDED_FILE aFile)
staticinherited

Takes data from the #compressedEncodedData buffer and Base64 decodes it.

The data is then decompressed using ZSTD and stored in the #decompressedData buffer.

This call is used when loading the embedded files using the parsers.

Definition at line 241 of file embedded_files.cpp.

References EMBEDDED_FILES::CHECKSUM_ERROR, EMBEDDED_FILES::EMBEDDED_FILE::compressedEncodedData, EMBEDDED_FILES::EMBEDDED_FILE::data_sha, EMBEDDED_FILES::EMBEDDED_FILE::decompressedData, EMBEDDED_FILES::EMBEDDED_FILE::name, EMBEDDED_FILES::OK, and EMBEDDED_FILES::OUT_OF_MEMORY.

Referenced by BOOST_AUTO_TEST_CASE(), and EMBEDDED_FILES_PARSER::ParseEmbedded().

◆ Delete()

virtual void BOARD_ITEM_CONTAINER::Delete ( BOARD_ITEM aItem)
inlinevirtualinherited

Removes an item from the container and deletes it.

Definition at line 77 of file board_item_container.h.

References BOARD_ITEM_CONTAINER::Remove().

Referenced by DRC_ITEMS_PROVIDER::DeleteItem(), and EDIT_TOOL::DeleteItems().

◆ DeleteAllFootprints()

◆ DeleteMARKERs() [1/2]

◆ DeleteMARKERs() [2/2]

void BOARD::DeleteMARKERs ( bool  aWarningsAndErrors,
bool  aExclusions 
)

Definition at line 1354 of file board.cpp.

References m_itemByIdCache, m_markers, and RPT_SEVERITY_EXCLUSION.

◆ DeleteStructure()

void BOARD_ITEM::DeleteStructure ( )
inherited

Delete this object after removing from its parent if it has one.

Definition at line 177 of file board_item.cpp.

References BOARD_ITEM::GetParent(), and BOARD_ITEM_CONTAINER::Remove().

◆ Deserialize()

virtual bool SERIALIZABLE::Deserialize ( const google::protobuf::Any &  aContainer)
inlinevirtualinherited

Deserializes the given protobuf message into this object.

Parameters
aContaineris an Any which should have a concrete type matching this object
Returns
true if unpacking and deserialization succeeded

Reimplemented in SCH_LABEL, SCH_DIRECTIVE_LABEL, SCH_GLOBALLABEL, SCH_HIERLABEL, SCH_LINE, BOARD_STACKUP, FOOTPRINT, PAD, PADSTACK, PCB_FIELD, PCB_SHAPE, PCB_TEXT, PCB_TRACK, PCB_ARC, and PCB_VIA.

Definition at line 53 of file serializable.h.

◆ DpCoupledNet()

NETINFO_ITEM * BOARD::DpCoupledNet ( const NETINFO_ITEM aNet)
Returns
the coupled net for a given net. If not a diffpair, nullptr is returned.

Definition at line 1972 of file board.cpp.

References FindNet(), NETINFO_ITEM::GetNetname(), and MatchDpSuffix().

Referenced by PNS_PCBNEW_RULE_RESOLVER::DpCoupledNet(), PCB_TUNING_PATTERN::EditStart(), PCB_TUNING_PATTERN::initBaseLines(), PCB_TUNING_PATTERN::recoverBaseline(), and PCB_CONTROL::UpdateMessagePanel().

◆ Drawings()

◆ Duplicate()

◆ EmbeddedFileMap()

◆ EmbedFonts()

void BOARD::EmbedFonts ( )
overridevirtual

Finds all fonts used in the board and embeds them in the file if permissions allow.

Reimplemented from EMBEDDED_FILES.

Definition at line 2542 of file board.cpp.

References EMBEDDED_FILES::AddFile(), Drawings(), EMBEDDED_FILES::EMBEDDED_FILE::FONT, fonts, GetEmbeddedFiles(), KIFONT::FONT::IsStroke(), text, and EMBEDDED_FILES::EMBEDDED_FILE::type.

Referenced by PCB_IO_KICAD_SEXPR::SaveBoard().

◆ EndNets()

NETINFO_LIST::iterator BOARD::EndNets ( ) const
inline
Returns
iterator to the last element of the NETINFO_ITEMs list.

Definition at line 886 of file board.h.

References NETINFO_LIST::end(), and m_NetInfo.

◆ FillItemMap()

void BOARD::FillItemMap ( std::map< KIID, EDA_ITEM * > &  aMap)

◆ FinalizeBulkAdd()

void BOARD::FinalizeBulkAdd ( std::vector< BOARD_ITEM * > &  aNewItems)

Must be used if Add() is used using a BULK_x ADD_MODE to generate a change event for listeners.

Definition at line 1109 of file board.cpp.

References InvokeListeners(), and BOARD_LISTENER::OnBoardItemsAdded().

Referenced by PCB_IO_KICAD_SEXPR_PARSER::parseBOARD_unchecked().

◆ FinalizeBulkRemove()

void BOARD::FinalizeBulkRemove ( std::vector< BOARD_ITEM * > &  aRemovedItems)

Must be used if Remove() is used using a BULK_x REMOVE_MODE to generate a change event for listeners.

Definition at line 1115 of file board.cpp.

References InvokeListeners(), and BOARD_LISTENER::OnBoardItemsRemoved().

Referenced by DIALOG_DRC::OnDRCItemRClick(), and RemoveAll().

◆ FindFootprintByPath()

FOOTPRINT * BOARD::FindFootprintByPath ( const KIID_PATH aPath) const

Search for a FOOTPRINT within this board with the given path.

Parameters
aPathThe path ([sheetUUID, .., symbolUUID]) to search for.
Returns
If found, the FOOTPRINT having the given uuid, else NULL.

Definition at line 1999 of file board.cpp.

References m_footprints.

Referenced by PCB_EDIT_FRAME::LoadFootprints().

◆ FindFootprintByReference()

FOOTPRINT * BOARD::FindFootprintByReference ( const wxString &  aReference) const

Search for a FOOTPRINT within this board with the given reference designator.

Finds only the first one, if there is more than one such FOOTPRINT.

Parameters
aReferenceThe reference designator of the FOOTPRINT to find.
Returns
If found the FOOTPRINT having the given reference designator, else nullptr.

Definition at line 1987 of file board.cpp.

References m_footprints.

Referenced by DSN::SPECCTRA_DB::FromSESSION(), PCB_EDIT_FRAME::LoadFootprints(), and DRC_TEST_PROVIDER_SCHEMATIC_PARITY::testNetlist().

◆ FindNet() [1/2]

NETINFO_ITEM * BOARD::FindNet ( const wxString &  aNetname) const

Search for a net with the given name.

Parameters
aNetnameA Netname to search for.
Returns
the net if found or NULL if not found.

Definition at line 1916 of file board.cpp.

References NETINFO_LIST::GetNetItem(), and m_NetInfo.

◆ FindNet() [2/2]

NETINFO_ITEM * BOARD::FindNet ( int  aNetcode) const

◆ FixupEmbeddedData()

void BOARD::FixupEmbeddedData ( )

After loading a file from disk, the footprints do not yet contain the full data for their embedded files, only a reference.

This iterates over all footprints in the board and updates them with the full embedded data.

Definition at line 963 of file board.cpp.

References EMBEDDED_FILES::EMBEDDED_FILE::compressedEncodedData, EMBEDDED_FILES::EMBEDDED_FILE::data_sha, EMBEDDED_FILES::EMBEDDED_FILE::decompressedData, EMBEDDED_FILES::GetEmbeddedFile(), EMBEDDED_FILES::EMBEDDED_FILE::is_valid, and m_footprints.

Referenced by PCB_IO_KICAD_SEXPR_PARSER::parseBOARD_unchecked().

◆ Flip()

void BOARD_ITEM::Flip ( const VECTOR2I aCentre,
bool  aFlipLeftRight 
)
virtualinherited

Flip this object, i.e.

change the board side for this object.

Parameters
aCentrethe rotation point.
aFlipLeftRightmirror across Y axis instead of X (the default).

Reimplemented in FOOTPRINT, PCB_TUNING_PATTERN, PCB_DIMENSION_BASE, PCB_GENERATOR, PCB_GROUP, PCB_MARKER, PCB_REFERENCE_IMAGE, PCB_SHAPE, PCB_TABLE, PCB_TARGET, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, PCB_ARC, PCB_VIA, ZONE, and PAD.

Definition at line 329 of file board_item.cpp.

References EDA_ITEM::GetClass().

◆ FlipLayer()

◆ Footprints()

const FOOTPRINTS & BOARD::Footprints ( ) const
inline

Definition at line 330 of file board.h.

References m_footprints.

Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), GERBER_JOBFILE_WRITER::addJSONDesignRules(), RENDER_3D_RAYTRACE_BASE::addPadsAndVias(), AllConnectedItems(), PCB_CONTROL::AppendBoard(), AR_AUTOPLACER::AR_AUTOPLACER(), AR_AUTOPLACER::AutoplaceFootprints(), CN_CONNECTIVITY_ALGO::Build(), build_pad_testpoints(), EXPORTER_STEP::buildBoard3DShapes(), BuildBoardPolygonOutlines(), ZONE_FILLER::buildCopperItemClearances(), FROM_TO_CACHE::buildEndpointList(), DIALOG_BOARD_REANNOTATE::BuildFootprintList(), GENDRILL_WRITER_BASE::buildHolesList(), PCB_NET_INSPECTOR_PANEL::buildNetsList(), HYPERLYNX_EXPORTER::collectNetObjects(), ConvertCrossReferencesToKIIDs(), GENCAD_EXPORTER::CreateComponentsSection(), BOARD_ADAPTER::createLayers(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), GENCAD_EXPORTER::CreateShapesSection(), GENCAD_EXPORTER::CreateSignalsSection(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), PCB_DRAW_PANEL_GAL::DisplayBoard(), DIALOG_GLOBAL_DELETION::DoGlobalDeletions(), doPushPadProperties(), DRAWING_TOOL::DrawVia(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), PCB_EDIT_FRAME::Export_IDF3(), EXPORTER_PCB_VRML::ExportFp3DModelsAsLinkedFile(), EXPORTER_PCB_VRML::ExportVRML_File(), ZONE_FILLER::Fill(), FillItemMap(), ZONE_FILLER::fillNonCopperZone(), DSN::SPECCTRA_DB::FlipFOOTPRINTs(), DRC_TEST_PROVIDER::forEachGeometryItem(), PCB_IO_KICAD_SEXPR::format(), DSN::SPECCTRA_DB::FromBOARD(), GENDRILL_WRITER_BASE::genDrillMapFile(), PCB_IO_IPC2581::generateBOMSection(), PCB_IO_IPC2581::generateComponents(), PCB_IO_IPC2581::generateDrillLayers(), PCB_IO_IPC2581::generateStepSection(), RENDER_3D_OPENGL::generateViasAndPads(), PLACE_FILE_EXPORTER::GenPositionData(), PLACE_FILE_EXPORTER::GenReportData(), RENDER_3D_OPENGL::get3dModelsSelected(), GetBoardPolygonOutlines(), PCB_BASE_EDIT_FRAME::GetContextualTextVars(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), GetItem(), GetMsgPanelInfo(), NETINFO_ITEM::GetMsgPanelInfo(), PCB_DRAW_PANEL_GAL::GetMsgPanelInfo(), GetNodesCount(), GetPadFast(), GetPads(), GetSortedPadListByXthenYCoord(), API_HANDLER_PCB::handleGetItems(), DIALOG_EXPORT_2581::Init(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::Init(), DIALOG_GENDRILL::InitDisplayParams(), ZONE_FILLER::knockoutThermalReliefs(), RENDER_3D_RAYTRACE_BASE::load3DModels(), RENDER_3D_OPENGL::load3dModels(), DRC_ENGINE::loadImplicitRules(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), BOARD_INSPECTION_TOOL::makeDRCEngine(), AR_AUTOPLACER::nearestPad(), FOOTPRINT_EDIT_FRAME::OnUpdateSaveFootprintToBoard(), PCB_IO_KICAD_SEXPR_PARSER::parseBOARD_unchecked(), PCB_CONTROL::Paste(), AR_AUTOPLACER::pickFootprint(), PCB_CONTROL::placeBoardItems(), BRDITEMS_PLOTTER::PlotDrillMarks(), PlotInteractiveLayer(), PlotLayerOutlines(), PlotSolderMaskLayer(), PlotStandardLayer(), DIALOG_EXCHANGE_FOOTPRINTS::processMatchingFootprints(), BOARD_REANNOTATE_TOOL::ReannotateDuplicates(), RecreateCmpFile(), FOOTPRINT_EDITOR_CONTROL::RepairFootprint(), DSN::SPECCTRA_DB::RevertFOOTPRINTs(), DRC_CACHE_GENERATOR::Run(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), DRC_TEST_PROVIDER_FOOTPRINT_CHECKS::Run(), DRC_TEST_PROVIDER_HOLE_SIZE::Run(), DRC_TEST_PROVIDER_LIBRARY_PARITY::Run(), DRC_TEST_PROVIDER_SOLDER_MASK::Run(), PCB_EDIT_FRAME::RunActionPlugin(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), CLIPBOARD_IO::SaveSelection(), DIALOG_FIND::search(), FOOTPRINT_SEARCH_HANDLER::Search(), searchAreas(), searchFootprints(), FOOTPRINT_EDIT_FRAME::SelectFootprintFromBoard(), SetElementVisibility(), ZONE_FILLER::subtractHigherPriorityZones(), PNS_KICAD_IFACE_BASE::SyncWorld(), TestBoardOutlinesGraphicItems(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testFootprintCourtyardDefinitions(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testGraphicClearances(), DRC_TEST_PROVIDER_SCHEMATIC_PARITY::testNetlist(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadClearances(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataFromWindow(), PANEL_SETUP_LAYERS::TransferDataFromWindow(), NETINFO_MAPPING::Update(), BOARD_NETLIST_UPDATER::UpdateNetlist(), DIALOG_UNUSED_PAD_LAYERS::updatePadsAndVias(), HYPERLYNX_EXPORTER::writeDevices(), GENCAD_EXPORTER::WriteFile(), and HYPERLYNX_EXPORTER::writePadStacks().

◆ Generators()

◆ Get() [1/3]

template<typename T >
std::optional< T > INSPECTABLE::Get ( const wxString &  aProperty) const
inlineinherited

◆ Get() [2/3]

◆ Get() [3/3]

template<typename T >
T INSPECTABLE::Get ( PROPERTY_BASE aProperty) const
inlineinherited

◆ GetArea()

ZONE * BOARD::GetArea ( int  index) const
inline

Return the Zone at a given index.

Parameters
indexThe array type index into a collection of ZONE *.
Returns
a pointer to the Area or NULL if index out of range.

Definition at line 1021 of file board.h.

References m_zones.

◆ GetAreaCount()

int BOARD::GetAreaCount ( ) const
inline
Returns
The number of copper pour areas or ZONEs.

Definition at line 1037 of file board.h.

References m_zones.

◆ GetAreFontsEmbedded()

◆ GetBoard() [1/2]

BOARD * BOARD_ITEM::GetBoard ( )
virtualinherited

◆ GetBoard() [2/2]

const BOARD * BOARD_ITEM::GetBoard ( ) const
virtualinherited

Return the BOARD in which this BOARD_ITEM resides, or NULL if none.

Definition at line 47 of file board_item.cpp.

References BOARD_ITEM::GetBoard(), BOARD_ITEM::GetParent(), PCB_T, and EDA_ITEM::Type().

Referenced by CN_CONNECTIVITY_ALGO::Add(), BOARD_ADAPTER::addShape(), BOARD_ITEM_DESC::BOARD_ITEM_DESC(), CN_CONNECTIVITY_ALGO::Build(), PAD::BuildEffectivePolygon(), PAD::BuildEffectiveShapes(), ZONE::BuildSmoothedPoly(), PAD::CheckPad(), collidesWithArea(), PCB_TUNING_PATTERN::CreateNew(), BOARD_INSPECTION_TOOL::DiffFootprint(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), enclosedByAreaFunc(), existsOnLayerFunc(), ZONE_FILLER::Fill(), PCB_VIA::FlashLayer(), PAD::FlashLayer(), FOOTPRINT::Flip(), PCB_DIMENSION_BASE::Flip(), PCB_GENERATOR::Flip(), PCB_SHAPE::Flip(), PCB_TABLE::Flip(), PCB_TARGET::Flip(), PCB_TEXT::Flip(), PCB_TRACK::Flip(), PCB_ARC::Flip(), PCB_VIA::Flip(), ZONE::Flip(), FOOTPRINT::FootprintNeedsUpdate(), PCB_IO_KICAD_SEXPR::format(), fromToFunc(), BOARD_ITEM::GetBoard(), PCBEXPR_CONTEXT::GetBoard(), NETINFO_ITEM::GetBoundingBox(), ZONE::GetBoundingBox(), FOOTPRINT::GetBoundingBox(), FOOTPRINT::GetBoundingHull(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), PCB_BASE_EDIT_FRAME::GetContextualTextVars(), BOARD_CONNECTED_ITEM::GetDisplayNetname(), PCB_VIA::GetDrillConstraint(), BOARD_CONNECTED_ITEM::GetEffectiveNetClass(), PCB_TEXT::GetEffectiveShape(), getFieldFunc(), ZONE::GetInteractingZones(), ZONE::GetItemDescription(), FOOTPRINT::GetLayerBoundingBox(), BOARD_ITEM::GetLayerName(), PCB_VIA::GetMinAnnulus(), PCB_TUNING_PATTERN::GetMsgPanelInfo(), NETINFO_ITEM::GetMsgPanelInfo(), PCB_TRACK::GetMsgPanelInfo(), ZONE::GetMsgPanelInfo(), PCB_TRACK::GetMsgPanelInfoBase_Common(), BOARD_CONNECTED_ITEM::GetNetnameMsg(), PCB_VIA::GetOutermostConnectedLayers(), BOARD_CONNECTED_ITEM::GetOwnClearance(), PAD::GetOwnClearance(), PCB_MARKER::GetSeverity(), PCB_TEXT::GetShownText(), PCB_TEXTBOX::GetShownText(), FOOTPRINT::GetSide(), PAD::GetSolderMaskExpansion(), PCB_VIA::GetSolderMaskExpansion(), PAD::GetSolderPasteMargin(), GetTrackLength(), PCB_TRACK::GetWidthConstraint(), PCB_VIA::GetWidthConstraint(), inDiffPairFunc(), ROUTER_TOOL::Init(), intersectsAreaFunc(), intersectsBackCourtyardFunc(), intersectsCourtyardFunc(), intersectsFrontCourtyardFunc(), BOARD_ITEM::IsLocked(), BOARD_ITEM::IsSideSpecific(), PCB_VIA::IsTented(), BOARD_ITEM::layerMaskDescribe(), PCB_VIA::layerMaskDescribe(), PAD::MergePrimitivesAsPolygon(), ZONE::Move(), DIALOG_TEXTBOX_PROPERTIES::onBorderChecked(), PCB_IO_EAGLE::packageWire(), padNeedsUpdate(), PCB_TUNING_PATTERN::recoverBaseline(), ResolveDRCExclusions(), FOOTPRINT::ResolveTextVar(), PCB_SHAPE::SetIsProxyItem(), BOARD_CONNECTED_ITEM::SetNetCode(), PCB_DIMENSION_BASE::SetUnitsMode(), PCB_TUNING_PATTERN::ShowPropertiesDialog(), DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems(), CONNECTIVITY_DATA::TestTrackEndpointDangling(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataFromWindow(), DIALOG_FOOTPRINT_ASSOCIATIONS::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataToWindow(), ZONE::TransformSmoothedOutlineToPolygon(), UpdateRatsnestExclusions(), FOOTPRINT::ViewBBox(), PAD::ViewBBox(), PCB_TRACK::ViewBBox(), PAD::ViewGetLOD(), PCB_REFERENCE_IMAGE::ViewGetLOD(), PCB_VIA::ViewGetLOD(), ZONE::ZONE(), FOOTPRINT::~FOOTPRINT(), and ZONE::~ZONE().

◆ GetBoardEdgesBoundingBox()

const BOX2I BOARD::GetBoardEdgesBoundingBox ( ) const
inline

Return the board bounding box calculated using exclusively the board edges (graphics on Edge.Cuts layer).

If there are items outside of the area limited by Edge.Cuts graphics, the items will not be taken into account.

Returns
bounding box calculated using exclusively the board edges.

Definition at line 922 of file board.h.

References ComputeBoundingBox().

Referenced by GERBER_JOBFILE_WRITER::addJSONGeneralSpecs(), AUTOPLACE_TOOL::autoplace(), BuildBoardPolygonOutlines(), BOARD_NETLIST_UPDATER::estimateFootprintInsertionPosition(), GENDRILL_WRITER_BASE::genDrillMapFile(), AR_AUTOPLACER::genPlacementRoutingMatrix(), PANEL_ZONE_GAL::GetBoardBoundingBox(), PCB_BASE_FRAME::GetBoardBoundingBox(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), idf_export_outline(), PCB_IO_CADSTAR_ARCHIVE::LoadBoard(), PCB_EDIT_FRAME::OnExportIDF3(), and ALTIUM_PCB::Parse().

◆ GetBoardPolygonOutlines()

bool BOARD::GetBoardPolygonOutlines ( SHAPE_POLY_SET aOutlines,
OUTLINE_ERROR_HANDLER aErrorHandler = nullptr,
bool  aAllowUseArcsInPolygons = false,
bool  aIncludeNPTHAsOutlines = false 
)

Extract the board outlines and build a closed polygon from lines, arcs and circle items on edge cut layer.

Any closed outline inside the main outline is a hole. All contours should be closed, i.e. have valid vertices to build a closed polygon.

Parameters
aOutlinesis the SHAPE_POLY_SET to fill in with outlines/holes.
aErrorHandleris an optional DRC_ITEM error handler.
aAllowUseArcsInPolygons= an optional option to allow adding arcs in SHAPE_LINE_CHAIN polylines/polygons when building outlines from aShapeList This is mainly for export to STEP files
aIncludeNPTHAsOutlines= an optional option to include NPTH pad holes in board outlines. These holes can be seen like holes created by closed shapes drawn on edge cut layer inside the board main outline.
Returns
true if success, false if a contour is not valid

Definition at line 2474 of file board.cpp.

References SHAPE_POLY_SET::AddHole(), BuildBoardPolygonOutlines(), SHAPE_LINE_CHAIN::CPoint(), ERROR_INSIDE, Footprints(), GetDesignSettings(), GetOutlinesChainingEpsilon(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), pad, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, SHAPE_LINE_CHAIN_BASE::PointInside(), and SHAPE_POLY_SET::Simplify().

Referenced by EXPORTER_STEP::buildBoard3DShapes(), DSN::SPECCTRA_DB::BuiltBoardOutlines(), BOARD_ADAPTER::createBoardPolygon(), GENCAD_EXPORTER::CreateBoardSection(), DRAWING_TOOL::DrawBoardCharacteristics(), EXPORTER_PCB_VRML::ExportVrmlBoard(), ZONE_FILLER::Fill(), PCB_IO_IPC2581::generateProfile(), AR_AUTOPLACER::genPlacementRoutingMatrix(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), PlotSolderMaskLayer(), PNS_KICAD_IFACE_BASE::SyncWorld(), and HYPERLYNX_EXPORTER::writeBoardInfo().

◆ GetBoardUse()

BOARD_USE BOARD::GetBoardUse ( ) const
inline

Get what the board use is.

Returns
what the board is being used for

Definition at line 308 of file board.h.

References m_boardUse.

Referenced by BOARD_ITEM::IsLocked().

◆ GetBoundingBox()

const BOX2I BOARD::GetBoundingBox ( ) const
inlineoverridevirtual

Return the orthogonal bounding box of this object for display purposes.

This box should be an enclosing perimeter for visible components of this object, and the units should be in the pcb or schematic coordinate system. It is OK to overestimate the size by a few counts.

Reimplemented from EDA_ITEM.

Definition at line 908 of file board.h.

References ComputeBoundingBox(), IsElementVisible(), and LAYER_HIDDEN_TEXT.

Referenced by buildBoardBoundingBoxPoly(), PANEL_ZONE_GAL::GetBoardBoundingBox(), PCB_BASE_FRAME::GetBoardBoundingBox(), GetFocusPosition(), DRC_TEST_PROVIDER_MISC::testOutline(), and PANEL_PCBNEW_COLOR_SETTINGS::zoomFitPreview().

◆ GetCenter()

virtual VECTOR2I BOARD_ITEM::GetCenter ( ) const
inlinevirtualinherited

This defaults to the center of the bounding box if not overridden.

Returns
center point of the item

Reimplemented in FOOTPRINT, PAD, PCB_MARKER, PCB_SHAPE, and PCB_ARC.

Definition at line 114 of file board_item.h.

References EDA_ITEM::GetBoundingBox(), and BOX2< Vec >::GetCenter().

Referenced by PCB_GRID_HELPER::computeAnchors(), and PCB_SELECTION_TOOL::FindItem().

◆ GetClass()

wxString BOARD::GetClass ( ) const
inlineoverridevirtual

Return the class name.

Implements EDA_ITEM.

Definition at line 990 of file board.h.

Referenced by Visit().

◆ GetConnectivity()

std::shared_ptr< CONNECTIVITY_DATA > BOARD::GetConnectivity ( ) const
inline

Return a list of missing connections between components/tracks.

Returns
an object that contains information about missing connections.

Definition at line 474 of file board.h.

References m_connectivity.

Referenced by TEARDROP_MANAGER::AddTeardropsOnTracks(), BuildConnectivity(), BOARD_NETLIST_UPDATER::cacheCopperZoneConnections(), FROM_TO_CACHE::cacheFromToPaths(), BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), PCB_NET_INSPECTOR_PANEL::calculateViaLength(), TRACKS_CLEANER::cleanup(), PCB_BASE_FRAME::Compile_Ratsnest(), TRACKS_CLEANER::deleteDanglingTracks(), TRACKS_CLEANER::deleteTracksInPads(), PCB_DRAW_PANEL_GAL::DisplayBoard(), PNS_KICAD_IFACE::DisplayRatline(), EDIT_TOOL::DragArcTrack(), ZONE_FILLER::Fill(), EDIT_TOOL::FilletTracks(), PCB_VIA::FlashLayer(), fromToFunc(), NETINFO_ITEM::GetBoundingBox(), TRACKS_CLEANER::getConnectedItems(), GetMsgPanelInfo(), PCB_DRAW_PANEL_GAL::GetMsgPanelInfo(), PCB_VIA::GetOutermostConnectedLayers(), GetTrackLength(), PCB_SELECTION_TOOL::grabUnconnected(), DSN::ImportSpecctraSession(), ROUTER_TOOL::Init(), ROUTER_TOOL::InlineDrag(), TRACKS_CLEANER::mergeCollinearSegments(), DIALOG_DRC::OnDRCItemRClick(), DIALOG_DRC::OnDRCItemSelected(), PCB_BASE_FRAME::PlaceFootprint(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem(), BOARD_COMMIT::Push(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), PCB_NET_INSPECTOR_PANEL::relevantConnectivityItems(), TRACKS_CLEANER::removeShortingTrackSegments(), TEARDROP_MANAGER::RemoveTeardrops(), BOARD_COMMIT::Revert(), ROUTER_TOOL::RouteSelected(), DRC_CACHE_GENERATOR::Run(), DRC_TEST_PROVIDER_CONNECTIVITY::Run(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), RATSNEST_SEARCH_HANDLER::Search(), PCB_SELECTION_TOOL::selectAllConnectedTracks(), PCB_SELECTION_TOOL::SelectAllItemsOnNet(), PCB_SELECTION_TOOL::selectConnections(), PCB_SELECTION_TOOL::selectUnconnected(), TRACKS_CLEANER::testTrackEndpointIsNode(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer(), DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow(), UpdateRatsnestExclusions(), and TEARDROP_MANAGER::UpdateTeardrops().

◆ GetContextualTextVars()

void BOARD::GetContextualTextVars ( wxArrayString *  aVars) const

◆ GetCopperLayerCount()

int BOARD::GetCopperLayerCount ( ) const
Returns
The number of copper layers in the BOARD.

Definition at line 734 of file board.cpp.

References BOARD_DESIGN_SETTINGS::GetCopperLayerCount(), and GetDesignSettings().

Referenced by GERBER_JOBFILE_WRITER::addJSONDesignRules(), GERBER_JOBFILE_WRITER::addJSONFilesAttributes(), GERBER_JOBFILE_WRITER::addJSONGeneralSpecs(), GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PCB_CONTROL::AppendBoard(), GENDRILL_WRITER_BASE::BuildFileFunctionAttributeString(), DSN::SPECCTRA_DB::buildLayerMaps(), PANEL_SETUP_LAYERS::CheckCopperLayerCount(), compute_pad_access_code(), EXPORTER_PCB_VRML::ComputeLayer3D_Zpos(), GENCAD_EXPORTER::CreateComponentsSection(), GENCAD_EXPORTER::CreatePadsShapesSection(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), GENCAD_EXPORTER::CreateRoutesSection(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), KIGFX::PCB_PAINTER::draw(), ZONE_FILLER::Fill(), DSN::SPECCTRA_DB::FromBOARD(), GetGerberFileFunctionAttribute(), DIALOG_TRACK_VIA_PROPERTIES::getLayerDepth(), GetStackupOrDefault(), BOARD_ADAPTER::InitSettings(), LayerDepth(), BOARD_ITEM::layerMaskDescribe(), DSN::SPECCTRA_DB::makeIMAGE(), DSN::SPECCTRA_DB::makePADSTACK(), DSN::SPECCTRA_DB::makeVIA(), PCB_IO_KICAD_SEXPR_PARSER::parseSetup(), APPEARANCE_CONTROLS::rebuildLayerContextMenu(), recalcOpposites(), ALTIUM_PCB::remapUnsureLayers(), DRC_CACHE_GENERATOR::Run(), PCB_BASE_FRAME::SwitchLayer(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadClearances(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances(), DIALOG_SWAP_LAYERS::TransferDataFromWindow(), DIALOG_SWAP_LAYERS::TransferDataToWindow(), PANEL_SETUP_LAYERS::TransferDataToWindow(), and via_access_code().

◆ GetDesignSettings()

BOARD_DESIGN_SETTINGS & BOARD::GetDesignSettings ( ) const
Returns
the BOARD_DESIGN_SETTINGS for this BOARD

Definition at line 875 of file board.cpp.

References m_designSettings.

Referenced by AddGerberX2Header(), ZONE_FILLER::addHatchFillTypeOnZone(), GERBER_JOBFILE_WRITER::addJSONDesignRules(), GERBER_JOBFILE_WRITER::addJSONGeneralSpecs(), GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PCB_IO_IPC2581::addShape(), BOARD_ADAPTER::addText(), FOOTPRINT::ApplyDefaultSettings(), BOARD(), CONNECTIVITY_DATA::Build(), DIALOG_FOOTPRINT_CHOOSER::build3DCanvas(), FOOTPRINT_CHOOSER_FRAME::build3DCanvas(), build_pad_testpoints(), build_via_testpoints(), EXPORTER_STEP::buildBoard3DShapes(), ZONE_FILLER::buildCopperItemClearances(), PAD::BuildEffectivePolygon(), PAD::BuildEffectiveShapes(), DIALOG_GLOBAL_EDIT_TEARDROPS::buildFilterLists(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::buildFilterLists(), EXPORTER_STEP::buildFootprint3DShapes(), EXPORTER_STEP::buildGraphic3DShape(), APPEARANCE_CONTROLS::buildNetClassMenu(), ZONE::BuildSmoothedPoly(), ZONE_FILLER::buildThermalSpokes(), EXPORTER_STEP::buildTrack3DShape(), PCB_NET_INSPECTOR_PANEL::calculateViaLength(), CADSTAR_PCB_ARCHIVE_LOADER::calculateZonePriorities(), EDIT_TOOL::ChangeTrackWidth(), PAD::CheckPad(), GRAPHICS_CLEANER::CleanupBoard(), NETINFO_ITEM::Clear(), FOOTPRINT_EDIT_FRAME::Clear_Pcb(), ClearProject(), collidesWithArea(), ZONE_CREATE_HELPER::commitZone(), FOOTPRINT_EDIT_FRAME::CommonSettingsChanged(), EXPORTER_PCB_VRML::ComputeLayer3D_Zpos(), ConvertBrdLayerToPolygonalContours(), PNS_KICAD_IFACE::createBoardItem(), BOARD_ADAPTER::createBoardPolygon(), MICROWAVE_TOOL::createInductorBetween(), BOARD_ADAPTER::createLayers(), PCB_TUNING_PATTERN::CreateNew(), GENCAD_EXPORTER::CreatePadsShapesSection(), BOARD_ADAPTER::createPadWithMargin(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), CONVERT_TOOL::CreatePolys(), GENCAD_EXPORTER::CreateRoutesSection(), ROUTER_TOOL::CustomTrackWidthDialog(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME(), ROUTER_TOOL::DpDimensionsDialog(), KIGFX::PCB_PAINTER::draw(), DRAWING_TOOL::DrawBoardCharacteristics(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawVia(), PCB_EDIT_FRAME::Edit_Zone_Params(), PCB_TUNING_PATTERN::EditPush(), enclosedByAreaFunc(), TRACK_WIDTH_MENU::eventHandler(), DIFF_PAIR_MENU::eventHandler(), VIA_SIZE_MENU::eventHandler(), EVT_GRID_CMD_CELL_CHANGED(), PCB_EDIT_FRAME::Export_IDF3(), EXPORTER_PCB_VRML::EXPORTER_PCB_VRML(), PCB_EDIT_FRAME::ExportToGenCAD(), ZONE_FILLER::fillCopperZone(), ZONE_FILLER::fillNonCopperZone(), FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME(), PCB_IO_KICAD_SEXPR::formatGeneral(), PCB_IO_KICAD_SEXPR::formatSetup(), DSN::SPECCTRA_DB::FromBOARD(), DSN::SPECCTRA_DB::FromSESSION(), PCB_IO_IPC2581::generateCadLayers(), PCB_IO_IPC2581::generateContentStackup(), PCB_BASE_FRAME::GetAuxOrigin(), GetBoardPolygonOutlines(), GetCopperLayerCount(), PCB_BASE_FRAME::GetDesignSettings(), FOOTPRINT_EDIT_FRAME::GetDesignSettings(), PCB_VIA::GetDrillConstraint(), BOARD_CONNECTED_ITEM::GetEffectiveNetClass(), GetEnabledLayers(), PCB_BASE_FRAME::GetGridOrigin(), CADSTAR_PCB_ARCHIVE_LOADER::getHatchCodeAngle(), BOARD_ADAPTER::GetHolePlatingThickness(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadHatchCodeGap(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadHatchCodeThickness(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet(), CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), BOARD_ADAPTER::GetLayerColors(), CADSTAR_PCB_ARCHIVE_LOADER::getLineThickness(), PCB_VIA::GetMinAnnulus(), PCB_TUNING_PATTERN::GetMsgPanelInfo(), BOARD_CONNECTED_ITEM::GetOwnClearance(), PAD::GetOwnClearance(), PCB_MARKER::GetSeverity(), PCB_BASE_FRAME::GetSeverity(), GetStackupOrDefault(), GetTrackLength(), PCB_TRACK::GetWidthConstraint(), PCB_VIA::GetWidthConstraint(), API_HANDLER_PCB::handleGetGraphicsDefaults(), ROUTER_TOOL::handleLayerSwitch(), ALTIUM_PCB::HelperCreateBoardOutline(), PANEL_SETUP_BOARD_FINISH::ImportSettingsFrom(), PANEL_SETUP_BOARD_STACKUP::ImportSettingsFrom(), PANEL_SETUP_CONSTRAINTS::ImportSettingsFrom(), PANEL_SETUP_MASK_AND_PASTE::ImportSettingsFrom(), PANEL_SETUP_TEARDROPS::ImportSettingsFrom(), PANEL_SETUP_TEXT_AND_GRAPHICS::ImportSettingsFrom(), PANEL_SETUP_TRACKS_AND_VIAS::ImportSettingsFrom(), PANEL_SETUP_TUNING_PATTERNS::ImportSettingsFrom(), PNS_KICAD_IFACE_BASE::ImportSizes(), DIALOG_PLOT::init_Dialog(), initializePlotter(), BOARD_ADAPTER::InitSettings(), DIALOG_PAD_PROPERTIES::initValues(), IsLayerEnabled(), IsLayerVisible(), PNS_PCBNEW_RULE_RESOLVER::IsNetTieExclusion(), PCBNEW_JOBS_HANDLER::JobExportDrc(), PCBNEW_JOBS_HANDLER::JobExportDrill(), ZONE_FILLER::knockoutThermalReliefs(), PCB_IO_EAGLE::LoadBoard(), PCB_IO_EASYEDA::LoadBoard(), LoadBoard(), CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup(), CADSTAR_PCB_ARCHIVE_LOADER::loadDesignRules(), PCB_BASE_FRAME::loadFootprint(), FABMASTER::loadFootprints(), PCB_IO_KICAD_LEGACY::loadGENERAL(), DRC_ENGINE::loadImplicitRules(), PCB_IO_KICAD_LEGACY::loadNETCLASS(), FABMASTER::loadOutline(), PCB_IO_EAGLE::loadPlain(), FABMASTER::loadPolygon(), PCB_IO_KICAD_LEGACY::loadSETUP(), CADSTAR_PCB_ARCHIVE_LOADER::loadTemplates(), FABMASTER::loadVias(), BOARD_INSPECTION_TOOL::makeDRCEngine(), DSN::SPECCTRA_DB::makeIMAGE(), DSN::SPECCTRA_DB::makePADSTACK(), CONVERT_TOOL::makePolysFromChainedSegs(), CONVERT_TOOL::makePolysFromClosedGraphics(), CONVERT_TOOL::makePolysFromOpenGraphics(), PAD::MergePrimitivesAsPolygon(), NETINFO_ITEM::NETINFO_ITEM(), NewBoard(), DIALOG_BOARD_SETUP::onAuxiliaryAction(), DIALOG_TEXTBOX_PROPERTIES::onBorderChecked(), APPEARANCE_CONTROLS::onNetclassColorChanged(), APPEARANCE_CONTROLS::onNetclassContextMenu(), PANEL_SETUP_RULES::onScintillaCharAdded(), PCB_EDIT_FRAME::OpenProjectFiles(), PCB_IO_EAGLE::packageWire(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), PANEL_SETUP_BOARD_FINISH::PANEL_SETUP_BOARD_FINISH(), PANEL_SETUP_BOARD_STACKUP::PANEL_SETUP_BOARD_STACKUP(), PANEL_SETUP_CONSTRAINTS::PANEL_SETUP_CONSTRAINTS(), PANEL_SETUP_MASK_AND_PASTE::PANEL_SETUP_MASK_AND_PASTE(), PANEL_SETUP_TEXT_AND_GRAPHICS::PANEL_SETUP_TEXT_AND_GRAPHICS(), PANEL_SETUP_TRACKS_AND_VIAS::PANEL_SETUP_TRACKS_AND_VIAS(), ALTIUM_PCB::Parse(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), ALTIUM_PCB::ParseBoard6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseBoardStackup(), ALTIUM_PCB::ParseClasses6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT_unchecked(), PCB_IO_KICAD_SEXPR_PARSER::parseGeneralSection(), PCB_IO_KICAD_SEXPR_PARSER::parseNETCLASS(), ALTIUM_PCB::ParseRules6Data(), PCB_IO_KICAD_SEXPR_PARSER::parseSetup(), PLACE_FILE_EXPORTER::PLACE_FILE_EXPORTER(), DRAWING_TOOL::PlaceTuningPattern(), EXPORT_SVG::Plot(), DIALOG_PLOT::Plot(), PlotOneBoardLayer(), PlotSolderMaskLayer(), PlotStandardLayer(), BRDITEMS_PLOTTER::PlotText(), ROUTER_TOOL::prepareInteractive(), DIALOG_GLOBAL_EDIT_TEARDROPS::processItem(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem(), PNS_PCBNEW_RULE_RESOLVER::QueryConstraint(), PCB_EDIT_FRAME::RebuildAndRefresh(), APPEARANCE_CONTROLS::rebuildNets(), PAD_TOOL::RecombinePad(), DIALOG_PLOT::reInitDialog(), DRC_TOOL::Reset(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::Run(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), DRC_TEST_PROVIDER_SOLDER_MASK::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), PCB_BASE_EDIT_FRAME::SetBoard(), SetCopperLayerCount(), SetEnabledLayers(), PCB_BASE_FRAME::SetGridOrigin(), NETINFO_ITEM::SetNetClass(), DIALOG_PLOT::SetPlotFormat(), SetProject(), PCB_TUNING_PATTERN::ShowPropertiesDialog(), PNS_KICAD_IFACE_BASE::StackupHeight(), SynchronizeNetsAndNetClasses(), PNS_KICAD_IFACE_BASE::syncTextItem(), TEARDROP_MANAGER::TEARDROP_MANAGER(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::testHoleAgainstHole(), DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems(), DRC_TEST_PROVIDER_SOLDER_MASK::testMaskItemAgainstZones(), DRC_TEST_PROVIDER_MISC::testOutline(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testShapeLineChain(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testZoneLayer(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataFromWindow(), ZONE::TransformSmoothedOutlineToPolygon(), TRACK_WIDTH_MENU::update(), DIFF_PAIR_MENU::update(), VIA_SIZE_MENU::update(), DIALOG_GENDRILL::UpdateDrillParams(), PCB_CONTROL::UpdateMessagePanel(), ROUTER_TOOL::updateSizesAfterLayerSwitch(), PANEL_PREVIEW_3D_MODEL::View3DSettings(), WriteDRCReport(), DRC_REPORT::WriteJsonReport(), HYPERLYNX_EXPORTER::writeStackupInfo(), DRC_REPORT::WriteTextReport(), ZONE::ZONE(), and GLOBAL_EDIT_TOOL::ZonesManager().

◆ GetEditFlags()

◆ GetEffectiveHoleShape()

◆ GetEffectiveShape()

std::shared_ptr< SHAPE > BOARD_ITEM::GetEffectiveShape ( PCB_LAYER_ID  aLayer = UNDEFINED_LAYER,
FLASHING  aFlash = FLASHING::DEFAULT 
) const
virtualinherited

Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.

This routine returns a COMPOUND shape (set of simple shapes which make up the pad for use with routing, collision determination, etc).

Note
This list can contain a SHAPE_SIMPLE (a simple single-outline non-intersecting polygon), but should never contain a SHAPE_POLY_SET (a complex polygon consisting of multiple outlines and/or holes).
Parameters
aLayerin case of items spanning multiple layers, only the shapes belonging to aLayer will be returned. Pass UNDEFINED_LAYER to return shapes for all layers.
aFlashoptional parameter allowing a caller to force the pad to be flashed (or not flashed) on the current layer (default is to honour the pad's setting and the current connections for the given layer).

Reimplemented in PCB_DIMENSION_BASE, PCB_MARKER, PCB_TARGET, FOOTPRINT, PCB_GROUP, PCB_REFERENCE_IMAGE, PCB_SHAPE, PCB_TABLE, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, PCB_ARC, PCB_VIA, ZONE, and PAD.

Definition at line 246 of file board_item.cpp.

References EDA_ITEM::GetClass(), and UNIMPLEMENTED_FOR.

Referenced by CN_VISITOR::checkZoneItemConnection(), collidesWithArea(), collidesWithCourtyard(), DRAWING_TOOL::DrawVia(), PCB_SELECTION_TOOL::hitTestDistance(), DRC_RTREE::Insert(), CN_VISITOR::operator()(), DRAWING_TOOL::PlaceTuningPattern(), DRC_RTREE::QueryColliding(), ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::testAgainstEdge(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem(), DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testKnockoutTextAgainstZone(), DRC_TEST_PROVIDER_SOLDER_MASK::testMaskItemAgainstZones(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testSingleLayerItemAgainstItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances(), CONNECTIVITY_DATA::TestTrackEndpointDangling(), and PCB_CONTROL::UpdateMessagePanel().

◆ GetEmbeddedFile()

EMBEDDED_FILE * EMBEDDED_FILES::GetEmbeddedFile ( const wxString &  aName) const
inlineinherited

Returns the embedded file with the given name or nullptr if it does not exist.

Definition at line 180 of file embedded_files.h.

References EMBEDDED_FILES::m_files.

Referenced by SCH_SCREEN::FixupEmbeddedData(), and FixupEmbeddedData().

◆ GetEmbeddedFileLink()

wxString EMBEDDED_FILES::GetEmbeddedFileLink ( const EMBEDDED_FILE aFile) const
inlineinherited

Returns the link for an embedded file.

Parameters
aFileis the file to get the link for.
Returns
the link for the file to be used in a hyperlink.

Definition at line 124 of file embedded_files.h.

References EMBEDDED_FILES::EMBEDDED_FILE::GetLink().

Referenced by ALTIUM_PCB::ConvertComponentBody6ToFootprintItem(), and ALTIUM_PCB::ParseComponentsBodies6Data().

◆ GetEmbeddedFiles() [1/2]

const EMBEDDED_FILES * BOARD::GetEmbeddedFiles ( ) const

Definition at line 2533 of file board.cpp.

References GetFirstFootprint(), and IsFootprintHolder().

◆ GetEmbeddedFiles() [2/2]

◆ GetEnabledLayers()

LSET BOARD::GetEnabledLayers ( ) const

A proxy function that calls the corresponding function in m_BoardSettings.

Returns
the enabled layers in bit-mapped form.

Definition at line 758 of file board.cpp.

References GetDesignSettings(), and BOARD_DESIGN_SETTINGS::GetEnabledLayers().

Referenced by CN_CONNECTIVITY_ALGO::Add(), PCB_CONTROL::AppendBoard(), CN_CONNECTIVITY_ALGO::Build(), PCB_NET_INSPECTOR_PANEL::buildColumns(), PCB_ONE_LAYER_SELECTOR::buildList(), SELECT_COPPER_LAYERS_PAIR_DIALOG::buildList(), DIALOG_PLOT::DIALOG_PLOT(), KIGFX::PCB_PAINTER::draw(), DRC_ENGINE::EvalRules(), EXPORTER_STEP::Export(), ZONE_FILLER::Fill(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::formatBoardLayers(), GENDRILL_WRITER_BASE::GenDrillReportFile(), PCB_IO_IPC2581::generateCadLayers(), PCB_IO_IPC2581::generateLayerFeatures(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), PCB_LAYER_BOX_SELECTOR::getEnabledLayers(), ALTIUM_PCB::GetKicadLayersToIterate(), PANEL_SETUP_LAYERS::getNonRemovableLayers(), PANEL_SETUP_LAYERS::getRemovedLayersWithItems(), API_HANDLER_PCB::handleCreateUpdateItemsInternal(), PANEL_SETUP_BOARD_STACKUP::ImportSettingsFrom(), DIALOG_PLOT::init_Dialog(), DIALOG_EXPORT_SVG::initDialog(), HYPERLYNX_PAD_STACK::IsEmpty(), PCBNEW_JOBS_HANDLER::JobExportGerbers(), BOARD_ITEM::layerMaskDescribe(), padNeedsUpdate(), PANEL_SETUP_BOARD_STACKUP::PANEL_SETUP_BOARD_STACKUP(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_KICAD_SEXPR_PARSER::parseBOARD_unchecked(), DIALOG_PLOT::Plot(), PCB_CONTROL::pruneItemLayers(), PCB_SELECTION_TOOL::pruneObscuredSelectionCandidates(), APPEARANCE_CONTROLS::rebuildLayers(), CADSTAR_PCB_ARCHIVE_LOADER::remapUnsureLayers(), ALTIUM_PCB::remapUnsureLayers(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_SLIVER_CHECKER::Run(), DRC_TEST_PROVIDER_MISC::testDisabledLayers(), PANEL_SETUP_LAYERS::TransferDataFromWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataToWindow(), DIALOG_PRINT_PCBNEW::TransferDataToWindow(), PANEL_SETUP_LAYERS::TransferDataToWindow(), PCB_PROPERTIES_PANEL::updateLists(), PCB_EDIT_FRAME::UpdateUserInterface(), PAD::ViewGetLOD(), and HYPERLYNX_EXPORTER::writeSinglePadStack().

◆ GetFileFormatVersionAtLoad()

int BOARD::GetFileFormatVersionAtLoad ( ) const
inline

Definition at line 393 of file board.h.

References m_fileFormatVersionAtLoad.

Referenced by PCB_EDIT_FRAME::OpenProjectFiles().

◆ GetFileName()

const wxString & BOARD::GetFileName ( ) const
inline

Definition at line 326 of file board.h.

References m_fileName.

Referenced by AddGerberX2Header(), GERBER_JOBFILE_WRITER::addJSONGeneralSpecs(), PCB_EDIT_FRAME::canCloseWindow(), DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles(), DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles(), GENCAD_EXPORTER::CreateHeaderInfoData(), DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS(), DIALOG_EXPORT_2581::DIALOG_EXPORT_2581(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), PCB_DRAW_PANEL_GAL::DisplayBoard(), PCB_EDIT_FRAME::doCloseWindow(), EXPORTER_STEP::Export(), PCB_EDIT_FRAME::Export_IDF3(), EXPORTER_STEP::EXPORTER_STEP(), BOARD_EDITOR_CONTROL::ExportSpecctraDSN(), DIALOG_EXPORT_SVG::ExportSVGFile(), PCB_EDIT_FRAME::ExportToGenCAD(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), DIALOG_GENDRILL::GenDrillAndMapFiles(), GENDRILL_WRITER_BASE::GenDrillReportFile(), PCB_IO_IPC2581::generateBOMSection(), PCB_IO_IPC2581::generateContentSection(), PCB_IO_IPC2581::generateStepSection(), PCB_EDIT_FRAME::GenFootprintsReport(), PCB_EDIT_FRAME::GetCurrentFileName(), PCB_BASE_EDIT_FRAME::GetDesignRulesPath(), PCBNEW_JOBS_HANDLER::getDrawingSheetProxyView(), GENDRILL_WRITER_BASE::getDrillFileName(), PCB_EDIT_FRAME::GetLastPath(), PANEL_SETUP_RULES::ImportSettingsFrom(), BOARD_EDITOR_CONTROL::ImportSpecctraSession(), PCBNEW_JOBS_HANDLER::JobExportDrc(), PCBNEW_JOBS_HANDLER::JobExportDxf(), PCBNEW_JOBS_HANDLER::JobExportGerber(), PCBNEW_JOBS_HANDLER::JobExportGerbers(), PCBNEW_JOBS_HANDLER::JobExportIpc2581(), PCBNEW_JOBS_HANDLER::JobExportPdf(), PCBNEW_JOBS_HANDLER::JobExportPos(), PCBNEW_JOBS_HANDLER::JobExportStep(), FABMASTER::loadFootprints(), PCB_EDIT_FRAME::onBoardLoaded(), DIALOG_IMPORT_SETTINGS::OnBrowseClicked(), PCB_EDIT_FRAME::OnExportHyperlynx(), PCB_EDIT_FRAME::OnExportIDF3(), PCB_EDIT_FRAME::OnExportSTEP(), PCB_EDIT_FRAME::OnExportVRML(), DIALOG_GENDRILL::OnGenReportFile(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), PLOT_CONTROLLER::OpenPlotfile(), EXPORT_SVG::Plot(), DIALOG_PLOT::Plot(), PCB_EDIT_FRAME::RecreateBOMFileFromBoard(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), ResolveTextVar(), DIALOG_BOARD_STATISTICS::saveReportClicked(), PCB_EDIT_FRAME::SetLastPath(), StartPlotBoard(), PCB_EDIT_FRAME::UpdateTitle(), HYPERLYNX_EXPORTER::writeBoardInfo(), WriteDRCReport(), DRC_REPORT::WriteJsonReport(), and DRC_REPORT::WriteTextReport().

◆ GetFirstFootprint()

FOOTPRINT * BOARD::GetFirstFootprint ( ) const
inline

Get the first footprint on the board or nullptr.

This is used primarily by the footprint editor which knows there is only one.

Returns
first footprint or null pointer

Definition at line 447 of file board.h.

References m_footprints.

Referenced by FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), BuildFootprintPolygonOutlines(), FOOTPRINT_EDIT_FRAME::CanCloseFPFromBoard(), FOOTPRINT_EDIT_FRAME::canCloseWindow(), FOOTPRINT_EDIT_FRAME::ClearModify(), BOARD_ADAPTER::createBoardPolygon(), FOOTPRINT_EDITOR_CONTROL::CutCopyFootprint(), DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER(), DIALOG_CLEANUP_GRAPHICS::doCleanup(), EDIT_TOOL::Duplicate(), FOOTPRINT_EDITOR_CONTROL::DuplicateFootprint(), PAD_TOOL::EnumeratePads(), PAD_TOOL::explodePad(), FOOTPRINT_EDITOR_CONTROL::ExportFootprint(), PCB_TOOL_BASE::footprint(), PCB_VIEWER_TOOLS::footprint(), FOOTPRINT_EDIT_FRAME::GetDocumentExtents(), GetEmbeddedFiles(), FOOTPRINT_EDIT_FRAME::GetLoadedFPID(), DISPLAY_FOOTPRINTS_FRAME::GetModel(), FOOTPRINT_EDIT_FRAME::GetModel(), FOOTPRINT_VIEWER_FRAME::GetModel(), FOOTPRINT_WIZARD_FRAME::GetModel(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), GROUP_TOOL::Group(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), FOOTPRINT_EDITOR_CONTROL::Init(), DIALOG_PAD_PROPERTIES::initValues(), PCB_CONTROL::InteractiveDelete(), ARRAY_CREATOR::Invoke(), FOOTPRINT_EDIT_FRAME::IsContentModified(), FOOTPRINT_EDIT_FRAME::IsCurrentFPFromBoard(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), PCB_BASE_FRAME::OnFpChangeDebounceTimer(), FOOTPRINT_EDIT_FRAME::OnUpdateSaveFootprintToBoard(), FOOTPRINT_EDIT_FRAME::OpenProjectFiles(), PCB_CONTROL::Paste(), pasteFootprintItemsToFootprintEditor(), PCB_FIELDS_GRID_TABLE::PCB_FIELDS_GRID_TABLE(), FOOTPRINT_EDITOR_CONTROL::Properties(), BOARD_COMMIT::Push(), FOOTPRINT_EDITOR_CONTROL::RenameFootprint(), DIALOG_FOOTPRINT_CHECKER::runChecks(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), DISPLAY_FOOTPRINTS_FRAME::UpdateMsgPanel(), FOOTPRINT_WIZARD_FRAME::UpdateMsgPanel(), FOOTPRINT_EDIT_FRAME::UpdateTitle(), and DIALOG_FOOTPRINT_CHECKER::~DIALOG_FOOTPRINT_CHECKER().

◆ GetFlags()

◆ GetFocusPosition()

const VECTOR2I BOARD::GetFocusPosition ( ) const
inlineoverridevirtual

Similar to GetPosition, but allows items to return their visual center rather than their anchor.

Reimplemented from EDA_ITEM.

Definition at line 383 of file board.h.

References GetBoundingBox(), and BOX2< Vec >::GetCenter().

◆ GetFontFiles()

const std::vector< wxString > * EMBEDDED_FILES::GetFontFiles ( ) const
inherited

If we just need the cached version of the font files, we can use this function which is const and will not update the font files.

Definition at line 494 of file embedded_files.cpp.

References EMBEDDED_FILES::m_fontFiles.

Referenced by FIELDS_GRID_TABLE::initGrid(), SCH_IO_KICAD_SEXPR_PARSER::ParseSchematic(), SCH_PROPERTIES_PANEL::updateFontList(), and PCB_PROPERTIES_PANEL::updateLists().

◆ GetFontMetrics()

◆ GetFootprint()

FOOTPRINT * BOARD::GetFootprint ( const VECTOR2I aPosition,
PCB_LAYER_ID  aActiveLayer,
bool  aVisibleOnly,
bool  aIgnoreLocked = false 
) const

Get a footprint by its bounding rectangle at aPosition on aLayer.

If more than one footprint is at aPosition, then the closest footprint on the active layer is returned. The distance is calculated via manhattan distance from the center of the bounding rectangle to aPosition.

Parameters
aPositionA VECTOR2I object containing the position to test.
aActiveLayerLayer to test.
aVisibleOnlySearch only the visible layers if true.
aIgnoreLockedIgnore locked footprints when true.

Definition at line 2365 of file board.cpp.

References BOX2< Vec >::GetHeight(), BOX2< Vec >::GetWidth(), BOX2< Vec >::GetX(), BOX2< Vec >::GetY(), IsBackLayer(), IsFootprintLayerVisible(), m_footprints, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ GetForcedTransparency()

double KIGFX::VIEW_ITEM::GetForcedTransparency ( ) const
inlineinherited

◆ GetFPRelativePosition()

◆ GetFriendlyName()

◆ GetGenerator()

const wxString & BOARD::GetGenerator ( ) const
inline

Adds an item to the container.

Parameters
aModedecides whether the item is added in the beginning or at the end of the list.
aSkipConnectivityskip connectivity update (useful for file loading, when the connectivity is updated after end of loading).

Definition at line 396 of file board.h.

References m_generator.

Referenced by PCB_EDIT_FRAME::OpenProjectFiles().

◆ GetHighLightNetCodes()

const std::set< int > & BOARD::GetHighLightNetCodes ( ) const
inline

◆ GetItem()

◆ GetItemDescription()

wxString BOARD::GetItemDescription ( UNITS_PROVIDER aUnitsProvider,
bool  aFull 
) const
overridevirtual

Return a user-visible description string of this item.

This description is used in disambiguation menus, the message panel, ERC/DRC reports, etc.

The default version of this function raises an assertion in the debug mode and returns a string to indicate that it was not overridden to provide the object specific text.

Parameters
aLongindicates a long string is acceptable
Returns
The menu text string.

Reimplemented from EDA_ITEM.

Definition at line 1308 of file board.cpp.

References _.

◆ GetItemSet()

◆ GetLayer()

virtual PCB_LAYER_ID BOARD_ITEM::GetLayer ( ) const
inlinevirtualinherited

Return the primary layer this item is on.

Reimplemented in FOOTPRINT, PAD, PCB_SHAPE, PCB_VIA, and ZONE.

Definition at line 240 of file board_item.h.

References BOARD_ITEM::m_layer.

Referenced by CN_CONNECTIVITY_ALGO::Add(), Add(), CN_LIST::Add(), PCB_TABLE::AddCell(), BOARD_ADAPTER::addFootprintShapes(), TEARDROP_MANAGER::areItemsInSameZone(), BOARD_CONNECTED_ITEM_DESC::BOARD_CONNECTED_ITEM_DESC(), BOARD_ITEM_DESC::BOARD_ITEM_DESC(), EXPORTER_STEP::buildGraphic3DShape(), EXPORTER_STEP::buildTrack3DShape(), PNS::ITEM::collideSimple(), TEARDROP_MANAGER::computeTeardropPolygon(), PCB_TUNING_PATTERN::CreateNew(), PCB_BASE_FRAME::CreateNewFootprint(), TEARDROP_MANAGER::createTeardrop(), BOARD_ADAPTER::createTrack(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_REFERENCE_IMAGE_PROPERTIES::DIALOG_REFERENCE_IMAGE_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), EDIT_TOOL::DragArcTrack(), KIGFX::PCB_PAINTER::draw(), DRAWING_TOOL::DrawTable(), PCB_TUNING_PATTERN::EditStart(), extractDiffPairCoupledItems(), EDIT_TOOL::FilletTracks(), TEARDROP_MANAGER::findAnchorPointsOnTrack(), TEARDROP_MANAGER::findTouchingTrack(), PCB_DIMENSION_BASE::Flip(), PCB_GENERATOR::Flip(), PCB_TABLE::Flip(), PCB_TARGET::Flip(), PCB_TEXT::Flip(), PCB_TRACK::Flip(), PCB_ARC::Flip(), PCB_IO_KICAD_SEXPR::format(), FOOTPRINT::GetBoundingBox(), FOOTPRINT::GetLayer(), PAD::GetLayer(), PCB_GENERATOR::GetLayerSet(), getMatchingTextItem(), PCB_TRACK::GetMsgPanelInfo(), GetPad(), PCB_FIELDS_GRID_TABLE::GetValueAsLong(), PCB_SELECTION_TOOL::GuessSelectionCandidates(), PCB_TABLE::InsertCell(), GENERAL_COLLECTOR::Inspect(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectConstraints(), BOARD_INSPECTION_TOOL::InspectDRCError(), BOARD_ITEM::IsOnCopperLayer(), itemIsIncludedByFilter(), FABMASTER::loadFootprints(), CADSTAR_PCB_ARCHIVE_LOADER::makeTracksFromShapes(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAddField(), BOARD::cmp_items::operator()(), BOARD::cmp_drawings::operator()(), PCB_SHAPE::cmp_drawings::operator()(), FOOTPRINT::cmp_drawings::operator()(), PCB_TRACK::cmp_tracks::operator()(), PCB_REFERENCE_IMAGE_DESC::PCB_REFERENCE_IMAGE_DESC(), PCB_TABLECELL::PCB_TABLECELL(), DRAWING_TOOL::PlaceImportedGraphics(), DRAWING_TOOL::PlaceTuningPattern(), BRDITEMS_PLOTTER::PlotDimension(), BRDITEMS_PLOTTER::PlotFootprintTextItems(), BRDITEMS_PLOTTER::PlotPcbTarget(), DRC_ENGINE::ProcessAssertions(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), processTextItem(), PCB_CONTROL::pruneItemLayers(), PCB_TUNING_PATTERN::Remove(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), CLIPBOARD_IO::SaveSelection(), PCB_SELECTION_TOOL::Selectable(), PCB_TEXT::Serialize(), PCB_TRACK::Serialize(), PCB_ARC::Serialize(), PCB_FIELDS_GRID_TABLE::SetValueAsLong(), PCB_TUNING_PATTERN::ShowPropertiesDialog(), PCB_TARGET::Similarity(), PCB_TEXT::StyleFromSettings(), EDIT_TOOL::Swap(), PNS_KICAD_IFACE_BASE::syncArc(), PNS_KICAD_IFACE_BASE::syncTextItem(), PNS_KICAD_IFACE_BASE::syncTrack(), PNS_KICAD_IFACE_BASE::SyncWorld(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testKnockoutTextAgainstZone(), DRC_TEST_PROVIDER_MISC::testTextVars(), CONNECTIVITY_DATA::TestTrackEndpointDangling(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), DIALOG_REFERENCE_IMAGE_PROPERTIES::TransferDataToWindow(), PCB_TUNING_PATTERN::Update(), PCB_CONTROL::UpdateMessagePanel(), PCB_TUNING_PATTERN::ViewGetLayers(), PCB_TEXT::ViewGetLayers(), PCB_TRACK::ViewGetLayers(), PCB_TEXT::ViewGetLOD(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem(), DIALOG_GLOBAL_EDIT_TEARDROPS::visitItem(), and DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::visitItem().

◆ GetLayerID()

PCB_LAYER_ID BOARD::GetLayerID ( const wxString &  aLayerName) const

◆ GetLayerName() [1/2]

◆ GetLayerName() [2/2]

wxString BOARD::GetLayerName ( PCB_LAYER_ID  aLayer) const

Return the name of a aLayer.

Parameters
aLayeris the PCB_LAYER_ID of the layer.
Returns
a string containing the name of the layer.

Definition at line 575 of file board.cpp.

References GetStandardLayerName(), IsLayerEnabled(), m_layers, and LAYER::m_userName.

Referenced by PANE_ZONE_VIEWER::ActivateSelectedZone(), GERBER_JOBFILE_WRITER::addJSONMaterialStackup(), PCB_NET_INSPECTOR_PANEL::buildColumns(), DSN::SPECCTRA_DB::buildLayerMaps(), PCB_PROPERTIES_PANEL::createPGProperty(), PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), DIALOG_PLOT::DIALOG_PLOT(), GRID_CELL_LAYER_RENDERER::Draw(), DRAWING_TOOL::DrawSpecificationStackup(), PCB_IO_KICAD_SEXPR::formatBoardLayers(), GENDRILL_WRITER_BASE::GenDrillReportFile(), PCB_IO_IPC2581::generateCadLayers(), PCB_IO_IPC2581::generateContentStackup(), PCB_IO_IPC2581::genLayersString(), PCB_IO_IPC2581::genLayerString(), PCB_LAYER_BOX_SELECTOR::getLayerName(), PCB_LAYER_SELECTOR::getLayerName(), ZONE_SEARCH_HANDLER::getResultCell(), GRID_CELL_LAYER_SELECTOR::GetValue(), PRIVATE_LAYERS_GRID_TABLE::GetValue(), MODEL_ZONES_OVERVIEW_TABLE::GetValueByRow(), DIALOG_PLOT::init_Dialog(), DIALOG_EXPORT_SVG::initDialog(), DIALOG_PAD_PROPERTIES::initValues(), BOARD_INSPECTION_TOOL::InspectClearance(), PCBNEW_JOBS_HANDLER::JobExportDxf(), PCBNEW_JOBS_HANDLER::JobExportGerber(), PCBNEW_JOBS_HANDLER::JobExportGerbers(), PCBNEW_JOBS_HANDLER::JobExportPdf(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::layerDesc(), DRC_TEST_PROVIDER_SLIVER_CHECKER::layerDesc(), BOARD_ITEM::layerMaskDescribe(), PCB_VIA::layerMaskDescribe(), PANEL_SETUP_BOARD_STACKUP::lazyBuildRowUI(), CADSTAR_PCB_ARCHIVE_LOADER::Load(), LoadBoard(), PCBNEW_PRINTOUT::OnPrintPage(), PLOT_CONTROLLER::OpenPlotfile(), PCB_IO_KICAD_SEXPR_PARSER::parseBOARD_unchecked(), EXPORT_SVG::Plot(), DIALOG_PLOT::Plot(), APPEARANCE_CONTROLS::rebuildLayers(), RENDER_3D_OPENGL::reload(), BOARD_INSPECTION_TOOL::reportHeader(), DIALOG_GLOBAL_DELETION::SetCurrentLayer(), ZONE_SETTINGS::SetupLayersList(), PANEL_SETUP_LAYERS::showBoardLayerNames(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer(), PANEL_SETUP_LAYERS::TransferDataFromWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataToWindow(), DIALOG_PRINT_PCBNEW::TransferDataToWindow(), BOARD_NETLIST_UPDATER::updateCopperZoneNets(), DIALOG_BOARD_STATISTICS::updateDrillGrid(), DIALOG_PAD_PROPERTIES::UpdateLayersDropdown(), HYPERLYNX_EXPORTER::writeDevices(), WriteDRCReport(), HYPERLYNX_EXPORTER::writeNetObjects(), HYPERLYNX_EXPORTER::writeSinglePadStack(), and HYPERLYNX_EXPORTER::writeStackupInfo().

◆ GetLayerSet()

virtual LSET BOARD_ITEM::GetLayerSet ( ) const
inlinevirtualinherited

Return a std::bitset of all layers on which the item physically resides.

Reimplemented in PAD, PCB_GENERATOR, PCB_GROUP, PCB_VIA, and ZONE.

Definition at line 245 of file board_item.h.

References BOARD_ITEM::m_layer, and UNDEFINED_LAYER.

Referenced by SCOPED_LAYERSET::Add(), PCB_GRID_HELPER::BestSnapAnchor(), KI_TEST::CheckFpShape(), collidesWithArea(), BOARD_COMMIT::dirtyIntersectingZones(), APPEARANCE_CONTROLS::doApplyLayerPreset(), DIALOG_GLOBAL_DELETION::DoGlobalDeletions(), KIGFX::PCB_PAINTER::Draw(), DRAWING_TOOL::DrawVia(), DRC_ENGINE::EvalRules(), existsOnLayerFunc(), extractDiffPairCoupledItems(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), hash_board_item(), BOARD_INSPECTION_TOOL::InspectClearance(), intersectsAreaFunc(), PNS_KICAD_IFACE::IsItemVisible(), isMaskAperture(), BOARD_ITEM::IsSideSpecific(), BOARD_ITEM::layerMaskDescribe(), FABMASTER::loadZone(), PCB_GRID_HELPER::nearestAnchor(), PCB_POINT_EDITOR::OnSelectionChange(), DIALOG_CLEANUP_GRAPHICS::OnSelectItem(), DIALOG_FOOTPRINT_CHECKER::OnSelectItem(), CN_VISITOR::operator()(), BOARD_ITEM::ptr_cmp::operator()(), KI_TEST::kitest_cmp_drawings::operator()(), DRC_ENGINE::ProcessAssertions(), PCB_SELECTION_TOOL::pruneObscuredSelectionCandidates(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), PCB_SELECTION_CONDITIONS::sameLayerFunc(), SCOPED_LAYERSET::SCOPED_LAYERSET(), PCB_SELECTION_TOOL::selectAllConnectedShapes(), PCB_SELECTION_TOOL::selectAllConnectedTracks(), GLOBAL_EDIT_TOOL::swapBoardItem(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances(), PANEL_SETUP_LAYERS::TransferDataFromWindow(), and PCB_CONTROL::UpdateMessagePanel().

◆ GetLayerType()

LAYER_T BOARD::GetLayerType ( PCB_LAYER_ID  aLayer) const

Return the type of the copper layer given by aLayer.

Parameters
aLayerA layer index, like B_Cu, etc.
Returns
the layer type, or LAYER_T(-1) if the index was out of range.

Definition at line 611 of file board.cpp.

References IsCopperLayer(), IsLayerEnabled(), LT_AUX, LT_SIGNAL, LT_UNDEFINED, m_layers, LAYER::m_type, User_1, and User_9.

Referenced by PCB_IO_KICAD_SEXPR::formatBoardLayers(), DSN::SPECCTRA_DB::FromBOARD(), GetGerberFileFunctionAttribute(), ALTIUM_PCB::ParsePolygons6Data(), PANEL_SETUP_LAYERS::showLayerTypes(), and PANEL_SETUP_LAYERS::TransferDataFromWindow().

◆ GetMaxClearanceValue()

int BOARD::GetMaxClearanceValue ( ) const

Returns the maximum clearance value for any object on the board.

This considers the clearances from board design settings as well as embedded clearances in footprints, pads and zones. Includes electrical, physical, hole and edge clearances.

Definition at line 881 of file board.cpp.

References m_CachesMutex, m_designSettings, m_footprints, m_maxClearanceValue, m_zones, and pad.

Referenced by ZONE_FILLER::Fill(), DRC_CACHE_GENERATOR::Run(), PNS_KICAD_IFACE_BASE::SyncWorld(), and PAD::ViewBBox().

◆ GetMenuImage()

BITMAPS EDA_ITEM::GetMenuImage ( ) const
virtualinherited

Return a pointer to an image to be used in menus.

The default version returns the right arrow image. Override this function to provide object specific menu images.

Returns
The menu image associated with the item.

Reimplemented in SCH_BITMAP, SCH_BUS_WIRE_ENTRY, SCH_BUS_BUS_ENTRY, SCH_FIELD, SCH_JUNCTION, SCH_LABEL, SCH_GLOBALLABEL, SCH_HIERLABEL, SCH_LINE, SCH_MARKER, SCH_NO_CONNECT, SCH_PIN, SCH_SHAPE, SCH_SHEET, SCH_SHEET_PIN, SCH_SYMBOL, SCH_TABLE, SCH_TEXT, SCH_TEXTBOX, GERBER_DRAW_ITEM, FOOTPRINT, PAD, PCB_DIM_ALIGNED, PCB_DIM_ORTHOGONAL, PCB_DIM_RADIAL, PCB_DIM_LEADER, PCB_DIM_CENTER, PCB_GROUP, PCB_MARKER, PCB_REFERENCE_IMAGE, PCB_SHAPE, PCB_TABLE, PCB_TARGET, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, PCB_VIA, and ZONE.

Definition at line 288 of file eda_item.cpp.

Referenced by SELECTION_TOOL::doSelectionMenu().

◆ GetMsgPanelInfo()

void BOARD::GetMsgPanelInfo ( EDA_DRAW_FRAME aFrame,
std::vector< MSG_PANEL_ITEM > &  aList 
)
overridevirtual

Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.

Parameters
aFrameis the EDA_DRAW_FRAME that displays the message panel
aListis the list to populate.

Reimplemented from EDA_ITEM.

Definition at line 1714 of file board.cpp.

References _, Footprints(), GetConnectivity(), m_tracks, pad, and PCB_VIA_T.

Referenced by PCB_CONTROL::UpdateMessagePanel().

◆ GetNetClassAssignmentCandidates()

std::set< wxString > BOARD::GetNetClassAssignmentCandidates ( ) const

Return the set of netname candidates for netclass assignment.

Definition at line 2011 of file board.cpp.

References m_NetInfo.

Referenced by DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), and PANEL_SETUP_RULES::onScintillaCharAdded().

◆ GetNetCount()

unsigned BOARD::GetNetCount ( ) const
inline

◆ GetNetInfo()

◆ GetNodesCount()

unsigned BOARD::GetNodesCount ( int  aNet = -1) const
Parameters
aNetOnly count nodes belonging to this net.
Returns
the number of pads members of nets (i.e. with netcode > 0).

Definition at line 1636 of file board.cpp.

References Footprints(), and pad.

Referenced by PCB_NET_INSPECTOR_PANEL::OnBoardItemAdded(), and PCB_NET_INSPECTOR_PANEL::updateNet().

◆ GetOutlinesChainingEpsilon()

int BOARD::GetOutlinesChainingEpsilon ( )
inline
Returns
a epsilon value that is the max distance between 2 points to see them at the same coordinate when building the board outlines and tray to connect 2 end points when buildind the outlines of the board Too small value do not allow connecting 2 shapes (i.e. segments) not exactly connected Too large value do not allow safely connecting 2 shapes like very short segments.

Definition at line 732 of file board.h.

References m_outlinesChainingEpsilon.

Referenced by BOARD_ADAPTER::createBoardPolygon(), GetBoardPolygonOutlines(), and DRC_TEST_PROVIDER_MISC::testOutline().

◆ GetPad() [1/4]

PAD * BOARD::GetPad ( const PCB_TRACK aTrace,
ENDPOINT_T  aEndPoint 
) const

Find a pad connected to aEndPoint of aTrace.

Parameters
aTraceA pointer to a PCB_TRACK object to hit test against.
aEndPointThe end point of aTrace the hit test against.
Returns
A pointer to a PAD object if found or NULL if not found.

Definition at line 2116 of file board.cpp.

References PCB_TRACK::GetEndPoint(), BOARD_ITEM::GetLayer(), and GetPad().

◆ GetPad() [2/4]

PAD * BOARD::GetPad ( const VECTOR2I aPosition) const
inline

Definition at line 1076 of file board.h.

References GetPad().

◆ GetPad() [3/4]

PAD * BOARD::GetPad ( const VECTOR2I aPosition,
LSET  aLayerMask 
) const

Find a pad aPosition on aLayer.

Parameters
aPositionA VECTOR2I object containing the position to hit test.
aLayerMaskA layer or layers to mask the hit test.
Returns
A pointer to a PAD object if found or NULL if not found.

Definition at line 2096 of file board.cpp.

References LSET::AllCuMask(), BASE_SET::any(), m_footprints, and pad.

Referenced by GetPad().

◆ GetPad() [4/4]

PAD * BOARD::GetPad ( std::vector< PAD * > &  aPadList,
const VECTOR2I aPosition,
LSET  aLayerMask 
) const

Locate the pad connected at aPosition on aLayer starting at list position aPad.

This function uses a fast search in this sorted pad list and it is faster than GetPadFast(). This list is a sorted pad list must be built before calling this function.

Note
The normal pad list is sorted by increasing netcodes.
Parameters
aPadListis the list of pads candidates (a std::vector<PAD*>).
aPositionA VECTOR2I object containing the position to test.
aLayerMaskA layer or layers to mask the hit test.
Returns
a PAD object pointer to the connected pad.

Definition at line 2145 of file board.cpp.

References delta, pad, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ GetPadFast()

PAD * BOARD::GetPadFast ( const VECTOR2I aPosition,
LSET  aLayerMask 
) const

Return pad found at aPosition on aLayerMask using the fast search method.

The fast search method only works if the pad list has already been built.

Parameters
aPositionA VECTOR2I object containing the position to hit test.
aLayerMaskA layer or layers to mask the hit test.
Returns
A pointer to a PAD object if found or NULL if not found.

Definition at line 2126 of file board.cpp.

References Footprints(), and pad.

◆ GetPads()

const std::vector< PAD * > BOARD::GetPads ( ) const

Return a reference to a list of all the pads.

The returned list is not sorted and contains pointers to PADS, but those pointers do not convey ownership of the respective PADs.

Returns
a full list of pads.

Definition at line 2574 of file board.cpp.

References Footprints(), and pad.

Referenced by GENCAD_EXPORTER::CreatePadsShapesSection(), and DIALOG_COPPER_ZONE::sortNetsByPadCount().

◆ GetPageSettings()

◆ GetParent()

◆ GetParentAsString()

wxString BOARD_ITEM::GetParentAsString ( ) const
inherited

For "parent" property.

Returns
the parent footprint's ref or the parent item's UUID.

Definition at line 335 of file board_item.cpp.

References KIID::AsString(), EDA_ITEM::m_parent, and EDA_ITEM::m_Uuid.

Referenced by BOARD_ITEM_DESC::BOARD_ITEM_DESC().

◆ GetParentFootprint()

FOOTPRINT * BOARD_ITEM::GetParentFootprint ( ) const
inherited

Definition at line 266 of file board_item.cpp.

References BOARD_ITEM::GetParent(), PCB_FOOTPRINT_T, PCB_GENERATOR_T, PCB_GROUP_T, PCB_TABLE_T, and EDA_ITEM::Type().

Referenced by CN_CONNECTIVITY_ALGO::Add(), PCB_IO_IPC2581::addPad(), STEP_PCB_MODEL::AddPadShape(), PCB_IO_IPC2581::addPadStack(), GRAPHICS_IMPORTER_PCBNEW::AddPolygon(), DRC_TEST_PROVIDER_SOLDER_MASK::checkItemMask(), DRC_TEST_PROVIDER_SOLDER_MASK::checkMaskAperture(), DIALOG_TRACK_VIA_PROPERTIES::confirmPadChange(), CONVERT_TOOL::CreatePolys(), EDIT_TOOL::DeleteItems(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES(), doPushPadProperties(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), EDIT_TOOL::Duplicate(), PCB_IO_KICAD_SEXPR::format(), FormatProbeItem(), PCB_IO_IPC2581::generateLayerSetNet(), PAD::GetClearanceOverrides(), PCB_BASE_EDIT_FRAME::GetContextualTextVars(), PCB_TEXT::GetDrawRotation(), PAD::GetFPRelativeOrientation(), BOARD_ITEM::GetFPRelativePosition(), PAD::GetItemDescription(), PCB_FIELD::GetItemDescription(), PCB_SHAPE::GetItemDescription(), PCB_TEXT::GetItemDescription(), PCB_SHAPE::GetMenuImage(), PCB_SHAPE::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PANEL_SETUP_LAYERS::getRemovedLayersWithItems(), PCB_TEXT::GetShownText(), PCB_TEXTBOX::GetShownText(), PAD::GetSolderMaskExpansion(), PAD::GetSolderPasteMargin(), PCB_FIELDS_GRID_TABLE::GetValue(), PAD::GetZoneConnectionOverrides(), PCB_SELECTION_TOOL::grabUnconnected(), GROUP_TOOL::Group(), hash_fp_item(), PAD::ImportSettingsFrom(), DIALOG_PAD_PROPERTIES::initValues(), GENERAL_COLLECTOR::Inspect(), ARRAY_CREATOR::Invoke(), PCB_SHAPE::IsConnected(), PAD::IsFlipped(), PNS_PCBNEW_RULE_RESOLVER::IsInNetTie(), PNS_PCBNEW_RULE_RESOLVER::IsKeepout(), PNS_PCBNEW_RULE_RESOLVER::IsNetTieExclusion(), DRC_ENGINE::IsNetTieExclusion(), PCB_SELECTION_TOOL::itemPassesFilter(), memberOfFootprintFunc(), memberOfSheetFunc(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_SHAPE(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_TABLE(), PCB_IO_KICAD_SEXPR_PARSER::parseTextBoxContent(), PCB_IO_IPC2581::pinName(), BRDITEMS_PLOTTER::PlotPad(), BRDITEMS_PLOTTER::PlotShape(), BRDITEMS_PLOTTER::PlotTableBorders(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), BOARD_COMMIT::Push(), PAD_TOOL::pushPadSettings(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), PCB_GRID_HELPER::queryVisible(), PAD::Recombine(), PCB_IO_KICAD_SEXPR_PARSER::resolveGroups(), BOARD_COMMIT::Revert(), PAD::SameLogicalPadAs(), CLIPBOARD_IO::SaveSelection(), PCB_SELECTION_TOOL::Selectable(), PAD::SetFPRelativeOrientation(), BOARD_ITEM::SetFPRelativePosition(), PCB_FIELDS_GRID_TABLE::SetValue(), PAD::SharesNetTieGroup(), DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testShapeLineChain(), DIALOG_PAD_PROPERTIES::TransferDataFromWindow(), PANEL_SETUP_LAYERS::TransferDataFromWindow(), DIALOG_PAD_PROPERTIES::transferDataToPad(), PCB_IO_EAGLE::transferPad(), PCB_POINT_EDITOR::updateItem(), PCB_TEXT::ViewGetLayers(), PCB_FIELD::ViewGetLOD(), PCB_SHAPE::ViewGetLOD(), PCB_TEXT::ViewGetLOD(), ZONE::ViewGetLOD(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem(), and ZONE::ZONE().

◆ GetParentGroup()

◆ GetPlotOptions()

◆ GetPosition()

VECTOR2I BOARD::GetPosition ( ) const
overridevirtual

Reimplemented from EDA_ITEM.

Definition at line 488 of file board.cpp.

References BOARD_ITEM::ZeroOffset.

◆ GetProject()

◆ GetProperties()

const std::map< wxString, wxString > & BOARD::GetProperties ( ) const
inline

◆ GetSortedPadListByXthenYCoord()

void BOARD::GetSortedPadListByXthenYCoord ( std::vector< PAD * > &  aVector,
int  aNetCode = -1 
) const

First empties then fills the vector with all pads and sorts them by increasing x coordinate, and for increasing y coordinate for same values of x coordinates.

The vector only holds pointers to the pads and those pointers are only references to pads which are owned by the BOARD through other links.

Parameters
aVectorWhere to put the pad pointers.
aNetCode= the netcode filter: = -1 to build the full pad list. = a given netcode to build the pad list relative to the given net

Definition at line 2253 of file board.cpp.

References Footprints(), pad, and sortPadsByXthenYCoord().

◆ GetSortPosition()

virtual VECTOR2I EDA_ITEM::GetSortPosition ( ) const
inlinevirtualinherited

Return the coordinates that should be used for sorting this element visually compared to other elements.

For instance, for lines the midpoint might be a better sorting point than either end.

Returns
X,Y coordinate of the sort point

Reimplemented in SCH_LINE.

Definition at line 259 of file eda_item.h.

References EDA_ITEM::GetPosition().

◆ GetStackupOrDefault()

◆ GetStandardLayerName()

static wxString BOARD::GetStandardLayerName ( PCB_LAYER_ID  aLayerId)
inlinestatic

Return an "English Standard" name of a PCB layer when given aLayerNumber.

This function is static so it can be called without a BOARD instance. Use GetLayerName() if want the layer names of a specific BOARD, which could be different than the default if the user has renamed any copper layers.

Parameters
aLayerIdis the layer identifier (index) to fetch.
Returns
a string containing the layer name or "BAD INDEX" if aLayerId is not legal.

Definition at line 779 of file board.h.

References LayerName().

Referenced by BOARD(), GRID_CELL_LAYER_RENDERER::Draw(), DIALOG_EXPORT_SVG::ExportSVGFile(), GetLayerID(), BOARD_ITEM::GetLayerName(), PCB_LAYER_BOX_SELECTOR::getLayerName(), GetLayerName(), and GRID_CELL_LAYER_SELECTOR::GetValue().

◆ GetStroke()

STROKE_PARAMS BOARD_ITEM::GetStroke ( ) const
virtualinherited

Reimplemented in PCB_SHAPE.

Definition at line 86 of file board_item.cpp.

References DEFAULT_LINE_WIDTH, EDA_ITEM::GetClass(), EDA_IU_SCALE::mmToIU(), and pcbIUScale.

Referenced by CONVERT_TOOL::CreatePolys().

◆ GetTempFlags()

EDA_ITEM_FLAGS EDA_ITEM::GetTempFlags ( ) const
inlineinherited

◆ GetTemporaryFileName() [1/2]

wxFileName EMBEDDED_FILES::GetTemporaryFileName ( const wxString &  aName) const
inherited

◆ GetTemporaryFileName() [2/2]

wxFileName EMBEDDED_FILES::GetTemporaryFileName ( EMBEDDED_FILE aFile) const
inherited

◆ GetTimeStamp()

int BOARD::GetTimeStamp ( ) const
inline

Definition at line 312 of file board.h.

References m_timeStamp.

Referenced by FOOTPRINT::GetBoundingBox(), FOOTPRINT::GetBoundingHull(), and DRC_ENGINE::RunTests().

◆ GetTitleBlock() [1/2]

◆ GetTitleBlock() [2/2]

const TITLE_BLOCK & BOARD::GetTitleBlock ( ) const
inline

Definition at line 689 of file board.h.

References m_titles.

◆ GetTrackLength()

std::tuple< int, double, double > BOARD::GetTrackLength ( const PCB_TRACK aTrack) const

Return data on the length and number of track segments connected to a given track.

This uses the connectivity data for the board to calculate connections

Parameters
aTrackStarting track (can also be a via) to check against for connection.
Returns
a tuple containing <number, length, package length>

Definition at line 2279 of file board.cpp.

References SEG::A, SEG::B, baseConnectedTypes, ERROR_INSIDE, BOARD_ITEM::GetBoard(), GetConnectivity(), GetDesignSettings(), BOARD_STACKUP::GetLayerDistance(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), SEG::Length(), BOARD_DESIGN_SETTINGS::m_UseHeightForLengthCalcs, pad, PCB_ARC_T, PCB_PAD_T, PCB_TRACE_T, PCB_VIA_T, and via.

Referenced by PCB_TUNING_PATTERN::GetMsgPanelInfo(), NETINFO_ITEM::GetMsgPanelInfo(), and PCB_TRACK::GetMsgPanelInfo().

◆ GetTypeDesc()

wxString EDA_ITEM::GetTypeDesc ( ) const
inherited

Return a translated description of the type for this EDA_ITEM for display in user facing messages.

Definition at line 320 of file eda_item.cpp.

References ENUM_MAP< T >::Instance(), and EDA_ITEM::Type().

Referenced by PCB_GROUP::AddItem(), EDIT_TOOL::doMoveSelection(), and EDA_ITEM::GetFriendlyName().

◆ GetUserUnits()

EDA_UNITS BOARD::GetUserUnits ( )
inline

Definition at line 694 of file board.h.

References m_userUnits.

Referenced by PCB_DIMENSION_BASE::SetUnitsMode().

◆ GetVisibleElements()

GAL_SET BOARD::GetVisibleElements ( ) const

Return a set of all the element categories that are visible.

Returns
the set of visible GAL layers.
See also
enum GAL_LAYER_ID

Definition at line 818 of file board.cpp.

References PROJECT::GetLocalSettings(), m_project, PROJECT_LOCAL_SETTINGS::m_VisibleItems, and GAL_SET::set().

Referenced by APPEARANCE_CONTROLS::getVisibleObjects(), and PCB_EDIT_FRAME::setupUIConditions().

◆ GetVisibleLayers()

◆ GetX()

◆ GetY()

◆ GetZoneList()

std::list< ZONE * > BOARD::GetZoneList ( bool  aIncludeZonesInFootprints = false) const
Returns
a std::list of pointers to all board zones (possibly including zones in footprints)

Definition at line 2429 of file board.cpp.

References m_footprints, and Zones().

◆ GroupLegalOps()

BOARD::GroupLegalOpsField BOARD::GroupLegalOps ( const PCB_SELECTION selection) const

Check which selection tool group operations are legal given the selection.

Returns
bit field of legal ops.

Definition at line 2809 of file board.cpp.

References BOARD::GroupLegalOpsField::create, PCB_GROUP_T, BOARD::GroupLegalOpsField::removeItems, and BOARD::GroupLegalOpsField::ungroup.

◆ Groups()

const GROUPS & BOARD::Groups ( ) const
inline

The groups must maintain the following invariants.

These are checked by GroupsSanityCheck():

  • An item may appear in at most one group
  • Each group must contain at least one item
  • If a group specifies a name, it must be unique
  • The graph of groups containing subgroups must be cyclic.

Definition at line 357 of file board.h.

References m_groups.

Referenced by PCB_CONTROL::AppendBoard(), PCB_IO_KICAD_SEXPR::format(), GroupsSanityCheckInternal(), PCB_CONTROL::Paste(), and PCB_CONTROL::placeBoardItems().

◆ GroupsSanityCheck()

wxString BOARD::GroupsSanityCheck ( bool  repair = false)

Consistency check of internal m_groups structure.

Parameters
repairif true, modify groups structure until it passes the sanity check.
Returns
empty string on success. Or error description if there's a problem.

Definition at line 2727 of file board.cpp.

References GroupsSanityCheckInternal().

Referenced by PCB_IO_KICAD_SEXPR_PARSER::resolveGroups(), and PCB_IO_KICAD_SEXPR::SaveBoard().

◆ GroupsSanityCheckInternal()

wxString BOARD::GroupsSanityCheckInternal ( bool  repair)
Parameters
repairif true, make one modification to groups structure that brings it closer to passing the sanity check.
Returns
empty string on success. Or error description if there's a problem.

Definition at line 2740 of file board.cpp.

References Generators(), group, Groups(), and Remove().

Referenced by GroupsSanityCheck().

◆ HasDrilledHole()

virtual bool BOARD_ITEM::HasDrilledHole ( ) const
inlinevirtualinherited

Reimplemented in PAD, and PCB_VIA.

Definition at line 163 of file board_item.h.

Referenced by DRC_ENGINE::EvalRules(), and BOARD_INSPECTION_TOOL::InspectClearance().

◆ HasFile()

bool EMBEDDED_FILES::HasFile ( const wxString &  name) const
inlineinherited

◆ HasFlag()

◆ HasHole()

◆ HasLineStroke()

virtual bool BOARD_ITEM::HasLineStroke ( ) const
inlinevirtualinherited

Check if this item has line stoke properties.

See also
STROKE_PARAMS

Reimplemented in PCB_SHAPE.

Definition at line 230 of file board_item.h.

◆ HighLightOFF()

void BOARD::HighLightOFF ( )
inline

Disable net highlight.

Definition at line 561 of file board.h.

References HighLightON().

◆ HighLightON()

void BOARD::HighLightON ( bool  aValue = true)

Enable or disable net highlighting.

If a netcode >= 0 has been set with SetHighLightNet and aValue is true, the net will be highlighted. If aValue is false, net highlighting will be disabled regardless of the highlight netcode being set.

Definition at line 2717 of file board.cpp.

References InvokeListeners(), m_highLight, HIGH_LIGHT_INFO::m_highLightOn, and BOARD_LISTENER::OnBoardHighlightNetChanged().

Referenced by PCB_EDIT_FRAME::ExecuteRemoteCommand(), BOARD_INSPECTION_TOOL::highlightNet(), HighLightOFF(), and APPEARANCE_CONTROLS::onNetclassContextMenu().

◆ HitTest() [1/2]

virtual bool EDA_ITEM::HitTest ( const BOX2I aRect,
bool  aContained,
int  aAccuracy = 0 
) const
inlinevirtualinherited

Test if aRect intersects this item.

Parameters
aRectA reference to a BOX2I object containing the rectangle to test.
aContainedSet to true to test for containment instead of an intersection.
aAccuracyIncrease aRect by this amount.
Returns
True if aRect contains or intersects the item bounding box.

Reimplemented in PCB_TUNING_PATTERN, SCH_BITMAP, SCH_BUS_ENTRY_BASE, SCH_FIELD, SCH_JUNCTION, SCH_LABEL_BASE, SCH_LINE, SCH_NO_CONNECT, SCH_PIN, SCH_SHAPE, SCH_SHEET, SCH_SYMBOL, SCH_TABLE, SCH_TEXT, SCH_TEXTBOX, DS_DRAW_ITEM_BASE, DS_DRAW_ITEM_POLYPOLYGONS, DS_DRAW_ITEM_RECT, DS_DRAW_ITEM_TEXT, DS_DRAW_ITEM_BITMAP, FOOTPRINT, PAD, PCB_DIMENSION_BASE, PCB_GROUP, PCB_REFERENCE_IMAGE, PCB_SHAPE, PCB_TABLE, PCB_TARGET, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, PCB_VIA, PCB_ARC, ZONE, and GERBER_DRAW_ITEM.

Definition at line 229 of file eda_item.h.

◆ HitTest() [2/2]

◆ IncrementTimeStamp()

◆ InvokeListeners()

template<typename Func , typename... Args>
void BOARD::InvokeListeners ( Func &&  aFunc,
Args &&...  args 
)
inlineprivate

◆ IsBrightened()

◆ IsConnected()

◆ IsElementVisible()

◆ IsEmpty()

◆ IsEntered()

bool EDA_ITEM::IsEntered ( ) const
inlineinherited

Definition at line 111 of file eda_item.h.

References ENTERED, and EDA_ITEM::m_flags.

Referenced by KIGFX::PCB_PAINTER::draw().

◆ IsFootprintHolder()

bool BOARD::IsFootprintHolder ( ) const
inline

Find out if the board is being used to hold a single footprint for editing/viewing.

Returns
if the board is just holding a footprint

Definition at line 319 of file board.h.

References m_boardUse.

Referenced by BOARD_ITEM_DESC::BOARD_ITEM_DESC(), ComputeBoundingBox(), BOARD_ADAPTER::createBoardPolygon(), PCB_DRAW_PANEL_GAL::DisplayBoard(), FOOTPRINT::GetBoundingBox(), FOOTPRINT::GetBoundingHull(), GetEmbeddedFiles(), FOOTPRINT::GetLayerBoundingBox(), BOARD_ADAPTER::InitSettings(), and PCB_BASE_FRAME::loadFootprint().

◆ IsFootprintLayerVisible()

bool BOARD::IsFootprintLayerVisible ( PCB_LAYER_ID  aLayer) const

Expect either of the two layers on which a footprint can reside, and returns whether that layer is visible.

Parameters
aLayeris one of the two allowed layers for footprints: F_Cu or B_Cu
Returns
true if the layer is visible, otherwise false.

Definition at line 863 of file board.cpp.

References B_Cu, F_Cu, IsElementVisible(), LAYER_FOOTPRINTS_BK, and LAYER_FOOTPRINTS_FR.

Referenced by GetFootprint().

◆ IsForceVisible()

bool EDA_ITEM::IsForceVisible ( ) const
inlineinherited

Definition at line 195 of file eda_item.h.

References EDA_ITEM::m_forceVisible.

Referenced by KIGFX::SCH_PAINTER::draw(), SCH_FIELD::Plot(), and SCH_FIELD::Print().

◆ IsHighLightNetON()

bool BOARD::IsHighLightNetON ( ) const
inline
Returns
true if a net is currently highlighted

Definition at line 547 of file board.h.

References m_highLight, and HIGH_LIGHT_INFO::m_highLightOn.

Referenced by PCB_EDIT_FRAME::ExecuteRemoteCommand(), and PCB_NET_INSPECTOR_PANEL::OnBoardHighlightNetChanged().

◆ IsKnockout()

◆ IsLayerEnabled()

◆ IsLayerVisible()

bool BOARD::IsLayerVisible ( PCB_LAYER_ID  aLayer) const

◆ IsLocked()

bool BOARD_ITEM::IsLocked ( ) const
virtualinherited

Reimplemented in FOOTPRINT, and PAD.

Definition at line 75 of file board_item.cpp.

References BOARD_ITEM::GetBoard(), GetBoardUse(), BOARD_ITEM::GetParentGroup(), BOARD_ITEM::IsLocked(), and BOARD_ITEM::m_isLocked.

Referenced by BOARD_ITEM_DESC::BOARD_ITEM_DESC(), KI_TEST::CheckFpShape(), KI_TEST::CheckFpZone(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_GLOBAL_DELETION::DoGlobalDeletions(), EDIT_TOOL::DragArcTrack(), EDIT_TOOL::FilletTracks(), PCB_IO_KICAD_SEXPR::format(), GENERATOR_TOOL::GENERATOR_TOOL(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_GROUP::GetMsgPanelInfo(), PCB_SHAPE::GetMsgPanelInfo(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), ZONE::GetMsgPanelInfo(), PCB_TRACK::GetMsgPanelInfoBase_Common(), ALIGN_DISTRIBUTE_TOOL::GetSelections(), PCB_SELECTION_CONDITIONS::HasLockedItems(), PCB_SELECTION_CONDITIONS::HasUnlockedItems(), ROUTER_TOOL::InlineDrag(), GENERAL_COLLECTOR::Inspect(), PCB_CONTROL::InteractiveDelete(), BOARD_ITEM::IsLocked(), PAD::IsLocked(), PCB_SELECTION_TOOL::itemPassesFilter(), CADSTAR_PCB_ARCHIVE_LOADER::makeTracksFromShapes(), TRACKS_CLEANER::mergeCollinearSegments(), BOARD_EDITOR_CONTROL::modifyLockSelected(), PCB_POINT_EDITOR::OnSelectionChange(), ZONE_SETTINGS::operator<<(), LINE_FILLET_ROUTINE::ProcessLinePair(), LINE_CHAMFER_ROUTINE::ProcessLinePair(), processTextItem(), PCB_SELECTION_TOOL::RequestSelection(), PCB_SHAPE::Serialize(), PCB_TEXT::Serialize(), PCB_TRACK::Serialize(), PCB_ARC::Serialize(), PCB_VIA::Serialize(), PNS_KICAD_IFACE_BASE::syncArc(), PNS_KICAD_IFACE_BASE::syncTrack(), PNS_KICAD_IFACE_BASE::syncVia(), DIALOG_REFERENCE_IMAGE_PROPERTIES::TransferDataToWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow(), BOARD_ITEM::ViewGetLayers(), PCB_SHAPE::ViewGetLayers(), PCB_TEXT::ViewGetLayers(), PCB_TEXTBOX::ViewGetLayers(), PCB_TRACK::ViewGetLayers(), and PCB_VIA::ViewGetLayers().

◆ IsModified()

bool EDA_ITEM::IsModified ( ) const
inlineinherited

Definition at line 106 of file eda_item.h.

References IS_CHANGED, and EDA_ITEM::m_flags.

Referenced by PCB_EDIT_FRAME::OpenProjectFiles().

◆ IsMoving()

◆ IsNew()

◆ IsOnCopperLayer()

◆ IsOnLayer()

◆ IsReplaceable()

virtual bool EDA_ITEM::IsReplaceable ( ) const
inlinevirtualinherited

Override this method in any derived object that supports test find and replace.

Returns
True if the item has replaceable text that can be modified using the find and replace dialog.

Reimplemented in SCH_FIELD, SCH_LABEL, SCH_SHEET, SCH_SHEET_PIN, SCH_SYMBOL, SCH_TEXT, and SCH_TEXTBOX.

Definition at line 415 of file eda_item.h.

Referenced by EDA_ITEM::Matches().

◆ IsRollover()

bool EDA_ITEM::IsRollover ( ) const
inlineinherited

Definition at line 114 of file eda_item.h.

References IS_MOVING, IS_ROLLOVER, and EDA_ITEM::m_flags.

Referenced by KIGFX::SCH_PAINTER::draw().

◆ IsSelected()

bool EDA_ITEM::IsSelected ( ) const
inlineinherited

Definition at line 110 of file eda_item.h.

References EDA_ITEM::m_flags, and SELECTED.

Referenced by ALIGN_DISTRIBUTE_TOOL::AlignBottom(), ALIGN_DISTRIBUTE_TOOL::AlignCenterX(), ALIGN_DISTRIBUTE_TOOL::AlignCenterY(), ALIGN_DISTRIBUTE_TOOL::AlignTop(), SCH_EDIT_TOOL::ChangeTextType(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), ALIGN_DISTRIBUTE_TOOL::doAlignLeft(), ALIGN_DISTRIBUTE_TOOL::doAlignRight(), EDIT_TOOL::doMoveSelection(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), KIGFX::SCH_PAINTER::drawItemBoundingBox(), DS_PROXY_UNDO_ITEM::DS_PROXY_UNDO_ITEM(), SCH_EDIT_FRAME::FlipBodyStyle(), RENDER_3D_OPENGL::get3dModelsFromFootprint(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), KIGFX::GERBVIEW_RENDER_SETTINGS::GetColor(), KIGFX::DS_RENDER_SETTINGS::GetColor(), SCH_MOVE_TOOL::getConnectedDragItems(), KIGFX::SCH_PAINTER::getLineWidth(), DIALOG_EXCHANGE_FOOTPRINTS::isMatch(), DIALOG_CHANGE_SYMBOLS::isMatch(), SCH_SCREEN::MarkConnections(), SCH_LINE::MergeOverlap(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), SCH_MOVE_TOOL::moveItem(), KIGFX::SCH_PAINTER::nonCached(), SCH_MOVE_TOOL::orthoLineDrag(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), BOARD_COMMIT::Push(), SCH_COMMIT::pushSchEdit(), EE_SELECTION_TOOL::RebuildSelection(), PCB_SELECTION_TOOL::RebuildSelection(), SCH_FIND_REPLACE_TOOL::ReplaceAll(), SCH_COMMIT::Revert(), SCH_EDIT_TOOL::Rotate(), EE_TOOL_BASE< T >::saveCopyInUndoList(), CLIPBOARD_IO::SaveSelection(), SCH_IO_KICAD_SEXPR::saveTable(), GERBVIEW_SELECTION_TOOL::select(), PCB_SELECTION_TOOL::select(), PCB_TEST_SELECTION_TOOL::select(), EE_SELECTION_TOOL::SelectColumns(), PCB_SELECTION_TOOL::SelectColumns(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), GERBVIEW_SELECTION_TOOL::selectPoint(), EE_SELECTION_TOOL::SelectRows(), PCB_SELECTION_TOOL::SelectRows(), SCH_COMMIT::Stage(), DIALOG_TABLE_PROPERTIES::TransferDataToWindow(), GERBVIEW_SELECTION_TOOL::unselect(), SCH_FIND_REPLACE_TOOL::UpdateFind(), SCH_SYMBOL::UpdatePins(), PCB_TUNING_PATTERN::ViewDraw(), PCB_FIELD::ViewGetLOD(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem(), DIALOG_GLOBAL_EDIT_TEARDROPS::visitItem(), and DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::visitItem().

◆ IsShownAsBitmap()

bool EDA_ITEM::IsShownAsBitmap ( ) const
inlineinherited

Definition at line 168 of file eda_item.h.

References IS_SHOWN_AS_BITMAP, and EDA_ITEM::m_flags.

◆ IsSideSpecific()

◆ IsTented()

virtual bool BOARD_ITEM::IsTented ( PCB_LAYER_ID  aLayer) const
inlinevirtualinherited

Checks if the given object is tented (its copper shape is covered by solder mask) on a given side of the board.

Parameters
aLayeris the layer to check tenting mode for: F_Cu and F_Mask are treated identically as are B_Cu and B_Mask
Returns
true if the object is tented on the given side

Reimplemented in PCB_VIA.

Definition at line 175 of file board_item.h.

Referenced by BOARD_INSPECTION_TOOL::InspectClearance(), and DRC_TEST_PROVIDER_SILK_CLEARANCE::Run().

◆ IsType()

◆ IterateForward() [1/2]

template<class T >
static INSPECT_RESULT EDA_ITEM::IterateForward ( std::deque< T > &  aList,
INSPECTOR  inspector,
void *  testData,
const std::vector< KICAD_T > &  scanTypes 
)
inlinestaticinherited

This changes first parameter to avoid the DList and use the main queue instead.

Definition at line 296 of file eda_item.h.

References EDA_ITEM::Visit().

Referenced by GERBER_FILE_IMAGE::Visit().

◆ IterateForward() [2/2]

template<class T >
static INSPECT_RESULT EDA_ITEM::IterateForward ( std::vector< T > &  aList,
INSPECTOR  inspector,
void *  testData,
const std::vector< KICAD_T > &  scanTypes 
)
inlinestaticinherited

Change first parameter to avoid the DList and use std::vector instead.

Definition at line 316 of file eda_item.h.

References EDA_ITEM::Visit().

◆ LayerDepth()

int BOARD::LayerDepth ( PCB_LAYER_ID  aStartLayer,
PCB_LAYER_ID  aEndLayer 
) const

Definition at line 746 of file board.cpp.

References B_Cu, F_Cu, GetCopperLayerCount(), and ToLAYER_ID().

Referenced by DIALOG_TRACK_VIA_PROPERTIES::getLayerDepth().

◆ layerMaskDescribe()

wxString BOARD_ITEM::layerMaskDescribe ( ) const
protectedvirtualinherited

◆ LegacyTeardrops()

◆ MapNets()

void BOARD::MapNets ( BOARD aDestBoard)

Map all nets in the given board to nets with the same name (if any) in the destination board.

If there are missing nets in the destination board, they will be created.

Definition at line 2614 of file board.cpp.

References Add(), AllConnectedItems(), and FindNet().

Referenced by PCB_CONTROL::Paste().

◆ Markers()

◆ MatchDpSuffix()

int BOARD::MatchDpSuffix ( const wxString &  aNetName,
wxString &  aComplementNet 
)

Fetch the coupled netname for a given net.

This accepts netnames suffixed by 'P', 'N', '+', '-', as well as additional numbers and underscores following the suffix. So NET_P_123 is a valid positive net name matched to NET_N_123.

Returns
the polarity of the given net (or 0 if it is not a diffpair net).

Definition at line 1922 of file board.cpp.

Referenced by DpCoupledNet(), PNS_PCBNEW_RULE_RESOLVER::DpNetPair(), and PNS_PCBNEW_RULE_RESOLVER::DpNetPolarity().

◆ Matches() [1/2]

virtual bool EDA_ITEM::Matches ( const EDA_SEARCH_DATA aSearchData,
void *  aAuxData 
) const
inlinevirtualinherited

Compare the item against the search criteria in aSearchData.

The base class returns false since many of the objects derived from EDA_ITEM do not have any text to search.

Parameters
aSearchDataA reference to a wxFindReplaceData object containing the search criteria.
aAuxDataA pointer to optional data required for the search or NULL if not used.
Returns
True if the item's text matches the search criteria in aSearchData.

Reimplemented in SCH_MARKER, SCH_FIELD, SCH_LABEL_BASE, SCH_PIN, SCH_SHEET, SCH_SHEET_PIN, SCH_SYMBOL, SCH_TABLE, SCH_TEXT, SCH_TEXTBOX, NETINFO_ITEM, PCB_MARKER, PCB_TABLE, PCB_TEXT, PCB_TEXTBOX, and ZONE.

Definition at line 377 of file eda_item.h.

Referenced by SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SCH_DRAWING_TOOLS::DrawShape(), SCH_FIND_REPLACE_TOOL::HasMatch(), SCH_MARKER::Matches(), SCH_FIELD::Matches(), SCH_LABEL_BASE::Matches(), SCH_PIN::Matches(), SCH_SHEET_PIN::Matches(), SCH_TEXT::Matches(), SCH_TEXTBOX::Matches(), NETINFO_ITEM::Matches(), PCB_MARKER::Matches(), PCB_TEXT::Matches(), PCB_TEXTBOX::Matches(), ZONE::Matches(), TEXT_SEARCH_HANDLER::Search(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and SCH_FIND_REPLACE_TOOL::UpdateFind().

◆ Matches() [2/2]

bool EDA_ITEM::Matches ( const wxString &  aText,
const EDA_SEARCH_DATA aSearchData 
) const
protectedinherited

Compare aText against search criteria in aSearchData.

This is a helper function for simplify derived class logic.

Parameters
aTextA reference to a wxString object containing the string to test.
aSearchDataThe criteria to search against.
Returns
True if aText matches the search criteria in aSearchData.

Definition at line 123 of file eda_item.cpp.

References CTX_SEARCH, EDA_COMBINED_MATCHER::Find(), EDA_SEARCH_DATA::findString, EDA_ITEM::IsReplaceable(), isWordChar(), EDA_SEARCH_DATA::matchCase, EDA_SEARCH_DATA::matchMode, next(), EDA_SEARCH_DATA::searchAndReplace, and text.

◆ Move()

void BOARD::Move ( const VECTOR2I aMoveVector)
overridevirtual

Move this object.

Parameters
aMoveVectorthe move vector for this object.

Reimplemented from BOARD_ITEM.

Definition at line 500 of file board.cpp.

References GENERAL_COLLECTOR::BoardLevelItems, and Visit().

Referenced by PCB_IO_CADSTAR_ARCHIVE::LoadBoard(), PCB_IO_EASYEDA::LoadBoard(), ALTIUM_PCB::Parse(), and PCB_IO_EASYEDAPRO_PARSER::ParseBoard().

◆ Normalize()

virtual void BOARD_ITEM::Normalize ( )
inlinevirtualinherited

Perform any normalization required after a user rotate and/or flip.

Reimplemented in PCB_SHAPE, and PCB_TABLE.

Definition at line 353 of file board_item.h.

◆ OnItemChanged()

void BOARD::OnItemChanged ( BOARD_ITEM aItem)

Notify the board and its listeners that an item on the board has been modified in some way.

Definition at line 2668 of file board.cpp.

References InvokeListeners(), and BOARD_LISTENER::OnBoardItemChanged().

◆ OnItemsChanged()

void BOARD::OnItemsChanged ( std::vector< BOARD_ITEM * > &  aItems)

Notify the board and its listeners that an item on the board has been modified in some way.

Definition at line 2674 of file board.cpp.

References InvokeListeners(), and BOARD_LISTENER::OnBoardItemsChanged().

Referenced by DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataFromWindow().

◆ OnItemsCompositeUpdate()

void BOARD::OnItemsCompositeUpdate ( std::vector< BOARD_ITEM * > &  aAddedItems,
std::vector< BOARD_ITEM * > &  aRemovedItems,
std::vector< BOARD_ITEM * > &  aChangedItems 
)

Notify the board and its listeners that items on the board have been modified in a composite operations.

Definition at line 2680 of file board.cpp.

References InvokeListeners(), and BOARD_LISTENER::OnBoardCompositeUpdate().

Referenced by BOARD_COMMIT::Push(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), and BOARD_COMMIT::Revert().

◆ OnRatsnestChanged()

void BOARD::OnRatsnestChanged ( )

Notify the board and its listeners that the ratsnest has been recomputed.

Definition at line 2689 of file board.cpp.

References InvokeListeners(), and BOARD_LISTENER::OnBoardRatsnestChanged().

Referenced by PCB_BASE_FRAME::Compile_Ratsnest(), BOARD_COMMIT::Push(), and BOARD_COMMIT::Revert().

◆ operator<()

bool EDA_ITEM::operator< ( const EDA_ITEM aItem) const
inherited

Test if another item is less than this object.

Parameters
aItem- Item to compare against.
Returns
- True if aItem is less than the item.

Definition at line 249 of file eda_item.cpp.

References EDA_ITEM::GetClass().

◆ operator=()

BOARD & BOARD::operator= ( const BOARD aOther)
privatedelete

◆ operator==()

◆ recalcOpposites()

void BOARD::recalcOpposites ( )
private

◆ RecordDRCExclusions()

void BOARD::RecordDRCExclusions ( )

Scan existing markers and record data from any that are Excluded.

Definition at line 327 of file board.cpp.

References m_designSettings, and m_markers.

Referenced by PCBNEW_JOBS_HANDLER::JobExportDrc(), DIALOG_DRC::OnRunDRCClick(), PCB_EDIT_FRAME::SaveProjectLocalSettings(), and WriteDRCReport().

◆ Remove()

void BOARD::Remove ( BOARD_ITEM aItem,
REMOVE_MODE  aMode = REMOVE_MODE::NORMAL 
)
overridevirtual

Removes an item from the container.

Implements BOARD_ITEM_CONTAINER.

Definition at line 1121 of file board.cpp.

References AllConnectedItems(), alg::delete_matching(), EDA_ITEM::GetFlags(), NETINFO_LIST::GetNetItem(), BOARD_ITEM::GetParentGroup(), InvokeListeners(), m_connectivity, m_drawings, m_footprints, m_generators, m_groups, m_itemByIdCache, m_markers, m_NetInfo, m_tracks, EDA_ITEM::m_Uuid, m_zones, BOARD_LISTENER::OnBoardItemRemoved(), PCB_ARC_T, PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_FIELD_T, PCB_FOOTPRINT_T, PCB_GENERATOR_T, PCB_GROUP_T, PCB_MARKER_T, PCB_NETINFO_T, PCB_REFERENCE_IMAGE_T, PCB_SHAPE_T, PCB_TABLE_T, PCB_TARGET_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_T, PCB_GROUP::RemoveItem(), NETINFO_LIST::RemoveNet(), FOOTPRINT::RunOnChildren(), PCB_TABLE::RunOnChildren(), EDA_ITEM::SetFlags(), STRUCT_DELETED, EDA_ITEM::Type(), and NETINFO_LIST::UNCONNECTED.

Referenced by NET_SELECTOR_COMBOPOPUP::Accept(), TRACKS_CLEANER::deleteDanglingTracks(), TEARDROP_MANAGER::DeleteTrackToTrackTeardrops(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), GroupsSanityCheckInternal(), FABMASTER::loadZones(), TRACKS_CLEANER::mergeCollinearSegments(), PCB_NET_INSPECTOR_PANEL::onDeleteSelectedNet(), DIALOG_DRC::OnDRCItemRClick(), PCB_NET_INSPECTOR_PANEL::onRenameSelectedNet(), BOARD_COMMIT::Push(), TRACKS_CLEANER::removeItems(), TEARDROP_MANAGER::RemoveTeardrops(), BOARD_COMMIT::Revert(), PANEL_SETUP_LAYERS::TransferDataFromWindow(), and TEARDROP_MANAGER::UpdateTeardrops().

◆ RemoveAll()

void BOARD::RemoveAll ( std::initializer_list< KICAD_T aTypes = PCB_NETINFO_TPCB_MARKER_TPCB_GROUP_TPCB_ZONE_TPCB_GENERATOR_TPCB_FOOTPRINT_TPCB_TRACE_TPCB_SHAPE_T })

An efficient way to remove all items of a certain type from the board.

Because of how items are stored, this method has some limitations in order to preserve performance: tracks, vias, and arcs are all removed together by PCB_TRACE_T, and all graphics and text object types are removed together by PCB_SHAPE_T. If you need something more granular than that, use BOARD::Remove.

Parameters
aTypesis a list of one or more types to remove, or leave default to remove all

Definition at line 1227 of file board.cpp.

References NETINFO_LIST::clear(), FinalizeBulkRemove(), m_drawings, m_footprints, m_generators, m_groups, m_itemByIdCache, m_markers, m_NetInfo, m_tracks, m_zones, PCB_ARC_T, PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_FIELD_T, PCB_FOOTPRINT_T, PCB_GENERATOR_T, PCB_GROUP_T, PCB_MARKER_T, PCB_NETINFO_T, PCB_REFERENCE_IMAGE_T, PCB_SHAPE_T, PCB_TABLE_T, PCB_TARGET_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_TRACE_T, PCB_VIA_T, and PCB_ZONE_T.

Referenced by DSN::SPECCTRA_DB::FromSESSION(), PCB_CONTROL::Paste(), and PCB_CONTROL::placeBoardItems().

◆ RemoveAllListeners()

void BOARD::RemoveAllListeners ( )

Remove all listeners.

Definition at line 2662 of file board.cpp.

References m_listeners.

Referenced by PCB_EDIT_FRAME::~PCB_EDIT_FRAME().

◆ RemoveFile()

void EMBEDDED_FILES::RemoveFile ( const wxString &  name,
bool  aErase = true 
)
inherited

Removes a file from the collection and frees the memory.

Parameters
aNameis the name of the file to remove.

Definition at line 114 of file embedded_files.cpp.

References EMBEDDED_FILES::m_files, and name.

Referenced by PANEL_EMBEDDED_FILES::onDeleteEmbeddedFile(), EMBED_TOOL::RemoveFile(), and PANEL_EMBEDDED_FILES::TransferDataFromWindow().

◆ RemoveListener()

void BOARD::RemoveListener ( BOARD_LISTENER aListener)

Remove the specified listener.

If it has not been added before, it will do nothing.

Definition at line 2650 of file board.cpp.

References m_listeners.

Referenced by DIALOG_GENERATORS::~DIALOG_GENERATORS(), and PCB_NET_INSPECTOR_PANEL::~PCB_NET_INSPECTOR_PANEL().

◆ RemoveUnusedNets()

void BOARD::RemoveUnusedNets ( BOARD_COMMIT aCommit)
inline

◆ RenderAsBitmap()

virtual bool EDA_ITEM::RenderAsBitmap ( double  aWorldScale) const
inlinevirtualinherited

Reimplemented in SCH_ITEM.

Definition at line 158 of file eda_item.h.

◆ Replace() [1/2]

virtual bool EDA_ITEM::Replace ( const EDA_SEARCH_DATA aSearchData,
void *  aAuxData = nullptr 
)
inlinevirtualinherited

Perform a text replace using the find and replace criteria in aSearchData on items that support text find and replace.

This function must be overridden for items that support text replace.

Parameters
aSearchDataA reference to a wxFindReplaceData object containing the search and replace criteria.
aAuxDataA pointer to optional data required for the search or NULL if not used.
Returns
True if the item text was modified, otherwise false.

Reimplemented in SCH_LABEL_BASE, SCH_PIN, SCH_TEXT, SCH_TEXTBOX, SCH_FIELD, and SCH_SHEET_PIN.

Definition at line 404 of file eda_item.h.

◆ Replace() [2/2]

bool EDA_ITEM::Replace ( const EDA_SEARCH_DATA aSearchData,
wxString &  aText 
)
staticinherited

Perform a text replace on aText using the find and replace criteria in aSearchData on items that support text find and replace.

Parameters
aSearchDataA reference to a wxFindReplaceData object containing the search and replace criteria.
aTextA reference to a wxString object containing the text to be replaced.
Returns
True if aText was modified, otherwise false.

Definition at line 186 of file eda_item.cpp.

References EDA_SEARCH_DATA::findString, isWordChar(), EDA_SEARCH_DATA::matchCase, EDA_SEARCH_DATA::matchMode, next(), EDA_SEARCH_DATA::replaceString, and text.

Referenced by EDA_TEXT::Replace(), SCH_FIELD::Replace(), SCH_FIND_REPLACE_TOOL::ReplaceAll(), and SCH_FIND_REPLACE_TOOL::ReplaceAndFindNext().

◆ ResetNetHighLight()

◆ ResolveDRCExclusions()

std::vector< PCB_MARKER * > BOARD::ResolveDRCExclusions ( bool  aCreateMarkers)

Rebuild DRC markers from the serialized data in BOARD_DESIGN_SETTINGS.

Parameters
aCreateMarkersif true, create markers from serialized data; if false only use serialized data to set existing markers to excluded. The former is used on board load; the later after a DRC.

Definition at line 344 of file board.cpp.

References PCB_MARKER::DeserializeFromString(), BOARD_ITEM::GetBoard(), DELETED_BOARD_ITEM::GetInstance(), GetItem(), MARKER_BASE::GetRCItem(), m_designSettings, Markers(), and MARKER_BASE::SetExcluded().

Referenced by PCBNEW_JOBS_HANDLER::JobExportDrc(), LoadBoard(), and WriteDRCReport().

◆ ResolveTextVar()

◆ Rotate()

void BOARD_ITEM::Rotate ( const VECTOR2I aRotCentre,
const EDA_ANGLE aAngle 
)
virtualinherited

Rotate this object.

Parameters
aRotCentrethe rotation center point.

Reimplemented in PCB_REFERENCE_IMAGE, ZONE, FOOTPRINT, PCB_TUNING_PATTERN, PAD, PCB_DIMENSION_BASE, PCB_DIM_ORTHOGONAL, PCB_GENERATOR, PCB_GROUP, PCB_MARKER, PCB_SHAPE, PCB_TABLE, PCB_TARGET, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, and PCB_ARC.

Definition at line 323 of file board_item.cpp.

References EDA_ITEM::GetClass().

Referenced by EDIT_TOOL::MoveExact(), and TransformItem().

◆ RunOnChildren()

virtual void BOARD_ITEM::RunOnChildren ( const std::function< void(BOARD_ITEM *)> &  aFunction) const
inlinevirtualinherited

Invoke a function on all children.

Note
This function should not add or remove items to the parent.

Reimplemented in FOOTPRINT, PCB_GROUP, and PCB_TABLE.

Definition at line 209 of file board_item.h.

Referenced by BOARD_COMMIT::dirtyIntersectingZones(), and PCB_IO_KICAD_SEXPR_PARSER::resolveGroups().

◆ RunOnDescendants()

virtual void BOARD_ITEM::RunOnDescendants ( const std::function< void(BOARD_ITEM *)> &  aFunction,
int  aDepth = 0 
) const
inlinevirtualinherited

◆ SanitizeNetcodes()

void BOARD::SanitizeNetcodes ( )

◆ Serialize()

virtual void SERIALIZABLE::Serialize ( google::protobuf::Any &  aContainer) const
inlinevirtualinherited

Serializes this object to the given Any message.

The Any message's concrete type will be specific to the object in question.

Parameters
aContainerwill be filled with a message describing this object

Reimplemented in SCH_LABEL, SCH_DIRECTIVE_LABEL, SCH_GLOBALLABEL, SCH_HIERLABEL, SCH_LINE, BOARD_STACKUP, FOOTPRINT, PAD, PADSTACK, PCB_FIELD, PCB_SHAPE, PCB_TEXT, PCB_TRACK, PCB_ARC, and PCB_VIA.

Definition at line 43 of file serializable.h.

Referenced by API_HANDLER_SCH::handleCreateUpdateItemsInternal(), and API_HANDLER_PCB::handleCreateUpdateItemsInternal().

◆ Set() [1/3]

template<typename T >
bool INSPECTABLE::Set ( const wxString &  aProperty,
aValue,
bool  aNotify = true 
)
inlineinherited

◆ Set() [2/3]

template<typename T >
bool INSPECTABLE::Set ( PROPERTY_BASE aProperty,
aValue,
bool  aNotify = true 
)
inlineinherited

◆ Set() [3/3]

bool INSPECTABLE::Set ( PROPERTY_BASE aProperty,
wxAny &  aValue,
bool  aNotify = true 
)
inlineinherited

◆ SetAreasNetCodesFromNetNames()

int BOARD::SetAreasNetCodesFromNetNames ( )

Set the .m_NetCode member of all copper areas, according to the area Net Name The SetNetCodesFromNetNames is an equivalent to net name, for fast comparisons.

However the Netcode is an arbitrary equivalence, it must be set after each netlist read or net change Must be called after pad netcodes are calculated

Returns
: error count For non copper areas, netcode is set to 0

Definition at line 2062 of file board.cpp.

References NETINFO_ITEM::GetNetCode(), NETINFO_ITEM::SetNetCode(), NETINFO_LIST::UNCONNECTED, and Zones().

Referenced by NETINFO_LIST::buildListOfNets().

◆ SetAreFontsEmbedded()

void EMBEDDED_FILES::SetAreFontsEmbedded ( bool  aEmbedFonts)
inlineinherited

◆ SetBoardUse()

◆ SetBrightened()

◆ SetCopperLayerCount()

◆ SetElementVisibility()

void BOARD::SetElementVisibility ( GAL_LAYER_ID  aLayer,
bool  aNewState 
)

Change the visibility of an element category.

Parameters
aLayeris from the enum by the same name.
aNewStateis the new visibility state of the element category.
See also
enum GAL_LAYER_ID

Definition at line 830 of file board.cpp.

References Footprints(), GAL_LAYER_ID_START, PROJECT::GetLocalSettings(), LAYER_RATSNEST, m_project, PROJECT_LOCAL_SETTINGS::m_VisibleItems, pad, GAL_SET::set(), Tracks(), and Zones().

Referenced by APPEARANCE_CONTROLS::onObjectVisibilityChanged(), PCB_EDIT_FRAME::SetElementVisibility(), APPEARANCE_CONTROLS::SetObjectVisible(), SetVisibleAlls(), and SetVisibleElements().

◆ SetEnabledLayers()

◆ SetFileFormatVersionAtLoad()

void BOARD::SetFileFormatVersionAtLoad ( int  aVersion)
inline

◆ SetFileName()

◆ SetFlags()

void EDA_ITEM::SetFlags ( EDA_ITEM_FLAGS  aMask)
inlineinherited

Definition at line 127 of file eda_item.h.

References EDA_ITEM::m_flags.

Referenced by SCH_IO_EAGLE::addBusEntries(), PCB_BASE_FRAME::AddFootprintToBoard(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), SCH_IO_ALTIUM::AddTextBox(), SCH_MOVE_TOOL::AlignToGrid(), PCB_CONTROL::AppendBoard(), SCH_EDIT_FRAME::BreakSegment(), SCH_EDIT_TOOL::BreakWire(), FOOTPRINT::BuildCourtyardCaches(), SCH_EDIT_TOOL::ChangeTextType(), GRAPHICS_CLEANER::cleanupShapes(), ConnectBoardShapes(), PCB_TUNING_PATTERN::CreateNew(), SCH_DRAWING_TOOLS::createNewText(), SCH_EDIT_FRAME::DeleteJunction(), doConvertOutlineToPolygon(), SCH_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), PCBNEW_JOBS_HANDLER::doFpExportSvg(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), EDIT_TOOL::DragArcTrack(), KIGFX::SCH_PAINTER::draw(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawLine(), DRAWING_TOOL::DrawRectangle(), SCH_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_DRAWING_TOOLS::DrawTable(), DRAWING_TOOL::DrawTable(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PCB_TUNING_PATTERN::EditStart(), PCB_SELECTION_TOOL::EnterGroup(), PAD_TOOL::explodePad(), SCH_IO_KICAD_SEXPR::Format(), SCH_MOVE_TOOL::getConnectedDragItems(), SYMBOL_EDIT_FRAME::GetSymbolFromRedoList(), SYMBOL_EDIT_FRAME::GetSymbolFromUndoList(), EE_SELECTION_TOOL::GuessSelectionCandidates(), EE_COLLECTOR::Inspect(), EE_SELECTION_TOOL::Main(), BOARD_COMMIT::MakeImage(), CONVERT_TOOL::makePolysFromChainedSegs(), CONVERT_TOOL::makePolysFromClosedGraphics(), CONVERT_TOOL::makePolysFromOpenGraphics(), SCH_SCREEN::MarkConnections(), TRACKS_CLEANER::mergeCollinearSegments(), SCH_MOVE_TOOL::moveItem(), SYMBOL_EDITOR_MOVE_TOOL::moveItem(), DIALOG_SYMBOL_PROPERTIES::OnUnitChoice(), KIGFX::ORIGIN_VIEWITEM::ORIGIN_VIEWITEM(), SCH_MOVE_TOOL::orthoLineDrag(), SCH_IO_ALTIUM::ParseBezier(), SCH_IO_ALTIUM::ParseBus(), SCH_IO_ALTIUM::ParseBusEntry(), SCH_IO_ALTIUM::ParseHarnessPort(), SCH_IO_ALTIUM::ParseJunction(), SCH_IO_ALTIUM::ParseLabel(), SCH_IO_ALTIUM::ParseLine(), SCH_IO_ALTIUM::ParseNetLabel(), SCH_IO_ALTIUM::ParseNoERC(), SCH_IO_ALTIUM::ParsePieChart(), SCH_IO_ALTIUM::ParsePolygon(), SCH_IO_ALTIUM::ParsePolyline(), SCH_IO_ALTIUM::ParsePort(), SCH_IO_ALTIUM::ParseRectangle(), SCH_IO_ALTIUM::ParseRoundRectangle(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_IO_ALTIUM::ParseSheetSymbol(), SCH_IO_ALTIUM::ParseSignalHarness(), SCH_IO_ALTIUM::ParseWire(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), BOARD_EDITOR_CONTROL::PlaceFootprint(), PL_DRAWING_TOOLS::PlaceItem(), SCH_SYMBOL::Plot(), BACK_ANNOTATE::processNetNameChange(), BOARD_COMMIT::Push(), SYMBOL_EDIT_FRAME::PushSymbolToUndoList(), SCH_EDIT_FRAME::PutDataInPreviousState(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), PCB_SELECTION_TOOL::RebuildSelection(), GERBVIEW_FRAME::RemapLayers(), Remove(), FOOTPRINT::Remove(), PCB_TUNING_PATTERN::Remove(), SCH_EDIT_TOOL::RepeatDrawItem(), SCH_EDIT_TOOL::Rotate(), SCH_EDIT_FRAME::SaveCopyInUndoList(), CLIPBOARD_IO::SaveSelection(), SCH_IO_KICAD_SEXPR::saveTable(), EE_SELECTION_TOOL::SelectAll(), PCB_SELECTION_TOOL::selectAllConnectedShapes(), EE_SELECTION_TOOL::selectMultiple(), EDA_ITEM::SetBrightened(), EDA_ITEM::SetIsShownAsBitmap(), EDA_ITEM::SetModified(), EDA_ITEM::SetSelected(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_LINE_WIRE_BUS_TOOL::startSegments(), SCH_ITEM::SwapFlags(), DS_DATA_ITEM::SyncDrawItems(), DS_DATA_ITEM_BITMAP::SyncDrawItems(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataFromWindow(), DIALOG_TARGET_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and ROUTER_TOOL::updateSizesAfterLayerSwitch().

◆ SetForcedTransparency()

void KIGFX::VIEW_ITEM::SetForcedTransparency ( double  aForcedTransparency)
inlineinherited

◆ SetForceVisible()

void EDA_ITEM::SetForceVisible ( bool  aEnable)
inlineinherited

Set and clear force visible flag used to force the item to be drawn even if it's draw attribute is set to not visible.

Parameters
aEnableTrue forces the item to be drawn. False uses the item's visibility setting to determine if the item is to be drawn.

Definition at line 194 of file eda_item.h.

References EDA_ITEM::m_forceVisible.

Referenced by SCH_FIND_REPLACE_TOOL::FindNext(), and SCH_FIND_REPLACE_TOOL::UpdateFind().

◆ SetFPRelativePosition()

◆ SetGenerator()

void BOARD::SetGenerator ( const wxString &  aGenerator)
inline

Definition at line 395 of file board.h.

References m_generator.

Referenced by PCB_IO_KICAD_SEXPR_PARSER::parseBOARD_unchecked().

◆ SetHighLightNet()

void BOARD::SetHighLightNet ( int  aNetCode,
bool  aMulti = false 
)

Select the netcode to be highlighted.

Parameters
aNetCodeis the net to highlight.
aMultiis true if you want to add a highlighted net without clearing the old one.

Definition at line 2704 of file board.cpp.

References InvokeListeners(), m_highLight, HIGH_LIGHT_INFO::m_netCodes, and BOARD_LISTENER::OnBoardHighlightNetChanged().

Referenced by PCB_EDIT_FRAME::ExecuteRemoteCommand(), BOARD_INSPECTION_TOOL::highlightNet(), and APPEARANCE_CONTROLS::onNetclassContextMenu().

◆ SetIsKnockout()

◆ SetIsShownAsBitmap()

void EDA_ITEM::SetIsShownAsBitmap ( bool  aBitmap)
inlineinherited

Definition at line 160 of file eda_item.h.

References EDA_ITEM::ClearFlags(), IS_SHOWN_AS_BITMAP, and EDA_ITEM::SetFlags().

◆ SetLayer()

virtual void BOARD_ITEM::SetLayer ( PCB_LAYER_ID  aLayer)
inlinevirtualinherited

Set the layer this item is on.

This method is virtual because some items (in fact: class DIMENSION) have a slightly different initialization.

Parameters
aLayerThe layer number.

Reimplemented in PCB_GENERATOR, PCB_GROUP, PCB_SHAPE, PCB_VIA, and ZONE.

Definition at line 276 of file board_item.h.

References BOARD_ITEM::m_layer.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::addAttribute(), PCAD2KICAD::PCAD_FOOTPRINT::AddToBoard(), PCAD2KICAD::PCAD_LINE::AddToBoard(), PCAD2KICAD::PCAD_TEXT::AddToBoard(), CADSTAR_PCB_ARCHIVE_LOADER::applyDimensionSettings(), BOARD_CONNECTED_ITEM_DESC::BOARD_CONNECTED_ITEM_DESC(), BOARD_ITEM_DESC::BOARD_ITEM_DESC(), BOOST_AUTO_TEST_CASE(), ALTIUM_PCB::ConvertTexts6ToBoardItemOnLayer(), ALTIUM_PCB::ConvertTexts6ToFootprintItemOnLayer(), PNS_KICAD_IFACE::createBoardItem(), PCB_BASE_FRAME::CreateNewFootprint(), BOARD_ADAPTER::createTrack(), FOOTPRINT::Deserialize(), PAD::Deserialize(), PCB_FIELD::Deserialize(), PCB_TEXT::Deserialize(), PCB_TRACK::Deserialize(), PCB_ARC::Deserialize(), EDIT_TOOL::DragArcTrack(), CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarText(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawTable(), EDIT_TOOL::FilletTracks(), PCB_IO_EASYEDAPRO_PARSER::fillFootprintModelInfo(), FOOTPRINT::Flip(), PCB_DIMENSION_BASE::Flip(), PCB_TABLE::Flip(), PCB_TARGET::Flip(), PCB_TEXT::Flip(), PCB_TRACK::Flip(), PCB_ARC::Flip(), FOOTPRINT::FOOTPRINT(), PNS_PCBNEW_RULE_RESOLVER::getBoardItem(), DRAWING_TOOL::InteractivePlaceWithPreview(), FABMASTER::loadEtch(), PCB_IO_KICAD_LEGACY::loadFOOTPRINT(), FABMASTER::loadFootprints(), FABMASTER::loadGraphics(), PCB_IO_KICAD_LEGACY::loadMODULE_TEXT(), FABMASTER::loadOutline(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), PCB_IO_EAGLE::loadSignals(), PCB_IO_KICAD_LEGACY::loadTrackList(), main(), DSN::SPECCTRA_DB::makeTRACK(), CADSTAR_PCB_ARCHIVE_LOADER::makeTracksFromShapes(), DIALOG_FOOTPRINT_PROPERTIES::OnAddField(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAddField(), PCB_IO_EAGLE::packageText(), PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT_unchecked(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_TEXT_effects(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), PCB_MARKER::PCB_MARKER(), PCB_REFERENCE_IMAGE_DESC::PCB_REFERENCE_IMAGE_DESC(), PCB_TEXT::PCB_TEXT(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem(), processTextItem(), PCB_CONTROL::pruneItemLayers(), CLIPBOARD_IO::SaveSelection(), PCB_SHAPE::SetLayer(), BOARD_ITEM::SetLayerSet(), PCB_FIELDS_GRID_TABLE::SetValueAsLong(), EDIT_TOOL::Swap(), DIALOG_REFERENCE_IMAGE_PROPERTIES::TransferDataFromWindow(), DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), BOARD_NETLIST_UPDATER::updateFootprintParameters(), and ROUTER_TOOL::updateSizesAfterLayerSwitch().

◆ SetLayerDescr()

bool BOARD::SetLayerDescr ( PCB_LAYER_ID  aIndex,
const LAYER aLayer 
)

Return the type of the copper layer given by aLayer.

Parameters
aIndexA layer index in m_Layer
aLayerA reference to a LAYER description.
Returns
false if the index was out of range.

Definition at line 542 of file board.cpp.

References arrayDim(), m_layers, and recalcOpposites().

Referenced by PCB_IO_KICAD_SEXPR_PARSER::parseLayers().

◆ SetLayerName()

bool BOARD::SetLayerName ( PCB_LAYER_ID  aLayer,
const wxString &  aLayerName 
)

Changes the name of the layer given by aLayer.

Parameters
aLayerA layer, like B_Cu, etc.
aLayerNameThe new layer name
Returns
true if aLayerName was legal and unique among other layer names at other layer indices and aLayer was within range, else false.

Definition at line 591 of file board.cpp.

References IsLayerEnabled(), m_layers, LAYER::m_userName, and recalcOpposites().

Referenced by FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME(), PCB_IO_EASYEDA::LoadBoard(), CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup(), PCB_IO_EAGLE::loadLayerDefs(), FABMASTER::loadLayers(), PCB_IO_KICAD_LEGACY::loadSETUP(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), ALTIUM_PCB::ParseBoard6Data(), and PANEL_SETUP_LAYERS::TransferDataFromWindow().

◆ SetLayerSet()

virtual void BOARD_ITEM::SetLayerSet ( LSET  aLayers)
inlinevirtualinherited

◆ SetLayerType()

bool BOARD::SetLayerType ( PCB_LAYER_ID  aLayer,
LAYER_T  aLayerType 
)

Change the type of the layer given by aLayer.

Parameters
aLayerA layer index, like B_Cu, etc.
aLayerTypeThe new layer type.
Returns
true if aLayerType was legal and aLayer was within range, else false.

Definition at line 625 of file board.cpp.

References IsLayerEnabled(), m_layers, LAYER::m_type, and recalcOpposites().

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup(), PCB_IO_EAGLE::loadLayerDefs(), PCB_IO_KICAD_LEGACY::loadSETUP(), ALTIUM_PCB::ParseBoard6Data(), and PANEL_SETUP_LAYERS::TransferDataFromWindow().

◆ SetLegacyTeardrops()

void BOARD::SetLegacyTeardrops ( bool  aFlag)
inline

◆ SetLocked()

◆ SetModified()

◆ SetOutlinesChainingEpsilon()

void BOARD::SetOutlinesChainingEpsilon ( int  aValue)
inline

Definition at line 733 of file board.h.

References m_outlinesChainingEpsilon.

◆ SetPageSettings()

void BOARD::SetPageSettings ( const PAGE_INFO aPageSettings)
inline

◆ SetParent()

virtual void EDA_ITEM::SetParent ( EDA_ITEM aParent)
inlinevirtualinherited

Reimplemented in LIB_SYMBOL, and NETINFO_ITEM.

Definition at line 104 of file eda_item.h.

References EDA_ITEM::m_parent.

Referenced by Add(), FOOTPRINT::Add(), PCB_TABLE::AddCell(), SCH_TABLE::AddCell(), LIB_SYMBOL::AddDrawItem(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), BOARD_NETLIST_UPDATER::addNewFootprint(), SCH_SHEET::AddPin(), PAD::AddPrimitive(), PAD::AddPrimitivePoly(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), SCH_SCREEN::Append(), BOOST_AUTO_TEST_CASE(), CADSTAR_SCH_ARCHIVE_LOADER::copySymbolItems(), SYMBOL_EDIT_FRAME::CreateNewSymbol(), SCH_DRAWING_TOOLS::createNewText(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), PCBNEW_JOBS_HANDLER::doFpExportSvg(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), SCH_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawTable(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PCB_EDIT_FRAME::ExchangeFootprint(), PAD_TOOL::explodePad(), LIB_SYMBOL::Flatten(), PCB_IO_KICAD_SEXPR::FootprintSave(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), CADSTAR_SCH_ARCHIVE_LOADER::getKiCadSchText(), PCB_TABLE::InsertCell(), SCH_TABLE::InsertCell(), LIB_SYMBOL::LIB_SYMBOL(), LTSPICE_SCHEMATIC::Load(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadAliases(), CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), SCH_IO_KICAD_SEXPR::loadHierarchy(), SCH_IO_KICAD_LEGACY::loadHierarchy(), KI_TEST::LoadHierarchy(), SCH_IO_EAGLE::loadSymbolCircle(), SCH_IO_EAGLE::loadSymbolPolyLine(), SCH_IO_EAGLE::loadSymbolRectangle(), SCH_IO_EAGLE::loadSymbolWire(), LIB_SYMBOL::operator=(), SCH_IO_KICAD_SEXPR_PARSER::parseLibSymbol(), SCH_IO_KICAD_SEXPR_PARSER::ParseSchematic(), SCH_EDITOR_CONTROL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PCB_CONTROL::Paste(), pasteFootprintItemsToFootprintEditor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), BACK_ANNOTATE::processNetNameChange(), PAD::Recombine(), SCH_IO_LIB_CACHE::removeSymbol(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), CLIPBOARD_IO::SaveSelection(), SCH_SHEET_PIN::SCH_SHEET_PIN(), LIB_SYMBOL::SetFields(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_LINE_WIRE_BUS_TOOL::startSegments(), FOOTPRINT::swapData(), PCB_TABLE::swapData(), SCH_LABEL_BASE::SwapData(), SCH_SHEET::SwapData(), SCH_SYMBOL::SwapData(), SCH_TABLE::SwapData(), BOARD_ITEM::SwapItemData(), SCH_SYMBOL::SyncOtherUnits(), and SCH_DRAWING_TOOLS::TwoClickPlace().

◆ SetParentGroup()

◆ SetPlotOptions()

void BOARD::SetPlotOptions ( const PCB_PLOT_PARAMS aOptions)
inline

◆ SetPosition()

void BOARD::SetPosition ( const VECTOR2I aPos)
overridevirtual

Reimplemented from EDA_ITEM.

Definition at line 494 of file board.cpp.

◆ SetProject()

void BOARD::SetProject ( PROJECT aProject,
bool  aReferenceOnly = false 
)

Link a board to a given project.

Should be called immediately after loading board in order for everything to work.

Parameters
aProjectis a loaded project to link to.
aReferenceOnlyavoids taking ownership of settings stored in project if true

Definition at line 196 of file board.cpp.

References ClearProject(), GetDesignSettings(), PROJECT::GetProjectFile(), m_LegacyDesignSettingsLoaded, m_LegacyNetclassesLoaded, BOARD_DESIGN_SETTINGS::m_NetSettings, m_project, and project.

Referenced by DIALOG_FOOTPRINT_CHOOSER::build3DCanvas(), FOOTPRINT_CHOOSER_FRAME::build3DCanvas(), CreateEmptyBoard(), LoadBoard(), NewBoard(), DIALOG_BOARD_SETUP::onAuxiliaryAction(), PCB_EDIT_FRAME::OpenProjectFiles(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), and PCB_EDIT_FRAME::SetBoard().

◆ SetProperties()

void BOARD::SetProperties ( const std::map< wxString, wxString > &  aProps)
inline

◆ SetSelected()

◆ SetStroke()

void BOARD_ITEM::SetStroke ( const STROKE_PARAMS aStroke)
virtualinherited

Reimplemented in PCB_SHAPE.

Definition at line 94 of file board_item.cpp.

References EDA_ITEM::GetClass().

◆ SetTitleBlock()

void BOARD::SetTitleBlock ( const TITLE_BLOCK aTitleBlock)
inline

◆ SetUserUnits()

void BOARD::SetUserUnits ( EDA_UNITS  aUnits)
inline

Definition at line 695 of file board.h.

References m_userUnits.

Referenced by PCB_BASE_FRAME::SetBoard(), and PCB_BASE_FRAME::unitsChangeRefresh().

◆ SetVisibleAlls()

void BOARD::SetVisibleAlls ( )

Change the bit-mask of visible element categories and layers.

See also
enum GAL_LAYER_ID

Definition at line 807 of file board.cpp.

References GAL_LAYER_ID_BITMASK_END, GAL_LAYER_ID_START, SetElementVisibility(), and SetVisibleLayers().

Referenced by EVT_GRID_CMD_CELL_CHANGED(), and FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME().

◆ SetVisibleElements()

void BOARD::SetVisibleElements ( const GAL_SET aMask)

A proxy function that calls the correspondent function in m_BoardSettings.

Parameters
aMaskis the new bit-mask of visible element bitmap or-ed from enum GAL_LAYER_ID
See also
enum GAL_LAYER_ID

Definition at line 797 of file board.cpp.

References GAL_LAYER_ID_START, and SetElementVisibility().

Referenced by PCB_IO_KICAD_LEGACY::loadSETUP(), and APPEARANCE_CONTROLS::setVisibleObjects().

◆ SetVisibleLayers()

◆ SetX()

void BOARD_ITEM::SetX ( int  aX)
inlineinherited

◆ SetY()

void BOARD_ITEM::SetY ( int  aY)
inlineinherited

◆ Similarity()

double BOARD::Similarity ( const BOARD_ITEM aOther) const
inlineoverridevirtual

Return the Similarity.

Because we compare board to board, we just return 1.0 here

Implements BOARD_ITEM.

Definition at line 983 of file board.h.

◆ Sort()

static bool EDA_ITEM::Sort ( const EDA_ITEM aLeft,
const EDA_ITEM aRight 
)
inlinestaticinherited

Helper function to be used by the C++ STL sort algorithm for sorting a STL container of EDA_ITEM pointers.

Parameters
aLeftThe left hand item to compare.
aRightThe right hand item to compare.
Returns
True if aLeft is less than aRight.

Definition at line 433 of file eda_item.h.

◆ StyleFromSettings()

virtual void BOARD_ITEM::StyleFromSettings ( const BOARD_DESIGN_SETTINGS settings)
inlinevirtualinherited

Reimplemented in PCB_SHAPE, PCB_TEXT, and PCB_TEXTBOX.

Definition at line 318 of file board_item.h.

◆ swapData()

◆ SwapItemData()

void BOARD_ITEM::SwapItemData ( BOARD_ITEM aImage)
inherited

Swap data between aItem and aImage.

aItem and aImage should have the same type.

Used in undo and redo commands to swap values between an item and its copy. Only values like layer, size .. which are modified by editing are swapped.

Parameters
aImagethe item image which contains data to swap.

Definition at line 193 of file board_item.cpp.

References BOARD_ITEM::GetParent(), BOARD_ITEM::GetParentGroup(), group, EDA_ITEM::SetParent(), BOARD_ITEM::SetParentGroup(), and BOARD_ITEM::swapData().

Referenced by API_HANDLER_PCB::handleCreateUpdateItemsInternal(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), and BOARD_COMMIT::Revert().

◆ SynchronizeNetsAndNetClasses()

◆ SynchronizeProperties()

◆ TestZoneIntersection()

bool BOARD::TestZoneIntersection ( ZONE aZone1,
ZONE aZone2 
)

Test for intersection of 2 copper areas.

Parameters
aZone1is the area reference.
aZone2is the area to compare for intersection calculations.
Returns
false if no intersection, true if intersection.

Definition at line 90 of file edit_zone_helpers.cpp.

References SHAPE_POLY_SET::BBox(), SEG::Collide(), SHAPE_POLY_SET::Contains(), ZONE::GetLayerSet(), BOX2< Vec >::Intersects(), SHAPE_POLY_SET::IterateSegmentsWithHoles(), SHAPE_POLY_SET::IterateWithHoles(), and ZONE::Outline().

Referenced by BOARD_EDITOR_CONTROL::ZoneMerge().

◆ Tracks()

const TRACKS & BOARD::Tracks ( ) const
inline

Definition at line 328 of file board.h.

References m_tracks.

Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), GERBER_JOBFILE_WRITER::addJSONDesignRules(), RENDER_3D_RAYTRACE_BASE::addPadsAndVias(), AllConnectedItems(), PCB_CONTROL::AppendBoard(), CN_CONNECTIVITY_ALGO::Build(), build_via_testpoints(), EXPORTER_STEP::buildBoard3DShapes(), ZONE_FILLER::buildCopperItemClearances(), GENDRILL_WRITER_BASE::buildHolesList(), TEARDROP_MANAGER::buildTrackCaches(), TRACKS_CLEANER::cleanup(), HYPERLYNX_EXPORTER::collectNetObjects(), BOARD_ADAPTER::createLayers(), GENCAD_EXPORTER::CreatePadsShapesSection(), GENCAD_EXPORTER::CreateRoutesSection(), GENCAD_EXPORTER::CreateTracksInfoData(), TRACKS_CLEANER::deleteDanglingTracks(), TRACKS_CLEANER::deleteTracksInPads(), PCB_DRAW_PANEL_GAL::DisplayBoard(), DIALOG_GLOBAL_DELETION::DoGlobalDeletions(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), EXPORTER_PCB_VRML::ExportVrmlViaHoles(), ZONE_FILLER::Fill(), FillItemMap(), DRC_TEST_PROVIDER::forEachGeometryItem(), PCB_IO_KICAD_SEXPR::format(), DSN::SPECCTRA_DB::FromBOARD(), DSN::SPECCTRA_DB::FromSESSION(), PCB_IO_IPC2581::generateDrillLayers(), PCB_IO_IPC2581::generateLayerFeatures(), RENDER_3D_OPENGL::generateViasAndPads(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), GetItem(), NETINFO_ITEM::GetMsgPanelInfo(), PCB_DRAW_PANEL_GAL::GetMsgPanelInfo(), API_HANDLER_PCB::handleGetItems(), DIALOG_GENDRILL::InitDisplayParams(), ALTIUM_PCB::Parse(), PCB_IO_KICAD_SEXPR_PARSER::parseBOARD_unchecked(), PCB_CONTROL::placeBoardItems(), BRDITEMS_PLOTTER::PlotDrillMarks(), PlotLayerOutlines(), PlotSolderMaskLayer(), PlotStandardLayer(), TRACKS_CLEANER::removeShortingTrackSegments(), DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_CONNECTIVITY::Run(), DRC_TEST_PROVIDER_HOLE_SIZE::Run(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::Run(), DRC_TEST_PROVIDER_TRACK_WIDTH::Run(), DRC_TEST_PROVIDER_VIA_DIAMETER::Run(), PCB_EDIT_FRAME::RunActionPlugin(), SetElementVisibility(), snapToNearestTrack(), PNS_KICAD_IFACE_BASE::SyncWorld(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataFromWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataFromWindow(), NETINFO_MAPPING::Update(), BOARD_NETLIST_UPDATER::updateCopperZoneNets(), PCB_CONTROL::UpdateMessagePanel(), DIALOG_UNUSED_PAD_LAYERS::updatePadsAndVias(), TEARDROP_MANAGER::UpdateTeardrops(), and HYPERLYNX_EXPORTER::writePadStacks().

◆ TracksInNet()

TRACKS BOARD::TracksInNet ( int  aNetCode)

Collect all the TRACKs and VIAs that are members of a net given by aNetCode.

Used from python.

Parameters
aNetCodegives the id of the net.
Returns
list of track which are in the net identified by aNetCode.

Definition at line 520 of file board.cpp.

References BOARD_CONNECTED_ITEM::GetNetCode(), GENERAL_COLLECTOR::Tracks, and Visit().

◆ TransformShapeToPolygon()

void BOARD_ITEM::TransformShapeToPolygon ( SHAPE_POLY_SET aBuffer,
PCB_LAYER_ID  aLayer,
int  aClearance,
int  aError,
ERROR_LOC  aErrorLoc,
bool  ignoreLineWidth = false 
) const
virtualinherited

Convert the item shape to a closed polygon.

Circles and arcs are approximated by segments.

Parameters
aBuffera buffer to store the polygon.
aClearancethe clearance around the pad.
aErrorthe maximum deviation from true circle.
aErrorLocshould the approximation error be placed outside or inside the polygon?
ignoreLineWidthused for edge cut items where the line width is only for visualization.

Reimplemented in PCB_DIMENSION_BASE, PCB_SHAPE, PCB_TARGET, PCB_TRACK, ZONE, PCB_TABLE, PCB_TEXT, PCB_TEXTBOX, and PAD.

Definition at line 223 of file board_item.cpp.

Referenced by DRC_TEST_PROVIDER_SOLDER_MASK::addItemToRTrees(), ZONE_FILLER::addKnockout(), FOOTPRINT::CoverageRatio(), FOOTPRINT::GetCoverageArea(), process(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), and DRC_TEST_PROVIDER_SLIVER_CHECKER::Run().

◆ Type()

KICAD_T EDA_ITEM::Type ( ) const
inlineinherited

Returns the type of object.

This attribute should never be changed after a ctor sets it, so there is no public "setter" method.

Returns
the type of object.

Definition at line 101 of file eda_item.h.

References EDA_ITEM::m_structType.

Referenced by CN_CONNECTIVITY_ALGO::Add(), Add(), FOOTPRINT::Add(), CN_CLUSTER::Add(), PCB_POINT_EDITOR::addCorner(), PCB_GROUP::AddItem(), CONNECTION_SUBGRAPH::AddItem(), DRC_TEST_PROVIDER_SOLDER_MASK::addItemToRTrees(), ZONE_FILLER::addKnockout(), SCH_SHEET::AddPin(), SCH_BASE_FRAME::AddToScreen(), ALIGN_DISTRIBUTE_TOOL::AlignBottom(), ALIGN_DISTRIBUTE_TOOL::AlignCenterX(), ALIGN_DISTRIBUTE_TOOL::AlignCenterY(), SCH_MOVE_TOOL::AlignToGrid(), ALIGN_DISTRIBUTE_TOOL::AlignTop(), CN_ITEM::AnchorCount(), SCH_SCREEN::Append(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), TEARDROP_MANAGER::areItemsInSameZone(), PNS::TOPOLOGY::AssembleTuningPath(), SCH_LABEL_BASE::AutoplaceFields(), SCH_EDIT_FRAME::AutoRotateItem(), EE_SELECTION_TOOL::autostartEvent(), EXPORTER_STEP::buildGraphic3DShape(), PCB_NET_INSPECTOR_PANEL::buildNewItem(), SCH_SCREENS::buildScreenList(), EXPORTER_STEP::buildTrack3DShape(), BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), PCB_POINT_EDITOR::canAddCorner(), SCH_BUS_WIRE_ENTRY::CanConnect(), SCH_BUS_BUS_ENTRY::CanConnect(), SCH_JUNCTION::CanConnect(), SCH_LABEL_BASE::CanConnect(), SCH_LINE::CanConnect(), SCH_NO_CONNECT::CanConnect(), SCH_SHEET::CanConnect(), SCH_SYMBOL::CanConnect(), ROUTER_TOOL::CanInlineDrag(), SCH_EDIT_TOOL::ChangeTextType(), KI_TEST::CheckFootprint(), KI_TEST::CheckFpShape(), KI_TEST::CheckFpZone(), DRC_TEST_PROVIDER_SOLDER_MASK::checkMaskAperture(), CN_VISITOR::checkZoneItemConnection(), LIB_SYMBOL::ClassOf(), SCH_BITMAP::ClassOf(), SCH_BUS_WIRE_ENTRY::ClassOf(), SCH_BUS_BUS_ENTRY::ClassOf(), SCH_FIELD::ClassOf(), SCH_JUNCTION::ClassOf(), SCH_LABEL::ClassOf(), SCH_DIRECTIVE_LABEL::ClassOf(), SCH_GLOBALLABEL::ClassOf(), SCH_HIERLABEL::ClassOf(), SCH_LINE::ClassOf(), SCH_MARKER::ClassOf(), SCH_NO_CONNECT::ClassOf(), SCH_PIN::ClassOf(), SCH_SCREEN::ClassOf(), SCH_SHEET::ClassOf(), SCH_SHEET_PIN::ClassOf(), SCH_SYMBOL::ClassOf(), SCH_TABLE::ClassOf(), SCH_TABLECELL::ClassOf(), SCH_TEXT::ClassOf(), SCH_TEXTBOX::ClassOf(), ClassOf(), BOARD_CONNECTED_ITEM::ClassOf(), FOOTPRINT::ClassOf(), NETINFO_ITEM::ClassOf(), PAD::ClassOf(), PCB_DIM_ALIGNED::ClassOf(), PCB_DIM_ORTHOGONAL::ClassOf(), PCB_DIM_RADIAL::ClassOf(), PCB_DIM_LEADER::ClassOf(), PCB_DIM_CENTER::ClassOf(), PCB_FIELD::ClassOf(), PCB_GENERATOR::ClassOf(), PCB_GROUP::ClassOf(), PCB_MARKER::ClassOf(), PCB_REFERENCE_IMAGE::ClassOf(), PCB_SHAPE::ClassOf(), PCB_TABLE::ClassOf(), PCB_TABLECELL::ClassOf(), PCB_TARGET::ClassOf(), PCB_TEXT::ClassOf(), PCB_TEXTBOX::ClassOf(), PCB_TRACK::ClassOf(), PCB_ARC::ClassOf(), PCB_VIA::ClassOf(), ZONE::ClassOf(), CONNECTION_GRAPH::collectAllDriverValues(), collidesWithArea(), SCH_ITEM::compare(), SCH_FIELD::compare(), SCH_TEXT::compare(), SCH_TEXTBOX::compare(), LIB_SYMBOL::compare(), PCB_GRID_HELPER::computeAnchors(), EE_GRID_HELPER::computeAnchors(), SCH_BUS_WIRE_ENTRY::ConnectionPropagatesTo(), SCH_LINE::ConnectionPropagatesTo(), EE_RTREE::contains(), PICKED_ITEMS_LIST::ContainsItemType(), ConvertKIIDsToCrossReferences(), SCHEMATIC::ConvertKIIDsToRefs(), PAD_TOOL::copyPadSettings(), FOOTPRINT::CoverageRatio(), CreateItemForType(), BOARD_ADAPTER::createLayers(), PCB_BASE_FRAME::CreateNewFootprint(), SCH_DRAWING_TOOLS::createNewText(), ZONE_CREATE_HELPER::createNewZone(), BOARD_ADAPTER::createTrack(), EE_INSPECTION_TOOL::CrossProbe(), DRC_TOOL::CrossProbe(), SCH_SCREEN::DeleteItem(), SCH_MARKER::DeserializeFromString(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES(), DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), BOARD_COMMIT::dirtyIntersectingZones(), ALIGN_DISTRIBUTE_TOOL::doAlignLeft(), ALIGN_DISTRIBUTE_TOOL::doAlignRight(), SCH_EDIT_TOOL::DoDelete(), APPEARANCE_CONTROLS::doesBoardItemNeedRebuild(), DIALOG_GLOBAL_DELETION::DoGlobalDeletions(), EDIT_TOOL::doMoveSelection(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), EDIT_TOOL::DragArcTrack(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), DRAWING_TOOL::DrawDimension(), KIGFX::SCH_PAINTER::drawItemBoundingBox(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawVia(), CONNECTION_SUBGRAPH::driverName(), CN_ITEM::Dump(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), EDIT_TOOL::Duplicate(), FOOTPRINT::DuplicateItem(), EDA_ITEM_DESC::EDA_ITEM_DESC(), SCH_EDIT_TOOL::EditField(), SCH_EDIT_TOOL::editFieldText(), SYMBOL_EDITOR_EDIT_TOOL::editTextBoxProperties(), SYMBOL_EDITOR_EDIT_TOOL::editTextProperties(), enclosedByAreaFunc(), CONNECTION_GRAPH::ercCheckBusToBusConflicts(), CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts(), CONNECTION_GRAPH::ercCheckBusToNetConflicts(), CONNECTION_GRAPH::ercCheckDanglingWireEndpoints(), CONNECTION_GRAPH::ercCheckFloatingWires(), CONNECTION_GRAPH::ercCheckLabels(), CONNECTION_GRAPH::ercCheckMultipleDrivers(), CONNECTION_GRAPH::ercCheckNoConnects(), DRC_ENGINE::EvalRules(), DRC_ENGINE::EvalZoneConnection(), CONNECTION_SUBGRAPH::ExchangeItem(), CONNECTION_GRAPH::ExchangeItem(), PCB_SELECTION_TOOL::FilterCollectorForFreePads(), PCB_SELECTION_TOOL::FilterCollectorForHierarchy(), PCB_SELECTION_TOOL::FilterCollectorForMarkers(), PCB_SELECTION_TOOL::FilterCollectorForTableCells(), TEARDROP_MANAGER::findAnchorPointsOnTrack(), PCB_SELECTION_TOOL::FindItem(), NETLIST_EXPORTER_BASE::findNextSymbol(), PCB_IO_KICAD_SEXPR::Format(), PCB_IO_KICAD_SEXPR::format(), SCH_IO_KICAD_SEXPR::Format(), SCH_IO_KICAD_LEGACY::Format(), FormatProbeItem(), PCB_POINT_EDITOR::get45DegConstrainer(), CN_ITEM::GetAnchor(), BOARD_ITEM::GetBoard(), SCH_FIELD::GetBoundingBox(), SCH_LABEL_BASE::GetBoundingBox(), PCB_TRACK::GetBoundingBox(), SCH_FIELD::GetCanonicalName(), PCB_FIELD::GetCanonicalName(), EDIT_TOOL::getChildItemsOfGroupsAndGenerators(), getClosestGroup(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), KIGFX::GERBVIEW_RENDER_SETTINGS::GetColor(), KIGFX::DS_RENDER_SETTINGS::GetColor(), SCH_MOVE_TOOL::getConnectedDragItems(), SCH_MOVE_TOOL::getConnectedItems(), CONNECTIVITY_DATA::GetConnectedPadsAndVias(), FOOTPRINT::GetCoverageArea(), CONNECTION_GRAPH::getDefaultConnection(), SCH_FIELD::GetDefaultLayer(), SCH_FIELD::GetDrawRotation(), CONNECTION_SUBGRAPH::GetDriverPriority(), getFieldFunc(), PCB_TRACK::GetFriendlyName(), getHoleShape(), getInferredSymbols(), PCB_TRACK::GetItemDescription(), EE_GRID_HELPER::GetItemGrid(), PCB_GRID_HELPER::GetItemGrid(), PL_EDITOR_FRAME::GetLayoutFromRedoList(), PL_EDITOR_FRAME::GetLayoutFromUndoList(), SCH_FIELD::GetMenuImage(), getMinDist(), SCH_LABEL_BASE::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_TRACK::GetMsgPanelInfo(), SCH_FIELD::GetName(), PCB_FIELD::GetName(), SCH_SCREEN::GetNeededJunctions(), CONNECTION_SUBGRAPH::GetNetclassesForDriver(), CONNECTIVITY_DATA::GetNetItems(), GetNetNavigatorItemText(), BOARD_ITEM::GetParentFootprint(), SCH_ITEM::GetParentSymbol(), SCH_SYMBOL::GetPinPhysicalPosition(), SCH_FIELD::GetPosition(), KIGFX::SCH_PAINTER::getRenderColor(), SCH_RULE_AREA::GetResolvedNetclasses(), TEXT_SEARCH_HANDLER::getResultCell(), LABEL_SEARCH_HANDLER::getResultCell(), ALIGN_DISTRIBUTE_TOOL::GetSelections(), SCH_FIELD::GetShownText(), CONVERT_TOOL::getStartEndPoints(), KIGFX::SCH_PAINTER::getTextThickness(), EDA_ITEM::GetTypeDesc(), PCBEXPR_TYPE_REF::GetValue(), TEARDROP_MANAGER::GetWidth(), PCB_SELECTION_TOOL::grabUnconnected(), EE_SELECTION_TOOL::GuessSelectionCandidates(), PCB_SELECTION_TOOL::GuessSelectionCandidates(), hash_fp_item(), EE_SELECTION_TOOL::highlight(), BOARD_INSPECTION_TOOL::HighlightItem(), BOARD_INSPECTION_TOOL::highlightNet(), highlightNet(), SCH_FIELD::HitTest(), SCH_LABEL_BASE::HitTest(), PCB_SELECTION_TOOL::hitTestDistance(), DIALOG_FIELD_PROPERTIES::init(), SCH_EDIT_TOOL::Init(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), DRC_RTREE::Insert(), EE_RTREE::insert(), EE_COLLECTOR::Inspect(), GENERAL_COLLECTOR::Inspect(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectConstraints(), BOARD_INSPECTION_TOOL::InspectDRCError(), ARRAY_CREATOR::Invoke(), isBlindBuriedViaFunc(), CONNECTIVITY_DATA::IsConnectedOnLayer(), isCopper(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus(), PCB_SELECTION_TOOL::isExpandableGraphicShape(), PNS_KICAD_IFACE_BASE::IsFlashedOnLayer(), CADSTAR_PCB_ARCHIVE_LOADER::isFootprint(), PNS_PCBNEW_RULE_RESOLVER::IsKeepout(), isKeepoutZone(), SCH_FIELD::IsMandatory(), isMaskAperture(), isMicroVia(), PNS_PCBNEW_RULE_RESOLVER::IsNonPlatedSlot(), isNPTHPad(), PCB_TRACK::IsNull(), isNullAperture(), SCH_LINE::IsParallel(), isPlatedFunc(), SCH_FIELD::IsReplaceable(), TEARDROP_MANAGER::IsRound(), PNS::ROUTER::isStartingPointRoutable(), SCH_ITEM::IsType(), itemIsIncludedByFilter(), PCB_SELECTION_TOOL::itemPassesFilter(), EE_SELECTION_TOOL::itemPassesFilter(), SCH_EDIT_TOOL::JustifyText(), CLIPBOARD_IO::LoadBoard(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), CADSTAR_SCH_ARCHIVE_LOADER::loadHierarchicalSheetPins(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), EE_SELECTION_TOOL::Main(), EDIT_POINTS_FACTORY::Make(), PCB_POINT_EDITOR::makePoints(), CONVERT_TOOL::makePolysFromChainedSegs(), SCH_SCREEN::MarkConnections(), CONNECTIVITY_DATA::MarkItemNetAsDirty(), CN_CONNECTIVITY_ALGO::markItemNetAsDirty(), SCH_FIELD::Matches(), memberOfGroupFunc(), SCH_LINE::MergeOverlap(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SCH_MOVE_TOOL::moveItem(), EE_SELECTION_TOOL::narrowSelection(), DIALOG_DRC::OnDRCItemSelected(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), PCB_EDIT_FRAME::OnEditItemRequest(), DIALOG_GENERATORS::OnItemSelected(), EDA_3D_CANVAS::OnMouseMove(), SCH_EDIT_FRAME::onNetNavigatorSelection(), DIALOG_GENERATORS::OnRebuildTypeClick(), PCB_POINT_EDITOR::OnSelectionChange(), DIALOG_TEXT_PROPERTIES::OnSetFocusText(), CN_VISITOR::operator()(), BOARD_ITEM::ptr_cmp::operator()(), BOARD::cmp_items::operator()(), BOARD::cmp_drawings::operator()(), PCB_SHAPE::cmp_drawings::operator()(), FOOTPRINT::cmp_drawings::operator()(), KI_TEST::kitest_cmp_drawings::operator()(), PCB_TRACK::cmp_tracks::operator()(), SCH_ITEM::operator<(), SCH_BUS_ENTRY_BASE::operator<(), SCH_FIELD::operator<(), SCH_JUNCTION::operator<(), SCH_LINE::operator<(), SCH_SHEET::operator<(), SCH_SYMBOL::operator<(), SCH_TABLE::operator<(), SCH_TEXT::operator<(), SCH_TEXTBOX::operator<(), PCB_REFERENCE_IMAGE::operator=(), SCH_BITMAP::operator=(), SCH_SHEET::operator=(), SCH_SYMBOL::operator=(), PAD::operator==(), PCB_DIMENSION_BASE::operator==(), PCB_GROUP::operator==(), PCB_REFERENCE_IMAGE::operator==(), PCB_SHAPE::operator==(), PCB_TABLE::operator==(), PCB_TABLECELL::operator==(), PCB_TARGET::operator==(), PCB_TEXT::operator==(), PCB_TEXTBOX::operator==(), PCB_ARC::operator==(), operator==(), FOOTPRINT::operator==(), PCB_FIELD::operator==(), PCB_TRACK::operator==(), PCB_VIA::operator==(), ZONE::operator==(), SCH_BUS_ENTRY_BASE::operator==(), SCH_FIELD::operator==(), SCH_TEXT::operator==(), SCH_ITEM::operator==(), SCH_BITMAP::operator==(), SCH_JUNCTION::operator==(), SCH_LINE::operator==(), SCH_NO_CONNECT::operator==(), SCH_SHAPE::operator==(), SCH_SHEET::operator==(), SCH_SHEET_PIN::operator==(), SCH_SYMBOL::operator==(), SCH_TABLE::operator==(), SCH_TABLECELL::operator==(), SCH_TEXTBOX::operator==(), PAD::PAD(), SCH_COMMIT::parentObject(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_SHAPE(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_IO_KICAD_SEXPR_PARSER::parseSchField(), PCB_CONTROL::Paste(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), BRDITEMS_PLOTTER::PlotBoardGraphicItem(), SCH_FIELD::Print(), DIALOG_GLOBAL_EDIT_TEARDROPS::processItem(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem(), BACK_ANNOTATE::processNetNameChange(), CONNECTION_GRAPH::processSubGraphs(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), PCB_SELECTION_TOOL::pruneObscuredSelectionCandidates(), BOARD_COMMIT::Push(), SCH_COMMIT::pushSchEdit(), SCH_EDIT_FRAME::PutDataInPreviousState(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), PCB_GRID_HELPER::queryVisible(), BOARD_REANNOTATE_TOOL::ReannotateDuplicates(), PCB_SELECTION_TOOL::RebuildSelection(), SCH_CONNECTION::recacheName(), SCH_EDIT_FRAME::RecalculateConnections(), SCH_BASE_FRAME::RefreshZoomDependentItems(), GENERATOR_TOOL::RegenerateSelected(), Remove(), CN_CONNECTIVITY_ALGO::Remove(), FOOTPRINT::Remove(), EE_RTREE::remove(), SCH_SCREEN::Remove(), PCB_POINT_EDITOR::removeCorner(), PCB_POINT_EDITOR::removeCornerCondition(), LIB_SYMBOL::RemoveDrawItem(), SCH_BASE_FRAME::RemoveFromScreen(), CONNECTION_SUBGRAPH::RemoveItem(), EDIT_TOOL::removeNonRootItems(), SCH_SHEET::RemovePin(), SCH_EDIT_TOOL::RepeatDrawItem(), SCH_FIELD::Replace(), SCH_FIND_REPLACE_TOOL::ReplaceAll(), EE_SELECTION_TOOL::RequestSelection(), KI_TEST::RequireBoardItemWithTypeAndId(), CONNECTION_GRAPH::resolveAllDrivers(), SCHEMATIC::ResolveCrossReference(), CONNECTION_SUBGRAPH::ResolveDrivers(), PCB_IO_KICAD_SEXPR_PARSER::resolveGroups(), SCH_LABEL_BASE::ResolveTextVar(), ResolveTextVar(), DS_PROXY_UNDO_ITEM::Restore(), SCH_COMMIT::Revert(), PL_EDITOR_FRAME::RollbackFromUndo(), SCH_EDIT_TOOL::Rotate(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), EE_TOOL_BASE< T >::saveCopyInUndoList(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveField(), SCH_IO_KICAD_LEGACY_LIB_CACHE::savePin(), SCH_IO_KICAD_SEXPR_LIB_CACHE::savePin(), CLIPBOARD_IO::SaveSelection(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveSymbolDrawItem(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveText(), SCH_IO_KICAD_SEXPR::saveText(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveText(), SCH_IO_KICAD_SEXPR::saveTextBox(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveTextBox(), SCH_ITEM::Schematic(), SCH_SCREEN::Schematic(), SYMBOL_SEARCH_HANDLER::Search(), POWER_SEARCH_HANDLER::Search(), TEXT_SEARCH_HANDLER::Search(), PCB_SELECTION_TOOL::select(), PCB_SELECTION_TOOL::Selectable(), EE_SELECTION_TOOL::Selectable(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectSameSheet(), PCB_SELECTION_TOOL::selectUnconnected(), PCB_EDIT_FRAME::SetActiveLayer(), PCB_POINT_EDITOR::setAltConstraint(), SCH_FIELD::SetId(), ITEM_PICKER::SetItem(), PCB_BASE_FRAME::SetPlotSettings(), SCH_FIELD::SetPosition(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), PCB_EDIT_FRAME::ShowFindDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), BOARD_INSPECTION_TOOL::ShowFootprintLinks(), PCB_REFERENCE_IMAGE::Similarity(), PCB_SHAPE::Similarity(), PCB_TABLECELL::Similarity(), PCB_TARGET::Similarity(), PCB_TEXT::Similarity(), PCB_TEXTBOX::Similarity(), FOOTPRINT::Similarity(), PAD::Similarity(), PCB_DIMENSION_BASE::Similarity(), PCB_FIELD::Similarity(), PCB_GROUP::Similarity(), PCB_TABLE::Similarity(), PCB_TRACK::Similarity(), PCB_ARC::Similarity(), PCB_VIA::Similarity(), ZONE::Similarity(), SCH_BUS_ENTRY_BASE::Similarity(), SCH_FIELD::Similarity(), SCH_TEXT::Similarity(), SCH_BITMAP::Similarity(), SCH_JUNCTION::Similarity(), SCH_LINE::Similarity(), SCH_NO_CONNECT::Similarity(), SCH_PIN::Similarity(), SCH_SHAPE::Similarity(), SCH_SHEET::Similarity(), SCH_SHEET_PIN::Similarity(), SCH_SYMBOL::Similarity(), SCH_TABLE::Similarity(), SCH_TABLECELL::Similarity(), SCH_TEXTBOX::Similarity(), LIB_SYMBOL::Similarity(), SCH_EDITOR_CONTROL::SimProbe(), SCH_COMMIT::Stage(), PNS::LINE_PLACER::Start(), SCH_EDIT_TOOL::Swap(), EDIT_TOOL::Swap(), FOOTPRINT::swapData(), PCB_TUNING_PATTERN::swapData(), PAD::swapData(), PCB_DIM_ALIGNED::swapData(), PCB_DIM_ORTHOGONAL::swapData(), PCB_DIM_RADIAL::swapData(), PCB_DIM_LEADER::swapData(), PCB_DIM_CENTER::swapData(), PCB_FIELD::swapData(), PCB_GROUP::swapData(), PCB_TABLE::swapData(), PCB_TABLECELL::swapData(), PCB_TARGET::swapData(), PCB_TEXT::swapData(), PCB_TEXTBOX::swapData(), PCB_TRACK::swapData(), PCB_ARC::swapData(), PCB_VIA::swapData(), ZONE::swapData(), PCB_REFERENCE_IMAGE::swapData(), SCH_BITMAP::SwapData(), SCH_FIELD::SwapData(), SCH_JUNCTION::SwapData(), SCH_NO_CONNECT::SwapData(), SCH_SHEET::SwapData(), SCH_SHEET_PIN::SwapData(), SCH_SYMBOL::SwapData(), SCH_TABLE::SwapData(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::testAgainstEdge(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testGraphicClearances(), DRC_TEST_PROVIDER_HOLE_TO_HOLE::testHoleAgainstHole(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem(), DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones(), DRC_TEST_PROVIDER_SOLDER_MASK::testMaskItemAgainstZones(), ERC_TESTER::TestMissingNetclasses(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testSingleLayerItemAgainstItem(), ERC_TESTER::TestTextVars(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances(), CONNECTIVITY_DATA::TestTrackEndpointDangling(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), PANEL_SETUP_LAYERS::TransferDataFromWindow(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_SYMBOL_FIELDS_TABLE::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), PCB_TRACK::TransformShapeToPolygon(), SCH_LINE_WIRE_BUS_TOOL::TrimOverLappingWires(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), EE_SELECTION_TOOL::unhighlight(), SCH_SHEET_PATH::UpdateAllScreenReferences(), DIALOG_FIELD_PROPERTIES::UpdateField(), PL_POINT_EDITOR::updateItem(), PCB_POINT_EDITOR::updateItem(), EE_TOOL_BASE< T >::updateItem(), SCH_BASE_FRAME::UpdateItem(), PCB_CONTROL::UpdateMessagePanel(), EDIT_TOOL::updateModificationPoint(), EE_POINT_EDITOR::updateParentItem(), EE_POINT_EDITOR::updatePoints(), PL_POINT_EDITOR::updatePoints(), PCB_POINT_EDITOR::updatePoints(), SCH_BUS_ENTRY_BASE::ViewGetLayers(), SYMBOL::ViewGetLayers(), PCB_GROUP::Visit(), SCH_SHEET::Visit(), GERBER_DRAW_ITEM::Visit(), PCB_TRACK::Visit(), DIALOG_GLOBAL_EDIT_TEARDROPS::visitItem(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::visitItem(), and DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem().

◆ UpdateFontFiles()

const std::vector< wxString > * EMBEDDED_FILES::UpdateFontFiles ( )
inherited

Helper function to get a list of fonts for fontconfig to add to the library.

This is neccesary because EMBEDDED_FILES lives in common at the moment and fontconfig is in libkicommon. This will create the cache files in the KiCad cache directory (if they do not already exist) and return the temp files names

Definition at line 500 of file embedded_files.cpp.

References EMBEDDED_FILES::EMBEDDED_FILE::FONT, EMBEDDED_FILES::GetTemporaryFileName(), EMBEDDED_FILES::m_files, EMBEDDED_FILES::m_fontFiles, and name.

Referenced by FIELDS_GRID_TABLE::initGrid(), PCB_IO_KICAD_SEXPR_PARSER::Parse(), SCH_IO_KICAD_SEXPR_PARSER::ParseSchematic(), SCH_IO_KICAD_SEXPR_PARSER::ParseSymbol(), and SCH_PROPERTIES_PANEL::updateFontList().

◆ UpdateRatsnestExclusions()

◆ UpdateUserUnits()

void BOARD::UpdateUserUnits ( BOARD_ITEM aItem,
KIGFX::VIEW aView 
)

Update any references within aItem (or its descendants) to the user units.

Primarily for automatic-unit dimensions.

Definition at line 1314 of file board.cpp.

References PCB_DIMENSION_BASE::GetUnitsMode(), PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, KIGFX::VIEW::Update(), PCB_DIMENSION_BASE::UpdateUnits(), and EDA_ITEM::Visit().

Referenced by PCB_BASE_FRAME::AddFootprintToBoard(), LoadBoard(), and BOARD_EDITOR_CONTROL::PlaceFootprint().

◆ ViewBBox()

◆ ViewDraw()

virtual void KIGFX::VIEW_ITEM::ViewDraw ( int  aLayer,
VIEW aView 
) const
inlinevirtualinherited

Draw the parts of the object belonging to layer aLayer.

An alternative way for drawing objects if there is no #PAINTER assigned for the view or if the PAINTER doesn't know how to paint this particular implementation of VIEW_ITEM. The preferred way of drawing is to design an appropriate PAINTER object, the method below is intended only for quick hacks and debugging purposes.

Parameters
aLayeris the current drawing layer.
aViewis a pointer to the VIEW device we are drawing on.

Reimplemented in DS_PROXY_VIEW_ITEM, KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM, EDIT_POINTS, TUNING_STATUS_VIEW_ITEM, RATSNEST_VIEW_ITEM, ROUTER_PREVIEW_ITEM, ROUTER_STATUS_VIEW_ITEM, MY_DRAWING, KIGFX::PREVIEW::ARC_ASSISTANT, KIGFX::PREVIEW::RULER_ITEM, KIGFX::PREVIEW::SELECTION_AREA, KIGFX::PREVIEW::TWO_POINT_ASSISTANT, PCB_TUNING_PATTERN, KIGFX::ORIGIN_VIEWITEM, KIGFX::VIEW_GROUP, and KIGFX::VIEW_OVERLAY.

Definition at line 115 of file view_item.h.

Referenced by KIGFX::VIEW::draw(), and KIGFX::VIEW::updateItemGeometry().

◆ ViewGetLayers()

void BOARD_ITEM::ViewGetLayers ( int  aLayers[],
int &  aCount 
) const
overridevirtualinherited

Return the all the layers within the VIEW the object is painted on.

For instance, a PAD spans zero or more copper layers and a few technical layers. ViewDraw() or PAINTER::Draw() is repeatedly called for each of the layers returned by ViewGetLayers(), depending on the rendering order.

Parameters
aLayers[]is the output layer index array.
aCountis the number of layer indices in aLayers[].

Reimplemented from EDA_ITEM.

Reimplemented in FOOTPRINT, PCB_TUNING_PATTERN, PAD, PCB_GROUP, PCB_MARKER, PCB_REFERENCE_IMAGE, PCB_SHAPE, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, PCB_VIA, and ZONE.

Definition at line 166 of file board_item.cpp.

References BOARD_ITEM::IsLocked(), LAYER_LOCKED_ITEM_SHADOW, and BOARD_ITEM::m_layer.

◆ ViewGetLOD()

virtual double KIGFX::VIEW_ITEM::ViewGetLOD ( int  aLayer,
VIEW aView 
) const
inlinevirtualinherited

Return the level of detail (LOD) of the item.

A level of detail is the minimal VIEW scale that is sufficient for an item to be shown on a given layer.

Parameters
aLayeris the current drawing layer.
aViewis a pointer to the VIEW device we are drawing on.
Returns
the level of detail. 0 always show the item, because the actual zoom level (or VIEW scale) is always > 0

Reimplemented in SCH_LINE, GERBER_DRAW_ITEM, FOOTPRINT, PAD, PCB_FIELD, PCB_GROUP, PCB_REFERENCE_IMAGE, PCB_SHAPE, PCB_TEXT, PCB_TEXTBOX, PCB_TRACK, PCB_VIA, and ZONE.

Definition at line 141 of file view_item.h.

Referenced by PNS_KICAD_IFACE::IsItemVisible(), KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()(), EE_GRID_HELPER::queryVisible(), and PCB_GRID_HELPER::queryVisible().

◆ viewPrivData()

◆ Visit()

INSPECT_RESULT BOARD::Visit ( INSPECTOR  inspector,
void *  testData,
const std::vector< KICAD_T > &  scanTypes 
)
overridevirtual

May be re-implemented for each derived class in order to handle all the types given by its member data.

Implementations should call inspector->Inspect() on types in scanTypes[], and may use IterateForward() to do so on lists of such data.

Parameters
inspectorAn INSPECTOR instance to use in the inspection.
testDataArbitrary data used by the inspector.
scanTypesWhich KICAD_T types are of interest and the order to process them in.
Returns
SEARCH_QUIT if the Iterator is to stop the scan, else SCAN_CONTINUE, and determined by the inspector.

Reimplemented from EDA