PartDesign: Update error message about multiple solids (#23286)
This commit is contained in:
@@ -160,7 +160,7 @@ App::DocumentObjectExecReturn *Boolean::execute()
|
||||
result = refineShapeIfActive(result);
|
||||
|
||||
if (!isSingleSolidRuleSatisfied(result.getShape())) {
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body."));
|
||||
}
|
||||
|
||||
this->Shape.setValue(getSolid(result));
|
||||
@@ -185,3 +185,6 @@ void Boolean::handleChangedPropertyName(Base::XMLReader &reader, const char * Ty
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ App::DocumentObjectExecReturn *Chamfer::execute()
|
||||
this->rawShape = shape;
|
||||
shape = refineShapeIfActive(shape);
|
||||
if (!isSingleSolidRuleSatisfied(shape.getShape())) {
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids:enable 'Allow Compounds' in the active body."));
|
||||
}
|
||||
|
||||
shape = getSolid(shape);
|
||||
@@ -261,3 +261,5 @@ static App::DocumentObjectExecReturn *validateParameters(int chamferType, double
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ App::DocumentObjectExecReturn *Draft::execute()
|
||||
}
|
||||
|
||||
if (!isSingleSolidRuleSatisfied(shape.getShape())) {
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body."));
|
||||
}
|
||||
|
||||
this->Shape.setValue(getSolid(shape));
|
||||
@@ -299,3 +299,5 @@ App::DocumentObjectExecReturn *Draft::execute()
|
||||
return new App::DocumentObjectExecReturn(e.GetMessageString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -812,7 +812,7 @@ App::DocumentObjectExecReturn* FeatureExtrude::buildExtrusion(ExtrudeOptions opt
|
||||
solRes = refineShapeIfActive(result);
|
||||
|
||||
if (!isSingleSolidRuleSatisfied(solRes.getShape())) {
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body."));
|
||||
}
|
||||
this->Shape.setValue(getSolid(solRes));
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ App::DocumentObjectExecReturn *Fillet::execute()
|
||||
this->rawShape = shape;
|
||||
shape = refineShapeIfActive(shape);
|
||||
if (!isSingleSolidRuleSatisfied(shape.getShape())) {
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body."));
|
||||
}
|
||||
|
||||
shape = getSolid(shape);
|
||||
@@ -145,3 +145,5 @@ void Fillet::handleChangedPropertyType(Base::XMLReader &reader, const char * Typ
|
||||
DressUp::handleChangedPropertyType(reader, TypeName, prop);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ App::DocumentObjectExecReturn *Groove::execute()
|
||||
this->rawShape = boolOp;
|
||||
boolOp = refineShapeIfActive(boolOp);
|
||||
if (!isSingleSolidRuleSatisfied(boolOp.getShape())) {
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body."));
|
||||
}
|
||||
boolOp = getSolid(boolOp);
|
||||
Shape.setValue(boolOp);
|
||||
@@ -384,3 +384,5 @@ void Groove::updateProperties(RevolMethod method)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2182,7 +2182,7 @@ App::DocumentObjectExecReturn* Hole::execute()
|
||||
|
||||
if (!isSingleSolidRuleSatisfied(result.getShape())) {
|
||||
return new App::DocumentObjectExecReturn(
|
||||
QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
|
||||
QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body."));
|
||||
}
|
||||
this->Shape.setValue(result);
|
||||
|
||||
@@ -2768,3 +2768,5 @@ int Hole::baseProfileOption_bitmaskToIdx(int bitmask)
|
||||
|
||||
|
||||
} // namespace PartDesign
|
||||
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ App::DocumentObjectExecReturn *Loft::execute()
|
||||
|
||||
if(base.isNull()) {
|
||||
if (!isSingleSolidRuleSatisfied(result.getShape())) {
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body."));
|
||||
}
|
||||
Shape.setValue(getSolid(result));
|
||||
return App::DocumentObject::StdReturn;
|
||||
@@ -346,3 +346,5 @@ void Loft::handleChangedPropertyType(Base::XMLReader& reader, const char* TypeNa
|
||||
ProfileBased::handleChangedPropertyType(reader, TypeName, prop);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -402,7 +402,7 @@ App::DocumentObjectExecReturn *Pipe::execute()
|
||||
|
||||
if (!isSingleSolidRuleSatisfied(boolOp.getShape())) {
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception",
|
||||
"Result has multiple solids: that is not currently supported."));
|
||||
"Result has multiple solids: enable 'Allow Compounds' in the active body."));
|
||||
}
|
||||
|
||||
// store shape before refinement
|
||||
@@ -637,3 +637,5 @@ void Pipe::handleChangedPropertyName(Base::XMLReader& reader,
|
||||
ProfileBased::handleChangedPropertyName(reader, TypeName, PropName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ App::DocumentObjectExecReturn* Revolution::execute()
|
||||
result = refineShapeIfActive(result);
|
||||
}
|
||||
if (!isSingleSolidRuleSatisfied(result.getShape())) {
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: enable 'Allow Compounds' in the active body."));
|
||||
}
|
||||
result = getSolid(result);
|
||||
this->Shape.setValue(result);
|
||||
@@ -415,3 +415,5 @@ void Revolution::updateProperties(RevolMethod method)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -410,7 +410,7 @@ App::DocumentObjectExecReturn* Transformed::execute()
|
||||
|
||||
supportShape = refineShapeIfActive((supportShape));
|
||||
if (!isSingleSolidRuleSatisfied(supportShape.getShape())) {
|
||||
Base::Console().warning("Transformed: Result has multiple solids. Only keeping the first.\n");
|
||||
Base::Console().warning("Transformed: Result has multiple solids. Only keeping the first. Or enable 'Allow Compounds' in the active body.\n");
|
||||
}
|
||||
|
||||
this->Shape.setValue(getSolid(supportShape)); // picking the first solid
|
||||
@@ -440,3 +440,5 @@ TopoDS_Shape Transformed::getRemainingSolids(const TopoDS_Shape& shape)
|
||||
}
|
||||
|
||||
} // namespace PartDesign
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user