Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set (VTK_CONTRIB_MAJOR_VERSION "5")
set (VTK_CONTRIB_MINOR_VERSION "13")
set (VTK_CONTRIB_RELEASE_VERSION "0")
set (VTK_CONTRIB_RELEASE_VERSION "1")
set (VTK_CONTRIB_VERSION ${VTK_CONTRIB_MAJOR_VERSION}.${VTK_CONTRIB_MINOR_VERSION}.${VTK_CONTRIB_RELEASE_VERSION})


3 changes: 0 additions & 3 deletions src/VtkContrib/public/VtkContrib/vtk2dAxiDihedron.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* @date 18/09/2019
*/

#ifndef VTK_5

#ifndef VTK_2DAXI_DIHEDRON_H
#define VTK_2DAXI_DIHEDRON_H

Expand Down Expand Up @@ -83,6 +81,5 @@ class vtk2dAxiDihedron : public vtkTrihedron
vtkConeSource* m_zTipCurveSource;
}; // class vtk2dAxiDihedron

#endif // VTK_5

#endif // VTK_2DAXI_DIHEDRON_H
11 changes: 0 additions & 11 deletions src/VtkContrib/vtk2dAxiDihedron.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* @date 18/09/2019
*/

#ifndef VTK_5

#include "VtkContrib/vtk2dAxiDihedron.h"

#include <vtkPolyDataMapper.h>
Expand Down Expand Up @@ -45,11 +43,7 @@ vtk2dAxiDihedron::vtk2dAxiDihedron ( )
GetZAxisArrowSource ( ).InvertOn ( );
if (0 != GetZAxisLabelActor ( ))
GetZAxisLabelActor ( )->AddPosition (1., -radius, -2.1);
#ifndef VTK_5
zShaftCurveMapper->SetInputConnection (m_zShaftCurveSource->GetOutputPort ( ));
#else // VTK_5
zShaftCurveMapper->SetInput (m_zShaftCurveSource->GetOutput ( ));
#endif // VTK_5
zShaftCurveMapper->ScalarVisibilityOff ( );
m_zShaftActor->SetMapper (zShaftCurveMapper);
AddPart (m_zShaftActor);
Expand All @@ -64,11 +58,7 @@ vtk2dAxiDihedron::vtk2dAxiDihedron ( )
1., -radius, -GetZAxisArrowSource ( ).GetTipLength ( ) / 2.);
vtkPolyDataMapper* zTipConeMapper = vtkPolyDataMapper::New ( );
zTipConeMapper->ScalarVisibilityOff ( );
#ifndef VTK_5
zTipConeMapper->SetInputConnection (m_zTipCurveSource->GetOutputPort ( ));
#else // VTK_5
zTipConeMapper->SetInput (m_zTipCurveSource->GetOutput ( ));
#endif // VTK_5
m_zTipActor = vtkActor::New ( );
m_zTipActor->SetMapper (zTipConeMapper);
m_zTipActor->GetProperty ( )->SetColor (vtkTrihedron::zColor);
Expand Down Expand Up @@ -168,4 +158,3 @@ void vtk2dAxiDihedron::SetElevationColor (double r, double g, double b)
m_zTipActor->GetProperty ( )->SetColor (r, g, b);
} // vtk2dAxiDihedron::SetElevationColor

#endif // VTK_5
12 changes: 0 additions & 12 deletions src/VtkContrib/vtkECMAxesActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,33 +36,21 @@ vtkECMAxesActor::vtkECMAxesActor ( )
// Création de l'axe X
_xAxis->SetPoint1 (-1., 0., 0.);
_xAxis->SetPoint2 (1., 0., 0.);
#ifndef VTK_5
xAxisMapper->SetInputConnection (_xAxis->GetOutputPort ( ));
#else // VTK_5
xAxisMapper->SetInput (_xAxis->GetOutput ( ));
#endif // VTK_5
xAxisMapper->ScalarVisibilityOff ( );
_xAxisActor->SetMapper (xAxisMapper);

// Création de l'axe Y
_yAxis->SetPoint1 (0., -1., 0.);
_yAxis->SetPoint2 (0., 1., 0.);
#ifndef VTK_5
yAxisMapper->SetInputConnection (_yAxis->GetOutputPort ( ));
#else // VTK_5
yAxisMapper->SetInput (_yAxis->GetOutput ( ));
#endif // VTK_5
yAxisMapper->ScalarVisibilityOff ( );
_yAxisActor->SetMapper (yAxisMapper);

// Création de l'axe Z
_zAxis->SetPoint1 (0., 0., -1.);
_zAxis->SetPoint2 (0., 0., 1.);
#ifndef VTK_5
zAxisMapper->SetInputConnection (_zAxis->GetOutputPort ( ));
#else // VTK_5
zAxisMapper->SetInput (_zAxis->GetOutput ( ));
#endif // VTK_5
zAxisMapper->ScalarVisibilityOff ();
_zAxisActor->SetMapper (zAxisMapper);

Expand Down
30 changes: 17 additions & 13 deletions src/VtkContrib/vtkFrustumWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void vtkFrustumWidget::vtkInternalPlaneWidget::SetInteractorEnabled (bool enable
} // if (true == enabled)
} // if (0 != this->Picker)
else
vtkErrorMacro ("vtkFrustumWidget::SetInteractorEnabled : null picker.")
vtkErrorMacro ("vtkFrustumWidget::SetInteractorEnabled : null picker.");
} // vtkInternalPlaneWidget::SetInteractorEnabled


Expand Down Expand Up @@ -393,7 +393,7 @@ void vtkFrustumWidget::SetPlane (SIDE p, double origin [3], double normal [3])
Update (planeWidget);
} // if (0 != planeWidget)
else
vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p)
vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p);
} // vtkFrustumWidget::SetPlane


Expand All @@ -406,7 +406,7 @@ void vtkFrustumWidget::GetPlane (SIDE p, double origin [3], double normal [3])
planeWidget->GetNormal (normal);
} // if (0 != planeWidget)
else
vtkErrorMacro ("vtkFrustumWidget::GetPlane : 0 <= p <= 5 is not verified. p =" << p)
vtkErrorMacro ("vtkFrustumWidget::GetPlane : 0 <= p <= 5 is not verified. p =" << p);
} // vtkFrustumWidget::GetPlane


Expand All @@ -419,7 +419,7 @@ void vtkFrustumWidget::SetPlaneOrigin (SIDE p, double origin [3])
Update (planeWidget);
} // if (0 != planeWidget)
else
vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p)
vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p);
} // vtkFrustumWidget::SetPlaneOrigin


Expand All @@ -429,7 +429,7 @@ void vtkFrustumWidget::GetPlaneOrigin (SIDE p, double origin [3])
if (0 != planeWidget)
planeWidget->GetOrigin (origin);
else
vtkErrorMacro ("vtkFrustumWidget::GetPlaneOrigin : 0 <= p <= 5 is not verified. p =" << p)
vtkErrorMacro ("vtkFrustumWidget::GetPlaneOrigin : 0 <= p <= 5 is not verified. p =" << p);
} // vtkFrustumWidget::GetPlaneOrigin


Expand All @@ -442,7 +442,7 @@ void vtkFrustumWidget::SetPlaneNormal (SIDE p, double normal [3])
Update (planeWidget);
} // if (0 != planeWidget)
else
vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p)
vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p);
} // vtkFrustumWidget::SetPlaneNormal


Expand All @@ -452,7 +452,7 @@ void vtkFrustumWidget::GetPlaneNormal (SIDE p, double normal [3])
if (0 != planeWidget)
planeWidget->GetNormal (normal);
else
vtkErrorMacro ("vtkFrustumWidget::GetPlaneNormal : 0 <= p <= 5 is not verified. p =" << p)
vtkErrorMacro ("vtkFrustumWidget::GetPlaneNormal : 0 <= p <= 5 is not verified. p =" << p);
} // vtkFrustumWidget::GetPlaneNormal


Expand All @@ -467,7 +467,7 @@ void vtkFrustumWidget::SetInteractorColor (SIDE axis, double rgb [3])
{
if ((axis >= _planeWidgets.size ( )) || (0 == _planeWidgets [axis]))
{
vtkErrorMacro ("vtkFrustumWidget::SetInteractorColor : 0 <= axis <= " << _planeWidgets.size ( ) << " is not verified. axis =" << axis)
vtkErrorMacro ("vtkFrustumWidget::SetInteractorColor : 0 <= axis <= " << _planeWidgets.size ( ) << " is not verified. axis =" << axis);
return;
} // if ((axis >= _planeWidgets.size ( )) || (0 == _planeWidgets [axis]))

Expand Down Expand Up @@ -496,7 +496,7 @@ void vtkFrustumWidget::SetInteractorEnabled (SIDE p, bool enabled)
if (0 != planeWidget)
planeWidget->SetInteractorEnabled (enabled);
else
vtkErrorMacro ("vtkFrustumWidget::SetInteractorEnabled : 0 <= p <= 5 is not verified. p =" << p)
vtkErrorMacro ("vtkFrustumWidget::SetInteractorEnabled : 0 <= p <= 5 is not verified. p =" << p);
} // vtkFrustumWidget::SetInteractorEnabled


Expand All @@ -505,7 +505,9 @@ void vtkFrustumWidget::GetBounds (double bounds [6])
vtkPolyData* frustum = 0 == _frustum ? 0 : _frustum->GetOutput ( );

if (0 == frustum)
vtkErrorMacro ("vtkFrustumWidget::GetBounds : null frustum.")
{
vtkErrorMacro ("vtkFrustumWidget::GetBounds : null frustum.");
}
else
{
// frustum->GetBounds (bounds);
Expand Down Expand Up @@ -575,7 +577,9 @@ void vtkFrustumWidget::SetPlanes (vtkPlanes& planes)
Update (0);
}
else
vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= planes.GetNumberOfPlanes ( ) <= 5 is not verified. p =" << planes.GetNumberOfPlanes ( ))
{
vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= planes.GetNumberOfPlanes ( ) <= 5 is not verified. p =" << planes.GetNumberOfPlanes ( ));
}
} // vtkFrustumWidget::SetPlanes


Expand All @@ -601,7 +605,7 @@ void vtkFrustumWidget::AddParallelPlanes (SIDE p)
case TOP : AddParallelPlanes (BOTTOM, TOP); break;
case FRONT :
case BACK : AddParallelPlanes (FRONT, BACK); break;
default : vtkErrorMacro ("vtkFrustumWidget::AddParallelPlanes : 0 <= p <= 5 is not verified. p =" << p)
default : vtkErrorMacro ("vtkFrustumWidget::AddParallelPlanes : 0 <= p <= 5 is not verified. p =" << p);
} // switch (p)
} // vtkFrustumWidget::AddParallelPlanes

Expand All @@ -616,7 +620,7 @@ void vtkFrustumWidget::RemoveParallelPlanes (SIDE p)
case TOP : RemoveParallelPlanes (BOTTOM, TOP); break;
case FRONT :
case BACK : RemoveParallelPlanes (FRONT, BACK); break;
default : vtkErrorMacro ("vtkFrustumWidget::RemoveParallelPlanes : 0 <= p <= 5 is not verified. p =" << p)
default : vtkErrorMacro ("vtkFrustumWidget::RemoveParallelPlanes : 0 <= p <= 5 is not verified. p =" << p);
} // switch (p)
} // vtkFrustumWidget::RemoveParallelPlanes

Expand Down
12 changes: 0 additions & 12 deletions src/VtkContrib/vtkKatAxisActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,7 @@ vtkKatAxisActor::vtkKatAxisActor()

this->TitleVector = vtkVectorText::New();
this->TitleMapper = vtkPolyDataMapper::New();
#ifndef VTK_5
this->TitleMapper->SetInputConnection (this->TitleVector->GetOutputPort());
#else // VTK_5
this->TitleMapper->SetInput(this->TitleVector->GetOutput());
#endif // VTK_5
this->TitleActor = vtkFollower::New();
this->TitleActor->SetMapper(this->TitleMapper);

Expand All @@ -129,11 +125,7 @@ vtkKatAxisActor::vtkKatAxisActor()

this->Axis = vtkPolyData::New();
this->AxisMapper = vtkPolyDataMapper::New();
#ifndef VTK_5
this->AxisMapper->SetInputData(this->Axis);
#else // VTK_5
this->AxisMapper->SetInput(this->Axis);
#endif // VTK_5
this->AxisActor = vtkActor::New();
this->AxisActor->SetMapper(this->AxisMapper);

Expand Down Expand Up @@ -1203,11 +1195,7 @@ vtkKatAxisActor::SetNumberOfLabels(const int numLabels)
{
this->LabelVectors[i] = vtkVectorText::New();
this->LabelMappers[i] = vtkPolyDataMapper::New();
#ifndef VTK_5
this->LabelMappers[i]->SetInputConnection(this->LabelVectors[i]->GetOutputPort());
#else // VTK_5
this->LabelMappers[i]->SetInput(this->LabelVectors[i]->GetOutput());
#endif // VTK_5
this->LabelActors[i] = vtkFollower::New();
this->LabelActors[i]->SetMapper(this->LabelMappers[i]);
}
Expand Down
21 changes: 20 additions & 1 deletion src/VtkContrib/vtkPolygonFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
#include <vtkDataSet.h>
#include <vtkCellData.h>
#include <vtkPointData.h>
#include <vtkCellArray.h>
#if VTK_MAJOR_VERSION >= 9
#include <vtkCellArrayIterator.h>
#endif // VTK_MAJOR_VERSION >= 9
#include <assert.h>

#include <algorithm>
Expand Down Expand Up @@ -68,9 +72,23 @@ int vtkPolygonFilter::RequestData (vtkInformation* request, vtkInformationVector
output->Reset ( );

const size_t cellNum = cells->GetNumberOfCells ( );
vtkIdType* cellsPtr = cells->GetPointer ( );
output->SetPoints (pointSet);
output->Allocate (cellNum, cellNum);
#ifdef VTK_CELL_ARRAY_V2 // defined in vtkCellArray.h CP v 5.13.1 Portage VTK 9.3.0
vtkSmartPointer<vtkCellArrayIterator> cellIterator = vtk::TakeSmartPointer (cells->NewIterator ( ));
for (cellIterator->GoToFirstCell ( ); !cellIterator->IsDoneWithTraversal ( ); cellIterator->GoToNextCell ( ))
{
vtkIdType nodeCount = 0;
const vtkIdType* ids = 0;
cellIterator->GetCurrentCell (nodeCount, ids);
switch (nodeCount)
{
case 3 : output->InsertNextCell (VTK_TRIANGLE, nodeCount, ids); break;
case 4 : output->InsertNextCell (VTK_QUAD, nodeCount, ids); break;
} // switch (nodeCount)
} // for (cellIterator->GoToFirstCell ( ); !cellIterator->IsDoneWithTraversal ( ); cellIterator->GoToNextCell ( ))
#else // VTK_CELL_ARRAY_V2
vtkIdType* cellsPtr = cells->GetPointer ( );
for (int i = 0; i < cellNum; i++)
{
const vtkIdType nodeCount = *cellsPtr;
Expand All @@ -82,6 +100,7 @@ int vtkPolygonFilter::RequestData (vtkInformation* request, vtkInformationVector
} // switch (nodeCount)
cellsPtr += nodeCount;
} // for (i = 0; i < cellNum; i++)
#endif // VTK_CELL_ARRAY_V2

output->GetCellData ( )->PassData (input->GetCellData ( ));
output->Squeeze ( );
Expand Down
24 changes: 0 additions & 24 deletions src/VtkContrib/vtkTrihedron.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,11 @@ vtkTrihedron::vtkTrihedron ( )
// Création de l'axe X
m_xAxisArrowSource->SetShaftResolution(ArrowResolution);
m_xAxisArrowSource->SetTipResolution(TipResolution);
#ifndef VTK_5
xAxisMapper->SetInputConnection (m_xAxisArrowSource->GetOutputPort ( ));
#else // VTK_5
xAxisMapper->SetInput (m_xAxisArrowSource->GetOutput ( ));
#endif // VTK_5
xAxisMapper->ScalarVisibilityOff();
m_xAxisActor->SetMapper(xAxisMapper);
m_xVectorText->SetText("x");
#ifndef VTK_5
xLabelMapper->SetInputConnection(m_xVectorText->GetOutputPort());
#else // VTK_5
xLabelMapper->SetInput(m_xVectorText->GetOutput());
#endif // VTK_5
m_xLabelActor->SetMapper(xLabelMapper);
m_xLabelActor->SetScale(0.4,0.4,0.4);
m_xLabelActor->AddPosition(1.1,0.0,0.0);
Expand All @@ -102,20 +94,12 @@ vtkTrihedron::vtkTrihedron ( )
// Création de l'axe Y
m_yAxisArrowSource->SetShaftResolution(ArrowResolution);
m_yAxisArrowSource->SetTipResolution(TipResolution);
#ifndef VTK_5
yAxisMapper->SetInputConnection (m_yAxisArrowSource->GetOutputPort ( ));
#else // VTK_5
yAxisMapper->SetInput(m_yAxisArrowSource->GetOutput());
#endif // VTK_5
yAxisMapper->ScalarVisibilityOff();
m_yAxisActor->SetMapper(yAxisMapper);
m_yAxisActor->RotateZ(90);
m_yVectorText->SetText("y");
#ifndef VTK_5
yLabelMapper->SetInputConnection(m_yVectorText->GetOutputPort());
#else // VTK_5
yLabelMapper->SetInput(m_yVectorText->GetOutput());
#endif // VTK_5
m_yLabelActor->SetMapper(yLabelMapper);
m_yLabelActor->SetScale(0.4,0.4,0.4);
m_yLabelActor->AddPosition(0.0,1.1,0.0);
Expand All @@ -134,20 +118,12 @@ vtkTrihedron::vtkTrihedron ( )
// Création de l'axe Z
m_zAxisArrowSource->SetShaftResolution(ArrowResolution);
m_zAxisArrowSource->SetTipResolution(TipResolution);
#ifndef VTK_5
zAxisMapper->SetInputConnection (m_zAxisArrowSource->GetOutputPort ( ));
#else // VTK_5
zAxisMapper->SetInput(m_zAxisArrowSource->GetOutput());
#endif // VTK_5
zAxisMapper->ScalarVisibilityOff();
m_zAxisActor->SetMapper(zAxisMapper);
m_zAxisActor->RotateY(-90);
m_zVectorText->SetText("z");
#ifndef VTK_5
zLabelMapper->SetInputConnection(m_zVectorText->GetOutputPort());
#else // VTK_5
zLabelMapper->SetInput(m_zVectorText->GetOutput());
#endif // VTK_5
m_zLabelActor->SetMapper(zLabelMapper);
m_zLabelActor->SetScale(0.4,0.4,0.4);
m_zLabelActor->AddPosition(0.0,0.0,1.1);
Expand Down
6 changes: 1 addition & 5 deletions src/tests/point_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,9 @@ int main ( int argc, char *argv[] )

vtkUnstructuredGrid* grid = vtkUnstructuredGrid::New ( );
vtkDataSetMapper* mapper = vtkDataSetMapper::New ( );
#ifndef VTK_5
mapper->SetInputData (grid);
#else // VTK_5
mapper->SetInput (grid);
#endif // VTK_5
mapper->ScalarVisibilityOff ( );
#if defined(VTK5) || defined(VTK_7)
#ifdef VTK_7
mapper->SetImmediateModeRendering (false);
#endif
vtkActor* actor = vtkActor::New ( );
Expand Down
8 changes: 8 additions & 0 deletions versions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Version 5.13.1 : 24/10/25
================

Portage VTK 9.2.5/9.5.2.

Suppression du code VTK 5.


Version 5.13.0 : 21/10/25
================

Expand Down