Commit b9ac0bc2 authored by Charles Law's avatar Charles Law
Browse files

Fix paraview hanging problem.

parent 10e2aaa4
......@@ -23,7 +23,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkConeSource, "1.65");
vtkCxxRevisionMacro(vtkConeSource, "1.66");
vtkStandardNewMacro(vtkConeSource);
//----------------------------------------------------------------------------
......@@ -66,6 +66,10 @@ void vtkConeSource::Execute()
int createBottom;
piece = output->GetUpdatePiece();
if (piece >= this->Resolution)
{
return;
}
numPieces = output->GetUpdateNumberOfPieces();
maxPieces = this->Resolution != 0 ? this->Resolution : 1;
if (numPieces > maxPieces)
......@@ -263,7 +267,7 @@ void vtkConeSource::Execute()
//----------------------------------------------------------------------------
void vtkConeSource::ExecuteInformation()
{
this->GetOutput()->SetMaximumNumberOfPieces(this->Resolution);
this->GetOutput()->SetMaximumNumberOfPieces(-1);
}
......
......@@ -22,7 +22,7 @@
#include "vtkPolyData.h"
#include <math.h>
vtkCxxRevisionMacro(vtkLineSource, "1.44");
vtkCxxRevisionMacro(vtkLineSource, "1.45");
vtkStandardNewMacro(vtkLineSource);
vtkLineSource::vtkLineSource(int res)
......@@ -38,6 +38,13 @@ vtkLineSource::vtkLineSource(int res)
this->Resolution = (res < 1 ? 1 : res);
}
void vtkLineSource::ExecuteInformation()
{
this->GetOutput()->SetMaximumNumberOfPieces(-1);
}
void vtkLineSource::Execute()
{
int numLines=this->Resolution;
......@@ -49,6 +56,11 @@ void vtkLineSource::Execute()
vtkCellArray *newLines;
vtkPolyData *output = this->GetOutput();
if (output->GetUpdatePiece() > 0)
{
return;
}
vtkDebugMacro(<<"Creating line");
newPoints = vtkPoints::New();
......
......@@ -50,6 +50,7 @@ protected:
~vtkLineSource() {};
void Execute();
void ExecuteInformation();
double Point1[3];
double Point2[3];
int Resolution;
......
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