0024360: Hang up trying to intersect two faces
authorjgv <jgv@opencascade.com>
Thu, 21 Nov 2013 11:11:49 +0000 (15:11 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 21 Nov 2013 13:19:31 +0000 (17:19 +0400)
Added test case bugs/modalg_5/bug24360

src/IntWalk/IntWalk_IWalking_4.gxx
src/IntWalk/IntWalk_IWalking_5.gxx
tests/bugs/modalg_5/bug24360 [new file with mode: 0644]

index 849ce90..d059cbd 100755 (executable)
@@ -51,8 +51,8 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
   Standard_Real aBornInf[2], aBornSup[2], aUVap[2];
   math_Vector BornInf(aBornInf,1,2), BornSup(aBornSup,1,2);
   math_Vector Uvap(aUVap,1,2);// parameters of current approach
   Standard_Real aBornInf[2], aBornSup[2], aUVap[2];
   math_Vector BornInf(aBornInf,1,2), BornSup(aBornSup,1,2);
   math_Vector Uvap(aUVap,1,2);// parameters of current approach
-  Standard_Real PasC;  // rate of advancement on the tangent
-  Standard_Real PasCu; // rate of advancement current by U
+  Standard_Real PasC;  // step of advancement on the tangent
+  Standard_Real PasCu; // step of advancement current by U
   Standard_Real PasCv; // step of advancement current by V
   Standard_Real PasSav; // save first step of advancement
   Standard_Boolean Arrive;// show if line ends
   Standard_Real PasCv; // step of advancement current by V
   Standard_Real PasSav; // save first step of advancement
   Standard_Boolean Arrive;// show if line ends
index 4fc36d9..ffc883b 100755 (executable)
@@ -255,10 +255,15 @@ IntWalk_StatusDeflection IntWalk_IWalking::TestDeflection
        
       }
       else {
        
       }
       else {
-//     if (FlecheCourante > fleche) {  // not too great
-       if (FlecheCourante > fleche*fleche) {  // not too great
+//     if (FlecheCourante > fleche) {  // step too great
+       if (FlecheCourante > fleche*fleche) {  // step too great
          Step = Step /2.;
          Step = Step /2.;
-         Status = IntWalk_PasTropGrand;
+          StepU = Abs(Step*previousd2d.X());
+          StepV = Abs(Step*previousd2d.Y());
+          if (StepU < tolerance(1) && StepV < tolerance(2)) 
+            Status = IntWalk_ArretSurPointPrecedent;
+          else 
+            Status = IntWalk_PasTropGrand;
        }
        else {
          Standard_Real d2dx = Abs(sp.Direction2d().X()); 
        }
        else {
          Standard_Real d2dx = Abs(sp.Direction2d().X()); 
diff --git a/tests/bugs/modalg_5/bug24360 b/tests/bugs/modalg_5/bug24360
new file mode 100644 (file)
index 0000000..ce86049
--- /dev/null
@@ -0,0 +1,17 @@
+puts "============"
+puts "OCC24360"
+puts "============"
+puts ""
+######################################################
+# Hang up trying to intersect two faces
+######################################################
+
+restore [locate_data_file bug24360_Face_1.brep] b1
+restore [locate_data_file bug24360_Face_2.brep] b2
+
+bop b1 b2
+bopfuse result
+
+set square 92255.4
+set 2dviewer 1
+