.:. 20/XII/2018
I'm using the latest version of Pyrosim.
Symptoms:
--when a simulation case is opened in Results for post-processing, after closing and reopening the case, the viewpoints I created are no longer there.
--Importing viewpoints from a _resultsviews.json file returns an error.
After some investigations of the files, I found that this is related to the settings regarding local language. On a Windows machine here typically the local language settings (Dutch) are a comma ',' as a decimal separator instead of the dot '.'.
Results writes viewpoints to the .view file using this local setting for the decimal separator.
But this screws up the file format...
When results reads/imports a .views-file, it assumes a '.' as decimal separator.
So what Results writes on my machine:
...
{
"camera_type" : 0,
"name" : "vanbezijden_5proc",
"nav_tool" : 2,
"state" : {
"fov" : 210,7634582519531,
"loc" : [ 101,6530075073242, -102,8056793212891, 4,040990829467773 ],
"ref" : [ 99,97814941406250, 7,578149795532227, 3,178250074386597 ],
"up" : [ -0,04989999905228615, 0,0000000000000000, 0,9987999796867371 ],
"zoom" : 1,791442275047302,
"zoomloc" : [ -0,01291329693049192, -0,03672822937369347 ]
},
"type" : "camera_view",
"version" : 1
}
...
And what Results wants to read:
...
{
"camera_type" : 0,
"name" : "vanbezijden_05proc",
"nav_tool" : 2,
"state" : {
"fov" : 210.7634582519531,
"loc" : [ 101.6530075073242, -102.8056793212891, 4.040990829467773 ],
"ref" : [ 99.97814941406250, 7.578149795532227, 3.178250074386597 ],
"up" : [ -0.0499, 0.0, 0.9988 ],
"zoom" : 1.791442275047302,
"zoomloc" : [ -0.01291329693049192, -0.03672822937369347 ]
},
"type" : "camera_view",
"version" : 1
},
...
Found work-around:
-------------------------
The work-around for me is to maintain a separate _resultsviews.json file with the correctly formatted numbers and import from that file the views; each time when I close the case, Results writes out in the wrong format; after every reloading I need to re-import the viewpoints. Not a huge problem now I found this work-around, but maybe Thunderhead Engineering can solve this issue in a future version...
best regards,
Joeri