]> OCCT Git - occt.git/commitdiff
0032691: Modeling Algorithms - Exception when trying to build solid during sweep...
authorakaftasev <akaftasev@opencascade.com>
Tue, 18 Oct 2022 06:39:03 +0000 (09:39 +0300)
committersmoskvin <smoskvin@opencascade.com>
Mon, 31 Oct 2022 16:18:06 +0000 (19:18 +0300)
Changed the condition for checking the correctness of the sweep algorithm. Exception is no longer raised, algorithm finishes with "Not done" status.

src/BRepFill/BRepFill_Sweep.cxx
tests/bugs/modalg_7/bug32691 [new file with mode: 0644]

index 1be188dd79316f8e55b2aacab4ffc60a17a676f0..e6a1e238b8ba1b7e53225ca69cf740aa56bdb9f6 100644 (file)
@@ -3002,7 +3002,7 @@ void BRepFill_Sweep::Build(TopTools_MapOfShape& ReversedEdges,
         }
       }
 
-    if (aNbFaces == 0)
+    if ((NbTrous > 0) ? (aNbFaces < NbLaw) : (aNbFaces == 0))
     {
       isDone = Standard_False;
       return;
diff --git a/tests/bugs/modalg_7/bug32691 b/tests/bugs/modalg_7/bug32691
new file mode 100644 (file)
index 0000000..e313226
--- /dev/null
@@ -0,0 +1,19 @@
+puts "=============================================="
+puts "0032691: Modeling Algorithms - Crash when trying to build solid during sweep algorithm"
+puts "=============================================="
+puts ""
+
+puts "REQUIRED ALL: Buildsweep : Not Done"
+
+bsplinecurve s 3 8  0 4  1 3  2 3  3 3  4 3  5 3  6 3  7 4  65.1 7.3076 2.1 1  65.1 7.3027 1.9217 1  65.1 7.2978 1.7434 1  65.1 7.2928 1.5652 1  65.1 7.2899 1.4588 1  65.1 7.2869 1.3524 1  65.1 7.284 1.2461 1  65.1 7.272 1.2388 1  65.1 7.26 1.2315 1  65.1 7.248 1.2243 1  65.1 7.1717 1.1778 1  65.1 7.0954 1.1314 1  65.1 7.019 1.0849 1  65.1 6.9424 1.0379 1  65.1 6.8657 0.9909 1  65.1 6.789 0.9438 1  65.1 6.7782 0.9372 1  65.1 6.7673 0.9305 1  65.1 6.7565 0.9238 1  65.1 6.7436 0.9159 1  65.1 6.7307 0.908 1  65.1 6.7178 0.9 1
+mkedge s s
+wire s s
+
+polyline p 65.09999999999999 7.3076 2.1  65.0855660928097 7.16839889506023 2.10383597533476  65.0746247111087 7.16953256986072 2.10380518704116  65.08905861829901 7.30873367480049 2.0999692117064  65.09999999999999 7.3076 2.1
+
+mksweep s 
+addsweep p
+setsweep -DT
+if [catch {buildsweep r -C -S}] {
+       puts "Error: exception is raised"
+}