@@ -353,8 +353,8 @@ def test_rotate_deg_section_0_xup(self):
353353 blade .apply_transformations ()
354354 blade .rotate (deg_angle = 90 )
355355 rotated_coordinates = np .array ([
356- 0.23913475 , 0.20945559 , 0.16609993 , 0.11970761 , 0.07154874 ,
357- 0.02221577 , - 0.02796314 , - 0.07881877 , - 0.13030229 , - 0.18246808
356+ 0.2969784 , 0.2653103 , 0.2146533 , 0.1597801 , 0.1024542 ,
357+ 0.0434981 , - 0.0166326 , - 0.0777027 , - 0.1396447 , - 0.202534
358358 ])
359359 np .testing .assert_almost_equal (blade .blade_coordinates_up [0 ][0 ],
360360 rotated_coordinates )
@@ -364,8 +364,8 @@ def test_rotate_deg_section_0_yup(self):
364364 blade .apply_transformations ()
365365 blade .rotate (deg_angle = 90 )
366366 rotated_coordinates = np .array ([
367- 0.3488408 , 0.37407923 , 0.38722075 , 0.39526658 , 0.39928492 ,
368- 0.39980927 , 0.39716902 , 0.39160916 , 0.38335976 , 0.3726862
367+ - 0.409087 , - 0.449122 , - 0.4720087 , - 0.4872923 , - 0.4963637 ,
368+ - 0.4999122 , - 0.4983684 , - 0.4920609 , - 0.4813081 , - 0.4664844
369369 ])
370370 np .testing .assert_almost_equal (blade .blade_coordinates_up [0 ][1 ],
371371 rotated_coordinates )
@@ -375,8 +375,8 @@ def test_rotate_deg_section_0_zup(self):
375375 blade .apply_transformations ()
376376 blade .rotate (deg_angle = 90 )
377377 rotated_coordinates = np .array ([
378- 0.19572966 , 0.14165003 , 0.1003 , 0.06135417 , 0.02390711 , - 0.01235116 ,
379- - 0.04750545 , - 0.08150009 , - 0.11417222 , - 0.14527558
378+ 0.2874853 , 0.2197486 , 0.1649479 , 0.1120097 , 0.0601922 ,
379+ 0.0093686 , - 0.04036 , - 0.0887472 , - 0.1354346 , - 0.1799786
380380 ])
381381 np .testing .assert_almost_equal (blade .blade_coordinates_up [0 ][2 ],
382382 rotated_coordinates )
@@ -386,8 +386,8 @@ def test_rotate_rad_section_1_xdown(self):
386386 blade .apply_transformations ()
387387 blade .rotate (rad_angle = np .pi / 2.0 )
388388 rotated_coordinates = np .array ([
389- 0.29697841 , 0.2176438 , 0.15729805 , 0.10116849 , 0.04749167 ,
390- - 0.00455499 , - 0.05542713 , - 0.10535969 , - 0.15442047 , - 0.20253397
389+ 0.23913475 , 0.17512439 , 0.12479053 , 0.07749333 , 0.03196268 ,
390+ - 0.01239386 , - 0.05590447 , - 0.09873836 , - 0.14094435 , - 0.18246808
391391 ])
392392 np .testing .assert_almost_equal (blade .blade_coordinates_down [1 ][0 ],
393393 rotated_coordinates )
@@ -397,8 +397,8 @@ def test_rotate_rad_section_1_ydown(self):
397397 blade .apply_transformations ()
398398 blade .rotate (rad_angle = np .pi / 2.0 )
399399 rotated_coordinates = np .array ([
400- 0.40908705 , 0.42570092 , 0.44956113 , 0.47048031 , 0.48652991 ,
401- 0.49660315 , 0.49999921 , 0.49627767 , 0.48516614 , 0.4664844
400+ - 0.3488408 , - 0.3576312 , - 0.3719492 , - 0.3844258 , - 0.3936846 ,
401+ - 0.3989522 , - 0.3997457 , - 0.3957593 , - 0.3867917 , - 0.3726862
402402 ])
403403 np .testing .assert_almost_equal (blade .blade_coordinates_down [1 ][1 ],
404404 rotated_coordinates )
@@ -408,8 +408,8 @@ def test_rotate_rad_section_1_zdown(self):
408408 blade .apply_transformations ()
409409 blade .rotate (rad_angle = np .pi / 2.0 )
410410 rotated_coordinates = np .array ([
411- 0.28748529 , 0.26225699 , 0.21884879 , 0.16925801 , 0.11527639 ,
412- 0.05818345 , - 0.00088808 , - 0.0608972 , - 0.1208876 , - 0.17997863
411+ 0.19572966 , 0.17916459 , 0.14715217 , 0.11052969 , 0.07079877 ,
412+ 0.02893379 , - 0.01426232 , - 0.05809137 , - 0.10194212 , - 0.14527558
413413 ])
414414 np .testing .assert_almost_equal (blade .blade_coordinates_down [1 ][2 ],
415415 rotated_coordinates )
@@ -734,48 +734,6 @@ def test_stl_generate_errors_lower(self):
734734 self .assertTrue (os .path .isfile ('tests/test_datasets/errors.txt' ))
735735 self .addCleanup (os .remove , 'tests/test_datasets/errors.txt' )
736736
737- def test_stl_smesh_exception_1 (self ):
738- blade = create_sample_blade_NACA ()
739- blade .apply_transformations ()
740- with self .assertRaises (ValueError ):
741- blade .generate_stl_smesh (min_length = - 1 , max_length = 1 , outfile_stl = None )
742-
743- def test_stl_smesh_exception_2 (self ):
744- blade = create_sample_blade_NACA ()
745- blade .apply_transformations ()
746- with self .assertRaises (ValueError ):
747- blade .generate_stl_smesh (min_length = 2 , max_length = 1 , outfile_stl = None )
748-
749- def test_stl_smesh_generated_upper (self ):
750- # Requires OCC to be installed
751- blade = create_sample_blade_NACA ()
752- blade .apply_transformations ()
753- blade .generated_upper_face = 5
754- blade .generate_stl_smesh (min_length = 1 , max_length = 10 , outfile_stl = None )
755- self .assertIsInstance (blade .generated_upper_face , TopoDS_Shape )
756-
757- def test_stl_smesh_generated_lower (self ):
758- # Requires OCC to be installed
759- blade = create_sample_blade_NACA ()
760- blade .apply_transformations ()
761- blade .generated_lower_face = None
762- blade .generate_stl_smesh (min_length = 1 , max_length = 10 , outfile_stl = None )
763- self .assertIsInstance (blade .generated_lower_face , TopoDS_Shape )
764-
765- def test_stl_smesh_generated_tip (self ):
766- # Requires OCC to be installed
767- blade = create_sample_blade_NACA ()
768- blade .apply_transformations ()
769- blade .generated_tip = 0
770- blade .generate_stl_smesh (min_length = 1 , max_length = 10 , outfile_stl = None )
771- self .assertIsInstance (blade .generated_tip , TopoDS_Shape )
772-
773- def test_stl_smesh_export_exception (self ):
774- blade = create_sample_blade_NACA ()
775- blade .apply_transformations ()
776- with self .assertRaises (ValueError ):
777- blade .generate_stl_smesh (min_length = 1 , max_length = 10 , outfile_stl = 55 )
778-
779737 def test_solid_max_deg_exception (self ):
780738 blade = create_sample_blade_NACA ()
781739 blade .apply_transformations ()
@@ -876,4 +834,4 @@ def test_blade_str_method(self):
876834 ' sections = {}' .format (blade .pitch_angles )
877835 string += '\n Induced rake from skew (in unit length)' \
878836 ' for the sections = {}' .format (blade .induced_rake )
879- assert blade .__str__ () == string
837+ assert blade .__str__ () == string
0 commit comments