From 5ccf289f291e64ee401a3bc8fc2e725a88551954 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 13 Oct 2011 15:36:13 +0000 Subject: [PATCH] + check if filleting shape is valid git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5010 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d --- src/Mod/PartDesign/App/FeatureFillet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/PartDesign/App/FeatureFillet.cpp b/src/Mod/PartDesign/App/FeatureFillet.cpp index 030697013..50c6a5d5f 100644 --- a/src/Mod/PartDesign/App/FeatureFillet.cpp +++ b/src/Mod/PartDesign/App/FeatureFillet.cpp @@ -65,10 +65,12 @@ App::DocumentObjectExecReturn *Fillet::execute(void) return new App::DocumentObjectExecReturn("Linked object is not a Part object"); Part::Feature *base = static_cast(Base.getValue()); const Part::TopoShape& TopShape = base->Shape.getShape(); + if (TopShape._Shape.IsNull()) + return new App::DocumentObjectExecReturn("Cannot fillet invalid shape"); const std::vector& SubVals = Base.getSubValuesStartsWith("Edge"); if (SubVals.size() == 0) - return new App::DocumentObjectExecReturn("No Edges specified"); + return new App::DocumentObjectExecReturn("No edges specified"); float radius = Radius.getValue();