35 base_set.
Append( 0, 0, -1, -1,
true );
36 base_set.
Append( 0, 10, -1, -1,
true );
37 base_set.
Append( 10, 10, -1, -1,
true );
38 base_set.
Append( 10, 10, -1, -1,
true );
39 base_set.
Append( 10, 10, -1, -1,
true );
40 base_set.
Append( 10, 10, -1, -1,
true );
41 base_set.
Append( 10, 0, -1, -1,
true );
45 BOOST_CHECK_EQUAL( removed, 3 );
51 base_set.
Append( 0, 0, -1, -1,
true );
52 base_set.
Append( 0, 10, -1, -1,
true );
53 base_set.
Append( 0, 10, -1, -1,
true );
54 base_set.
Append( 10, 10, -1, -1,
true );
55 base_set.
Append( 10, 10, -1, -1,
true );
56 base_set.
Append( 10, 0, -1, -1,
true );
57 base_set.
Append( 10, 0, -1, -1,
true );
58 base_set.
Append( 0, 0, -1, -1,
true );
62 BOOST_CHECK_EQUAL( removed, 4 );
Represent a set of closed polygons.
int VertexCount(int aOutline=-1, int aHole=-1) const
Return the number of vertices in a given outline/hole.
void DeletePolygon(int aIdx)
Delete aIdx-th polygon from the set.
int RemoveNullSegments()
Look for null segments; ie, segments whose ends are exactly the same and deletes them.
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Appends a vertex at the end of the given outline/hole (default: the last outline)
int NewOutline()
Creates a new empty polygon in the set and returns its index.
Numerical test predicates.
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(RemoveNullSegments)