0030722: Modeling Algorithms - BRepExtrema_DistShapeShape computes wrong distances
[occt.git] / src / BOPTest / BOPTest_LowCommands.cxx
index 4f032f0..c7bdd09 100644 (file)
@@ -68,7 +68,11 @@ static  Standard_Integer bhaspc      (Draw_Interpretor& , Standard_Integer , con
   const char* g = "BOPTest commands";
   theCommands.Add("bclassify"    , "use bclassify Solid Point [Tolerance=1.e-7]",
                   __FILE__, bclassify   , g);
-  theCommands.Add("b2dclassify"  , "use b2dclassify Face Point2d [Tol] ",
+  theCommands.Add("b2dclassify"  , "use b2dclassify Face Point2d [Tol] [UseBox] [GapCheckTol]\n" 
+    "Classify  the Point  Point2d  with  Tolerance <Tol> on the face described by <Face>.\n" 
+    "<UseBox> == 1/0 (default <UseBox> = 0): switch on/off the use Bnd_Box in the classification.\n"
+    "<GapCheckTol> (default <GapCheckTol> = 0.1): this is for additional verification of\n" 
+    "the vertex with a tolerance >= <GapCheckTol>.",
                   __FILE__, b2dclassify , g);
   theCommands.Add("b2dclassifx"  , "use b2dclassifx Face Point2d [Tol] ",
                   __FILE__, b2dclassifx , g);
@@ -77,7 +81,7 @@ static  Standard_Integer bhaspc      (Draw_Interpretor& , Standard_Integer , con
 }
 
 
-//
+//lj cd
 //=======================================================================
 //function : b2dclassifx
 //purpose  : 
@@ -142,10 +146,10 @@ Standard_Integer b2dclassify (Draw_Interpretor& theDI,
   //
   DrawTrSurf::GetPoint2d (theArgVec[2], aP);
   const TopoDS_Face&  aF   = TopoDS::Face(aS);
-  const Standard_Real aTol = (theArgNb == 4) ? 
+  const Standard_Real aTol = (theArgNb >= 4) ? 
     Draw::Atof (theArgVec[3]) : BRep_Tool::Tolerance (aF);
-  const Standard_Boolean anUseBox = (theArgNb == 5 && Draw::Atof(theArgVec[4]) == 0) ?
-    Standard_False : Standard_True;
+  const Standard_Boolean anUseBox = (theArgNb >= 5 && Draw::Atof(theArgVec[4]) == 1) ?
+    Standard_True : Standard_False;
   const Standard_Real aGapCheckTol = (theArgNb == 6) ? Draw::Atof(theArgVec[5]) : 0.1;
   BRepClass_FaceClassifier aClassifier;
   aClassifier.Perform(aF, aP, aTol, anUseBox, aGapCheckTol);