1 |
francois |
1158 |
//####//------------------------------------------------------------ |
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 |
|
|
//####// mstruct_generateur.h |
15 |
|
|
//####// |
16 |
|
|
//####//------------------------------------------------------------ |
17 |
|
|
//####//------------------------------------------------------------ |
18 |
|
|
//####// COPYRIGHT 2000-2024 |
19 |
|
|
//####// jeu 13 jun 2024 11:58:57 EDT |
20 |
|
|
//####//------------------------------------------------------------ |
21 |
|
|
//####//------------------------------------------------------------ |
22 |
couturad |
919 |
#ifndef _MSTRUCT_GENERATEUR_ |
23 |
|
|
#define _MSTRUCT_GENERATEUR_ |
24 |
|
|
class MG_GESTIONNAIRE; |
25 |
|
|
class MG_CG_MODELE; |
26 |
|
|
#include "mstruct_ves.h" |
27 |
couturad |
951 |
#include "tpl_grille.h" |
28 |
|
|
#include "mg_cg_groupe_forme.h" |
29 |
|
|
#include "mg_cg_forme_volume.h" |
30 |
|
|
#include "mg_cg_forme_volume_boite.h" |
31 |
couturad |
919 |
|
32 |
couturad |
951 |
|
33 |
|
|
typedef void fonction_affiche(char *); |
34 |
|
|
class MSTRUCT_GENERATEUR |
35 |
couturad |
919 |
{ |
36 |
couturad |
951 |
public: |
37 |
couturad |
968 |
|
38 |
couturad |
951 |
MSTRUCT_GENERATEUR(MG_GESTIONNAIRE* mg_gestionnaire,char* nom_mgcg_modele); |
39 |
couturad |
966 |
MSTRUCT_GENERATEUR(MSTRUCT_GENERATEUR &mcpy); |
40 |
couturad |
951 |
~MSTRUCT_GENERATEUR(void); |
41 |
|
|
virtual MG_GESTIONNAIRE* get_mg_gestionnaire(void); |
42 |
|
|
virtual MG_CG_MODELE* get_mgcg_modele(void); |
43 |
|
|
virtual void change_mgcg_modele(MG_CG_MODELE* mgcg_modele); |
44 |
|
|
virtual int construire(MSTRUCT_VES* ves)=0; |
45 |
couturad |
971 |
virtual int get_type(void)=0; |
46 |
couturad |
951 |
void change_boite3d_ves(BOITE_3D boite3d_ves); |
47 |
|
|
void change_boite3d_distribution(BOITE_3D boite3d_distribution); |
48 |
|
|
void change_intersection_bords_ves(bool intersection_bords_ves); |
49 |
|
|
void change_angle_min(double angle_min); |
50 |
|
|
void change_longueur_min(double longueur_min); |
51 |
|
|
void change_aire_min(double aire_min); |
52 |
|
|
void change_volume_min(double volume_min); |
53 |
|
|
void change_distance_inter_volume_min(double distance_min); |
54 |
|
|
void change_nb_pas_grille(int nb_pas_grille); |
55 |
|
|
void change_nb_pas_echantillonage(int nb_pas_echantillonnage); |
56 |
|
|
void change_precision(double precision); |
57 |
couturad |
966 |
double get_fraction_volumique_groupe_forme(std::string nom); |
58 |
couturad |
951 |
void active_affichage(fonction_affiche *fonc); |
59 |
|
|
void affiche(char *message); |
60 |
|
|
protected: |
61 |
|
|
|
62 |
|
|
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); |
63 |
|
|
bool angle_entre_face_acceptable(MG_ARETE* mgarete); |
64 |
|
|
bool longueur_acceptable(MG_ARETE* mgarete); |
65 |
|
|
bool aire_acceptable(MG_FACE* mgface); |
66 |
|
|
bool volume_acceptable(MG_VOLUME* mgvolume); |
67 |
|
|
bool volume_intersection_ves_acceptable(MG_VOLUME* mgvolume); |
68 |
|
|
bool distance_acceptable_bord_ves(MG_VOLUME* mgvolume); |
69 |
|
|
bool configuration_acceptable(MG_CG_FORME_VOLUME* forme_volume_inclusion,MG_CG_FORME* forme_matrice=NULL); |
70 |
|
|
bool positionnement_acceptable(MG_VOLUME* inclusion); |
71 |
|
|
bool insertion_inclusion(MG_CG_FORME* forme_inclusion, |
72 |
|
|
double fraction_volumique_cible, |
73 |
|
|
double eps_fra_vol, |
74 |
|
|
double &fraction_volumique_actuelle, |
75 |
|
|
std::vector<MG_CG_FORME*> &vector_inclusion_genere, |
76 |
|
|
int &position_relative, |
77 |
|
|
std::vector<double> *vector_epaisseur_couche=NULL, |
78 |
|
|
bool porosite=false); |
79 |
|
|
bool insertion_inclusion(MG_CG_FORME* forme_inclusion, |
80 |
|
|
double &fraction_volumique_actuelle, |
81 |
|
|
std::vector<MG_CG_FORME*> &vector_inclusion_genere, |
82 |
|
|
int &position_relative); |
83 |
|
|
void echec_insertion_inclusion(std::vector<MG_CG_FORME*> &vector_forme,std::vector<MG_CG_OPERATEUR*> &vector_operateur); |
84 |
|
|
int faces_correspondantes(MG_VOLUME* volume1, MG_VOLUME* volume2,double decallage,int nb_pas=32,double precision=1.0e-06); |
85 |
|
|
bool lien_topologique_entre(MG_ELEMENT_TOPOLOGIQUE* mg_ele_topo1,MG_ELEMENT_TOPOLOGIQUE* mg_ele_topo2); |
86 |
|
|
int configurer_volume_mince(MG_CG_FORME* forme,double epaisseur); |
87 |
|
|
int configurer_volume_mince(MG_VOLUME* volume,double epaisseur); |
88 |
|
|
void cree_vector_groupe_forme(std::string nom,std::vector<MG_CG_GROUPE_FORME*> &vector_groupe_forme,std::vector<double> *vector_epaisseur_couches=NULL); |
89 |
|
|
|
90 |
|
|
MG_GESTIONNAIRE* m_mg_gestionnaire; |
91 |
|
|
MG_CG_MODELE* m_mgcg_modele; |
92 |
|
|
BOITE_3D m_boite3d_ves; |
93 |
|
|
BOITE_3D m_boite3d_distribution; |
94 |
|
|
bool m_intersection_bords_ves; |
95 |
|
|
double m_angle_min; |
96 |
|
|
double m_longueur_min; |
97 |
|
|
double m_aire_min; |
98 |
|
|
double m_volume_min; |
99 |
|
|
double m_distance_min; |
100 |
|
|
int m_nb_pas_grille; |
101 |
|
|
int m_nb_pas_echantillonnage; |
102 |
|
|
double m_precision; |
103 |
|
|
bool m_grille_init; |
104 |
|
|
void initialiser_grille(void); |
105 |
|
|
TPL_GRILLE<MG_VOLUME*> m_grille_volume_inclusion; |
106 |
|
|
std::vector<MG_CG_GROUPE_FORME*> m_vector_mgcg_groupe_forme_inclusion; |
107 |
|
|
MG_CG_FORME* m_matrice; |
108 |
|
|
MG_CG_FORME* m_cube_initial; |
109 |
|
|
double m_nb_pas_x; |
110 |
|
|
double m_nb_pas_y; |
111 |
|
|
double m_nb_pas_z; |
112 |
|
|
|
113 |
|
|
int affichageactif; |
114 |
|
|
fonction_affiche *fonc_affiche; |
115 |
|
|
}; |
116 |
|
|
|
117 |
|
|
|
118 |
couturad |
966 |
#endif |