# Mesh multiple objects

**URL:** https://discourse.slicer.org/t/mesh-multiple-objects/10384
**Category:** Support
**Tags:** meshing
**Created:** [February 21, 2020, 4:38pm UTC](https://discourse.slicer.org/t/mesh-multiple-objects/10384 "2020-02-21T16:38:43Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [February 21, 2020, 8:08pm UTC](https://discourse.slicer.org/t/mesh-multiple-objects/10384/4 "2020-02-21T20:08:34Z")

</div>

You can copy-paste this code to the Python console to extract the surface and put it into a new mode node.

```python
volMesh=getNode('Model').GetMesh()
extractSurface=vtk.vtkGeometryFilter()
extractSurface.SetInputData(volMesh)
extractSurface.Update()
slicer.modules.models.logic().AddModel(extractSurface.GetOutput())

```

You can extract a specific material by adding vtkThreshold filter before vtkGeometryFilter.

---

_[View the full topic](https://discourse.slicer.org/t/mesh-multiple-objects/10384)._
