|
14 | 14 | BRepBuilderAPI_MakeWire, |
15 | 15 | BRepBuilderAPI_MakeEdge, |
16 | 16 | BRepBuilderAPI_NurbsConvert) |
17 | | -from OCC.Core.BRep import BRep_Tool, BRep_Tool_Curve |
| 17 | +from OCC.Core.BRep import BRep_Tool |
18 | 18 | from OCC.Core.Geom import Geom_BSplineCurve, Geom_BSplineSurface |
19 | 19 | from OCC.Core.GeomConvert import (geomconvert_SurfaceToBSplineSurface, |
20 | | - geomconvert_CurveToBSplineCurve, |
| 20 | + geomconvert, |
21 | 21 | GeomConvert_CompCurveToBSplineCurve) |
22 | 22 | from OCC.Core.gp import gp_Pnt |
23 | | -from OCC.Core.BRepTools import breptools_OuterWire |
| 23 | +from OCC.Core.BRepTools import breptools |
24 | 24 | from OCC.Core.IFSelect import IFSelect_RetDone |
25 | 25 | from OCC.Core.Interface import Interface_Static_SetCVal |
26 | 26 | from OCC.Core.STEPControl import (STEPControl_Writer, STEPControl_Reader, |
27 | 27 | STEPControl_AsIs) |
28 | 28 | from OCC.Core.IGESControl import (IGESControl_Writer, IGESControl_Reader, |
29 | | - IGESControl_Controller_Init) |
| 29 | + IGESControl_Controller) |
30 | 30 |
|
31 | 31 |
|
32 | 32 | class CADDeformation(): |
@@ -138,7 +138,7 @@ def write_shape(filename, shape): |
138 | 138 | """ |
139 | 139 | def write_iges(filename, shape): |
140 | 140 | """ IGES writer """ |
141 | | - IGESControl_Controller_Init() |
| 141 | + IGESControl_Controller.Init() |
142 | 142 | writer = IGESControl_Writer() |
143 | 143 | writer.AddShape(shape) |
144 | 144 | writer.Write(filename) |
@@ -181,7 +181,7 @@ def _bspline_surface_from_face(self, face): |
181 | 181 | # GeomSurface obtained from Nurbs face |
182 | 182 | surface = BRep_Tool.Surface(nurbs_face) |
183 | 183 | # surface is now further converted to a bspline surface |
184 | | - bspline_surface = geomconvert_SurfaceToBSplineSurface(surface) |
| 184 | + bspline_surface = geomconvert.SurfaceToBSplineSurface(surface) |
185 | 185 | return bspline_surface |
186 | 186 |
|
187 | 187 | def _bspline_curve_from_wire(self, wire): |
@@ -216,10 +216,10 @@ def _bspline_curve_from_wire(self, wire): |
216 | 216 | nurbs_edge = nurbs_converter.Shape() |
217 | 217 |
|
218 | 218 | # here we extract the underlying curve from the Nurbs edge |
219 | | - nurbs_curve = BRep_Tool_Curve(nurbs_edge)[0] |
| 219 | + nurbs_curve = BRep_Tool.Curve(nurbs_edge)[0] |
220 | 220 |
|
221 | 221 | # we convert the Nurbs curve to Bspline curve |
222 | | - bspline_curve = geomconvert_CurveToBSplineCurve(nurbs_curve) |
| 222 | + bspline_curve = geomconvert.CurveToBSplineCurve(nurbs_curve) |
223 | 223 |
|
224 | 224 | # we can now add the Bspline curve to the composite wire curve |
225 | 225 | composite_curve_builder.Add(bspline_curve, self.tolerance) |
@@ -448,7 +448,7 @@ def __call__(self, obj, dst=None): |
448 | 448 | # using the outer wire, and then we can trim it |
449 | 449 | # with the wires corresponding to all the holes. |
450 | 450 | # the wire order is important, in the trimming process |
451 | | - if wire == breptools_OuterWire(face): |
| 451 | + if wire == breptools.OuterWire(face): |
452 | 452 | outer_wires.append(modified_wire) |
453 | 453 | else: |
454 | 454 | inner_wires.append(modified_wire) |
|
0 commit comments