KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_net_chains.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.TXT for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#include <boost/test/unit_test.hpp>
21
24
25#include <connection_graph.h>
26#include <advanced_config.h>
28#include <scoped_set_reset.h>
29#include <schematic.h>
30#include <sch_sheet.h>
31#include <sch_screen.h>
32#include <netclass.h>
33#include <sch_label.h>
34#include <sch_line.h>
36#include <project.h>
40#include <locale_io.h>
41
49
50BOOST_FIXTURE_TEST_CASE( RebuildSignals_GroupsFourNetsIntoOneSignal, SIGNALS_TEST_FIXTURE )
51{
53 KI_TEST::LoadSchematic( m_settingsManager, wxString( "net_chains_four_nets" ), m_schematic );
54 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
55 CONNECTION_GRAPH* graph = m_schematic->ConnectionGraph();
56 graph->Recalculate( sheets, /*aUnconditional=*/true );
57
58 const auto& netChains = graph->GetPotentialNetChains();
59 bool foundFourNetSignal = false;
60 for( const auto& sig : netChains )
61 {
62 if( sig && sig->GetNets().size() == 4 )
63 {
64 foundFourNetSignal = true;
65 break;
66 }
67 }
68
69 BOOST_CHECK_MESSAGE( foundFourNetSignal,
70 "Expected at least one signal composed of exactly 4 nets to be built" );
71}
72
73BOOST_FIXTURE_TEST_CASE( RebuildSignals_RespectsSignalLabelAndKeepsGrouping, SIGNALS_TEST_FIXTURE )
74{
76 KI_TEST::LoadSchematic( m_settingsManager, wxString( "net_chains_four_nets_labeled" ), m_schematic );
77 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
78 CONNECTION_GRAPH* graph = m_schematic->ConnectionGraph();
79 graph->Recalculate( sheets, /*aUnconditional=*/true );
80
81 const auto& netChains = graph->GetPotentialNetChains();
82 bool foundLabeled = false;
83 for( const auto& sig : netChains )
84 {
85 if( !sig )
86 continue;
87
88 wxString name = sig->GetName();
89 if( name.StartsWith( wxString( "/" ) ) )
90 name = name.Mid( 1 );
91
92 if( sig->GetNets().size() == 4 && name == wxString( "SIG" ) )
93 {
94 foundLabeled = true;
95 break;
96 }
97 }
98
99 BOOST_CHECK_MESSAGE( foundLabeled,
100 "Expected a 4-net signal named 'SIG' to be built from label" );
101}
102
103BOOST_FIXTURE_TEST_CASE( RebuildSignals_WithPullupBranch_ExcludesPowerBranch, SIGNALS_TEST_FIXTURE )
104{
106 KI_TEST::LoadSchematic( m_settingsManager, wxString( "net_chains_with_pullup" ), m_schematic );
107 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
108 CONNECTION_GRAPH* graph = m_schematic->ConnectionGraph();
109 graph->Recalculate( sheets, /*aUnconditional=*/true );
110
111 const auto& netChains = graph->GetPotentialNetChains();
112
113 // Pullup fixture has two resistors driving a single net through a pullup to VCC. The chain
114 // walker should produce a multi-net chain that does NOT pull VCC into the group, since power
115 // nets are sinks rather than chain participants.
116 bool mainSignalExcludesVCC = false;
117 for( const auto& sig : netChains )
118 {
119 if( !sig )
120 continue;
121
122 const auto& nets = sig->GetNets();
123
124 if( nets.size() < 2 )
125 continue;
126
127 bool containsVCC = false;
128 for( const wxString& n : nets )
129 {
130 wxString nn = n;
131
132 if( nn.StartsWith( wxString( "/" ) ) )
133 nn = nn.Mid( 1 );
134
135 if( nn.CmpNoCase( wxString( "VCC" ) ) == 0 )
136 {
137 containsVCC = true;
138 break;
139 }
140 }
141
142 if( !containsVCC )
143 {
144 mainSignalExcludesVCC = true;
145 break;
146 }
147 }
148
149 BOOST_CHECK_MESSAGE( mainSignalExcludesVCC,
150 "Expected at least one multi-net signal that does not include VCC "
151 "(power branch should not be merged into the main signal)" );
152}
153
154BOOST_FIXTURE_TEST_CASE( RebuildSignals_WithBypassCap_ExcludesPowerBranch, SIGNALS_TEST_FIXTURE )
155{
157 KI_TEST::LoadSchematic( m_settingsManager, wxString( "net_chains_with_bypass" ), m_schematic );
158 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
159 CONNECTION_GRAPH* graph = m_schematic->ConnectionGraph();
160 graph->Recalculate( sheets, /*aUnconditional=*/true );
161
162 const auto& netChains = graph->GetPotentialNetChains();
163
164 // Bypass-cap fixture has a signal path with a decoupling capacitor to GND. The chain walker
165 // should produce a multi-net chain that does NOT pull GND into the group, since power nets
166 // are sinks rather than chain participants.
167 bool mainSignalExcludesGND = false;
168 for( const auto& sig : netChains )
169 {
170 if( !sig )
171 continue;
172
173 const auto& nets = sig->GetNets();
174
175 if( nets.size() < 2 )
176 continue;
177
178 bool containsGND = false;
179 for( const wxString& n : nets )
180 {
181 wxString nn = n;
182
183 if( nn.StartsWith( wxString( "/" ) ) )
184 nn = nn.Mid( 1 );
185
186 if( nn.CmpNoCase( wxString( "GND" ) ) == 0 )
187 {
188 containsGND = true;
189 break;
190 }
191 }
192
193 if( !containsGND )
194 {
195 mainSignalExcludesGND = true;
196 break;
197 }
198 }
199
200 BOOST_CHECK_MESSAGE( mainSignalExcludesGND,
201 "Expected at least one multi-net signal that does not include GND "
202 "(power branch should not be merged into the main signal)" );
203}
204
205BOOST_FIXTURE_TEST_CASE( NetChain_AppendAdoptionKeepsCommittedChains, SIGNALS_TEST_FIXTURE )
206{
208 KI_TEST::LoadSchematic( m_settingsManager, wxString( "net_chains_four_nets_labeled" ), m_schematic );
209 m_schematic->ConnectionGraph()->Recalculate( m_schematic->Hierarchy(), true );
210
211 CONNECTION_GRAPH* graph = m_schematic->ConnectionGraph();
212 BOOST_REQUIRE( !graph->GetPotentialNetChains().empty() );
213
214 SCH_NETCHAIN* committed =
215 graph->CreateNetChainFromPotential( graph->GetPotentialNetChains().front().get(), "APPEND_CHAIN" );
216 BOOST_REQUIRE( committed );
217
218 const std::set<wxString> nets = committed->GetNets();
219 const SCH_SHEET_PATH path = m_schematic->Hierarchy().front();
220
221 SCHEMATIC_CONTENT content;
222 content.targetSheet = path.Last();
223 content.hierarchy = m_schematic->Hierarchy();
224 content.currentSheet = path;
225 content.connectionGraph = std::make_unique<CONNECTION_GRAPH>( m_schematic.get() );
226 content.preserveNetChains = true;
227
228 for( SCH_ITEM* item : path.LastScreen()->Items() )
229 content.screenItems.insert( item );
230
231 m_schematic->AdoptContent( std::move( content ) );
232
233 graph = m_schematic->ConnectionGraph();
234 BOOST_REQUIRE( graph->GetNetChainByName( "APPEND_CHAIN" ) == committed );
235
236 graph->Recalculate( m_schematic->Hierarchy(), true );
237 BOOST_CHECK( committed->GetNets() == nets );
238 BOOST_CHECK( !committed->GetSymbols().empty() );
239}
240
241
242
243BOOST_FIXTURE_TEST_CASE( NetChain_TemporaryGraphPreservesProjectAssignments, SIGNALS_TEST_FIXTURE )
244{
246 KI_TEST::LoadSchematic( m_settingsManager, wxString( "net_chains_four_nets_labeled" ), m_schematic );
247 m_schematic->ConnectionGraph()->Recalculate( m_schematic->Hierarchy(), true );
248
249 CONNECTION_GRAPH* graph = m_schematic->ConnectionGraph();
250 BOOST_REQUIRE( !graph->GetPotentialNetChains().empty() );
251
252 SCH_NETCHAIN* committed =
253 graph->CreateNetChainFromPotential( graph->GetPotentialNetChains().front().get(), "NETCLASS_CHAIN" );
254 BOOST_REQUIRE( committed );
255
256 std::shared_ptr<NET_SETTINGS> ns = m_schematic->Project().GetProjectFile().NetSettings();
257 std::shared_ptr<NETCLASS> highSpeed = std::make_shared<NETCLASS>( wxT( "HighSpeed" ) );
258 ns->SetNetclass( wxT( "HighSpeed" ), highSpeed );
259 committed->SetNetClass( wxT( "HighSpeed" ) );
261 BOOST_REQUIRE( ns->HasChainPatternAssignments( NET_CHAIN_SOURCE::SCHEMATIC ) );
262
263 CONNECTION_GRAPH temporary( m_schematic.get() );
264 temporary.Recalculate( m_schematic->Hierarchy(), true );
265 BOOST_CHECK( ns->HasChainPatternAssignments( NET_CHAIN_SOURCE::SCHEMATIC ) );
266}
267
268
269BOOST_FIXTURE_TEST_CASE( RebuildSignals_SelectsLabelNameIndependentlyOfItemOrder, SIGNALS_TEST_FIXTURE )
270{
271 LOCALE_IO locale;
272 KI_TEST::LoadSchematic( m_settingsManager, "net_chains_four_nets_labeled", m_schematic );
273 SCH_SCREEN* screen = m_schematic->GetTopLevelSheet()->GetScreen();
274 SCH_LABEL* original = nullptr;
275
276 for( SCH_ITEM* item : screen->Items().OfType( SCH_LABEL_T ) )
277 {
278 original = static_cast<SCH_LABEL*>( item );
279 break;
280 }
281
282 BOOST_REQUIRE( original );
283 auto copy = std::unique_ptr<SCH_LABEL>( static_cast<SCH_LABEL*>( original->Clone() ) );
284 const_cast<KIID&>( copy->m_Uuid ) = KIID();
285 SCH_LABEL* second = copy.get();
286 screen->Append( copy.release() );
287 auto* graph = m_schematic->ConnectionGraph();
288
289 for( bool reverse : { false, true } )
290 {
291 original->SetText( reverse ? "ZZZ" : "AAA" );
292 second->SetText( reverse ? "AAA" : "ZZZ" );
293 graph->Recalculate( m_schematic->Hierarchy(), true );
294 const auto& chains = graph->GetPotentialNetChains();
295 BOOST_REQUIRE_EQUAL( chains.size(), 1 );
296 BOOST_CHECK_EQUAL( chains.front()->GetName(), wxString( "AAA" ) );
297 }
298}
299
300BOOST_FIXTURE_TEST_CASE( RebuildSignals_DistinguishesSharedScreenInstances, SIGNALS_TEST_FIXTURE )
301{
302 LOCALE_IO locale;
303 auto& enabled = const_cast<ADVANCED_CFG&>( ADVANCED_CFG::GetCfg() ).m_ConnectivityEngine;
304 SCOPED_SET_RESET restore( enabled, false );
305 KI_TEST::LoadSchematic( m_settingsManager, "net_chains_four_nets_labeled", m_schematic );
306 SCH_SHEET* original = m_schematic->GetTopLevelSheet();
307 auto copy = std::unique_ptr<SCH_SHEET>( static_cast<SCH_SHEET*>( original->Clone() ) );
308 const_cast<KIID&>( copy->m_Uuid ) = KIID();
309 copy->SetName( "Second" );
310 BOOST_REQUIRE( copy->GetScreen() == original->GetScreen() );
311 m_schematic->AddTopLevelSheet( copy.release() );
312 const SCH_SHEET_LIST sheets = m_schematic->Hierarchy();
313 BOOST_REQUIRE_EQUAL( sheets.size(), 2 );
314 auto& manager = m_schematic->NetChains();
315
316 for( bool published : { false, true } )
317 {
318 BOOST_TEST_CONTEXT( "published=" << published )
319 {
320 enabled = published;
321
322 if( published )
323 m_schematic->Connectivity().Recalculate( *m_schematic, true );
324 else
325 m_schematic->ConnectionGraph()->Recalculate( sheets, true );
326
327 const auto& chains = manager.GetPotentialNetChains();
328 BOOST_REQUIRE_EQUAL( chains.size(), 2 );
329 BOOST_CHECK_EQUAL( chains[0]->GetNets().size(), 4 );
330 BOOST_CHECK_EQUAL( chains[1]->GetNets().size(), 4 );
331
332 for( const auto& chain : chains )
333 {
334 BOOST_CHECK_EQUAL( chain->GetName(), wxString( "SIG" ) );
335 BOOST_CHECK_EQUAL( chain->GetSymbols().size(), 3u );
336 std::set<wxString> references;
337
338 for( SCH_SYMBOL* symbol : chain->GetSymbols() )
339 references.insert( symbol->GetRef( &sheets[0] ) );
340
341 const std::set<wxString> expected{ "R1", "R2", "R3" };
342 BOOST_CHECK( references == expected );
343 }
344
345 for( const wxString& net : chains[0]->GetNets() )
346 BOOST_CHECK( !chains[1]->GetNets().contains( net ) );
347
348 BOOST_REQUIRE( !chains[0]->GetSymbols().empty() );
349 auto* bridge = *chains[0]->GetSymbols().begin();
350 const auto pins = bridge->GetPins( &sheets[0] );
351 BOOST_REQUIRE_EQUAL( pins.size(), 2u );
352 auto* first = manager.FindPotentialNetChainBetweenPins( pins[0], sheets[0], pins[1], sheets[0] );
353 auto* second = manager.FindPotentialNetChainBetweenPins( pins[0], sheets[1], pins[1], sheets[1] );
354 BOOST_REQUIRE( first );
355 BOOST_REQUIRE( second );
356 BOOST_CHECK( first != second );
357
358 for( int endpoint : { 0, 1 } )
359 {
360 BOOST_CHECK( first->GetTerminalPath( endpoint ) == sheets[0].Path() );
361 BOOST_CHECK( second->GetTerminalPath( endpoint ) == sheets[1].Path() );
362 }
363
364 BOOST_CHECK( !manager.FindPotentialNetChainBetweenPins( pins[0], sheets[0], pins[1], sheets[1] ) );
365
366 auto* ambiguous = manager.CreateManualNetChain(
367 "AMBIGUOUS_INSTANCE", first->GetSymbols(), first->GetNets(),
368 first->GetTerminalPinA(), first->GetTerminalPinB(),
369 first->GetTerminalRef( 0 ), first->GetTerminalPinNum( 0 ),
370 first->GetTerminalRef( 1 ), first->GetTerminalPinNum( 1 ) );
371 BOOST_CHECK( !ambiguous );
372
373 if( ambiguous )
374 manager.DeleteCommittedNetChain( "AMBIGUOUS_INSTANCE" );
375
376 auto* firstCommitted = manager.CreateNetChainFromPotential( first, "FIRST_INSTANCE" );
377 auto* secondCommitted = manager.CreateNetChainFromPotential( second, "SECOND_INSTANCE" );
378 BOOST_REQUIRE( firstCommitted );
379 BOOST_REQUIRE( secondCommitted );
380 const auto firstNets = firstCommitted->GetNets();
381 const auto secondNets = secondCommitted->GetNets();
382 BOOST_CHECK( !manager.ReplaceNetChainTerminalPin(
383 { "FIRST_INSTANCE", 0, pins[0]->m_Uuid, sheets[1].Path() } ) );
384 BOOST_CHECK( firstCommitted->GetTerminalPath( 0 ) == sheets[0].Path() );
385 BOOST_REQUIRE( manager.ReplaceNetChainTerminalPin(
386 { "FIRST_INSTANCE", 0, pins[0]->m_Uuid, sheets[0].Path() } ) );
387 BOOST_REQUIRE( manager.ReplaceNetChainTerminalPin(
388 { "SECOND_INSTANCE", 0, pins[0]->m_Uuid, sheets[1].Path() } ) );
389 m_schematic->RebuildConnectivity();
390 BOOST_CHECK( firstCommitted->GetTerminalPath( 0 ) == sheets[0].Path() );
391 BOOST_CHECK( secondCommitted->GetTerminalPath( 0 ) == sheets[1].Path() );
392 BOOST_CHECK( firstCommitted->GetNets() == firstNets );
393 BOOST_CHECK( secondCommitted->GetNets() == secondNets );
394 BOOST_REQUIRE( manager.DeleteCommittedNetChain( "FIRST_INSTANCE" ) );
395 BOOST_REQUIRE( manager.DeleteCommittedNetChain( "SECOND_INSTANCE" ) );
396 }
397 }
398}
399
400BOOST_AUTO_TEST_CASE( WholeNetQueryIncludesSeparatedNativeLabelIsland )
401{
402 SETTINGS_MANAGER settings;
403 std::unique_ptr<SCHEMATIC> schematic;
404 KI_TEST::LoadSchematic( settings, "net_chains_four_nets_labeled", schematic );
405 const auto path = schematic->Hierarchy().front();
406 SCH_PIN* left = nullptr;
407 SCH_PIN* right = nullptr;
408 SCH_LABEL* label = nullptr;
409 SCH_LINE* wire = nullptr;
410
411 for( SCH_ITEM* item : path.LastScreen()->Items().OfType( SCH_SYMBOL_T ) )
412 {
413 auto* symbol = static_cast<SCH_SYMBOL*>( item );
414
415 if( symbol->GetRef( &path ) == wxString( "R1" ) )
416 left = symbol->GetPin( wxString( "2" ) );
417 else if( symbol->GetRef( &path ) == wxString( "R2" ) )
418 right = symbol->GetPin( wxString( "1" ) );
419 }
420
423
424 for( SCH_ITEM* item : path.LastScreen()->Items().OfType( SCH_LABEL_T ) )
425 {
426 if( static_cast<SCH_LABEL*>( item )->GetText() == wxString( "SIG" ) )
427 label = static_cast<SCH_LABEL*>( item );
428 }
429
430 for( SCH_ITEM* item : path.LastScreen()->Items().OfType( SCH_LINE_T ) )
431 {
432 if( item->IsConnected( left->GetPosition() ) && item->IsConnected( right->GetPosition() ) )
433 wire = static_cast<SCH_LINE*>( item );
434 }
435
436 BOOST_REQUIRE( label );
437 BOOST_REQUIRE( wire );
438 auto* copiedWire = static_cast<SCH_LINE*>( wire->Clone() );
439 auto* copiedLabel = static_cast<SCH_LABEL*>( label->Clone() );
440 const_cast<KIID&>( copiedWire->m_Uuid ) = KIID();
441 const_cast<KIID&>( copiedLabel->m_Uuid ) = KIID();
442 copiedWire->Move( VECTOR2I( 0, 10000000 ) );
443 copiedLabel->Move( VECTOR2I( 0, 10000000 ) );
444 path.LastScreen()->Append( copiedWire );
445 path.LastScreen()->Append( copiedLabel );
446 const std::set<SCH_ITEM*> expected{ left, right, wire, label, copiedWire, copiedLabel };
447
448 auto& enabled = const_cast<ADVANCED_CFG&>( ADVANCED_CFG::GetCfg() ).m_ConnectivityEngine;
449 SCOPED_SET_RESET restore( enabled, enabled );
450
451 for( bool useEngine : { false, true } )
452 {
453 BOOST_TEST_CONTEXT( "engine=" << useEngine )
454 {
455 enabled = useEngine;
456 schematic->RebuildConnectivity();
457
458 if( useEngine )
459 schematic->ConnectionGraph()->Reset();
460
461 const SCH_CONNECTIVITY::NAVIGATION_QUERY query( *schematic );
462 const auto items = query.WholeNetItems( { wire, wire, nullptr }, path );
463 BOOST_CHECK_EQUAL( items.size(), expected.size() );
464 BOOST_CHECK( std::set<SCH_ITEM*>( items.begin(), items.end() ) == expected );
465 BOOST_CHECK( query.WholeNetItems( {}, path ).empty() );
466 BOOST_CHECK( query.WholeNetItems( { wire }, SCH_SHEET_PATH() ).empty() );
467 }
468 }
469}
470
471// EOF
const char * name
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
Calculate the connectivity of a schematic and generate netlists.
SCH_NETCHAIN * GetNetChainByName(const wxString &aName)
SCH_NETCHAIN * CreateNetChainFromPotential(SCH_NETCHAIN *aPotential, const wxString &aName)
Promote a potential net chain to an actual user net chain with the provided name.
void Recalculate(const SCH_SHEET_LIST &aSheetList, bool aUnconditional=false, std::function< void(SCH_ITEM *)> *aChangedItemHandler=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
Update the connection graph for the given list of sheets.
const std::vector< std::unique_ptr< SCH_NETCHAIN > > & GetPotentialNetChains() const
Potential net chains are inferred groupings produced by RebuildNetChains() but not yet user-committed...
void ApplyNetChainNetclasses()
Mirror each committed net chain's netclass override into the project NET_SETTINGS as a chain-derived ...
virtual void SetText(const wxString &aText)
Definition eda_text.cpp:236
void insert(SCH_ITEM *aItem)
Insert an item into the tree.
Definition sch_rtree.h:70
EE_TYPE OfType(KICAD_T aType) const
Definition sch_rtree.h:248
Definition kiid.h:46
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition locale_io.h:37
One UI operation's hierarchy index.
std::vector< SCH_ITEM * > WholeNetItems(const std::vector< SCH_ITEM * > &aSeeds, const SCH_SHEET_PATH &aSheet) const
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:170
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition sch_label.h:414
Segment description base class to describe items which have 2 end points (track, wire,...
Definition sch_line.h:39
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition sch_line.cpp:241
A net chain is a collection of nets that are connected together through passive components.
const std::set< wxString > & GetNets() const
const std::set< class SCH_SYMBOL * > & GetSymbols() const
void SetNetClass(const wxString &aNetClass)
Net chains may override the netclass applied to every member net.
void Append(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
EE_RTREE & Items()
Get the full RTree, usually for iterating.
Definition sch_screen.h:122
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition sch_sheet.h:48
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
SCH_SCREEN * GetScreen() const
Definition sch_sheet.h:145
Schematic symbol object.
Definition sch_symbol.h:73
RAII class that sets an value at construction and resets it to the original value at destruction.
static bool empty(const wxTextEntryBase *aCtrl)
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
std::vector< FAB_LAYER_COLOR > dummy
A schematic staged off to the side by an importer, ready to be swapped into a live SCHEMATIC in one s...
Definition schematic.h:109
std::optional< SCH_SHEET_PATH > currentSheet
Definition schematic.h:131
SCH_SHEET_LIST hierarchy
Definition schematic.h:130
std::unique_ptr< CONNECTION_GRAPH > connectionGraph
Definition schematic.h:132
bool preserveNetChains
Keep the schematic's net chains instead of the staged graph's, for append.
Definition schematic.h:135
SCH_SHEET * targetSheet
Sheet whose screen receives the content. Null names the schematic's virtual root.
Definition schematic.h:111
EE_RTREE screenItems
Spatial index that replaces the target screen's own.
Definition schematic.h:119
SETTINGS_MANAGER m_settingsManager
std::unique_ptr< SCHEMATIC > m_schematic
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
std::string path
VECTOR3I expected(15, 30, 45)
BOOST_FIXTURE_TEST_CASE(RebuildSignals_GroupsFourNetsIntoOneSignal, SIGNALS_TEST_FIXTURE)
BOOST_AUTO_TEST_CASE(WholeNetQueryIncludesSeparatedNativeLabelIsland)
const SHAPE_LINE_CHAIN chain
BOOST_TEST_CONTEXT("Test Clearance")
BOOST_CHECK_EQUAL(result, "25.4")
@ SCH_LINE_T
Definition typeinfo.h:159
@ SCH_SYMBOL_T
Definition typeinfo.h:168
@ SCH_LABEL_T
Definition typeinfo.h:163
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708