1 |
foucault |
27 |
//---------------------------------------------------------------------------
|
2 |
|
|
|
3 |
|
|
#ifndef CAD4FE_MCNodeH
|
4 |
|
|
#define CAD4FE_MCNodeH
|
5 |
|
|
//---------------------------------------------------------------------------
|
6 |
|
|
|
7 |
|
|
#include <map>
|
8 |
|
|
#include <set>
|
9 |
|
|
|
10 |
|
|
#include "CAD4FE_Mesher_platform.h"
|
11 |
|
|
#include "gestionversion.h"
|
12 |
|
|
#include "mg_noeud.h"
|
13 |
|
|
#include "ot_mathematique.h"
|
14 |
|
|
|
15 |
|
|
const unsigned int IDMCNODE=5000;
|
16 |
|
|
|
17 |
|
|
class MG_FACE;
|
18 |
|
|
class MG_ARETE;
|
19 |
|
|
class MG_SOMMET;
|
20 |
|
|
class MG_ELEMENT_TOPOLOGIQUE;
|
21 |
|
|
|
22 |
|
|
namespace CAD4FE {
|
23 |
|
|
|
24 |
|
|
class MCSegment;
|
25 |
|
|
class FaceBoundaryPoint;
|
26 |
|
|
class MCFace;
|
27 |
|
|
|
28 |
|
|
class CAD4FE_MESHER_ITEM MCNode : public MG_NOEUD {
|
29 |
|
|
public:
|
30 |
|
|
|
31 |
|
|
typedef std::map< MG_FACE *, OT_VECTEUR_3D > FMap;
|
32 |
|
|
typedef FMap::iterator FMapIterator;
|
33 |
francois |
96 |
//typedef FMap::const_iterator FMapCIterator;
|
34 |
foucault |
27 |
typedef std::map< MG_ARETE *, double > EMap;
|
35 |
|
|
typedef EMap::iterator EMapIterator;
|
36 |
|
|
typedef EMap::const_iterator EMapCIterator;
|
37 |
|
|
typedef std::set< MG_SOMMET * > VMap;
|
38 |
|
|
typedef VMap::iterator VMapIterator;
|
39 |
|
|
typedef VMap::const_iterator VMapCIterator;
|
40 |
|
|
|
41 |
|
|
MCNode(unsigned long num,MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_ELEMENT_TOPOLOGIQUE* refTopo,double xx,double yy,double zz);
|
42 |
|
|
MCNode(MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_ELEMENT_TOPOLOGIQUE* refTopo,double xx,double yy,double zz);
|
43 |
|
|
MCNode(MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_FACE* __refFace, double __uv[2], double __xyz[3]);
|
44 |
|
|
MCNode(MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_ARETE* __refEdge, double __t, double __xyz[3]);
|
45 |
|
|
MCNode();
|
46 |
|
|
MCNode(const MCNode&);
|
47 |
|
|
virtual ~MCNode();
|
48 |
|
|
virtual void enregistrer(std::ostream& o);
|
49 |
|
|
void CopyGeometry(const MCNode&);
|
50 |
|
|
|
51 |
|
|
void NormalMCFace(MCFace* __mcFace, double * __normal);
|
52 |
|
|
bool IsInFace (MG_FACE *);
|
53 |
|
|
bool IsInEdge (MG_ARETE *);
|
54 |
|
|
bool IsInVertex (MG_SOMMET*);
|
55 |
|
|
bool RefTopoIsInFace (MG_FACE *);
|
56 |
|
|
bool RefTopoIsInEdge (MG_ARETE *);
|
57 |
|
|
bool RefTopoIsInVertex (MG_SOMMET*);
|
58 |
|
|
MG_SOMMET * GetMergedVertex(MG_FACE * __face);
|
59 |
|
|
|
60 |
|
|
OT_VECTEUR_3D & GetFaceParams (MG_FACE *);
|
61 |
|
|
OT_VECTEUR_3D & UV (MG_FACE *);
|
62 |
|
|
double GetEdgeParams (MG_ARETE *);
|
63 |
|
|
double T (MG_ARETE *);
|
64 |
|
|
|
65 |
|
|
virtual int get_type_entite ();
|
66 |
|
|
|
67 |
|
|
void ConstructMapping();
|
68 |
|
|
void ConstructMergedVertexMapping(MG_SOMMET * __mergedVertex);
|
69 |
|
|
|
70 |
|
|
void SharedFaces(MCNode * , std::set <MG_FACE*> & __setF);
|
71 |
|
|
void SharedEdges(MCNode * __other, std::set <MG_ARETE*> & __setE);
|
72 |
|
|
void SharedVertices(MCNode * __other, std::set <MG_SOMMET*> & __setV);
|
73 |
|
|
|
74 |
|
|
MG_ELEMENT_TOPOLOGIQUE * get_lien_topologie_reference();
|
75 |
|
|
void change_lien_topologie_reference(MG_ELEMENT_TOPOLOGIQUE *__refTopo);
|
76 |
|
|
|
77 |
|
|
void Print();
|
78 |
|
|
|
79 |
|
|
FMap & GetRefFaceMapping();
|
80 |
|
|
EMap & GetRefEdgeMapping();
|
81 |
|
|
VMap & GetRefVertexMapping();
|
82 |
|
|
void SetRefFaceMapping(MG_FACE * __face, double * __uv);
|
83 |
|
|
void SetRefEdgeMapping(MG_ARETE * __edge, double __t);
|
84 |
|
|
void SetRefVertexMapping(MG_SOMMET * __vertex);
|
85 |
|
|
|
86 |
|
|
void SetSaveFormat(char __format);
|
87 |
|
|
|
88 |
|
|
protected:
|
89 |
|
|
FMap _F;
|
90 |
|
|
EMap _E;
|
91 |
|
|
VMap _V;
|
92 |
|
|
MG_ELEMENT_TOPOLOGIQUE * _refTopo;
|
93 |
|
|
char _saveFormat;
|
94 |
|
|
};
|
95 |
|
|
|
96 |
|
|
}
|
97 |
|
|
|
98 |
|
|
#endif
|