36 const int courtyardEpsilon =
pcbIUScale.mmToIU( 0.005 );
62 const int courtyardH =
pcbIUScale.mmToIU( 1.0 );
63 const int courtyardW =
pcbIUScale.mmToIU( 2.0 );
65 const std::vector<VECTOR2I> courtyardPoints = {
68 { courtyardW, courtyardH },
96 std::unique_ptr<PCB_SHAPE> courtyardPoly = std::make_unique<PCB_SHAPE>( &fp,
SHAPE_T::POLY );
97 courtyardPoly->SetLayer(
F_CrtYd );
98 courtyardPoly->SetPolyPoints( courtyardPoints );
99 courtyardPoly->SetWidth( lineW );
101 fp.
Add( courtyardPoly.release() );
111 assertCourtyardMatches(
F_CrtYd, expectedCourtyard );
117 fp.
Move( moveVector );
118 expectedCourtyard.
Move( moveVector );
119 expectedHull.
Move( moveVector );
123 assertCourtyardMatches(
F_CrtYd, expectedCourtyard );
125 assertHullMatch( expectedHull );
134 assertCourtyardMatches(
F_CrtYd, expectedCourtyard );
136 assertHullMatch( expectedHull );
147 assertCourtyardMatches(
B_CrtYd, expectedCourtyard );
149 assertHullMatch( expectedHull );
constexpr EDA_IU_SCALE pcbIUScale
Information pertinent to a Pcbnew printed circuit board.
static constexpr BOX2< VECTOR2I > ByCorners(const VECTOR2I &aCorner1, const VECTOR2I &aCorner2)
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
void Move(const VECTOR2I &aVector) override
void Rotate(const EDA_ANGLE &aAngle, const VECTOR2I &aCenter={ 0, 0 }) override
Rotate all vertices by a given angle.
void Mirror(const VECTOR2I &aRef, FLIP_DIRECTION aFlipDirection)
Mirror the line points about y or x (or both).
Represent a set of closed polygons.
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
int OutlineCount() const
Return the number of outlines in the set.
PCB_LAYER_ID
A quick note on layer IDs:
@ LEFT_RIGHT
Flip left to right (around the Y axis)
bool ChainsAreCyclicallyEqual(const SHAPE_LINE_CHAIN &aChainA, const SHAPE_LINE_CHAIN &aChainB, int aTol)
Check that two chains are cyclically equal.
Utility functions for working with shapes.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_TEST(contains==c.ExpectedContains)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_PREDICATE(ArePolylineEndPointsNearCircle,(chain)(c.m_geom.m_center_point)(radius)(accuracy+epsilon))
BOOST_TEST_CONTEXT("Test Clearance")
VECTOR2< int32_t > VECTOR2I