private static bool ListContainsPointInTriangle(VertexList check, CadFigure triangle) { var tps = triangle.PointList; foreach (CadVertex cp in check) { if ( cp.Equals(tps[0]) || cp.Equals(tps[1]) || cp.Equals(tps[2]) ) { continue; } bool ret = CadMath.IsPointInTriangle( cp.vector, tps[0].vector, tps[1].vector, tps[2].vector ); if (ret) { return(true); } } return(false); }