MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
remailleur.h
Aller à la documentation de ce fichier.
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"
35 #include "mg_volume.h"
36 #include "mg_segment_frontiere.h"
37 #include <map>
38 
39 
41 {
42 public :
43 CORRESPONDANCENOEUD(class MG_NOEUD*n1,class MG_NOEUD*n2):noeudori(n1),noeudmod(n2) {};
44 
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);
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);
78 
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 
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 
108 {
109 public:
110 BLOC_MAILLE_1D(class MG_ARETE* are,int ty):arete(are),etat(REMAILLEUR::NONATTACHE),type(ty) {};
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 
121 {
122 public:
123 BLOC_MAILLE_2D(class MG_FACE* fac,int ty):face(fac),etat(REMAILLEUR::NONATTACHE),type(ty) {};
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 
134 {
135 public:
136 BLOC_MAILLE_3D(class MG_VOLUME* vol):volume(vol),etat(REMAILLEUR::NONATTACHE) {};
138 
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
BLOC_MAILLE_3D::~BLOC_MAILLE_3D
~BLOC_MAILLE_3D()
Definition: remailleur.h:137
fct_generateur_3d.h
BLOC_MAILLE_3D::volume
MG_VOLUME * volume
Definition: remailleur.h:137
REMAILLEUR::point_appartient_volume
int point_appartient_volume(double *xyz, int numvol)
Definition: remailleur.cpp:1214
MG_SEGMENT
Definition: mg_segment.h:38
REMAILLEUR::geoorigine
class MG_GEOMETRIE * geoorigine
Definition: remailleur.h:80
BLOC_MAILLE_1D::etat
int etat
Definition: remailleur.h:115
REMAILLEUR::maille
int maille(int etape)
Definition: remailleur.cpp:58
CORRESPONDANCENOEUD
Definition: remailleur.h:40
BLOC_MAILLE_1D::get_id
unsigned long get_id(void)
Definition: remailleur.h:115
BLOC_MAILLE_1D::type
int type
Definition: remailleur.h:117
REMAILLEUR::cartemod
class FCT_TAILLE * cartemod
Definition: remailleur.h:82
REMAILLEUR::inter_droite_triangle
int inter_droite_triangle(double *xyz, double *dir, MG_TRIANGLE *tri, double *t)
Definition: remailleur.cpp:1285
REMAILLEUR::nbfacemod
int nbfacemod
Definition: remailleur.h:93
MG_IDENTIFICATEUR::get_id
unsigned long get_id()
Definition: mg_identificateur.cpp:53
BLOC_MAILLE_3D::BLOC_MAILLE_3D
BLOC_MAILLE_3D(class MG_VOLUME *vol)
Definition: remailleur.h:136
CORRESPONDANCENOEUD::CORRESPONDANCENOEUD
CORRESPONDANCENOEUD(class MG_NOEUD *n1, class MG_NOEUD *n2)
Definition: remailleur.h:43
REMAILLEUR::detruit_noeud
void detruit_noeud(MG_ELEMENT_MAILLAGE *elebase, double distance, int type=0)
Definition: remailleur.cpp:731
BLOC_MAILLE_3D::etat
int etat
Definition: remailleur.h:141
MG_ELEMENT_MAILLAGE
Definition: mg_element_maillage.h:38
vct_comparaison_resultat.h
MG_TRIANGLE
Definition: mg_triangle.h:38
FCT_TAILLE
Definition: fct_taille.h:30
BLOC_MAILLE_1D::~BLOC_MAILLE_1D
~BLOC_MAILLE_1D()
Definition: remailleur.h:111
MG_VOLUME
Definition: mg_volume.h:33
MG_GESTIONNAIRE
Definition: mg_gestionnaire.h:57
MG_TETRA
Definition: mg_tetra.h:37
BLOC_MAILLE_2D
Definition: remailleur.h:120
REMAILLEUR::REMAILLEUR
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)
Definition: remailleur.cpp:39
MG_ELEMENT_TOPOLOGIQUE
Definition: mg_element_topologique.h:51
REMAILLEUR::cree_liste_frontiere
void cree_liste_frontiere(MG_MAILLAGE *mai)
Definition: remailleur.cpp:935
TPL_OCTREE_FCT< MG_NOEUD *, FCT_TAILLE >
BLOC_MAILLE_1D::BLOC_MAILLE_1D
BLOC_MAILLE_1D(class MG_ARETE *are, int ty)
Definition: remailleur.h:110
mailleur.h
CORRESPONDANCENOEUD::noeudmod
class MG_NOEUD * noeudmod
Definition: remailleur.h:46
mg_segment_frontiere.h
BLOC_MAILLE_3D
Definition: remailleur.h:133
REMAILLEUR::cree_bloc_maille
void cree_bloc_maille(std::multimap< unsigned long, MG_SEGMENT *, std::less< unsigned long > > &lst, MG_ARETE *arete)
Definition: remailleur.cpp:1004
BLOC_MAILLE_1D
Definition: remailleur.h:107
REMAILLEUR::lsttrifront
TPL_LISTE_ENTITE< MG_TRIANGLE * > * lsttrifront
Definition: remailleur.h:86
BLOC_MAILLE_2D::~BLOC_MAILLE_2D
~BLOC_MAILLE_2D()
Definition: remailleur.h:124
REMAILLEUR::trouve_segment
MG_SEGMENT * trouve_segment(std::multimap< unsigned long, MG_SEGMENT *, std::less< unsigned long > > &lst, MG_NOEUD *no)
Definition: remailleur.cpp:1175
BLOC_MAILLE_2D::get_id
unsigned long get_id(void)
Definition: remailleur.h:128
BLOC_MAILLE_2D::face
MG_FACE * face
Definition: remailleur.h:124
REMAILLEUR::maimodifie
class MG_MAILLAGE * maimodifie
Definition: remailleur.h:84
MG_NOEUD
Definition: mg_noeud.h:41
BLOC_MAILLE_2D::lst
std::vector< MG_TRIANGLE * > lst
Definition: remailleur.h:127
REMAILLEUR::get_liste_correspondance
MG_NOEUD * get_liste_correspondance(MG_NOEUD *n1)
Definition: remailleur.cpp:972
BLOC_MAILLE_3D::lst
std::vector< MG_TETRA * > lst
Definition: remailleur.h:140
tpl_octree.h
REMAILLEUR::ajouter_liste_correspondance_noeud
void ajouter_liste_correspondance_noeud(MG_NOEUD *n1, MG_NOEUD *n2)
Definition: remailleur.cpp:965
REMAILLEUR::ATTACHE
@ ATTACHE
Definition: remailleur.h:98
BLOC_MAILLE_1D::arete
MG_ARETE * arete
Definition: remailleur.h:111
BLOC_MAILLE_1D::lst
std::vector< MG_SEGMENT * > lst
Definition: remailleur.h:114
REMAILLEUR::gestmodifie
class MG_GESTIONNAIRE * gestmodifie
Definition: remailleur.h:79
REMAILLEUR::lstb3d
std::multimap< unsigned long, class BLOC_MAILLE_3D *, std::less< unsigned long > > lstb3d
Definition: remailleur.h:91
REMAILLEUR::DETRUIT
@ DETRUIT
Definition: remailleur.h:98
REMAILLEUR::TRAITE
@ TRAITE
Definition: remailleur.h:98
REMAILLEUR
Definition: remailleur.h:50
REMAILLEUR::octree
TPL_OCTREE_FCT< MG_NOEUD *, FCT_TAILLE > * octree
Definition: remailleur.h:85
BLOC_MAILLE_2D::BLOC_MAILLE_2D
BLOC_MAILLE_2D(class MG_FACE *fac, int ty)
Definition: remailleur.h:123
REMAILLEUR::gestorigine
class MG_GESTIONNAIRE * gestorigine
Definition: remailleur.h:79
REMAILLEUR::rescmp
VCT_COMPARAISON_RESULTAT & rescmp
Definition: remailleur.h:87
REMAILLEUR::lstb2d
std::multimap< unsigned long, class BLOC_MAILLE_2D *, std::less< unsigned long > > lstb2d
Definition: remailleur.h:90
REMAILLEUR::maiorigine
class MG_MAILLAGE * maiorigine
Definition: remailleur.h:83
REMAILLEUR::geomodifie
class MG_GEOMETRIE * geomodifie
Definition: remailleur.h:80
MG_GROUPE_TOPOLOGIQUE
Definition: mg_groupe_topologique.h:31
REMAILLEUR::trouve_tetra
MG_TETRA * trouve_tetra(std::multimap< unsigned long, MG_TETRA *, std::less< unsigned long > > &lst, MG_NOEUD *no)
Definition: remailleur.cpp:1201
REMAILLEUR::carteori
class FCT_TAILLE * carteori
Definition: remailleur.h:81
tpl_quadtree.h
REMAILLEUR::lstcorrnoeud
std::map< unsigned long, CORRESPONDANCENOEUD > lstcorrnoeud
Definition: remailleur.h:88
MAILLEUR
Definition: mailleur.h:33
MG_GEOMETRIE
Definition: mg_geometrie.h:84
REMAILLEUR::initialise_octree
void initialise_octree(void)
Definition: remailleur.cpp:711
MG_MAILLAGE
Definition: mg_maillage.h:62
TPL_LISTE_ENTITE< MG_TRIANGLE * >
REMAILLEUR::lstb1d
std::multimap< unsigned long, class BLOC_MAILLE_1D *, std::less< unsigned long > > lstb1d
Definition: remailleur.h:89
BLOC_MAILLE_2D::etat
int etat
Definition: remailleur.h:128
CORRESPONDANCENOEUD::noeudori
class MG_NOEUD * noeudori
Definition: remailleur.h:45
MG_ARETE
Definition: mg_arete.h:36
MG_FACE
Definition: mg_face.h:34
VCT_COMPARAISON_RESULTAT
Definition: vct_comparaison_resultat.h:55
REMAILLEUR::NONTRAITE
@ NONTRAITE
Definition: remailleur.h:98
REMAILLEUR::transfert_coord
void transfert_coord(double *xyz, double *xyz2)
Definition: remailleur.cpp:994
REMAILLEUR::CONSERVE
@ CONSERVE
Definition: remailleur.h:98
REMAILLEUR::NONATTACHE
@ NONATTACHE
Definition: remailleur.h:98
REMAILLEUR::trouve_triangle
MG_TRIANGLE * trouve_triangle(std::multimap< unsigned long, MG_TRIANGLE *, std::less< unsigned long > > &lst, MG_NOEUD *no)
Definition: remailleur.cpp:1188
REMAILLEUR::~REMAILLEUR
~REMAILLEUR()
Definition: remailleur.cpp:45
BLOC_MAILLE_2D::type
int type
Definition: remailleur.h:130
mg_volume.h
BLOC_MAILLE_3D::get_id
unsigned long get_id(void)
Definition: remailleur.h:141
REMAILLEUR::transfert_noeud
MG_NOEUD * transfert_noeud(MG_NOEUD *no, MG_ELEMENT_TOPOLOGIQUE *ele)
Definition: remailleur.cpp:982
REMAILLEUR::attache
attache
Definition: remailleur.h:98