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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user