> I am trying to find the node indices belong to some wires, edges or > surfaces (which are at some given locations). I am wondering is there such > commands available in pythonocc? >
Hi Yuting, Do you mean by nodes, vertices [ a bit FEM speak.. ]? I think what you aim at is topology traversal. Sure, try this: In [13]: from OCC.BRepPrimAPI import BRepPrimAPI_MakeBox In [14]: box = BRepPrimAPI_MakeBox(1,1,1).Shape() In [15]: box Out[15]: <OCC.TopoDS.TopoDS_Shape; proxy of <Swig Object of type 'TopoDS_Shape *' at 0x10f13a570> > In [16]: from OCC.Utils.Topology import Topo In [17]: from OCC.Utils.Construct import vertex2pnt In [18]: for vert in Topo(box).vertices(): print vertex2pnt(vert).Coord() (0.0, 0.0, 1.0) (0.0, 0.0, 0.0) (0.0, 1.0, 1.0) (0.0, 1.0, 0.0) (1.0, 0.0, 1.0) (1.0, 0.0, 0.0) (1.0, 1.0, 1.0) (1.0, 1.0, 0.0)
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users