How to remove a mesh after its creation?

Hello,
I started learning to use babylon but am having some problems.
I am interested in engineering drawings that include solid parts so I saw a simple example of using CSG.
https://www.babylonjs-playground.com/#T6NP3F

Is there a way to remove the main body after using CSG?
Or can CSG be used directly on the main body?

Thank you

Hi @Karim and a Big welcome.

To remove any mesh:
mesh.dispose();

1 Like

Thank you so much @Arte :smiley:
I was wondering, could this be done directly without having to take a copy from the main body and then delete it?

@Karim “could this be done directly”? Nope.
CSG returns new mesh.

1 Like