fixes 0003694: Part->Boolean->Cut should show error message if a non-solid (Shell, etc.) is selected
This commit is contained in:
@@ -89,7 +89,15 @@ App::DocumentObjectExecReturn *Boolean::execute(void)
|
||||
|
||||
std::unique_ptr<BRepAlgoAPI_BooleanOperation> mkBool(makeOperation(BaseShape, ToolShape));
|
||||
if (!mkBool->IsDone()) {
|
||||
return new App::DocumentObjectExecReturn("Boolean operation failed");
|
||||
std::stringstream error;
|
||||
error << "Boolean operation failed";
|
||||
if (BaseShape.ShapeType() != TopAbs_SOLID) {
|
||||
error << std::endl << base->Label.getValue() << " is not a solid";
|
||||
}
|
||||
if (ToolShape.ShapeType() != TopAbs_SOLID) {
|
||||
error << std::endl << tool->Label.getValue() << " is not a solid";
|
||||
}
|
||||
return new App::DocumentObjectExecReturn(error.str());
|
||||
}
|
||||
TopoDS_Shape resShape = mkBool->Shape();
|
||||
if (resShape.IsNull()) {
|
||||
|
||||
Reference in New Issue
Block a user