2011/6/11 Partha Pratim Biswas <partha...@gmail.com> > hii guys, >
Hi Partha, > > I want to find the points of intersection of a line and a solid > > my procedure are as follows.. > > 1. i have found out the total faces available in solid(TopoDS_Solid) > > def Find_face(self,shape): > Ex_face=TopExp_Explorer() > Ex_face.Init(shape,TopAbs_FACE) > i_face=0 > while Ex_face.More(): > i_face=i_face+1 > print("Face : %i Found" %(i_face)) > DO_SOMETHING(Ex_face.Current()) > Ex_face.Next() > return > Rather use: from OCC.Utils.Topology import * t = Topo(shape) for f in t.faces(): .. whatever > > 2. i have defined a line using the following code and finding out the > handle > > p1=gp_Pnt(-10,-10,-10) > p2=gp_Pnt(200,200,200) > L=GC_MakeSegment(p1,p2).Value() > > 3. i have to find the intersection point between line and face using > > inter=GeomAPI_IntCS(L,handle_Geom_Surface) > > my basic problem is to convert every face to Geom_Surface or > Handle_Geom_surface .... > > how do i do it ......of there is a better method for finding SOLID-LINE > intersection > Have a look at the IntCurvesFace module and IntCurvesFace_Intersector/ IntCurvesFace_ShapeIntersector classes. > > > pls help. > partha > > Regards, Thomas
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users