mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 02:07:36 +00:00
shape_builder - add test for mirror
This commit is contained in:
@@ -123,6 +123,15 @@ class TestCreatePolyline(test.bootstrap.IFC4):
|
|||||||
assert segment.wrappedValue == (2, 3, 1)
|
assert segment.wrappedValue == (2, 3, 1)
|
||||||
|
|
||||||
|
|
||||||
|
class TestMirror(test.bootstrap.IFC4):
|
||||||
|
def test_mirror(self):
|
||||||
|
builder = ShapeBuilder(self.file)
|
||||||
|
rectangle = builder.rectangle(size=(100, 100))
|
||||||
|
assert np.allclose(rectangle.Points.CoordList, ((0.0, 0.0), (100.0, 0.0), (100.0, 100.0), (0.0, 100.0)))
|
||||||
|
builder.mirror(rectangle, mirror_axes=(1, 0))
|
||||||
|
assert np.allclose(rectangle.Points.CoordList, ((0.0, 0.0), (-100.0, 0.0), (-100.0, 100.0), (0.0, 100.0)))
|
||||||
|
|
||||||
|
|
||||||
class TestCalculateTransitions(test.bootstrap.IFC4):
|
class TestCalculateTransitions(test.bootstrap.IFC4):
|
||||||
def calculate_and_test(self, params: dict[str, Any], length: Union[float, None]):
|
def calculate_and_test(self, params: dict[str, Any], length: Union[float, None]):
|
||||||
np_X, np_Y = 0, 1
|
np_X, np_Y = 0, 1
|
||||||
|
|||||||
Reference in New Issue
Block a user