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 );
129 items.insert( busEntry );
152 items.insert( busEntry );
156 BOOST_CHECK( !
info.isJunction );
157 BOOST_CHECK(
info.hasBusEntry );
159 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
172 BOOST_CHECK( !
info.isJunction );
173 BOOST_CHECK( !
info.hasBusEntry );
175 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
193 BOOST_CHECK( !
info.isJunction );
194 BOOST_CHECK( !
info.hasBusEntry );
195 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
212 BOOST_CHECK( !
info.isJunction );
213 BOOST_CHECK(
info.hasBusEntry );
215 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
236 BOOST_CHECK(
info.isJunction );
237 BOOST_CHECK(
info.hasBusEntry );
239 BOOST_CHECK( !
info.hasBusEntryToMultipleWires );
260 BOOST_CHECK(
info.isJunction );
261 BOOST_CHECK(
info.hasBusEntry );
262 BOOST_CHECK(
info.hasBusEntryToMultipleWires );
284 BOOST_CHECK(
info.isJunction );
285 BOOST_CHECK(
info.hasBusEntry );
286 BOOST_CHECK(
info.hasBusEntryToMultipleWires );
309 items.insert( sheet );
315 BOOST_CHECK( !
info.isJunction );
316 BOOST_CHECK( !
info.hasBusEntry );
343 items.insert( sheet );
348 BOOST_CHECK(
info.isJunction );
349 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