0

subtracting one shape from another

will 9 years ago updated by Schwabelbauch 8 years ago 3

Say I have 2 spheres(SphereVisual3D) and place them so that they overlap. Can I somehow subtract one from the other such that one sphere will have a dimple on it? Or subtracting a cylinder from a box to create a hole?


For a hole, maybe a circular cutting plane and triangulate the hole wall?


I know I can do this in Blender and the like and export the model, but what I'm basically trying to achieve is to have a single model and parameterize a few dimensions.


Any help or nudges would be greatly appreciated.

You need to use a csg library like csg.js to do that.

Thanks for the idea, but I've moved to importing obj files to get my desired geometry. One idea I did have though was to use a group of cutting planes, my initial experiment look promising, but probably not the best solution.

Was your approach a success?
Maybe you can share your solution?
Thanks!