1 |
couturad |
919 |
#ifndef _MSTRUCT_GENERATEUR_ |
2 |
|
|
#define _MSTRUCT_GENERATEUR_ |
3 |
|
|
class MG_GESTIONNAIRE; |
4 |
|
|
class MG_CG_MODELE; |
5 |
|
|
#include "mstruct_ves.h" |
6 |
couturad |
951 |
#include "tpl_grille.h" |
7 |
|
|
#include "mg_cg_groupe_forme.h" |
8 |
|
|
#include "mg_cg_forme_volume.h" |
9 |
|
|
#include "mg_cg_forme_volume_boite.h" |
10 |
couturad |
919 |
|
11 |
couturad |
951 |
|
12 |
|
|
typedef void fonction_affiche(char *); |
13 |
|
|
class MSTRUCT_GENERATEUR |
14 |
couturad |
919 |
{ |
15 |
couturad |
951 |
public: |
16 |
|
|
enum TYPE_GENERATEUR{RSA=0,DCR=1}; |
17 |
|
|
enum TYPE_DISTRIBUTION{FIXE=0,UNIFORME=1,NORMALE=2}; |
18 |
|
|
enum TYPE_INCLUSION{SPHERE=0,CYLINDRE=1,ELLIPSOIDE=2,BOITE=3}; |
19 |
|
|
MSTRUCT_GENERATEUR(MG_GESTIONNAIRE* mg_gestionnaire,char* nom_mgcg_modele); |
20 |
couturad |
966 |
MSTRUCT_GENERATEUR(MSTRUCT_GENERATEUR &mcpy); |
21 |
couturad |
951 |
~MSTRUCT_GENERATEUR(void); |
22 |
|
|
virtual MG_GESTIONNAIRE* get_mg_gestionnaire(void); |
23 |
|
|
virtual MG_CG_MODELE* get_mgcg_modele(void); |
24 |
|
|
virtual void change_mgcg_modele(MG_CG_MODELE* mgcg_modele); |
25 |
|
|
virtual int construire(MSTRUCT_VES* ves)=0; |
26 |
|
|
void change_boite3d_ves(BOITE_3D boite3d_ves); |
27 |
|
|
void change_boite3d_distribution(BOITE_3D boite3d_distribution); |
28 |
|
|
void change_intersection_bords_ves(bool intersection_bords_ves); |
29 |
|
|
void change_angle_min(double angle_min); |
30 |
|
|
void change_longueur_min(double longueur_min); |
31 |
|
|
void change_aire_min(double aire_min); |
32 |
|
|
void change_volume_min(double volume_min); |
33 |
|
|
void change_distance_inter_volume_min(double distance_min); |
34 |
|
|
void change_nb_pas_grille(int nb_pas_grille); |
35 |
|
|
void change_nb_pas_echantillonage(int nb_pas_echantillonnage); |
36 |
|
|
void change_precision(double precision); |
37 |
couturad |
966 |
double get_fraction_volumique_groupe_forme(std::string nom); |
38 |
couturad |
951 |
void active_affichage(fonction_affiche *fonc); |
39 |
|
|
void affiche(char *message); |
40 |
|
|
protected: |
41 |
|
|
|
42 |
|
|
int position_relative_inclusion_ves(MG_VOLUME* inclusion,bool &plan_x0yz,bool &plan_x1yz,bool &plan_xy0z,bool &plan_xy1z,bool &plan_xyz0,bool &plan_xyz1); |
43 |
|
|
bool angle_entre_face_acceptable(MG_ARETE* mgarete); |
44 |
|
|
bool longueur_acceptable(MG_ARETE* mgarete); |
45 |
|
|
bool aire_acceptable(MG_FACE* mgface); |
46 |
|
|
bool volume_acceptable(MG_VOLUME* mgvolume); |
47 |
|
|
bool volume_intersection_ves_acceptable(MG_VOLUME* mgvolume); |
48 |
|
|
bool distance_acceptable_bord_ves(MG_VOLUME* mgvolume); |
49 |
|
|
bool configuration_acceptable(MG_CG_FORME_VOLUME* forme_volume_inclusion,MG_CG_FORME* forme_matrice=NULL); |
50 |
|
|
bool positionnement_acceptable(MG_VOLUME* inclusion); |
51 |
|
|
bool insertion_inclusion(MG_CG_FORME* forme_inclusion, |
52 |
|
|
double fraction_volumique_cible, |
53 |
|
|
double eps_fra_vol, |
54 |
|
|
double &fraction_volumique_actuelle, |
55 |
|
|
std::vector<MG_CG_FORME*> &vector_inclusion_genere, |
56 |
|
|
int &position_relative, |
57 |
|
|
std::vector<double> *vector_epaisseur_couche=NULL, |
58 |
|
|
bool porosite=false); |
59 |
|
|
bool insertion_inclusion(MG_CG_FORME* forme_inclusion, |
60 |
|
|
double &fraction_volumique_actuelle, |
61 |
|
|
std::vector<MG_CG_FORME*> &vector_inclusion_genere, |
62 |
|
|
int &position_relative); |
63 |
|
|
void echec_insertion_inclusion(std::vector<MG_CG_FORME*> &vector_forme,std::vector<MG_CG_OPERATEUR*> &vector_operateur); |
64 |
|
|
int faces_correspondantes(MG_VOLUME* volume1, MG_VOLUME* volume2,double decallage,int nb_pas=32,double precision=1.0e-06); |
65 |
|
|
bool lien_topologique_entre(MG_ELEMENT_TOPOLOGIQUE* mg_ele_topo1,MG_ELEMENT_TOPOLOGIQUE* mg_ele_topo2); |
66 |
|
|
int configurer_volume_mince(MG_CG_FORME* forme,double epaisseur); |
67 |
|
|
int configurer_volume_mince(MG_VOLUME* volume,double epaisseur); |
68 |
|
|
void cree_vector_groupe_forme(std::string nom,std::vector<MG_CG_GROUPE_FORME*> &vector_groupe_forme,std::vector<double> *vector_epaisseur_couches=NULL); |
69 |
couturad |
919 |
|
70 |
couturad |
951 |
|
71 |
|
|
enum POSITION_RELATIVE{INTERIEUR=0,EXTERIEUR=1,AU_BORD=2}; |
72 |
|
|
MG_GESTIONNAIRE* m_mg_gestionnaire; |
73 |
|
|
MG_CG_MODELE* m_mgcg_modele; |
74 |
|
|
BOITE_3D m_boite3d_ves; |
75 |
|
|
BOITE_3D m_boite3d_distribution; |
76 |
|
|
bool m_intersection_bords_ves; |
77 |
|
|
double m_angle_min; |
78 |
|
|
double m_longueur_min; |
79 |
|
|
double m_aire_min; |
80 |
|
|
double m_volume_min; |
81 |
|
|
double m_distance_min; |
82 |
|
|
int m_nb_pas_grille; |
83 |
|
|
int m_nb_pas_echantillonnage; |
84 |
|
|
double m_precision; |
85 |
|
|
bool m_grille_init; |
86 |
|
|
void initialiser_grille(void); |
87 |
|
|
TPL_GRILLE<MG_VOLUME*> m_grille_volume_inclusion; |
88 |
|
|
std::vector<MG_CG_GROUPE_FORME*> m_vector_mgcg_groupe_forme_inclusion; |
89 |
|
|
MG_CG_FORME* m_matrice; |
90 |
|
|
MG_CG_FORME* m_cube_initial; |
91 |
|
|
TPL_GRILLE<MG_VOLUME*> m_grille_volume_porosite; |
92 |
|
|
double m_nb_pas_x; |
93 |
|
|
double m_nb_pas_y; |
94 |
|
|
double m_nb_pas_z; |
95 |
|
|
|
96 |
|
|
int affichageactif; |
97 |
|
|
fonction_affiche *fonc_affiche; |
98 |
|
|
}; |
99 |
|
|
|
100 |
|
|
|
101 |
couturad |
966 |
#endif |