Dear All,
I am trying to extract the connectivity table of a mesh surface .vtp file in the following format,
element_number face_ID node1 node2 node3 as it used to be on files .ebc.
I tried to use David Parker code (https://github.com/ktbolt/vtk/tree/mast ... esh/python) as a starting point, but I could not get the nodal information.
In this link (https://marq-my.sharepoint.com/:f:/g/pe ... Q?e=K9a8b8) I uploaded the files I am using, just in case.
Thank you for your help.
Aloma
vtp connectivity node table
- Martin Pfaller
- Posts: 60
- Joined: Tue Oct 01, 2019 10:23 am
Re: vtp connectivity node table
Hi Aloma,
I had a brief look at your code. For printing the coordinates, I see
Should that be
If that's not the problem, let us know how exactly the code failed.
Best
Martin
I had a brief look at your code. For printing the coordinates, I see
Code: Select all
format(i, node_id, x, y, x)
Code: Select all
format(i, node_id, x, y, z)
Best
Martin
- Aloma Blanch
- Posts: 14
- Joined: Mon Jun 17, 2019 8:31 am
Re: vtp connectivity node table
Thank you Martin,
I did not see that error.
But, I'm having another problem, in the code I attached I'm extracting the node information, in the following order:
element_node, node_id, x, y, z
Node 38165 ID: 56153 Coords: 1.05515 6.65914 6.42562
But, what I am trying to extract is the element_number, face_ID, node1, node2, node3 as it used to be saved on the old .ebc files.
I'm lost in what vtp Class Reference I need to use to achieve that.
Thank you for your help.
Aloma
I did not see that error.
But, I'm having another problem, in the code I attached I'm extracting the node information, in the following order:
element_node, node_id, x, y, z
Node 38165 ID: 56153 Coords: 1.05515 6.65914 6.42562
But, what I am trying to extract is the element_number, face_ID, node1, node2, node3 as it used to be saved on the old .ebc files.
I'm lost in what vtp Class Reference I need to use to achieve that.
Thank you for your help.
Aloma
- Aloma Blanch
- Posts: 14
- Joined: Mon Jun 17, 2019 8:31 am
Re: vtp connectivity node table
Dear All,
I am struggling to find a solution and I was wondering if it is possible at all.
Thanks for your help.
Aloma
I am struggling to find a solution and I was wondering if it is possible at all.
Thanks for your help.
Aloma
- David Parker
- Posts: 1677
- Joined: Tue Aug 23, 2005 2:43 pm
Re: vtp connectivity node table
Hi Aloma,
I modified the print_mesh.py script here https://github.com/ktbolt/vtk/tree/mast ... esh/python to work with .vtu and .vtp files. Try it out and let me know if it solves your problem.
Cheers,
Dave
I modified the print_mesh.py script here https://github.com/ktbolt/vtk/tree/mast ... esh/python to work with .vtu and .vtp files. Try it out and let me know if it solves your problem.
Cheers,
Dave
- Aloma Blanch
- Posts: 14
- Joined: Mon Jun 17, 2019 8:31 am
Re: vtp connectivity node table
Thank you so much Dave,
It solves exactly the problem that I have.
Best,
Aloma
It solves exactly the problem that I have.
Best,
Aloma