// VISU OBJECT : interactive object for VISU entities implementation
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// VISU OBJECT : interactive object for VISU entities implementation
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-Mesh_i(Result_i* theResult) :
- PrsObject_i(theResult->GetStudyDocument()),
+Mesh_i(Result_i* theResult) :
+ PrsObject_i(theResult->GetStudyDocument()),
Prs3d_i(theResult,false),
myMeshPL(VISU_MeshPL::New())
{
Prs3d_i(theResult,false),
myMeshPL(VISU_MeshPL::New())
{
-Mesh_i(Result_i* theResult,
- SALOMEDS::SObject_ptr theSObject) :
- PrsObject_i(theResult->GetStudyDocument()),
+Mesh_i(Result_i* theResult,
+ SALOMEDS::SObject_ptr theSObject) :
+ PrsObject_i(theResult->GetStudyDocument()),
Prs3d_i(theResult,theSObject),
myMeshPL(VISU_MeshPL::New())
{
Prs3d_i(theResult,theSObject),
myMeshPL(VISU_MeshPL::New())
{
-int VISU::Mesh_i::IsPossible(Result_i* theResult, const char* theMeshName, Entity theEntity, const char* theFamilyName){
+int VISU::Mesh_i::IsPossible (Result_i* theResult, const char* theMeshName,
+ Entity theEntity, const char* theFamilyName)
+{
-VISU::Storable* VISU::Mesh_i::Create(const char* theMeshName, Entity theEntity, const char* theFamilyName){
+VISU::Storable* VISU::Mesh_i::Create (const char* theMeshName,
+ Entity theEntity,
+ const char* theFamilyName)
+{
Prs3d_i::Restore(theMap);
myMeshName = VISU::Storable::FindValue(theMap,"myMeshName").latin1();
Prs3d_i::Restore(theMap);
myMeshName = VISU::Storable::FindValue(theMap,"myMeshName").latin1();
- myEntity = (VISU::TEntity)VISU::Storable::FindValue(theMap,"myEntity").toInt();
+ //jfa IPAL9284:myEntity = (VISU::TEntity)VISU::Storable::FindValue(theMap,"myEntity").toInt();
+ myEntity = VISU::Storable::FindValue(theMap,"myEntity").toInt();//jfa IPAL9284
mySubMeshName = VISU::Storable::FindValue(theMap,"mySubMeshName").latin1();
myPresentType = VISU::PresentationType(VISU::Storable::FindValue(theMap,"myPresentType").toInt());
mySubMeshName = VISU::Storable::FindValue(theMap,"mySubMeshName").latin1();
myPresentType = VISU::PresentationType(VISU::Storable::FindValue(theMap,"myPresentType").toInt());
SALOMEDS::StudyBuilder_var aStudyBuilder = myStudy->NewBuilder();
aStudyBuilder->NewCommand(); // There is a transaction
SALOMEDS::StudyBuilder_var aStudyBuilder = myStudy->NewBuilder();
aStudyBuilder->NewCommand(); // There is a transaction
myPresentType = VISU::SHADED;
myName = GenerateName().latin1();
myCellColor.R = 0.0; myCellColor.G = myCellColor.B = 1.0;
myNodeColor.R = myNodeColor.G = 1.0; myNodeColor.B = 1.0;
myLinkColor.R = myLinkColor.G = myLinkColor.B = 83/255.;
}
myPresentType = VISU::SHADED;
myName = GenerateName().latin1();
myCellColor.R = 0.0; myCellColor.G = myCellColor.B = 1.0;
myNodeColor.R = myNodeColor.G = 1.0; myNodeColor.B = 1.0;
myLinkColor.R = myLinkColor.G = myLinkColor.B = 83/255.;
}
- if(int(myEntity) >= 0)
- if(mySubMeshName == "")
- myType = VISU::TENTITY;
- else
+ //jfa IPAL9284:if (int(myEntity) >= 0)
+ if (myEntity >= 0) //jfa IPAL9284
+ if (mySubMeshName == "")
+ myType = VISU::TENTITY;
+ else
- case VISU::TENTITY :
- anOutput = myResult->GetInput()->GetMeshOnEntity(myMeshName,myEntity);
+ case VISU::TENTITY :
+ //jfa IPAL9284:anOutput = myResult->GetInput()->GetMeshOnEntity(myMeshName,myEntity);
+ anOutput = myResult->GetInput()->GetMeshOnEntity(myMeshName,(VISU::TEntity)myEntity);//jfa IPAL9284
aComment.sprintf("myComment=ENTITY;myType=%d;myMeshName=%s;myId=%d",
VISU::TENTITY,myMeshName.c_str(),myEntity);
break;
aComment.sprintf("myComment=ENTITY;myType=%d;myMeshName=%s;myId=%d",
VISU::TENTITY,myMeshName.c_str(),myEntity);
break;
- case VISU::TFAMILY :
- anOutput = myResult->GetInput()->GetMeshOnEntity(myMeshName,myEntity,mySubMeshName);
+ case VISU::TFAMILY :
+ //jfa IPAL9284:anOutput = myResult->GetInput()->GetMeshOnEntity(myMeshName,myEntity,mySubMeshName);
+ anOutput = myResult->GetInput()->GetMeshOnEntity
+ (myMeshName,(VISU::TEntity)myEntity,mySubMeshName);//jfa IPAL9284
aComment.sprintf("myComment=FAMILY;myType=%d;myMeshName=%s;myEntityId=%d;myName=%s",
VISU::TFAMILY,myMeshName.c_str(),myEntity,mySubMeshName.c_str());
break;
aComment.sprintf("myComment=FAMILY;myType=%d;myMeshName=%s;myEntityId=%d;myName=%s",
VISU::TFAMILY,myMeshName.c_str(),myEntity,mySubMeshName.c_str());
break;
anOutput = myResult->GetInput()->GetMeshOnGroup(myMeshName,mySubMeshName);
aComment.sprintf("myComment=GROUP;myType=%d;myMeshName=%s;myName=%s",
VISU::TGROUP,myMeshName.c_str(),mySubMeshName.c_str());
anOutput = myResult->GetInput()->GetMeshOnGroup(myMeshName,mySubMeshName);
aComment.sprintf("myComment=GROUP;myType=%d;myMeshName=%s;myName=%s",
VISU::TGROUP,myMeshName.c_str(),mySubMeshName.c_str());
SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(mySObject,"AttributeIOR");
SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
CORBA::String_var aString = GetID();
SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(mySObject,"AttributeIOR");
SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
CORBA::String_var aString = GetID();
void VISU::Mesh_i::UpdateActor(VISU_Actor* theActor) {
if(VISU_MeshAct* anActor = dynamic_cast<VISU_MeshAct*>(theActor)){
void VISU::Mesh_i::UpdateActor(VISU_Actor* theActor) {
if(VISU_MeshAct* anActor = dynamic_cast<VISU_MeshAct*>(theActor)){