@@ -353,8 +353,8 @@ def test_rotate_deg_section_0_xup(self):
353
353
blade .apply_transformations ()
354
354
blade .rotate (deg_angle = 90 )
355
355
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
358
358
])
359
359
np .testing .assert_almost_equal (blade .blade_coordinates_up [0 ][0 ],
360
360
rotated_coordinates )
@@ -364,8 +364,8 @@ def test_rotate_deg_section_0_yup(self):
364
364
blade .apply_transformations ()
365
365
blade .rotate (deg_angle = 90 )
366
366
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
369
369
])
370
370
np .testing .assert_almost_equal (blade .blade_coordinates_up [0 ][1 ],
371
371
rotated_coordinates )
@@ -375,8 +375,8 @@ def test_rotate_deg_section_0_zup(self):
375
375
blade .apply_transformations ()
376
376
blade .rotate (deg_angle = 90 )
377
377
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
380
380
])
381
381
np .testing .assert_almost_equal (blade .blade_coordinates_up [0 ][2 ],
382
382
rotated_coordinates )
@@ -386,8 +386,8 @@ def test_rotate_rad_section_1_xdown(self):
386
386
blade .apply_transformations ()
387
387
blade .rotate (rad_angle = np .pi / 2.0 )
388
388
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
391
391
])
392
392
np .testing .assert_almost_equal (blade .blade_coordinates_down [1 ][0 ],
393
393
rotated_coordinates )
@@ -397,8 +397,8 @@ def test_rotate_rad_section_1_ydown(self):
397
397
blade .apply_transformations ()
398
398
blade .rotate (rad_angle = np .pi / 2.0 )
399
399
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
402
402
])
403
403
np .testing .assert_almost_equal (blade .blade_coordinates_down [1 ][1 ],
404
404
rotated_coordinates )
@@ -408,8 +408,8 @@ def test_rotate_rad_section_1_zdown(self):
408
408
blade .apply_transformations ()
409
409
blade .rotate (rad_angle = np .pi / 2.0 )
410
410
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
413
413
])
414
414
np .testing .assert_almost_equal (blade .blade_coordinates_down [1 ][2 ],
415
415
rotated_coordinates )
@@ -734,48 +734,6 @@ def test_stl_generate_errors_lower(self):
734
734
self .assertTrue (os .path .isfile ('tests/test_datasets/errors.txt' ))
735
735
self .addCleanup (os .remove , 'tests/test_datasets/errors.txt' )
736
736
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
-
779
737
def test_solid_max_deg_exception (self ):
780
738
blade = create_sample_blade_NACA ()
781
739
blade .apply_transformations ()
@@ -876,4 +834,4 @@ def test_blade_str_method(self):
876
834
' sections = {}' .format (blade .pitch_angles )
877
835
string += '\n Induced rake from skew (in unit length)' \
878
836
' for the sections = {}' .format (blade .induced_rake )
879
- assert blade .__str__ () == string
837
+ assert blade .__str__ () == string
0 commit comments