Carving Objects
-
Prerequisite
Introduction
You can create interesting shapes by carving one object with another object. For example, this object below is created by carving a box with a cylinder:
Note that carving can be a very time-consuming operation. The more details in these 2 objects, the longer it takes to run the carving operation. For example, a sphere has much more details (vertices, edges and faces) compared to a box, so it takes longer to carve a sphere.
The “Carve Object” Block
To make a carving, you first need to have 2 objects with names. They also have to be overlapping, otherwise nothing will change after the carving operation. Then you just need to run this block:
When you run this block, the overlapping part of the first object (the target object to be carved) will be removed from it, and the second object (the carving object) will not be changed.
Example 1 - Carve Then Remove
In a basic use case, you carve a hole in an object, then you need to remove the carving object itself to reveal the hole. As shown, after you run the “carve” block, it seems nothing has happened. However, after removing the green box, we see the hole in the yellow box.
Example 2 - Reusing the Carving Object
Sometimes we do not need to remove the carving object right after making a carve. Instead, we can reuse it to do some more carving. This makes sure the hole or cave we get will have the same size. In this example, after making the first carve, we rotate the carving object “c” to make another carve.
Try it yourself:
https://play.creaticode.com/projects/6a727fbf8984b36634ea7914
-