MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
ot_geometrie.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 //####// ot_geometrie.h
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:54 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 
23 
24 
25 #ifndef _OT_GEOMETRIE_
26 #define _OT_GEOMETRIE_
27 
28 
29 
30 #include <vector>
31 
32 #include "mg_point.h"
33 #include "mg_sommet.h"
34 #include "mg_arete.h"
35 #include "mg_face.h"
36 #include "mg_volume.h"
37 
38 #ifdef ALL_OCC
39 #include "occ_point.h"
40 #include "occ_courbe.h"
41 #include "occ_surface.h"
42 #include "occ_sommet.h"
43 #include "occ_arete.h"
44 #include "occ_boucle.h"
45 #include "occ_face.h"
46 #include "occ_coquille.h"
47 #include "occ_volume.h"
48 #endif
49 
51 {
52 public:
53  OT_GEOMETRIE();
54  ~OT_GEOMETRIE();
56 
57  static BOITE_3D get_boite_3D(MG_VOLUME* mgvolume);
58  static int get_lien_topologique(MG_ELEMENT_TOPOLOGIQUE *mgeletopo1,MG_ELEMENT_TOPOLOGIQUE *mgeletopo2);
59 
60  static int declage_mg_face_mg_face(MG_FACE* mgface1,MG_FACE* mgface2,double &moyenne_distance,double &ecart_type_distance,int nb_pas=32,double eps=0.000001);
61  static int projection_orthogonale_sur_mg_arete(double *xyz,MG_ARETE* mgarete,double &t);
62  static int projection_orthogonale_sur_mg_face(double *xyz,MG_FACE* mgface,double* xyz2);
63  static int projection_au_plus_pres_sur_mg_face(double *xyz1,MG_FACE* mgface1,MG_FACE* mgface2,double* xyz2);
64  static int projection_au_plus_pres_sur_mg_arete(double *xyz,MG_ARETE* mgarete,double* xyz2);
65  static void get_param_face(MG_FACE* mgface,double &umin,double &umax,double &vmin,double &vmax);
66 
67  static int get_distance_min_mg_eletopo_mg_eletopo(MG_ELEMENT_TOPOLOGIQUE *mgeletopo1,MG_ELEMENT_TOPOLOGIQUE *mgeletopo2,double &distance);
68  static int get_distance_min_mg_volume_mg_volume(MG_VOLUME* mgvolume1,MG_VOLUME* mgvolume2,double &distance);
69  static int get_distance_min_mg_face_mg_volume(MG_FACE* mgface,MG_VOLUME* mgvolume,double &distance);
70  static int get_distance_min_mg_face_mg_face(MG_FACE* mgface1,MG_FACE* mgface2,double &distance);
71  static int get_distance_min_mg_face_mg_face_echantillonnage(MG_FACE* mgface1,MG_FACE* mgface2,double &distance,int nb_pas=32);
72  static int get_distance_min_liste_mg_face_mg_volume(TPL_MAP_ENTITE<MG_FACE*> &map_face,MG_VOLUME* mgvolume,double &distance);
73  static int get_distance_min_mg_arete_mg_arete(MG_ARETE* mgarete1,MG_ARETE* mgarete2,double &distance);
74 
75  static double get_volume_intersection(MG_VOLUME* mgvolume1,MG_VOLUME* mgvolume2,double eps=0.001);
76  static double get_volume(MG_VOLUME* mgvolume,double eps=0.001);
77  static double get_longueur(MG_ARETE* mgarete);
78  static double get_aire(MG_FACE* mgface,double eps=0.001);
79  static void get_propriete_massique(std::vector<MG_VOLUME*> &vector_volume,double* centre_masse,double* Ixyz, double* I,double eps=0.00001);
80 
81  static int est_dans_mg_face(double *xyz,MG_FACE* mgface);
82  static int est_dans_mg_volume(double *xyz,MG_VOLUME* mgvolume);
87 
91 
92  static void get_map_mg_element_sous_jacent(MG_SOMMET* sommet,
93  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
94  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
95  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
96  static void get_map_mg_element_sous_jacent(MG_COSOMMET* cosommet,
97  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
98  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
99  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
100  static void get_map_mg_element_sous_jacent(MG_ARETE* arete,
101  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
102  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
103  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
104  static void get_map_mg_element_sous_jacent(MG_COARETE* coarete,
105  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
106  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
107  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
108  static void get_map_mg_element_sous_jacent(MG_BOUCLE* boucle,
109  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
110  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
111  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
112  static void get_map_mg_element_sous_jacent(MG_POUTRE* poutre,
113  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
114  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
115  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
116  static void get_map_mg_element_sous_jacent(MG_FACE* face,
117  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
118  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
119  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
120  static void get_map_mg_element_sous_jacent(MG_COFACE* coface,
121  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
122  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
123  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
124  static void get_map_mg_element_sous_jacent(MG_COQUILLE* coquille,
125  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
126  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
127  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
128  static void get_map_mg_element_sous_jacent(MG_VOLUME* volume,
129  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
130  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
131  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
132  static void get_map_mg_element_sous_jacent(MG_COQUE* coque,
133  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
134  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
135  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
136  static void get_map_mg_element_sous_jacent(MG_ELEMENT_TOPOLOGIQUE* mg_element_topologique,
137  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
138  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
139  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
140  static void get_map_mg_element_sous_jacent(MG_ELEMENT_COTOPOLOGIQUE* mg_element_cotopologique,
141  TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *map_mg_element_topologique,
142  TPL_MAP_ENTITE<MG_ELEMENT_COTOPOLOGIQUE*> *map_mg_element_cotopologique,
143  TPL_MAP_ENTITE<MG_ELEMENT_GEOMETRIQUE*> *map_mg_element_geometrique);
144 
145 
146 private:
147 };
148 
149 #endif
static int get_distance_min_mg_arete_mg_arete(MG_ARETE *mgarete1, MG_ARETE *mgarete2, double &distance)
static int get_distance_min_liste_mg_face_mg_volume(TPL_MAP_ENTITE< MG_FACE * > &map_face, MG_VOLUME *mgvolume, double &distance)
static void get_param_face(MG_FACE *mgface, double &umin, double &umax, double &vmin, double &vmax)
static int get_distance_min_mg_eletopo_mg_eletopo(MG_ELEMENT_TOPOLOGIQUE *mgeletopo1, MG_ELEMENT_TOPOLOGIQUE *mgeletopo2, double &distance)
static void get_map_mg_surface_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo, TPL_MAP_ENTITE< MG_SURFACE * > &map_surface)
static double get_aire(MG_FACE *mgface, double eps=0.001)
static int get_lien_topologique(MG_ELEMENT_TOPOLOGIQUE *mgeletopo1, MG_ELEMENT_TOPOLOGIQUE *mgeletopo2)
static int est_dans_mg_face(double *xyz, MG_FACE *mgface)
static void get_map_mg_face_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo, TPL_MAP_ENTITE< MG_FACE * > &map_face)
static void get_map_mg_arete_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo, TPL_MAP_ENTITE< MG_ARETE * > &map_arete)
static int projection_au_plus_pres_sur_mg_face(double *xyz1, MG_FACE *mgface1, MG_FACE *mgface2, double *xyz2)
static void get_map_mg_point_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo, TPL_MAP_ENTITE< MG_POINT * > &map_point)
static int get_distance_min_mg_face_mg_face(MG_FACE *mgface1, MG_FACE *mgface2, double &distance)
static void get_map_mg_courbe_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo, TPL_MAP_ENTITE< MG_COURBE * > &map_courbe)
static int get_distance_min_mg_volume_mg_volume(MG_VOLUME *mgvolume1, MG_VOLUME *mgvolume2, double &distance)
static void get_map_mg_ele_topo_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo, TPL_MAP_ENTITE< MG_SOMMET * > &map_sommet, TPL_MAP_ENTITE< MG_ARETE * > &map_arete, TPL_MAP_ENTITE< MG_FACE * > &map_face)
static int projection_orthogonale_sur_mg_face(double *xyz, MG_FACE *mgface, double *xyz2)
static void get_map_mg_sommet_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo, TPL_MAP_ENTITE< MG_SOMMET * > &map_sommet)
static void get_map_mg_element_sous_jacent(MG_SOMMET *sommet, TPL_MAP_ENTITE< MG_ELEMENT_TOPOLOGIQUE * > *map_mg_element_topologique, TPL_MAP_ENTITE< MG_ELEMENT_COTOPOLOGIQUE * > *map_mg_element_cotopologique, TPL_MAP_ENTITE< MG_ELEMENT_GEOMETRIQUE * > *map_mg_element_geometrique)
static int get_distance_min_mg_face_mg_face_echantillonnage(MG_FACE *mgface1, MG_FACE *mgface2, double &distance, int nb_pas=32)
static void get_propriete_massique(std::vector< MG_VOLUME * > &vector_volume, double *centre_masse, double *Ixyz, double *I, double eps=0.00001)
static double get_volume(MG_VOLUME *mgvolume, double eps=0.001)
static int est_dans_mg_volume(double *xyz, MG_VOLUME *mgvolume)
static BOITE_3D get_boite_3D(MG_VOLUME *mgvolume)
static int projection_au_plus_pres_sur_mg_arete(double *xyz, MG_ARETE *mgarete, double *xyz2)
static int projection_orthogonale_sur_mg_arete(double *xyz, MG_ARETE *mgarete, double &t)
static int get_distance_min_mg_face_mg_volume(MG_FACE *mgface, MG_VOLUME *mgvolume, double &distance)
static double get_volume_intersection(MG_VOLUME *mgvolume1, MG_VOLUME *mgvolume2, double eps=0.001)
static int declage_mg_face_mg_face(MG_FACE *mgface1, MG_FACE *mgface2, double &moyenne_distance, double &ecart_type_distance, int nb_pas=32, double eps=0.000001)
static double get_longueur(MG_ARETE *mgarete)