Hello all,<br><br>I'm trying to plot 2D isolines from a PolyDataSet. It works, but now I'm trying to plot the isolines projected on a plane, and not draw on the space. Here's what I'm doing:<br><br>I set the PolyData with a group of points and scalars:<br>
<br> PolyData = vtkPolyData::New();<br> PolyData->SetPoints(points);<br> PolyData->GetPointData()->SetScalars(scalares);<br><br>Then, create a mesh with Delaunay2D:<br><br> delaunay2D = vtkDelaunay2D::New();<br>
delaunay2D->SetInput(PolyData);<br> delaunay2D->Update();<br><br>Everything fine here. So, I try to create the isolines using <br><br> vtkContourFilter * contour = vtkContourFilter::New();<br> contour->SetInputConnection(delaunay2D->GetOutputPort());<br>
<br> double range[2];<br> range[0] = min_scalar;<br> range[1] = max_scalar;<br> contour->GenerateValues(200, range);<br><br><br> mapper = vtkPolyDataMapper::New();<br> mapper->SetInputConnection(contour->GetOutputPort());<br>
mapper->SetScalarRange(min_scalar, max_scalar);<br><br>It works, but the lines are draw in 3D space, not projected on a plane. I would like to project then on a plane. <br>Also, if there is a jump on the values, say, a big difference of values in one area, several isolines are draw on the slope, creating an artificial hole. <br>
<br>Thanks in advance<br><br><br>