1 // File: TopClass_Classifier3d.gxx
2 // Created: Wed Mar 30 09:54:56 1994
3 // Author: Laurent BUCHARD
8 //======================================================================
9 TopClass_Classifier3d::TopClass_Classifier3d() : isSet(Standard_False)
13 //======================================================================
14 void TopClass_Classifier3d::Reset(const gp_Lin& L,
15 const Standard_Real Param,
16 const Standard_Real Tol) {
20 myState = TopAbs_UNKNOWN;
21 isSet = Standard_True;
23 //======================================================================
24 #include <IntCurveSurface_IntersectionPoint.hxx>
25 #include <IntCurveSurface_TransitionOnCurve.hxx>
27 void TopClass_Classifier3d::Compare(const TopoDS_Face& Face,
28 const TopAbs_Orientation Orientation) {
30 cout<<" Call to TopClass_Classifier3d::Compare without a Reset ! ";
34 hasIntersect = Standard_False;
35 myIntersector.Perform(myLin,myParam,myTolerance,Face);
36 if(myIntersector.IsDone()) {
37 if(myIntersector.HasAPoint()) {
38 hasIntersect = Standard_True;
39 if(myIntersector.WParameter() < myParam) {
40 myParam = myIntersector.WParameter();
41 myFace = myIntersector.Face();
42 if(Abs(myParam)<=myTolerance) {
43 //-- #########################################
44 cout<<" myParam = "<<myParam<<" ds TopClass_Classifier3d.gxx "<<endl;
45 //-- #########################################
49 //-- The intersection point between the line and a face F of the solid
50 //-- is in the face F or On a boundary of the face
51 if(myIntersector.Transition() == IntCurveSurface_Out) {
52 //-- The line is going from inside the solid to outside the solid.
55 else if(myIntersector.Transition() == IntCurveSurface_In) {
59 cout<<" -------- Probleme ds TopClass_Classifier3d.gxx "<<endl;
64 //-- No point has been found by the myIntersector.
65 //-- Or a Point has been found with a greater parameter.
67 } //-- myIntersector Has a point
69 //-- The myIntersector failed.
71 } //-- Face has not been rejected