61 BOOST_CHECK( !
info.isJunction );
71 items.insert(
make_wire( { 0, 0 }, { 0, 100 } ) );
75 BOOST_CHECK( !
info.isJunction );
86 items.insert(
make_wire( { 0, 0 }, { 100, 0 } ) );
87 items.insert(
make_wire( { 0, 0 }, { 0, 100 } ) );
91 BOOST_CHECK( !
info.isJunction );
101 items.insert(
make_wire( { 0, 0 }, { 100, 0 } ) );
102 items.insert(
make_wire( { 0, 0 }, { -100, 0 } ) );
103 items.insert(
make_wire( { 0, 0 }, { 0, 100 } ) );
107 BOOST_CHECK(
info.isJunction );
108 BOOST_CHECK( !
info.hasBusEntry );
109 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
124 items.insert(
make_wire( { 0, 0 }, { 100, 0 } ) );
125 items.insert(
make_wire( { 0, 0 }, { -100, 0 } ) );
126 items.insert(
make_wire( { 0, 0 }, { 0, 100 } ) );
127 items.insert(
make_wire( { 0, 0 }, { 0, -100 } ) );
131 BOOST_CHECK(
info.isJunction );
146 items.insert(
make_wire( { -100, 0 }, { 100, 0 } ) );
147 items.insert(
make_wire( { 0, -100 }, { 0, 100 } ) );
151 BOOST_CHECK( !
info.isJunction );
171 items.insert( busEntry );
194 items.insert( busEntry );
198 BOOST_CHECK( !
info.isJunction );
199 BOOST_CHECK(
info.hasBusEntry );
201 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
214 BOOST_CHECK( !
info.isJunction );
215 BOOST_CHECK( !
info.hasBusEntry );
217 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
235 BOOST_CHECK( !
info.isJunction );
236 BOOST_CHECK( !
info.hasBusEntry );
237 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
254 BOOST_CHECK( !
info.isJunction );
255 BOOST_CHECK(
info.hasBusEntry );
257 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
278 BOOST_CHECK(
info.isJunction );
279 BOOST_CHECK(
info.hasBusEntry );
281 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
302 BOOST_CHECK(
info.isJunction );
303 BOOST_CHECK(
info.hasBusEntry );
304 BOOST_CHECK(
info.hasBusEntryToMultipleWires );
326 BOOST_CHECK(
info.isJunction );
327 BOOST_CHECK(
info.hasBusEntry );
328 BOOST_CHECK(
info.hasBusEntryToMultipleWires );
351 items.insert( sheet );
357 BOOST_CHECK( !
info.isJunction );
358 BOOST_CHECK( !
info.hasBusEntry );
385 items.insert( sheet );
390 BOOST_CHECK(
info.isJunction );
391 BOOST_CHECK( !
info.hasBusEntry );
Implement 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
True if there is a bus entry at the point and it connects to more than one wire.
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 (either end)
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
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)
VECTOR2< int32_t > VECTOR2I