28#ifndef EASYPC_PCB_ITEMS_H_
29#define EASYPC_PCB_ITEMS_H_
78 int Length( int64_t aLength )
const;
88 explicit LAYER_MAPPER(
const std::vector<const EASYPC::SOURCE_LAYER*>& aLayers );
90 std::vector<INPUT_LAYER_DESC>
Describe()
const;
109 std::map<const EASYPC::SOURCE_LAYER*, PCB_LAYER_ID>
m_map;
129 const FRAME& aFrame );
139 const FRAME& aFrame,
const LAYER_MAPPER& aLayers,
145 const LAYER_MAPPER& aLayers );
149 const LAYER_MAPPER& aLayers );
152 const wxString& aText,
const FRAME& aFrame,
const LAYER_MAPPER& aLayers );
161 std::map<const EASYPC::SOURCE_FREE_PAD*, PAD*>* aPadMap =
nullptr );
Abstract interface for BOARD_ITEMs capable of storing other items inside.
LSET PadLayers(const EASYPC::OBJECT *aLayer, bool aComponentPad) const
The copper aLayer (a layer or a set) covers, with the mask and paste layers whose type plots such pad...
std::map< const EASYPC::SOURCE_LAYER *, PCB_LAYER_ID > m_map
int32_t GrowByLayer(const EASYPC::SOURCE_LAYER *aLayer, int32_t aSize) const
aSize grown on each side by aLayer's type oversize, fixed or a percentage of the size
std::vector< INPUT_LAYER_DESC > Describe() const
std::vector< const EASYPC::SOURCE_LAYER * > m_layers
PCB_LAYER_ID Map(const EASYPC::OBJECT *aLayer) const
UNDEFINED_LAYER when the native layer has no KiCad layer.
const EASYPC::SOURCE_LAYER * Native(PCB_LAYER_ID aLayer) const
void ApplyUserMapping(const std::map< wxString, PCB_LAYER_ID > &aMapping)
LAYER_MAPPER(const std::vector< const EASYPC::SOURCE_LAYER * > &aLayers)
A logical library item identifier and consists of various portions much like a URI.
LSET is a set of PCB_LAYER_IDs.
Represent a set of closed polygons.
Shapes, vertices and the free-standing drawn items.
Free pads, apart because they derive from a connectivity class.
Design items, attributes, styles, layers, net classes and spacings.
Design units of 100 nm and angles of thousandths of a degree, anticlockwise from +X with Y up.
PCB_LAYER_ID
A quick note on layer IDs:
bool ApplyTextPosition(PCB_TEXT &aText, const SOURCE_TEXT_POSITION &aPosition, const FRAME &aFrame, const LAYER_MAPPER &aLayers)
Place and size a text from its stored position and style; false when its layer has no KiCad layer.
std::unique_ptr< FOOTPRINT > ConvertFootprint(const SOURCE_SYMBOL &aSymbol, const LAYER_MAPPER &aLayers, const LIB_ID &aId, const SOURCE_PCB_COMPONENT *aComponent, std::map< const SOURCE_FREE_PAD *, PAD * > *aPadMap)
A footprint in symbol coordinates.
SHAPE_POLY_SET ShapeToPolySet(const SOURCE_DESIGN_SHAPE &aShape, const FRAME &aFrame)
A closed shape and its cutouts as an outline with holes.
std::unique_ptr< PAD > CreatePad(FOOTPRINT *aParent, const SOURCE_FREE_PAD &aPad, const SOURCE_PAD_STYLE &aStyle, const FRAME &aFrame, const LAYER_MAPPER &aLayers)
A pad with its style's per-layer exceptions; a mask or paste exception becomes a separate opening on ...
PCB_TEXT * AddText(BOARD_ITEM_CONTAINER &aContainer, const SOURCE_TEXT_POSITION &aPosition, const wxString &aText, const FRAME &aFrame, const LAYER_MAPPER &aLayers)
ARC_FORM ArcForm(const POINT32 &aStart, const POINT32 &aEnd, int32_t aArcAngle, bool aAnticlockwise, const FRAME &aFrame)
std::vector< PCB_SHAPE * > AddShapeItem(BOARD_ITEM_CONTAINER &aContainer, const SOURCE_SHAPE_ITEM &aItem, const FRAME &aFrame, const LAYER_MAPPER &aLayers, PCB_LAYER_ID aLayer)
Add a shape item as one filled polygon, a circle, or one shape per span; aLayer overrides the item's ...
SHAPE_POLY_SET ShapeItemArea(const SOURCE_SHAPE_ITEM &aItem, const FRAME &aFrame, int aMaxError)
The copper a shape item plots: its filled region and every span stroked at the line width with round ...
Root of every deserialized object.
A point read as two int32 values.
A pad of a symbol definition.
The package half of a component.
Footprints and schematic symbols alike.
Native to KiCad coordinates: scale by 100 nm, flip Y and move the native origin to the KiCad offset.
static EDA_ANGLE Angle(int32_t aMilliDegrees)
VECTOR2I ToKiCad(int32_t aX, int32_t aY) const
int Length(int64_t aLength) const
VECTOR2I ToKiCad(const EASYPC::POINT32 &aPoint) const
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D