-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_VolumeTool.hxx
// Module : SMESH
class SMDS_MeshElement;
class SMDS_MeshNode;
-class SMDS_PolyhedralVolumeOfNodes;
+class SMDS_VtkVolume;
class SMDS_MeshVolume;
#include <vector>
// Set volume.
// Return false if theVolume is not of type SMDSAbs_Volume
- const SMDS_MeshVolume* Get() const;
+ const SMDS_MeshVolume* Element() const;
// return element
int ID() const;
bool GetBaryCenter (double & X, double & Y, double & Z) const;
+ bool IsOut(double X, double Y, double Z, double tol);
+ // Classify a point
// -----------------------
// info on node connection
// -----------------------
bool IsLinked (const SMDS_MeshNode* theNode1,
- const SMDS_MeshNode* theNode2) const;
+ const SMDS_MeshNode* theNode2,
+ const bool theIgnoreMediumNodes=false) const;
// Return true if theNode1 is linked with theNode2.
+ // If theIgnoreMediumNodes then corner nodes of quadratic cell are considered linked as well
bool IsLinked (const int theNode1Index,
- const int theNode2Index) const;
+ const int theNode2Index,
+ bool theIgnoreMediumNodes=false) const;
// Return true if the node with theNode1Index is linked
// with the node with theNode2Index
+ // If theIgnoreMediumNodes then corner nodes of quadratic cell are considered linked as well
int GetNodeIndex(const SMDS_MeshNode* theNode) const;
// Return an index of theNode
bool GetFaceNormal (int faceIndex, double & X, double & Y, double & Z);
// Return a normal to a face
+ bool GetFaceBaryCenter (int faceIndex, double & X, double & Y, double & Z);
+ // Return barycenter of a face
+
double GetFaceArea( int faceIndex );
// Return face area
bool setFace( int faceIndex );
const SMDS_MeshElement* myVolume;
- const SMDS_PolyhedralVolumeOfNodes* myPolyedre;
+ const SMDS_VtkVolume* myPolyedre;
bool myVolForward;
int myNbFaces;
int myVolumeNbNodes;
const SMDS_MeshNode** myVolumeNodes;
+ std::vector< int > myPolyIndices;
bool myExternalFaces;