use constraint to limit minimum and maximum degree

This commit is contained in:
wmayer
2017-09-18 12:06:24 +02:00
parent f335d1f10d
commit eb87a20f8b
4 changed files with 21 additions and 12 deletions

View File

@@ -29,6 +29,7 @@
# include <BRepAdaptor_CompCurve.hxx>
# include <BRepAdaptor_HCompCurve.hxx>
# include <BRepLib_MakeWire.hxx>
# include <Geom_BSplineSurface.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Face.hxx>
# include <TopoDS_Shell.hxx>
@@ -256,6 +257,8 @@ App::DocumentObjectExecReturn *RuledSurface::execute(void)
// ----------------------------------------------------------------------------
App::PropertyIntegerConstraint::Constraints Loft::Degrees = {2,Geom_BSplineSurface::MaxDegree(),1};
PROPERTY_SOURCE(Part::Loft, Part::Feature)
Loft::Loft()
@@ -266,6 +269,7 @@ Loft::Loft()
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");
MaxDegree.setConstraints(&Degrees);
}
short Loft::mustExecute() const