mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-12-08 03:41:55 +00:00
change region test
This commit is contained in:
parent
7b93b42d52
commit
5a13c7126f
1 changed files with 9 additions and 2 deletions
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Reference in a new issue