|
KiCad PCB EDA Suite
|
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. | |
| std::vector< PCB_SHAPE * > EASYPC_PCB::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 layer.
Definition at line 744 of file easypc_pcb_items.cpp.
References BOARD_ITEM_CONTAINER::Add(), ARC, ArcForm(), CIRCLE, circle(), EASYPC_PCB::ARC_FORM::End, EASYPC::SOURCE_SHAPE_ITEM::Filled, EASYPC_PCB::ARC_FORM::IsArc(), EASYPC::SOURCE_SHAPE::IsClosed(), EASYPC::SOURCE_LAYERED_SHAPE_ITEM::Layer, EASYPC_PCB::LAYER_MAPPER::Map(), EASYPC_PCB::ARC_FORM::Mid, EASYPC_PCB::ARC_FORM::Points, POLY, SEGMENT, PCB_SHAPE::SetEnd(), EDA_SHAPE::SetFilled(), PCB_SHAPE::SetLayer(), PCB_SHAPE::SetPolyShape(), PCB_SHAPE::SetStart(), PCB_SHAPE::SetStroke(), EASYPC::SOURCE_SHAPE_ITEM::Shape, ShapeToPolySet(), SOLID, EASYPC_PCB::ARC_FORM::Start, EASYPC::SOURCE_SHAPE_ITEM::Style, EASYPC_PCB::FRAME::ToKiCad(), UNDEFINED_LAYER, and EASYPC::SOURCE_LINE_STYLE::Width.
Referenced by ConvertFootprint().
| 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().
| 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().
| ARC_FORM EASYPC_PCB::ArcForm | ( | const POINT32 & | aStart, |
| const POINT32 & | aEnd, | ||
| int32_t | aArcAngle, | ||
| bool | aAnticlockwise, | ||
| const FRAME & | aFrame ) |
Definition at line 640 of file easypc_pcb_items.cpp.
References std::abs(), ARC_HIGH_DEF, EASYPC::COORD_LIMIT, M_PI, EASYPC_PCB::FRAME::Offset, EASYPC_PCB::FRAME::Origin, EASYPC_PCB::FRAME::ToKiCad(), EASYPC::POINT32::X, VECTOR2< T >::x, EASYPC::POINT32::Y, and VECTOR2< T >::y.
Referenced by AddShapeItem(), and ShapeItemArea().
| 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.
Definition at line 1197 of file easypc_pcb_builder.cpp.
Referenced by PCB_IO_EASYPC::loadBoard().
| 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 ) |
A footprint in symbol coordinates.
Pads take aComponent's pin numbers when given, else their own numbers. aPadMap receives the PAD each source free pad became.
Definition at line 1016 of file easypc_pcb_items.cpp.
References _, AddShapeItem(), AddText(), APPEND, CreatePad(), EASYPC::SOURCE_SYMBOL::Name, EASYPC::SOURCE_SYMBOL::OriginX, EASYPC::SOURCE_SYMBOL::OriginY, EASYPC::SOURCE_PCB_COMPONENT::Package, pad, EASYPC::SOURCE_SYMBOL::Pads, EASYPC::SOURCE_SYMBOL::Shapes, text, EASYPC::SOURCE_SYMBOL::Texts, THROW_IO_ERROR, EASYPC::TypedItems(), EASYPC::VALUE_COMPONENT_NAME, EASYPC::VALUE_PIN_NUMBER, EASYPC::VALUE_REFERENCE_NAME, EASYPC::VALUE_VALUES, and EASYPC::SOURCE_SYMBOL::ValuePositions.
Referenced by PCB_IO_EASYPC::GetEnumeratedFootprint().
| std::unique_ptr< PAD > EASYPC_PCB::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 aParent.
Definition at line 808 of file easypc_pcb_items.cpp.
References PADSTACK::ALL_LAYERS, LSET::AllCuMask(), EASYPC::SOURCE_CONNECT_POINT::Angle, EASYPC_PCB::FRAME::Angle(), CIRCLE, EASYPC::SOURCE_PAD_STYLE::Dimension3, EASYPC::SOURCE_PAD_STYLE::Drill, EASYPC::SOURCE_PAD_STYLE::DrillLength, EASYPC::SOURCE_PAD_STYLE::DrillShape, EASYPC::SOURCE_PAD_STYLE::Exceptions, EASYPC::SOURCE_FREE_PAD::Layer, EASYPC::SOURCE_PAD_STYLE::Length, NPTH, EASYPC::SOURCE_FREE_PAD::Number, OBLONG, EASYPC::OVAL, pad, EASYPC_PCB::LAYER_MAPPER::PadLayers(), EASYPC::SOURCE_PAD_STYLE::Plated, EASYPC::SOURCE_CONNECT_POINT::Position, PTH, EASYPC::ROUND, EASYPC::SOURCE_PAD_STYLE::Shape, EASYPC::SOURCE_PAD_STYLE::Size, SMD, and EASYPC_PCB::FRAME::ToKiCad().
Referenced by ConvertFootprint().
| SHAPE_POLY_SET EASYPC_PCB::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 ends.
Definition at line 700 of file easypc_pcb_items.cpp.
References ArcForm(), SHAPE_POLY_SET::ClearArcs(), EASYPC::SOURCE_DESIGN_SHAPE::Cutouts, EASYPC_PCB::ARC_FORM::End, ERROR_INSIDE, EASYPC::SOURCE_SHAPE_ITEM::Filled, EASYPC_PCB::ARC_FORM::IsArc(), EASYPC::SOURCE_SHAPE::IsClosed(), EASYPC_PCB::ARC_FORM::Mid, EASYPC_PCB::ARC_FORM::Points, EASYPC::SOURCE_SHAPE_ITEM::Shape, ShapeToPolySet(), SHAPE_POLY_SET::Simplify(), EASYPC_PCB::ARC_FORM::Start, EASYPC::SOURCE_SHAPE_ITEM::Style, TransformArcToPolygon(), TransformOvalToPolygon(), and EASYPC::SOURCE_LINE_STYLE::Width.
| 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().