From 76eeac70cfed4665e134a58fcbaf22ec2e80b3e5 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 23 Jan 2015 15:55:56 +0300 Subject: [PATCH] 0025582: SIGSEGV in thrusections of circle segments Eliminating regressions Fixed compilation warning ('di' : unreferenced formal parameter). Added test bugs/modalg_5/bug25578 --- src/BRepFill/BRepFill_Generator.cxx | 8 ++++++-- .../GeomliteTest_ModificationCommands.cxx | 2 +- tests/bugs/modalg_5/bug25578 | 12 ++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/modalg_5/bug25578 diff --git a/src/BRepFill/BRepFill_Generator.cxx b/src/BRepFill/BRepFill_Generator.cxx index f12a486dc7..359f310f08 100644 --- a/src/BRepFill/BRepFill_Generator.cxx +++ b/src/BRepFill/BRepFill_Generator.cxx @@ -398,8 +398,12 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, BW1.MakeWire(newW1); BW2.MakeWire(newW2); - GeomAdaptor_Curve aC1Adaptor(C1); - GeomAdaptor_Curve aC2Adaptor(C2); + GeomAdaptor_Curve aC1Adaptor; + if (!C1.IsNull()) + aC1Adaptor.Load(C1); + GeomAdaptor_Curve aC2Adaptor; + if (!C2.IsNull()) + aC2Adaptor.Load(C2); // calculate the surface Handle(Geom_Surface) surface; diff --git a/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx b/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx index b492617059..38b1600bf0 100644 --- a/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx @@ -137,7 +137,7 @@ static Standard_Integer samerange (Draw_Interpretor& /*di*/, Standard_Integer n, //purpose : Changes a weight of a pole on B-spline curve/surface //======================================================================= -static Standard_Integer setweight(Draw_Interpretor& di, Standard_Integer n, const char** a) +static Standard_Integer setweight(Draw_Interpretor& /*di*/, Standard_Integer n, const char** a) { if (n < 4 || n > 5) { diff --git a/tests/bugs/modalg_5/bug25578 b/tests/bugs/modalg_5/bug25578 new file mode 100644 index 0000000000..58c15e235b --- /dev/null +++ b/tests/bugs/modalg_5/bug25578 @@ -0,0 +1,12 @@ +puts "=========" +puts "OCC25578" +puts "=========" +puts "" +########################################################### +# SIGSEGV in BRepSweep_Rotation in case of singularities +########################################################### + +psphere Sphere 5 0 90 90 +explode Sphere F +revol rr Sphere_1 0 0 0 0 0 1 360 +revol rr Sphere_1 0 0 0 1 0 0 90