Skip to content

Commit cb9ba01

Browse files
committed
Initial import : legacy code
1 parent 2bc3ae8 commit cb9ba01

File tree

19 files changed

+3573
-0
lines changed

19 files changed

+3573
-0
lines changed

OCCUtils/Adapt.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
##Copyright 2008-2015 Jelle Feringa (jelleferinga@gmail.com)
2+
##
3+
##This file is part of pythonOCC.
4+
##
5+
##pythonOCC is free software: you can redistribute it and/or modify
6+
##it under the terms of the GNU Lesser General Public License as published by
7+
##the Free Software Foundation, either version 3 of the License, or
8+
##(at your option) any later version.
9+
##
10+
##pythonOCC is distributed in the hope that it will be useful,
11+
##but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
##MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
##GNU Lesser General Public License for more details.
14+
##
15+
##You should have received a copy of the GNU Lesser General Public License
16+
##along with pythonOCC. If not, see <http://www.gnu.org/licenses/>.
17+
18+
from OCC.BRepAdaptor import *
19+
20+
21+
def adapt_edge_to_curve(edg):
22+
'''
23+
returns a curve adaptor from an edge
24+
@param edg: TopoDS_Edge
25+
'''
26+
return BRepAdaptor_Curve(edg)
27+
28+
29+
def adapt_edge_to_hcurve(edg):
30+
c = BRepAdaptor_HCurve()
31+
c.ChangeCurve().Initialize(edg)
32+
return c

0 commit comments

Comments
 (0)