# Deleting face of mesh

**URL:** https://discourse.threejs.org/t/deleting-face-of-mesh/18398
**Category:** Questions
**Tags:** geometry
**Created:** [September 3, 2020, 9:35am UTC](https://discourse.threejs.org/t/deleting-face-of-mesh/18398 "2020-09-03T09:35:31Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![RAUMIK\_RANA](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/raumik_rana/32/12395_2.png) [@RAUMIK\_RANA](https://discourse.threejs.org/u/RAUMIK_RANA)
#### Post date: [September 3, 2020, 9:35am UTC](https://discourse.threejs.org/t/deleting-face-of-mesh/18398/1 "2020-09-03T09:35:31Z")

</div>

is there any way to deleting face of mesh in three.js?

raycast gives us face details. can we delete that intersection face?

---

<div class="post-metadata">

### Author: ![Fluqz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fluqz/32/6279_2.png) [@Fluqz](https://discourse.threejs.org/u/Fluqz)
#### Post date: [September 3, 2020, 11:16am UTC](https://discourse.threejs.org/t/deleting-face-of-mesh/18398/2 "2020-09-03T11:16:52Z")

</div>

I dont really know how that works. I once saw something like this:

let geometry = new THREE.BoxGeometry()  
geometry.faces.splice(0, 1)

let mesh = new THREE.Mesh(geometry, new THREE.MeshNormalMaterial())

[https://jsfiddle.net/07eLa5u4/](https://jsfiddle.net/07eLa5u4/)

You could probably go through all vertices and find the vertices of your clicked face and splice it out

---

<div class="post-metadata">

### Author: ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)
#### Post date: [September 3, 2020, 11:22am UTC](https://discourse.threejs.org/t/deleting-face-of-mesh/18398/3 "2020-09-03T11:22:06Z")

</div>

With `BufferGeometry` it’s actually not possible to just delete data since buffers are fixed size. Meaning you have to remove the vertices and indices if necessary and build new geometry based on your new attributes.

---

<div class="post-metadata">

### Author: ![RAUMIK\_RANA](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/raumik_rana/32/12395_2.png) [@RAUMIK\_RANA](https://discourse.threejs.org/u/RAUMIK_RANA)
#### Post date: [September 3, 2020, 11:47am UTC](https://discourse.threejs.org/t/deleting-face-of-mesh/18398/4 "2020-09-03T11:47:36Z")

</div>

ohk.  
But can we do with geometry?

---

<div class="post-metadata">

### Author: ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)
#### Post date: [September 3, 2020, 12:24pm UTC](https://discourse.threejs.org/t/deleting-face-of-mesh/18398/5 "2020-09-03T12:24:47Z")

</div>

@RAUMIK_RANA  
Do you want to delete a face or make it just invisible?

---

<div class="post-metadata">

### Author: ![RAUMIK\_RANA](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/raumik_rana/32/12395_2.png) [@RAUMIK\_RANA](https://discourse.threejs.org/u/RAUMIK_RANA)
#### Post date: [September 3, 2020, 12:27pm UTC](https://discourse.threejs.org/t/deleting-face-of-mesh/18398/6 "2020-09-03T12:27:56Z")

</div>

I want to delete face

---

<div class="post-metadata">

### Author: ![Gangula](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gangula/32/17731_2.png) [@Gangula](https://discourse.threejs.org/u/Gangula)
#### Post date: [April 18, 2021, 4:53pm UTC](https://discourse.threejs.org/t/deleting-face-of-mesh/18398/7 "2021-04-18T16:53:32Z")

</div>

> [@Fluqz](#):
>
> geometry.faces.splice(0, 1)

looks like this is not working in version r125 and above.  
Is there any workaround?

---

<div class="post-metadata">

### Author: ![hofk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hofk/32/44944_2.png) [@hofk](https://discourse.threejs.org/u/hofk)
#### Post date: [April 18, 2021, 6:13pm UTC](https://discourse.threejs.org/t/deleting-face-of-mesh/18398/8 "2021-04-18T18:13:20Z")

</div>

Since r125 **old Geometry** is deprecated, it is BufferGeometry to use.  
See [three-geometry-will-be-removed-from-core-with-r125](https://discourse.threejs.org/t/three-geometry-will-be-removed-from-core-with-r125/22401)

In the [BeginnerExample](https://hofk.de/main/discourse.threejs/BeginnerExample/BeginnerExample.html) of the [Collection of examples from discourse.threejs.org](https://discourse.threejs.org/t/collection-of-examples-from-discourse-threejs-org/4315) you can see how to handle the triangles.

However, there is no example of how to remove a triangle.

---

<div class="post-metadata">

### Author: ![hofk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hofk/32/44944_2.png) [@hofk](https://discourse.threejs.org/u/hofk)
#### Post date: [April 19, 2021, 8:40am UTC](https://discourse.threejs.org/t/deleting-face-of-mesh/18398/9 "2021-04-19T08:40:11Z")

</div>

I have made a little example. I am not sure if it is the best way to do it.

[RemoveTriangles](https://hofk.de/main/discourse.threejs/2021/RemoveTriangles/RemoveTriangles.html)

 ![2021-04-19 10.39.22](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/a/3/a320d2cc1dc0c46a9ed7613bf5a79b2fadb92daa.png)
