PartDesign: Subtractive Loft. Raise error when base is null.

Previously Subtractive loft would create a shape if there is no base
object. This is because the code is shared with Additive Loft, where
that is the right thing to do. Now we check for this, and return error
if there is nothing to subtract from.
This commit is contained in:
David Osterberg
2021-02-15 17:46:58 +01:00
committed by wwmayer
parent ef6e8ec844
commit 7803740edd

View File

@@ -179,6 +179,9 @@ App::DocumentObjectExecReturn *Loft::execute(void)
AddSubShape.setValue(result);
if(base.IsNull()) {
if (getAddSubType() == FeatureAddSub::Subtractive)
return new App::DocumentObjectExecReturn("Loft: There is nothing to subtract from\n");
Shape.setValue(getSolid(result));
return App::DocumentObject::StdReturn;
}