]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
IPAL8877: add FillTable() and CreateCurve() ENK_JFA_Poly_work smh_merge_poly
authoreap <eap@opencascade.com>
Wed, 25 May 2005 09:52:49 +0000 (09:52 +0000)
committereap <eap@opencascade.com>
Wed, 25 May 2005 09:52:49 +0000 (09:52 +0000)
src/VISU_SWIG/visu.py

index 85c1131c0f97b6a4a8b3b7a3b7c8d6afe7af008d..1519f9ce7a7c4c01b616ed8f5aa496f598740754 100644 (file)
@@ -862,3 +862,41 @@ def dump_isosurfaces_parameters(theObject):
     
     dump_scalarmap_parameters(theObject)
     print "GetNbSurfaces() = "+ str(theObject.GetNbSurfaces())
+
+
+# ----------------------
+# TABLES AND CURVES
+# ----------------------
+
+def FillTable( theTable, theValues, theRows, theColumns, theRowTitles, theRowUnits, theColumnTitles ):
+    if theTable is None: return
+    if len(theRows) != len(theColumns): return
+    if len(theRows) != len(theValues): return
+    i = 0
+    for value in theValues:
+        theTable.PutValue( value, theRows[ i ], theColumns[ i ])
+        i = i + 1
+        pass
+    i = 1
+    for title in theRowTitles:
+        theTable.SetRowTitle( i, title )
+        theTable.SetRowUnit( i, theRowUnits[ i - 1 ])
+        i = i + 1
+        pass
+    i = 1
+    for title in theColumnTitles:
+        theTable.SetColumnTitle( i, title )
+        i = i + 1
+        pass
+    pass
+
+def CreateCurve( theTable, theHRow, theVRow, theTitle, theColor, theMarker, theLineType, theLineWidth ):
+    if theTitle is None: return
+    curve = myLocalVisu.CreateCurve( theTable, theHRow, theVRow );
+    if curve:
+        curve.SetTitle( theTitle )
+        curve.SetColor( theColor )
+        curve.SetMarker( theMarker )
+        curve.SetLine( theLineType, theLineWidth )
+        pass
+    return curve