Commit a07ee519 authored by Bill Lorensen's avatar Bill Lorensen Committed by Kitware Robot
Browse files

Merge topic 'BoxClipDataSetMissingPointData'

e6081c81

 BUG: BoxClip ClippedOutput is missing point data
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland's avatarKenneth Moreland <kmorel@sandia.gov>
Reviewed-by: Cory Quammen's avatarCory Quammen <cory.quammen@kitware.com>
Merge-request: !2581
parents ea8d2bcd e6081c81
Pipeline #50560 canceled with stage
in 0 seconds
/*=========================================================================
Program: Visualization Toolkit
Module: BoxClipOrientedPointData.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include <vtkSmartPointer.h>
#include <vtkBoxClipDataSet.h>
#include <vtkLookupTable.h>
#include <vtkUnstructuredGridReader.h>
#include <vtkUnstructuredGrid.h>
#include <vtkDataSetSurfaceFilter.h>
#include <vtkDataSetMapper.h>
#include <vtkCamera.h>
#include <vtkActor.h>
#include <vtkRenderWindow.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h>
#include "vtkTestUtilities.h"
int BoxClipOrientedPointData(int argc, char *argv[])
{
char* fileName = vtkTestUtilities::ExpandDataFileName( argc, argv, "Data/hexa.vtk");
// Read the data
vtkSmartPointer<vtkUnstructuredGridReader> reader =
vtkSmartPointer<vtkUnstructuredGridReader>::New();
reader->SetFileName (fileName);
reader->Update();
delete [] fileName;
double bounds[6];
reader->GetOutput()->GetBounds(bounds);
double range[2];
reader->GetOutput()->GetScalarRange(range);
double minBoxPoint[3];
double maxBoxPoint[3];
minBoxPoint[0] = (bounds[1] - bounds[0]) / 2.0 + bounds[0];
minBoxPoint[1] = (bounds[3] - bounds[2]) / 2.0 + bounds[2];
minBoxPoint[2] = (bounds[5] - bounds[4]) / 2.0 + bounds[4];
maxBoxPoint[0] = bounds[1];
maxBoxPoint[1] = bounds[3];
maxBoxPoint[2] = bounds[5];
vtkSmartPointer<vtkBoxClipDataSet> boxClip =
vtkSmartPointer<vtkBoxClipDataSet>::New();
boxClip->SetInputConnection (reader->GetOutputPort());
boxClip->GenerateClippedOutputOn();
const double minusx[] = { -1.0, 0.0, 0.0 };
const double minusy[] = { 0.0, -1.0, 0.0 };
const double minusz[] = { 0.0, 0.0, -1.0 };
const double plusx[] = { 1.0, 0.0, 0.0 };
const double plusy[] = { 0.0, 1.0, 0.0 };
const double plusz[] = { 0.0, 0.0, 1.0 };
boxClip->SetBoxClip(minusx, minBoxPoint,
minusy, minBoxPoint,
minusz, minBoxPoint,
plusx, maxBoxPoint,
plusy, maxBoxPoint,
plusz, maxBoxPoint);
// Define a lut
vtkSmartPointer<vtkLookupTable> lut1 =
vtkSmartPointer<vtkLookupTable>::New();
lut1->SetHueRange (.667, 0);
lut1->Build();
vtkSmartPointer<vtkDataSetSurfaceFilter> surfaceIn =
vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
surfaceIn->SetInputConnection (boxClip->GetOutputPort(0));
vtkSmartPointer<vtkDataSetMapper> mapperIn =
vtkSmartPointer<vtkDataSetMapper>::New();
mapperIn->SetInputConnection(surfaceIn->GetOutputPort());
mapperIn->SetScalarRange(reader->GetOutput()->GetScalarRange());
mapperIn->SetLookupTable(lut1);
vtkSmartPointer<vtkActor> actorIn =
vtkSmartPointer<vtkActor>::New();
actorIn->SetMapper(mapperIn);
vtkSmartPointer<vtkDataSetSurfaceFilter> surfaceOut =
vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
surfaceOut->SetInputConnection (boxClip->GetOutputPort(1));
vtkSmartPointer<vtkDataSetMapper> mapperOut =
vtkSmartPointer<vtkDataSetMapper>::New();
mapperOut->SetInputConnection(surfaceOut->GetOutputPort());
mapperOut->SetScalarRange(reader->GetOutput()->GetScalarRange());
mapperOut->SetLookupTable(lut1);
vtkSmartPointer<vtkActor> actorOut =
vtkSmartPointer<vtkActor>::New();
actorOut->SetMapper(mapperOut);
actorOut->AddPosition(-.5 * (maxBoxPoint[0] - minBoxPoint[0]),
-.5 * (maxBoxPoint[1] - minBoxPoint[1]),
-.5 * (maxBoxPoint[2] - minBoxPoint[2]));
// Create a renderer, render window, and interactor
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
renderer->SetBackground (.5, .5, .5);
vtkSmartPointer<vtkRenderWindow> renderWindow =
vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->AddRenderer(renderer);
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
renderWindowInteractor->SetRenderWindow(renderWindow);
// Add the actor to the scene
renderer->AddActor(actorIn);
renderer->AddActor(actorOut);
renderer->ResetCamera();
renderer->GetActiveCamera()->Azimuth(120);
renderer->GetActiveCamera()->Elevation(30);
renderer->GetActiveCamera()->Dolly(1.0);
renderer->ResetCameraClippingRange();
// Render and interact
renderWindow->Render();
renderWindowInteractor->Start();
return EXIT_SUCCESS;
}
/*=========================================================================
Program: Visualization Toolkit
Module: BoxClipPointData.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include <vtkSmartPointer.h>
#include <vtkBoxClipDataSet.h>
#include <vtkLookupTable.h>
#include <vtkUnstructuredGridReader.h>
#include <vtkUnstructuredGrid.h>
#include <vtkDataSetSurfaceFilter.h>
#include <vtkDataSetMapper.h>
#include <vtkCamera.h>
#include <vtkActor.h>
#include <vtkRenderWindow.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h>
#include "vtkTestUtilities.h"
int BoxClipPointData(int argc, char *argv[])
{
char* fileName = vtkTestUtilities::ExpandDataFileName( argc, argv, "Data/hexa.vtk");
// Read the data
vtkSmartPointer<vtkUnstructuredGridReader> reader =
vtkSmartPointer<vtkUnstructuredGridReader>::New();
reader->SetFileName (fileName);
reader->Update();
delete [] fileName;
double bounds[6];
reader->GetOutput()->GetBounds(bounds);
double range[2];
reader->GetOutput()->GetScalarRange(range);
double minBoxPoint[3];
double maxBoxPoint[3];
minBoxPoint[0] = (bounds[1] - bounds[0]) / 2.0 + bounds[0];
minBoxPoint[1] = (bounds[3] - bounds[2]) / 2.0 + bounds[2];
minBoxPoint[2] = (bounds[5] - bounds[4]) / 2.0 + bounds[4];
maxBoxPoint[0] = bounds[1];
maxBoxPoint[1] = bounds[3];
maxBoxPoint[2] = bounds[5];
vtkSmartPointer<vtkBoxClipDataSet> boxClip =
vtkSmartPointer<vtkBoxClipDataSet>::New();
boxClip->SetInputConnection (reader->GetOutputPort());
boxClip->SetBoxClip(minBoxPoint[0], maxBoxPoint[0],
minBoxPoint[1], maxBoxPoint[1],
minBoxPoint[2], maxBoxPoint[2]);
boxClip->GenerateClippedOutputOn();
// Define a lut
vtkSmartPointer<vtkLookupTable> lut1 =
vtkSmartPointer<vtkLookupTable>::New();
lut1->SetHueRange (.667, 0);
lut1->Build();
vtkSmartPointer<vtkDataSetSurfaceFilter> surfaceIn =
vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
surfaceIn->SetInputConnection (boxClip->GetOutputPort(0));
vtkSmartPointer<vtkDataSetMapper> mapperIn =
vtkSmartPointer<vtkDataSetMapper>::New();
mapperIn->SetInputConnection(surfaceIn->GetOutputPort());
mapperIn->SetScalarRange(reader->GetOutput()->GetScalarRange());
mapperIn->SetLookupTable(lut1);
vtkSmartPointer<vtkActor> actorIn =
vtkSmartPointer<vtkActor>::New();
actorIn->SetMapper(mapperIn);
vtkSmartPointer<vtkDataSetSurfaceFilter> surfaceOut =
vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
surfaceOut->SetInputConnection (boxClip->GetOutputPort(1));
vtkSmartPointer<vtkDataSetMapper> mapperOut =
vtkSmartPointer<vtkDataSetMapper>::New();
mapperOut->SetInputConnection(surfaceOut->GetOutputPort());
mapperOut->SetScalarRange(reader->GetOutput()->GetScalarRange());
mapperOut->SetLookupTable(lut1);
vtkSmartPointer<vtkActor> actorOut =
vtkSmartPointer<vtkActor>::New();
actorOut->SetMapper(mapperOut);
actorOut->AddPosition(-.5 * (maxBoxPoint[0] - minBoxPoint[0]),
-.5 * (maxBoxPoint[1] - minBoxPoint[1]),
-.5 * (maxBoxPoint[2] - minBoxPoint[2]));
// Create a renderer, render window, and interactor
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
renderer->SetBackground (.5, .5, .5);
vtkSmartPointer<vtkRenderWindow> renderWindow =
vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->AddRenderer(renderer);
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
renderWindowInteractor->SetRenderWindow(renderWindow);
// Add the actor to the scene
renderer->AddActor(actorIn);
renderer->AddActor(actorOut);
renderer->ResetCamera();
renderer->GetActiveCamera()->Azimuth(120);
renderer->GetActiveCamera()->Elevation(30);
renderer->GetActiveCamera()->Dolly(1.0);
renderer->ResetCameraClippingRange();
// Render and interact
renderWindow->Render();
renderWindowInteractor->Start();
return EXIT_SUCCESS;
}
......@@ -42,6 +42,8 @@ vtk_add_test_cxx(${vtk-module}CxxTests tests
)
# Tests with data
vtk_add_test_cxx(${vtk-module}CxxTests data_tests
BoxClipPointData.cxx
BoxClipOrientedPointData.cxx
TestGradientAndVorticity.cxx,NO_VALID
TestIconGlyphFilterGravity.cxx
TestQuadraturePoints.cxx
......
......@@ -187,7 +187,8 @@ int vtkBoxClipDataSet::RequestData(vtkInformation *vtkNotUsed(request),
vtkIdType newCellId;
vtkIdType numPts = input->GetNumberOfPoints();
vtkIdType numCells = input->GetNumberOfCells();
vtkPointData *inPD=input->GetPointData(), *outPD = output->GetPointData();
vtkPointData *inPD=input->GetPointData();
vtkPointData *outPD[2];
vtkCellData *inCD=input->GetCellData();
vtkCellData *outCD[2];
vtkPoints *newPoints;
......@@ -262,21 +263,36 @@ int vtkBoxClipDataSet::RequestData(vtkInformation *vtkNotUsed(request),
}
this->Locator->InitPointInsertion (newPoints, input->GetBounds());
outPD[0] = output->GetPointData();
if ( this->GenerateClippedOutput )
{
outPD[1] = output->GetPointData();
}
vtkDataArray *scalars = this->GetInputArrayToProcess(0,inputVector);
if ( !this->GenerateClipScalars && !scalars)
{
outPD->CopyScalarsOff();
outPD[0]->CopyScalarsOff();
if ( this->GenerateClippedOutput )
{
outPD[1]->CopyScalarsOff();
}
}
else
{
outPD->CopyScalarsOn();
outPD[0]->CopyScalarsOn();
if ( this->GenerateClippedOutput )
{
outPD[1]->CopyScalarsOn();
}
}
outPD->InterpolateAllocate(inPD,estimatedSize,estimatedSize/2);
outPD[0]->InterpolateAllocate(inPD,estimatedSize,estimatedSize/2);
outCD[0] = output->GetCellData();
outCD[0]->CopyAllocate(inCD,estimatedSize,estimatedSize/2);
if ( this->GenerateClippedOutput )
{
outPD[1] = clippedOutput->GetPointData();
outPD[1]->InterpolateAllocate(inPD,estimatedSize,estimatedSize/2);
outCD[1] = clippedOutput->GetCellData();
outCD[1]->CopyAllocate(inCD,estimatedSize,estimatedSize/2);
}
......@@ -393,12 +409,12 @@ int vtkBoxClipDataSet::RequestData(vtkInformation *vtkNotUsed(request),
if (orientation)
{
this->ClipHexahedron(newPoints,cell,this->Locator, conn[0],
inPD, outPD, inCD, cellId, outCD[0]);
inPD, outPD[0], inCD, cellId, outCD[0]);
}
else
{
this->ClipBox(newPoints,cell, this->Locator, conn[0],
inPD, outPD, inCD, cellId, outCD[0]);
inPD, outPD[0], inCD, cellId, outCD[0]);
}
numNew[0] = conn[0]->GetNumberOfCells() - num[0];
......@@ -409,12 +425,12 @@ int vtkBoxClipDataSet::RequestData(vtkInformation *vtkNotUsed(request),
if (orientation)
{
this->ClipHexahedron2D(newPoints,cell,this->Locator, conn[0],
inPD, outPD, inCD, cellId, outCD[0]);
inPD, outPD[0], inCD, cellId, outCD[0]);
}
else
{
this->ClipBox2D(newPoints,cell, this->Locator, conn[0],
inPD, outPD, inCD, cellId, outCD[0]);
inPD, outPD[0], inCD, cellId, outCD[0]);
}
numNew[0] = conn[0]->GetNumberOfCells() - num[0];
num[0] = conn[0]->GetNumberOfCells();
......@@ -424,12 +440,12 @@ int vtkBoxClipDataSet::RequestData(vtkInformation *vtkNotUsed(request),
if (orientation)
{
this->ClipHexahedron1D(newPoints,cell, this->Locator, conn[0],
inPD, outPD, inCD, cellId, outCD[0]);
inPD, outPD[0], inCD, cellId, outCD[0]);
}
else
{
this->ClipBox1D(newPoints,cell, this->Locator, conn[0],
inPD, outPD, inCD, cellId, outCD[0]);
inPD, outPD[0], inCD, cellId, outCD[0]);
}
numNew[0] = conn[0]->GetNumberOfCells() - num[0];
num[0] = conn[0]->GetNumberOfCells();
......@@ -439,12 +455,12 @@ int vtkBoxClipDataSet::RequestData(vtkInformation *vtkNotUsed(request),
if (orientation)
{
this->ClipHexahedron0D(cell, this->Locator, conn[0],
inPD, outPD, inCD, cellId, outCD[0]);
inPD, outPD[0], inCD, cellId, outCD[0]);
}
else
{
this->ClipBox0D(cell, this->Locator, conn[0],
inPD, outPD, inCD, cellId, outCD[0]);
inPD, outPD[0], inCD, cellId, outCD[0]);
}
numNew[0] = conn[0]->GetNumberOfCells() - num[0];
num[0] = conn[0]->GetNumberOfCells();
......@@ -2776,7 +2792,7 @@ void vtkBoxClipDataSet::ClipBoxInOut(vtkPoints *newPoints,
vtkIncrementalPointLocator *locator,
vtkCellArray **tets,
vtkPointData *inPD,
vtkPointData *outPD,
vtkPointData **outPD,
vtkCellData *inCD,
vtkIdType cellId,
vtkCellData **outCD)
......@@ -2880,7 +2896,8 @@ void vtkBoxClipDataSet::ClipBoxInOut(vtkPoints *newPoints,
{
if ( locator->InsertUniquePoint(v_tetra[i], iid[i]) )
{
outPD->CopyData(inPD,ptIdout[i], iid[i]);
outPD[0]->CopyData(inPD,ptIdout[i], iid[i]);
outPD[1]->CopyData(inPD,ptIdout[i], iid[i]);
}
}
int newCellId = tets[1]->InsertNextCell(4,iid);
......@@ -2898,7 +2915,8 @@ void vtkBoxClipDataSet::ClipBoxInOut(vtkPoints *newPoints,
// of intersection point merging.
if ( locator->InsertUniquePoint(v, iid[i]) )
{
outPD->CopyData(inPD,ptId, iid[i]);
outPD[0]->CopyData(inPD,ptId, iid[i]);
outPD[1]->CopyData(inPD,ptId, iid[i]);
}
}//for all points of the tetrahedron.
......@@ -3013,7 +3031,9 @@ void vtkBoxClipDataSet::ClipBoxInOut(vtkPoints *newPoints,
edges_inter = edges_inter * 10 + (edgeNum+1);
if ( locator->InsertUniquePoint(x, p_id[num_inter]) )
{
this->InterpolateEdge(outPD, p_id[num_inter],
this->InterpolateEdge(outPD[0], p_id[num_inter],
v_id[v1], v_id[v2], t);
this->InterpolateEdge(outPD[1], p_id[num_inter],
v_id[v1], v_id[v2], t);
}
......@@ -3319,7 +3339,7 @@ void vtkBoxClipDataSet::ClipHexahedronInOut(vtkPoints *newPoints,
vtkIncrementalPointLocator *locator,
vtkCellArray **tets,
vtkPointData *inPD,
vtkPointData *outPD,
vtkPointData **outPD,
vtkCellData *inCD,
vtkIdType cellId,
vtkCellData **outCD)
......@@ -3422,7 +3442,8 @@ void vtkBoxClipDataSet::ClipHexahedronInOut(vtkPoints *newPoints,
{
if ( locator->InsertUniquePoint(v_tetra[i], iid[i]) )
{
outPD->CopyData(inPD,ptIdout[i], iid[i]);
outPD[0]->CopyData(inPD,ptIdout[i], iid[i]);
outPD[1]->CopyData(inPD,ptIdout[i], iid[i]);
}
}
int newCellId = tets[1]->InsertNextCell(4,iid);
......@@ -3440,7 +3461,8 @@ void vtkBoxClipDataSet::ClipHexahedronInOut(vtkPoints *newPoints,
if ( locator->InsertUniquePoint(v, iid[i]) )
{
outPD->CopyData(inPD,ptId, iid[i]);
outPD[0]->CopyData(inPD,ptId, iid[i]);
outPD[1]->CopyData(inPD,ptId, iid[i]);
}
}//for all points of the tetrahedron.
......@@ -3568,7 +3590,9 @@ void vtkBoxClipDataSet::ClipHexahedronInOut(vtkPoints *newPoints,
if ( locator->InsertUniquePoint(x, p_id[num_inter]) )
{
this->InterpolateEdge(outPD, p_id[num_inter],
this->InterpolateEdge(outPD[0], p_id[num_inter],
v_id[v1], v_id[v2], t);
this->InterpolateEdge(outPD[1], p_id[num_inter],
v_id[v1], v_id[v2], t);
}
......@@ -4208,7 +4232,7 @@ void vtkBoxClipDataSet::ClipBoxInOut2D(vtkPoints *newPoints,
vtkIncrementalPointLocator *locator,
vtkCellArray **tets,
vtkPointData *inPD,
vtkPointData *outPD,
vtkPointData **outPD,
vtkCellData *inCD,
vtkIdType cellId,
vtkCellData **outCD)
......@@ -4315,7 +4339,8 @@ void vtkBoxClipDataSet::ClipBoxInOut2D(vtkPoints *newPoints,
{
if ( locator->InsertUniquePoint(v_triangle[i], iid[i]) )
{
outPD->CopyData(inPD,ptIdout[i], iid[i]);
outPD[0]->CopyData(inPD,ptIdout[i], iid[i]);
outPD[1]->CopyData(inPD,ptIdout[i], iid[i]);
}
}
......@@ -4334,7 +4359,8 @@ void vtkBoxClipDataSet::ClipBoxInOut2D(vtkPoints *newPoints,
// of intersection point merging.
if ( locator->InsertUniquePoint(v, iid[i]) )
{
outPD->CopyData(inPD,ptId, iid[i]);
outPD[0]->CopyData(inPD,ptId, iid[i]);
outPD[1]->CopyData(inPD,ptId, iid[i]);
}
}//for all points of the triangle.
......@@ -4421,7 +4447,9 @@ void vtkBoxClipDataSet::ClipBoxInOut2D(vtkPoints *newPoints,
edges_inter = edges_inter * 10 + (edgeNum+1);
if ( locator->InsertUniquePoint(x, p_id[num_inter]) )
{
this->InterpolateEdge(outPD, p_id[num_inter],
this->InterpolateEdge(outPD[0], p_id[num_inter],
v_id[v1], v_id[v2], t);
this->InterpolateEdge(outPD[1], p_id[num_inter],
v_id[v1], v_id[v2], t);
}
......@@ -4964,7 +4992,7 @@ void vtkBoxClipDataSet::ClipHexahedronInOut2D(vtkPoints *newPoints,
vtkIncrementalPointLocator *locator,
vtkCellArray **tets,
vtkPointData *inPD,
vtkPointData *outPD,
vtkPointData **outPD,
vtkCellData *inCD,
vtkIdType cellId,
vtkCellData **outCD)
......@@ -5069,7 +5097,8 @@ void vtkBoxClipDataSet::ClipHexahedronInOut2D(vtkPoints *newPoints,
{
if ( locator->InsertUniquePoint(v_triangle[i], iid[i]) )
{
outPD->CopyData(inPD,ptIdout[i], iid[i]);
outPD[0]->CopyData(inPD,ptIdout[i], iid[i]);
outPD[1]->CopyData(inPD,ptIdout[i], iid[i]);
}
}
......@@ -5087,7 +5116,8 @@ void vtkBoxClipDataSet::ClipHexahedronInOut2D(vtkPoints *newPoints,
// of intersection point merging.
if ( locator->InsertUniquePoint(v, iid[i]) )
{
outPD->CopyData(inPD,ptId, iid[i]);
outPD[0]->CopyData(inPD,ptId, iid[i]);
outPD[1]->CopyData(inPD,ptId, iid[i]);
}
}//for all points of the trianglehedron.
......@@ -5179,7 +5209,9 @@ void vtkBoxClipDataSet::ClipHexahedronInOut2D(vtkPoints *newPoints,
if ( locator->InsertUniquePoint(x, p_id[num_inter]) )
{
this->InterpolateEdge(outPD, p_id[num_inter],
this->InterpolateEdge(outPD[0], p_id[num_inter],
v_id[v1], v_id[v2], t);
this->InterpolateEdge(outPD[1], p_id[num_inter],
v_id[v1], v_id[v2], t);
}
......@@ -5593,7 +5625,7 @@ void vtkBoxClipDataSet::ClipBoxInOut1D(vtkPoints *newPoints,
vtkIncrementalPointLocator *locator,
vtkCellArray **lines,
vtkPointData *inPD,
vtkPointData *outPD,
vtkPointData **outPD,
vtkCellData *inCD,
vtkIdType cellId,
vtkCellData **outCD)
......@@ -5651,7 +5683,8 @@ void vtkBoxClipDataSet::ClipBoxInOut1D(vtkPoints *newPoints,
if ( locator->InsertUniquePoint(v, iid[i]) )
{
outPD->CopyData(inPD, ptId, iid[i]);
outPD[0]->CopyData(inPD, ptId, iid[i]);
outPD[1]->CopyData(inPD, ptId, iid[i]);
}
}
......@@ -5768,7 +5801,8 @@ void vtkBoxClipDataSet::ClipBoxInOut1D(vtkPoints *newPoints,
// necessary.
if (locator->InsertUniquePoint(x, p_id))
{
this->InterpolateEdge(outPD, p_id, v_id[0], v_id[0], t);
this->InterpolateEdge(outPD[0], p_id, v_id[0], v_id[0], t);
this->InterpolateEdge(outPD[1], p_id, v_id[0], v_id[0], t);
}
// Add the clipped line to the output.
......@@ -6030,7 +6064,7 @@ void vtkBoxClipDataSet::ClipHexahedronInOut1D(vtkPoints *newPoints,
vtkIncrementalPointLocator *locator,
vtkCellArray **lines,
vtkPointData *inPD,
vtkPointData *outPD,
vtkPointData **outPD,
vtkCellData *inCD,
vtkIdType cellId,
vtkCellData **outCD)
......@@ -6088,7 +6122,8 @@ void vtkBoxClipDataSet::ClipHexahedronInOut1D(vtkPoints *newPoints,
if ( locator->InsertUniquePoint(v, iid[i]) )
{
outPD->CopyData(inPD, ptId, iid[i]);