()
| 909 | |
| 910 | |
| 911 | def test_fill(): |
| 912 | |
| 913 | w1 = rect(1, 1) |
| 914 | w2 = rect(0.5, 0.5).moved(Location(0, 0, 1)) |
| 915 | |
| 916 | f1 = fill(w1) |
| 917 | f2 = fill(w1, [(0, 0, 1)]) |
| 918 | f3 = fill(w1, [w2]) |
| 919 | |
| 920 | assert f1.isValid() |
| 921 | assert f1.Area() == approx(1) |
| 922 | |
| 923 | assert f2.isValid() |
| 924 | assert f2.Area() > 1 |
| 925 | |
| 926 | assert f3.isValid() |
| 927 | assert f3.Area() > 1 |
| 928 | assert len(f3.Edges()) == 4 |
| 929 | assert len(f3.Wires()) == 1 |
| 930 | |
| 931 | |
| 932 | def test_cap(): |