How to get vertex location from script?
As the title says.
How can I get the location ({x y z}) of a vertex? I have found Code:
ic_hex_point_location mypt04 I can do it through the GUI, by: [Left panel]>[Right click "Vertices"]>[Show vertex info]>[selection of vertex from screen] But that operation is not recorded by the record replay function. Any help is greatly appreciated. /adam |
I was looking for the same thing a few weeks ago and I never found a way in the scriting guide... I worked my way around with ic_hex_vertex_number { i j k } and another approach for blocking, cutting blocking, etc.
Keep us posted if you find the function. |
Initially I worked around it by calculating where I had put each split and so on. After a while this became very annoying, so yesterday I made my own workaround.
The workaround requires to save the blocking (that you want to 'query') to file. In the blocking file, the coordinates of the vertices are also recorded, so using the vertex's ijk, I search through the entire blocking file. Now, there are some shortcomings:
There are two functions defined below, the first is a small helper routine to read a file into a variable using only one line. The second (get_vertex_location_from_blk) is where the parsing is done. Code:
# Read a file |
[solved]
1 Attachment(s)
Well isn't that just typical?! Cleaning up my open text tabs (using Sublime Text - awesome!), I came upon one I had forgot:
A list of commands that can be used in ICEM (to get it in ugly form type: info commands (and wait a while)). Searching that list for location - lo and behold - was: Code:
ic_hex_get_node_location Code:
ic_hex_get_node_location $my_vertex_unmber For your investigative pleasure, I have also attached the command list sorted alphabetically. |
All times are GMT -4. The time now is 18:10. |