MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
CAD4FE_Geometric_Tools.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 //####// CAD4FE_Geometric_Tools.h
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:56 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 
23 #ifndef CAD4FE_geometric_toolsH
24 #define CAD4FE_geometric_toolsH
25 
26 #include "CAD4FE_Common_platform.h"
27 #include "ot_mathematique.h"
28 #include "ot_decalage_parametre.h"
29 
30 #include <set>
31 
32 class MG_FACE;
33 class MG_ARETE;
34 class MG_SOMMET;
36 class MG_NOEUD;
37 
38 
39 namespace CAD4FE {
40 
41 class MCFace;
42 class PolySurface;
43 class MCNode;
44 class MCEdge;
45 class MCVertex;
46 
48 public:
49  static bool GetInteriorDirection(MG_FACE * __face, MCNode* __n, double __result[3]);
50  static void Surface_MoveParamInDomain(MG_FACE * __face, double * __uv, double *__xyz);
51  static OT_MATRICE_3D TangentPlaneFrame(MG_FACE * __sigma, double uv[2]);
53  static bool GetIntersectingPlaneDirection(MG_FACE * __face, double __uv[2], double __planeNormal[3], double __directionUV[2]);
54  static int Intr3D_Surface_Plane_Get_LocalTangentPlane_Direction(MG_FACE * __sigma, double __N1[3], double __P1[3], double __uv[2], OT_MATRICE_3D & __tangentPlaneFrame, OT_VECTEUR_3D & __intrLineDirWorld);
55  static OT_MATRICE_3D GetPlaneFrame(OT_VECTEUR_3D & __planeNormal);
56  static double AngleInPlane(double *__axisX, double *__direction);
57  static double FacePointCorrection(MG_FACE * __face, double __xyz[3], double __uv1[2]);
58  static bool MG_FACE_Contains_MG_SOMMET(MG_FACE * __face, MG_SOMMET * v);
59  static bool MG_FACE_Contains_MG_ARETE(MG_FACE * __face, MG_ARETE * e);
60  static bool MG_ARETE_Contains_MG_SOMMET(MG_ARETE * __edge, MG_SOMMET * __vertex);
61  static double Segment2dCurvilinearLength(MG_FACE * __face, double __uv1[2], double __uv2[2], unsigned __nbNubdivisions);
62  static double Vector_UV_To_3D_Plane(MG_FACE *__face, double *__planeNormal, double * __planeRootPoint, double * __uv1, double * __uv12);
63  static double MoveParamInPlane(MG_FACE * __face, double __planeNormal[3], double __planeRootPoint[3], double deltamax3D, int nbPointToPlaneResidueCorrection, double __uv[2], double __xyz[3]);
64  static double ComputeDiedralAngle(MG_NOEUD * __tri[2][3]);
65  static bool PolySurface_Contains_RefVertex(PolySurface * __polysurface, MG_SOMMET * __refVertex);
66  static void MG_SOMMET_GetAdjacent_MG_FACE(MG_SOMMET * __refVertex, std::set<MG_FACE*> & __adjacentfaces);
67  static bool IsInteriorDir(MG_FACE * __face, MG_ARETE * __edge, double __t, double __direction[3]);
68  static bool MCFace_MCEdgeDir_IsInterior(MCFace * __mcFace, MCEdge * __mcEdge, double __s, double __direction[3]);
69  static bool MCFace_MCVertexDir_IsInterior(MCFace * __mcFace, MCVertex * __mcVertex, double __direction[3]);
70  static bool IsInteriorDir(MG_FACE * __face, MG_SOMMET * __vertex, double __direction[3]);
71  static bool MCFace_MCTopoDir_IsInterior(MCFace * __mcFace, MG_ELEMENT_TOPOLOGIQUE * __mcTopo, double __xyz[3], double __direction[3]);
72  static int MG_TOPO_GetColor(MG_ELEMENT_TOPOLOGIQUE* ele, double & );
73  static int MG_TOPO_GetColor(MG_ELEMENT_TOPOLOGIQUE* ele, long & );
74  static int MG_TOPO_GetColor(MG_ELEMENT_TOPOLOGIQUE* ele, int & );
75  static int MG_TOPO_GetColor(MG_ELEMENT_TOPOLOGIQUE* ele, unsigned char rgba[4] );
76  static void MG_TOPO_SetColor(MG_ELEMENT_TOPOLOGIQUE* ele, unsigned char r, unsigned char g, unsigned char b, unsigned char a);
77  static void MG_TOPO_SetColor(MG_ELEMENT_TOPOLOGIQUE* ele, unsigned char rgba[4]);
78  static void MG_TOPO_SetColor(MG_ELEMENT_TOPOLOGIQUE* ele, double d);
79  static void ccf_uc4_to_double(unsigned char rgba[4], double & val);
80  static void ccf_double_to_uc4(double val, unsigned char rgba[4]);
81 };
82 
83 }
84 
85 #endif
static void MG_SOMMET_GetAdjacent_MG_FACE(MG_SOMMET *__refVertex, std::set< MG_FACE * > &__adjacentfaces)
static bool GetIntersectingPlaneDirection(MG_FACE *__face, double __uv[2], double __planeNormal[3], double __directionUV[2])
static bool GetInteriorDirection(MG_FACE *__face, MCNode *__n, double __result[3])
static bool MG_FACE_Contains_MG_ARETE(MG_FACE *__face, MG_ARETE *e)
static bool MCFace_MCTopoDir_IsInterior(MCFace *__mcFace, MG_ELEMENT_TOPOLOGIQUE *__mcTopo, double __xyz[3], double __direction[3])
static void MG_TOPO_SetColor(MG_ELEMENT_TOPOLOGIQUE *ele, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
static bool MCFace_MCVertexDir_IsInterior(MCFace *__mcFace, MCVertex *__mcVertex, double __direction[3])
static OT_MATRICE_3D GetPlaneFrame(OT_VECTEUR_3D &__planeNormal)
static double FacePointCorrection(MG_FACE *__face, double __xyz[3], double __uv1[2])
static bool IsInteriorDir(MG_FACE *__face, MG_ARETE *__edge, double __t, double __direction[3])
static bool MG_ARETE_Contains_MG_SOMMET(MG_ARETE *__edge, MG_SOMMET *__vertex)
static bool MG_FACE_Contains_MG_SOMMET(MG_FACE *__face, MG_SOMMET *v)
static bool MCFace_MCEdgeDir_IsInterior(MCFace *__mcFace, MCEdge *__mcEdge, double __s, double __direction[3])
static double Segment2dCurvilinearLength(MG_FACE *__face, double __uv1[2], double __uv2[2], unsigned __nbNubdivisions)
static int MG_TOPO_GetColor(MG_ELEMENT_TOPOLOGIQUE *ele, double &)
static void ccf_uc4_to_double(unsigned char rgba[4], double &val)
static double AngleInPlane(double *__axisX, double *__direction)
static void Surface_MoveParamInDomain(MG_FACE *__face, double *__uv, double *__xyz)
static double Vector_UV_To_3D_Plane(MG_FACE *__face, double *__planeNormal, double *__planeRootPoint, double *__uv1, double *__uv12)
static void ccf_double_to_uc4(double val, unsigned char rgba[4])
static OT_MATRICE_3D TangentPlaneFrame_SecondDersTransform(MG_FACE *__sigma, double uv[2], OT_MATRICE_3D &M, OT_MATRICE_3D &C, OT_VECTEUR_3D &xyz)
static OT_MATRICE_3D TangentPlaneFrame(MG_FACE *__sigma, double uv[2])
static bool PolySurface_Contains_RefVertex(PolySurface *__polysurface, MG_SOMMET *__refVertex)
static int Intr3D_Surface_Plane_Get_LocalTangentPlane_Direction(MG_FACE *__sigma, double __N1[3], double __P1[3], double __uv[2], OT_MATRICE_3D &__tangentPlaneFrame, OT_VECTEUR_3D &__intrLineDirWorld)
static double ComputeDiedralAngle(MG_NOEUD *__tri[2][3])
static double MoveParamInPlane(MG_FACE *__face, double __planeNormal[3], double __planeRootPoint[3], double deltamax3D, int nbPointToPlaneResidueCorrection, double __uv[2], double __xyz[3])
#define a(i, j)