- virtual SMDS_ElemIteratorPtr nodesIteratorToUNV() const;

-  virtual SMDS_ElemIteratorPtr interlacedNodesElemIterator() const;
+  virtual SMDS_NodeIteratorPtr nodesIteratorToUNV() const;
+  virtual SMDS_NodeIteratorPtr interlacedNodesIterator() const;
This commit is contained in:
eap 2013-05-16 16:17:16 +00:00
parent 1267641d31
commit c2c0a21343
6 changed files with 30 additions and 25 deletions

View File

@ -155,18 +155,17 @@ SMDS_ElemIteratorPtr SMDS_VtkEdge::elementsIterator(SMDSAbs_ElementType type) co
case SMDSAbs_Node:
return SMDS_ElemIteratorPtr(new SMDS_VtkCellIterator(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
default:
MESSAGE("ERROR : Iterator not implemented")
;
MESSAGE("ERROR : Iterator not implemented");
return SMDS_ElemIteratorPtr((SMDS_ElemIterator*) NULL);
}
}
SMDS_ElemIteratorPtr SMDS_VtkEdge::nodesIteratorToUNV() const
SMDS_NodeIteratorPtr SMDS_VtkEdge::nodesIteratorToUNV() const
{
return SMDS_ElemIteratorPtr(new SMDS_VtkCellIteratorToUNV(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
return SMDS_NodeIteratorPtr(new SMDS_VtkCellIteratorToUNV(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
}
SMDS_ElemIteratorPtr SMDS_VtkEdge::interlacedNodesElemIterator() const
SMDS_NodeIteratorPtr SMDS_VtkEdge::interlacedNodesIterator() const
{
return SMDS_ElemIteratorPtr(new SMDS_VtkCellIteratorToUNV(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
return nodesIteratorToUNV();
}

View File

@ -52,8 +52,8 @@ public:
virtual bool IsQuadratic() const;
virtual SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType type) const;
virtual SMDS_ElemIteratorPtr nodesIteratorToUNV() const;
virtual SMDS_ElemIteratorPtr interlacedNodesElemIterator() const;
virtual SMDS_NodeIteratorPtr nodesIteratorToUNV() const;
virtual SMDS_NodeIteratorPtr interlacedNodesIterator() const;
protected:
};
#endif

View File

@ -64,6 +64,9 @@ void SMDS_VtkFace::init(const std::vector<vtkIdType>& nodeIds, SMDS_Mesh* mesh)
case 9:
aType = VTK_BIQUADRATIC_QUAD;
break;
case 7:
aType = VTK_BIQUADRATIC_TRIANGLE;
break;
default:
aType = VTK_POLYGON;
break;
@ -116,6 +119,7 @@ int SMDS_VtkFace::NbEdges() const
{
case VTK_TRIANGLE:
case VTK_QUADRATIC_TRIANGLE:
case VTK_BIQUADRATIC_TRIANGLE:
nbEdges = 3;
break;
case VTK_QUAD:
@ -167,6 +171,7 @@ bool SMDS_VtkFace::IsQuadratic() const
case VTK_QUADRATIC_TRIANGLE:
case VTK_QUADRATIC_QUAD:
case VTK_BIQUADRATIC_QUAD:
case VTK_BIQUADRATIC_TRIANGLE:
return true;
break;
default:
@ -189,6 +194,7 @@ bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const
switch (aVtkType)
{
case VTK_QUADRATIC_TRIANGLE:
case VTK_BIQUADRATIC_TRIANGLE:
rankFirstMedium = 3; // medium nodes are of rank 3,4,5
break;
case VTK_QUADRATIC_QUAD:
@ -245,13 +251,13 @@ SMDSAbs_GeometryType SMDS_VtkFace::GetGeomType() const
switch ( aVtkType ) {
case VTK_TRIANGLE:
case VTK_QUADRATIC_TRIANGLE:
return SMDSGeom_TRIANGLE;
case VTK_BIQUADRATIC_TRIANGLE: return SMDSGeom_TRIANGLE;
case VTK_QUAD:
case VTK_QUADRATIC_QUAD:
case VTK_BIQUADRATIC_QUAD:
return SMDSGeom_QUADRANGLE;
case VTK_POLYGON:
return SMDSGeom_POLYGON;
case VTK_BIQUADRATIC_QUAD: return SMDSGeom_QUADRANGLE;
case VTK_POLYGON: return SMDSGeom_POLYGON;
default:;
}
return SMDSGeom_NONE;
@ -277,14 +283,14 @@ SMDS_ElemIteratorPtr SMDS_VtkFace::elementsIterator(SMDSAbs_ElementType type) co
}
}
SMDS_ElemIteratorPtr SMDS_VtkFace::nodesIteratorToUNV() const
SMDS_NodeIteratorPtr SMDS_VtkFace::nodesIteratorToUNV() const
{
return SMDS_ElemIteratorPtr(new SMDS_VtkCellIteratorToUNV(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
return SMDS_NodeIteratorPtr(new SMDS_VtkCellIteratorToUNV(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
}
SMDS_ElemIteratorPtr SMDS_VtkFace::interlacedNodesElemIterator() const
SMDS_NodeIteratorPtr SMDS_VtkFace::interlacedNodesIterator() const
{
return SMDS_ElemIteratorPtr(new SMDS_VtkCellIteratorToUNV(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
return nodesIteratorToUNV();
}
//! change only the first node, used for temporary triangles in quadrangle to triangle adaptor

View File

@ -54,8 +54,8 @@ public:
virtual int NbCornerNodes() const;
virtual SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType type) const;
virtual SMDS_ElemIteratorPtr nodesIteratorToUNV() const;
virtual SMDS_ElemIteratorPtr interlacedNodesElemIterator() const;
virtual SMDS_NodeIteratorPtr nodesIteratorToUNV() const;
virtual SMDS_NodeIteratorPtr interlacedNodesIterator() const;
protected:
};

View File

@ -404,14 +404,14 @@ SMDS_ElemIteratorPtr SMDS_VtkVolume::elementsIterator(SMDSAbs_ElementType type)
}
}
SMDS_ElemIteratorPtr SMDS_VtkVolume::nodesIteratorToUNV() const
SMDS_NodeIteratorPtr SMDS_VtkVolume::nodesIteratorToUNV() const
{
return SMDS_ElemIteratorPtr(new SMDS_VtkCellIteratorToUNV(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
return SMDS_NodeIteratorPtr(new SMDS_VtkCellIteratorToUNV(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
}
SMDS_ElemIteratorPtr SMDS_VtkVolume::interlacedNodesElemIterator() const
SMDS_NodeIteratorPtr SMDS_VtkVolume::interlacedNodesIterator() const
{
return SMDS_ElemIteratorPtr(new SMDS_VtkCellIteratorToUNV(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
return SMDS_NodeIteratorPtr(new SMDS_VtkCellIteratorToUNV(SMDS_Mesh::_meshList[myMeshId], myVtkID, GetEntityType()));
}
SMDSAbs_ElementType SMDS_VtkVolume::GetType() const

View File

@ -70,8 +70,8 @@ public:
std::vector<int> GetQuantities() const;
virtual SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType type) const;
virtual SMDS_ElemIteratorPtr nodesIteratorToUNV() const;
virtual SMDS_ElemIteratorPtr interlacedNodesElemIterator() const;
virtual SMDS_NodeIteratorPtr nodesIteratorToUNV() const;
virtual SMDS_NodeIteratorPtr interlacedNodesIterator() const;
protected:
};