From: eap Date: Wed, 25 May 2005 09:52:49 +0000 (+0000) Subject: IPAL8877: add FillTable() and CreateCurve() X-Git-Tag: smh_merge_poly X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a839f8e188fd85cd36614b4568be70355a132a3c;p=modules%2Fvisu.git IPAL8877: add FillTable() and CreateCurve() --- diff --git a/src/VISU_SWIG/visu.py b/src/VISU_SWIG/visu.py index 85c1131c..1519f9ce 100644 --- a/src/VISU_SWIG/visu.py +++ b/src/VISU_SWIG/visu.py @@ -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