Skip to content

Commit

Permalink
+ perform validation check after partdesign chamfer operation
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Apr 9, 2016
1 parent ca7c5d3 commit 19bc507
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Mod/PartDesign/App/FeatureChamfer.cpp
Expand Up @@ -23,13 +23,15 @@

#include "PreCompiled.h"
#ifndef _PreComp_
# include <BRepAlgo.hxx>
# include <BRepFilletAPI_MakeChamfer.hxx>
# include <TopExp.hxx>
# include <TopExp_Explorer.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Edge.hxx>
# include <TopTools_IndexedMapOfShape.hxx>
# include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
# include <TopTools_ListOfShape.hxx>
#endif

#include <Base/Console.h>
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 19bc507

Please sign in to comment.