# Is there an example of the RoundedBoxBufferGeometry?

**URL:** <https://discourse.threejs.org/t/is-there-an-example-of-the-roundedboxbuffergeometry/37323>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [April 21, 2022, 3:14pm UTC](https://discourse.threejs.org/t/is-there-an-example-of-the-roundedboxbuffergeometry/37323 "2022-04-21T15:14:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JenDev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jendev/32/7503_2.png) [@JenDev](https://discourse.threejs.org/u/JenDev)\
**Post date:** [April 21, 2022, 3:14pm UTC](https://discourse.threejs.org/t/is-there-an-example-of-the-roundedboxbuffergeometry/37323/1 "2022-04-21T15:14:46Z")

</div>

I would like to add The RoundedBoxBufferGeometry to a list of Primitives I have on my project and wanted to be sure I have the latest details of its code.  
First introduction of it I see was 5 years ago but then [HERE](https://discourse.threejs.org/t/round-edged-box/1402) I see there may be different ways to get the same results?

> [@Round-edged box](https://discourse.threejs.org/t/round-edged-box/1402):
>
> As I couldn’t find the solution for round-edged boxes, I took the way of least resistance - “re-invent and build the bicycle, if you don’t have one” blush THREE.Shape() and THREE.ExtrudeBufferGeometry() helped me. [https://jsfiddle.net/prisoner849/303kdmnd/](https://jsfiddle.net/prisoner849/303kdmnd/) Criticism is very welcomed. function createBoxWithRoundedEdges( width, height, depth, radius0, smoothness ) { let shape = new THREE.Shape(); let eps = 0.00001; let radius = radius0 - eps; shape.absarc( eps, eps,…

---

<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:** [April 21, 2022, 3:25pm UTC](https://discourse.threejs.org/t/is-there-an-example-of-the-roundedboxbuffergeometry/37323/2 "2022-04-21T15:25:40Z")

</div>

Hi!  
There are may approaches to have the same result.  
One of them is the geometry in the distributive: [three.js/RoundedBoxGeometry.js at 26e52dbb4cd2e7faa04a61b80833868bffef6b4e · mrdoob/three.js · GitHub](https://github.com/mrdoob/three.js/blob/26e52dbb4cd2e7faa04a61b80833868bffef6b4e/examples/jsm/geometries/RoundedBoxGeometry.js), that used in this example: [three.js examples](https://threejs.org/examples/?q=lottie#webgl_loader_texture_lottie) (`import { RoundedBoxGeometry } from './jsm/geometries/RoundedBoxGeometry.js';`)
