X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_VolumeTool.hxx;h=3b637c839586fab6ae4dfb148d574b424f363a1f;hb=9c4c09606e8930cb91d6be740d22485aa754dc15;hp=beec061b700ec62c9c7ca0eb7e8ef48ab8871b12;hpb=365fd031c5276a039c84fcb1aaa335a40f77c7a7;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_VolumeTool.hxx b/src/SMDS/SMDS_VolumeTool.hxx index beec061b7..3b637c839 100644 --- a/src/SMDS/SMDS_VolumeTool.hxx +++ b/src/SMDS/SMDS_VolumeTool.hxx @@ -1,54 +1,43 @@ -// SMESH SMDS : implementaion of Salome mesh data structure +// Copyright (C) 2007-2008 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 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 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 -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// 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. // +// 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 +// +// SMESH SMDS : implementaion of Salome mesh data structure // File : SMDS_VolumeTool.hxx // Module : SMESH // Created : Tue Jul 13 11:27:17 2004 // Author : Edward AGAPOV (eap) - - +// #ifndef SMDS_VolumeTool_HeaderFile #define SMDS_VolumeTool_HeaderFile +#include "SMESH_SMDS.hxx" + class SMDS_MeshElement; class SMDS_MeshNode; class SMDS_PolyhedralVolumeOfNodes; +class SMDS_MeshVolume; #include #include -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif - -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif - // ========================================================================= // // Class providing topological and other information about SMDS_MeshVolume: @@ -57,11 +46,12 @@ class SMDS_PolyhedralVolumeOfNodes; // // ========================================================================= -class SMDS_WNT_EXPORT SMDS_VolumeTool +class SMDS_EXPORT SMDS_VolumeTool { public: - enum VolumeType { UNKNOWN = -1, TETRA = 0, PYRAM, PENTA, HEXA, POLYHEDA }; + enum VolumeType { UNKNOWN = -1, TETRA = 0, PYRAM, PENTA, HEXA, QUAD_TETRA, + QUAD_PYRAM, QUAD_PENTA, QUAD_HEXA, POLYHEDA }; SMDS_VolumeTool (); ~SMDS_VolumeTool (); @@ -71,6 +61,12 @@ class SMDS_WNT_EXPORT SMDS_VolumeTool // Set volume. // Return false if theVolume is not of type SMDSAbs_Volume + const SMDS_MeshVolume* Get() const; + // return element + + int ID() const; + // return element ID + // ----------------------- // general info // ----------------------- @@ -97,6 +93,8 @@ class SMDS_WNT_EXPORT SMDS_VolumeTool 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 @@ -114,6 +112,9 @@ class SMDS_WNT_EXPORT SMDS_VolumeTool int GetNodeIndex(const SMDS_MeshNode* theNode) const; // Return an index of theNode + int GetAllExistingEdges(std::vector & edges) const; + // Fill vector with boundary edges existing in the mesh + // ------------- // info on faces // ------------- @@ -170,6 +171,9 @@ class SMDS_WNT_EXPORT SMDS_VolumeTool // Return index of a face formed by theFaceNodesIndices // Return -1 if a face not found + int GetAllExistingFaces(std::vector & faces); + // Fill vector with boundary faces existing in the mesh + // ------------------------ // static methods for faces // ------------------------ @@ -192,7 +196,10 @@ class SMDS_WNT_EXPORT SMDS_VolumeTool int faceIndex ); // Return number of nodes in the array of face nodes - private: + static int NbCornerNodes(VolumeType type); + // Useful to know nb of corner nodes of a quadratic volume + +private: bool setFace( int faceIndex );