[PD] disallow angles <=0 for holes and revolution

neither the taper, drill or countersink angle can be zero or negative for a valid hole, thus set a constraint
This commit is contained in:
donovaly
2021-03-02 04:02:23 +01:00
committed by wmayer
parent 5edd7d01a0
commit c0de42335b
4 changed files with 12 additions and 0 deletions

View File

@@ -53,6 +53,8 @@ namespace PartDesign {
PROPERTY_SOURCE(PartDesign::Revolution, PartDesign::ProfileBased)
const App::PropertyAngle::Constraints Revolution::floatAngle = { Base::toDegrees<double>(Precision::Angular()), 360.0, 1.0 };
Revolution::Revolution()
{
addSubType = FeatureAddSub::Additive;
@@ -60,6 +62,7 @@ Revolution::Revolution()
ADD_PROPERTY_TYPE(Base,(Base::Vector3d(0.0,0.0,0.0)),"Revolution", App::Prop_ReadOnly, "Base");
ADD_PROPERTY_TYPE(Axis,(Base::Vector3d(0.0,1.0,0.0)),"Revolution", App::Prop_ReadOnly, "Axis");
ADD_PROPERTY_TYPE(Angle,(360.0),"Revolution", App::Prop_None, "Angle");
Angle.setConstraints(&floatAngle);
ADD_PROPERTY_TYPE(ReferenceAxis,(0),"Revolution",(App::Prop_None),"Reference axis of revolution");
}