ENH: support surface writer output transform (#2505)

- this allows the "relocation" of sampled surfaces. For example,
  to reposition into a different coordinate system for importing
  into CAD.

- incorporate output scaling for all surface writer types.

  This was previously done on an adhoc basis for different writers,
  but with now included in the base-level so that all writers
  can automatically use scale + transform.

  Example:

  formatOptions
  {
      vtk
      {
          scale 1000;  // m -> mm
          transform
          {
              origin  (0.05 0 0);
              rotation axisAngle;
              axis    (0 0 1);
              angle   -45;
          }
      }
  }
This commit is contained in:
Mark Olesen
2022-06-08 12:36:36 +02:00
committed by Andrew Heather
parent 675c168014
commit ad0235a751
28 changed files with 286 additions and 127 deletions

View File

@ -92,9 +92,9 @@ plane
libs (sampling);
writeControl writeTime;
fields ( cellZoneID U );
surfaceFormat vtk;
fields ( cellZoneID U );
surfaces
{
@ -104,6 +104,25 @@ plane
point (0 0 0);
normal (0 0 1);
interpolate false;
surfaceFormat ensight;
formatOptions
{
ensight
{
scale 2; // Some arbitrary scaling
// Align with global x-axis, translate by arbitrary amount
transform
{
origin (0.05 -0.05 0);
rotation axisAngle;
axis (0 0 1);
angle -45;
}
}
}
}
slices
@ -122,6 +141,23 @@ plane
axis (0 0 1);
angle 45;
}
formatOptions
{
vtk
{
scale 2; // Some arbitrary scaling
// Align with global x-axis, translate by arbitrary amount
transform
{
origin (0.05 0 0);
rotation axisAngle;
axis (0 0 1);
angle -45;
}
}
}
}
}
}