reading Geom_Plane object

I tried to import a file containing rounded surface using STEPControl_Reader
the fie was created with rhino and the surface is declared there as a nurbs

I got a Geom_Plane object and i don't understand its structure
how do i read the surface from the objects

stp file attached


jelle's picture

hi Roi,

so your supplied geom is a plane trimmed by a circle. so getting a Geom_Plane is not that awkward, question is how the plane is delimited by a curve. Best thing would be to explore the topology of your surfaces. Here's an example how you can explore your geometry, in pythonocc. Hope that helps you get the idea.

from OCC.BRepAdaptor import BRepAdaptor_Curve

from OCCDataExchange.utils import file_to_shape

from OCCUtils import Topo shp = file_to_shape("/Users/jelleferinga/Downloads/RhinoSurfaceConePartB.stp")

tp = Topo(shp) print tp.number_of_faces()

print tp.number_of_edges()

for f in tp.faces():

    print f for e in tp.edges_from_face(f): print e

    adap_edg = BRepAdaptor_Curve(e)

    spline = adap_edg.BSpline().GetObject()

<OCC.TopoDS.TopoDS_Face; proxy of <Swig Object of type 'TopoDS_Face *' at 0x10fdca3c0> >
<OCC.TopoDS.TopoDS_Edge; proxy of <Swig Object of type 'TopoDS_Edge *' at 0x10fdca6c0> >

<OCC.Geom.Geom_BSplineCurve; proxy of <Swig Object of type '_p_Geom_BSplineCurve' at 0x1127bb810> >