()
| 964 | |
| 965 | |
| 966 | def test_extrude(): |
| 967 | |
| 968 | v = vertex(0, 0, 0) |
| 969 | e = segment((0, 0), (0, 1)) |
| 970 | w = rect(1, 1) |
| 971 | f = fill(w) |
| 972 | |
| 973 | d = (0, 0, 1) |
| 974 | |
| 975 | r1 = extrude(v, d) |
| 976 | r2 = extrude(e, d) |
| 977 | r3 = extrude(w, d) |
| 978 | r4 = extrude(f, d) |
| 979 | r5 = extrude(f, d, both=True) |
| 980 | |
| 981 | assert r1.Length() == approx(1) |
| 982 | assert r2.Area() == approx(1) |
| 983 | assert r3.Area() == approx(4) |
| 984 | assert r4.Volume() == approx(1) |
| 985 | assert r5.Volume() == approx(2) |
| 986 | |
| 987 | |
| 988 | def test_revolve(): |