Hi,
I find sometimes that the Displacement minimum factor under "Results" task dialog, which is just 1, is too much to graphically show a small displacement... would it be possible to adjust the factor as, for instance, something like 0,001?
Thank you
Displacement factor under 1?
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Displacement factor under 1?
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: Displacement factor under 1?
By python easily …pablogil wrote:I find sometimes that the Displacement minimum factor under "Results" task dialog, which is just 1, is too much to graphically show a small displacement... would it be possible to adjust the factor as, for instance, something like 0,001?
- start FreeCAD
- Load Start WB
- Load 3D FEM example
- Activate analysis and run analysis
- run the following python code
Code: Select all
mesh_obj = App.ActiveDocument.getObject("Box_Mesh")
result_obj = App.ActiveDocument.getObject("CalculiX_static_results")
mesh_obj.ViewObject.setNodeDisplacementByVectors(result_obj.NodeNumbers, result_obj.DisplacementVectors)
mesh_obj.ViewObject.applyDisplacement(0.1)
Re: Displacement factor under 1?
more result scripting ...
Code: Select all
# set stress color
mesh_obj = App.ActiveDocument.getObject("Box_Mesh")
result_obj = App.ActiveDocument.getObject("CalculiX_static_results")
mesh_obj.ViewObject.setNodeColorByScalars(result_obj.NodeNumbers, result_obj.StressValues)
Code: Select all
# reset stress color
mesh_obj.ViewObject.NodeColor = {}
mesh_obj.ViewObject.ElementColor = {}
mesh_obj.ViewObject.setNodeColorByScalars()
Re: Displacement factor under 1?
small hint for the result scripting above ... use the result mesh not the analysis mesh. I may add the result scripting code to the wiki ...