//-- TopClass_SolidClassifier.gxx #ifdef DEB Standard_EXPORT Standard_Boolean TopClass_GettraceFC(); #endif #include //extern void DrawSegment(const gp_Pnt& P1,const gp_Lin& L,const Standard_Real par); //extern Standard_Boolean DebugDrawSegment; TopClass_SolidClassifier::TopClass_SolidClassifier() { } TopClass_SolidClassifier::TopClass_SolidClassifier(TheSolidExplorer& S, const gp_Pnt& P, const Standard_Real Tol) { Perform(S,P,Tol); } void TopClass_SolidClassifier::Perform(TheSolidExplorer& SolidExplorer, const gp_Pnt& P, const Standard_Real Tol) { #ifdef DEB Standard_Boolean trace = TopClass_GettraceFC(); #endif myState = 0; if(SolidExplorer.Reject(P) == Standard_False) { //-- There is no rejection between the Shape loaded in the SolidExplorer //-- and the point P. gp_Lin L; Standard_Real Par; //-- We compute the intersection betwwen the line builded in the Solid Explorer //-- and the shape. SolidExplorer.Segment(P,L,Par); TheIntersection3d Intersector; Standard_Real parmin = RealLast(); for(SolidExplorer.InitShell(); SolidExplorer.MoreShell(); SolidExplorer.NextShell()) { if(SolidExplorer.RejectShell(L) == Standard_False) { for(SolidExplorer.InitFace(); SolidExplorer.MoreFace(); SolidExplorer.NextFace()) { if(SolidExplorer.RejectFace(L) == Standard_False) { Intersector.Perform(L,Par,Tol,SolidExplorer.CurrentFace()); if(Intersector.IsDone()) { if(Intersector.HasAPoint()) { if(Intersector.WParameter() < parmin) { parmin = Intersector.WParameter(); if(Abs(parmin)<=Tol) { #ifdef DEB if (trace) { //-- ######################################### cout<<" parmin = "<