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 (QT_VTK_MAJOR_VERSION "8")
set (QT_VTK_MINOR_VERSION "8")
set (QT_VTK_RELEASE_VERSION "2")
set (QT_VTK_RELEASE_VERSION "3")
set (QT_VTK_VERSION ${QT_VTK_MAJOR_VERSION}.${QT_VTK_MINOR_VERSION}.${QT_VTK_RELEASE_VERSION})


39 changes: 0 additions & 39 deletions src/QtVtk/QtVTKPrintHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,34 +364,10 @@ void QtVTKPrintHelper::printToFile (vtkRenderWindow& window, const string& fileN
} // if (1 < magnification)
} // if (0 != dpi)
windowToImageFilter->Update ( );
#ifndef VTK_5
writer->SetInputConnection (windowToImageFilter->GetOutputPort ( ));
#else // VTK_5
writer->SetInput (windowToImageFilter->GetOutput ( ));
#endif // VTK_5
writer->SetFileName (fileName.c_str ( ));
#ifdef VTK_5
// On force le raffraichissement total de la fenetre. En effet, si la fenetre
// VTK est masquee par une autre fenetre X11 la zone masquee n'est pas
// forcement raffraichie, et la zone correspondante de l'image est alors noire.
window.MappedOff ( );
window.MappedOn ( );
#endif // VTK_5
window.Render ( );
#ifdef VTK_5
windowToImageFilter->Modified ( );
windowToImageFilter->Update ( );
#endif // VTK_5
writer->Write ( );
/*
windowToImageFilter->SetInput (&window);
windowToImageFilter->Update ( );
writer->SetInput (windowToImageFilter->GetOutput ( ));
writer->SetFileName (fileName.c_str ( ));
window.Render ( );
writer->Write ( );
*/

writer->Delete ( );
windowToImageFilter->Delete ( );

Expand Down Expand Up @@ -440,24 +416,9 @@ void QtVTKPrintHelper::printToFile (vtkRenderWindow& window, const string& fileN

windowToImageFilter->SetInput (rw);
windowToImageFilter->Update ( );
#ifndef VTK_5
writer->SetInputConnection (windowToImageFilter->GetOutputPort ( ));
#else // VTK_5
writer->SetInput (windowToImageFilter->GetOutput ( ));
#endif // VTK_5
writer->SetFileName (fileName.c_str ( ));
#ifdef VTK_5
// On force le raffraichissement total de la fenetre. En effet, si la fenetre
// VTK est masquee par une autre fenetre X11 la zone masquee n'est pas
// forcement raffraichie, et la zone correspondante de l'image est alors noire.
rw->MappedOff ( );
rw->MappedOn ( );
#endif // VTK_5
rw->Render ( );
#ifdef VTK_5
windowToImageFilter->Modified ( );
windowToImageFilter->Update ( );
#endif // VTK_5
writer->Write ( );
writer->Delete ( );
windowToImageFilter->Delete ( );
Expand Down
4 changes: 4 additions & 0 deletions src/QtVtk/QtVtkViewDefinitionDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ QtVtkViewDefinitionDialog::QtVtkViewDefinitionDialog (

// Creation de l'ihm :
QVBoxLayout* layout = new QVBoxLayout (this);
#ifdef QT_5
layout->setMargin (QtConfiguration::margin);
#else // QT_5
layout->setContentsMargins (QtConfiguration::margin, QtConfiguration::margin, QtConfiguration::margin, QtConfiguration::margin);
#endif // QT_5
layout->setSizeConstraint (QLayout::SetMinimumSize);
QtGroupBox* frame = new QtGroupBox (QSTR ("Paramètres de la vue"), this, "frame");
QVBoxLayout* frameLayout = new QVBoxLayout (frame);
Expand Down
4 changes: 4 additions & 0 deletions src/QtVtk/QtVtkViewDefinitionPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ QtVtkViewDefinitionPanel::QtVtkViewDefinitionPanel (QWidget* parent, const strin
// Creation de l'ihm :
QVBoxLayout* layout = new QVBoxLayout (this);
layout->setSpacing (QtConfiguration::spacing);
#ifdef QT_5
layout->setMargin (QtConfiguration::margin);
#else // QT_5
layout->setContentsMargins (QtConfiguration::margin, QtConfiguration::margin, QtConfiguration::margin, QtConfiguration::margin);
#endif // QT_5
layout->setSizeConstraint (QLayout::SetMinimumSize);

// Nom / Commentaire :
Expand Down
7 changes: 1 addition & 6 deletions src/QtVtk/public/QtVtk/vtkECMIntersectionPolyDataFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@
* La simple réduction par homothétie du maillage suffit à rendre ce filtre
* opérant ...
*/
#ifndef VTK_5
class vtkECMIntersectionPolyDataFilter :
#else // VTK_5
class VTK_GRAPHICS_EXPORT vtkECMIntersectionPolyDataFilter :
#endif // VTK_5
public vtkPolyDataAlgorithm
class vtkECMIntersectionPolyDataFilter : public vtkPolyDataAlgorithm
{
public:

Expand Down
4 changes: 0 additions & 4 deletions src/QtVtk/public/QtVtk/vtkPatchedDelaunay2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,7 @@ class vtkPointSet;
#define VTK_SET_TRANSFORM_PLANE 1
#define VTK_BEST_FITTING_PLANE 2

#ifndef VTK_5
class vtkPatchedDelaunay2D : public vtkPolyDataAlgorithm // CP
#else // VTK_5
class VTK_GRAPHICS_EXPORT vtkPatchedDelaunay2D : public vtkPolyDataAlgorithm // CP
#endif // VTK_5
{
public:
vtkTypeMacro(vtkPatchedDelaunay2D,vtkPolyDataAlgorithm);
Expand Down
29 changes: 12 additions & 17 deletions src/QtVtk/vtkECMIntersectionPolyDataFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

#include "vtkCellArray.h"
#include "vtkCellData.h"
#if VTK_MAJOR_VERSION >= 9
#include "vtkDelaunay2D.h"
#endif // VTK_MAJOR_VERSION >= 9
#include "vtkDoubleArray.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
Expand All @@ -43,7 +45,9 @@
// CP : new code
#include <vtkIdTypeArray.h>
#include <set>
#if VTK_MAJOR_VERSION < 9
#include <QtVtk/vtkPatchedDelaunay2D.h>
#endif // VTK_MAJOR_VERSION < 9
// !CP new code


Expand Down Expand Up @@ -859,17 +863,14 @@ ::SplitCell(vtkPolyData *input, vtkIdType cellId, vtkIdType *cellPts,
transform->Translate(-center[0], -center[1], -center[2]);

// CP : new code
// vtkSmartPointer< vtkDelaunay2D > del2D =
// vtkSmartPointer< vtkDelaunay2D >::New();
vtkSmartPointer< vtkPatchedDelaunay2D > del2D =
vtkSmartPointer< vtkPatchedDelaunay2D >::New();
#if VTK_MAJOR_VERSION < 9
vtkSmartPointer< vtkPatchedDelaunay2D > del2D = vtkSmartPointer< vtkPatchedDelaunay2D >::New();
#else
vtkSmartPointer< vtkDelaunay2D > del2D = vtkSmartPointer< vtkDelaunay2D >::New();
#endif // VTK_MAJOR_VERSION < 9
// !CP : new code
#ifndef VTK_5
del2D->SetInputData (pd);
#else // VTK_5
del2D->SetInput(pd);
#endif // VTK_5
del2D->SetSource(pd);
// del2D->SetSource(pd); // CP v 8.8.3
del2D->SetTolerance(0.0);
del2D->SetAlpha(0.0);
del2D->SetOffset(10);
Expand Down Expand Up @@ -1395,17 +1396,11 @@ int vtkECMIntersectionPolyDataFilter::RequestData(vtkInformation* vtkNotU
// Set up new poly data for the inputs to build cells and links.
vtkSmartPointer< vtkPolyData > mesh0 = vtkSmartPointer< vtkPolyData >::New();
mesh0->DeepCopy(input0);
#ifndef VTK_5
#else // VTK_5
mesh0->SetSource(NULL);
#endif // VTK_5
// mesh0->SetSource(NULL); // CP v 8.8.3

vtkSmartPointer< vtkPolyData > mesh1 = vtkSmartPointer< vtkPolyData >::New();
mesh1->DeepCopy(input1);
#ifndef VTK_5
#else // VTK_5
mesh1->SetSource(NULL);
#endif // VTK_5
// mesh1->SetSource(NULL); // CP v 8.8.3

// Find the triangle-triangle intersections between mesh0 and mesh1
vtkSmartPointer< vtkOBBTree > obbTree0 = vtkSmartPointer< vtkOBBTree >::New();
Expand Down
4 changes: 0 additions & 4 deletions src/QtVtk/vtkPatchedDelaunay2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ vtkPatchedDelaunay2D::~vtkPatchedDelaunay2D()
void vtkPatchedDelaunay2D::SetSource(vtkPolyData *input) // CP
{
// this->Superclass::SetInputData(1, input); // CP
#ifndef VTK_5
this->Superclass::SetInputData(1, input); // CP
#else // VTK_5
this->Superclass::SetInput(1, input); // CP
#endif // VTK_5
}

//----------------------------------------------------------------------------
Expand Down
11 changes: 9 additions & 2 deletions src/viewpoint/QtViewPointWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#include <QtUtil/QtCoordinatesDialog.h>
#include <VtkContrib/vtkTrihedron.h>
#include <VtkContrib/vtkTrihedronCommand.h>
#ifndef VTK_WIDGET
#include <vtkGenericOpenGLRenderWindow.h>
#endif // VTK_WIDGET

#include <QApplication>
#include <QInputDialog>
Expand Down Expand Up @@ -48,8 +51,12 @@ void QtViewPointWindow::createGui ( )
_graphicWindow->setAttribute (Qt::WA_TranslucentBackground, true); // Bonne gestion transparence
setCentralWidget (_graphicWindow);
_renderer = vtkRenderer::New ( );
#ifndef VTK_WIDGET
_renderWindow = vtkGenericOpenGLRenderWindow::New ( );
#else // VTK_WIDGET
_renderWindow = vtkRenderWindow::New ( );
_renderWindow->Render ( ); // Pour bonne gestion transparence
#endif // VTK_WIDGET
_renderWindow->SetAlphaBitPlanes (1); // Bonne gestion transparence
_renderWindow->SetMultiSamples (0); // Bonne gestion transparence
_renderer->SetUseDepthPeeling (true); // Bonne gestion transparence
Expand All @@ -70,8 +77,8 @@ void QtViewPointWindow::createGui ( )
_renderWindow->AddRenderer (trihedronRenderer);
_graphicWindow->SetRenderWindow (_renderWindow);
vtkInteractorStyleSwitch* interactorStyle = vtkInteractorStyleSwitch::New ( );
_graphicWindow->GetInteractor ( )->SetInteractorStyle (interactorStyle);
_graphicWindow->GetInteractor ( )->SetRenderWindow (_renderWindow);
_graphicWindow->getInteractor ( )->SetInteractorStyle (interactorStyle);
_graphicWindow->getInteractor ( )->SetRenderWindow (_renderWindow);
_graphicWindow->setMinimumSize (800, 600);
_graphicWindow->resize (800, 600);
} // QtViewPointWindow::createGui
Expand Down
17 changes: 17 additions & 0 deletions src/viewpoint/viewpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <TkUtil/Exception.h>

#include <QApplication>
#include <QSurfaceFormat>

#include <iostream>

Expand All @@ -22,6 +23,22 @@ int main (int argc, char* argv[])
try
{
QApplication* application = new QApplication (argc, argv);
#if (VTK_MAJOR_VERSION >= 9)
QSurfaceFormat fmt;
fmt.setRenderableType(QSurfaceFormat::OpenGL);
fmt.setVersion(3, 2);
fmt.setProfile(QSurfaceFormat::CoreProfile);
fmt.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
fmt.setRedBufferSize(8);
fmt.setGreenBufferSize(8);
fmt.setBlueBufferSize(8);
fmt.setDepthBufferSize(24);
fmt.setStencilBufferSize(8);
fmt.setAlphaBufferSize(0);
fmt.setStereo(false);
fmt.setSamples(0);//vtkOpenGLRenderWindow::GetGlobalMaximumNumberOfMultiSamples());
QSurfaceFormat::setDefaultFormat (fmt);
#endif // #if (VTK_MAJOR_VERSION >= 9)
QtVtk::initialize ( );
QtViewPointWindow* mainWindow = new QtViewPointWindow ( );
mainWindow->show ( );
Expand Down
18 changes: 18 additions & 0 deletions versions.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
A FAIRE : tester le vtkIntersectionPolyDataFilter de VTK 7, voir si de base il propose les services attendus (Inner, ...).

Version 8.8.3 : 24/10/25
===============

Portage Qt 6.10.0 / VTK 9.2.5.

Le portage semble OK en 9.5.2 mais n'est pas validé avec Qt 6.10.0 car la fenête graphique est très souvent noire. Elle semble
bien fonctionner quand elle marche => probable problème de paramétrage.
Bon fonctionnement avec Qt v 6.6.1.

Suppression du code VTK 5.


Version 8.8.3 : 24/10/25
===============

Portage Qt 6.10.0 / VTK 9.5.2.


Version 8.8.2 : 26/06/25
===============

Expand Down