mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-13 12:32:09 +00:00
get_turns(L,A) - fixed turns generation for endpoints of collinear front/back segments, added some tests
This commit is contained in:
@@ -32,6 +32,24 @@ void test_all()
|
||||
typedef bg::model::linestring<pt> ls;
|
||||
typedef bg::model::polygon<pt> poly;
|
||||
|
||||
test_geometry<ls, poly>("LINESTRING(15 5,24 5,20 2,19 0,13 -4,1 0,10 0,13 3,15 7,16 10,10 10,8 10,4 6,2 8,1 10)",
|
||||
"POLYGON((0 0,5 5,0 10,20 10,20 2,19 0,0 0)(10 3,15 3,15 7,10 7,10 3))",
|
||||
expected("miu")("iuu")("tcu")("tuu")("mcu")("miu")("muu")("tiu")("mcu")("miu")("mcu")("miu")("mxu").vec);
|
||||
|
||||
test_geometry<ls, poly>("LINESTRING(5 0,5 5,10 5)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
|
||||
"miu", "mxu");
|
||||
test_geometry<ls, poly>("LINESTRING(0 0,5 5,10 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
|
||||
"tiu", "txu");
|
||||
test_geometry<ls, poly>("LINESTRING(0 0,5 0,5 5,10 5,10 0)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
|
||||
expected("tcu")("miu")("mcu")("txu").vec);
|
||||
test_geometry<ls, poly>("LINESTRING(10 0,5 0,5 5,10 5,10 10)", "POLYGON((0 0,0 10,10 10,10 0,0 0))",
|
||||
expected("tcu")("miu")("mcu")("txu").vec);
|
||||
|
||||
test_geometry<ls, poly>("LINESTRING(0 0,10 0,10 10)",
|
||||
"POLYGON((0 0,5 5,0 10,20 10,20 2,19 0,0 0)(10 3,15 3,15 7,10 7,10 3))",
|
||||
expected("tcu")("miu")("mcu")("miu")("mxu").vec);
|
||||
|
||||
|
||||
to_svg<ls, poly>("LINESTRING(15 5,24 5,20 2,19 0,13 -4,1 0,10 0,13 3,15 7,16 10,10 10,8 10,4 6,2 8,1 10)",
|
||||
"POLYGON((0 0,5 5,0 10,20 10,20 2,19 0,0 0)(10 3,15 3,15 7,10 7,10 3))",
|
||||
"ls_poly1.svg");
|
||||
|
||||
Reference in New Issue
Block a user