8 October 2019 at 16 h 38 min #14361
I am trying to visualize the VTK mesh of the bunny mesh.It gives the following error
[INFO] [SceneCheckerVisitor] Finished validating node "root". [INFO] [SofaViewer] QtViewer::keyPressEvent, CONTROL pressed [ERROR] [MeshVTKLoader] Error while parsing XML
The code for visualizing the VTK is
import Sofa import os path = os.path.dirname(os.path.abspath(__file__))+'/mesh/' def createScene(rootNode): rootNode.createObject('VisualStyle', displayFlags='showForceFields showBehaviorModels') rootNode.createObject('RequiredPlugin', pluginName='CGALPlugin') rootNode.createObject('RequiredPlugin', pluginName='SofaExporter') rootNode.findData('gravity').value='-9810 0 0'; node = rootNode.createChild('node') node.createObject('MeshVTKLoader',name='mesh',filename=path+'bunny0.vtu') node.createObject('MeshGenerationFromPolyhedron', name='gen',inputPointsfirstname.lastname@example.org', inputTrianglesemail@example.com', drawTetras='1') node.createObject('Mesh', firstname.lastname@example.orgPoints', email@example.comTetras') return rootNode
I dont know wether this is a bug,I just simply reproduced the same code of bunny example.11 October 2019 at 19 h 34 min #14394
- SOFA Consortium
Are you sure of your path?
could you also try doing filename=str(path)+’bunny0.vtu’ ?
[ERROR] [MeshVTKLoader] Error while parsing XML
this sounds like something wrong is passed as argument to the MeshVTKLoader and can not be parsed.
Hugo13 October 2019 at 22 h 48 min #14398
Thanks for the help. the error was due to the path in the tutorial page is missing https://project.inria.fr/softrobot/documentation/volumetric-mesh-generation-using-cgal-plugin/
Now the problem is the generated VTK mesh has a problem, I check my mesh and has no error, however, I don’t know why when I am exporting the generated VTK mesh using MeshVTKLoader it gives me the following error:
[ERROR] [TetrahedronFEMForceField(TetrahedronFEMForceField)] object must have a tetrahedric topology. The component is inactivated. To remove this error message please add a tetrahedric topology component to your scene.
What does that mean?in the scene example of soft robots plugin, they have this component included
I am attaching my OBJ file as I am concerned that I am not getting an accurate VTK mesh and maybe it would cause that error
You must be logged in to reply to this topic.