From: jgv Date: Thu, 10 Sep 2015 13:47:39 +0000 (+0300) Subject: 0026636: BRepOffsetAPI_ThruSections algorithm crashes on two inconsistent wires X-Git-Tag: V7_0_0_beta~294 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=8891791e8644cc07b373509ae2d94d20761a2055 0026636: BRepOffsetAPI_ThruSections algorithm crashes on two inconsistent wires Test case for issue CR26636 --- diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index 4d2ea11fe2..7cb424969d 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -1143,6 +1143,8 @@ void BRepFill_CompatibleWires:: } } } //end of for(; itW.More(); itW.Next()) + if (Esol.IsNull()) + Standard_ConstructionError::Raise("BRepFill :: profiles are inconsistent"); MW.Add(Esol); TopTools_ListOfShape ConnectedEdges; diff --git a/tests/bugs/modalg_6/bug26636 b/tests/bugs/modalg_6/bug26636 new file mode 100644 index 0000000000..1a86d4a9bd --- /dev/null +++ b/tests/bugs/modalg_6/bug26636 @@ -0,0 +1,27 @@ +puts "==========" +puts "OCC26636" +puts "==========" +puts "" +############################################################ +# BRepOffsetAPI_ThruSections algorithm crashes on two inconsistent wires +############################################################ + +restore [locate_data_file bug26636_w1.brep] w1 +restore [locate_data_file bug26636_w2.brep] w2 + +decho off +dlog reset +dlog on + +catch {thrusections result 0 1 w1 w2} + +set info [dlog get] +dlog reset +dlog off +decho on + +if { [regexp "Standard_ConstructionError\\: BRepFill \\:\\: profiles are inconsistent" ${info}] == 1 } { + puts "OK : Exeption is correct" +} else { + puts "Error : Exeption is not correct" +}