83 libs.push_back( lib );
91 libs.push_back( lib );
99 libs.push_back( lib );
106 pin->SetText( aText );
107 pin->SetShape( aShape );
127 SCH_LABEL* subset = MakeLabel( wxS(
"BUS[1..3]" ) );
128 SCH_LABEL* superset = MakeLabel( wxS(
"BUS[1..4]" ) );
130 subgraph.AddItem( subset );
131 subgraph.AddItem( superset );
133 subgraph.ResolveDrivers(
false );
135 subgraph.RemoveItem( subset );
138 subgraph.ResolveDrivers(
false );
140 subgraph.RemoveItem( superset );
143 subset = MakeLabel( wxS(
"BUS{ ONE TWO THREE }" ) );
144 superset = MakeLabel( wxS(
"BUS{ ONE TWO THREE FOUR }" ) );
146 subgraph.AddItem( subset );
147 subgraph.AddItem( superset );
149 subgraph.ResolveDrivers(
false );
155 SCH_PIN* regular = MakeRegularPin();
156 subgraph.AddItem( regular );
157 subgraph.ResolveDrivers(
false );
160 SCH_PIN* local = MakeLocalPowerPin();
161 subgraph.AddItem( local );
162 subgraph.ResolveDrivers(
false );
165 SCH_PIN* global = MakeGlobalPowerPin();
166 subgraph.AddItem( global );
167 subgraph.ResolveDrivers(
false );
173 SCH_LABEL* good = MakeLabel( wxS(
"VCC" ) );
174 SCH_LABEL* bad = MakeLabel( wxS(
"Net-Pad1" ) );
176 subgraph.AddItem( good );
177 subgraph.AddItem( bad );
179 subgraph.ResolveDrivers(
false );
185 SCH_LABEL* aaa = MakeLabel( wxS(
"AAA" ) );
186 SCH_LABEL* bbb = MakeLabel( wxS(
"BBB" ) );
188 subgraph.AddItem( aaa );
189 subgraph.AddItem( bbb );
191 subgraph.ResolveDrivers(
false );
200 subgraph.AddItem( input );
201 subgraph.AddItem(
output );
203 subgraph.ResolveDrivers(
false );
Calculate the connectivity of a schematic and generates netlists.
A subgraph is a set of items that are electrically connected on a single sheet.
Define a library symbol object.
const LIB_ID & GetLibId() const override
void AddDrawItem(SCH_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
SCH_LABEL * MakeLabel(const wxString &aText)
SCH_PIN * MakePin(LIB_SYMBOL *aLib, ELECTRICAL_PINTYPE aType, const wxString &aRef)
std::vector< SCH_SYMBOL * > symbols
SCH_PIN * MakeGlobalPowerPin()
RESOLVE_DRIVERS_FIXTURE()
std::vector< SCH_ITEM * > looseItems
SCH_PIN * MakeRegularPin()
std::vector< LIB_SYMBOL * > libs
SCH_SHEET_PIN * MakeSheetPin(const wxString &aText, LABEL_FLAG_SHAPE aShape)
SCH_PIN * MakeLocalPowerPin()
~RESOLVE_DRIVERS_FIXTURE()
CONNECTION_SUBGRAPH subgraph
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void ConfigureFromLabel(const wxString &aLabel)
Configures the connection given a label.
Base class for any item which can be embedded within the SCHEMATIC container class,...
SCH_CONNECTION * GetOrInitConnection(const SCH_SHEET_PATH &aPath, CONNECTION_GRAPH *aGraph)
void SetNumber(const wxString &aNumber)
void SetName(const wxString &aName)
void SetPosition(const VECTOR2I &aPos) override
void SetType(ELECTRICAL_PINTYPE aType)
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
std::vector< const SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet) const
Retrieve a list of the SCH_PINs for the given sheet path.
void UpdatePins()
Updates the cache of SCH_PIN objects for each pin.
void SetRef(const SCH_SHEET_PATH *aSheet, const wxString &aReference)
Set the reference for the given sheet path for this symbol.
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
BOOST_FIXTURE_TEST_CASE(BusSupersetPreference, RESOLVE_DRIVERS_FIXTURE)
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I