VISU_CutLinesPL
::Update()
{
+ vtkDataSet* aMergedInput = GetMergedInput();
+ if(VISU::IsQuadraticData(aMergedInput)) // Bug 0020123, note 0005343
+ throw std::runtime_error("Impossible to build presentation");
+
ClearAppendPolyData(myAppendPolyData);
SetPartPosition(1);
VISU_CutPlanesPL
::Update()
{
+ vtkDataSet* aMergedInput = GetMergedInput();
+ if(VISU::IsQuadraticData(aMergedInput)) // Bug 0020123, note 0005343
+ throw std::runtime_error("Impossible to build presentation");
+
ClearAppendPolyData(myAppendPolyData);
if(!myVectorialField || !IsDeformed()){
- SetMergeFilterInput(GetMergedInput(),GetMergedInput());
+ SetMergeFilterInput(aMergedInput,aMergedInput);
}
- if(VISU::IsDataOnCells(GetMergedInput()))
+ if(VISU::IsDataOnCells(aMergedInput))
GetMapper()->SetScalarModeToUseCellData();
else
GetMapper()->SetScalarModeToUsePointData();
#include "VISU_OpenGLPointSpriteMapper.hxx"
+#include <vtkCell.h>
#include <vtkDataSetMapper.h>
#include <vtkPolyDataMapper.h>
}
+ //----------------------------------------------------------------------------
+ bool
+ IsQuadraticData(vtkDataSet* theDataSet)
+ {
+ for(int i = 0, n = theDataSet->GetNumberOfCells(); i < n; i++)
+ if(vtkCell* aCell = theDataSet->GetCell(i))
+ if(!aCell->IsLinear())
+ return true;
+ return false;
+ }
+
+
//----------------------------------------------------------------------------
}
vtkFloatingPointType theDirection[3],
vtkFloatingPointType thePos[3],
vtkFloatingPointType& theDist);
+
+
+ //----------------------------------------------------------------------------
+ bool VISU_PIPELINE_EXPORT
+ IsQuadraticData(vtkDataSet* theDataSet);
}
#endif
VISU_Plot3DPL
::Update()
{
+ vtkDataSet* aMergedInput = GetMergedInput();
+ if(VISU::IsQuadraticData(aMergedInput)) // Bug 0020123, note 0005343
+ throw std::runtime_error("Impossible to build presentation");
+
vtkFloatingPointType aPlaneNormal[3];
vtkFloatingPointType anOrigin[3];
GetBasePlane( anOrigin, aPlaneNormal );
vtkPolyData* aPolyData = 0;
vtkCutter *aCutPlane = 0;
- vtkDataSet* aDataSet = GetMergedInput();
if ( !IsPlanarInput() )
{
aCutPlane = vtkCutter::New();
- aCutPlane->SetInput(aDataSet);
+ aCutPlane->SetInput(aMergedInput);
vtkPlane *aPlane = vtkPlane::New();
aPlane->SetOrigin(anOrigin);
}
if ( !aPolyData || aPolyData->GetNumberOfCells() == 0 ) {
- myGeometryFilter->SetInput(aDataSet);
+ myGeometryFilter->SetInput(aMergedInput);
aPolyData = myGeometryFilter->GetOutput();
aPolyData->Update();
}