|
KiCad PCB EDA Suite
|
#include <easypc_sch_builder.h>
Public Member Functions | |
| SCH_BUILDER (SCHEMATIC *aSchematic, const SCH_NET_NAMES &aNames, REPORTER *aReporter) | |
| void | BuildSheet (const DESIGN_DOCUMENT &aDoc, SCH_SHEET *aSheet, const SCH_SHEET_PATH &aSheetPath) |
| void | SetProjectSymbols (const std::vector< const DESIGN_DOCUMENT * > &aDocs) |
| Symbols of every sheet, for gates placed on a sheet other than the one being built. | |
Private Member Functions | |
| VECTOR2I | toSheet (int32_t aX, int32_t aY) const |
| VECTOR2I | toSheet (const POINT32 &aPoint) const |
| void | computeOffset (const SOURCE_DESIGN &aDesign) |
| void | buildSymbols (const SOURCE_DESIGN &aDesign, const SCH_SHEET_PATH &aSheetPath) |
| void | buildWires (const SOURCE_DESIGN &aDesign) |
| void | buildLabels (const SOURCE_DESIGN &aDesign) |
| void | buildCommonPinCopies (const SOURCE_DESIGN &aDesign) |
| void | buildBuses (const SOURCE_DESIGN &aDesign) |
| void | addBusAlias (const SOURCE_BUS &aBus, const SOURCE_SHAPE &aShape) |
| void | placePinItems (const SOURCE_COMPONENT &aPart, const SOURCE_SYMBOL_INSTANCE &aInst, const SCH_FRAME &aFrame) |
| void | placeFields (SCH_SYMBOL &aSymbol, const SOURCE_COMPONENT_INSTANCE &aComp, const SOURCE_SYMBOL_INSTANCE &aInst, bool aPower, const SCH_FRAME &aFrame) |
| SCH_LABEL_BASE * | addLabel (const wxString &aName, const VECTOR2I &aAt) |
| A local label, global when the name crosses sheets or a global power symbol names it. | |
Private Attributes | |
| SCHEMATIC * | m_schematic |
| const SCH_NET_NAMES & | m_names |
| REPORTER * | m_reporter |
| SCH_SCREEN * | m_screen = nullptr |
| const SOURCE_DESIGN * | m_design = nullptr |
| int32_t | m_originX = 0 |
| design point at the sheet's top left corner | |
| int32_t | m_originY = 0 |
| std::map< wxString, const SOURCE_SYMBOL * > | m_projectSymbols |
| by name, first sheet wins | |
| std::set< VECTOR2I > | m_sharedPoints |
| points where connections of different nets meet | |
| std::set< wxString > | m_powerNets |
| upper-cased nets a power symbol names | |
| std::set< const SOURCE_NODE * > | m_powerNodes |
| std::set< wxString > | m_labelledNets |
| upper-cased nets a label names | |
| bool | m_keepUpright = false |
| int | m_powerCount = 0 |
Definition at line 84 of file easypc_sch_builder.h.
| EASYPC::SCH_BUILDER::SCH_BUILDER | ( | SCHEMATIC * | aSchematic, |
| const SCH_NET_NAMES & | aNames, | ||
| REPORTER * | aReporter ) |
Definition at line 291 of file easypc_sch_builder.cpp.
References m_names, m_reporter, m_schematic, and EASYPC::SCHEMATIC.
|
private |
Definition at line 1350 of file easypc_sch_builder.cpp.
References EASYPC::defaultTextStyle(), m_design, m_labelledNets, m_names, m_powerNets, m_schematic, m_screen, EASYPC::SOURCE_BUS::Name, EASYPC::SOURCE_NET::Name, name, EASYPC::SOURCE_BUS::Nets, EDA_TEXT::SetTextSize(), EASYPC::ShapeVertices(), EASYPC::TextSize(), EASYPC::ToKiCadMarkup(), and toSheet().
Referenced by buildBuses().
|
private |
A local label, global when the name crosses sheets or a global power symbol names it.
Definition at line 1107 of file easypc_sch_builder.cpp.
References EASYPC::defaultTextStyle(), m_design, m_labelledNets, m_names, m_powerNets, EDA_TEXT::SetTextSize(), EASYPC::TextSize(), and EASYPC::ToKiCadMarkup().
Referenced by buildCommonPinCopies(), and buildLabels().
|
private |
Definition at line 1317 of file easypc_sch_builder.cpp.
References addBusAlias(), EASYPC::SOURCE_DESIGN::Buses, LAYER_BUS, m_screen, SCH_LINE::SetEndPoint(), SCH_LINE::SetLineWidth(), SCH_BUS_ENTRY_BASE::SetSize(), EASYPC::ShapeVertices(), toSheet(), EASYPC::TypedItems(), and EASYPC::SOURCE_LINE_STYLE::Width.
Referenced by BuildSheet().
|
private |
Definition at line 1261 of file easypc_sch_builder.cpp.
References addLabel(), EASYPC::SOURCE_COMPONENT::Board, comp, EASYPC::SOURCE_DESIGN::ComponentInstances, EASYPC::isDrawn(), m_names, m_screen, m_sharedPoints, EASYPC::netOf(), EASYPC::SOURCE_FREE_PAD::Number, pad, EASYPC::SOURCE_SYMBOL::Pads, pin, EASYPC::placePoint(), EASYPC::SOURCE_CONNECT_POINT::Position, EASYPC::ResolveTerminal(), toSheet(), and EASYPC::TypedItems().
Referenced by BuildSheet().
|
private |
Definition at line 1149 of file easypc_sch_builder.cpp.
References addLabel(), EASYPC::SOURCE_NET_NAME::Displayed, find, EASYPC::IsNamedNet(), EASYPC::labelSpin(), m_names, m_powerNodes, m_screen, m_sharedPoints, name, EASYPC::SOURCE_NODE::NetName, EASYPC::SOURCE_DESIGN::Nets, SCH_LABEL_BASE::SetSpinStyle(), EDA_TEXT::SetTextSize(), EASYPC::TextSize(), toSheet(), and EASYPC::TypedItems().
Referenced by BuildSheet().
| void EASYPC::SCH_BUILDER::BuildSheet | ( | const DESIGN_DOCUMENT & | aDoc, |
| SCH_SHEET * | aSheet, | ||
| const SCH_SHEET_PATH & | aSheetPath ) |
Definition at line 462 of file easypc_sch_builder.cpp.
References buildBuses(), buildCommonPinCopies(), buildLabels(), buildSymbols(), buildWires(), computeOffset(), EASYPC::ConvertFreeText(), EASYPC::ConvertShapeItem(), EASYPC::SOURCE_DESIGN::Coppers, EASYPC::DESIGN_DOCUMENT::Design, EASYPC::FillTitleBlock(), SCH_SHEET::GetScreen(), LAYER_NOTES, m_design, m_keepUpright, m_labelledNets, m_originX, m_originY, m_powerNets, m_powerNodes, m_screen, text, EASYPC::SOURCE_DESIGN::Texts, EASYPC::TextStaysUpright(), and EASYPC::TypedItems().
Referenced by SCH_IO_EASYPC::LoadSchematicFile().
|
private |
Definition at line 535 of file easypc_sch_builder.cpp.
References _, EASYPC::attributeValue(), EASYPC::SOURCE_COMPONENT::Board, comp, EASYPC::SOURCE_DESIGN::ComponentInstances, EASYPC::ConvertComponentSymbol(), CTX_LIBID, EscapeString(), EASYPC::SOURCE_SCM_COMPONENT::Gates, SCH_SYMBOL::GetField(), EASYPC::isDrawn(), EASYPC::IsNamedNet(), EASYPC::isScmOnly(), m_names, m_originX, m_originY, m_powerCount, m_powerNets, m_powerNodes, m_projectSymbols, m_reporter, m_screen, EASYPC::SOURCE_NET::Name, EASYPC::SOURCE_SCM_COMPONENT::Name, EASYPC::netOf(), pad, pin, placeFields(), EASYPC::placementTransform(), placePinItems(), PT_POWER_IN, REFERENCE, RPT_SEVERITY_WARNING, EASYPC::SCH_SYMBOL, EASYPC::SOURCE_COMPONENT::Schematic, SCH_SYMBOL::SetExcludedFromBoard(), SCH_SYMBOL::SetExcludedFromBOM(), SCH_SYMBOL::SetLibSymbol(), SCH_SYMBOL::SetRef(), SCH_FIELD::SetText(), SYMBOL::SetTransform(), SCH_SYMBOL::SetValueFieldText(), source, EASYPC::SUPPRESS_PARTS_LIST, EASYPC::SUPPRESS_SCM_PCB_TRANSLATION, EASYPC::SOURCE_PCB_COMPONENT::Symbol, EASYPC::SOURCE_DESIGN::Symbols, THROW_IO_ERROR, EASYPC::ToKiCadMarkup(), toSheet(), and EASYPC::TypedItems().
Referenced by BuildSheet().
|
private |
Definition at line 861 of file easypc_sch_builder.cpp.
References _, SEG::A, SEG::B, candidates(), comp, EASYPC::SOURCE_DESIGN::ComponentInstances, EASYPC::DETOUR, end, index, EASYPC::isDrawn(), KiROUND(), LAYER_WIRE, m_reporter, m_screen, m_sharedPoints, EASYPC::SOURCE_DESIGN::Nets, pad, EASYPC::SOURCE_SYMBOL::Pads, path, EASYPC::placePoint(), EASYPC::SOURCE_CONNECT_POINT::Position, VECTOR2< T >::Resize(), RPT_SEVERITY_WARNING, SCH_LINE::SetEndPoint(), SCH_LINE::SetLineWidth(), EASYPC::ShapeVertices(), EASYPC::SOURCE_PAD_STYLE::Size, EASYPC::SOURCE_CONNECT_POINT::Style, EASYPC::SOURCE_TRACK_SEGMENT::Style, toSheet(), EASYPC::TypedItems(), EASYPC::SOURCE_TRACK_STYLE::Width, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BuildSheet().
|
private |
Definition at line 335 of file easypc_sch_builder.cpp.
References EASYPC::SOURCE_TEXT_POSITION::Alignment, EASYPC::SOURCE_DESIGN::Buses, EASYPC::TEXT_METRICS::CanMeasure(), comp, EASYPC::SOURCE_DESIGN::ComponentInstances, EASYPC::SOURCE_DESIGN::Coppers, EASYPC::floorTo(), BOX2< Vec >::GetBottom(), BOX2< Vec >::GetLeft(), BOX2< Vec >::GetRight(), BOX2< Vec >::GetTop(), EASYPC::isDrawn(), EASYPC::joinLines(), m_originX, m_originY, m_screen, EASYPC::SOURCE_TEXT_POSITION::Mirrored, name, EASYPC::SOURCE_DESIGN::Nets, EASYPC::PAGE_MARGIN, EASYPC::PageForExtents(), EASYPC::placePoint(), EASYPC::SOURCE_TEXT_POSITION::Position, EASYPC::SOURCE_TEXT_POSITION::Rotation, EASYPC::SOURCE_SYMBOL::Shapes, EASYPC::ShapeVertices(), EASYPC::SHEET_ORIGIN_GRID, text, EASYPC::TEXT_METRICS::TextBox(), EASYPC::SOURCE_DESIGN::Texts, EASYPC::SOURCE_SYMBOL::Texts, EASYPC::SOURCE_TEXT_POSITION::TextStyle, EASYPC::TypedItems(), EASYPC::valueLines(), EASYPC::POINT32::X, and EASYPC::POINT32::Y.
Referenced by BuildSheet().
|
private |
Definition at line 762 of file easypc_sch_builder.cpp.
References SCH_SYMBOL::AddField(), ANGLE_HORIZONTAL, ANGLE_VERTICAL, EASYPC::ApplyTextPosition(), EASYPC::SOURCE_COMPONENT_INSTANCE::Component, down, EASYPC::DrawsUpright(), EASYPC::VALUE_LINE::Field, SCH_SYMBOL::GetField(), SCH_SYMBOL::GetFields(), EDA_TEXT::GetHorizJustify(), EDA_TEXT::GetTextAngle(), EDA_TEXT::GetTextPos(), SYMBOL::GetTransform(), EDA_TEXT::GetVertJustify(), EASYPC::SOURCE_TEXT_STYLE::Height, EASYPC::SOURCE_TEXT_STYLE::InterlineHeightPercent, EDA_ANGLE::IsHorizontal(), EASYPC::joinLines(), KiROUND(), m_keepUpright, M_PI, EASYPC::VALUE_LINE::Name, REFERENCE, EASYPC::SCH_SYMBOL, SCH_FIELD::SetEffectiveHorizJustify(), SCH_FIELD::SetEffectiveVertJustify(), SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), EDA_TEXT::SetTextAngle(), EDA_TEXT::SetVisible(), EASYPC::VALUE_LINE::Text, EASYPC::ToKiCadMarkup(), EASYPC::TypedItems(), EASYPC::UprightRotation(), USER, VALUE, EASYPC::valueLines(), EASYPC::SOURCE_SYMBOL_INSTANCE::ValuePositions, and TRANSFORM::y1.
Referenced by buildSymbols().
|
private |
Definition at line 693 of file easypc_sch_builder.cpp.
References EASYPC::ApplyTextPosition(), EASYPC::SOURCE_COMPONENT::Board, EASYPC::SOURCE_PIN_NAME_INSTANCE::Definition, EASYPC::GATE_TERMINAL::Display, EASYPC::SOURCE_SYMBOL_INSTANCE::Gate, EASYPC::SOURCE_SCM_COMPONENT::Gates, LAYER_NOTES, m_keepUpright, m_names, m_screen, EASYPC::SOURCE_NET::Name, name, EASYPC::netOf(), EASYPC::GATE_TERMINAL::NoConnect, EASYPC::SOURCE_FREE_PAD::Number, pad, EASYPC::SOURCE_SYMBOL_INSTANCE::Pads, EASYPC::SOURCE_GATE::PinNames, EASYPC::placedText(), EASYPC::placePoint(), EASYPC::SOURCE_CONNECT_POINT::Position, EASYPC::ResolveTerminal(), EASYPC::SOURCE_COMPONENT::Schematic, EASYPC::SOURCE_SYMBOL_INSTANCE::Symbol, text, EASYPC::ToKiCadMarkup(), toSheet(), EASYPC::TypedItems(), EASYPC::VALUE_NET_NAME, EASYPC::VALUE_PIN_NAME, EASYPC::VALUE_PIN_NUMBER, and EASYPC::SOURCE_PIN_NAME_INSTANCE::Visible.
Referenced by buildSymbols().
| void EASYPC::SCH_BUILDER::SetProjectSymbols | ( | const std::vector< const DESIGN_DOCUMENT * > & | aDocs | ) |
Symbols of every sheet, for gates placed on a sheet other than the one being built.
Definition at line 299 of file easypc_sch_builder.cpp.
References m_projectSymbols, EASYPC::SOURCE_DESIGN::Symbols, and EASYPC::TypedItems().
Referenced by SCH_IO_EASYPC::LoadSchematicFile().
Definition at line 318 of file easypc_sch_builder.cpp.
References toSheet(), EASYPC::POINT32::X, and EASYPC::POINT32::Y.
|
private |
Definition at line 312 of file easypc_sch_builder.cpp.
References m_originX, m_originY, and EASYPC::SCH_FRAME::Map().
Referenced by addBusAlias(), buildBuses(), buildCommonPinCopies(), buildLabels(), buildSymbols(), buildWires(), placePinItems(), and toSheet().
|
private |
Definition at line 116 of file easypc_sch_builder.h.
Referenced by addBusAlias(), addLabel(), and BuildSheet().
|
private |
Definition at line 126 of file easypc_sch_builder.h.
Referenced by BuildSheet(), placeFields(), and placePinItems().
|
private |
upper-cased nets a label names
Definition at line 125 of file easypc_sch_builder.h.
Referenced by addBusAlias(), addLabel(), and BuildSheet().
|
private |
Definition at line 113 of file easypc_sch_builder.h.
Referenced by addBusAlias(), addLabel(), buildCommonPinCopies(), buildLabels(), buildSymbols(), placePinItems(), and SCH_BUILDER().
|
private |
design point at the sheet's top left corner
Definition at line 118 of file easypc_sch_builder.h.
Referenced by BuildSheet(), buildSymbols(), computeOffset(), and toSheet().
|
private |
Definition at line 119 of file easypc_sch_builder.h.
Referenced by BuildSheet(), buildSymbols(), computeOffset(), and toSheet().
|
private |
Definition at line 127 of file easypc_sch_builder.h.
Referenced by buildSymbols().
|
private |
upper-cased nets a power symbol names
Definition at line 123 of file easypc_sch_builder.h.
Referenced by addBusAlias(), addLabel(), BuildSheet(), and buildSymbols().
|
private |
Definition at line 124 of file easypc_sch_builder.h.
Referenced by buildLabels(), BuildSheet(), and buildSymbols().
|
private |
by name, first sheet wins
Definition at line 121 of file easypc_sch_builder.h.
Referenced by buildSymbols(), and SetProjectSymbols().
|
private |
Definition at line 114 of file easypc_sch_builder.h.
Referenced by buildSymbols(), buildWires(), and SCH_BUILDER().
|
private |
Definition at line 112 of file easypc_sch_builder.h.
Referenced by addBusAlias(), and SCH_BUILDER().
|
private |
Definition at line 115 of file easypc_sch_builder.h.
Referenced by addBusAlias(), buildBuses(), buildCommonPinCopies(), buildLabels(), BuildSheet(), buildSymbols(), buildWires(), computeOffset(), and placePinItems().
|
private |
points where connections of different nets meet
Definition at line 122 of file easypc_sch_builder.h.
Referenced by buildCommonPinCopies(), buildLabels(), and buildWires().