From 062c0e8ef68ef32041dec063cefc690ecf48389c Mon Sep 17 00:00:00 2001 From: apo Date: Tue, 30 Aug 2005 13:43:23 +0000 Subject: [PATCH] To introduce ID's mapping --- src/CONVERTOR/VISU_Convertor_impl.cxx | 19 +++++++++++++------ src/CONVERTOR/VISU_Convertor_impl.hxx | 12 +++++++++++- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index e552fd7f..0cc816a3 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -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(); } diff --git a/src/CONVERTOR/VISU_Convertor_impl.hxx b/src/CONVERTOR/VISU_Convertor_impl.hxx index cd4ec772..398bd585 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.hxx +++ b/src/CONVERTOR/VISU_Convertor_impl.hxx @@ -291,6 +291,16 @@ namespace VISU //--------------------------------------------------------------- + struct TSubMeshImpl: virtual TSource + { + TSubMeshID mySubMeshID; + }; + typedef SharedPtr PSubMeshImpl; + + + //--------------------------------------------------------------- + typedef std::map 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 PGroupImpl; -- 2.39.2