4 January 2017 at 1 h 27 min #8259
I reached the SOFA version without ogl.
Therefore, I can use only the program in batch mode,
ewpostek@tryton-ap:~/sofa_without_ogl_a/build/tmp_x$ ../bin/runSofa -g batch MultipleObjectsTwoCubes.scn
Computing 1000 iterations.
1000 iterations done in 0.378546 s ( 2641.69 FPS).
1000 iterations done in 0.378551 s ( 2641.65 FPS).
Could you be so kind to explain me
1) obtain files for visualisation
using any method – for example, for paraview, for gmsh,
or any other format
2) simply, how to print results to files, like
in a finite element code – stresses, strains, displacements, etc.
I can interpret them or transform them into a postprocessing
thank you in advance,
SOFA after commit #110
Linux version 2.6.32-504.el6.x86_64 (email@example.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Oct 15 04:27:16 UTC 20144 January 2017 at 9 h 25 min #8260HugoKeymaster
- SOFA Consortium
Nice to hear for the compilation.
About your points:
1) you should use Exporters, like the VTK Exporter. Look at the component and its API. Otherwise, you can find some pages about it:
2) to export the whole MechanicalObject (DOF), you can use the ExportState. For the rest, you can use the first-mentioned VTKExporter and set your data as PointData. A data field “pointsDataFields” is available in the VTKExporter.
Hope this helps.
Hugo11 January 2017 at 18 h 04 min #8362
I still stay with the vtkexporter.
I took such an example. I guess I should
obtain the “dragon.obj” in vtk. However, I am getting nothing.
The file tstx.vtu is not opened as well.
Just ensure, I have the dragon.obj in the mesh dir.
It looks well with the paraview.
<Node name=”root” dt=”0.01″ gravity=”0 -9.81 0″> <Mesh name=”mesh” filename=”mesh/dragon.obj” /> <MeshObjLoader name=”loader” filename=”mesh/dragon.obj” /> <MechanicalObject src=”@loader” template=”Vec3f” name=”mecha” /> <TetrahedronSetTopologyContainer src=”@loader” name=”topo” /> <VTKExporter filename=”tstx.vtu” listening=”true” edges=”0″ triangles=”1″ quads=”0″ tetras=”0″ pointsDataFields=”MechanicalObject.position” /> </Node>
I have used the pointsDataFields=”mecha.position”, as well.
../bin/runSofa -g batch x.scn
I was not successful with the #5858. However, the case above can
be quicker to explain.
For this case, I use ubuntu stable version.
Could you help with it ?
best regards, Elek11 January 2017 at 22 h 04 min #8363HugoKeymaster
- SOFA Consortium
You are almost done, you just need to specify when the export should occur.
You need to set one of the data:
- or exportAtEnd
to true !
Have a look the the VTKExporter.cpp
Hugo13 January 2017 at 9 h 55 min #8368
Thank you, works!
- You must be logged in to reply to this topic.