Salome HOME
Fix for #17254 [CEA 17252] Glyphs::Scalars in MEDPresentationVectorField
authorrnv <rnv@opencascade.com>
Thu, 10 Oct 2019 17:15:41 +0000 (20:15 +0300)
committerrnv <rnv@opencascade.com>
Thu, 10 Oct 2019 17:15:41 +0000 (20:15 +0300)
src/MEDCalc/cmp/MEDPresentationVectorField.cxx

index 23c81b985e3b7c95f3d8621be583eb22c441a08f..5b77625de7a0cc06562f99c23834dacf91c4a14a 100644 (file)
@@ -81,14 +81,15 @@ MEDPresentationVectorField::internalGeneratePipeline()
 
   showObject(); // to be done first so that the scale factor computation properly works
 
-  oss << _objVar << ".Scalars = ['"<< _pvFieldType << "', 'None'];";
+  std::string fieldName = nbCompo <= 2 ? _fieldName + "_Vector" : _fieldName;
+
+  oss << _objVar << ".ScaleArray = ['"<< _pvFieldType << "', '" << fieldName << "'];";
   pushAndExecPyLine(oss.str()); oss.str("");
 
-  std::string fieldName = nbCompo <= 2 ? _fieldName + "_Vector" : _fieldName;
-  oss << _objVar << ".Vectors = ['"<< _pvFieldType << "', '" << fieldName << "'];";
+  oss << _objVar << ".OrientationArray = ['"<< _pvFieldType << "', '" << fieldName << "'];";
 
   pushAndExecPyLine(oss.str()); oss.str("");
-  oss << _objVar << ".ScaleMode = 'vector';";
+  oss << _objVar << ".VectorScaleMode = 'Scale by Magnitude';";
   pushAndExecPyLine(oss.str()); oss.str("");
   oss << _objVar << ".GlyphMode = 'All Points';";
   pushAndExecPyLine(oss.str()); oss.str("");