Fem: Move Points and Normals properties to base class
This commit is contained in:
committed by
Chris Hennes
parent
a489b095f0
commit
c49c52716c
@@ -37,20 +37,8 @@ ConstraintSpring::ConstraintSpring()
|
||||
ADD_PROPERTY(NormalStiffness, (0.0));
|
||||
ADD_PROPERTY(TangentialStiffness, (0.0));
|
||||
ADD_PROPERTY(ElmerStiffness, (1));
|
||||
ADD_PROPERTY_TYPE(Points,
|
||||
(Base::Vector3d()),
|
||||
"ConstraintSpring",
|
||||
App::PropertyType(App::Prop_ReadOnly | App::Prop_Output),
|
||||
"Points where arrows are drawn");
|
||||
ADD_PROPERTY_TYPE(Normals,
|
||||
(Base::Vector3d()),
|
||||
"ConstraintSpring",
|
||||
App::PropertyType(App::Prop_ReadOnly | App::Prop_Output),
|
||||
"Normals where symbols are drawn");
|
||||
|
||||
ElmerStiffness.setEnums(Stiffnesses);
|
||||
Points.setValues(std::vector<Base::Vector3d>());
|
||||
Normals.setValues(std::vector<Base::Vector3d>());
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn* ConstraintSpring::execute()
|
||||
@@ -66,16 +54,4 @@ const char* ConstraintSpring::getViewProviderName() const
|
||||
void ConstraintSpring::onChanged(const App::Property* prop)
|
||||
{
|
||||
Constraint::onChanged(prop);
|
||||
|
||||
if (prop == &References) {
|
||||
std::vector<Base::Vector3d> points;
|
||||
std::vector<Base::Vector3d> normals;
|
||||
int scale = Scale.getValue();
|
||||
if (getPoints(points, normals, &scale)) {
|
||||
Points.setValues(points);
|
||||
Normals.setValues(normals);
|
||||
Scale.setValue(scale);
|
||||
Points.touch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user