()
| 105 | |
| 106 | |
| 107 | def test_utils(): |
| 108 | |
| 109 | r1 = _get_one_wire(rect(1, 1)) |
| 110 | |
| 111 | assert r1.ShapeType() == "Wire" |
| 112 | |
| 113 | r2 = list(_get_wires(compound(r1, r1.moved(Location(0, 0, 1))))) |
| 114 | |
| 115 | assert len(r2) == 2 |
| 116 | assert all(el.ShapeType() == "Wire" for el in r2) |
| 117 | |
| 118 | with raises(ValueError): |
| 119 | list(_get_wires(box(1, 1, 1))) |
| 120 | |
| 121 | r3 = list(_get(box(1, 1, 1).moved(Location(), Location(2, 0, 0)), "Solid")) |
| 122 | |
| 123 | assert (len(r3)) == 2 |
| 124 | assert all(el.ShapeType() == "Solid" for el in r3) |
| 125 | |
| 126 | with raises(ValueError): |
| 127 | list(_get(box(1, 1, 1), "Shell")) |
| 128 | |
| 129 | r4 = _get_one(compound(box(1, 1, 1), box(2, 2, 2)), "Solid") |
| 130 | |
| 131 | assert r4.ShapeType() == "Solid" |
| 132 | |
| 133 | with raises(ValueError): |
| 134 | _get_one(rect(1, 1), ("Solid", "Shell")) |
| 135 | |
| 136 | with raises(ValueError): |
| 137 | list(_get_edges(fill(circle(1)))) |
| 138 | |
| 139 | r5 = _get_faces(plane(1, 1), rect(1, 1), circle(1.0), compound(circle(1.0))) |
| 140 | |
| 141 | assert len(list(r5)) == 4 |
| 142 | |
| 143 | with raises(ValueError): |
| 144 | list(_get_faces(vertex(0, 0, 0))) |
| 145 | |
| 146 | |
| 147 | def test_adaptor_curve_to_edge(): |
nothing calls this directly
no test coverage detected