From d903230dca9e370ab1f2fe68a01205ba14f233de Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 1 Sep 2005 12:58:47 +0000 Subject: [PATCH] To implement node ID's mapping for Families and Groups --- src/CONVERTOR/VISU_Convertor_impl.cxx | 75 ++++++++++++++++----------- src/CONVERTOR/VISU_Convertor_impl.hxx | 8 +-- 2 files changed, 46 insertions(+), 37 deletions(-) diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index 9bfc2b43..2a689908 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -387,8 +387,8 @@ namespace VISU TMeshOnEntityImpl ::GetNodeCoord(vtkIdType theObjID) { - vtkIdType aVtkID = GetNodeVTKID(theObjID); - return GetFilter()->GetOutput()->GetPoint(aVtkID); + vtkIdType aVTKID = GetNodeVTKID(theObjID); + return GetFilter()->GetOutput()->GetPoint(aVTKID); } vtkIdType @@ -442,12 +442,12 @@ namespace VISU //--------------------------------------------------------------- vtkCell* TFamilyImpl - ::GetElemCell(/*int*/vtkIdType theObjID) //pkv ft + ::GetElemCell(vtkIdType theObjID) { vtkIdType aVtkID = GetElemVTKID(theObjID); return GetSource()->GetCell(aVtkID); } - //--------------------------------------------------------------- + vtkIdType TFamilyImpl ::GetElemVTKID(vtkIdType theID) const @@ -461,30 +461,37 @@ namespace VISU } return -1; } - //--------------------------------------------------------------- + vtkIdType TFamilyImpl ::GetElemObjID(vtkIdType theID) const { return myMeshID[theID]; } - //modified by NIZNHY-PKV Thu Sep 1 14:55:37 2005f - //--------------------------------------------------------------- - vtkIdType TFamilyImpl::GetNodeObjID(vtkIdType theID) const + + vtkIdType + TFamilyImpl + ::GetNodeObjID(vtkIdType theID) const { - return theID; + return myNamedPointCoords->GetObjID(theID); } - //--------------------------------------------------------------- - vtkIdType TFamilyImpl::GetNodeVTKID(vtkIdType theID) const + + vtkIdType + TFamilyImpl + ::GetNodeVTKID(vtkIdType theID) const { - return theID; + return myNamedPointCoords->GetVTKID(theID); } - //--------------------------------------------------------------- - float* TFamilyImpl::GetNodeCoord(vtkIdType )//theObjID) + + float* + TFamilyImpl + ::GetNodeCoord(vtkIdType theObjID) { - return NULL; + vtkIdType aVTKID = GetNodeVTKID(theObjID); + return GetSource()->GetPoint(aVTKID); } - //modified by NIZNHY-PKV Thu Sep 1 14:55:51 2005t + + //--------------------------------------------------------------- TNbASizeCells TGroupImpl @@ -499,15 +506,15 @@ namespace VISU } return make_pair(aNbCells,aCellsSize); } - //--------------------------------------------------------------- + vtkCell* TGroupImpl - ::GetElemCell(/*int*/vtkIdType theObjID) //pkv ft + ::GetElemCell(vtkIdType theObjID) { vtkIdType aVtkID = GetElemVTKID(theObjID); return GetFilter()->GetOutput()->GetCell(aVtkID); } - //--------------------------------------------------------------- + vtkIdType TGroupImpl ::GetElemVTKID(vtkIdType theID) const @@ -521,7 +528,7 @@ namespace VISU } return -1; } - //--------------------------------------------------------------- + vtkIdType TGroupImpl ::GetElemObjID(vtkIdType theID) const @@ -532,23 +539,29 @@ namespace VISU const PFamilyImpl& aFamily = myFamilyArr[anInputID]; return aFamily->GetElemObjID(anID); } - //modified by NIZNHY-PKV Thu Sep 1 15:07:34 2005f - //--------------------------------------------------------------- - vtkIdType TGroupImpl::GetNodeObjID(vtkIdType theID) const + + vtkIdType + TGroupImpl + ::GetNodeObjID(vtkIdType theID) const { - return theID; + return myNamedPointCoords->GetObjID(theID); } - //--------------------------------------------------------------- - vtkIdType TGroupImpl::GetNodeVTKID(vtkIdType theID) const + + vtkIdType + TGroupImpl + ::GetNodeVTKID(vtkIdType theID) const { - return theID; + return myNamedPointCoords->GetVTKID(theID); } - //--------------------------------------------------------------- - float* TGroupImpl::GetNodeCoord(vtkIdType )//theObjID) + + float* + TGroupImpl + ::GetNodeCoord(vtkIdType theObjID) { - return NULL; + vtkIdType aVTKID = GetNodeVTKID(theObjID); + return GetFilter()->GetOutput()->GetPoint(aVTKID); } - //modified by NIZNHY-PKV Thu Sep 1 15:07:50 2005t + //--------------------------------------------------------------- void diff --git a/src/CONVERTOR/VISU_Convertor_impl.hxx b/src/CONVERTOR/VISU_Convertor_impl.hxx index 22f2f999..237b18df 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.hxx +++ b/src/CONVERTOR/VISU_Convertor_impl.hxx @@ -338,7 +338,6 @@ namespace VISU struct TFamilyImpl: virtual TFamily, virtual TSource { - // pkv f vtkIdType GetNodeObjID(vtkIdType theID) const ; @@ -349,11 +348,10 @@ namespace VISU virtual float* GetNodeCoord(vtkIdType theObjID) ; - //pkv t virtual vtkCell* - GetElemCell(/*int*/vtkIdType theObjID);//pkv ft + GetElemCell(vtkIdType theObjID); virtual vtkIdType @@ -383,7 +381,7 @@ namespace VISU virtual vtkCell* - GetElemCell(/*int*/vtkIdType theObjID);//pkv ft + GetElemCell(vtkIdType theObjID); virtual vtkIdType @@ -393,7 +391,6 @@ namespace VISU vtkIdType GetElemObjID(vtkIdType theID) const; - //pkv f virtual vtkIdType GetNodeObjID(vtkIdType theID) const; @@ -405,7 +402,6 @@ namespace VISU virtual float* GetNodeCoord(vtkIdType theObjID); - //pkv t TID2ID myElemObj2VTKID; TFamilyArr myFamilyArr; -- 2.39.2