# Meshbuilder helper create box with rounded edges

**URL:** <https://forum.babylonjs.com/t/meshbuilder-helper-create-box-with-rounded-edges/35848>\
**Category:** Completed Features\
**Tags:** mesh\
**Created:** [November 20, 2022, 4:16pm UTC](https://forum.babylonjs.com/t/meshbuilder-helper-create-box-with-rounded-edges/35848 "2022-11-20T16:16:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ReubenH](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/reubenh/32/7464_2.png) [@ReubenH](https://forum.babylonjs.com/u/ReubenH)\
**Post date:** [November 20, 2022, 4:16pm UTC](https://forum.babylonjs.com/t/meshbuilder-helper-create-box-with-rounded-edges/35848/1 "2022-11-20T16:16:52Z")

</div>

I’ve created a helper functions that created a cuboid with rounded edges so that it render nicely with a shader that uses normals.

I thought this might be useful to somebody else so thought I’d share.

[https://playground.babylonjs.com/#PCWRFE](https://playground.babylonjs.com/#PCWRFE)

There’s probably a simpler way to do this, but at least this implementation works! happy to hear any suggestions! 😊

Cheers

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [November 21, 2022, 1:32pm UTC](https://forum.babylonjs.com/t/meshbuilder-helper-create-box-with-rounded-edges/35848/2 "2022-11-21T13:32:40Z")

</div>

Nice work! Using a Ribbon like that. This could be a great addition to our Ribbons doc! Want to add it?

> **[Ribbons With Math | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/ribbon_maths)**
>
> Learn how to create ribbons with math in Babylon.js.

---

<div class="post-metadata">

**Author:** ![ReubenH](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/reubenh/32/7464_2.png) [@ReubenH](https://forum.babylonjs.com/u/ReubenH)\
**Post date:** [December 9, 2022, 12:15am UTC](https://forum.babylonjs.com/t/meshbuilder-helper-create-box-with-rounded-edges/35848/3 "2022-12-09T00:15:18Z")

</div>

Hey Raanan, I’d love to get that added! How can I do that? Thanks!

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [December 12, 2022, 11:01am UTC](https://forum.babylonjs.com/t/meshbuilder-helper-create-box-with-rounded-edges/35848/4 "2022-12-12T11:01:10Z")

</div>

Great! makes me very happy 🙂

We have a documentation website, and each page in our docs references a single markdown file. You can find the correct markdown file if you scroll all the way down in the page you want to edit. It looks like this:

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/0/c/0c629ad88b3a4003593a7ae23f7d0e12f094725b.png)

---

<div class="post-metadata">

**Author:** ![ReubenH](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/reubenh/32/7464_2.png) [@ReubenH](https://forum.babylonjs.com/u/ReubenH)\
**Post date:** [December 28, 2022, 3:59pm UTC](https://forum.babylonjs.com/t/meshbuilder-helper-create-box-with-rounded-edges/35848/5 "2022-12-28T15:59:42Z")

</div>

Hey Raanan,

I’ve raised a PR to add that page edit here:

[Add cuboid with soft edges example to Ribbons Page](https://github.com/BabylonJS/Documentation/pull/744)

My Github handle is Teamhitori, hope that’s ok?

Cheers,  
Reuben

---

<div class="post-metadata">

**Author:** ![Caminofreak](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/caminofreak/32/30514_2.png) [@Caminofreak](https://forum.babylonjs.com/u/Caminofreak)\
**Post date:** [March 7, 2023, 8:49am UTC](https://forum.babylonjs.com/t/meshbuilder-helper-create-box-with-rounded-edges/35848/6 "2023-03-07T08:49:36Z")

</div>

Hi ReubenH,  
this is exatly what I was looking for. Thx so much

---

<div class="post-metadata">

**Author:** ![DRLeria](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/drleria/32/50928_2.png) [@DRLeria](https://forum.babylonjs.com/u/DRLeria)\
**Post date:** [March 8, 2023, 1:22pm UTC](https://forum.babylonjs.com/t/meshbuilder-helper-create-box-with-rounded-edges/35848/7 "2023-03-08T13:22:04Z")

</div>

Amazing job sir!!! Really useful 🙌🙌🙌

---

<div class="post-metadata">

**Author:** ![tibotiber](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tibotiber/32/26735_2.png) [@tibotiber](https://forum.babylonjs.com/u/tibotiber)\
**Post date:** [January 5, 2026, 10:01am UTC](https://forum.babylonjs.com/t/meshbuilder-helper-create-box-with-rounded-edges/35848/8 "2026-01-05T10:01:44Z")

</div>

I know this is not new, but it’s still really great! My parametric sofas and beds are looking muuuuch more comfortable thanks to you @ReubenH 🙂
