88class Blade (object ):
99 """
1010 Bottom-up parametrized blade construction.
11-
11+
1212 Given the following parameters of a propeller blade:
1313
1414 - :math:`(X, Y)` coordinates of the blade cylindrical sections after
@@ -778,12 +778,12 @@ def generate_iges(self,
778778 the name <lower_face_string>.iges. Default value is None
779779 :param string tip: if string is passed then the method generates
780780 the blade tip using the BRepOffsetAPI_ThruSections algorithm
781- in order to close the blade at the tip, then exports the generated
782- CAD into .iges file holding the name <tip_string>.iges.
781+ in order to close the blade at the tip, then exports the generated
782+ CAD into .iges file holding the name <tip_string>.iges.
783783 Default value is None
784784 :param string root: if string is passed then the method generates
785785 the blade root using the BRepOffsetAPI_ThruSections algorithm
786- in order to close the blade at the root, then exports the generated
786+ in order to close the blade at the root, then exports the generated
787787 CAD into .iges file holding the name <tip_string>.iges.
788788 Default value is None
789789 :param int max_deg: Define the maximal U degree of generated surface.
@@ -868,7 +868,7 @@ def generate_solid(self,
868868 errors = None ):
869869 """
870870 Generate a solid blade assembling the upper face, lower face, tip and
871- root using the BRepBuilderAPI_MakeSolid algorithm.
871+ root using the BRepBuilderAPI_MakeSolid algorithm.
872872 This method requires PythonOCC (7.4.0) to be installed.
873873
874874 :param int max_deg: Define the maximal U degree of generated surface.
@@ -879,12 +879,11 @@ def generate_solid(self,
879879 the distances between each discrete point used to construct the
880880 blade and the nearest point on the CAD that is perpendicular to
881881 that point. Default value is None
882- :raises RuntimeError: if the assembling of the solid blade is not
882+ :raises RuntimeError: if the assembling of the solid blade is not
883883 completed successfully
884884 """
885- from OCC .Core .IGESControl import IGESControl_Writer
886885 from OCC .Display .SimpleGui import init_display
887- from OCC .Core .TopoDS import TopoDS_Shape , TopoDS_Shell
886+ from OCC .Core .TopoDS import TopoDS_Shell
888887 import OCC .Core .TopoDS
889888
890889 if max_deg <= 0 :
@@ -926,7 +925,7 @@ def generate_solid(self,
926925 if not solid_maker .IsDone ():
927926 raise RuntimeError ('Unsuccessful assembling of solid blade' )
928927 result_solid = solid_maker .Solid ()
929- return result_solid
928+ return result_solid
930929
931930 def generate_stl_smesh (self , min_length = None , max_length = None , outfile_stl = None ):
932931 """
@@ -1012,11 +1011,8 @@ def generate_stl_smesh(self, min_length=None, max_length=None, outfile_stl=None)
10121011 # Longest distance between 2 points
10131012 an1DHypothesis .SetLength (max_length , True )
10141013 # Regular Interpolation
1015- an1DAlgo = StdMeshers_Regular_1D (1 , 0 , aMeshGen )
10161014 # Adding 2D hypothesis and algorithms
10171015 # 2D surface mesh -- Triangulations
1018- a2dHypothseis = StdMeshers_TrianglePreference (2 , 0 , aMeshGen )
1019- a2dAlgo = StdMeshers_MEFISTO_2D (3 , 0 , aMeshGen )
10201016
10211017 #Calculate mesh for the topological compound containing the 3 shapes
10221018 aMesh .ShapeToMesh (aCompound )
@@ -1040,8 +1036,8 @@ def generate_stl(self, upper_face=None,
10401036 lower_face = None ,
10411037 tip = None ,
10421038 root = None ,
1043- max_deg = 1 ,
1044- display = False ,
1039+ max_deg = 1 ,
1040+ display = False ,
10451041 errors = None ):
10461042 """
10471043 Generate and export the .STL files for upper face, lower face, tip
@@ -1057,7 +1053,7 @@ def generate_stl(self, upper_face=None,
10571053 the name <lower_face_string>.stl. Default value is None
10581054 :param string tip: if string is passed then the method generates
10591055 the blade tip using the BRepOffsetAPI_ThruSections algorithm
1060- in order to close the blade at the tip, then exports the generated
1056+ in order to close the blade at the tip, then exports the generated
10611057 CAD into .stl file holding the name <tip_string>.stl.
10621058 Default value is None
10631059 :param string root: if string is passed then the method generates
@@ -1080,7 +1076,6 @@ def generate_stl(self, upper_face=None,
10801076 airfoils. Also to be able to identify and close the blade tip and root.
10811077 """
10821078
1083- import os
10841079 from OCC .Extend .DataExchange import write_stl_file
10851080 from OCC .Display .SimpleGui import init_display
10861081
0 commit comments