add MaxDegree setting to Part.Loft

This commit is contained in:
tomate44
2017-09-16 16:36:28 +02:00
committed by wmayer
parent 2db155a0c2
commit f335d1f10d
5 changed files with 16 additions and 7 deletions

View File

@@ -265,6 +265,7 @@ Loft::Loft()
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");
ADD_PROPERTY_TYPE(MaxDegree,(5),"Loft",App::Prop_None,"Maximum Degree");
}
short Loft::mustExecute() const
@@ -277,6 +278,8 @@ short Loft::mustExecute() const
return 1;
if (Closed.isTouched())
return 1;
if (MaxDegree.isTouched())
return 1;
return 0;
}
@@ -334,9 +337,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;
int degMax = MaxDegree.getValue();
TopoShape myShape;
this->Shape.setValue(myShape.makeLoft(profiles, isSolid, isRuled,isClosed));
this->Shape.setValue(myShape.makeLoft(profiles, isSolid, isRuled, isClosed, degMax));
return App::DocumentObject::StdReturn;
}
catch (Standard_Failure& e) {