Commit 762cf88a authored by Ken Martin's avatar Ken Martin

fix two dashboard issues vtkCell3D and vtkDataSetSurfaceFilter

An easy fix for datasetsurfacefilter and a meh fix for Cell3D
parent a6fc9e52
......@@ -119,14 +119,20 @@ void vtkCell3D::Contour(double value, vtkDataArray *cellScalars,
// Currently all points are injected because of the possibility
// of intersection point merging.
s1 = cellScalars->GetComponent(i,0);
if ( (s1 >= value) || (s1 < value) )
{
type = 0; //inside
}
else
{
type = 4; //outside, its type might change later (nearby intersection)
}
type = 0; //inside
// Below is the old code since 2001. Will may take a look
// at this at some point and see if there is a place to
// improve it.
//
// if ( (s1 >= value) || (s1 < value) )
// {
// type = 0; //inside
// }
// else
// {
// type = 4; //outside, its type might change later (nearby intersection)
// }
this->Points->GetPoint(i, x);
if ( locator->InsertUniquePoint(x, id) )
......
......@@ -2452,7 +2452,7 @@ void vtkDataSetSurfaceFilter::InsertPolygonInHash(vtkIdType* ids,
{
// if the first two points match loop through forwards
// checking all points
if (tab[1] == quad->ptArray[1])
if (numPts > 1 && tab[1] == quad->ptArray[1])
{
for (int i = 2; i < numPts; ++i)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment