code: def insidePoints(self, points, invert=False, tol=1e-05):
          
          poly = self.polydata(True)
          # check if the stl file is closed
          
          #featureEdge = vtk.vtkFeatureEdges()
          #featureEdge.FeatureEdgesOff()
          #featureEdge.BoundaryEdgesOn()
          #featureEdge.NonManifoldEdgesOn()
          #featureEdge.SetInputData(poly)
          #featureEdge.Update()
          #openEdges = featureEdge.GetOutput().GetNumberOfCells()
          #if openEdges != 0:
          #    colors.printc("~lightning Warning: polydata is not a closed surface", c=5)
  
          vpoints = vtk.vtkPoints()
          vpoints.SetData(numpy_to_vtk(points, deep=True))
          pointsPolydata = vtk.vtkPolyData()
          pointsPolydata.SetPoints(vpoints)
          sep = vtk.vtkSelectEnclosedPoints()
          sep.SetTolerance(tol)
          sep.SetInputData(pointsPolydata)
          sep.SetSurfaceData(poly)
          sep.Update()
  
          mask1, mask2 = [], []
          for i, p in enumerate(points):
              if sep.IsInside(i):
                  mask1.append(p)
              else:
                  mask2.append(p)
          if invert:
              return mask2
          else:
              return mask1
docs: Return the sublist of points that are inside a polydata closed surface.
          
          .. hint:: |pca| |pca.py|_