From c2c0a21343037194c319d5aa6674e89a22e9c7a5 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 16 May 2013 16:17:16 +0000 Subject: [PATCH] - virtual SMDS_ElemIteratorPtr nodesIteratorToUNV() const; - virtual SMDS_ElemIteratorPtr interlacedNodesElemIterator() const; + virtual SMDS_NodeIteratorPtr nodesIteratorToUNV() const; + virtual SMDS_NodeIteratorPtr interlacedNodesIterator() const; --- src/SMDS/SMDS_VtkEdge.cxx | 11 +++++------ src/SMDS/SMDS_VtkEdge.hxx | 4 ++-- src/SMDS/SMDS_VtkFace.cxx | 24 +++++++++++++++--------- src/SMDS/SMDS_VtkFace.hxx | 4 ++-- src/SMDS/SMDS_VtkVolume.cxx | 8 ++++---- src/SMDS/SMDS_VtkVolume.hxx | 4 ++-- 6 files changed, 30 insertions(+), 25 deletions(-) diff --git a/src/SMDS/SMDS_VtkEdge.cxx b/src/SMDS/SMDS_VtkEdge.cxx index 6c70d10fc..0bf033086 100644 --- a/src/SMDS/SMDS_VtkEdge.cxx +++ b/src/SMDS/SMDS_VtkEdge.cxx @@ -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(); } diff --git a/src/SMDS/SMDS_VtkEdge.hxx b/src/SMDS/SMDS_VtkEdge.hxx index 52cbca51c..3ac9ba0e4 100644 --- a/src/SMDS/SMDS_VtkEdge.hxx +++ b/src/SMDS/SMDS_VtkEdge.hxx @@ -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 diff --git a/src/SMDS/SMDS_VtkFace.cxx b/src/SMDS/SMDS_VtkFace.cxx index 5c156bc19..56787bda0 100644 --- a/src/SMDS/SMDS_VtkFace.cxx +++ b/src/SMDS/SMDS_VtkFace.cxx @@ -64,6 +64,9 @@ void SMDS_VtkFace::init(const std::vector& 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 diff --git a/src/SMDS/SMDS_VtkFace.hxx b/src/SMDS/SMDS_VtkFace.hxx index 879e9a756..5fc10324d 100644 --- a/src/SMDS/SMDS_VtkFace.hxx +++ b/src/SMDS/SMDS_VtkFace.hxx @@ -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: }; diff --git a/src/SMDS/SMDS_VtkVolume.cxx b/src/SMDS/SMDS_VtkVolume.cxx index 3df1e1b35..7e66a83c8 100644 --- a/src/SMDS/SMDS_VtkVolume.cxx +++ b/src/SMDS/SMDS_VtkVolume.cxx @@ -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 diff --git a/src/SMDS/SMDS_VtkVolume.hxx b/src/SMDS/SMDS_VtkVolume.hxx index 66d9f81c2..63c41ecb7 100644 --- a/src/SMDS/SMDS_VtkVolume.hxx +++ b/src/SMDS/SMDS_VtkVolume.hxx @@ -70,8 +70,8 @@ public: std::vector 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: }; -- 2.39.2