diff --git a/src/Mod/Fem/App/FemConstraint.cpp b/src/Mod/Fem/App/FemConstraint.cpp index fddf496146..606e373b92 100644 --- a/src/Mod/Fem/App/FemConstraint.cpp +++ b/src/Mod/Fem/App/FemConstraint.cpp @@ -91,6 +91,19 @@ Constraint::Constraint() App::PropertyType(App::Prop_Output), "Scale used for drawing constraints"); // OvG: Add scale parameter inherited // by all derived constraints + ADD_PROPERTY_TYPE(Points, + (Base::Vector3d()), + "Constraint", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output | App::Prop_Hidden), + "Points where symbols are drawn"); + ADD_PROPERTY_TYPE(Normals, + (Base::Vector3d()), + "Constraint", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output | App::Prop_Hidden), + "Normals where symbols are drawn"); + + Points.setValues(std::vector()); + Normals.setValues(std::vector()); References.setScope(App::LinkScope::Global); } @@ -165,6 +178,16 @@ void Constraint::onChanged(const App::Property* prop) } } } + + std::vector points; + std::vector normals; + int scale = 1; + if (getPoints(points, normals, &scale)) { + Points.setValues(points); + Normals.setValues(normals); + Scale.setValue(scale); + Points.touch(); + } } App::DocumentObject::onChanged(prop); diff --git a/src/Mod/Fem/App/FemConstraint.h b/src/Mod/Fem/App/FemConstraint.h index e5f9c0782f..dba4804af3 100644 --- a/src/Mod/Fem/App/FemConstraint.h +++ b/src/Mod/Fem/App/FemConstraint.h @@ -102,6 +102,10 @@ public: */ App::PropertyInteger Scale; + // Read-only (calculated values). These trigger changes in the ViewProvider + App::PropertyVectorList Points; + App::PropertyVectorList Normals; + /** * @brief Updates @ref NormalDirection. * diff --git a/src/Mod/Fem/App/FemConstraintContact.cpp b/src/Mod/Fem/App/FemConstraintContact.cpp index f4d4fa5268..51c74389b6 100644 --- a/src/Mod/Fem/App/FemConstraintContact.cpp +++ b/src/Mod/Fem/App/FemConstraintContact.cpp @@ -58,20 +58,6 @@ ConstraintContact::ConstraintContact() "ConstraintContact", App::PropertyType(App::Prop_None), "Stick slope"); - - ADD_PROPERTY_TYPE(Points, - (Base::Vector3d()), - "ConstraintContact", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals, - (Base::Vector3d()), - "ConstraintContact", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Normals where symbols are drawn"); - /* */ - Points.setValues(std::vector()); - Normals.setValues(std::vector()); } App::DocumentObjectExecReturn* ConstraintContact::execute() @@ -87,18 +73,6 @@ const char* ConstraintContact::getViewProviderName() const void ConstraintContact::onChanged(const App::Property* prop) { Constraint::onChanged(prop); - - if (prop == &References) { - std::vector points; - std::vector 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() - } - } } void ConstraintContact::handleChangedPropertyType(Base::XMLReader& reader, diff --git a/src/Mod/Fem/App/FemConstraintContact.h b/src/Mod/Fem/App/FemConstraintContact.h index 68b17eef8b..c2cc575b30 100644 --- a/src/Mod/Fem/App/FemConstraintContact.h +++ b/src/Mod/Fem/App/FemConstraintContact.h @@ -38,10 +38,6 @@ public: /// Constructor ConstraintContact(); - // Read-only (calculated values). These trigger changes in the ViewProvider - App::PropertyVectorList Points; - App::PropertyVectorList Normals; - /*Note*/ // Constraint parameters /****** diff --git a/src/Mod/Fem/App/FemConstraintDisplacement.cpp b/src/Mod/Fem/App/FemConstraintDisplacement.cpp index 4ef6497c70..7f8c3d7f85 100644 --- a/src/Mod/Fem/App/FemConstraintDisplacement.cpp +++ b/src/Mod/Fem/App/FemConstraintDisplacement.cpp @@ -78,20 +78,6 @@ ConstraintDisplacement::ConstraintDisplacement() ADD_PROPERTY(rotzFix, (false)); ADD_PROPERTY(rotzFree, (true)); ADD_PROPERTY(zRotation, (0.0)); - - ADD_PROPERTY_TYPE(Points, - (Base::Vector3d()), - "ConstraintFixed", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals, - (Base::Vector3d()), - "ConstraintFixed", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Normals where symbols are drawn"); - - Points.setValues(std::vector()); - Normals.setValues(std::vector()); } App::DocumentObjectExecReturn* ConstraintDisplacement::execute() @@ -148,19 +134,5 @@ void ConstraintDisplacement::handleChangedPropertyType(Base::XMLReader& reader, void ConstraintDisplacement::onChanged(const App::Property* prop) { - // Note: If we call this at the end, then the arrows are not oriented correctly initially - // because the NormalDirection has not been calculated yet Constraint::onChanged(prop); - - if (prop == &References) { - std::vector points; - std::vector 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() - } - } } diff --git a/src/Mod/Fem/App/FemConstraintDisplacement.h b/src/Mod/Fem/App/FemConstraintDisplacement.h index 69fa72248f..ef480b1f59 100644 --- a/src/Mod/Fem/App/FemConstraintDisplacement.h +++ b/src/Mod/Fem/App/FemConstraintDisplacement.h @@ -40,10 +40,6 @@ public: /// Constructor ConstraintDisplacement(); - // Read-only (calculated values). These trigger changes in the ViewProvider - App::PropertyVectorList Points; - App::PropertyVectorList Normals; - // Displacement parameters App::PropertyDistance xDisplacement; App::PropertyDistance yDisplacement; diff --git a/src/Mod/Fem/App/FemConstraintFixed.cpp b/src/Mod/Fem/App/FemConstraintFixed.cpp index 0df6f879f5..59db8bc816 100644 --- a/src/Mod/Fem/App/FemConstraintFixed.cpp +++ b/src/Mod/Fem/App/FemConstraintFixed.cpp @@ -31,20 +31,7 @@ using namespace Fem; PROPERTY_SOURCE(Fem::ConstraintFixed, Fem::Constraint) ConstraintFixed::ConstraintFixed() -{ - ADD_PROPERTY_TYPE(Points, - (Base::Vector3d()), - "ConstraintFixed", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals, - (Base::Vector3d()), - "ConstraintFixed", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Normals where symbols are drawn"); - Points.setValues(std::vector()); - Normals.setValues(std::vector()); -} +{} App::DocumentObjectExecReturn* ConstraintFixed::execute() { @@ -53,19 +40,5 @@ App::DocumentObjectExecReturn* ConstraintFixed::execute() void ConstraintFixed::onChanged(const App::Property* prop) { - // Note: If we call this at the end, then the symbols are not oriented correctly initially - // because the NormalDirection has not been calculated yet Constraint::onChanged(prop); - - if (prop == &References) { - std::vector points; - std::vector 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() - } - } } diff --git a/src/Mod/Fem/App/FemConstraintFixed.h b/src/Mod/Fem/App/FemConstraintFixed.h index a7d2d1462b..26a203971b 100644 --- a/src/Mod/Fem/App/FemConstraintFixed.h +++ b/src/Mod/Fem/App/FemConstraintFixed.h @@ -38,10 +38,6 @@ public: /// Constructor ConstraintFixed(); - // Read-only (calculated values). These trigger changes in the ViewProvider - App::PropertyVectorList Points; - App::PropertyVectorList Normals; - /// recalculate the object App::DocumentObjectExecReturn* execute() override; diff --git a/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp b/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp index 56a98c888d..7675962655 100644 --- a/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp +++ b/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp @@ -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()); 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()); // 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 points; - std::vector 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); diff --git a/src/Mod/Fem/App/FemConstraintFluidBoundary.h b/src/Mod/Fem/App/FemConstraintFluidBoundary.h index 9a43031800..b2904bbba7 100644 --- a/src/Mod/Fem/App/FemConstraintFluidBoundary.h +++ b/src/Mod/Fem/App/FemConstraintFluidBoundary.h @@ -54,8 +54,6 @@ public: App::PropertyBool Reversed; // Read-only (calculated values). These trigger changes in the ViewProvider - App::PropertyVectorList Points; - App::PropertyVectorList Normals; // needed to draw diff BoundaryType App::PropertyVector DirectionVector; /// recalculate the object diff --git a/src/Mod/Fem/App/FemConstraintForce.cpp b/src/Mod/Fem/App/FemConstraintForce.cpp index 79b9d8c746..65da11d919 100644 --- a/src/Mod/Fem/App/FemConstraintForce.cpp +++ b/src/Mod/Fem/App/FemConstraintForce.cpp @@ -46,11 +46,6 @@ ConstraintForce::ConstraintForce() Direction.setScope(App::LinkScope::Global); ADD_PROPERTY(Reversed, (0)); - ADD_PROPERTY_TYPE(Points, - (Base::Vector3d()), - "ConstraintForce", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Points where arrows are drawn"); ADD_PROPERTY_TYPE(DirectionVector, (Base::Vector3d(0, 0, 1)), "ConstraintForce", @@ -59,7 +54,6 @@ ConstraintForce::ConstraintForce() // by default use the null vector to indicate an invalid value naturalDirectionVector = Base::Vector3d(0, 0, 0); - Points.setValues(std::vector()); } App::DocumentObjectExecReturn* ConstraintForce::execute() @@ -91,19 +85,7 @@ void ConstraintForce::onChanged(const App::Property* prop) // because the NormalDirection has not been calculated yet Constraint::onChanged(prop); - if (prop == &References) { - std::vector points; - std::vector normals; - int scale = 1; // OvG: Enforce use of scale - if (getPoints(points, normals, &scale)) { - // We don't use the normals because all arrows should have - // the same direction - Points.setValues(points); - Scale.setValue(scale); - Points.touch(); - } - } - else if (prop == &Direction) { + if (prop == &Direction) { Base::Vector3d direction = getDirection(Direction); if (direction.Length() < Precision::Confusion()) { return; diff --git a/src/Mod/Fem/App/FemConstraintForce.h b/src/Mod/Fem/App/FemConstraintForce.h index f669f63a6a..1c8bed7f0d 100644 --- a/src/Mod/Fem/App/FemConstraintForce.h +++ b/src/Mod/Fem/App/FemConstraintForce.h @@ -41,8 +41,6 @@ public: App::PropertyForce Force; App::PropertyLinkSub Direction; App::PropertyBool Reversed; - // Read-only (calculated values). These trigger changes in the ViewProvider - App::PropertyVectorList Points; App::PropertyVector DirectionVector; /// recalculate the object diff --git a/src/Mod/Fem/App/FemConstraintHeatflux.cpp b/src/Mod/Fem/App/FemConstraintHeatflux.cpp index fdff59ced9..5b77b97e28 100644 --- a/src/Mod/Fem/App/FemConstraintHeatflux.cpp +++ b/src/Mod/Fem/App/FemConstraintHeatflux.cpp @@ -45,19 +45,6 @@ ConstraintHeatflux::ConstraintHeatflux() (App::PropertyType)(App::Prop_None), "Type of constraint, surface convection or surface heat flux"); ConstraintType.setEnums(ConstraintTypes); - - ADD_PROPERTY_TYPE(Points, - (Base::Vector3d()), - "ConstraintHeatflux", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals, - (Base::Vector3d()), - "ConstraintHeatflux", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Normals where symbols are drawn"); - Points.setValues(std::vector()); - Normals.setValues(std::vector()); } App::DocumentObjectExecReturn* ConstraintHeatflux::execute() @@ -72,19 +59,5 @@ const char* ConstraintHeatflux::getViewProviderName() const void ConstraintHeatflux::onChanged(const App::Property* prop) { - // Note: If we call this at the end, then the arrows are not oriented correctly initially - // because the NormalDirection has not been calculated yet Constraint::onChanged(prop); - - if (prop == &References) { - std::vector points; - std::vector 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() - } - } } diff --git a/src/Mod/Fem/App/FemConstraintHeatflux.h b/src/Mod/Fem/App/FemConstraintHeatflux.h index 69a37d41e5..2da3653264 100644 --- a/src/Mod/Fem/App/FemConstraintHeatflux.h +++ b/src/Mod/Fem/App/FemConstraintHeatflux.h @@ -45,9 +45,6 @@ public: App::PropertyFloat DFlux; App::PropertyEnumeration ConstraintType; - App::PropertyVectorList Points; - App::PropertyVectorList Normals; - /// recalculate the object App::DocumentObjectExecReturn* execute() override; diff --git a/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp b/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp index cb2af6aa78..0a6420a0a8 100644 --- a/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp +++ b/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp @@ -36,19 +36,6 @@ ConstraintInitialTemperature::ConstraintInitialTemperature() { ADD_PROPERTY(initialTemperature, (300.0)); - ADD_PROPERTY_TYPE(Points, - (Base::Vector3d()), - "ConstraintInitialTemperature", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals, - (Base::Vector3d()), - "ConstraintInitialTemperature", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Normals where symbols are drawn"); - Points.setValues(std::vector()); - Normals.setValues(std::vector()); - References.setStatus(App::Property::ReadOnly, true); References.setStatus(App::Property::Hidden, true); } @@ -81,19 +68,5 @@ void ConstraintInitialTemperature::handleChangedPropertyType(Base::XMLReader& re void ConstraintInitialTemperature::onChanged(const App::Property* prop) { - // Note: If we call this at the end, then the arrows are not oriented correctly initially - // because the NormalDirection has not been calculated yet Constraint::onChanged(prop); - - if (prop == &References) { - std::vector points; - std::vector 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() - } - } } diff --git a/src/Mod/Fem/App/FemConstraintInitialTemperature.h b/src/Mod/Fem/App/FemConstraintInitialTemperature.h index fc7331b002..6698a055c0 100644 --- a/src/Mod/Fem/App/FemConstraintInitialTemperature.h +++ b/src/Mod/Fem/App/FemConstraintInitialTemperature.h @@ -40,10 +40,6 @@ public: /// Constructor ConstraintInitialTemperature(); - // Read-only (calculated values). These trigger changes in the ViewProvider - App::PropertyVectorList Points; - App::PropertyVectorList Normals; - // Temperature parameters App::PropertyTemperature initialTemperature; diff --git a/src/Mod/Fem/App/FemConstraintPlaneRotation.cpp b/src/Mod/Fem/App/FemConstraintPlaneRotation.cpp index fd329393a4..53a884a67e 100644 --- a/src/Mod/Fem/App/FemConstraintPlaneRotation.cpp +++ b/src/Mod/Fem/App/FemConstraintPlaneRotation.cpp @@ -31,21 +31,7 @@ using namespace Fem; PROPERTY_SOURCE(Fem::ConstraintPlaneRotation, Fem::Constraint) ConstraintPlaneRotation::ConstraintPlaneRotation() -{ - - ADD_PROPERTY_TYPE(Points, - (Base::Vector3d()), - "ConstraintPlaneRotation", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals, - (Base::Vector3d()), - "ConstraintPlaneRotation", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Normals where symbols are drawn"); - Points.setValues(std::vector()); - Normals.setValues(std::vector()); -} +{} App::DocumentObjectExecReturn* ConstraintPlaneRotation::execute() { @@ -60,16 +46,4 @@ const char* ConstraintPlaneRotation::getViewProviderName() const void ConstraintPlaneRotation::onChanged(const App::Property* prop) { Constraint::onChanged(prop); - - if (prop == &References) { - std::vector points; - std::vector 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() - } - } } diff --git a/src/Mod/Fem/App/FemConstraintPlaneRotation.h b/src/Mod/Fem/App/FemConstraintPlaneRotation.h index a251ded4e8..5ef2e0471e 100644 --- a/src/Mod/Fem/App/FemConstraintPlaneRotation.h +++ b/src/Mod/Fem/App/FemConstraintPlaneRotation.h @@ -38,11 +38,6 @@ public: /// Constructor ConstraintPlaneRotation(); - // Read-only (calculated values). These trigger changes in the ViewProvider - App::PropertyVectorList Points; - App::PropertyVectorList Normals; - - /// recalculate the object App::DocumentObjectExecReturn* execute() override; diff --git a/src/Mod/Fem/App/FemConstraintPressure.cpp b/src/Mod/Fem/App/FemConstraintPressure.cpp index 911d555056..427617139b 100644 --- a/src/Mod/Fem/App/FemConstraintPressure.cpp +++ b/src/Mod/Fem/App/FemConstraintPressure.cpp @@ -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()); - Normals.setValues(std::vector()); } App::DocumentObjectExecReturn* ConstraintPressure::execute() @@ -80,18 +68,7 @@ void ConstraintPressure::onChanged(const App::Property* prop) { Constraint::onChanged(prop); - if (prop == &References) { - std::vector points; - std::vector 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(); } } diff --git a/src/Mod/Fem/App/FemConstraintPressure.h b/src/Mod/Fem/App/FemConstraintPressure.h index c3f4de62b4..5568bcdc3f 100644 --- a/src/Mod/Fem/App/FemConstraintPressure.h +++ b/src/Mod/Fem/App/FemConstraintPressure.h @@ -39,8 +39,6 @@ public: App::PropertyPressure Pressure; App::PropertyBool Reversed; - App::PropertyVectorList Points; - App::PropertyVectorList Normals; /// recalculate the object App::DocumentObjectExecReturn* execute() override; diff --git a/src/Mod/Fem/App/FemConstraintSpring.cpp b/src/Mod/Fem/App/FemConstraintSpring.cpp index 6aa2dbdb6d..1ce3db58a5 100644 --- a/src/Mod/Fem/App/FemConstraintSpring.cpp +++ b/src/Mod/Fem/App/FemConstraintSpring.cpp @@ -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()); - Normals.setValues(std::vector()); } 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 points; - std::vector normals; - int scale = Scale.getValue(); - if (getPoints(points, normals, &scale)) { - Points.setValues(points); - Normals.setValues(normals); - Scale.setValue(scale); - Points.touch(); - } - } } diff --git a/src/Mod/Fem/App/FemConstraintSpring.h b/src/Mod/Fem/App/FemConstraintSpring.h index 52caebf723..427dffab0a 100644 --- a/src/Mod/Fem/App/FemConstraintSpring.h +++ b/src/Mod/Fem/App/FemConstraintSpring.h @@ -40,8 +40,6 @@ public: App::PropertyStiffness NormalStiffness; App::PropertyStiffness TangentialStiffness; App::PropertyEnumeration ElmerStiffness; - App::PropertyVectorList Points; - App::PropertyVectorList Normals; /// recalculate the object App::DocumentObjectExecReturn* execute() override; diff --git a/src/Mod/Fem/App/FemConstraintTemperature.cpp b/src/Mod/Fem/App/FemConstraintTemperature.cpp index 6c906333c8..c13801425e 100644 --- a/src/Mod/Fem/App/FemConstraintTemperature.cpp +++ b/src/Mod/Fem/App/FemConstraintTemperature.cpp @@ -44,19 +44,6 @@ ConstraintTemperature::ConstraintTemperature() (App::PropertyType)(App::Prop_None), "Type of constraint, temperature or concentrated heat flux"); ConstraintType.setEnums(ConstraintTypes); - - ADD_PROPERTY_TYPE(Points, - (Base::Vector3d()), - "ConstraintTemperature", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals, - (Base::Vector3d()), - "ConstraintTemperature", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Normals where symbols are drawn"); - Points.setValues(std::vector()); - Normals.setValues(std::vector()); } App::DocumentObjectExecReturn* ConstraintTemperature::execute() @@ -93,19 +80,5 @@ void ConstraintTemperature::handleChangedPropertyType(Base::XMLReader& reader, void ConstraintTemperature::onChanged(const App::Property* prop) { - // Note: If we call this at the end, then the arrows are not oriented correctly initially - // because the NormalDirection has not been calculated yet Constraint::onChanged(prop); - - if (prop == &References) { - std::vector points; - std::vector 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() - } - } } diff --git a/src/Mod/Fem/App/FemConstraintTemperature.h b/src/Mod/Fem/App/FemConstraintTemperature.h index b857c23a7f..cf5612e2ef 100644 --- a/src/Mod/Fem/App/FemConstraintTemperature.h +++ b/src/Mod/Fem/App/FemConstraintTemperature.h @@ -40,10 +40,6 @@ public: /// Constructor ConstraintTemperature(); - // Read-only (calculated values). These trigger changes in the ViewProvider - App::PropertyVectorList Points; - App::PropertyVectorList Normals; - // Temperature parameters App::PropertyTemperature Temperature; App::PropertyPower CFlux; diff --git a/src/Mod/Fem/App/FemConstraintTransform.cpp b/src/Mod/Fem/App/FemConstraintTransform.cpp index 53947104b2..dc2856caa6 100644 --- a/src/Mod/Fem/App/FemConstraintTransform.cpp +++ b/src/Mod/Fem/App/FemConstraintTransform.cpp @@ -66,18 +66,6 @@ ConstraintTransform::ConstraintTransform() "ConstraintTransform", App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Axis of cylindrical surface"); - ADD_PROPERTY_TYPE(Points, - (Base::Vector3d()), - "ConstraintTransform", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals, - (Base::Vector3d()), - "ConstraintTransform", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Normals where symbols are drawn"); - Points.setValues(std::vector()); - Normals.setValues(std::vector()); } App::DocumentObjectExecReturn* ConstraintTransform::execute() @@ -124,10 +112,6 @@ void ConstraintTransform::onChanged(const App::Property* prop) std::vector 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() std::string transform_type = TransformType.getValueAsString(); if (transform_type == "Cylindrical") { // Find data of cylinder diff --git a/src/Mod/Fem/App/FemConstraintTransform.h b/src/Mod/Fem/App/FemConstraintTransform.h index 27eb133da6..3c77fc948c 100644 --- a/src/Mod/Fem/App/FemConstraintTransform.h +++ b/src/Mod/Fem/App/FemConstraintTransform.h @@ -40,8 +40,6 @@ public: // Read-only (calculated values). These trigger changes in the ViewProvider App::PropertyLinkSubList RefDispl; App::PropertyLinkList NameDispl; - App::PropertyVectorList Points; - App::PropertyVectorList Normals; App::PropertyVector BasePoint; App::PropertyVector Axis; App::PropertyAngle X_rot;