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 "17")
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})


4 changes: 2 additions & 2 deletions src/VtkContrib/public/VtkContrib/vtkTransformHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class vtkTransformHelper
* Classe créée à la base pour pouvoir, à partir d'une instance de cette classe conservée par exemple dans une IHM, recréer une instance de
* vtkTransform à partir de la méthode vtkTransformHelper::CreateTransform (vtkSimpleTransformMemento).
*
* Une transformation intrinsèque est nue transformation géométrique qui est appliquée directement à un objet ou à un système de coordonnées
* Une transformation intrinsèque est une transformation géométrique qui est appliquée directement à un objet ou à un système de coordonnées
* dans son propre repère. Contrairement aux transformations extrinsèques, qui sont appliquées par rapport à un repère externe, les
* transformations intrinsèques modifient les propriétés internes de l'objet ou du repère lui-même (position, orientation, forme, taille).
*
Expand All @@ -62,7 +62,7 @@ class vtkTransformHelper
// Les éventuelles mises à l'échelle. Effectuées avant toute autre opération.
double scaleX, scaleY, scaleZ;

// Paramétrage transformation extrinsèque :
// Paramétrage transformation extrinsèque/intrinsèque :
double xoy, xoz, yoz; // theta, phi, omega
double dx, dy, dz;
bool translationFirst;
Expand Down
31 changes: 20 additions & 11 deletions src/VtkContrib/vtkTransformHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,28 +135,37 @@ vtkTransform* vtkTransformHelper::CreateTransform (const vtkTransformHelper::vtk

if (true == memento.isExtrinsic)
{
if (false == memento.translationFirst)
// Passage en mode PostMultiply pour le repère extrinsèque (global)
transform->PostMultiply ( );

// Application des transformations dans l'ordre exact de l'énoncé
if (true == memento.translationFirst)
transform->Translate (memento.dx, memento.dy, memento.dz);
transform->RotateY (memento.xoz);
transform->RotateX (memento.yoz);

// Rotations autour de Oz, puis Oz, puis Oy :
transform->RotateZ (memento.xoy);
if (true == memento.translationFirst)
transform->RotateX (memento.yoz);
transform->RotateY (memento.xoz);

if (false == memento.translationFirst)
transform->Translate (memento.dx, memento.dy, memento.dz);
} // if (true == memento.isExtrinsic)
else
{
// Passage en mode PreMultiply pour le repère intrinsèque (local)
transform->PreMultiply ( );

// Application des transformations dans l'ordre exact de l'énoncé
if (true == memento.translationFirst)
transform->Translate (memento.dx, memento.dy, memento.dz);
// RotateY(phi) → RotateZ(theta) → RotateX(omega) : chaque rotation s’applique dans le repère local courant,
// méthode standard pour les angles de Tait-Bryan intrinsèques (ZYX) en robotique/aéronautique. Dixit mistral.ai.
// Pour ce il faut inverser l'ordre des rotations par rapport à la même transformation mais à repère constant
// (transformation extrinsèque).
transform->RotateX (memento.yoz);
transform->RotateZ (memento.xoy);

// Rotations autour de Oy, puis Oz, puis Ox :
transform->RotateY (memento.xoz);
transform->RotateZ (memento.xoy);
transform->RotateX (memento.yoz);

if (false == memento.translationFirst)
transform->Translate (memento.dx, memento.dy, memento.dz);
transform->PostMultiply ( );
} // else if (true == memento.isExtrinsic)

return transform;
Expand Down
6 changes: 6 additions & 0 deletions versions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 5.17.1 : 03/07/26
================

Classe vtkTransformHelper : correctif Pre/PostMultiply dans le cas des transformations intrinsèques.


Version 5.17.0 : 24/03/26
================

Expand Down