How to set a mask on a shell?

set_mask_on_shell allows to check if our shell nodes are located within a given distance of any point of a given cloud of points. If a node is located within the tolerance, then it takes the value 0 (otherwise, 1). This is what we call set a mask on a shell.

Let’s start by defining a random cloud of points.

[2]:
point_cloud = np.random.random((5, 3))

Now, we can set the mask on a shell.

[3]:
mask = shell.set_mask_on_shell(point_cloud, tol=.1)

Here a quick visualization of what we’ve done (the cloud points are represented with green color):

[5]:
pl.show()
../_images/how_to_set_mask_on_shell_9_0.png