@@ -294,20 +294,26 @@ def test_write_parameters(self):
294294 self .assertTrue (filecmp .cmp (outfilename , outfilename_expected ))
295295 os .remove (outfilename )
296296
297- def test_print_info (self ):
297+ def test_print (self ):
298298 params = ffdp .FFDParameters (n_control_points = [3 , 2 , 2 ])
299299 print (params )
300300
301- def test_build_bounding_box (self ):
301+ def test_build_bounding_box_1 (self ):
302+ origin = np .array ([0. , 0. , 0. ])
303+ tops = np .array ([1. , 1. , 1. ])
304+ cube = BRepPrimAPI_MakeBox (* tops ).Shape ()
305+ params = ffdp .FFDParameters ()
306+ params .build_bounding_box (cube )
307+
308+ np .testing .assert_array_almost_equal (params .lenght_box , tops , decimal = 5 )
309+
310+ def test_build_bounding_box_2 (self ):
302311 origin = np .array ([0. , 0. , 0. ])
303312 tops = np .array ([1. , 1. , 1. ])
304313 cube = BRepPrimAPI_MakeBox (* tops ).Shape ()
305314 params = ffdp .FFDParameters ()
306315 params .build_bounding_box (cube )
307316
308- self .assertAlmostEqual (params .lenght_box_x , tops [0 ], places = 5 )
309- self .assertAlmostEqual (params .lenght_box_y , tops [1 ], places = 5 )
310- self .assertAlmostEqual (params .lenght_box_z , tops [2 ], places = 5 )
311317 np .testing .assert_almost_equal (params .position_vertex_0 , origin , decimal = 5 )
312318 np .testing .assert_almost_equal (params .position_vertex_1 , [1. , 0. , 0. ], decimal = 5 )
313319 np .testing .assert_almost_equal (params .position_vertex_2 , [0. , 1. , 0. ], decimal = 5 )
@@ -319,9 +325,7 @@ def test_set_box_dimension(self):
319325 params = ffdp .FFDParameters ()
320326 params .origin_box = origin
321327 params ._set_box_dimensions (origin , tops )
322- self .assertEqual (params .lenght_box_x , tops [0 ])
323- self .assertEqual (params .lenght_box_y , tops [1 ])
324- self .assertEqual (params .lenght_box_z , tops [2 ])
328+ np .testing .assert_array_almost_equal (params .lenght_box , tops )
325329
326330 def test_set_position_of_vertices (self ):
327331 vertex_0 = [0. , 0. , 0. ]
0 commit comments