+ Add option to refine solid on sketch-based features

This commit is contained in:
wmayer
2013-09-21 09:16:44 +02:00
parent 3c55434939
commit 79e9f108e6
11 changed files with 70 additions and 9 deletions

View File

@@ -66,6 +66,9 @@
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <Base/Exception.h>
#include <Base/Parameter.h>
#include <App/Application.h>
#include <Mod/Part/App/modelRefine.h>
#include "FeatureSketchBased.h"
using namespace PartDesign;
@@ -924,3 +927,16 @@ bool SketchBased::isParallelPlane(const TopoDS_Shape& s1, const TopoDS_Shape& s2
return false;
}
TopoDS_Shape SketchBased::refineShapeIfActive(const TopoDS_Shape& oldShape) const
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/PartDesign");
if (hGrp->GetBool("RefineModel", false)) {
Part::BRepBuilderAPI_RefineModel mkRefine(oldShape);
TopoDS_Shape resShape = mkRefine.Shape();
return resShape;
}
return oldShape;
}