1 |
francois |
1158 |
//####//------------------------------------------------------------ |
2 |
|
|
//####//------------------------------------------------------------ |
3 |
|
|
//####// MAGiC |
4 |
|
|
//####// Jean Christophe Cuilliere et Vincent FRANCOIS |
5 |
|
|
//####// Departement de Genie Mecanique - UQTR |
6 |
|
|
//####//------------------------------------------------------------ |
7 |
|
|
//####// MAGIC est un projet de recherche de l equipe ERICCA |
8 |
|
|
//####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres |
9 |
|
|
//####// http://www.uqtr.ca/ericca |
10 |
|
|
//####// http://www.uqtr.ca/ |
11 |
|
|
//####//------------------------------------------------------------ |
12 |
|
|
//####//------------------------------------------------------------ |
13 |
|
|
//####// |
14 |
|
|
//####// CAD4FE_MCNode.h |
15 |
|
|
//####// |
16 |
|
|
//####//------------------------------------------------------------ |
17 |
|
|
//####//------------------------------------------------------------ |
18 |
|
|
//####// COPYRIGHT 2000-2024 |
19 |
|
|
//####// jeu 13 jun 2024 11:58:56 EDT |
20 |
|
|
//####//------------------------------------------------------------ |
21 |
|
|
//####//------------------------------------------------------------ |
22 |
foucault |
27 |
|
23 |
|
|
#ifndef CAD4FE_MCNodeH
|
24 |
|
|
#define CAD4FE_MCNodeH
|
25 |
|
|
|
26 |
|
|
#include <map>
|
27 |
|
|
#include <set>
|
28 |
|
|
|
29 |
|
|
#include "CAD4FE_Mesher_platform.h"
|
30 |
|
|
#include "gestionversion.h"
|
31 |
|
|
#include "mg_noeud.h"
|
32 |
|
|
#include "ot_mathematique.h"
|
33 |
|
|
|
34 |
|
|
const unsigned int IDMCNODE=5000;
|
35 |
|
|
|
36 |
|
|
class MG_FACE;
|
37 |
|
|
class MG_ARETE;
|
38 |
|
|
class MG_SOMMET;
|
39 |
|
|
class MG_ELEMENT_TOPOLOGIQUE;
|
40 |
|
|
|
41 |
|
|
namespace CAD4FE {
|
42 |
|
|
|
43 |
|
|
class MCSegment;
|
44 |
|
|
class FaceBoundaryPoint;
|
45 |
|
|
class MCFace;
|
46 |
|
|
|
47 |
francois |
1158 |
class MCNode : public MG_NOEUD {
|
48 |
foucault |
27 |
public:
|
49 |
|
|
|
50 |
|
|
typedef std::map< MG_FACE *, OT_VECTEUR_3D > FMap;
|
51 |
|
|
typedef FMap::iterator FMapIterator;
|
52 |
|
|
typedef std::map< MG_ARETE *, double > EMap;
|
53 |
|
|
typedef EMap::iterator EMapIterator;
|
54 |
|
|
typedef EMap::const_iterator EMapCIterator;
|
55 |
|
|
typedef std::set< MG_SOMMET * > VMap;
|
56 |
|
|
typedef VMap::iterator VMapIterator;
|
57 |
|
|
typedef VMap::const_iterator VMapCIterator;
|
58 |
|
|
|
59 |
|
|
MCNode(unsigned long num,MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_ELEMENT_TOPOLOGIQUE* refTopo,double xx,double yy,double zz);
|
60 |
|
|
MCNode(MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_ELEMENT_TOPOLOGIQUE* refTopo,double xx,double yy,double zz);
|
61 |
|
|
MCNode(MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_FACE* __refFace, double __uv[2], double __xyz[3]);
|
62 |
|
|
MCNode(MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_ARETE* __refEdge, double __t, double __xyz[3]);
|
63 |
|
|
MCNode();
|
64 |
|
|
MCNode(const MCNode&);
|
65 |
|
|
virtual ~MCNode();
|
66 |
francois |
763 |
virtual void enregistrer(std::ostream& o,double version);
|
67 |
foucault |
27 |
void CopyGeometry(const MCNode&);
|
68 |
|
|
|
69 |
foucault |
569 |
enum CreatorType {
|
70 |
|
|
unknown = 0,
|
71 |
|
|
mailleur_1d = 1,
|
72 |
|
|
mailleur_2d = 2,
|
73 |
|
|
mailleur_3d = 4,
|
74 |
|
|
intersection_plane_mg_arete = 5,
|
75 |
|
|
intersection_plane_mg_polysurface = 6,
|
76 |
|
|
intersection_plane_mg_face = 7,
|
77 |
|
|
mailleur_2d_bouge_point = 8
|
78 |
|
|
} Creator;
|
79 |
|
|
|
80 |
foucault |
27 |
void NormalMCFace(MCFace* __mcFace, double * __normal);
|
81 |
|
|
bool IsInFace (MG_FACE *);
|
82 |
|
|
bool IsInEdge (MG_ARETE *);
|
83 |
|
|
bool IsInVertex (MG_SOMMET*);
|
84 |
|
|
bool RefTopoIsInFace (MG_FACE *);
|
85 |
|
|
bool RefTopoIsInEdge (MG_ARETE *);
|
86 |
|
|
bool RefTopoIsInVertex (MG_SOMMET*);
|
87 |
|
|
MG_SOMMET * GetMergedVertex(MG_FACE * __face);
|
88 |
|
|
|
89 |
|
|
OT_VECTEUR_3D & GetFaceParams (MG_FACE *);
|
90 |
|
|
OT_VECTEUR_3D & UV (MG_FACE *);
|
91 |
|
|
double GetEdgeParams (MG_ARETE *);
|
92 |
|
|
double T (MG_ARETE *);
|
93 |
|
|
|
94 |
|
|
virtual int get_type_entite ();
|
95 |
|
|
|
96 |
|
|
void ConstructMapping();
|
97 |
|
|
void ConstructMergedVertexMapping(MG_SOMMET * __mergedVertex);
|
98 |
|
|
|
99 |
|
|
void SharedFaces(MCNode * , std::set <MG_FACE*> & __setF);
|
100 |
|
|
void SharedEdges(MCNode * __other, std::set <MG_ARETE*> & __setE);
|
101 |
|
|
void SharedVertices(MCNode * __other, std::set <MG_SOMMET*> & __setV);
|
102 |
|
|
|
103 |
|
|
MG_ELEMENT_TOPOLOGIQUE * get_lien_topologie_reference();
|
104 |
|
|
void change_lien_topologie_reference(MG_ELEMENT_TOPOLOGIQUE *__refTopo);
|
105 |
|
|
|
106 |
|
|
void Print();
|
107 |
|
|
|
108 |
|
|
FMap & GetRefFaceMapping();
|
109 |
|
|
EMap & GetRefEdgeMapping();
|
110 |
|
|
VMap & GetRefVertexMapping();
|
111 |
|
|
void SetRefFaceMapping(MG_FACE * __face, double * __uv);
|
112 |
|
|
void SetRefEdgeMapping(MG_ARETE * __edge, double __t);
|
113 |
|
|
void SetRefVertexMapping(MG_SOMMET * __vertex);
|
114 |
|
|
|
115 |
|
|
void SetSaveFormat(char __format);
|
116 |
|
|
|
117 |
foucault |
176 |
|
118 |
|
|
protected:
|
119 |
foucault |
27 |
FMap _F;
|
120 |
|
|
EMap _E;
|
121 |
foucault |
176 |
VMap _V;
|
122 |
foucault |
27 |
MG_ELEMENT_TOPOLOGIQUE * _refTopo;
|
123 |
|
|
char _saveFormat;
|
124 |
|
|
};
|
125 |
|
|
|
126 |
|
|
}
|
127 |
|
|
|
128 |
|
|
#endif
|