]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To introduce ID's mapping
authorapo <apo@opencascade.com>
Tue, 30 Aug 2005 13:43:23 +0000 (13:43 +0000)
committerapo <apo@opencascade.com>
Tue, 30 Aug 2005 13:43:23 +0000 (13:43 +0000)
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_Convertor_impl.hxx

index e552fd7fe4ec543650a07e9afc7f06a5979feaf6..0cc816a3f00c3b86b4244d398033a072d8b8486f 100644 (file)
@@ -1451,17 +1451,24 @@ VISU_Convertor_impl
   TFindMeshOnGroup aFindMeshOnGroup = FindMeshOnGroup(theMeshName,theGroupName);
   PMeshImpl aMesh = boost::get<0>(aFindMeshOnGroup);
   PGroupImpl aGroup = boost::get<1>(aFindMeshOnGroup);
-  const VISU::TFamilySet& aFamilySet = aGroup->myFamilySet;
 
   //Main part of code
-  const TVTKSource& aSource = aGroup->GetSource();
+  const TVTKAppendFilter& anAppendFilter = aGroup->GetFilter();
 #ifndef _DEXCEPT_
   try{
 #endif
     if(!aGroup->myIsVTKDone){
+      const VISU::TFamilySet& aFamilySet = aGroup->myFamilySet;
       LoadMeshOnGroup(aMesh,aFamilySet);
-      GetPoints(aSource,aMesh);
-      GetCellsOnGroup(aSource,aMesh,aFamilySet);
+
+      TFamilySet::const_iterator aFamilyIter = aFamilySet.begin();
+      for(; aFamilyIter != aFamilySet.end(); aFamilyIter++){
+       PFamilyImpl aFamily = *aFamilyIter;
+       const std::string& aFamilyName = aFamily->myName;
+       const VISU::TEntity& anEntity = aFamily->myEntity;
+       TOutput* anOutput = GetFamilyOnEntity(theMeshName,anEntity,aFamilyName);
+       anAppendFilter->AddInput(anOutput);
+      }
 
       aGroup->myIsVTKDone = true;
 
@@ -1470,7 +1477,7 @@ VISU_Convertor_impl
        std::string aGroupName = QString(theGroupName.c_str()).simplifyWhiteSpace().latin1();
        std::string aFileName = string("/users/")+getenv("USER")+"/"+getenv("USER")+"-";
        aFileName += aMeshName + "-" + aGroupName + "-Conv.vtk";
-       VISU::WriteToFile(aSource.GetPointer(),aFileName);
+       VISU::WriteToFile(anAppendFilter->GetOutput(),aFileName);
       }
     }
 #ifndef _DEXCEPT_
@@ -1479,7 +1486,7 @@ VISU_Convertor_impl
   }
 #endif
 
-  return aSource.GetPointer();
+  return anAppendFilter->GetOutput();
 }
 
 
index cd4ec772a41271b68858470a6b67849f035f974b..398bd58566e32a99b0124d0b1a59a6bb4bb16b18 100644 (file)
@@ -291,6 +291,16 @@ namespace VISU
 
 
   //---------------------------------------------------------------
+  struct TSubMeshImpl: virtual TSource
+  {
+    TSubMeshID mySubMeshID;
+  };
+  typedef SharedPtr<TSubMeshImpl> PSubMeshImpl;
+
+
+  //---------------------------------------------------------------
+  typedef std::map<vtkIdType,TSubMeshID> TGeom2SubMeshID;
+
   struct TFamilyImpl: virtual TFamily, virtual TSource
   {
     TGeom2SubMeshID myGeom2SubMeshID;
@@ -299,7 +309,7 @@ namespace VISU
 
 
   //---------------------------------------------------------------
-  struct TGroupImpl: virtual TGroup, virtual TSource
+  struct TGroupImpl: virtual TGroup, virtual TAppendFilter, virtual TSizeCounter
   {
   };
   typedef SharedPtr<TGroupImpl> PGroupImpl;