# A question about Using Clipping Planes

**URL:** <https://forum.babylonjs.com/t/a-question-about-using-clipping-planes/56695>\
**Category:** Questions\
**Created:** [February 21, 2025, 9:50am UTC](https://forum.babylonjs.com/t/a-question-about-using-clipping-planes/56695 "2025-02-21T09:50:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hbwow123](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hbwow123](https://forum.babylonjs.com/u/hbwow123)\
**Post date:** [February 21, 2025, 9:50am UTC](https://forum.babylonjs.com/t/a-question-about-using-clipping-planes/56695/1 "2025-02-21T09:50:20Z")

</div>

this is the playground

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

I want to get the intersection of the clip plane with the model to create the profile grid.

Is there any good way?

---

<div class="post-metadata">

**Author:** ![Tricotou](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tricotou/32/5844_2.png) [@Tricotou](https://forum.babylonjs.com/u/Tricotou)\
**Post date:** [February 21, 2025, 12:47pm UTC](https://forum.babylonjs.com/t/a-question-about-using-clipping-planes/56695/2 "2025-02-21T12:47:54Z")

</div>

> [@hbwow123](#):
>
> I want to get the intersection of the clip plane with the model to create the profile grid.

Clipping plane is a render process which clips the whole scene.  
If you want to create the intersection mesh, did you try to use CSG2 instead ?

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

![Screencast from 21-02-2025 13:45:31](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/0/9017242c1df46ea738bbacd03d4d13305b4067ca.gif)

---

<div class="post-metadata">

**Author:** ![hbwow123](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hbwow123](https://forum.babylonjs.com/u/hbwow123)\
**Post date:** [February 22, 2025, 7:33am UTC](https://forum.babylonjs.com/t/a-question-about-using-clipping-planes/56695/3 "2025-02-22T07:33:19Z")

</div>

yeah，thank you for your help！

---

<div class="post-metadata">

**Author:** ![hbwow123](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hbwow123](https://forum.babylonjs.com/u/hbwow123)\
**Post date:** [February 22, 2025, 7:47am UTC](https://forum.babylonjs.com/t/a-question-about-using-clipping-planes/56695/4 "2025-02-22T07:47:38Z")

</div>

Do I need to import any js? I ran it: BABYLON.InitializeCSG2Async is not a function

My environment is babylonjs+typescript

and using the playground,there is something wrong:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/f/6fd067f90d9094049a0441aef61a3cf8a7b46f23.jpeg)

the intersection mesh is not in the correct location

---

<div class="post-metadata">

**Author:** ![Tricotou](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tricotou/32/5844_2.png) [@Tricotou](https://forum.babylonjs.com/u/Tricotou)\
**Post date:** [February 22, 2025, 12:25pm UTC](https://forum.babylonjs.com/t/a-question-about-using-clipping-planes/56695/5 "2025-02-22T12:25:38Z")

</div>

> [@hbwow123](#):
>
> Do I need to import any js? I ran it: BABYLON.InitializeCSG2Async is not a function

On my side a classic import `<script src="https://cdn.babylonjs.com/babylon.js"></script>` seems to be ok, but maybe you are using ES6 imports ?

> [@hbwow123](#):
>
> the intersection mesh is not in the correct location

This is due to the `toMesh` function, default is centered. set centerMesh to false :

```javascript
newMesh = skullCSG.intersect(planeCSG).toMesh("cut", scene, {centerMesh:false});

```

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

---

<div class="post-metadata">

**Author:** ![hbwow123](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hbwow123](https://forum.babylonjs.com/u/hbwow123)\
**Post date:** [February 22, 2025, 12:43pm UTC](https://forum.babylonjs.com/t/a-question-about-using-clipping-planes/56695/6 "2025-02-22T12:43:31Z")

</div>

it worked.I find this is a problem with my babylonjs version.

Thank you for your help. I appreciate it!!
