[PartDesign Fillet/Chamfer] add UseAllEdges boolean property (#5340)

- [PartDesign Fillet/Chamfer] add UseAllEdges boolean property
- add UseAllEdges checkbox to fillet and chamfer dialogs
- put UseAllEdges property into Chamfer and Fillet groups, create Fillet group for fillets and put Radius into it, too.
This commit is contained in:
Mark Ganson TheMarkster
2022-02-04 18:50:51 -06:00
committed by GitHub
parent 9c9ed2847b
commit aa76cbc875
13 changed files with 108 additions and 15 deletions

View File

@@ -76,6 +76,9 @@ Chamfer::Chamfer()
Angle.setConstraints(&floatAngle);
ADD_PROPERTY_TYPE(FlipDirection, (false), "Chamfer", App::Prop_None, "Flip direction");
ADD_PROPERTY_TYPE(UseAllEdges, (false), "Chamfer", App::Prop_None,
"Chamfer all edges if true, else use only those edges in Base property.\n"
"If true, then this overrides any edge changes made to the Base property or in the dialog.\n");
updateProperties();
}
@@ -115,8 +118,20 @@ App::DocumentObjectExecReturn *Chamfer::execute(void)
}
std::vector<std::string> SubNames = std::vector<std::string>(Base.getSubValues());
if (UseAllEdges.getValue()){
SubNames.clear();
std::string edgeTypeName = Part::TopoShape::shapeName(TopAbs_EDGE); //"Edge"
int count = TopShape.countSubElements(edgeTypeName.c_str());
for (int ii = 0; ii < count; ii++){
std::ostringstream edgeName;
edgeName << edgeTypeName << ii+1;
SubNames.push_back(edgeName.str());
}
}
std::vector<std::string> FaceNames;
getContinuousEdges(TopShape, SubNames, FaceNames);
if (SubNames.size() == 0)