ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/mailleur/src/remailleur.h
Revision: 966
Committed: Thu Sep 6 16:46:34 2018 UTC (6 years, 8 months ago) by couturad
Content type: text/plain
Original Path: magic/lib/mailleur_auto/src/remailleur.h
File size: 4916 byte(s)
Log Message:
Ajout de l'histogramme a MAGIC_PLOT
Ajout d'une sortie OK ou FAIL (int) au MAILLEUR afin de gerer certaines exceptions
Ajout d'une phase RSA a la fin du generateur DCR

File Contents

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