[Gmsh] gmsh.view.getModelData returns empty arrays

Michiel Van Ginderachter michiel.vanginderachter at meteo.be
Wed Jan 23 12:55:38 CET 2019


Dear Developers, 

I was going through the python demos and came across the following issue in the plugin.py example: 

when after creating a view with model data with: 

t = gmsh.view.add("some data") 
gmsh.view.addModelData(t, 0, "test", "NodeData", 
[1, 2, 3, 4], 
[[1.],[10.],[20.],[1.]]) 

I try to retrieve some of the data with: 

dataType, tags, data, time, numComp = gmsh.view.getModelData(t, 0) 
print dataType, tags, data, time, numComp 

i get empty arrays for tags and data: 

NodeData [] [] 0.0 1. 

However, when I store the view in a .msh file and inspect it the data is there. 

gmsh.view.write(t, "test.msh") 

$NodeData 
1 
"some data" 
1 
0 
3 
0 
1 
4 
1 1 
2 10 
3 20 
4 1 
$EndNodeData 

I have tried different versions of the gmsh library on different systems. All seem to have the same issue. 

Best regards, 
Michiel Van Ginderachter 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190123/a8c79947/attachment.html>


More information about the gmsh mailing list