I'm playing with the Fem WB and run into trouble because of huge performance problems ...
Since I'm structural engin. the models I'm playing with reach from 2 meters to 50 m. The Fem constraint symbols (the red arrows and boxes) are in a raster of 10 mm. Means on a face of 1 by 1 m there are allready 10000 symbols.
Just tried to adjust this. I checked ViewProviderFemConstraint.cpp and TaskFemConstraint.cpp Found how to adjust the size and the shape of the sympols but I could just not found were to adjust the distance between the symbols. Could someone point me to the right pice of code?
Fem constraint, distance of symbols
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: Fem constraint, distance of symbols
void ViewProviderFemConstraintForce::updateData(const App::Property* prop) and there the call of createArrow
Re: Fem constraint, distance of symbols
Thanks Werner. Found that one before but I could neiter found how to change sep nor where is defined inside sep the distance is 10 mm. sep is Type SoSeparator(). My C++ is just too smal ...wmayer wrote:void ViewProviderFemConstraintForce::updateData(const App::Property* prop) and there the call of createArrow
Mhh found a workaround ... Go get a cup of koffee or two ... The arrows show up even if there are thousands ... Afterwards Visibility can be turned off in view. The constraints are editable even if the symbol is not visible.
I'll come back to this for sure because this needs to be attracked at some point ...
Re: Fem constraint, distance of symbols
Found it ... Just as a reminder the informations.
The points where the arrows are drawn are a property of the FreeCAD ForceObject
but it is read only
src/Mod/Fem/App/FemConstraintForce.cpp
https://github.com/FreeCAD/FreeCAD_sf_m ... tForce.cpp
the step between the points is defined in
src/Mod/Fem/App/FemConstraint.cpp
https://github.com/FreeCAD/FreeCAD_sf_m ... traint.cpp
watch out for for steps, stepsv, stepsu
The points where the arrows are drawn are a property of the FreeCAD ForceObject
Code: Select all
>>> App.ActiveDocument.FemConstraintForce.Points
[Vector (0.0, 0.0, 80.0), Vector (100.0, 0.0, 80.0), Vector (0.0, 100.0, 80.0), Vector (100.0, 100.0, 80.0)]
Code: Select all
>>> App.ActiveDocument.FemConstraintForce.Points = []
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'DocumentObject' attribute 'Points' is read-only
https://github.com/FreeCAD/FreeCAD_sf_m ... tForce.cpp
Code: Select all
ConstraintForce::ConstraintForce()
{
...
ADD_PROPERTY_TYPE(Points, (Base::Vector3d()),"ConstraintForce",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output),
"Points where arrows are drawn");
...}
src/Mod/Fem/App/FemConstraint.cpp
https://github.com/FreeCAD/FreeCAD_sf_m ... traint.cpp
Code: Select all
const bool Constraint::getPoints(std::vector<Base::Vector3d> &points, std::vector<Base::Vector3d> &normals) const
{
...
}