+
+# ----------------------------
+# SCALAR MAP ON DEFORMED SHAPE
+# ----------------------------
+def dump_scalarmapondeformedshape_parameters(theObject):
+ dump_scalarmap_parameters(theObject)
+ print "GetScale() =", theObject.GetScale()
+ print "GetScalarCMeshName ()=|",theObject.GetScalarCMeshName(),"|"
+ print "GetScalarCFieldName()=|",theObject.GetScalarCFieldName(),"|"
+ print "GetScalarEEntity() =",theObject.GetScalarEEntity()
+ print "GetScalarLIteration()=",theObject.GetScalarLIteration()
+ pass
+
+def try_scalarmapondeformedshape_parameters(thePattern):
+
+ if thePattern is None : return None
+ import copy
+ import random
+
+ anObj = try_scalarmap_parameters(thePattern)
+
+ # --- SCALING ---
+ print
+ anObj.SetScale( anObj.GetScale()/random.random()*random.randint(1,10))
+
+ # --- Scalar Field ---
+ # not implemented yet.
+
+ return anObj
+# ----------------------
+# PLOT 3D
+# ----------------------
+def dump_plot3d_parameters(theObject):
+ dump_scalarmap_parameters(theObject)
+ print "GetOrientationType()=",str(theObject.GetOrientationType())
+ print "GetRotateX()=",theObject.GetRotateX()
+ print "GetRotateY()=",theObject.GetRotateY()
+ print "GetPlanePosition()=",theObject.GetPlanePosition()
+ print "IsPositionRelative()=",theObject.IsPositionRelative()
+ print "GetScaleFactor()=",theObject.GetScaleFactor()
+ print "GetIsContourPrs()=",theObject.GetIsContourPrs()
+ print "GetNbOfContours()=",theObject.GetNbOfContours()
+ pass
+
+def try_plot3d_parameters(thePattern):
+ if thePattern is None : return None
+ import random
+
+ anObj = try_scalarmap_parameters(thePattern)
+
+ ORIENT = [VISU.Plot3D.XY, VISU.Plot3D.YZ, VISU.Plot3D.ZX]
+
+ theXAngle = random.random()*random.randint(-180,180)
+ theYAngle = random.random()*random.randint(-180,180)
+
+ # ORIENTATION and ANGLES
+ anObj.SetOrientation(ORIENT[random.randint(0,2)],theXAngle,theYAngle)
+
+ # Plane position (revative)
+ anObj.SetPlanePosition(random.random(),1)
+
+ # SCALE FACTOR
+ anObj.SetScaleFactor(random.random()*random.randint(-10000,10000))
+
+ # CONTOUR PRS
+ anObj.SetContourPrs(random.randint(0,1))
+ if anObj.GetIsContourPrs():
+ anObj.SetNbOfContours(random.randint(1,999))
+ pass
+
+ pass
+
+# ----------------------
+# Gauss points
+# ----------------------
+def dump_gausspoints_parameters(theObject):
+
+ print "\tGetScalarMode() = " + str(anObj.GetScalarMode())
+ print "\tGetMin() = " + str(anObj.GetMin()) + " GetMax() = " + str (anObj.GetMax())
+ print "\tGetPosX() = ", str(anObj.GetPosX()) + " GetPosY() = ", str(anObj.GetPosY())
+ print "\tGetWidth() = ", str ( anObj.GetWidth()) + " GetHeight() = " + str(anObj.GetHeight())
+ print "\tGetNbColors() = " + str(anObj.GetNbColors())
+ print "\tGetLabels() = " + str(anObj.GetLabels())
+ print "\tGetTitle() = " + str(anObj.GetTitle())
+ pass
+
+def try_plot3d_parameters(thePattern):
+ if thePattern is None : return None
+ import random
+
+ pass
+
+# ----------------------
+# 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
+
+def CreateCurveWithZ( theTable, theHRow, theVRow, theZRow, theTitle, theColor, theMarker, theLineType, theLineWidth ):
+ if theTitle is None: return
+ curve = myLocalVisu.CreateCurveWithZ( theTable, theHRow, theVRow, theZRow );
+ if curve:
+ curve.SetTitle( theTitle )
+ curve.SetColor( theColor )
+ curve.SetMarker( theMarker )
+ curve.SetLine( theLineType, theLineWidth )
+ pass
+ return curve
+
+def CreateCurveWithZExt( theTable, theHRow, theVRow, theZRow, theIsV2, theTitle, theColor, theMarker, theLineType, theLineWidth ):
+ if theTitle is None: return
+ curve = myLocalVisu.CreateCurveWithZExt( theTable, theHRow, theVRow, theZRow, theIsV2 );
+ if curve:
+ curve.SetTitle( theTitle )
+ curve.SetColor( theColor )
+ curve.SetMarker( theMarker )
+ curve.SetLine( theLineType, theLineWidth )
+ pass
+ return curve