KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EASYPC::SCH_BUILDER Class Reference

#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
 

Detailed Description

Definition at line 84 of file easypc_sch_builder.h.

Constructor & Destructor Documentation

◆ SCH_BUILDER()

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.

Member Function Documentation

◆ addBusAlias()

◆ addLabel()

SCH_LABEL_BASE * EASYPC::SCH_BUILDER::addLabel ( const wxString & aName,
const VECTOR2I & aAt )
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().

◆ buildBuses()

◆ buildCommonPinCopies()

◆ buildLabels()

◆ BuildSheet()

◆ buildSymbols()

◆ buildWires()

◆ computeOffset()

◆ placeFields()

◆ placePinItems()

◆ SetProjectSymbols()

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().

◆ toSheet() [1/2]

VECTOR2I EASYPC::SCH_BUILDER::toSheet ( const POINT32 & aPoint) const
private

Definition at line 318 of file easypc_sch_builder.cpp.

References toSheet(), EASYPC::POINT32::X, and EASYPC::POINT32::Y.

◆ toSheet() [2/2]

VECTOR2I EASYPC::SCH_BUILDER::toSheet ( int32_t aX,
int32_t aY ) const
private

Member Data Documentation

◆ m_design

const SOURCE_DESIGN* EASYPC::SCH_BUILDER::m_design = nullptr
private

Definition at line 116 of file easypc_sch_builder.h.

Referenced by addBusAlias(), addLabel(), and BuildSheet().

◆ m_keepUpright

bool EASYPC::SCH_BUILDER::m_keepUpright = false
private

Definition at line 126 of file easypc_sch_builder.h.

Referenced by BuildSheet(), placeFields(), and placePinItems().

◆ m_labelledNets

std::set<wxString> EASYPC::SCH_BUILDER::m_labelledNets
private

upper-cased nets a label names

Definition at line 125 of file easypc_sch_builder.h.

Referenced by addBusAlias(), addLabel(), and BuildSheet().

◆ m_names

const SCH_NET_NAMES& EASYPC::SCH_BUILDER::m_names
private

◆ m_originX

int32_t EASYPC::SCH_BUILDER::m_originX = 0
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().

◆ m_originY

int32_t EASYPC::SCH_BUILDER::m_originY = 0
private

Definition at line 119 of file easypc_sch_builder.h.

Referenced by BuildSheet(), buildSymbols(), computeOffset(), and toSheet().

◆ m_powerCount

int EASYPC::SCH_BUILDER::m_powerCount = 0
private

Definition at line 127 of file easypc_sch_builder.h.

Referenced by buildSymbols().

◆ m_powerNets

std::set<wxString> EASYPC::SCH_BUILDER::m_powerNets
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().

◆ m_powerNodes

std::set<const SOURCE_NODE*> EASYPC::SCH_BUILDER::m_powerNodes
private

Definition at line 124 of file easypc_sch_builder.h.

Referenced by buildLabels(), BuildSheet(), and buildSymbols().

◆ m_projectSymbols

std::map<wxString, const SOURCE_SYMBOL*> EASYPC::SCH_BUILDER::m_projectSymbols
private

by name, first sheet wins

Definition at line 121 of file easypc_sch_builder.h.

Referenced by buildSymbols(), and SetProjectSymbols().

◆ m_reporter

REPORTER* EASYPC::SCH_BUILDER::m_reporter
private

Definition at line 114 of file easypc_sch_builder.h.

Referenced by buildSymbols(), buildWires(), and SCH_BUILDER().

◆ m_schematic

SCHEMATIC* EASYPC::SCH_BUILDER::m_schematic
private

Definition at line 112 of file easypc_sch_builder.h.

Referenced by addBusAlias(), and SCH_BUILDER().

◆ m_screen

SCH_SCREEN* EASYPC::SCH_BUILDER::m_screen = nullptr
private

◆ m_sharedPoints

std::set<VECTOR2I> EASYPC::SCH_BUILDER::m_sharedPoints
private

points where connections of different nets meet

Definition at line 122 of file easypc_sch_builder.h.

Referenced by buildCommonPinCopies(), buildLabels(), and buildWires().


The documentation for this class was generated from the following files: