Toponaming: Refactor refine to its own FeatureRefine class
This commit is contained in:
@@ -40,16 +40,11 @@ using namespace PartDesign;
|
||||
namespace PartDesign {
|
||||
|
||||
|
||||
PROPERTY_SOURCE(PartDesign::FeatureAddSub, PartDesign::Feature)
|
||||
PROPERTY_SOURCE(PartDesign::FeatureAddSub, PartDesign::FeatureRefine)
|
||||
|
||||
FeatureAddSub::FeatureAddSub()
|
||||
{
|
||||
ADD_PROPERTY(AddSubShape,(TopoDS_Shape()));
|
||||
ADD_PROPERTY_TYPE(Refine,(0),"Part Design",(App::PropertyType)(App::Prop_None),"Refine shape (clean up redundant edges) after adding/subtracting");
|
||||
//init Refine property
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/PartDesign");
|
||||
this->Refine.setValue(hGrp->GetBool("RefineModel", true));
|
||||
}
|
||||
|
||||
FeatureAddSub::Type FeatureAddSub::getAddSubType()
|
||||
@@ -64,17 +59,6 @@ short FeatureAddSub::mustExecute() const
|
||||
return PartDesign::Feature::mustExecute();
|
||||
}
|
||||
|
||||
|
||||
TopoShape FeatureAddSub::refineShapeIfActive(const TopoShape& oldShape) const
|
||||
{
|
||||
if (this->Refine.getValue()) {
|
||||
TopoShape shape(oldShape);
|
||||
// this->fixShape(shape); // Todo: Not clear that this is required
|
||||
return shape.makeElementRefine();
|
||||
}
|
||||
return oldShape;
|
||||
}
|
||||
|
||||
void FeatureAddSub::getAddSubShape(Part::TopoShape &addShape, Part::TopoShape &subShape)
|
||||
{
|
||||
if (addSubType == Additive)
|
||||
|
||||
Reference in New Issue
Block a user