20#ifndef TARGET3001_PCB_BUILDER_H
21#define TARGET3001_PCB_BUILDER_H
79 void buildAreaSpokes(
const std::vector<const TARGET3001::ELEMENT*>& aSpokes );
109 std::optional<PCB_LAYER_ID>
mapLayer(
int aLayer )
const;
160 std::map<uint16_t, NETINFO_ITEM*>
m_nets;
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
Abstract interface for BOARD_ITEMs capable of storing other items inside.
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.
Handle the data for a net.
A pure virtual class used to derive REPORTER objects from.
Represent a set of closed polygons.
TARGET3001::LAYER_FUNCTION LayerFunction(int aLayer) const
Function of a TARGET 3001! board layer in this project.
const TARGET3001::PROJECT & m_project
std::map< uint16_t, NETINFO_ITEM * > m_nets
by signal ID
std::vector< POUR_AREA > m_pourAreas
void addShape(const TARGET3001::ELEMENT &aElem, BOARD_ITEM_CONTAINER *aParent, FOOTPRINT *aFootprint, bool aIsTrack, PCB_LAYER_ID aLayer)
Add the graphic or track form of aElem on one KiCad layer.
void addVia(const TARGET3001::ELEMENT &aElem)
std::map< int, SHAPE_POLY_SET > m_pourKeepouts
KiCad layer -> pour keepout.
void addFootprint(const TARGET3001::ELEMENT &aComponent)
std::vector< int > m_copperStack
TARGET layers, top to bottom.
void addItem(const TARGET3001::ELEMENT &aElem, BOARD_ITEM_CONTAINER *aParent, FOOTPRINT *aFootprint, bool aIsTrack)
Add one board element to aParent; footprint items are passed with their footprint.
void buildAreaSpokes(const std::vector< const TARGET3001::ELEMENT * > &aSpokes)
Turn the spokes an old style area stores into thermal reliefs on the pads they start in.
std::vector< std::unique_ptr< PCB_SHAPE > > fiducialShapes(const TARGET3001::ELEMENT &aElem, BOARD_ITEM_CONTAINER *aParent) const
Strokes and discs that draw a fiducial mark, not yet assigned a layer.
std::vector< std::pair< ZONE *, int64_t > > m_polygonZones
thermal polygon zones and their POLYGONID
std::optional< PCB_LAYER_ID > pourCopperLayer(int aLayer) const
Copper layer that an area or deletion layer applies to.
void buildAreaClearanceRules()
Clearance rules between copper areas and each signal's tracks and vias.
bool isCopper(int aLayer) const
NETINFO_ITEM * net(uint16_t aSignal) const
void addPad(const TARGET3001::ELEMENT &aElem, FOOTPRINT *aFootprint)
bool elementOutline(const TARGET3001::ELEMENT &aElem, SHAPE_POLY_SET &aOut) const
Outline of a filled element (rectangle, triangle, disc, stroked line or arc) in KiCad coordinates.
void buildAuraRules()
Rules that keep areas the aura distance from pads and vias, except on their NO_AURA layers.
std::set< std::pair< uint16_t, PCB_LAYER_ID > > m_pourLayers
(signal, KiCad layer) holding an area
std::map< int64_t, SHAPE_POLY_SET > m_polygonSpokes
POLYGONID -> stored thermal spokes.
std::map< std::pair< int, int >, SHAPE_POLY_SET > m_copperFills
(net, KiCad layer) -> filled copper
std::map< uint16_t, std::map< int, int > > m_signalClearances
Track and via clearances counted per signal, then per clearance value.
TARGET3001_PCB_BUILDER(BOARD *aBoard, const TARGET3001::PROJECT &aProject, REPORTER *aReporter)
void addPadstackCuts(const BOARD_ITEM &aItem, int aPadstack)
Cut aItem, grown per layer, from the pours of the deletion layers padstack aPadstack lists.
std::optional< PCB_LAYER_ID > polygonLayer(const TARGET3001::POLYGON_POUR &aPoly) const
Copper layer of a signal polygon that can become a zone.
std::optional< LSET > padstackLayers(int aLayer) const
Copper, mask and paste layers of the padstack a pad layer >= 101 selects.
void buildThermalGaps()
Thermal gaps the stored fill leaves around spoked pads, as zone defaults and pad or footprint overrid...
void addText(const TARGET3001::ELEMENT &aElem, BOARD_ITEM_CONTAINER *aParent, FOOTPRINT *aFootprint, PCB_LAYER_ID aLayer)
const wxString & DesignRules() const
Custom rules that carry what KiCad cannot store on the items themselves, empty when none apply.
void tagAura(BOARD_CONNECTED_ITEM &aItem, const TARGET3001::ELEMENT_BASE &aBase, int aAura)
Tag a pad or via with its aura so the aura rules can match it.
void buildPolygonRules()
Rules for the board contour and foreign polygon distances each signal polygon keeps.
std::set< int > m_auraValues
distinct aura distances above zero
std::map< int64_t, SHAPE_POLY_SET > m_polygonFills
POLYGONID -> stored fill without spokes.
TARGET3001::FONTS m_fonts
std::set< int > m_polygonEdgeClearances
void noteContour(const TARGET3001::ELEMENT &aElem)
Record whether a board contour stroke carries a clearance.
void configureText(PCB_TEXT *aText, const TARGET3001::ELEMENT &aElem, PCB_LAYER_ID aLayer)
VECTOR2I toKi(int32_t aX, int32_t aY) const
std::set< PCB_LAYER_ID > m_noAuraLayers
copper layers some NO_AURA list names
std::optional< int > m_contourLayer
first TARGET layer holding the contour
std::optional< PCB_LAYER_ID > mapLayer(int aLayer) const
Copper or graphic layer for a board element, if KiCad has a place for it.
std::map< int, PCB_LAYER_ID > m_layerMap
bool m_contourCarvesNothing
a contour stroke has no clearance
std::set< int > m_polygonAuras
Handle a list of polygons defining a copper zone.
PCB_LAYER_ID
A quick note on layer IDs:
LAYER_FUNCTION
Board layer function codes stored per layer in the project header.
Fields shared by every drawable element.
One element of any class.
Copper polygon of a signal, stored in a "$%&POLY" signal property.
VECTOR2< int32_t > VECTOR2I