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);
}
-//
+//lj cd
//=======================================================================
//function : b2dclassifx
//purpose :
//
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);
Q = Ydemi + SdiscrQ0;
P1 = Ademi - P0;
Q1 = Ydemi - SdiscrQ0;
-// Modified by skv - Wed Apr 14 16:05:24 2004 IDEM(Airbus) Begin
- Standard_Real eps;
+ //
+ Standard_Real anEps = 100 * EPSILON;
- eps = Epsilon(100.*Max(Ademi, P0));
- if (Abs(P) <= eps)
+ if (Abs(P) <= anEps)
P = 0.;
- if (Abs(P1) <= eps)
+ if (Abs(P1) <= anEps)
P1 = 0.;
- eps = Epsilon(100.*Max(Ydemi, SdiscrQ0));
- if (Abs(Q) <= eps)
+ if (Abs(Q) <= anEps)
Q = 0.;
- if (Abs(Q1) <= eps)
+ if (Abs(Q1) <= anEps)
Q1 = 0.;
-// Modified by skv - Wed Apr 14 16:05:24 2004 IDEM(Airbus) End
+ //
Ademi = 1.0;
math_DirectPolynomialRoots ASol2(Ademi, P, Q);
--- /dev/null
+puts "================================================================="
+puts "OCC30722: Modeling Algorithms - BRepExtrema_DistShapeShape computes wrong distances"
+puts "================================================================="
+puts ""
+
+restore [locate_data_file bug30722_1.brep] w
+restore [locate_data_file bug30722_2.brep] e
+
+explode w
+mkcurve c1 w_1
+mkcurve c2 e
+extrema c1 c2
+
+if { [isdraw ext_1] == 0 } {
+puts "Error: no solutions!"
+}
\ No newline at end of file