[Part] Extrusion: stop if intermediate shape is Null

besides the error message, we need to raise an error

- also fine-tune the wording
This commit is contained in:
Uwe
2022-01-31 01:07:33 +01:00
parent d455783ebe
commit 065e87f313

View File

@@ -737,9 +737,12 @@ void Extrusion::createTaperedPrismOffset(TopoDS_Wire sourceWire,
}
if (offsetShape.IsNull()) {
if (isSecond)
Base::Console().Error("Extrusion: end face of tapered against extrusion is empty\n");
Base::Console().Error("Extrusion: end face of tapered against extrusion is empty\n" \
"This means most probably that the against taper angle is too large or small.\n");
else
Base::Console().Error("Extrusion: end face of tapered along extrusion is empty\n");
Base::Console().Error("Extrusion: end face of tapered along extrusion is empty\n" \
"This means most probably that the along taper angle is too large or small.\n");
Standard_Failure::Raise("Extrusion: end face of tapered extrusion is empty");
}
// assure we return a wire and no edge
TopAbs_ShapeEnum type = offsetShape.ShapeType();
@@ -757,10 +760,10 @@ void Extrusion::createTaperedPrismOffset(TopoDS_Wire sourceWire,
result = TopoDS_Wire();
if (isSecond)
Base::Console().Error("Extrusion: type of against extrusion end face is not supported.\n" \
"This means most probably that the against taper angle is too large.\n");
"This means most probably that the against taper angle is too large or small.\n");
else
Base::Console().Error("Extrusion: type of along extrusion is not supported.\n" \
"This means most probably that the along taper angle is too large.\n");
"This means most probably that the along taper angle is too large or small.\n");
}
}