# Sprocket with 80 teeth using CSG2

**URL:** <https://forum.babylonjs.com/t/sprocket-with-80-teeth-using-csg2/62396>\
**Category:** Questions\
**Created:** [February 9, 2026, 9:26pm UTC](https://forum.babylonjs.com/t/sprocket-with-80-teeth-using-csg2/62396 "2026-02-09T21:26:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iZiggins](https://avatars.discourse-cdn.com/v4/letter/i/ecd19e/32.png) [@iZiggins](https://forum.babylonjs.com/u/iZiggins)\
**Post date:** [February 9, 2026, 9:26pm UTC](https://forum.babylonjs.com/t/sprocket-with-80-teeth-using-csg2/62396/1 "2026-02-09T21:26:36Z")

</div>

> **[Babylon.js Playground](https://playground.babylonjs.com/#WIPY4R%237)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

I was helped with this about a year ago, on a different thread:

> [@Rendering "simple" sprocket with 80 teeth](https://forum.babylonjs.com/t/rendering-simple-sprocket-with-80-teeth/48944):
>
> I am working on my final test to make sure BABYLON is a good fit for my application, and am running into difficulty with processing speed. I know CSG is SLOW. But I didn’t realize how slow until I tried the attached playground. Heads up, you will be waiting 5-10 minutes before it will render the sprocket. Any ideas what I can do to DRAMATICALLY speed this up? I need this to process within a few seconds, not minutes. I know this is probably not going to happen, but wanted to see if there…

I have tried changing this to use CSG2, but it’s not cutting out the teeth (subtracting). I’m not sure what the problem is. Any ideas?

I have tagged a new playground where I made the changes from the old one.

---

<div class="post-metadata">

**Author:** ![HiGreg](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@HiGreg](https://forum.babylonjs.com/u/HiGreg)\
**Post date:** [February 9, 2026, 11:14pm UTC](https://forum.babylonjs.com/t/sprocket-with-80-teeth-using-csg2/62396/2 "2026-02-09T23:14:17Z")

</div>

What helps me in this situation is to show the internediate meshes with some transparency.

You also have to make sure your shapes are manifold e.g. closed shapes. I played around with your playground but started getting “non-finite vertex” error. I suspect your shapes are not manifold? Summary: make sure your shapes are closed, manifold, and overlapping.
