ENH: support rotationCentre for surface output formats (#2565)

- as an alternative output transform (supplementary to the regular
  coordinate system specification - issue #2505) it is now possible to
  specify the rotation centre directly.

  Example:

      formatOptions
      {
          vtk
          {
              scale 1000;  // m -> mm
              transform
              {
                  origin  (0 0 0);
                  rotationCentre  (1 0 0);
                  rotation axisAngle;
                  axis    (0 0 1);
                  angle   -45;
              }
          }
      }

   This behaves like the transformPoints and surfaceTransformPoints
   '-centre' option (formerly '-origin') in that it removes the
   specified amount from the point locations, applies the rotation and
   finally adds the specified amount back to the newly rotated point
   locations.

   The results of specifying a `rotationCentre` and a non-zero
   coordinate system `origin` may not be intuitively evident.
This commit is contained in:
Mark Olesen
2022-08-18 11:07:53 +02:00
parent e827c117e3
commit 7ea185b0b5
3 changed files with 61 additions and 16 deletions

View File

@ -111,6 +111,21 @@ debug
isoValue 1e5;
regularise true;
interpolate true;
formatOptions
{
ensight
{
transform
{
origin (0 0 0);
rotationCentre (0.025 0 0);
rotation axisAngle;
axis (0 1 0);
angle 90;
}
}
}
}
// Top channel