[PartDesign] Draft angle property change from App::PropertyFloatConstraint to App::PropertyAngle
This commit is contained in:
@@ -65,12 +65,10 @@ using namespace PartDesign;
|
||||
|
||||
PROPERTY_SOURCE(PartDesign::Draft, PartDesign::DressUp)
|
||||
|
||||
const App::PropertyFloatConstraint::Constraints floatAngle = {0.0,89.99,0.1};
|
||||
|
||||
Draft::Draft()
|
||||
{
|
||||
ADD_PROPERTY(Angle,(1.5));
|
||||
Angle.setConstraints(&floatAngle);
|
||||
ADD_PROPERTY_TYPE(NeutralPlane,(0),"Draft",(App::PropertyType)(App::Prop_None),"NeutralPlane");
|
||||
ADD_PROPERTY_TYPE(PullDirection,(0),"Draft",(App::PropertyType)(App::Prop_None),"PullDirection");
|
||||
ADD_PROPERTY(Reversed,(0));
|
||||
@@ -105,7 +103,10 @@ App::DocumentObjectExecReturn *Draft::execute(void)
|
||||
return new App::DocumentObjectExecReturn("No faces specified");
|
||||
|
||||
// Draft angle
|
||||
double angle = Angle.getValue() / 180.0 * M_PI;
|
||||
double angle = Angle.getValue();
|
||||
angle = angle >= 90.0 ? 89.99 : angle < 0.0 ? 0.0 : angle;
|
||||
Angle.setValue(angle);
|
||||
angle = angle / 180.0 * M_PI;
|
||||
|
||||
// Pull direction
|
||||
gp_Dir pullDirection;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#define PARTDESIGN_FEATUREDRAFT_H
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include "FeatureDressUp.h"
|
||||
|
||||
@@ -38,7 +39,7 @@ class PartDesignExport Draft : public DressUp
|
||||
public:
|
||||
Draft();
|
||||
|
||||
App::PropertyFloatConstraint Angle;
|
||||
App::PropertyAngle Angle;
|
||||
App::PropertyLinkSub NeutralPlane;
|
||||
App::PropertyLinkSub PullDirection;
|
||||
App::PropertyBool Reversed;
|
||||
|
||||
Reference in New Issue
Block a user