1 |
couturad |
907 |
//------------------------------------------------------------ |
2 |
|
|
//------------------------------------------------------------ |
3 |
|
|
// MAGiC |
4 |
|
|
// Jean Christophe Cuilli�re et Vincent FRANCOIS |
5 |
|
|
// D�partement de G�nie M�canique - UQTR |
6 |
|
|
//------------------------------------------------------------ |
7 |
|
|
// Le projet MAGIC est un projet de recherche du d�partement |
8 |
|
|
// de g�nie m�canique de l'Universit� du Qu�bec � |
9 |
|
|
// Trois Rivi�res |
10 |
|
|
// Les librairies ne peuvent �tre utilis�es sans l'accord |
11 |
|
|
// des auteurs (contact : francois@uqtr.ca) |
12 |
|
|
//------------------------------------------------------------ |
13 |
|
|
//------------------------------------------------------------ |
14 |
|
|
// |
15 |
|
|
// mg_element_geometrique.h |
16 |
|
|
// |
17 |
|
|
//------------------------------------------------------------ |
18 |
|
|
//------------------------------------------------------------ |
19 |
|
|
// COPYRIGHT 2000 |
20 |
|
|
// Version du 02/03/2006 � 11H22 |
21 |
|
|
//------------------------------------------------------------ |
22 |
|
|
//------------------------------------------------------------ |
23 |
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
#ifndef _OT_GEOMETRIE_ |
27 |
|
|
#define _OT_GEOMETRIE_ |
28 |
|
|
|
29 |
|
|
#ifdef WINDOWS_VERSION |
30 |
|
|
#ifdef BUILT_DLL_GEOMETRIE |
31 |
|
|
#define DLLPORTGEOMETRIE __declspec(dllexport) |
32 |
|
|
#else |
33 |
|
|
#define DLLPORTGEOMETRIE __declspec(dllimport) |
34 |
|
|
#endif |
35 |
|
|
#else |
36 |
|
|
#define DLLPORTGEOMETRIE |
37 |
|
|
#endif |
38 |
|
|
|
39 |
|
|
#include <vector> |
40 |
|
|
|
41 |
|
|
#include "mg_point.h" |
42 |
|
|
#include "mg_sommet.h" |
43 |
|
|
#include "mg_arete.h" |
44 |
|
|
#include "mg_face.h" |
45 |
|
|
#include "mg_volume.h" |
46 |
|
|
|
47 |
|
|
#ifdef ALL_OCC |
48 |
|
|
#include "occ_point.h" |
49 |
|
|
#include "occ_courbe.h" |
50 |
|
|
#include "occ_surface.h" |
51 |
|
|
#include "occ_sommet.h" |
52 |
|
|
#include "occ_arete.h" |
53 |
|
|
#include "occ_boucle.h" |
54 |
|
|
#include "occ_face.h" |
55 |
|
|
#include "occ_coquille.h" |
56 |
|
|
#include "occ_volume.h" |
57 |
|
|
//#include "occ_volume.h" |
58 |
|
|
#endif |
59 |
|
|
|
60 |
|
|
class DLLPORTGEOMETRIE OT_GEOMETRIE |
61 |
|
|
{ |
62 |
|
|
public: |
63 |
|
|
OT_GEOMETRIE(); |
64 |
|
|
~OT_GEOMETRIE(); |
65 |
couturad |
934 |
|
66 |
|
|
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); |
67 |
couturad |
907 |
static int projection_orthogonale_sur_mg_arete(double *xyz,MG_ARETE* mgarete,double &t); |
68 |
|
|
static int projection_orthogonale_sur_mg_face(double *xyz,MG_FACE* mgface,double* xyz2); |
69 |
couturad |
911 |
static int projection_au_plus_pres_sur_mg_face(double *xyz1,MG_FACE* mgface1,MG_FACE* mgface2,double* xyz2); |
70 |
|
|
static int projection_au_plus_pres_sur_mg_arete(double *xyz,MG_ARETE* mgarete,double* xyz2); |
71 |
couturad |
907 |
static void get_param_face(MG_FACE* mgface,double &umin,double &umax,double &vmin,double &vmax); |
72 |
|
|
|
73 |
|
|
static int get_distance_min_mg_volume_mg_volume(MG_VOLUME* mgvolume1,MG_VOLUME* mgvolume2,double &distance); |
74 |
|
|
static int get_distance_min_mg_face_mg_volume(MG_FACE* mgface,MG_VOLUME* mgvolume,double &distance); |
75 |
couturad |
911 |
static int get_distance_min_mg_face_mg_face(MG_FACE* mgface1,MG_FACE* mgface2,double &distance); |
76 |
|
|
static int get_distance_min_liste_mg_face_mg_volume(TPL_MAP_ENTITE<MG_FACE*> &map_face,MG_VOLUME* mgvolume,double &distance); |
77 |
|
|
static int get_distance_min_mg_arete_mg_arete(MG_ARETE* mgarete1,MG_ARETE* mgarete2,double &distance); |
78 |
couturad |
907 |
|
79 |
couturad |
911 |
static double get_volume_intersection(MG_VOLUME* mgvolume1,MG_VOLUME* mgvolume2); |
80 |
couturad |
919 |
static double get_volume(MG_VOLUME* mgvolume,double eps=0.001); |
81 |
couturad |
911 |
static double get_longueur(MG_ARETE* mgarete); |
82 |
couturad |
919 |
static double get_aire(MG_FACE* mgface,double eps=0.001); |
83 |
couturad |
911 |
|
84 |
couturad |
907 |
static void get_map_mg_sommet_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo,TPL_MAP_ENTITE<MG_SOMMET*> &map_sommet); |
85 |
|
|
static void get_map_mg_arete_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo,TPL_MAP_ENTITE<MG_ARETE*> &map_arete); |
86 |
|
|
static void get_map_mg_face_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo,TPL_MAP_ENTITE<MG_FACE*> &map_face); |
87 |
|
|
|
88 |
|
|
static void get_map_mg_point_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo,TPL_MAP_ENTITE<MG_POINT*> &map_point); |
89 |
|
|
static void get_map_mg_courbe_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo,TPL_MAP_ENTITE<MG_COURBE*> &map_courbe); |
90 |
|
|
static void get_map_mg_surface_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo,TPL_MAP_ENTITE<MG_SURFACE*> &map_surface); |
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 |