How to create a eraser tool to trim some parts of geometry?

Creating a trimming tool or eraser using Three.js for a 3D modeling project. I want to allow users to trim or cut 3D objects interactively from a existing geometry in a web application. Has anyone worked on a similar project and can provide guidance on how to get started or any relevant resources or code examples?

Are you searching for something like this? GitHub - gkjohnson/three-bvh-csg: A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh
Additionally here is the thread in this forum: Three-bvh-csg: A library for performing fast CSG operations!

yeah, something like this only I expected. May be the subtraction here will help me in this scenario. any more examples like using mouse to trim or erase?

on the github page there are a few examples like this: