From 19bc5077c89347a620f22a0aeb78c5422ee4473d Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 9 Apr 2016 11:47:31 +0200 Subject: [PATCH] + perform validation check after partdesign chamfer operation --- src/Mod/PartDesign/App/FeatureChamfer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Mod/PartDesign/App/FeatureChamfer.cpp b/src/Mod/PartDesign/App/FeatureChamfer.cpp index 9f941f7eb..4b489affa 100644 --- a/src/Mod/PartDesign/App/FeatureChamfer.cpp +++ b/src/Mod/PartDesign/App/FeatureChamfer.cpp @@ -23,6 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ +# include # include # include # include @@ -30,6 +31,7 @@ # include # include # include +# include #endif #include @@ -104,6 +106,12 @@ App::DocumentObjectExecReturn *Chamfer::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; }