| 1 |
francois |
283 |
//------------------------------------------------------------ |
| 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 |
|
|
// geom.h |
| 16 |
|
|
// |
| 17 |
|
|
//------------------------------------------------------------ |
| 18 |
|
|
//------------------------------------------------------------ |
| 19 |
|
|
// COPYRIGHT 2000 |
| 20 |
|
|
// Version du 02/03/2006 � 11H22 |
| 21 |
|
|
//------------------------------------------------------------ |
| 22 |
|
|
//------------------------------------------------------------ |
| 23 |
|
|
#ifndef __MAGIC_ |
| 24 |
|
|
#define __MAGIC_ |
| 25 |
|
|
|
| 26 |
|
|
|
| 27 |
|
|
|
| 28 |
|
|
|
| 29 |
|
|
#ifdef BORLANDCPP |
| 30 |
|
|
#include <set.h> |
| 31 |
|
|
#else |
| 32 |
|
|
#include <set> |
| 33 |
|
|
|
| 34 |
|
|
#endif |
| 35 |
|
|
|
| 36 |
|
|
#include <functional> |
| 37 |
|
|
|
| 38 |
|
|
const int MEME_SENS=1; |
| 39 |
|
|
const int SENS_CONTRAIRE=-1; |
| 40 |
|
|
|
| 41 |
|
|
const int OK=1; |
| 42 |
|
|
const int FAIL=0; |
| 43 |
|
|
|
| 44 |
francois |
375 |
|
| 45 |
|
|
const int MAX_TYPE_SOLUTION=9; |
| 46 |
francois |
410 |
const int MAX_ETAT=2; |
| 47 |
francois |
375 |
|
| 48 |
francois |
283 |
template <class T> |
| 49 |
|
|
struct inf : std::binary_function<T, T, bool> { |
| 50 |
|
|
bool operator() ( const T& x, const T& y) const { |
| 51 |
|
|
return x->get_id() < y->get_id(); |
| 52 |
|
|
} |
| 53 |
|
|
}; |
| 54 |
|
|
|
| 55 |
|
|
|
| 56 |
francois |
375 |
namespace MAGIC |
| 57 |
|
|
{ |
| 58 |
|
|
class ENTITE_SOLUTION |
| 59 |
|
|
{ |
| 60 |
|
|
public: |
| 61 |
francois |
767 |
enum entite_solution {ENTITE_NOEUD=1,ENTITE_ELEMENT1, ENTITE_ELEMENT2,ENTITE_ELEMENT3,ENTITE_ELEMENT1_NOEUD,ENTITE_ELEMENT2_NOEUD, ENTITE_ELEMENT3_NOEUD,ENTITE_ELEMENT1_GAUSS,ENTITE_ELEMENT2_GAUSS, ENTITE_ELEMENT3_GAUSS,ENTITE_ELEMENTND, ENTITE_ELEMENTND_NOEUD}; |
| 62 |
francois |
375 |
|
| 63 |
|
|
}; |
| 64 |
francois |
283 |
|
| 65 |
francois |
375 |
class TYPE_SOLUTION |
| 66 |
|
|
{ |
| 67 |
|
|
public: |
| 68 |
|
|
enum type_solution {SCALAIRE=1,VECTEUR=3, TENSEUR_SYM=6 ,TENSEUR=9}; |
| 69 |
|
|
|
| 70 |
|
|
}; |
| 71 |
francois |
551 |
|
| 72 |
|
|
class VERSION_CARTE_TAILLE |
| 73 |
|
|
{ |
| 74 |
|
|
public: |
| 75 |
|
|
enum version_carte_taille {ANCIENNE=0,NOUVELLE=1}; |
| 76 |
francois |
581 |
}; |
| 77 |
|
|
|
| 78 |
|
|
|
| 79 |
|
|
class CALCUL_ASTER |
| 80 |
|
|
{ |
| 81 |
|
|
public: |
| 82 |
couturad |
719 |
enum typecalcul {ELASTIQUE=0, |
| 83 |
francois |
721 |
PLASTIQUE=1, |
| 84 |
couturad |
719 |
OPTIMISATIONTOPOLOGIQUE=2, |
| 85 |
|
|
THERMIQUE=3, |
| 86 |
|
|
CONTRAINTE_PLANE=4, |
| 87 |
|
|
DEFORMATION_PLANE=5, |
| 88 |
francois |
786 |
RIGIDITE=6, |
| 89 |
|
|
RIGIDITE_CONTRAINTE_PLANE=7, |
| 90 |
|
|
RIGIDITE_DEFORMATION_PLANE=8, |
| 91 |
couturad |
719 |
ELASTIQUE_3D=100, |
| 92 |
|
|
ELASTIQUE_PLAQUE=101, |
| 93 |
|
|
ELASTIQUE_COQUE=102, |
| 94 |
|
|
THERMIQUE_3D=200, |
| 95 |
|
|
ELASTIQUE_GROT_GDEF=103, |
| 96 |
francois |
721 |
PLASTIQUE_BILINEAIRE=104, |
| 97 |
francois |
767 |
PLASTIQUE_COURBE=105, |
| 98 |
francois |
786 |
ELASTIQUE_MIXTE_1D3D=106, |
| 99 |
|
|
RIGIDITE_3D=107, |
| 100 |
|
|
RIGIDITE_PLAQUE=108, |
| 101 |
|
|
RIGIDITE_COQUE=109, |
| 102 |
|
|
RIGIDITE_MIXTE_1D3D=110 |
| 103 |
francois |
721 |
}; |
| 104 |
francois |
375 |
}; |
| 105 |
francois |
635 |
|
| 106 |
|
|
|
| 107 |
|
|
class PROJECTION |
| 108 |
|
|
{ |
| 109 |
|
|
public: |
| 110 |
|
|
enum RESULTAT {SUCCES=0,TYPE_SOLUTION_INCORRECT=1,DIMENSION_MAILLAGE_INCOMPATIBLE=2,NON_IMPLEMENTER=3}; |
| 111 |
|
|
}; |
| 112 |
francois |
686 |
|
| 113 |
|
|
|
| 114 |
|
|
|
| 115 |
|
|
class SEMANTIQUECSG |
| 116 |
|
|
{ |
| 117 |
|
|
public: |
| 118 |
francois |
731 |
enum semantiquecsg {SANS=100,UNION,SOUSTRACTION,INTERSECTION,PERCAGE,CONGE,CHAMFREIN,EXTRUSION,ERREUR=1000}; |
| 119 |
francois |
551 |
}; |
| 120 |
francois |
686 |
|
| 121 |
|
|
|
| 122 |
|
|
}; |
| 123 |
francois |
283 |
#endif |
| 124 |
|
|
|
| 125 |
|
|
|