diff --git a/src/Mod/PartDesign/App/FeatureLoft.cpp b/src/Mod/PartDesign/App/FeatureLoft.cpp index c2208a0999..5fc9e2e67a 100644 --- a/src/Mod/PartDesign/App/FeatureLoft.cpp +++ b/src/Mod/PartDesign/App/FeatureLoft.cpp @@ -151,6 +151,12 @@ App::DocumentObjectExecReturn *Loft::execute() wiresections[i++].push_back(s); } + bool closed = Closed.getValue(); + // invalid for less then 3 sections + if (multisections.size() < 2) { + closed = false; + } + TopoShape result(0,hasher); std::vector shapes; @@ -160,7 +166,7 @@ App::DocumentObjectExecReturn *Loft::execute() for(auto& wire : sectionWires) wire.move(invObjLoc); shells.push_back(TopoShape(0, hasher).makeElementLoft( - sectionWires, Part::IsSolid::notSolid, Ruled.getValue()? Part::IsRuled::ruled : Part::IsRuled::notRuled, Closed.getValue() ? Part::IsClosed::closed : Part::IsClosed::notClosed)); + sectionWires, Part::IsSolid::notSolid, Ruled.getValue()? Part::IsRuled::ruled : Part::IsRuled::notRuled, closed ? Part::IsClosed::closed : Part::IsClosed::notClosed)); } // build the top and bottom face, sew the shell and build the final solid