mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-17 05:44:03 +02:00
change region test
This commit is contained in:
@@ -128,13 +128,20 @@ test_point_in_region();
|
||||
module test_make_region(){
|
||||
pentagram = turtle(["move",100,"left",144], repeat=4);
|
||||
region1 = make_region(pentagram);
|
||||
assert_approx(region1,
|
||||
assert(are_regions_equal(region1,
|
||||
[[[0, 0], [38.196601125, 0], [30.9016994375, 22.451398829]], [[50,
|
||||
36.3271264003], [19.0983005625, 58.7785252292], [30.9016994375,
|
||||
22.451398829]], [[69.0983005625, 22.451398829], [50, 36.3271264003],
|
||||
[80.9016994375, 58.7785252292]], [[61.803398875, 3.5527136788e-15],
|
||||
[69.0983005625, 22.451398829], [100, 0]], [[38.196601125, 0],
|
||||
[61.803398875, 3.94430452611e-31], [50, -36.3271264003]]]);
|
||||
[61.803398875, 3.94430452611e-31], [50, -36.3271264003]]]));
|
||||
/*assert_approx(region1,
|
||||
[[[0, 0], [38.196601125, 0], [30.9016994375, 22.451398829]], [[50,
|
||||
36.3271264003], [19.0983005625, 58.7785252292], [30.9016994375,
|
||||
22.451398829]], [[69.0983005625, 22.451398829], [50, 36.3271264003],
|
||||
[80.9016994375, 58.7785252292]], [[61.803398875, 3.5527136788e-15],
|
||||
[69.0983005625, 22.451398829], [100, 0]], [[38.196601125, 0],
|
||||
[61.803398875, 3.94430452611e-31], [50, -36.3271264003]]]);*/
|
||||
region2 = make_region(pentagram,nonzero=true);
|
||||
assert_approx(region2,
|
||||
[[[0, 0], [38.196601125, 0], [50, -36.3271264003],
|
||||
|
Reference in New Issue
Block a user