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 
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 
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
std::vector< MG_SEGMENT * > lst
Definition: remailleur.h:114
unsigned long get_id(void)
Definition: remailleur.h:115
MG_ARETE * arete
Definition: remailleur.h:111
BLOC_MAILLE_1D(class MG_ARETE *are, int ty)
Definition: remailleur.h:110
BLOC_MAILLE_2D(class MG_FACE *fac, int ty)
Definition: remailleur.h:123
MG_FACE * face
Definition: remailleur.h:124
std::vector< MG_TRIANGLE * > lst
Definition: remailleur.h:127
unsigned long get_id(void)
Definition: remailleur.h:128
unsigned long get_id(void)
Definition: remailleur.h:141
std::vector< MG_TETRA * > lst
Definition: remailleur.h:140
BLOC_MAILLE_3D(class MG_VOLUME *vol)
Definition: remailleur.h:136
MG_VOLUME * volume
Definition: remailleur.h:137
class MG_NOEUD * noeudmod
Definition: remailleur.h:46
CORRESPONDANCENOEUD(class MG_NOEUD *n1, class MG_NOEUD *n2)
Definition: remailleur.h:43
class MG_NOEUD * noeudori
Definition: remailleur.h:45
unsigned long get_id()
MG_TRIANGLE * trouve_triangle(std::multimap< unsigned long, MG_TRIANGLE *, std::less< unsigned long > > &lst, MG_NOEUD *no)
void cree_liste_frontiere(MG_MAILLAGE *mai)
Definition: remailleur.cpp:935
class MG_GESTIONNAIRE * gestorigine
Definition: remailleur.h:79
class MG_GESTIONNAIRE * gestmodifie
Definition: remailleur.h:79
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_NOEUD * get_liste_correspondance(MG_NOEUD *n1)
Definition: remailleur.cpp:972
void initialise_octree(void)
Definition: remailleur.cpp:711
std::multimap< unsigned long, class BLOC_MAILLE_1D *, std::less< unsigned long > > lstb1d
Definition: remailleur.h:89
class FCT_TAILLE * carteori
Definition: remailleur.h:81
VCT_COMPARAISON_RESULTAT & rescmp
Definition: remailleur.h:87
TPL_OCTREE_FCT< MG_NOEUD *, FCT_TAILLE > * octree
Definition: remailleur.h:85
class MG_MAILLAGE * maimodifie
Definition: remailleur.h:84
void transfert_coord(double *xyz, double *xyz2)
Definition: remailleur.cpp:994
MG_NOEUD * transfert_noeud(MG_NOEUD *no, MG_ELEMENT_TOPOLOGIQUE *ele)
Definition: remailleur.cpp:982
void cree_bloc_maille(std::multimap< unsigned long, MG_SEGMENT *, std::less< unsigned long > > &lst, MG_ARETE *arete)
MG_TETRA * trouve_tetra(std::multimap< unsigned long, MG_TETRA *, std::less< unsigned long > > &lst, MG_NOEUD *no)
void ajouter_liste_correspondance_noeud(MG_NOEUD *n1, MG_NOEUD *n2)
Definition: remailleur.cpp:965
int point_appartient_volume(double *xyz, int numvol)
TPL_LISTE_ENTITE< MG_TRIANGLE * > * lsttrifront
Definition: remailleur.h:86
int nbfacemod
Definition: remailleur.h:93
class MG_GEOMETRIE * geoorigine
Definition: remailleur.h:80
MG_SEGMENT * trouve_segment(std::multimap< unsigned long, MG_SEGMENT *, std::less< unsigned long > > &lst, MG_NOEUD *no)
std::multimap< unsigned long, class BLOC_MAILLE_3D *, std::less< unsigned long > > lstb3d
Definition: remailleur.h:91
class FCT_TAILLE * cartemod
Definition: remailleur.h:82
std::map< unsigned long, CORRESPONDANCENOEUD > lstcorrnoeud
Definition: remailleur.h:88
void detruit_noeud(MG_ELEMENT_MAILLAGE *elebase, double distance, int type=0)
Definition: remailleur.cpp:731
int maille(int etape)
Definition: remailleur.cpp:58
int inter_droite_triangle(double *xyz, double *dir, MG_TRIANGLE *tri, double *t)
class MG_GEOMETRIE * geomodifie
Definition: remailleur.h:80
class MG_MAILLAGE * maiorigine
Definition: remailleur.h:83
std::multimap< unsigned long, class BLOC_MAILLE_2D *, std::less< unsigned long > > lstb2d
Definition: remailleur.h:90