Replies: 5 comments 8 replies
-
Okay so I figured out that it is possible to export the raster mesh as vtk (including phase IDs) using the python version. The data is however written out as an unstructured grid format as points data, which is a bit surprising for a regular grid rastermesh. Would there be any possibility to export vtk as Structured grid and cell data ? |
Beta Was this translation helpful? Give feedback.
-
Hi @hem-28 , MicrostructPy was initially written to generate unstructured meshes so there may have been some re-use of the export functions when I added the RasterMesh class. The VTK format section of RasterMesh.write is: MicroStructPy/src/microstructpy/meshing/trimesh.py Lines 1165 to 1216 in 44b6a65 I'll dig into the VTK file format docs and see if I can use the structured grid type. |
Beta Was this translation helpful? Give feedback.
-
Hi @hem-28 I have just opened PR #75 to make this modification. I'll let the tests run over night and update the docs tomorrow. New release with the update should be available in the next couple of days. |
Beta Was this translation helpful? Give feedback.
-
Hey @hem-28, I included this feature as of version 1.5.5, released a few minutes ago. Try |
Beta Was this translation helpful? Give feedback.
-
Hi @kip-hart . Do you probably have your test script? I tried with mine , and I get the following error. I use Python 3.9.7 This is my script.
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I am familiar with the raster mesh .txt format written out by MicroStructPy. Pardon my ignorance for that. I wanted to convert this Voxelated data to a VTK file which is similar to the output from Dream3D, so I wanted some clarification.
for (i=0; i<nx; i++)
for (j=0; j<ny; j++)
for (k=0; k<nz; k++)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions