59 BOOST_TEST( mm.StartsWith(
"Fixed length: " ) );
91 BOOST_TEST( label.StartsWith(
"Angular dimension: " ) );
107 BOOST_TEST( label.Contains(
"(corner 2)" ),
"unexpected label: " << label.ToStdString() );
115 poly.
SetPolyPoints( { { 0, 0 }, { 1000, 0 }, { 1500, 800 }, { 500, 1400 }, { -300, 800 } } );
120 BOOST_TEST( label.Contains(
"(vertex 3)" ),
"unexpected label: " << label.ToStdString() );
136 BOOST_TEST( label.Contains(
"(corner 2147483648)" ),
"unexpected label: " << label.ToStdString() );
140 poly.
SetPolyPoints( { { 0, 0 }, { 1000, 0 }, { 500, 1000 } } );
145 BOOST_TEST( label.Contains(
"(vertex 2147483648)" ),
"unexpected label: " << label.ToStdString() );
159 BOOST_TEST( label.Contains(
"(start)" ),
"unexpected label: " << label.ToStdString() );
173 std::set<wxString> seen;
180 BOOST_TEST( glyph.length() == 1,
"multi-codepoint glyph: " << glyph.ToStdString() );
181 BOOST_TEST( seen.insert( glyph ).second,
"duplicate glyph: " << glyph.ToStdString() );
197 BOOST_REQUIRE_EQUAL( anchors.size(), 2 );
199 BOOST_CHECK( anchors[0].pos ==
VECTOR2I( 0, 0 ) );
201 BOOST_CHECK( anchors[1].pos ==
VECTOR2I( 1000, 2000 ) );
213 BOOST_REQUIRE_EQUAL( anchors.size(), 1 );
215 BOOST_CHECK( anchors[0].pos ==
VECTOR2I( 500, 500 ) );
227 BOOST_REQUIRE_EQUAL( anchors.size(), 4 );
230 const VECTOR2I expected[4] = { { 0, 0 }, { 1000, 0 }, { 1000, 1000 }, { 0, 1000 } };
232 for(
int i = 0; i < 4; ++i )
constexpr EDA_IU_SCALE pcbIUScale
void SetPolyPoints(const std::vector< VECTOR2I > &aPoints)
A geometric constraint between board items (issue #2329).
void SetValue(std::optional< double > aValue)
void SetDriving(bool aDriving)
void SetEnd(const VECTOR2I &aEnd) override
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
void SetStart(const VECTOR2I &aStart) override
std::vector< CONSTRAINT_ANCHOR_POINT > ConstraintShapeAnchors(const PCB_SHAPE *aShape)
Enumerate a shape constraint anchors with positions segment and arc endpoints arc centre circle centr...
@ RECTANGLE
Use RECTANGLE instead of RECT to avoid collision in a Windows header.
wxString ConstraintTypeGlyph(PCB_CONSTRAINT_TYPE aType)
Compact glyph for a constraint type (e.g. "//", "=") for on-canvas badges.
wxString ConstraintMemberLabel(BOARD_ITEM *aItem, const CONSTRAINT_MEMBER &aMember, UNITS_PROVIDER *aUnitsProvider)
Label for one constrained item in a list combining the item description with its anchored feature suc...
wxString ConstraintDisplayLabel(const PCB_CONSTRAINT &aConstraint, EDA_UNITS aUnits)
Display label for a constraint in lists and menus.
@ VERTEX
An indexed rectangle corner or polygon outline vertex; pairs with CONSTRAINT_MEMBER::m_index.
@ START
First endpoint of a segment or arc.
@ END
Second endpoint of a segment or arc.
@ CENTER
Center of an arc or circle.
PCB_CONSTRAINT_TYPE
The geometric relationship a PCB_CONSTRAINT enforces between its members.
@ FIXED_LENGTH
A segment has a driving length value.
@ ANGULAR_DIMENSION
An angle between members (driving or reference).
@ ARC_ANGLE
An arc has a driving or reference swept-angle value.
@ PARALLEL
Two segments are parallel.
One participant in a constraint: a referenced board item plus the feature of that item that participa...
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(ValuelessConstraintIsTypeNameOnly)
BOOST_AUTO_TEST_SUITE_END()
BOOST_TEST(netlist.find("R_G1 ARM_OUT1 DIE_B R='0.001 / ((SW_STATE)") !=std::string::npos)
VECTOR3I expected(15, 30, 45)
SHAPE_CIRCLE circle(c.m_circle_center, c.m_circle_radius)
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I