Fem: Update constraint symbol rotation

This commit is contained in:
marioalexis
2025-03-02 00:37:25 -03:00
parent 2b1cd6fe95
commit 8a2d4aeb19
2 changed files with 10 additions and 5 deletions

View File

@@ -200,9 +200,19 @@ void ViewProviderFemConstraint::handleChangedPropertyName(Base::XMLReader& reade
}
}
void ViewProviderFemConstraint::setRotateSymbol(bool rotate)
{
rotateSymbol = rotate;
updateSymbol();
}
void ViewProviderFemConstraint::updateSymbol()
{
auto obj = this->getObject<const Fem::Constraint>();
if (!obj) {
return;
}
const std::vector<Base::Vector3d>& points = obj->Points.getValue();
const std::vector<Base::Vector3d>& normals = obj->Normals.getValue();
if (points.size() != normals.size()) {

View File

@@ -131,11 +131,6 @@ inline bool ViewProviderFemConstraint::getRotateSymbol() const
return rotateSymbol;
}
inline void ViewProviderFemConstraint::setRotateSymbol(bool rotate)
{
rotateSymbol = rotate;
}
using ViewProviderFemConstraintPython = Gui::ViewProviderFeaturePythonT<ViewProviderFemConstraint>;