예제 #1
0
    def test_build_bounding_box_1(self):
        origin = np.array([0., 0., 0.])
        tops = np.array([1., 1., 1.])
        cube = BRepPrimAPI_MakeBox(*tops).Shape()
        params = FFDParameters()
        params.build_bounding_box(cube)

        np.testing.assert_array_almost_equal(params.box_length, tops, decimal=5)
예제 #2
0
    def test_build_bounding_box_1(self):
        origin = np.array([0., 0., 0.])
        tops = np.array([1., 1., 1.])
        cube = BRepPrimAPI_MakeBox(*tops).Shape()
        params = FFDParameters()
        params.build_bounding_box(cube)

        np.testing.assert_array_almost_equal(params.lenght_box, tops, decimal=5)
예제 #3
0
    def test_build_bounding_box_2(self):
        origin = np.array([0., 0., 0.])
        tops = np.array([1., 1., 1.])
        cube = BRepPrimAPI_MakeBox(*tops).Shape()
        params = FFDParameters()
        params.build_bounding_box(cube)

        expected_matrix = np.array([[0., 0., 0.], [1., 0., 0.], [0., 1., 0.],
                                    [0., 0., 1.]])
        np.testing.assert_almost_equal(
            params.position_vertices, expected_matrix, decimal=5)
예제 #4
0
    def test_build_bounding_box_2(self):
        origin = np.array([0., 0., 0.])
        tops = np.array([1., 1., 1.])
        cube = BRepPrimAPI_MakeBox(*tops).Shape()
        params = FFDParameters()
        params.build_bounding_box(cube)

        expected_matrix = np.array([[0., 0., 0.], [1., 0., 0.], [0., 1., 0.],
                                    [0., 0., 1.]])
        np.testing.assert_almost_equal(
            params.position_vertices, expected_matrix, decimal=5)