Disable closed Loft for less than 3 profiles
This commit is contained in:
committed by
Yorik van Havre
parent
fed918a151
commit
df8c9d5def
@@ -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<TopoShape> 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
|
||||
|
||||
Reference in New Issue
Block a user