# Substract meshes

**URL:** https://community.freefem.org/t/substract-meshes/2063
**Category:** General Discussion
**Created:** [October 15, 2022, 5:30am UTC](https://community.freefem.org/t/substract-meshes/2063 "2022-10-15T05:30:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![galfras](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@galfras](https://community.freefem.org/u/galfras)
#### Post date: [October 15, 2022, 5:30am UTC](https://community.freefem.org/t/substract-meshes/2063/1 "2022-10-15T05:30:18Z")

</div>

Hello!

I have two already constructed meshes and I what to substract one from the other (make a hole in the bigger mesh with the shape of the smaller mesh). Is that possible?

Thanks!

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [October 15, 2022, 5:58am UTC](https://community.freefem.org/t/substract-meshes/2063/2 "2022-10-15T05:58:28Z")

</div>

Use the `trunc` function.

---

<div class="post-metadata">

### Author: ![galfras](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@galfras](https://community.freefem.org/u/galfras)
#### Post date: [October 15, 2022, 5:00pm UTC](https://community.freefem.org/t/substract-meshes/2063/3 "2022-10-15T17:00:17Z")

</div>

I read a lot about the Trunc function, but I could’t figure it out how give two meshes as parameters. Before asking I tried something like:

mesh Th = trunc(Th0, Sh);

Where Th0 is the bigger mesh and Sh the smaller mesh. I couldn’t make it work.

NOTE: I’m working with 2D meshes

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [October 16, 2022, 10:08am UTC](https://community.freefem.org/t/substract-meshes/2063/4 "2022-10-16T10:08:37Z")

</div>

THe problem is not so simple, to remove a part of the mesh inside other mesh.

To day in freefem++, the only way in build a mesh from all the boundary, by hand, and than use trunc of remove some part!
