thanks Jelle - now I see how to do it (from your reply to the other thread)
>From a face to a BRepAdaptor_Surface to a GeomAdaptor_Surface to a surface... :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Patrick On 18 May 2010 16:24, Patrick Janssen <patr...@janssen.name> wrote: > Thanks Denis and Jelle > > The python OCC.Utils package looks really useful... > but I still seem to be stuck... - I can't cant drill down to the geometry > level > > looking at > http://2.bp.blogspot.com/_ZnQO9nI8DrY/SYn-gi04zCI/AAAAAAAAAG0/ed5c_GHlW5g/s1600-h/abstract-2.png > I want to go from the face down to the surface (i assume there must be some > kind of BRep surface down there) > > the Topo class allows me to go from the face to other topology entities, > like wires and edges. But I can't see a way of getting to the actual > geometry. (Or am I misunderstanding something...) > > ps > > >( however a face from 2 vertices… I dont think that works ) > yes - just being lazy with my typing :) > :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: > Patrick > > > On 18 May 2010 14:58, jelle feringa <jelleferi...@gmail.com> wrote: > >> As a beginner, one of the difficulties I am having is navigating the data. >> Bottom up it seems ok - start from points, create geometry, then create >> topology >> >> p1 = gp_Pnt(0,0,0) >> p2 = gp_Pnt(0,0,10) >> handle_geom_trimmed_curve = GC_MakeSegment(p1, p2).Value() >> topods_edge = BRepBuilderAPI_MakeEdge(handle_geom_trimmed_curve).Edge() >> topods_wire = BRepBuilderAPI_MakeWire(topods_edge).Wire() >> topods_face = BRepBuilderAPI_MakeFace(topods_wire ).Face() >> >> But going the other way seems to be difficult. For example, if I start >> with the face, how do I get the wire, the edges and the curves? I don't see >> any methods to do this. I see something to do with TShape - but I am not >> sure what that is... >> >> handle_topods_tshape = topods_face.TShape() >> topods_tshape = handle_topods_tshape.GetObject() >> >> Any suggestions? >> >> >> Sure. >> from OCC.Utils.Topology import Topo >> >> topo = Topo(topods_face) >> topo.number_of_edges() >> wi = topo.wires_from_face(aFace) >> edg = topo.edges_from_wire(wi) >> verts = topo.vertices_from_edge(edg) >> >> also, can I advice you to use: >> OCC.Utils.Construct >> >> there are functions such as make_edge, make_face that let you write: >> >> face = make_face(make_wire(make_edge(p1,p2))) >> >> ( however a face from 2 vertices… I dont think that works ) >> >> Have you seen all the examples on the SVN version Patrick? >> Their an essential reference, as is the doxygen documentation found on >> opencascade.org. >> That's a pretty ok documentation of the API. >> >> Cheers, >> >> -jelle >> >> >> >> _______________________________________________ >> Pythonocc-users mailing list >> Pythonocc-users@gna.org >> https://mail.gna.org/listinfo/pythonocc-users >> >> >
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users