Skip to content

Commit babb37e

Browse files
authored
Merge pull request tpaviot#29 from tnakaicode/master
update for pythonocc-core=7.6.2
2 parents a689531 + e6b4778 commit babb37e

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,6 @@ docs/_build/
5555

5656
# PyBuilder
5757
target/
58+
59+
# VScode
60+
.vscode/launch.json

OCCUtils/Common.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
TColgp_Array1OfPnt2d,
2727
TColgp_Array1OfVec)
2828
from OCC.Core.TColStd import TColStd_HArray1OfBoolean
29-
from OCC.Core.BRepAdaptor import (BRepAdaptor_Curve, BRepAdaptor_HCurve,
30-
BRepAdaptor_CompCurve, BRepAdaptor_HCompCurve)
29+
from OCC.Core.BRepAdaptor import (BRepAdaptor_Curve, BRepAdaptor_Curve,
30+
BRepAdaptor_CompCurve, BRepAdaptor_CompCurve)
3131
from OCC.Core.GeomAPI import (GeomAPI_Interpolate, GeomAPI_PointsToBSpline,
3232
GeomAPI_ProjectPointOnCurve)
3333
from OCC.Core.gp import gp_Pnt, gp_Vec, gp_Trsf
@@ -525,7 +525,7 @@ def adapt_edge_to_curve(edg):
525525

526526

527527
def adapt_edge_to_hcurve(edg):
528-
c = BRepAdaptor_HCurve()
528+
c = BRepAdaptor_Curve()
529529
c.ChangeCurve().Initialize(edg)
530530
return c
531531

@@ -579,7 +579,7 @@ def wire_to_curve(wire, tolerance=TOLERANCE, order=GeomAbs_C2, max_segment=200,
579579
@param wire:
580580
'''
581581
adap = BRepAdaptor_CompCurve(wire)
582-
hadap = BRepAdaptor_HCompCurve(adap)
582+
hadap = BRepAdaptor_CompCurve(adap)
583583
from OCC.Core.Approx import Approx_Curve3d
584584
approx = Approx_Curve3d(hadap, tolerance, order, max_segment, max_order)
585585
with assert_isdone(approx, 'not able to compute approximation from wire'):
@@ -595,6 +595,6 @@ def adapt_edge_to_curve(edg):
595595

596596

597597
def adapt_edge_to_hcurve(edg):
598-
c = BRepAdaptor_HCurve()
598+
c = BRepAdaptor_Curve()
599599
c.ChangeCurve().Initialize(edg)
600600
return c

OCCUtils/Construct.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import math
2929

3030
from OCC.Core.BRep import BRep_Tool
31-
from OCC.Core.BRepAdaptor import BRepAdaptor_HCurve
31+
from OCC.Core.BRepAdaptor import BRepAdaptor_Curve
3232
from OCC.Core.BRepOffset import BRepOffset_Skin
3333
from OCC.Core.Geom import Geom_TrimmedCurve
3434
from OCC.Core.GeomConvert import GeomConvert_ApproxCurve
@@ -546,7 +546,7 @@ def make_constrained_surface_from_edges(edges):
546546
from OCC.Core.BRepFill import BRepFill_CurveConstraint
547547
bpSrf = GeomPlate_BuildPlateSurface(3, 15, 2)
548548
for edg in edges:
549-
c = BRepAdaptor_HCurve()
549+
c = BRepAdaptor_Curve()
550550
c.ChangeCurve().Initialize(edg)
551551
constraint = BRepFill_CurveConstraint(c, 0)
552552
bpSrf.Add(constraint)

OCCUtils/edge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
##You should have received a copy of the GNU Lesser General Public License
1616
##along with pythonOCC. If not, see <http://www.gnu.org/licenses/>
1717

18-
from OCC.Core.BRepAdaptor import BRepAdaptor_Curve, BRepAdaptor_HCurve
18+
from OCC.Core.BRepAdaptor import BRepAdaptor_Curve, BRepAdaptor_Curve
1919
from OCC.Core.GCPnts import GCPnts_UniformAbscissa
2020
from OCC.Core.Geom import Geom_OffsetCurve, Geom_TrimmedCurve
2121
from OCC.Core.TopExp import topexp

examples/occutils_geomplate.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@
2929
import time
3030

3131
from OCC.Core.gp import gp_Pnt
32-
from OCC.Core.BRepAdaptor import BRepAdaptor_HCurve
32+
from OCC.Core.BRepAdaptor import BRepAdaptor_Curve
3333
from OCC.Core.BRep import BRep_Tool
3434
from OCC.Core.ShapeAnalysis import ShapeAnalysis_Surface
3535
from OCC.Core.GeomLProp import GeomLProp_SLProps
3636
from OCC.Core.BRepFill import BRepFill_CurveConstraint
37-
from OCC.GeomPlate import (GeomPlate_MakeApprox,
37+
from OCC.Core.GeomPlate import (GeomPlate_MakeApprox,
3838
GeomPlate_BuildPlateSurface,
3939
GeomPlate_PointConstraint)
40-
from OCC.IGESControl import IGESControl_Reader
41-
from OCC.IFSelect import (IFSelect_RetDone,
40+
from OCC.Core.IGESControl import IGESControl_Reader
41+
from OCC.Core.IFSelect import (IFSelect_RetDone,
4242
IFSelect_ItemsByEntity)
4343
from OCC.Display.SimpleGui import init_display
4444
from OCC.Core.TopoDS import TopoDS_Compound
@@ -154,7 +154,7 @@ def build_plate(polygon, points):
154154
# add curve constraints
155155
for poly in polygon:
156156
for edg in WireExplorer(poly).ordered_edges():
157-
c = BRepAdaptor_HCurve()
157+
c = BRepAdaptor_Curve()
158158
c.ChangeCurve().Initialize(edg)
159159
constraint = BRepFill_CurveConstraint(c.GetHandle(), 0)
160160
bpSrf.Add(constraint.GetHandle())
@@ -270,7 +270,7 @@ def build_geom_plate(edges):
270270

271271
# add curve constraints
272272
for edg in edges:
273-
c = BRepAdaptor_HCurve()
273+
c = BRepAdaptor_Curve()
274274
print('edge:', edg)
275275
c.ChangeCurve().Initialize(edg)
276276
constraint = BRepFill_CurveConstraint(c.GetHandle(), 0)

0 commit comments

Comments
 (0)