1 |
//####//------------------------------------------------------------ |
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 |
//####// remailleur.h |
15 |
//####// |
16 |
//####//------------------------------------------------------------ |
17 |
//####//------------------------------------------------------------ |
18 |
//####// COPYRIGHT 2000-2024 |
19 |
//####// jeu 13 jun 2024 11:58:55 EDT |
20 |
//####//------------------------------------------------------------ |
21 |
//####//------------------------------------------------------------ |
22 |
|
23 |
#ifndef remailleurH
|
24 |
#define remailleurH
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
#include "mailleur.h"
|
31 |
#include "tpl_octree.h"
|
32 |
#include "tpl_quadtree.h"
|
33 |
#include "fct_generateur_3d.h"
|
34 |
#include "vct_comparaison_resultat.h"
|
35 |
#include "mg_volume.h"
|
36 |
#include "mg_segment_frontiere.h"
|
37 |
#include <map>
|
38 |
|
39 |
|
40 |
class CORRESPONDANCENOEUD
|
41 |
{
|
42 |
public :
|
43 |
CORRESPONDANCENOEUD(class MG_NOEUD*n1,class MG_NOEUD*n2):noeudori(n1),noeudmod(n2) {};
|
44 |
|
45 |
class MG_NOEUD* noeudori;
|
46 |
class MG_NOEUD* noeudmod;
|
47 |
};
|
48 |
|
49 |
|
50 |
class REMAILLEUR:public MAILLEUR
|
51 |
{
|
52 |
public:
|
53 |
REMAILLEUR(class MG_GESTIONNAIRE* gentier,MG_GESTIONNAIRE* gbloc,class MG_GEOMETRIE* geo1,MG_GEOMETRIE* geo2,class FCT_TAILLE* fct_taille1,class FCT_TAILLE* fct_taille2,MG_MAILLAGE* mori,MG_MAILLAGE* mmodi,VCT_COMPARAISON_RESULTAT& cmp);
|
54 |
~REMAILLEUR();
|
55 |
|
56 |
int maille(int etape);
|
57 |
int maille(class MG_GROUPE_TOPOLOGIQUE* mggt=NULL);
|
58 |
|
59 |
private:
|
60 |
void initialise_octree(void);
|
61 |
void detruit_noeud(MG_ELEMENT_MAILLAGE* elebase,double distance,int type=0);
|
62 |
|
63 |
|
64 |
|
65 |
int point_appartient_volume(double *xyz,int numvol);
|
66 |
int inter_droite_triangle(double *xyz,double *dir,MG_TRIANGLE* tri,double *t);
|
67 |
void ajouter_liste_correspondance_noeud(MG_NOEUD* n1,MG_NOEUD* n2);
|
68 |
MG_NOEUD* get_liste_correspondance(MG_NOEUD* n1);
|
69 |
MG_NOEUD* transfert_noeud(MG_NOEUD* no,MG_ELEMENT_TOPOLOGIQUE* ele);
|
70 |
void transfert_coord(double *xyz,double *xyz2);
|
71 |
void cree_bloc_maille(std::multimap<unsigned long,MG_SEGMENT*,std::less <unsigned long> > &lst,MG_ARETE* arete);
|
72 |
void cree_bloc_maille(std::multimap<unsigned long,MG_TRIANGLE*,std::less <unsigned long> > &lst,MG_FACE* face);
|
73 |
void cree_bloc_maille(std::multimap<unsigned long,MG_TETRA*,std::less <unsigned long> > &lst,MG_VOLUME* face);
|
74 |
MG_SEGMENT* trouve_segment(std::multimap<unsigned long,MG_SEGMENT*,std::less <unsigned long> > &lst,MG_NOEUD* no);
|
75 |
MG_TRIANGLE* trouve_triangle(std::multimap<unsigned long,MG_TRIANGLE*,std::less <unsigned long> > &lst,MG_NOEUD* no);
|
76 |
MG_TETRA* trouve_tetra(std::multimap<unsigned long,MG_TETRA*,std::less <unsigned long> > &lst,MG_NOEUD* no);
|
77 |
void cree_liste_frontiere(MG_MAILLAGE* mai);
|
78 |
|
79 |
class MG_GESTIONNAIRE* gestorigine,*gestmodifie;
|
80 |
class MG_GEOMETRIE* geoorigine,*geomodifie;
|
81 |
class FCT_TAILLE* carteori;
|
82 |
class FCT_TAILLE* cartemod;
|
83 |
class MG_MAILLAGE* maiorigine;
|
84 |
class MG_MAILLAGE* maimodifie;
|
85 |
TPL_OCTREE_FCT<MG_NOEUD*,FCT_TAILLE > *octree;
|
86 |
TPL_LISTE_ENTITE<MG_TRIANGLE*> *lsttrifront;
|
87 |
VCT_COMPARAISON_RESULTAT& rescmp;
|
88 |
std::map<unsigned long,CORRESPONDANCENOEUD> lstcorrnoeud;
|
89 |
std::multimap<unsigned long,class BLOC_MAILLE_1D*,std::less <unsigned long> > lstb1d;
|
90 |
std::multimap<unsigned long,class BLOC_MAILLE_2D*,std::less <unsigned long> > lstb2d;
|
91 |
std::multimap<unsigned long,class BLOC_MAILLE_3D*,std::less <unsigned long> > lstb3d;
|
92 |
|
93 |
int nbfacemod;
|
94 |
|
95 |
|
96 |
|
97 |
public:
|
98 |
enum attache{CONSERVE=154,DETRUIT=155,NONTRAITE=156,TRAITE=157,NONATTACHE=158,ATTACHE=159};
|
99 |
};
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
class BLOC_MAILLE_1D
|
108 |
{
|
109 |
public:
|
110 |
BLOC_MAILLE_1D(class MG_ARETE* are,int ty):arete(are),etat(REMAILLEUR::NONATTACHE),type(ty) {};
|
111 |
~BLOC_MAILLE_1D() {};
|
112 |
|
113 |
MG_ARETE* arete;
|
114 |
std::vector<MG_SEGMENT*> lst;
|
115 |
unsigned long get_id(void) {return arete->get_id();};
|
116 |
int etat;
|
117 |
int type;
|
118 |
};
|
119 |
|
120 |
class BLOC_MAILLE_2D
|
121 |
{
|
122 |
public:
|
123 |
BLOC_MAILLE_2D(class MG_FACE* fac,int ty):face(fac),etat(REMAILLEUR::NONATTACHE),type(ty) {};
|
124 |
~BLOC_MAILLE_2D() {};
|
125 |
|
126 |
MG_FACE* face;
|
127 |
std::vector<MG_TRIANGLE*> lst;
|
128 |
unsigned long get_id(void) {return face->get_id();};
|
129 |
int etat;
|
130 |
int type;
|
131 |
};
|
132 |
|
133 |
class BLOC_MAILLE_3D
|
134 |
{
|
135 |
public:
|
136 |
BLOC_MAILLE_3D(class MG_VOLUME* vol):volume(vol),etat(REMAILLEUR::NONATTACHE) {};
|
137 |
~BLOC_MAILLE_3D() {};
|
138 |
|
139 |
MG_VOLUME* volume;
|
140 |
std::vector<MG_TETRA*> lst;
|
141 |
unsigned long get_id(void) {return volume->get_id();};
|
142 |
int etat;
|
143 |
};
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
#endif
|