mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
0020511: EDF 1101 SMESH : Add CGNS to Mesh Format Supported
Move general utils independent of SMESH data structures to SMESHUtils
This commit is contained in:
parent
b87bbe0ce5
commit
418c46e962
@ -40,17 +40,10 @@ salomeinclude_HEADERS = \
|
|||||||
SMESH_3D_Algo.hxx \
|
SMESH_3D_Algo.hxx \
|
||||||
SMESH_Group.hxx \
|
SMESH_Group.hxx \
|
||||||
SMESH_MeshEditor.hxx \
|
SMESH_MeshEditor.hxx \
|
||||||
SMESH_Block.hxx \
|
|
||||||
SMESH_Pattern.hxx \
|
SMESH_Pattern.hxx \
|
||||||
SMESH_TypeDefs.hxx \
|
|
||||||
SMESH_MesherHelper.hxx \
|
SMESH_MesherHelper.hxx \
|
||||||
SMESH_Octree.hxx \
|
SMESH_ProxyMesh.hxx \
|
||||||
SMESH_OctreeNode.hxx \
|
SMESH_SMESH.hxx
|
||||||
SMESH_Comment.hxx \
|
|
||||||
SMESH_ComputeError.hxx \
|
|
||||||
SMESH_File.hxx \
|
|
||||||
SMESH_SMESH.hxx \
|
|
||||||
SMESH_ProxyMesh.hxx
|
|
||||||
|
|
||||||
# Libraries targets
|
# Libraries targets
|
||||||
|
|
||||||
@ -69,14 +62,10 @@ dist_libSMESHimpl_la_SOURCES = \
|
|||||||
SMESH_3D_Algo.cxx \
|
SMESH_3D_Algo.cxx \
|
||||||
SMESH_Group.cxx \
|
SMESH_Group.cxx \
|
||||||
SMESH_MeshEditor.cxx \
|
SMESH_MeshEditor.cxx \
|
||||||
SMESH_Block.cxx \
|
|
||||||
SMESH_Pattern.cxx \
|
SMESH_Pattern.cxx \
|
||||||
SMESH_HypoFilter.cxx \
|
SMESH_HypoFilter.cxx \
|
||||||
SMESH_MesherHelper.cxx \
|
SMESH_ProxyMesh.cxx \
|
||||||
SMESH_Octree.cxx \
|
SMESH_MesherHelper.cxx
|
||||||
SMESH_OctreeNode.cxx \
|
|
||||||
SMESH_File.cxx \
|
|
||||||
SMESH_ProxyMesh.cxx
|
|
||||||
|
|
||||||
# additionnal information to compile and link file
|
# additionnal information to compile and link file
|
||||||
libSMESHimpl_la_CPPFLAGS = \
|
libSMESHimpl_la_CPPFLAGS = \
|
||||||
@ -93,8 +82,10 @@ libSMESHimpl_la_CPPFLAGS = \
|
|||||||
-I$(srcdir)/../DriverMED \
|
-I$(srcdir)/../DriverMED \
|
||||||
-I$(srcdir)/../DriverUNV \
|
-I$(srcdir)/../DriverUNV \
|
||||||
-I$(srcdir)/../DriverSTL \
|
-I$(srcdir)/../DriverSTL \
|
||||||
|
-I$(srcdir)/../DriverCGNS \
|
||||||
-I$(srcdir)/../SMDS \
|
-I$(srcdir)/../SMDS \
|
||||||
-I$(srcdir)/../SMESHDS
|
-I$(srcdir)/../SMESHDS \
|
||||||
|
-I$(srcdir)/../SMESHUtils
|
||||||
|
|
||||||
libSMESHimpl_la_LDFLAGS = \
|
libSMESHimpl_la_LDFLAGS = \
|
||||||
../SMESHDS/libSMESHDS.la \
|
../SMESHDS/libSMESHDS.la \
|
||||||
@ -103,5 +94,7 @@ libSMESHimpl_la_LDFLAGS = \
|
|||||||
../DriverSTL/libMeshDriverSTL.la \
|
../DriverSTL/libMeshDriverSTL.la \
|
||||||
../DriverMED/libMeshDriverMED.la \
|
../DriverMED/libMeshDriverMED.la \
|
||||||
../DriverUNV/libMeshDriverUNV.la \
|
../DriverUNV/libMeshDriverUNV.la \
|
||||||
|
../DriverCGNS/libMeshDriverCGNS.la \
|
||||||
|
../SMESHUtils/libSMESHUtils.la \
|
||||||
$(GEOM_LDFLAGS) -lNMTTools \
|
$(GEOM_LDFLAGS) -lNMTTools \
|
||||||
$(CAS_LDPATH) -lTKShHealing -lTKPrim -lTKG2d
|
$(CAS_LDPATH) -lTKShHealing -lTKPrim -lTKG2d
|
||||||
|
57
src/SMESHUtils/Makefile.am
Normal file
57
src/SMESHUtils/Makefile.am
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
|
||||||
|
# File : Makefile.in
|
||||||
|
# Module : SMESH
|
||||||
|
#
|
||||||
|
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||||
|
|
||||||
|
# header files
|
||||||
|
salomeinclude_HEADERS = \
|
||||||
|
SMESH_Block.hxx \
|
||||||
|
SMESH_TypeDefs.hxx \
|
||||||
|
SMESH_Octree.hxx \
|
||||||
|
SMESH_OctreeNode.hxx \
|
||||||
|
SMESH_Comment.hxx \
|
||||||
|
SMESH_ComputeError.hxx \
|
||||||
|
SMESH_File.hxx \
|
||||||
|
SMESH_Utils.hxx
|
||||||
|
|
||||||
|
# Libraries targets
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = libSMESHUtils.la
|
||||||
|
|
||||||
|
dist_libSMESHUtils_la_SOURCES = \
|
||||||
|
SMESH_Block.cxx \
|
||||||
|
SMESH_Octree.cxx \
|
||||||
|
SMESH_OctreeNode.cxx \
|
||||||
|
SMESH_File.cxx
|
||||||
|
|
||||||
|
# additionnal information to compile and link file
|
||||||
|
libSMESHUtils_la_CPPFLAGS = \
|
||||||
|
$(KERNEL_CXXFLAGS) \
|
||||||
|
$(CAS_CPPFLAGS) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
|
$(BOOST_CPPFLAGS) \
|
||||||
|
-I$(srcdir)/../SMDS \
|
||||||
|
-I$(srcdir)/../SMESHDS
|
||||||
|
|
||||||
|
libSMESHUtils_la_LDFLAGS = \
|
||||||
|
../SMESHDS/libSMESHDS.la \
|
||||||
|
$(CAS_LDPATH) -lTKShHealing -lTKPrim -lTKG2d
|
@ -27,7 +27,7 @@
|
|||||||
#ifndef SMESH_Block_HeaderFile
|
#ifndef SMESH_Block_HeaderFile
|
||||||
#define SMESH_Block_HeaderFile
|
#define SMESH_Block_HeaderFile
|
||||||
|
|
||||||
#include "SMESH_SMESH.hxx"
|
#include "SMESH_Utils.hxx"
|
||||||
|
|
||||||
//#include <Geom2d_Curve.hxx>
|
//#include <Geom2d_Curve.hxx>
|
||||||
//#include <Geom_Curve.hxx>
|
//#include <Geom_Curve.hxx>
|
||||||
@ -59,7 +59,7 @@ class gp_Pnt;
|
|||||||
// parameters inside the block and vice versa
|
// parameters inside the block and vice versa
|
||||||
// =========================================================
|
// =========================================================
|
||||||
|
|
||||||
class SMESH_EXPORT SMESH_Block: public math_FunctionSetWithDerivatives
|
class SMESHUtils_EXPORT SMESH_Block: public math_FunctionSetWithDerivatives
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum TShapeID {
|
enum TShapeID {
|
||||||
@ -311,7 +311,7 @@ public:
|
|||||||
// Note 2: curve adaptors need to have only Value(double), FirstParameter() and
|
// Note 2: curve adaptors need to have only Value(double), FirstParameter() and
|
||||||
// LastParameter() defined to be used by Block algoritms
|
// LastParameter() defined to be used by Block algoritms
|
||||||
|
|
||||||
class SMESH_EXPORT TEdge {
|
class SMESHUtils_EXPORT TEdge {
|
||||||
int myCoordInd;
|
int myCoordInd;
|
||||||
double myFirst;
|
double myFirst;
|
||||||
double myLast;
|
double myLast;
|
||||||
@ -331,7 +331,7 @@ public:
|
|||||||
~TEdge();
|
~TEdge();
|
||||||
};
|
};
|
||||||
|
|
||||||
class SMESH_EXPORT TFace {
|
class SMESHUtils_EXPORT TFace {
|
||||||
// 4 edges in the order u0, u1, 0v, 1v
|
// 4 edges in the order u0, u1, 0v, 1v
|
||||||
int myCoordInd[ 4 ];
|
int myCoordInd[ 4 ];
|
||||||
double myFirst [ 4 ];
|
double myFirst [ 4 ];
|
@ -24,7 +24,7 @@
|
|||||||
#ifndef __SMESH_File_HXX__
|
#ifndef __SMESH_File_HXX__
|
||||||
#define __SMESH_File_HXX__
|
#define __SMESH_File_HXX__
|
||||||
|
|
||||||
#include "SMESH_SMESH.hxx"
|
#include "SMESH_Utils.hxx"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -38,7 +38,7 @@
|
|||||||
/*!
|
/*!
|
||||||
* \brief High level util for effective file reading and other file operations
|
* \brief High level util for effective file reading and other file operations
|
||||||
*/
|
*/
|
||||||
class SMESH_EXPORT SMESH_File
|
class SMESHUtils_EXPORT SMESH_File
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -27,7 +27,7 @@
|
|||||||
#ifndef __SMESH_TypeDefs_HXX__
|
#ifndef __SMESH_TypeDefs_HXX__
|
||||||
#define __SMESH_TypeDefs_HXX__
|
#define __SMESH_TypeDefs_HXX__
|
||||||
|
|
||||||
#include "SMESH_SMESH.hxx"
|
#include "SMESH_Utils.hxx"
|
||||||
|
|
||||||
#include <SMDS_MeshNode.hxx>
|
#include <SMDS_MeshNode.hxx>
|
||||||
|
|
||||||
@ -48,6 +48,19 @@ typedef std::set< const SMDS_MeshNode*, TIDCompare > TIDSortedNodeSet;
|
|||||||
typedef pair< const SMDS_MeshNode*, const SMDS_MeshNode* > NLink;
|
typedef pair< const SMDS_MeshNode*, const SMDS_MeshNode* > NLink;
|
||||||
|
|
||||||
|
|
||||||
|
namespace SMESHUtils
|
||||||
|
{
|
||||||
|
/*!
|
||||||
|
* \brief Enforce freeing memory allocated by std::vector
|
||||||
|
*/
|
||||||
|
template <class TVECTOR>
|
||||||
|
void FreeVector(TVECTOR& vec)
|
||||||
|
{
|
||||||
|
TVECTOR v2;
|
||||||
|
vec.swap( v2 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief A sorted pair of nodes
|
* \brief A sorted pair of nodes
|
||||||
@ -139,7 +152,7 @@ DEFINE_SEQUENCE(SMESH_SequenceOfNode,
|
|||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
// class SMESH_DataMapOfElemPtrSequenceOfElemPtr
|
// class SMESH_DataMapOfElemPtrSequenceOfElemPtr
|
||||||
|
|
||||||
// SMESH_EXPORT
|
// SMESHUtils_EXPORT
|
||||||
// inline Standard_Integer HashCode(SMDS_MeshElementPtr theElem,
|
// inline Standard_Integer HashCode(SMDS_MeshElementPtr theElem,
|
||||||
// const Standard_Integer theUpper)
|
// const Standard_Integer theUpper)
|
||||||
// {
|
// {
|
||||||
@ -147,7 +160,7 @@ DEFINE_SEQUENCE(SMESH_SequenceOfNode,
|
|||||||
// return HashCode(anElem,theUpper);
|
// return HashCode(anElem,theUpper);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// SMESH_EXPORT
|
// SMESHUtils_EXPORT
|
||||||
// inline Standard_Boolean IsEqual(SMDS_MeshElementPtr theOne,
|
// inline Standard_Boolean IsEqual(SMDS_MeshElementPtr theOne,
|
||||||
// SMDS_MeshElementPtr theTwo)
|
// SMDS_MeshElementPtr theTwo)
|
||||||
// {
|
// {
|
40
src/SMESHUtils/SMESH_Utils.hxx
Executable file
40
src/SMESHUtils/SMESH_Utils.hxx
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
// Copyright (C) 2007-2011 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
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
//
|
||||||
|
|
||||||
|
// File : SMESH_Utils.hxx
|
||||||
|
// Author : Alexander A. BORODIN
|
||||||
|
// Module : SMESH
|
||||||
|
//
|
||||||
|
#ifndef _SMESH_Utils_hxx_
|
||||||
|
#define _SMESH_Utils_hxx_
|
||||||
|
|
||||||
|
#ifdef WNT
|
||||||
|
#if defined SMESHUtils_EXPORTS
|
||||||
|
#define SMESHUtils_EXPORT __declspec( dllexport )
|
||||||
|
#else
|
||||||
|
#define SMESHUtils_EXPORT __declspec( dllimport )
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define SMESHUtils_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user