Fem: Move Points and Normals properties to base class
This commit is contained in:
committed by
Chris Hennes
parent
a489b095f0
commit
c49c52716c
@@ -34,18 +34,6 @@ ConstraintPressure::ConstraintPressure()
|
||||
{
|
||||
ADD_PROPERTY(Pressure, (0.0));
|
||||
ADD_PROPERTY(Reversed, (0));
|
||||
ADD_PROPERTY_TYPE(Points,
|
||||
(Base::Vector3d()),
|
||||
"ConstraintPressure",
|
||||
App::PropertyType(App::Prop_ReadOnly | App::Prop_Output),
|
||||
"Points where arrows are drawn");
|
||||
ADD_PROPERTY_TYPE(Normals,
|
||||
(Base::Vector3d()),
|
||||
"ConstraintPressure",
|
||||
App::PropertyType(App::Prop_ReadOnly | App::Prop_Output),
|
||||
"Normals where symbols are drawn");
|
||||
Points.setValues(std::vector<Base::Vector3d>());
|
||||
Normals.setValues(std::vector<Base::Vector3d>());
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn* ConstraintPressure::execute()
|
||||
@@ -80,18 +68,7 @@ void ConstraintPressure::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();
|
||||
}
|
||||
}
|
||||
else if (prop == &Reversed) {
|
||||
if (prop == &Reversed) {
|
||||
Points.touch();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user