mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-19 13:23:06 +05:00
first executable version
This commit is contained in:
parent
ee9052e3b5
commit
fe6220c161
@ -92,6 +92,8 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
#define SPACING 5
|
#define SPACING 5
|
||||||
#define MARGIN 10
|
#define MARGIN 10
|
||||||
|
@ -78,7 +78,7 @@ class SMESHGUI_EXPORT SMESHGUI_EditMeshDlg : public QDialog
|
|||||||
void onEditGroup();
|
void onEditGroup();
|
||||||
|
|
||||||
void FindGravityCenter(TColStd_MapOfInteger & ElemsIdMap,
|
void FindGravityCenter(TColStd_MapOfInteger & ElemsIdMap,
|
||||||
list< gp_XYZ > & GrCentersXYZ);
|
std::list< gp_XYZ > & GrCentersXYZ);
|
||||||
// add the centers of gravity of ElemsIdMap elements to the GrCentersXYZ list
|
// add the centers of gravity of ElemsIdMap elements to the GrCentersXYZ list
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -74,6 +74,8 @@
|
|||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Constructor
|
* \brief Constructor
|
||||||
|
@ -56,7 +56,7 @@ namespace SMESH
|
|||||||
QString name = baseName;
|
QString name = baseName;
|
||||||
while ( !aStudy->FindObjectByName( name.latin1(), "SMESH" ).empty() ) {
|
while ( !aStudy->FindObjectByName( name.latin1(), "SMESH" ).empty() ) {
|
||||||
int nb = 0;
|
int nb = 0;
|
||||||
if ( name[ name.length()-1 ].isNumber() ) {
|
if ( name.at( name.length()-1 ).isNumber() ) {
|
||||||
int nbBeg = name.findRev("_");
|
int nbBeg = name.findRev("_");
|
||||||
nb = name.right( name.length() - nbBeg - 1 ).toInt();
|
nb = name.right( name.length() - nbBeg - 1 ).toInt();
|
||||||
name = name.left( nbBeg );
|
name = name.left( nbBeg );
|
||||||
|
@ -67,6 +67,8 @@
|
|||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
#include <qstringlist.h>
|
#include <qstringlist.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
#define SPACING 5
|
#define SPACING 5
|
||||||
#define MARGIN 10
|
#define MARGIN 10
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
#include <qmessagebox.h>
|
#include <qmessagebox.h>
|
||||||
#include <qvalidator.h>
|
#include <qvalidator.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
#define SPACING 5
|
#define SPACING 5
|
||||||
#define MARGIN 10
|
#define MARGIN 10
|
||||||
|
@ -59,7 +59,7 @@ class SALOME_Actor;
|
|||||||
namespace SMESH {
|
namespace SMESH {
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
typedef pair<int,string> TKeyOfVisualObj;
|
typedef std::pair<int,std::string> TKeyOfVisualObj;
|
||||||
|
|
||||||
SMESHGUI_EXPORT
|
SMESHGUI_EXPORT
|
||||||
TVisualObjPtr GetVisualObj(int theStudyId,
|
TVisualObjPtr GetVisualObj(int theStudyId,
|
||||||
|
@ -48,16 +48,16 @@ protected :
|
|||||||
int _numberOfAttribute;
|
int _numberOfAttribute;
|
||||||
int * _attributeIdentifier;
|
int * _attributeIdentifier;
|
||||||
int * _attributeValue;
|
int * _attributeValue;
|
||||||
string * _attributeDescription;
|
std::string * _attributeDescription;
|
||||||
int _numberOfGroup ;
|
int _numberOfGroup ;
|
||||||
string * _groupName ;
|
std::string * _groupName ;
|
||||||
|
|
||||||
|
|
||||||
public :
|
public :
|
||||||
|
|
||||||
// Constructors and associated internal methods
|
// Constructors and associated internal methods
|
||||||
SMESH_MEDFamily_i(int identifier, SMESH_subMesh_i* sm,
|
SMESH_MEDFamily_i(int identifier, SMESH_subMesh_i* sm,
|
||||||
string name, string description, SALOME_MED::medEntityMesh entity );
|
std::string name, std::string description, SALOME_MED::medEntityMesh entity );
|
||||||
SMESH_MEDFamily_i(const SMESH_MEDFamily_i & f);
|
SMESH_MEDFamily_i(const SMESH_MEDFamily_i & f);
|
||||||
|
|
||||||
// IDL Methods
|
// IDL Methods
|
||||||
|
@ -55,22 +55,22 @@ protected:
|
|||||||
::SMESH_Mesh_i * _mesh_i;
|
::SMESH_Mesh_i * _mesh_i;
|
||||||
SMESHDS_Mesh *_meshDS;
|
SMESHDS_Mesh *_meshDS;
|
||||||
|
|
||||||
string _meshId;
|
std::string _meshId;
|
||||||
bool _compte;
|
bool _compte;
|
||||||
bool _creeFamily;
|
bool _creeFamily;
|
||||||
int _indexElts;
|
int _indexElts;
|
||||||
int _indexEnts;
|
int _indexEnts;
|
||||||
int _famIdent;
|
int _famIdent;
|
||||||
|
|
||||||
map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts;
|
std::map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts;
|
||||||
SALOME_MED::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
|
SALOME_MED::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
|
||||||
|
|
||||||
map < SALOME_MED::medEntityMesh, int >_mapNbTypes;
|
std::map < SALOME_MED::medEntityMesh, int >_mapNbTypes;
|
||||||
map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes;
|
std::map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes;
|
||||||
vector < SALOME_MED::medGeometryElement >
|
std::vector < SALOME_MED::medGeometryElement >
|
||||||
_TypesId[MED_NBR_GEOMETRIE_MAILLE];
|
_TypesId[MED_NBR_GEOMETRIE_MAILLE];
|
||||||
|
|
||||||
vector < SALOME_MED::FAMILY_ptr > _families;
|
std::vector < SALOME_MED::FAMILY_ptr > _families;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors and associated internal methods
|
// Constructors and associated internal methods
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
#include <SALOMEconfig.h>
|
#include <SALOMEconfig.h>
|
||||||
#include CORBA_SERVER_HEADER(MED)
|
#include CORBA_SERVER_HEADER(MED)
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "SMESHDS_Mesh.hxx"
|
#include "SMESHDS_Mesh.hxx"
|
||||||
#include "SMESHDS_SubMesh.hxx"
|
#include "SMESHDS_SubMesh.hxx"
|
||||||
@ -40,6 +39,7 @@
|
|||||||
|
|
||||||
#include "SMESH_MEDSupport_i.hxx"
|
#include "SMESH_MEDSupport_i.hxx"
|
||||||
#include "SALOME_GenericObj_i.hh"
|
#include "SALOME_GenericObj_i.hh"
|
||||||
|
#include <string>
|
||||||
class SMESH_subMesh_i;
|
class SMESH_subMesh_i;
|
||||||
|
|
||||||
class SMESH_I_EXPORT SMESH_MEDSupport_i:
|
class SMESH_I_EXPORT SMESH_MEDSupport_i:
|
||||||
@ -49,7 +49,7 @@ class SMESH_I_EXPORT SMESH_MEDSupport_i:
|
|||||||
|
|
||||||
// Constructors and associated internal methods
|
// Constructors and associated internal methods
|
||||||
SMESH_MEDSupport_i(SMESH_subMesh_i * sm,
|
SMESH_MEDSupport_i(SMESH_subMesh_i * sm,
|
||||||
string name, string description, SALOME_MED::medEntityMesh entity);
|
std::string name, std::string description, SALOME_MED::medEntityMesh entity);
|
||||||
SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s);
|
SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s);
|
||||||
|
|
||||||
// IDL Methods
|
// IDL Methods
|
||||||
@ -102,8 +102,8 @@ class SMESH_I_EXPORT SMESH_MEDSupport_i:
|
|||||||
::SMESH_subMesh_i * _subMesh_i;
|
::SMESH_subMesh_i * _subMesh_i;
|
||||||
|
|
||||||
SMESHDS_Mesh * _meshDS;
|
SMESHDS_Mesh * _meshDS;
|
||||||
string _name;
|
std::string _name;
|
||||||
string _description;
|
std::string _description;
|
||||||
bool _isOnAllElements;
|
bool _isOnAllElements;
|
||||||
bool _seqNumber;
|
bool _seqNumber;
|
||||||
int _seqLength;
|
int _seqLength;
|
||||||
|
@ -326,7 +326,7 @@ public:
|
|||||||
SMESH::SMESH_subMesh_ptr getSubMesh(int shapeID);
|
SMESH::SMESH_subMesh_ptr getSubMesh(int shapeID);
|
||||||
// return an existing subMesh object for the shapeID. shapeID == submeshID.
|
// return an existing subMesh object for the shapeID. shapeID == submeshID.
|
||||||
|
|
||||||
const map<int, SMESH::SMESH_GroupBase_ptr>& getGroups() { return _mapGroups; }
|
const std::map<int, SMESH::SMESH_GroupBase_ptr>& getGroups() { return _mapGroups; }
|
||||||
// return an existing group object.
|
// return an existing group object.
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -437,8 +437,8 @@ public:
|
|||||||
SMESH::double_array* BaryCenter(CORBA::Long id);
|
SMESH::double_array* BaryCenter(CORBA::Long id);
|
||||||
|
|
||||||
|
|
||||||
map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
|
std::map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
|
||||||
map<int, ::SMESH_subMesh*> _mapSubMesh; //NRI
|
std::map<int, ::SMESH_subMesh*> _mapSubMesh; //NRI
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -447,9 +447,9 @@ private:
|
|||||||
SMESH_Gen_i* _gen_i;
|
SMESH_Gen_i* _gen_i;
|
||||||
int _id; // id given by creator (unique within the creator instance)
|
int _id; // id given by creator (unique within the creator instance)
|
||||||
int _studyId;
|
int _studyId;
|
||||||
map<int, SMESH::SMESH_subMesh_ptr> _mapSubMeshIor;
|
std::map<int, SMESH::SMESH_subMesh_ptr> _mapSubMeshIor;
|
||||||
map<int, SMESH::SMESH_GroupBase_ptr> _mapGroups;
|
std::map<int, SMESH::SMESH_GroupBase_ptr> _mapGroups;
|
||||||
map<int, SMESH::SMESH_Hypothesis_ptr> _mapHypo;
|
std::map<int, SMESH::SMESH_Hypothesis_ptr> _mapHypo;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -41,6 +41,8 @@
|
|||||||
#include <Standard_ErrorHandler.hxx>
|
#include <Standard_ErrorHandler.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
Function::Function( const int conv )
|
Function::Function( const int conv )
|
||||||
: myConv( conv )
|
: myConv( conv )
|
||||||
{
|
{
|
||||||
|
@ -105,14 +105,14 @@ STDMESHERS_EXPORT
|
|||||||
bool buildDistribution( const Function& f,
|
bool buildDistribution( const Function& f,
|
||||||
const double start, const double end,
|
const double start, const double end,
|
||||||
const int nbSeg,
|
const int nbSeg,
|
||||||
vector<double>& data,
|
std::vector<double>& data,
|
||||||
const double eps );
|
const double eps );
|
||||||
|
|
||||||
STDMESHERS_EXPORT
|
STDMESHERS_EXPORT
|
||||||
bool buildDistribution( const TCollection_AsciiString& f, const int conv, const double start, const double end,
|
bool buildDistribution( const TCollection_AsciiString& f, const int conv, const double start, const double end,
|
||||||
const int nbSeg, vector<double>& data, const double eps );
|
const int nbSeg, std::vector<double>& data, const double eps );
|
||||||
STDMESHERS_EXPORT
|
STDMESHERS_EXPORT
|
||||||
bool buildDistribution( const std::vector<double>& f, const int conv, const double start, const double end,
|
bool buildDistribution( const std::vector<double>& f, const int conv, const double start, const double end,
|
||||||
const int nbSeg, vector<double>& data, const double eps );
|
const int nbSeg, std::vector<double>& data, const double eps );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -97,7 +97,7 @@ protected:
|
|||||||
TopTools_IndexedMapOfOrientedShape myShapeIDMap;
|
TopTools_IndexedMapOfOrientedShape myShapeIDMap;
|
||||||
SMESH_Block myTBlock;
|
SMESH_Block myTBlock;
|
||||||
TopoDS_Shape myEmptyShape;
|
TopoDS_Shape myEmptyShape;
|
||||||
vector<int> myIsEdgeForward;
|
std::vector<int> myIsEdgeForward;
|
||||||
//
|
//
|
||||||
int myErrorStatus;
|
int myErrorStatus;
|
||||||
};
|
};
|
||||||
@ -216,8 +216,8 @@ class STDMESHERS_EXPORT StdMeshers_Penta_3D {
|
|||||||
|
|
||||||
double SetHorizEdgeXYZ(const gp_XYZ& aBNXYZ,
|
double SetHorizEdgeXYZ(const gp_XYZ& aBNXYZ,
|
||||||
const int aFaceID,
|
const int aFaceID,
|
||||||
vector<const SMDS_MeshNode*>*& aCol1,
|
std::vector<const SMDS_MeshNode*>*& aCol1,
|
||||||
vector<const SMDS_MeshNode*>*& aCol2);
|
std::vector<const SMDS_MeshNode*>*& aCol2);
|
||||||
|
|
||||||
void ShapeSupportID(const bool theIsUpperLayer,
|
void ShapeSupportID(const bool theIsUpperLayer,
|
||||||
const SMESH_Block::TShapeID theBNSSID,
|
const SMESH_Block::TShapeID theBNSSID,
|
||||||
@ -256,14 +256,14 @@ class STDMESHERS_EXPORT StdMeshers_Penta_3D {
|
|||||||
void * myMesh;
|
void * myMesh;
|
||||||
SMESH_ComputeErrorPtr myErrorStatus;
|
SMESH_ComputeErrorPtr myErrorStatus;
|
||||||
//
|
//
|
||||||
vector <StdMeshers_TNode> myTNodes;
|
std::vector <StdMeshers_TNode> myTNodes;
|
||||||
int myISize;
|
int myISize;
|
||||||
int myJSize;
|
int myJSize;
|
||||||
double myTol3D; // Tolerance value
|
double myTol3D; // Tolerance value
|
||||||
std::map < int, int > myConnectingMap;
|
std::map < int, int > myConnectingMap;
|
||||||
//
|
//
|
||||||
vector<StdMeshers_IJNodeMap> myWallNodesMaps; // nodes on a face
|
std::vector<StdMeshers_IJNodeMap> myWallNodesMaps; // nodes on a face
|
||||||
vector<gp_XYZ> myShapeXYZ; // point on each sub-shape
|
std::vector<gp_XYZ> myShapeXYZ; // point on each sub-shape
|
||||||
|
|
||||||
bool myCreateQuadratic;
|
bool myCreateQuadratic;
|
||||||
SMESH_MesherHelper* myTool; // tool building quadratic elements
|
SMESH_MesherHelper* myTool; // tool building quadratic elements
|
||||||
|
@ -65,6 +65,8 @@
|
|||||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
|
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
|
||||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
|
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
#define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; }
|
#define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; }
|
||||||
#define SHOW_VERTEX(v,msg) // { \
|
#define SHOW_VERTEX(v,msg) // { \
|
||||||
|
@ -87,8 +87,8 @@ class StdMeshers_ProjectionUtils
|
|||||||
TopoDS_Vertex VV1[2],
|
TopoDS_Vertex VV1[2],
|
||||||
const TopoDS_Face& face2,
|
const TopoDS_Face& face2,
|
||||||
TopoDS_Vertex VV2[2],
|
TopoDS_Vertex VV2[2],
|
||||||
list< TopoDS_Edge > & edges1,
|
std::list< TopoDS_Edge > & edges1,
|
||||||
list< TopoDS_Edge > & edges2);
|
std::list< TopoDS_Edge > & edges2);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Insert vertex association defined by a hypothesis into a map
|
* \brief Insert vertex association defined by a hypothesis into a map
|
||||||
|
@ -49,7 +49,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class StdMeshers_UseExisting_1D: public SMESH_1D_Algo
|
class STDMESHERS_EXPORT StdMeshers_UseExisting_1D: public SMESH_1D_Algo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StdMeshers_UseExisting_1D(int hypId, int studyId, SMESH_Gen* gen);
|
StdMeshers_UseExisting_1D(int hypId, int studyId, SMESH_Gen* gen);
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
#include "SALOME_ListIO.hxx"
|
#include "SALOME_ListIO.hxx"
|
||||||
#include "SALOMEDSClient_SObject.hxx"
|
#include "SALOMEDSClient_SObject.hxx"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Constructor initialized by filter
|
* \brief Constructor initialized by filter
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
// $Header$
|
// $Header$
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
#include "StdMeshers_NumberOfSegments_i.hxx"
|
#include "StdMeshers_NumberOfSegments_i.hxx"
|
||||||
#include "SMESH_Gen_i.hxx"
|
#include "SMESH_Gen_i.hxx"
|
||||||
#include "SMESH_Gen.hxx"
|
#include "SMESH_Gen.hxx"
|
||||||
@ -38,6 +37,8 @@ using namespace std;
|
|||||||
|
|
||||||
#include <TCollection_AsciiString.hxx>
|
#include <TCollection_AsciiString.hxx>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i
|
* StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i
|
||||||
|
@ -26,8 +26,6 @@
|
|||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
// $Header$
|
// $Header$
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
#include "StdMeshers_ProjectionSource1D_i.hxx"
|
#include "StdMeshers_ProjectionSource1D_i.hxx"
|
||||||
|
|
||||||
#include "SMESH_Gen_i.hxx"
|
#include "SMESH_Gen_i.hxx"
|
||||||
@ -39,6 +37,8 @@ using namespace std;
|
|||||||
|
|
||||||
#include "StdMeshers_ObjRefUlils.hxx"
|
#include "StdMeshers_ObjRefUlils.hxx"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* StdMeshers_ProjectionSource1D_i::StdMeshers_ProjectionSource1D_i
|
* StdMeshers_ProjectionSource1D_i::StdMeshers_ProjectionSource1D_i
|
||||||
|
Loading…
Reference in New Issue
Block a user