55 std::vector<KIGFX::VIEW::LAYER_ITEM_PAIR> baseline;
56 view.
Query( maxBox, baseline );
61 std::vector<KIGFX::VIEW::LAYER_ITEM_PAIR> withOverlay;
62 view.
Query( maxBox, withOverlay );
66 std::set<KIGFX::VIEW::LAYER_ITEM_PAIR> unique( withOverlay.begin(), withOverlay.end() );
76 std::vector<KIGFX::VIEW::LAYER_ITEM_PAIR> afterDestruction;
77 view.
Query( maxBox, afterDestruction );
91 constexpr int MM = 1000000;
113 BOOST_REQUIRE_EQUAL(
overlay.Badges().size(), 2 );
120 for(
double worldPerPx : { 200.0, 8000.0 } )
124 BOOST_REQUIRE_EQUAL( layout.size(), 2 );
125 double dist = ( layout[0] - layout[1] ).EuclideanNorm();
126 BOOST_TEST( dist >= 18.0 * worldPerPx - 1.0 );
132 BOOST_CHECK(
overlay.GetSelected() == c1->m_Uuid );
141 constexpr int MM = 1000000;
161 BOOST_REQUIRE_EQUAL(
overlay.Badges().size(), 2 );
163 const double worldPerPx = 8000.0;
166 BOOST_TEST( ( layout[0] - layout[1] ).EuclideanNorm() >= 18.0 * worldPerPx - 1.0 );
174 constexpr int MM = 1000000;
210 BOOST_REQUIRE_EQUAL(
overlay.Badges().size(), 1 );
211 BOOST_CHECK(
overlay.Badges()[0].constraint == c1->m_Uuid );
213 overlay.SetIsolated( c2->m_Uuid );
215 BOOST_REQUIRE_EQUAL(
overlay.Badges().size(), 1 );
216 BOOST_CHECK(
overlay.Badges()[0].constraint == c2->m_Uuid );
222 constexpr int MM = 1000000;
230 std::vector<PCB_SHAPE*> candidates = { seg };
234 BOOST_CHECK( *hit == seg->
m_Uuid );
BOARD_CONSTRAINT_DIAGNOSTICS DiagnoseBoardConstraints(BOARD *aBoard)
Diagnose every constraint cluster on the board (validate only – geometry is not changed) and return t...
Information pertinent to a Pcbnew printed circuit board.
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
constexpr void SetMaximum()
static std::vector< VECTOR2D > LayoutBadges(const std::vector< CONSTRAINT_BADGE > &aBadges, double aWorldPerPx)
The on-screen draw position (world units) of each badge at the given scale: the anchor offset by Badg...
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
int Query(const BOX2I &aRect, std::vector< LAYER_ITEM_PAIR > &aResult) const
Find all visible items that touch or are within the rectangle aRect.
A geometric constraint between board items (issue #2329).
void SetEnd(const VECTOR2I &aEnd) override
void SetStart(const VECTOR2I &aStart) override
std::optional< KIID > NearestConstrainedShape(const std::vector< PCB_SHAPE * > &aCandidates, const VECTOR2I &aPos, int aMaxDist)
The candidate shape whose outline aPos hits within aMaxDist, or std::nullopt.
@ START
First endpoint of a segment or arc.
@ END
Second endpoint of a segment or arc.
@ FIXED_POSITION
A point is locked at its current location.
std::shared_ptr< PNS_LOG_VIEWER_OVERLAY > overlay
Board-wide diagnostics for the constraint overlay and info bar.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(OverlayRegistersOncePerLayerAndUnregistersFully)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_TEST(netlist.find("R_G1 ARM_OUT1 DIE_B R='0.001 / ((SW_STATE)") !=std::string::npos)
static const long long MM
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I