]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Fixed GaussPointsOnField1
authorvtn <vtn@opencascade.com>
Wed, 19 Mar 2014 16:08:50 +0000 (20:08 +0400)
committervtn <vtn@opencascade.com>
Wed, 19 Mar 2014 16:08:50 +0000 (20:08 +0400)
src/PV_SWIG/VTKWrapping/presentations.py
test/VisuPrs/GaussPoints/C9.py

index 8f4a57f42df3ccd866e84ba594e27f242a61815e..7c62380a5772be1c3dbc4e241b08a363db91e077 100644 (file)
@@ -2174,6 +2174,15 @@ def GaussPointsOnField1(proxy, entity, field_name,
     # Get time value
     time_value = get_time(proxy, timestamp_nb)
 
+    # Select field_name
+    fields_info = proxy.GetProperty("FieldsTreeInfo")[::2]
+    arr_name_with_dis=[elt.split("/")[-1] for elt in fields_info]
+    gauss_name=field_name+proxy.GetProperty("Separator").GetData()+'GAUSS'
+    if arr_name_with_dis.count(gauss_name) > 0:
+        index = arr_name_with_dis.index(gauss_name)
+        field = fields_info[index]
+        proxy.AllArrays = [field]
+
     # Set timestamp
     pvs.GetRenderView().ViewTime = time_value
     proxy.UpdatePipeline(time=time_value)
index 3f602a39e9a30ddc0de03c70089db58ec38cdeb1..0426b9a4641c53cb65b724dfa3de1225ac8ff241 100644 (file)
@@ -30,13 +30,13 @@ import pvsimple
 
 
 # Directory for saving snapshots
-picturedir = get_picture_dir(sys.argv[1], "GaussPoints/C9")
+picturedir = get_picture_dir("GaussPoints/C9")
 if not picturedir.endswith(os.sep):
     picturedir += os.sep
 
 # MED file
 file_name = datadir + "petit.rmed"
-field_name = "RESPIL_SIEF_ELGA"
+field_name = "RESPIL__SIEF_ELGA"
 timestamp_nb = -1 # last timestamp
 
 paravis.myParavis.ImportFile(file_name)