View Issue Details

IDProjectCategoryView StatusLast Update
0003617FEMBugpublic2019-01-14 18:37
Reporterberndhahnebach Assigned Toickby  
Status closedResolutionfixed 
Fixed in Version0.18 
Summary0003617: FEM, post processing, vtk mesh, it is not possible to create a vtk mesh with gaps
Steps To Reproduce- open FEM 2D example
- select solver
- change "Beam Shell Result Output 3D" to true
- rerun analysis
- check Abs displacement colors in standard result object, they look fine.
- select the 3D solid result object
- create vtk pipe
- some error in report view is printed
- double click on the pipeline
- set mode "Surface wit edges"
- set field to "Displacement"
- set vector to "Magnitude"
- this does not look to be the right coloring ...

to reproduce by Python (tested with FreeCAD 0.18.15607) use:

# load 2D example file and set 3D output in solver
doc ="AppHomePath") + 'data/examples/FemCalculixCantilever2D.FCStd')
doc.FEMMeshGmsh.ViewObject.Visibility = False
doc.CalculiXccxTools.BeamShellResultOutput3D = True
# run the analysis
import FemGui
from femtools import ccxtools
fea = ccxtools.FemToolsCcx()
doc.Result_mesh.ViewObject.Visibility = False
# create vtk result pipline
import ObjectsFem
ObjectsFem.makePostVtkResult(doc, doc.CalculiX_static_results)
doc.FEMVtkResult.ViewObject.DisplayMode = 'Surface with Edges'
doc.FEMVtkResult.ViewObject.Field = 'DisplacementVectors'
doc.FEMVtkResult.ViewObject.VectorMode = 'Magnitude'
TagsNo tags attached.
FreeCAD Information


related to 0002873 closedberndhahnebach FEM, mesh, unv writer, do not renumbering on file writing 



2018-09-26 21:25

developer   ~0011860

the code ...


2018-09-26 21:28

developer   ~0011861

Last edited: 2018-09-26 21:29

If the FreeCAD file is saved and reopened the problem could be even worse, because of 0002873. But both are totally independent!


2019-01-03 09:21

developer   ~0012363

Problem are the not continuous node ids in the freecad mesh. In general the FEM result property stores all results for the individual mesh nodes by index, assuming index==id. Hence Node 1 result is in result vector at position 1. However, when the node ids are not continuous in the freecad mesh, e.g. there are 3 nodes but ids are [0 1 5], that mapping does not work for VTK anymore. The reason is that in VTK node ids must be continuous, the example mesh would result in the following VTK nodes [0 1 2 3 4 5] with ids 2,3,4 existing but not used by any elements. Now with index==id the results would be assigned to ids [0 1 2] instead of [0 1 5], which results in the display error.

The solution is to remove the assumption index==id and use the correct note id for each result value:

@berndhahnebach Could you do some regression testing with this fix?


2019-01-14 18:37

administrator   ~0012431

Issue History

Date Modified Username Field Change
2018-09-25 21:30 berndhahnebach New Issue
2018-09-25 21:30 berndhahnebach Status new => confirmed
2018-09-26 21:25 berndhahnebach Note Added: 0011860
2018-09-26 21:28 berndhahnebach Note Added: 0011861
2018-09-26 21:28 berndhahnebach Note Edited: 0011861
2018-09-26 21:29 berndhahnebach Note Edited: 0011861
2019-01-03 09:21 ickby Note Added: 0012363
2019-01-11 06:21 berndhahnebach Steps to Reproduce Updated
2019-01-11 06:58 berndhahnebach Steps to Reproduce Updated
2019-01-11 06:59 berndhahnebach Steps to Reproduce Updated
2019-01-14 15:43 wmayer Relationship added related to 0002873
2019-01-14 18:37 wmayer Assigned To => ickby
2019-01-14 18:37 wmayer Status confirmed => closed
2019-01-14 18:37 wmayer Resolution open => fixed
2019-01-14 18:37 wmayer Fixed in Version => 0.18
2019-01-14 18:37 wmayer Note Added: 0012431