From: akaftasev Date: Tue, 18 Oct 2022 06:39:03 +0000 (+0300) Subject: 0032691: Modeling Algorithms - Exception when trying to build solid during sweep... X-Git-Tag: V7_7_0~10 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=25b5e83a4c8c24c531d861272b06ae7f005a711c;p=occt.git 0032691: Modeling Algorithms - Exception when trying to build solid during sweep algorithm Changed the condition for checking the correctness of the sweep algorithm. Exception is no longer raised, algorithm finishes with "Not done" status. --- diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index 1be188dd79..e6a1e238b8 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -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 index 0000000000..e3132262b5 --- /dev/null +++ b/tests/bugs/modalg_7/bug32691 @@ -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" +}