make_mask function

Create a mask based on vertices that are invalid