std::string thePrefix);
+ //===========================================================================
+ void
+ Prs3dToPython(VISU::Prs3d_i* theServant,
+ std::ostream& theStr,
+ std::string& theName,
+ std::string thePrefix)
+ {
+ float x, y, z;
+ theServant->GetOffset(x,y,z);
+ theStr<<thePrefix<<theName<<".SetOffset("<<x<<","<<y<<","<<z<<")"<<endl;
+ }
+
//===========================================================================
std::string
ColoredPrs3dToPython(SALOMEDS::SObject_ptr theSObject,
CORBA::String_var aNameInStudy = theSObject->GetName();
theStr<<thePrefix<<"visu.SetName("<<theName<<",'"<<aNameInStudy.in()<<"')"<<endl;
+ // Set parameters common for all Prs3d objects (offset values)
+ Prs3dToPython(theServant,theStr,theName,thePrefix);
+
// Set parameters
theStr<<thePrefix<<theName<<".SetScalarMode("<<theServant->GetScalarMode()<<")"<<endl;
}
return;
case VISU::TMESH:
- if(Mesh_i* aServant = dynamic_cast<Mesh_i*>(GetServant(anObj).in())){
+ if(Mesh_i* aServant = dynamic_cast<Mesh_i*>(GetServant(anObj).in())){
VISU::Entity anEntity = aServant->GetEntity();
const std::string& aSubMeshName = aServant->GetSubMeshName();
if(anEntity >= 0){
CORBA::String_var aNameInStudy = theSObject->GetName();
theStr<<thePrefix<<"visu.SetName("<<aName<<",'"<<aNameInStudy.in()<<"')"<<endl;
+ // Set parameters common for all Prs3d objects (offset values)
+ Prs3dToPython(aServant,theStr,aName,thePrefix);
+
// Set presentation parameters
SALOMEDS::Color aColor;
aColor = aServant->GetCellColor();