Add function to Close Part.Loft (Gui & scripting)

This commit is contained in:
WandererFan
2014-04-07 15:50:18 -04:00
committed by wmayer
parent 9affb1886a
commit 113e6026e4
7 changed files with 77 additions and 19 deletions

View File

@@ -207,6 +207,7 @@ Loft::Loft()
Sections.setSize(0);
ADD_PROPERTY_TYPE(Solid,(false),"Loft",App::Prop_None,"Create solid");
ADD_PROPERTY_TYPE(Ruled,(false),"Loft",App::Prop_None,"Ruled surface");
ADD_PROPERTY_TYPE(Closed,(false),"Loft",App::Prop_None,"Close Last to First Profile");
}
short Loft::mustExecute() const
@@ -217,6 +218,8 @@ short Loft::mustExecute() const
return 1;
if (Ruled.isTouched())
return 1;
if (Closed.isTouched())
return 1;
return 0;
}
@@ -262,9 +265,10 @@ App::DocumentObjectExecReturn *Loft::execute(void)
Standard_Boolean isSolid = Solid.getValue() ? Standard_True : Standard_False;
Standard_Boolean isRuled = Ruled.getValue() ? Standard_True : Standard_False;
Standard_Boolean isClosed = Closed.getValue() ? Standard_True : Standard_False;
TopoShape myShape;
this->Shape.setValue(myShape.makeLoft(profiles, isSolid, isRuled));
this->Shape.setValue(myShape.makeLoft(profiles, isSolid, isRuled,isClosed));
return App::DocumentObject::StdReturn;
}
catch (Standard_Failure) {