77from itertools import product
88from OCC .Core .TopoDS import (
99 TopoDS_Shape ,
10- topods_Wire ,
1110 TopoDS_Compound ,
12- topods_Face ,
13- topods_Edge ,
1411 TopoDS_Face ,
12+ TopoDS_Edge ,
1513 TopoDS_Wire ,
14+ topods
1615)
1716from OCC .Core .BRep import BRep_Builder
1817from OCC .Core .TopExp import TopExp_Explorer
@@ -195,7 +194,7 @@ def _bspline_surface_from_face(self, face):
195194 if not isinstance (face , TopoDS_Face ):
196195 raise TypeError ("face must be a TopoDS_Face" )
197196 # TopoDS_Face converted to Nurbs
198- nurbs_face = topods_Face (BRepBuilderAPI_NurbsConvert (face ).Shape ())
197+ nurbs_face = topods . Face (BRepBuilderAPI_NurbsConvert (face ).Shape ())
199198 # GeomSurface obtained from Nurbs face
200199 surface = BRep_Tool .Surface (nurbs_face )
201200 # surface is now further converted to a bspline surface
@@ -221,7 +220,7 @@ def _bspline_curve_from_wire(self, wire):
221220 edge_explorer = TopExp_Explorer (wire , TopAbs_EDGE )
222221 while edge_explorer .More ():
223222 # getting the edge from the iterator
224- edge = topods_Edge (edge_explorer .Current ())
223+ edge = topods . Edge (edge_explorer .Current ())
225224
226225 # edge can be joined only if it is not degenerated (zero length)
227226 if BRep_Tool .Degenerated (edge ):
@@ -231,7 +230,7 @@ def _bspline_curve_from_wire(self, wire):
231230 # the edge must be converted to Nurbs edge
232231 nurbs_converter = BRepBuilderAPI_NurbsConvert (edge )
233232 nurbs_converter .Perform (edge )
234- nurbs_edge = topods_Edge (nurbs_converter .Shape ())
233+ nurbs_edge = topods . Edge (nurbs_converter .Shape ())
235234
236235 # here we extract the underlying curve from the Nurbs edge
237236 nurbs_curve = BRep_Tool_Curve (nurbs_edge )[0 ]
@@ -408,7 +407,7 @@ def __call__(self, obj, dst=None):
408407 # performing some conversions to get the right
409408 # format (BSplineSurface)
410409 # TopoDS_Face obtained from iterator
411- face = topods_Face (faces_explorer .Current ())
410+ face = topods . Face (faces_explorer .Current ())
412411 # performing some conversions to get the right
413412 # format (BSplineSurface)
414413 bspline_surface = self ._bspline_surface_from_face (face )
@@ -438,7 +437,7 @@ def __call__(self, obj, dst=None):
438437 wire_explorer = TopExp_Explorer (face , TopAbs_WIRE )
439438 while wire_explorer .More ():
440439 # wire obtained from the iterator
441- wire = topods_Wire (wire_explorer .Current ())
440+ wire = topods . Wire (wire_explorer .Current ())
442441
443442 # getting a bpline curve joining all the edges of the wire
444443 composite_curve = self ._bspline_curve_from_wire (wire )
0 commit comments