]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Provides interface to access to the parent mesh from a gauss mesh
authorpkv <pkv@opencascade.com>
Mon, 19 Sep 2005 10:44:55 +0000 (10:44 +0000)
committerpkv <pkv@opencascade.com>
Mon, 19 Sep 2005 10:44:55 +0000 (10:44 +0000)
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_Convertor_impl.hxx

index 5aa8fb02d32a458d0afeefe54cecb917515525dc..ee2075a5c5693db6695b9b31f3ad9f52952c14a0 100644 (file)
@@ -365,7 +365,9 @@ namespace VISU
   //---------------------------------------------------------------
   TGaussMeshImpl
   ::TGaussMeshImpl()
-  {}
+  {
+    myParentMesh=0;
+  }
 
   TGaussPointID 
   TGaussMeshImpl
@@ -377,7 +379,15 @@ namespace VISU
     const TGaussSubMeshImpl& aSubMeshImpl = myGaussSubMeshArr[anInputDataSetID];
     return aSubMeshImpl.GetObjID(anInputID);
   }
-
+  
+  void TGaussMeshImpl::SetParentMesh(VISU::TMeshOnEntityImpl* theMesh) 
+  {
+    myParentMesh=theMesh;
+  }
+  VISU::TMeshOnEntityImpl* TGaussMeshImpl::GetParentMesh() 
+  {
+    return myParentMesh;
+  }
 
   //---------------------------------------------------------------
   vtkIdType
@@ -1423,8 +1433,8 @@ namespace
   //---------------------------------------------------------------
   void
   BuildGaussMesh(const PMeshImpl& theMesh,
-              const PMeshOnEntityImpl& theMeshOnEntity,
-              const PGaussMeshImpl& theGaussMesh)
+                const PMeshOnEntityImpl& theMeshOnEntity,
+                const PGaussMeshImpl& theGaussMesh)
   {
     if(theGaussMesh->myIsVTKDone)
       return;
@@ -1448,7 +1458,7 @@ namespace
       anAppendFilter->AddInput(aSource.GetPointer());
     }
     anAppendFilter->Update(); // Fix on VTK
-
+    theGaussMesh->SetParentMesh(theMeshOnEntity.get());
     vtkDataSet* aSource = anAppendFilter->GetOutput();
     INITMSGA(MYDEBUG,0,"aNbPoints - "<<aSource->GetNumberOfPoints()<<endl);
     BEGMSG(MYDEBUG,"aNbCells - "<<aSource->GetNumberOfCells()<<endl);
index bd102bcaedee5bdfac41ec782584b45f4072fecf..b60a9fecd070677e8a570796a6b1489685176375 100644 (file)
@@ -294,10 +294,15 @@ namespace VISU
       return mySource.GetVTKOutput();
     }
 
+    void SetParentMesh(VISU::TMeshOnEntityImpl* theMesh);
+
+    VISU::TMeshOnEntityImpl* GetParentMesh();
+
     TGaussSubMeshArr myGaussSubMeshArr;
 
     TSource mySource;
     TGeom2GaussSubMesh myGeom2GaussSubMesh;
+    TMeshOnEntityImpl* myParentMesh;
   };
   typedef SharedPtr<TGaussMeshImpl> PGaussMeshImpl;