I have an STL file that I want to pack with particles, I have noticed that the region command seems to only take .vtk files as input. Am I missing a parameter for an STL file or is this the case? Secondly, if it only takes vtk files then what programs are available to convert an STL to VTK file format? I tried saving the STL as VTK in paraview but it didn't seem to work properly.
Austin
ckloss | Thu, 07/28/2011 - 08:16
Hi Austin, >>region command
Hi Austin,
>>region command seems to only take .vtk files as input.
that's correct. The reason is that STL is only capable of storing a triangular surface mesh, but for packing we need a (tetrahedral) volume mesh.
>>convert an STL to VTK file format?
I am afraid that's not possible, at least to my knowledge. You can generate a tet mesh and save it as VTK file e.g. with gmesh (a free mesher) from iges or step
Christoph
akimbrell | Thu, 07/28/2011 - 15:01
Thanks
Ok that clears it up, I didn't realize packing requires a volume mesh - that would explain why the STL did not work. I will give gmesh a try since our current mesher does not export VTK files.
vonboetticher | Wed, 03/06/2013 - 10:57
convert .stl to .vtk
Hi akimbrell,
Guess you found a solution meanwhile. But I d' like to add this: Since I work with laser-scan based .stl files, there are often dublicate triangels, problem with more neighbours as expected etc when working with LIGGGHTS. A nice work-around lets say for myShape.stl is to create an OpenFOAM mesh with blockMesh & snappyHexMesh snapping to myShape.stl that already performs some increase in mesh quality (if not, filter myShape.stl in meshLab), run foamToVTK command and then save the myShape.vtk surface in ASCII format with paraview (open (apply) myShape.vtk in paraview => save Data... => files of type .vtk => ASCII format. Not the shortest way but allows mesh improvement
vonboetticher | Thu, 03/07/2013 - 08:58
...sorry, for LIGGGHTS save
...sorry, for LIGGGHTS save Data... => files of type .stl => ASCII format, otherwhise one gets POLYDATA format.