KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EASYPC_PCB Namespace Reference

Classes

struct  ARC_FORM
 A span as KiCad can hold it: a true arc, or a polyline that is the two ends of a straight span or points on an arc whose centre lies beyond KiCad's range. More...
 
struct  FRAME
 Native to KiCad coordinates: scale by 100 nm, flip Y and move the native origin to the KiCad offset. More...
 
class  LAYER_MAPPER
 Layer mapping for one layer table, copper in stack order and other layers by their type. More...
 

Functions

wxString BuildBoard (const EASYPC::DESIGN_DOCUMENT &aDocument, BOARD &aBoard, REPORTER *aReporter, const LAYER_MAPPING_HANDLER &aLayerMapping=nullptr)
 Fill aBoard from a loaded Easy-PC / DesignSpark PCB design.
 
ARC_FORM ArcForm (const POINT32 &aStart, const POINT32 &aEnd, int32_t aArcAngle, bool aAnticlockwise, const FRAME &aFrame)
 
SHAPE_POLY_SET ShapeToPolySet (const EASYPC::SOURCE_DESIGN_SHAPE &aShape, const FRAME &aFrame)
 A closed shape and its cutouts as an outline with holes.
 
SHAPE_POLY_SET ShapeItemArea (const EASYPC::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 ends.
 
std::vector< PCB_SHAPE * > AddShapeItem (BOARD_ITEM_CONTAINER &aContainer, const EASYPC::SOURCE_SHAPE_ITEM &aItem, const FRAME &aFrame, const LAYER_MAPPER &aLayers, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
 Add a shape item as one filled polygon, a circle, or one shape per span; aLayer overrides the item's layer.
 
std::unique_ptr< PAD > CreatePad (FOOTPRINT *aParent, const EASYPC::SOURCE_FREE_PAD &aPad, const EASYPC::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 aParent.
 
bool ApplyTextPosition (PCB_TEXT &aText, const EASYPC::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.
 
PCB_TEXT * AddText (BOARD_ITEM_CONTAINER &aContainer, const SOURCE_TEXT_POSITION &aPosition, const wxString &aText, const FRAME &aFrame, const LAYER_MAPPER &aLayers)
 
std::unique_ptr< FOOTPRINT > ConvertFootprint (const EASYPC::SOURCE_SYMBOL &aSymbol, const LAYER_MAPPER &aLayers, const LIB_ID &aId, const EASYPC::SOURCE_PCB_COMPONENT *aComponent=nullptr, std::map< const EASYPC::SOURCE_FREE_PAD *, PAD * > *aPadMap=nullptr)
 A footprint in symbol coordinates.
 

Function Documentation

◆ AddShapeItem()

◆ AddText()

PCB_TEXT * EASYPC_PCB::AddText ( BOARD_ITEM_CONTAINER & aContainer,
const SOURCE_TEXT_POSITION & aPosition,
const wxString & aText,
const FRAME & aFrame,
const LAYER_MAPPER & aLayers )

Definition at line 1002 of file easypc_pcb_items.cpp.

References BOARD_ITEM_CONTAINER::Add(), ApplyTextPosition(), and text.

Referenced by ConvertFootprint().

◆ ApplyTextPosition()

bool EASYPC_PCB::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.

Definition at line 863 of file easypc_pcb_items.cpp.

References EASYPC::SOURCE_TEXT_POSITION::Alignment, EASYPC_PCB::FRAME::Angle(), BOX2< Vec >::Centre(), KIFONT::METRICS::Default(), EASYPC::TEXT_METRICS::Encode(), KIFONT::FONT::GetFont(), EDA_TEXT::GetHorizJustify(), EDA_TEXT::GetInterline(), BOX2< Vec >::GetLeft(), BOX2< Vec >::GetRight(), EDA_TEXT::GetText(), PCB_TEXT::GetTextSize(), PCB_TEXT::GetTextThickness(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_TOP, EASYPC::SOURCE_TEXT_STYLE::Height, EASYPC::SOURCE_TEXT_STYLE::InterlineHeightPercent, KiROUND(), EASYPC::SOURCE_TEXT_POSITION::Layer, EASYPC::SOURCE_TEXT_STYLE::LineWidth, EASYPC_PCB::LAYER_MAPPER::Map(), EASYPC::SOURCE_TEXT_POSITION::Mirrored, EASYPC::NormalizeAngle(), EASYPC::SOURCE_TEXT_POSITION::Position, RotatePoint(), EASYPC::SOURCE_TEXT_POSITION::Rotation, EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetKeepUpright(), BOARD_ITEM::SetLayer(), EDA_TEXT::SetLineSpacing(), EDA_TEXT::SetMirrored(), PCB_TEXT::SetPosition(), EDA_TEXT::SetText(), PCB_TEXT::SetTextAngle(), EDA_TEXT::SetTextPos(), PCB_TEXT::SetTextSize(), PCB_TEXT::SetTextThickness(), EDA_TEXT::SetVertJustify(), KIFONT::FONT::StringBoundaryLimits(), text, EASYPC::TEXT_ALIGN_CENTRE, EASYPC::TEXT_ALIGN_RIGHT, EASYPC::SOURCE_TEXT_POSITION::TextStyle, EASYPC_PCB::FRAME::ToKiCad(), EASYPC::ToKiCadMarkup(), UNDEFINED_LAYER, and VECTOR2< T >::x.

Referenced by AddText().

◆ ArcForm()

ARC_FORM EASYPC_PCB::ArcForm ( const POINT32 & aStart,
const POINT32 & aEnd,
int32_t aArcAngle,
bool aAnticlockwise,
const FRAME & aFrame )

◆ BuildBoard()

wxString EASYPC_PCB::BuildBoard ( const EASYPC::DESIGN_DOCUMENT & aDocument,
BOARD & aBoard,
REPORTER * aReporter,
const LAYER_MAPPING_HANDLER & aLayerMapping = nullptr )

Fill aBoard from a loaded Easy-PC / DesignSpark PCB design.

aLayerMapping, when set, overrides the default layer mapping.

Returns
custom rules for the spacings that net classes and board minimums cannot carry

Definition at line 1197 of file easypc_pcb_builder.cpp.

Referenced by PCB_IO_EASYPC::loadBoard().

◆ ConvertFootprint()

std::unique_ptr< FOOTPRINT > EASYPC_PCB::ConvertFootprint ( const EASYPC::SOURCE_SYMBOL & aSymbol,
const LAYER_MAPPER & aLayers,
const LIB_ID & aId,
const EASYPC::SOURCE_PCB_COMPONENT * aComponent = nullptr,
std::map< const EASYPC::SOURCE_FREE_PAD *, PAD * > * aPadMap = nullptr )

◆ CreatePad()

◆ ShapeItemArea()

◆ ShapeToPolySet()

SHAPE_POLY_SET EASYPC_PCB::ShapeToPolySet ( const SOURCE_DESIGN_SHAPE & aShape,
const FRAME & aFrame )

A closed shape and its cutouts as an outline with holes.

Definition at line 685 of file easypc_pcb_items.cpp.

References SHAPE_POLY_SET::AddHole(), SHAPE_POLY_SET::AddOutline(), and EASYPC::SOURCE_DESIGN_SHAPE::Cutouts.

Referenced by AddShapeItem(), and ShapeItemArea().