Skip to content

Commit

Permalink
PartDesign: Subtractive Loft. Raise error when base is null.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davidosterberg authored and wwmayer committed Feb 15, 2021
1 parent ef6e8ec commit 7803740
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Mod/PartDesign/App/FeatureLoft.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7803740

Please sign in to comment.