@@ -73,28 +73,7 @@ def __init__(self, filename, radii_list, num_points_top_bottom):
7373 self .trailing_edge_point_on_plane = []
7474 self .param_plane_points = []
7575 self .orig_param_plane_points = []
76- # points = []
7776 self ._camber_curve (radius )
78- # for i in range(len(self.vor_us)):
79- # x, y, z = self.vor_us[i], radius*np.sin(self.vor_vs[i]/radius), radius*np.cos(self.vor_vs[i]/radius)
80- # pnt = gp_Pnt(float(x), float(y), float(z))
81- # points.append(BRepBuilderAPI_MakeVertex(pnt).Vertex())
82- # self._camber_curve(radius)
83- if False :
84- display , start_display , add_menu , add_function_to_menu = init_display ()
85- # display.DisplayShape(self.blade_solid, update=True)
86- display .DisplayShape (self .cylinder , update = True )
87- display .DisplayShape (self .wire_top , color = "RED" , update = True )
88- display .DisplayShape (self .wire_bottom , color = "BLUE" , update = True )
89- # display.DisplayShape(self.chord_wire, color="ORANGE", update=True)
90- display .DisplayShape (self .full_camber_wire , color = "GREEN" , update = True )
91- display .DisplayShape (self .leading_edge , color = "BLACK" , update = True )
92- display .DisplayShape (self .trailing_edge , color = "MAGENTA" , update = True )
93- # display.DisplayShape(self.chord_plane, update=True)
94- display .DisplayShape (self .chord_point , update = True )
95- display .DisplayShape (self .trimmed_edge , color = "BLACK" , update = True )
96- # display.DisplayShape(points, update=True)
97- start_display ()
9877 self ._initial_leading_trailing_edges_plane (radius )
9978 self ._initial_camber_points_plane (radius )
10079 self ._initial_airfoil_points_plane (radius )
@@ -142,62 +121,6 @@ def _build_intersection_cylinder_blade(self):
142121 self .total_section_bottom_length = GCPnts_AbscissaPoint .Length (
143122 self .curve_adaptor_bottom )
144123
145- # def _build_intersection_cylinder_blade(self):
146- # """
147- # Private method that constructs the section lines which are the intersections
148- # between the cylinder at a fixed radius and the blade, and the camber points.
149- # """
150- # # Construction of the section lines between two shapes (in this case the
151- # # blade and the lateral face of the cylinder)
152- # section_builder = BRepAlgoAPI_Section(self.blade_solid,
153- # self.cylinder_lateral_face, False)
154- # # Define and build the parametric 2D curve (pcurve) for the section lines defined above
155- # section_builder.ComputePCurveOn2(True)
156- # section_builder.Build()
157- # self.section = section_builder.Shape()
158- # wire_maker = BRepBuilderAPI_MakeWire()
159- # wire_maker_top = BRepBuilderAPI_MakeWire()
160- # wire_maker_bottom = BRepBuilderAPI_MakeWire()
161-
162- # edgeList = TopTools_ListOfShape()
163- # edgeList_top = TopTools_ListOfShape()
164- # edgeList_bottom = TopTools_ListOfShape()
165- # edgeExplorer = TopExp_Explorer(self.section, TopAbs_EDGE)
166- # edgeCount = 0
167- # while edgeExplorer.More():
168- # edgeCount = edgeCount + 1 # Numbering from 1 in OCC
169- # edge = edgeExplorer.Current()
170- # edgeList.Append(edge)
171- # if edgeCount % 2 == 1:
172- # edgeList_top.Append(edge)
173- # else:
174- # edgeList_bottom.Append(edge)
175- # edgeExplorer.Next()
176-
177- # # Total sectional curve
178- # wire_maker.Add(edgeList)
179- # self.wire = wire_maker.Wire()
180- # self.section_wires_list.append(self.wire)
181- # self.curve_adaptor = BRepAdaptor_CompCurve(
182- # OCC.Core.TopoDS.topods.Wire(self.wire))
183- # self.total_section_length = GCPnts_AbscissaPoint.Length(
184- # self.curve_adaptor)
185- # # Top part
186- # wire_maker_top.Add(edgeList_top)
187- # self.wire_top = wire_maker_top.Wire()
188- # self.curve_adaptor_top = BRepAdaptor_CompCurve(
189- # OCC.Core.TopoDS.topods.Wire(self.wire_top))
190- # self.total_section_top_length = GCPnts_AbscissaPoint.Length(
191- # self.curve_adaptor_top)
192- # # Bottom part
193- # wire_maker_bottom.Add(edgeList_bottom)
194- # self.wire_bottom = wire_maker_bottom.Wire()
195- # self.curve_adaptor_bottom = BRepAdaptor_CompCurve(
196- # OCC.Core.TopoDS.topods.Wire(self.wire_bottom))
197- # self.total_section_bottom_length = GCPnts_AbscissaPoint.Length(
198- # self.curve_adaptor_bottom)
199-
200-
201124 def _camber_curve (self , radius ):
202125 """
203126 Computation of the camber points. We get the chord, move along it and fint the intersection
0 commit comments