# Split edgeGeometry in fiber?

**URL:** <https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [May 4, 2024, 10:58pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054 "2024-05-04T22:58:53Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![amo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/amo/32/45580_2.png) [@amo](https://discourse.threejs.org/u/amo)\
**Post date:** [May 4, 2024, 10:58pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/1 "2024-05-04T22:58:53Z")

</div>

Hi,

How I can split an mesh having an “edgeGeometry” type of geometry in several mesh with fiber ?

Thank you

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [May 5, 2024, 12:50pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/2 "2024-05-05T12:50:06Z")

</div>

What is your criteria for splitting the geometry?  
Without knowing that, I would say there is no way.  
If you’re just trying to get nicely shaded objects from a crappy format without normals, Might I suggest the EdgeSplit modifier.

---

<div class="post-metadata">

**Author:** ![amo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/amo/32/45580_2.png) [@amo](https://discourse.threejs.org/u/amo)\
**Post date:** [May 5, 2024, 2:02pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/3 "2024-05-05T14:02:16Z")

</div>

Do you have access to this sandbox ? [https://codesandbox.io/p/devbox/camembert-sqdd5t](https://codesandbox.io/p/devbox/camembert-sqdd5t)

I would like to be able to split the edges of the white camembert into several edges and to move the m appart like the camembert is exploding.

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [May 5, 2024, 2:04pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/4 "2024-05-05T14:04:23Z")

</div>

Hmm still a bit vague. You want to split a geometry of 3000 vertices, into 3, 1000 vertex geometries?

What are you trying to implement on a high level? I can provide better answers with that info 🙂

---

<div class="post-metadata">

**Author:** ![amo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/amo/32/45580_2.png) [@amo](https://discourse.threejs.org/u/amo)\
**Post date:** [May 5, 2024, 2:13pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/5 "2024-05-05T14:13:34Z")

</div>

Do you have access to this sandbox ? [https://codesandbox.io/p/devbox/camembert-sqdd5t](https://codesandbox.io/p/devbox/camembert-sqdd5t)

I would like to be able to split the edges of the white camembert into several edges and to move the m appart like the camembert is exploding.

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [May 5, 2024, 2:19pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/6 "2024-05-05T14:19:44Z")

</div>

Devbox not found ☹

What you are describing sounds like pulling wedge slices out of a cylinder? Like slices of pizza or cake?

Splitting the geometry isn’t enough for that case, because there will be no interior faces.

However you can accomplish these kinds of things with a CSG tool… like three-bvh-csg:

> **[GitHub - gkjohnson/three-bvh-csg: A flexible, memory compact, fast and...](https://github.com/gkjohnson/three-bvh-csg)**
>
> A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh - gkjohnson/three-bvh-csg

or my library:

[GitHub - manthrax/THREE-CSGMesh: Conversion of a CSG library for use with modern THREE.js](https://github.com/manthrax/THREE-CSGMesh) (slower and older, but may have different material handling that is useful)

The approach here is you have your cylindrical object, and a triangular wedge/pie slice mesh… and you Subtract the wedge from the cylinder… that gives u your cake with the piece removed…( the interior faces then come from the wedge piece you used in the Subtract…)  
then you do a union(?) or other operation on the wedge and the cake, to get the piece itself to move out…

---

<div class="post-metadata">

**Author:** ![amo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/amo/32/45580_2.png) [@amo](https://discourse.threejs.org/u/amo)\
**Post date:** [May 5, 2024, 2:30pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/7 "2024-05-05T14:30:42Z")

</div>

ok I will have a look. The sandbox should be visible now. For my problem, I don’t understand than a edge geometry seems to have vertices and is not composed as a reunion of Line object. With line object there is no problem of internal, exterior surface.

---

<div class="post-metadata">

**Author:** ![amo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/amo/32/45580_2.png) [@amo](https://discourse.threejs.org/u/amo)\
**Post date:** [May 5, 2024, 2:33pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/8 "2024-05-05T14:33:53Z")

</div>

Not sure it helps you a lot

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [May 5, 2024, 2:38pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/9 "2024-05-05T14:38:50Z")

</div>

Hmm I see… so you just want to extract that pie slice from the existing mesh.

[split\_cheese.glb](https://discourse.threejs.org/uploads/short-url/xn7gxYTQkae1OH8hCXklkts4oKs.glb) (15.4 KB)  
[cheese.blend](https://discourse.threejs.org/uploads/short-url/8WXU0k0gcTH3tT7cGz7MKVfdjH2.blend) (955.4 KB)

I did it for you in blender.

You can do it purely in three, but its complicated… because how do you know which part is which? count the vertices? different materials? then you have to write the code to generate shared vertex list… color the graph, reduce the graph, and extract the groups… yuck

---

<div class="post-metadata">

**Author:** ![amo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/amo/32/45580_2.png) [@amo](https://discourse.threejs.org/u/amo)\
**Post date:** [May 5, 2024, 3:00pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/10 "2024-05-05T15:00:10Z")

</div>

yeah I still don’t have enough knowledge to do this. I wanted to split only the edges of the cheese, not the whole

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [May 5, 2024, 3:01pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/11 "2024-05-05T15:01:53Z")

</div>

I highly recommend learning to use Blender. It will change your life.

---

<div class="post-metadata">

**Author:** ![PavelBoytchev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pavelboytchev/32/38639_2.png) [@PavelBoytchev](https://discourse.threejs.org/u/PavelBoytchev)\
**Post date:** [May 5, 2024, 6:05pm UTC](https://discourse.threejs.org/t/split-edgegeometry-in-fiber/65054/12 "2024-05-05T18:05:29Z")

</div>

Obviously it is an off-topic, but got inspired by the idea of exploding cheese, so here you are a GLTF model of a tractor with `edgeGeometry` edges that explodes.

[https://codepen.io/boytchev/full/VwNobLg](https://codepen.io/boytchev/full/VwNobLg)

[![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/2/c/2c6cb0ec20b7929acefd396d9d7b8dc705d0c1dd.png)](https://codepen.io/boytchev/full/VwNobLg)
