*/
double GetScale();
+ /*!
+ * Sets the scalar field
+ * \param theMeshName - mesh name
+ * \param theFieldName - the name of scalar field
+ * \param theIteration - the iteration number for scalar field
+ * \param theEntity - entity of scalar field
+ */
+ void SetScalarField(in string theMeshName,in string theFieldName,
+ in long theIteration,in Entity theEntity);
+
};
//-------------------------------------------------------
/*!
in Entity theEntity, in string theFieldName,
in double theIteration);
+ /*!
+ * Creates a deformed shape presentation.
+ * \param theResult Data generated in other sources. (MED object or file)
+ * \param theMeshName One of the meshes presented in MED file
+ * \param theEntity Type of entity where the field is defined
+ * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
+ * \param theIteration Number of iteration on the field
+ */
+ ScalarMapOnDeformedShape ScalarMapOnDeformedShapeOnField(in Result theResult, in string theMeshName,
+ in Entity theEntity, in string theFieldName,
+ in double theIteration);
+
/*!
* Creates a vector presentation.
* \param theResult Data generated in other sources. (MED object or file)
return myVisuGen->DeformedShapeOnField(theResult,theMeshName,theEntity,theFieldName,theIteration);
}
+ ScalarMapOnDeformedShape_ptr VISU_Gen_i::ScalarMapOnDeformedShapeOnField(Result_ptr theResult,
+ const char* theMeshName,
+ VISU::Entity theEntity,
+ const char* theFieldName,
+ CORBA::Double theIteration)
+ {
+ return myVisuGen->ScalarMapOnDeformedShapeOnField(theResult,theMeshName,theEntity,theFieldName,theIteration);
+ }
Vectors_ptr VISU_Gen_i::VectorsOnField(Result_ptr theResult,
const char* theMeshName,
const char* theFieldName, CORBA::Double theIteration);
virtual Plot3D_ptr Plot3DOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
const char* theFieldName, CORBA::Double theIteration);
+ virtual ScalarMapOnDeformedShape_ptr ScalarMapOnDeformedShapeOnField(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
+ const char* theFieldName, CORBA::Double theIteration);
//Create Digital Presentation
virtual Table_ptr CreateTable(const char* theTableEntry);
virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
this->SetScalarEntity(theEntity);
}
+void VISU::ScalarMapOnDeformedShape_i::SetScalarField(const char* theMeshName,
+ const char* theFieldName,
+ const long theIteration,
+ const VISU::Entity theEntity)
+{
+ this->SetScalarField(theMeshName,theFieldName,(int)theIteration,VISU::TEntity(theEntity));
+}
void VISU::ScalarMapOnDeformedShape_i::SetScalarMeshName(const char* theName){
myScalarMeshName = theName;
void VISU::ScalarMapOnDeformedShape_i::SetScalarIteration(const int theValue){
myScalarIteration = theValue;
}
+
+
int VISU::ScalarMapOnDeformedShape_i::GetScalarIteration(){
return myScalarIteration;
}
void VISU::ScalarMapOnDeformedShape_i::SetScalarEntity(const VISU::TEntity theValue){
myScalarEntity = theValue;
}
+
VISU::TEntity VISU::ScalarMapOnDeformedShape_i::GetScalarEntity(){
return myScalarEntity;
}
+void VISU::ScalarMapOnDeformedShape_i::SetScalarEEntity(const VISU::Entity theValue){
+ myScalarEntity = VISU::TEntity(theValue);
+}
+
+VISU::Entity VISU::ScalarMapOnDeformedShape_i::GetScalarEEntity(){
+ return VISU::Entity(myScalarEntity);
+}
+
const VISU::PField&
VISU::ScalarMapOnDeformedShape_i
::GetField() const
const char* theFieldName,
const int theIteration,
const VISU::TEntity theEntity);
+
+ virtual void SetScalarField(const char* theMeshName,
+ const char* theFieldName,
+ const long theIteration,
+ const VISU::Entity theEntity);
virtual void SetScalarFieldName(const char* theName);
virtual std::string GetScalarFieldName();
virtual std::string GetScalarMeshName();
virtual void SetScalarEntity(const VISU::TEntity theValue);
virtual VISU::TEntity GetScalarEntity();
+ virtual void SetScalarEEntity(const VISU::Entity theValue);
+ virtual VISU::Entity GetScalarEEntity();
};
}
#endif
cutplanes.SetOrientation(VISU.CutPlanes.YZ, 0, 0)
myView.DisplayOnly(cutplanes)
+print "Creating Scalar Map On Deformed Shape.......",
+scalarmapondefshape = myVisu.ScalarMapOnDeformedShapeOnField(myResult,myMeshName,myNodeEntity,'vitesse',1);
+if scalarmapondefshape is None : print "Error"
+else : print "OK"
+scalarmapondefshape.SetScalarField(myMeshName,'pression',2,myCellEntity);
+myView.DisplayOnly(scalarmapondefshape)
+
#%====================Stage4: Opening a new study and Med file import====================%
# Opening a new study tempoparily commented due to a problem
cutplanes1.SetOrientation(VISU.CutPlanes.YZ, 0, 0)
myView1.DisplayOnly(cutplanes1)
+print "Creating Scalar Map On Deformed Shape.......",
+scalarmapondefshape1 = myVisu.ScalarMapOnDeformedShapeOnField(myResult1,myMeshName1,myCellEntity,'vectoriel field',1);
+if scalarmapondefshape1 is None : print "Error"
+else : print "OK"
+myView1.DisplayOnly(scalarmapondefshape1)
#%====================Stage6: Object browser popup====================%
print "**** Stage6: Object browser popup"
aPrsObj.RemoveFromStudy()
else :
aVISUObjList.append(aPrsObj)
+
+ if HasValue(thePrsTypeList,VISU.TSCALARMAPONDEFORMEDSHAPE) :
+ print " Creating ScalarMapOnDeformedShapeOnField",
+ aPrsObj = theVisu.ScalarMapOnDeformedShapeOnField(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) + "_TSCALARMAPONDEFORMEDSHAPE." + thePictureExt
+ aPictureName = re.sub("\s+","_", aPictureName)
+ theView.SavePicture(aPictureName)
+ if theIsAutoDelete :
+ aPrsObj.RemoveFromStudy()
+ else :
+ aVISUObjList.append(aPrsObj)
+
return aVISUObjList