From a03d606ec8c11992a701191f87def7f67d8f2ac0 Mon Sep 17 00:00:00 2001 From: pkv Date: Tue, 30 Aug 2005 06:53:33 +0000 Subject: [PATCH] adds IDs mapping --- src/CONVERTOR/VISU_Convertor_impl.cxx | 26 +++++++++++++++++++++++++- src/CONVERTOR/VISU_Convertor_impl.hxx | 13 ++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index c81d2827..def332d0 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -110,6 +110,7 @@ namespace VISU if(!myFilter.GetPointer()){ myFilter = VTKViewer_AppendFilter::New(); myFilter->Delete(); + myFilter->SetDoMappingFlag(true); } return myFilter; } @@ -258,7 +259,30 @@ namespace VISU const TSubProfileImpl& aSubProfileImpl = mySubProfileArr[anInputID]; return aSubProfileImpl.GetElemObjID(aID); } - + //modified by NIZNHY-PKV Tue Aug 30 11:18:46 2005f + //--------------------------------------------------------------- + vtkCell* TProfileImpl::GetElemCell(int theObjID) + { + int aVtkID; + vtkIdType aObjID; + // + aObjID=GetElemObjID(theObjID); + const TVTKAppendFilter& anAppendFilter = GetFilter(); + aVtkID=anAppendFilter->GetElemVtkID(aObjID); + return anAppendFilter->GetOutput()->GetCell(aVtkID); + } + //--------------------------------------------------------------- + float* TProfileImpl::GetNodeCoord(int theObjID) + { + int aVtkID; + vtkIdType aObjID; + // + aObjID=GetNodeObjID(theObjID); + const TVTKAppendFilter& anAppendFilter = GetFilter(); + aVtkID=anAppendFilter->GetElemVtkID(theObjID); + return anAppendFilter->GetOutput()->GetPoint(aVtkID); + } + //modified by NIZNHY-PKV Tue Aug 30 11:18:49 2005t //--------------------------------------------------------------- TGaussSubMeshImpl::TGaussSubMeshImpl(): diff --git a/src/CONVERTOR/VISU_Convertor_impl.hxx b/src/CONVERTOR/VISU_Convertor_impl.hxx index e57c7445..571a1f63 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.hxx +++ b/src/CONVERTOR/VISU_Convertor_impl.hxx @@ -18,7 +18,9 @@ class vtkPoints; class VTKViewer_AppendFilter; class vtkUnstructuredGrid; - +//pkv f +class vtkCell; +//pkv t #include "VISU_Convertor.hxx" #include "MED_SliceArray.hxx" @@ -200,6 +202,15 @@ namespace VISU vtkIdType GetElemObjID(int theVtkI) const; + //pkv f + virtual + vtkCell* + GetElemCell(int theObjID); + virtual + float* + GetNodeCoord(int theObjID); + //pkv t + PNamedPointCoords myNamedPointCoords; TSubProfileArr mySubProfileArr; -- 2.39.2