/// <summary> /// Gets all non-boundary points from a TopographySurface or Subregion. /// </summary> /// <param name="toposurface">The TopographySurface or Subregion.</param> /// <returns>The non-boundary points.</returns> public static IList <XYZ> GetNonBoundaryPoints(TopographySurface toposurface) { IList <XYZ> existingPoints = toposurface.GetPoints(); // Remove boundary points from the list. IList <XYZ> boundaryPoints = toposurface.GetBoundaryPoints(); foreach (XYZ boundaryPoint in boundaryPoints) { foreach (XYZ existingPoint in existingPoints) { if (boundaryPoint.IsAlmostEqualTo(existingPoint, 1e-05)) { existingPoints.Remove(existingPoint); break; } } } return(existingPoints); }