34 const int courtyardEpsilon =
pcbIUScale.mmToIU( 0.005 );
60 const int courtyardH =
pcbIUScale.mmToIU( 1.0 );
61 const int courtyardW =
pcbIUScale.mmToIU( 2.0 );
63 const std::vector<VECTOR2I> courtyardPoints = {
66 { courtyardW, courtyardH },
94 std::unique_ptr<PCB_SHAPE> courtyardPoly = std::make_unique<PCB_SHAPE>( &fp,
SHAPE_T::POLY );
95 courtyardPoly->SetLayer(
F_CrtYd );
96 courtyardPoly->SetPolyPoints( courtyardPoints );
97 courtyardPoly->SetWidth( lineW );
99 fp.
Add( courtyardPoly.release() );
109 assertCourtyardMatches(
F_CrtYd, expectedCourtyard );
115 fp.
Move( moveVector );
116 expectedCourtyard.
Move( moveVector );
117 expectedHull.
Move( moveVector );
121 assertCourtyardMatches(
F_CrtYd, expectedCourtyard );
123 assertHullMatch( expectedHull );
132 assertCourtyardMatches(
F_CrtYd, expectedCourtyard );
134 assertHullMatch( expectedHull );
145 assertCourtyardMatches(
B_CrtYd, expectedCourtyard );
147 assertHullMatch( expectedHull );
163 file->name = wxS(
"model.step" );
168 std::string payload( 4096,
'k' );
169 file->decompressedData.assign( payload.begin(), payload.end() );
172 hash.
add( file->decompressedData );
184 std::vector<std::unique_ptr<FOOTPRINT>> clones;
186 for(
int ii = 0; ii < 4; ++ii )
190 clones.back()->GetEmbeddedFile( wxS(
"model.step" ) );
197 BOOST_CHECK( fp.
HasFile( wxS(
"model.step" ) ) );
constexpr EDA_IU_SCALE pcbIUScale
Information pertinent to a Pcbnew printed circuit board.
static constexpr BOX2< VECTOR2I > ByCorners(const VECTOR2I &aCorner1, const VECTOR2I &aCorner2)
EMBEDDED_FILE * GetEmbeddedFile(const wxString &aName) const
Returns the embedded file with the given name or nullptr if it does not exist.
bool HasFile(const wxString &name) const
EMBEDDED_FILE * AddFile(const wxFileName &aName, bool aOverwrite)
Load a file from disk and adds it to the collection.
static RETURN_CODE CompressAndEncode(EMBEDDED_FILE &aFile)
Take data from the #decompressedData buffer and compresses it using ZSTD into the #compressedEncodedD...
A streaming C++ equivalent for MurmurHash3_x64_128.
FORCE_INLINE void add(const std::string &input)
FORCE_INLINE HASH_128 digest()
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.
std::string ToString() const
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
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)
BOOST_CHECK_PREDICATE(ArePolylineEndPointsNearCircle,(chain)(c.m_geom.m_center_point)(radius)(accuracy+epsilon))
BOOST_TEST_CONTEXT("Test Clearance")
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I