47 if(
via->FlashLayer( layer ) )
54 m_items[layer][track->GetNetCode()].push_back( track );
61 m_items[layer][zone->GetNetCode()].push_back( zone );
69 netCode = connected->GetNetCode();
72 m_items[layer][netCode].push_back( item );
77 for(
PCB_FIELD* field : footprint->GetFields() )
78 m_items[field->GetLayer()][0].push_back( field );
80 for(
BOARD_ITEM* item : footprint->GraphicalItems() )
83 m_items[layer][0].push_back( item );
86 for(
PAD*
pad : footprint->Pads() )
90 if(
pad->FlashLayer( layer ) )
96 for(
auto& [layer, nets] :
m_items )
98 for(
auto& [netCode, items] : nets )
99 std::stable_sort( items.begin(), items.end(),
FabItemLess );
107 auto it =
m_items.find( aLayer );
133 int thickness = aShape.
GetWidth() + 2 * expansion;
134 aResult.
SetWidth( std::max( thickness, 0 ) );
139 int excess = -thickness;
174 auto visible = [aLayer](
const BOARD_ITEM* aItem )
177 return aItem->IsOnLayer( aLayer ) && ( !
text ||
text->IsVisible() );
182 if( visible( item ) )
188 if( visible( zone ) )
194 for(
const BOARD_ITEM* item : footprint->GraphicalItems() )
196 if( visible( item ) )
200 for(
const PCB_FIELD* field : footprint->GetFields() )
202 if( visible( field ) )
206 for(
const ZONE* zone : footprint->Zones() )
208 if( visible( zone ) )
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
const ZONES & Zones() const
bool IsLayerEnabled(PCB_LAYER_ID aLayer) const
A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer...
const FOOTPRINTS & Footprints() const
const TRACKS & Tracks() const
const LSET & GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
const DRAWINGS & Drawings() const
int GetRectangleWidth() const
SHAPE_POLY_SET & GetPolyShape()
void SetRectangleHeight(const int &aHeight)
void SetRectangleWidth(const int &aWidth)
int GetRectangleHeight() const
int GetCornerRadius() const
bool IsPolyShapeValid() const
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
FAB_LAYER_INDEX(BOARD &aBoard)
const NET_ITEMS & Items(PCB_LAYER_ID aLayer) const
std::map< PCB_LAYER_ID, NET_ITEMS > m_items
std::map< int, std::vector< BOARD_ITEM * > > NET_ITEMS
LSET is a set of PCB_LAYER_IDs.
void SetCornerRadius(int aCornerRadius) override
void SetWidth(int aWidth) override
int GetWidth() const override
bool HasSolderMask() const
int GetSolderMaskExpansion() const
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
int GetSolderMaskExpansion() const
virtual int GetWidth() const
Represent a set of closed polygons.
void Deflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError)
void Fracture(bool aSimplify=true)
Convert a set of polygons with holes to a single outline with "slits"/"fractures" connecting the oute...
Handle a list of polygons defining a copper zone.
@ ROUND_ALL_CORNERS
All angles are rounded.
static bool empty(const wxTextEntryBase *aCtrl)
@ RECTANGLE
Use RECTANGLE instead of RECT to avoid collision in a Windows header.
bool FabItemLess(const BOARD_ITEM *aFirst, const BOARD_ITEM *aSecond)
Order by footprint UUID so feature output is independent of allocation order.
int FabTrackWidth(const PCB_TRACK &aTrack, PCB_LAYER_ID aLayer)
Use only for traces and arcs; vias require a layer-specific width.
bool FabMaskShape(const PCB_SHAPE &aShape, PCB_LAYER_ID aLayer, PCB_SHAPE &aResult)
Build an expanded mask copy of an exposed copper shape when needed.
bool FabLayerHasVisibleItems(const BOARD &aBoard, PCB_LAYER_ID aLayer)
True if the board draws visible text, graphics or zones on aLayer.
bool IsSolderMaskLayer(int aLayer)
bool IsExternalCopperLayer(int aLayerId)
Test whether a layer is an external (F_Cu or B_Cu) copper layer.
PCB_LAYER_ID
A quick note on layer IDs:
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)