# VTK file format supporting multiple meshes?

**URL:** https://discourse.vtk.org/t/vtk-file-format-supporting-multiple-meshes/10598
**Category:** Support
**Created:** [February 2, 2023, 5:04pm UTC](https://discourse.vtk.org/t/vtk-file-format-supporting-multiple-meshes/10598 "2023-02-02T17:04:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rexthor](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rexthor/32/6481_2.png) [@rexthor](https://discourse.vtk.org/u/rexthor)
#### Post date: [February 2, 2023, 5:04pm UTC](https://discourse.vtk.org/t/vtk-file-format-supporting-multiple-meshes/10598/1 "2023-02-02T17:04:14Z")

</div>

If I wanted to store a torus and a cylinder in a VTK file, what file format would I store it in? I have figured out how to store a vtkPolyData or a vtkUnstructuredGrid … but what if I wanted to store multiples in a file? Or must I store one mesh per file?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [February 3, 2023, 3:33pm UTC](https://discourse.vtk.org/t/vtk-file-format-supporting-multiple-meshes/10598/2 "2023-02-03T15:33:20Z")

</div>

You can apeend multiple polydata objects into one (using append polydata filter) and store the result in a single file.

---

<div class="post-metadata">

### Author: ![rexthor](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rexthor/32/6481_2.png) [@rexthor](https://discourse.vtk.org/u/rexthor)
#### Post date: [February 3, 2023, 3:34pm UTC](https://discourse.vtk.org/t/vtk-file-format-supporting-multiple-meshes/10598/3 "2023-02-03T15:34:45Z")

</div>

Thanks … I will give that a shot.

---

<div class="post-metadata">

### Author: ![rexthor](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rexthor/32/6481_2.png) [@rexthor](https://discourse.vtk.org/u/rexthor)
#### Post date: [February 6, 2023, 1:22pm UTC](https://discourse.vtk.org/t/vtk-file-format-supporting-multiple-meshes/10598/4 "2023-02-06T13:22:52Z")

</div>

@lassoan,. I tried that out, it worked like a charm. Thanks!
