Fem: Move Points and Normals properties to base class

This commit is contained in:
marioalexis
2024-02-13 19:55:46 -03:00
committed by Chris Hennes
parent a489b095f0
commit c49c52716c
26 changed files with 31 additions and 332 deletions

View File

@@ -96,17 +96,9 @@ ConstraintFluidBoundary::ConstraintFluidBoundary()
"Heat flux value for thermal boundary condition");
ADD_PROPERTY_TYPE(HTCoeffValue,(0.0),"HeatTransfer",(App::PropertyType)(App::Prop_None),
"Heat transfer coefficient for convective boundary condition");
/// geometry rendering related properties
ADD_PROPERTY_TYPE(Points,(Base::Vector3d()),"FluidBoundary",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output),
"Points where arrows are drawn");
Points.setValues(std::vector<Base::Vector3d>());
ADD_PROPERTY_TYPE(DirectionVector,(Base::Vector3d(0,0,1)),"FluidBoundary",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output),
"Direction of arrows");
naturalDirectionVector = Base::Vector3d(0,0,0); // by default use the null vector to indicate an invalid value
// property from: FemConstraintFixed object
ADD_PROPERTY_TYPE(Normals,(Base::Vector3d()),"FluidBoundary",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output),
"Normals where symbols are drawn");
Normals.setValues(std::vector<Base::Vector3d>());
// clang-format on
}
@@ -147,19 +139,6 @@ void ConstraintFluidBoundary::onChanged(const App::Property* prop)
Subtype.setValue(1);
// need to trigger ViewProvider::updateData() for redraw in 3D view after this method
}
// naturalDirectionVector is a private member of this class
if (prop == &References) {
std::vector<Base::Vector3d> points;
std::vector<Base::Vector3d> normals;
int scale = 1; // OvG: Enforce use of scale
if (getPoints(points, normals, &scale)) {
Points.setValues(points);
Normals.setValues(normals);
Scale.setValue(scale); // OvG: Scale
Points.touch(); // This triggers ViewProvider::updateData()
}
}
else if (prop == &Direction) {
Base::Vector3d direction = getDirection(Direction);
// if Direct has no link provided return Base::Vector3d(0,0,0);