PartDesign: Update error message about multiple solids (#23286)

This commit is contained in:
FEA-eng
2025-08-22 20:29:50 +02:00
committed by GitHub
parent 26a7067e44
commit b7c233b94e
11 changed files with 32 additions and 11 deletions

View File

@@ -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
}
}

View File

@@ -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
}

View File

@@ -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());
}
}

View File

@@ -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));
}

View File

@@ -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);
}
}

View File

@@ -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)
}

View File

@@ -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

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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)
}
}

View File

@@ -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