| Attached Files | vtkBiQuadraticQuad.diff [^] (1,586 bytes) 2007-08-09 10:51 [Show Content] [Hide Content]Index: vtkBiQuadraticQuad.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Filtering/vtkBiQuadraticQuad.cxx,v
retrieving revision 1.7
diff -u -r1.7 vtkBiQuadraticQuad.cxx
--- vtkBiQuadraticQuad.cxx 31 Jul 2006 22:18:16 -0000 1.7
+++ vtkBiQuadraticQuad.cxx 9 Aug 2007 14:40:24 -0000
@@ -137,7 +137,16 @@
pcoords[1] = 0.5 + (pcoords[1] / 2.0);
}
pcoords[2] = 0.0;
- this->EvaluateLocation (subId, pcoords, closestPoint, weights);
+ if(closestPoint!=0)
+ {
+ // Compute both closestPoint and weights
+ this->EvaluateLocation(subId,pcoords,closestPoint,weights);
+ }
+ else
+ {
+ // Compute weigths only
+ this->InterpolationFunctions(pcoords,weights);
+ }
}
return returnStatus;
@@ -187,7 +196,7 @@
for (int j=0; j<4; j++)
{
this->Quad->Points->SetPoint(j,this->Points->GetPoint(LinearQuads[i][j]));
- this->Quad->PointIds->SetId(j,LinearQuads[i][j]);
+ this->Quad->PointIds->SetId(j,this->PointIds->GetId(LinearQuads[i][j]));
this->Scalars->SetValue(j,cellScalars->GetTuple1(LinearQuads[i][j]));
}
@@ -211,7 +220,7 @@
for ( int j=0; j<4; j++) //for each of the four vertices of the linear quad
{
this->Quad->Points->SetPoint(j,this->Points->GetPoint(LinearQuads[i][j]));
- this->Quad->PointIds->SetId(j,LinearQuads[i][j]);
+ this->Quad->PointIds->SetId(j,this->PointIds->GetId(LinearQuads[i][j]));
this->Scalars->SetValue(j,cellScalars->GetTuple1(LinearQuads[i][j]));
}
|