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
@@ -124,7 +124,12 @@ App::DocumentObjectExecReturn* FeaturePrimitive::execute(const TopoDS_Shape& pri
|
||||
// lets check if the result is a solid
|
||||
if (boolOp.IsNull())
|
||||
return new App::DocumentObjectExecReturn("Resulting shape is not a solid");
|
||||
|
||||
|
||||
int solidCount = countSolids(boolOp);
|
||||
if (solidCount > 1) {
|
||||
return new App::DocumentObjectExecReturn("Additive: Result has multiple solids. Check parameters.");
|
||||
}
|
||||
|
||||
boolOp = refineShapeIfActive(boolOp);
|
||||
Shape.setValue(getSolid(boolOp));
|
||||
AddSubShape.setValue(primitiveShape);
|
||||
@@ -139,6 +144,11 @@ App::DocumentObjectExecReturn* FeaturePrimitive::execute(const TopoDS_Shape& pri
|
||||
// lets check if the result is a solid
|
||||
if (boolOp.IsNull())
|
||||
return new App::DocumentObjectExecReturn("Resulting shape is not a solid");
|
||||
|
||||
int solidCount = countSolids(boolOp);
|
||||
if (solidCount > 1) {
|
||||
return new App::DocumentObjectExecReturn("Subtractive: Result has multiple solids. Check parameters.");
|
||||
}
|
||||
|
||||
boolOp = refineShapeIfActive(boolOp);
|
||||
Shape.setValue(getSolid(boolOp));
|
||||
|
||||
Reference in New Issue
Block a user