Skip to content
  • Mark OLESEN's avatar
    ENH: improved handling of coordinateSystems · 7b2bcfda
    Mark OLESEN authored
    - in continuation of #2565 (rotationCentre for surface output formats)
      it is helpful to also support READ_IF_PRESENT behaviour for the
      'origin' keyword.
    
      This can be safely used wherever the coordinate system definition
      is embedded within a sub-dictionary scope.
    
      Eg,
          dict1
          {
              coordinateSystem
              {
                  origin (0 0 0);  // now optional here
                  rotation ...;
              }
          }
    
       but remains mandatory if constructed without a sub-dict:
    
          dict2
          {
              origin (0 0 0);   // still mandatory
              e1  (1 0 0);
              e3  (0 0 1);
          }
    
       With this change, the "transform" sub-dictionary can written
       more naturally:
    
           formatOptions
           {
               vtk
               {
                   scale 1000;  // m -> mm
                   transform
                   {
                       rotationCentre  (1 0 0);
                       rotation axisAngle;
                       axis    (0 0 1);
                 ...
    7b2bcfda