Fix #3401 warning on multiple solid
- PartDesign only uses the first result shape of an operation and discards the rest without warning. - this also fixes #1707
This commit is contained in:
committed by
Yorik van Havre
parent
97932a25bc
commit
0d3008e4eb
@@ -225,10 +225,21 @@ App::DocumentObjectExecReturn *Pad::execute(void)
|
||||
// lets check if the result is a solid
|
||||
if (solRes.IsNull())
|
||||
return new App::DocumentObjectExecReturn("Pad: Resulting shape is not a solid");
|
||||
|
||||
int solidCount = countSolids(result);
|
||||
if (solidCount > 1) {
|
||||
return new App::DocumentObjectExecReturn("Pad: Result has multiple solids. Check parameters.");
|
||||
}
|
||||
|
||||
solRes = refineShapeIfActive(solRes);
|
||||
this->Shape.setValue(getSolid(solRes));
|
||||
} else {
|
||||
this->Shape.setValue(getSolid(prism));
|
||||
int solidCount = countSolids(prism);
|
||||
if (solidCount > 1) {
|
||||
return new App::DocumentObjectExecReturn("Pad: Result has multiple solids. Check parameters.");
|
||||
}
|
||||
|
||||
this->Shape.setValue(getSolid(prism));
|
||||
}
|
||||
|
||||
return App::DocumentObject::StdReturn;
|
||||
|
||||
Reference in New Issue
Block a user