65 BOOST_CHECK( !
info.isJunction );
75 items.insert(
make_wire( { 0, 0 }, { 0, 100 } ) );
79 BOOST_CHECK( !
info.isJunction );
90 items.insert(
make_wire( { 0, 0 }, { 100, 0 } ) );
91 items.insert(
make_wire( { 0, 0 }, { 0, 100 } ) );
95 BOOST_CHECK( !
info.isJunction );
105 items.insert(
make_wire( { 0, 0 }, { 100, 0 } ) );
106 items.insert(
make_wire( { 0, 0 }, { -100, 0 } ) );
107 items.insert(
make_wire( { 0, 0 }, { 0, 100 } ) );
111 BOOST_CHECK(
info.isJunction );
112 BOOST_CHECK( !
info.hasBusEntry );
113 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
133 items.insert( busEntry );
156 items.insert( busEntry );
160 BOOST_CHECK( !
info.isJunction );
161 BOOST_CHECK(
info.hasBusEntry );
163 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
176 BOOST_CHECK( !
info.isJunction );
177 BOOST_CHECK( !
info.hasBusEntry );
179 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
197 BOOST_CHECK( !
info.isJunction );
198 BOOST_CHECK( !
info.hasBusEntry );
199 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
216 BOOST_CHECK( !
info.isJunction );
217 BOOST_CHECK(
info.hasBusEntry );
219 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
240 BOOST_CHECK(
info.isJunction );
241 BOOST_CHECK(
info.hasBusEntry );
243 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
264 BOOST_CHECK(
info.isJunction );
265 BOOST_CHECK(
info.hasBusEntry );
266 BOOST_CHECK(
info.hasBusEntryToMultipleWires );
288 BOOST_CHECK(
info.isJunction );
289 BOOST_CHECK(
info.hasBusEntry );
290 BOOST_CHECK(
info.hasBusEntryToMultipleWires );
313 items.insert( sheet );
319 BOOST_CHECK( !
info.isJunction );
320 BOOST_CHECK( !
info.hasBusEntry );
347 items.insert( sheet );
352 BOOST_CHECK(
info.isJunction );
353 BOOST_CHECK( !
info.hasBusEntry );
Implements an R-tree for fast spatial and type indexing of schematic items.
VECTOR2I GetPosition() const override
Class for a wire to bus entry.
bool IsConnected(const VECTOR2I &aPoint) const
Test the item to see if it is connected to aPoint.
Segment description base class to describe items which have 2 end points (track, wire,...
void SetEndPoint(const VECTOR2I &aPosition)
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.
void AddPin(SCH_SHEET_PIN *aSheetPin)
Add aSheetPin to the sheet.
POINT_INFO AnalyzePoint(const EE_RTREE &aItem, const VECTOR2I &aPosition, bool aBreakCrossings)
Check a tree of items for a confluence at a given point and work out what kind of junction it is,...
A selection of information about a point in the schematic that might be eligible for turning into a j...
bool hasBusEntryToMultipleWires
bool isJunction
< True if the point has 3+ wires and/or 3+ buses meeting there
bool hasBusEntry
True if there is a bus entry at the point and it connects to more than one wire.
BOOST_AUTO_TEST_SUITE_END()
static SCH_LINE * make_wire(const VECTOR2I &aStart, const VECTOR2I &aEnd)
BOOST_AUTO_TEST_CASE(Empty)
Check that we can get the basic properties out as expected.
static constexpr int BE_SIZE
static SCH_LINE * make_bus(const VECTOR2I &aStart, const VECTOR2I &aEnd)