Activate Part/Part Design check and refine preferences by default (#14406)
* Activate Part/Part Design check and refine preferences by default * added bool in .ui * Update tests * Fix Sketcher tests
This commit is contained in:
@@ -49,7 +49,7 @@ FeatureAddSub::FeatureAddSub()
|
||||
//init Refine property
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/PartDesign");
|
||||
this->Refine.setValue(hGrp->GetBool("RefineModel", false));
|
||||
this->Refine.setValue(hGrp->GetBool("RefineModel", true));
|
||||
}
|
||||
|
||||
FeatureAddSub::Type FeatureAddSub::getAddSubType()
|
||||
|
||||
@@ -54,7 +54,7 @@ Boolean::Boolean()
|
||||
ADD_PROPERTY_TYPE(Refine,(0),"Part Design",(App::PropertyType)(App::Prop_None),"Refine shape (clean up redundant edges) after adding/subtracting");
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/PartDesign");
|
||||
this->Refine.setValue(hGrp->GetBool("RefineModel", false));
|
||||
this->Refine.setValue(hGrp->GetBool("RefineModel", true));
|
||||
ADD_PROPERTY_TYPE(UsePlacement,(0),"Part Design",(App::PropertyType)(App::Prop_None),"Apply the placement of the second ( tool ) object");
|
||||
this->UsePlacement.setValue(false);
|
||||
|
||||
|
||||
@@ -78,13 +78,10 @@ Transformed::Transformed()
|
||||
(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", false));
|
||||
//init Refine property
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/PartDesign");
|
||||
this->Refine.setValue(hGrp->GetBool("RefineModel", true));
|
||||
}
|
||||
|
||||
void Transformed::positionBySupport()
|
||||
|
||||
@@ -387,7 +387,7 @@ void SubShapeBinder::setupObject() {
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/PartDesign");
|
||||
this->Refine.setValue(hGrp->GetBool("RefineModel", false));
|
||||
this->Refine.setValue(hGrp->GetBool("RefineModel", true));
|
||||
}
|
||||
|
||||
App::DocumentObject* SubShapeBinder::getSubObject(const char* subname, PyObject** pyObj,
|
||||
|
||||
@@ -1420,7 +1420,7 @@ class TestTopologicalNamingProblem(unittest.TestCase):
|
||||
edges = [name for name in reverseMap.keys() if name.startswith("Edge")]
|
||||
vertexes = [name for name in reverseMap.keys() if name.startswith("Vertex")]
|
||||
self.assertEqual(len(body.Shape.childShapes()), 1)
|
||||
self.assertEqual(body.Shape.childShapes()[0].ElementMapSize, 62)
|
||||
self.assertEqual(body.Shape.childShapes()[0].ElementMapSize, 64)
|
||||
self.assertEqual(len(reverseMap),62)
|
||||
self.assertEqual(len(faces),12)
|
||||
self.assertEqual(len(edges),30)
|
||||
|
||||
Reference in New Issue
Block a user