]> OCCT Git - occt.git/commitdiff
0033226: Data Exchange - Infinite loop in HLRBRep_InternalAlgo::Update() generating... CR0-WEEK-8
authordorlov <dorlov@opencascade.com>
Fri, 10 Feb 2023 15:15:40 +0000 (15:15 +0000)
committervglukhik <vglukhik@opencascade.com>
Mon, 27 Feb 2023 17:12:12 +0000 (17:12 +0000)
Infinite loop is removed from IntWalk_IWalking::ComputeOpenLine method test case was created

src/IntWalk/IntWalk_IWalking_3.gxx
tests/hlr/exact_hlr/bug33226 [new file with mode: 0644]

index 224d2575086b578ad34fa70310aa0a6c45bc879b..7c9a7bfd008d6d55a9840cebbdfe6cce26264642 100644 (file)
@@ -193,7 +193,7 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
             PasC = PasC / 2.0;
             PasCu = Abs(PasC*previousd2d.X());
             PasCv = Abs(PasC*previousd2d.Y());
-            if (PasCu <= tolerance(1) && PasCv <= tolerance(2)) {
+            if (PasCu <= tolerance(1) && PasCv <= tolerance(2) || Cadre) {
               if (CurrentLine->NbPoints() == 1) break;
               Arrive = Standard_True;
               CurrentLine->AddStatusLast(Standard_False);
@@ -201,7 +201,7 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
               Rajout = Standard_True;
               seqAlone.Append(lines.Length() + 1);
               seqAjout.Append(lines.Length() + 1);
-            }  
+            }
           }
           else { // test stop
             Rsnld.Root(UVap);
diff --git a/tests/hlr/exact_hlr/bug33226 b/tests/hlr/exact_hlr/bug33226
new file mode 100644 (file)
index 0000000..2abc8c2
--- /dev/null
@@ -0,0 +1,10 @@
+puts "====================================="
+puts "OCC33226: Data Exchange - Infinite loop in HLRBRep_InternalAlgo::Update() generating 2D view of right hand side from STEP file"
+puts "====================================="
+puts "" 
+
+set viewname "vright" 
+set length 45.4352
+
+restore [locate_data_file bug33226_1189.brep] a
+COMPUTE_HLR $viewname $algotype 
\ No newline at end of file