aPrsObj.RemoveFromStudy()
else :
aVISUObjList.append(aPrsObj)
+
+ if HasValue(thePrsTypeList,VISU.TGAUSSPOINTS) :
+ print " Creating GaussPointsOnField",
+ aPrsObj = theVisu.GaussPointsOnField(theResult,aMeshName,anEntity,aFieldName,aTimeStampId)
+ if aPrsObj is None : print "Error"
+ else :
+ print ",OK"
+ theView.DisplayOnly(aPrsObj)
+ theView.FitAll()
+ aPictureName = thePictureDir + aMeshNamePic + "_" + anEntityId + "_" + aFieldName + "_" + str(aTimeStampId) + "_TGAUSSPOINTS." + thePictureExt
+ aPictureName = re.sub("\s+","_", aPictureName)
+ theView.SavePicture(aPictureName)
+ if theIsAutoDelete :
+ aPrsObj.RemoveFromStudy()
+ pass
+ else :
+ aVISUObjList.append(aPrsObj)
+ pass
+ pass
+ pass
return aVISUObjList
return anObj
-def dump_vetctors_parameters(theObject):
+def dump_vectors_parameters(theObject):
dump_deformedshape_parameters(theObject)
dump_scalarmap_parameters(theObject)
print "GetNbSurfaces() = "+ str(theObject.GetNbSurfaces())
+# ----------------------------
+# 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