-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifdef _MSC_VER
#include "SMDS_MeshNode.hxx"
#include "SMDS_SetIterator.hxx"
#include "SMDS_VolumeTool.hxx"
+#include "SMDS_Mesh.hxx"
#include "utilities.h"
-#include <vector>
-
using namespace std;
///////////////////////////////////////////////////////////////////////////////
const SMDS_MeshNode * node7,
const SMDS_MeshNode * node8)
{
+ //MESSAGE("***************************************************** SMDS_VolumeOfNodes");
myNbNodes = 8;
myNodes = new const SMDS_MeshNode* [myNbNodes];
myNodes[0]=node1;
const SMDS_MeshNode * node3,
const SMDS_MeshNode * node4)
{
+ //MESSAGE("***************************************************** SMDS_VolumeOfNodes");
myNbNodes = 4;
myNodes = new const SMDS_MeshNode* [myNbNodes];
myNodes[0]=node1;
const SMDS_MeshNode * node4,
const SMDS_MeshNode * node5)
{
+ //MESSAGE("***************************************************** SMDS_VolumeOfNodes");
myNbNodes = 5;
myNodes = new const SMDS_MeshNode* [myNbNodes];
myNodes[0]=node1;
const SMDS_MeshNode * node5,
const SMDS_MeshNode * node6)
{
+ //MESSAGE("***************************************************** SMDS_VolumeOfNodes");
myNbNodes = 6;
myNodes = new const SMDS_MeshNode* [myNbNodes];
myNodes[0]=node1;
}
}
-//=======================================================================
-//function : Print
-//purpose :
-//=======================================================================
-
void SMDS_VolumeOfNodes::Print(ostream & OS) const
{
OS << "volume <" << GetID() << "> : ";
return 0;
}
-/// ===================================================================
/*!
* \brief Iterator on node of volume
*/
-/// ===================================================================
-
class SMDS_VolumeOfNodes_MyIterator:public SMDS_NodeArrayElemIterator
{
public:
SMDS_NodeArrayElemIterator( s, & s[ l ]) {}
};
-/// ===================================================================
/*!
* \brief Iterator on faces or edges of volume
*/
-/// ===================================================================
-
class _MySubIterator : public SMDS_ElemIterator
{
vector< const SMDS_MeshElement* > myElems;
}
return aType;
}
+
+SMDSAbs_GeometryType SMDS_VolumeOfNodes::GetGeomType() const
+{
+ SMDSAbs_GeometryType aType = SMDSGeom_NONE;
+ switch(myNbNodes)
+ {
+ case 4: aType = SMDSGeom_TETRA; break;
+ case 5: aType = SMDSGeom_PYRAMID; break;
+ case 6: aType = SMDSGeom_PENTA; break;
+ case 12: aType = SMDSGeom_HEXAGONAL_PRISM; break;
+ case 8:
+ default: aType = SMDSGeom_HEXA; break;
+ }
+ return aType;
+}
+