From 87293fac9bb85c5f5e0ebf563374e27d565116ae Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 4 Apr 2016 14:26:27 +0200 Subject: [PATCH] + add extra check if fillet operation returns valid shape --- src/Mod/PartDesign/App/FeatureFillet.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Mod/PartDesign/App/FeatureFillet.cpp b/src/Mod/PartDesign/App/FeatureFillet.cpp index 21312e212..f6513cf45 100644 --- a/src/Mod/PartDesign/App/FeatureFillet.cpp +++ b/src/Mod/PartDesign/App/FeatureFillet.cpp @@ -23,10 +23,12 @@ #include "PreCompiled.h" #ifndef _PreComp_ +# include # include # include # include # include +# include #endif #include @@ -95,6 +97,12 @@ App::DocumentObjectExecReturn *Fillet::execute(void) if (shape.IsNull()) return new App::DocumentObjectExecReturn("Resulting shape is null"); + TopTools_ListOfShape aLarg; + aLarg.Append(baseShape._Shape); + if (!BRepAlgo::IsValid(aLarg, shape, Standard_False, Standard_False)) { + return new App::DocumentObjectExecReturn("Resulting shape is invalid"); + } + this->Shape.setValue(shape); return App::DocumentObject::StdReturn; }