PartDesign: Fillet, Chamfer, Draft, Thickness : Enable tool to start with no selection.
This commit is contained in:
@@ -68,7 +68,8 @@ App::DocumentObjectExecReturn *Fillet::execute()
|
||||
Part::TopoShape TopShape;
|
||||
try {
|
||||
TopShape = getBaseShape();
|
||||
} catch (Base::Exception& e) {
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
return new App::DocumentObjectExecReturn(e.what());
|
||||
}
|
||||
std::vector<std::string> SubNames = std::vector<std::string>(Base.getSubValues());
|
||||
@@ -86,9 +87,6 @@ App::DocumentObjectExecReturn *Fillet::execute()
|
||||
|
||||
getContinuousEdges(TopShape, SubNames);
|
||||
|
||||
if (SubNames.empty())
|
||||
return new App::DocumentObjectExecReturn("Fillet not possible on selected shapes");
|
||||
|
||||
double radius = Radius.getValue();
|
||||
|
||||
if(radius <= 0)
|
||||
@@ -96,6 +94,12 @@ App::DocumentObjectExecReturn *Fillet::execute()
|
||||
|
||||
this->positionByBaseFeature();
|
||||
|
||||
//If no element is selected, then we use a copy of previous feature.
|
||||
if (SubNames.empty()) {
|
||||
this->Shape.setValue(TopShape);
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
||||
// create an untransformed copy of the base shape
|
||||
Part::TopoShape baseShape(TopShape);
|
||||
baseShape.setTransform(Base::Matrix4D());
|
||||
|
||||
Reference in New Issue
Block a user