Decoding .h3d files from Python
I have finished a simulation using HyperXtrude and obtained a .h3d file containing the model and results. I can open my .h3d file using HyperView and do the postprocessing.
Nevertheless, I would like to use the .h3d file further.
I want to extract data from the binary .h3d file and import it to Python. To do this, I would need to do one of the following:
1) Know the .h3d file format details. Is the information on the format available? If yes, it would be possible to decode it.
2) Use an already existing python library that allows this (for example, d3plot file format - see lasso library). Are there any Python libraries available except the Altair library for data visualization (refers to .csv files)?
3) Convert the .h3d file to, for example, the already mentioned d3plot format and use the existing library. Is it possible to convert .h3d files? And if yes, to which format and how? (Any guidance would be useful, even links to relevant manuals, etc.)
4) Export the complete data from HyperView to a table for example, and extract it from there. Is it possible and how?
5) Is it possible to define a sort of an output file in my HyperWorks setting (besides .h3d) that can be accessed with Python?
Thank you for the guidance.
Answers
-
I would use Altair Compose for that, because reading H3D files is a out-of-the-box toolbox there AND it can work with Python as well.
So you could read data using Compose, 'readcae' or 'readvector' commands, and if necessary, you can pass these to Compose's embed Python interface.
This would simplify a lot your life.
Otherwise, rad data using Compose and then write it in the format you like (ASCII).
0