MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
CAD4FE_PolyCurve.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_PolyCurve.h
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:54 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 
23 #ifndef CAD4FE_PolyCurveH
24 #define CAD4FE_PolyCurveH
25 #include "gestionversion.h"
26 #include "mg_geometrie.h"
27 #include "mg_arete.h"
28 
29 #include <map>
30 #include <ostream>
31 #include <string>
32 #include <vector>
33 
34 
35 
36 namespace CAD4FE {
37 
38 class PolyCurve : public MG_COURBE
39 {
40 public:
41 
42  PolyCurve();
45  void InsertCurve(MG_ARETE *);
46  void Merge( PolyCurve &);
48 
49  MG_ARETE * GetRefEdge(unsigned int);
50  unsigned int RefEdge_GetIndex(MG_ARETE * __refEdge);
51  unsigned GetRefEdgeCount() ;
52  MG_SOMMET * GetRefVertex(unsigned int);
53  unsigned int RefVertex_GetIndex(MG_SOMMET * __refVertex);
54  unsigned GetRefVertexCount() ;
55  bool ContainsRefEdge(MG_ARETE * __refEdge);
56  bool ContainsRefVertex(MG_SOMMET * __v);
57  bool Contains(MG_ELEMENT_TOPOLOGIQUE * __topo);
58 
59  void RefEdge_GetT ( unsigned __index, double length, double * __t, double * __dt, bool __curvilinearLength);
60  void RefEdge_GetS(unsigned __iEdge, double __t,double *__s, bool __curvilinearLength);
61  double RefVertex_GetS(MG_SOMMET * __refVertex);
62 
63  void Parameter_SToRefEdgeT (double __s, unsigned * __iEdge, double *__t, double * __dt, bool __curvilinearLength);
64  void Parameter_SToRefEdgeT (double __s, MG_ARETE **, double *__t, double * __dt, bool __curvilinearLength);
65  void Parameter_RefEdgeTToS (double __t, MG_ARETE * __edge, double *__s, bool __curvilinearLength);
66 
67  void evaluer (double __s, double __X[3]);
68  void evaluer (double __s, double __X[3], bool __curvilinearLength);
69  void deriver (double __s, double __X[3]);
70  void deriver (double __s, double __X[3], bool __curvilinearLength);
71  void deriver_seconde (double __s, double __ddxyz[3], double *__dxyz = NULL, double * __xyz = NULL);
72  void deriver_seconde (double __s, double __ddxyz[3], double *__dxyz = NULL, double * __xyz = NULL, bool __curvilinearLength=false);
73  void inverser(double & __t, double __point[3], double precision);
74  void inverser(double & __t, double __point[3], double precision, bool __curvilinearLength);
75  bool est_sur_courbe(double *xyz,double precision=1e-6);
76 
77  int est_periodique(void);
78  double get_periode(void);
79  void enregistrer(std::ostream& o,double version);
81 
82 
85 
86  double get_sommet1_s() ;
87  double get_sommet2_s() ;
88 
89  double get_tmin() ;
90  double get_tmax() ;
91 
92  double get_longueur (double __s_min=-1, double __s_max=-1, double precision=1E-6);
93 
94  std::vector<MG_ARETE*> & GetRefEdges() ;
95  static void VerifyRefEdgeT(MG_ARETE * __edge, double & __t);
96 
97  double GetLength(MG_ARETE * __edge);
98  double GetLength(unsigned __index);
99  void VerifyS(double & __s);
100 
101  bool IsPoint() const;
102 
103  virtual void get_param_NURBS(int& indx_premier_ptctr,TPL_LISTE_ENTITE<double> &param) ;
104 private:
105  std::vector<MG_ARETE*> lst_ref_edges;
106  std::vector<MG_SOMMET*> lst_vertices;
107  std::vector<double> lst_length;
108 };
109 
110 
111 void SplitPolyCurve(PolyCurve * __polyCurve, double __xyz[3], MG_VOLUME * __refBody, MG_GEOMETRIE * __geom, PolyCurve * __result[2], MG_ARETE **__origRefEdge, MG_SOMMET ** __splitRefVertex, MG_ARETE * __splitRefEdges[2]);
112 void SplitRefEdge(MG_ARETE * __refEdge, MG_SOMMET * __refVertex1, MG_SOMMET * __refVertex2, double __xyz[3], MG_VOLUME * __refBody, MG_GEOMETRIE * __geom, MG_ARETE * edges[2], MG_SOMMET ** __splitVertex);
113 
114 }
115 
116 #endif
117 
CAD4FE::PolyCurve::inverser
void inverser(double &__t, double __point[3], double precision)
Definition: CAD4FE_PolyCurve.cpp:717
CAD4FE::PolyCurve::get_longueur
double get_longueur(double __s_min=-1, double __s_max=-1, double precision=1E-6)
Definition: CAD4FE_PolyCurve.cpp:669
mg_geometrie.h
CAD4FE::PolyCurve::VerifyS
void VerifyS(double &__s)
Definition: CAD4FE_PolyCurve.cpp:241
CAD4FE::PolyCurve::SetPeriodicPoleRefVertex
void SetPeriodicPoleRefVertex(MG_SOMMET *__v)
Definition: CAD4FE_PolyCurve.cpp:639
gestionversion.h
CAD4FE::PolyCurve::PolyCurve
PolyCurve()
Definition: CAD4FE_PolyCurve.cpp:58
CAD4FE::PolyCurve::ContainsRefVertex
bool ContainsRefVertex(MG_SOMMET *__v)
Definition: CAD4FE_PolyCurve.cpp:125
CAD4FE::PolyCurve::RefEdge_GetT
void RefEdge_GetT(unsigned __index, double length, double *__t, double *__dt, bool __curvilinearLength)
Definition: CAD4FE_PolyCurve.cpp:268
CAD4FE::PolyCurve::get_tmax
double get_tmax()
Definition: CAD4FE_PolyCurve.cpp:685
CAD4FE::PolyCurve::VerifyRefEdgeT
static void VerifyRefEdgeT(MG_ARETE *__edge, double &__t)
Definition: CAD4FE_PolyCurve.cpp:140
CAD4FE::PolyCurve
Definition: CAD4FE_PolyCurve.h:38
CAD4FE::PolyCurve::GetLength
double GetLength(MG_ARETE *__edge)
Definition: CAD4FE_PolyCurve.cpp:79
CAD4FE::PolyCurve::enregistrer
void enregistrer(std::ostream &o, double version)
Definition: CAD4FE_PolyCurve.cpp:746
CAD4FE::PolyCurve::GetRefEdges
std::vector< MG_ARETE * > & GetRefEdges()
Definition: CAD4FE_PolyCurve.cpp:770
CAD4FE::PolyCurve::get_tmin
double get_tmin()
Definition: CAD4FE_PolyCurve.cpp:680
CAD4FE::PolyCurve::RefEdge_GetS
void RefEdge_GetS(unsigned __iEdge, double __t, double *__s, bool __curvilinearLength)
Definition: CAD4FE_PolyCurve.cpp:311
MG_VOLUME
Definition: mg_volume.h:33
CAD4FE::PolyCurve::get_sommet2_s
double get_sommet2_s()
Definition: CAD4FE_PolyCurve.cpp:711
MG_COURBE
Definition: mg_courbe.h:30
CAD4FE::PolyCurve::lst_length
std::vector< double > lst_length
Definition: CAD4FE_PolyCurve.h:107
CAD4FE::PolyCurve::GetRefEdgeCount
unsigned GetRefEdgeCount()
Definition: CAD4FE_PolyCurve.cpp:109
CAD4FE::PolyCurve::Parameter_RefEdgeTToS
void Parameter_RefEdgeTToS(double __t, MG_ARETE *__edge, double *__s, bool __curvilinearLength)
Definition: CAD4FE_PolyCurve.cpp:487
CAD4FE::PolyCurve::get_param_NURBS
virtual void get_param_NURBS(int &indx_premier_ptctr, TPL_LISTE_ENTITE< double > &param)
Definition: CAD4FE_PolyCurve.cpp:969
MG_ELEMENT_TOPOLOGIQUE
Definition: mg_element_topologique.h:51
CAD4FE::PolyCurve::lst_ref_edges
std::vector< MG_ARETE * > lst_ref_edges
Definition: CAD4FE_PolyCurve.h:105
CAD4FE::PolyCurve::get_sommet1_s
double get_sommet1_s()
Definition: CAD4FE_PolyCurve.cpp:704
CAD4FE::PolyCurve::ContainsRefEdge
bool ContainsRefEdge(MG_ARETE *__refEdge)
Definition: CAD4FE_PolyCurve.cpp:120
CAD4FE::PolyCurve::lst_vertices
std::vector< MG_SOMMET * > lst_vertices
Definition: CAD4FE_PolyCurve.h:106
CAD4FE::SplitRefEdge
void SplitRefEdge(MG_ARETE *__refEdge, MG_SOMMET *__refVertex1, MG_SOMMET *__refVertex2, double __xyz[3], MG_VOLUME *__refBody, MG_GEOMETRIE *__geom, MG_ARETE *edges[2], MG_SOMMET **__splitVertex)
Definition: CAD4FE_PolyCurve.cpp:776
CAD4FE::PolyCurve::GetRefEdge
MG_ARETE * GetRefEdge(unsigned int)
Definition: CAD4FE_PolyCurve.cpp:99
CAD4FE::PolyCurve::get_sommet2
MG_SOMMET * get_sommet2()
Definition: CAD4FE_PolyCurve.cpp:698
CAD4FE::PolyCurve::evaluer
void evaluer(double __s, double __X[3])
Definition: CAD4FE_PolyCurve.cpp:506
CAD4FE::PolyCurve::Merge
void Merge(PolyCurve &)
Definition: CAD4FE_PolyCurve.cpp:605
CAD4FE::PolyCurve::Contains
bool Contains(MG_ELEMENT_TOPOLOGIQUE *__topo)
Definition: CAD4FE_PolyCurve.cpp:130
mg_arete.h
CAD4FE::PolyCurve::get_type_geometrique
int get_type_geometrique(TPL_LISTE_ENTITE< double > &param)
Definition: CAD4FE_PolyCurve.cpp:741
CAD4FE::PolyCurve::est_periodique
int est_periodique(void)
Definition: CAD4FE_PolyCurve.cpp:724
CAD4FE::PolyCurve::RefVertex_GetIndex
unsigned int RefVertex_GetIndex(MG_SOMMET *__refVertex)
Definition: CAD4FE_PolyCurve.cpp:480
CAD4FE::PolyCurve::Parameter_SToRefEdgeT
void Parameter_SToRefEdgeT(double __s, unsigned *__iEdge, double *__t, double *__dt, bool __curvilinearLength)
Definition: CAD4FE_PolyCurve.cpp:445
CAD4FE::PolyCurve::GetRefVertex
MG_SOMMET * GetRefVertex(unsigned int)
Definition: CAD4FE_PolyCurve.cpp:104
MG_GEOMETRIE
Definition: mg_geometrie.h:84
CAD4FE
Definition: CAD4FE_ClosestPoint_Segment_MG_ARETE.h:34
TPL_LISTE_ENTITE< double >
CAD4FE::PolyCurve::get_sommet1
MG_SOMMET * get_sommet1()
Definition: CAD4FE_PolyCurve.cpp:691
CAD4FE::PolyCurve::get_periode
double get_periode(void)
Definition: CAD4FE_PolyCurve.cpp:732
CAD4FE::PolyCurve::deriver
void deriver(double __s, double __X[3])
Definition: CAD4FE_PolyCurve.cpp:532
MG_ARETE
Definition: mg_arete.h:36
CAD4FE::PolyCurve::IsPoint
bool IsPoint() const
Definition: CAD4FE_PolyCurve.cpp:963
MG_SOMMET
Definition: mg_sommet.h:35
CAD4FE::PolyCurve::deriver_seconde
void deriver_seconde(double __s, double __ddxyz[3], double *__dxyz=NULL, double *__xyz=NULL)
Definition: CAD4FE_PolyCurve.cpp:563
CAD4FE::PolyCurve::GetRefVertexCount
unsigned GetRefVertexCount()
Definition: CAD4FE_PolyCurve.cpp:114
CAD4FE::PolyCurve::est_sur_courbe
bool est_sur_courbe(double *xyz, double precision=1e-6)
Definition: CAD4FE_PolyCurve.cpp:233
CAD4FE::PolyCurve::InsertCurve
void InsertCurve(MG_ARETE *)
Definition: CAD4FE_PolyCurve.cpp:347
CAD4FE::SplitPolyCurve
void SplitPolyCurve(PolyCurve *__polyCurve, double __xyz[3], MG_VOLUME *__refBody, MG_GEOMETRIE *__geom, PolyCurve *__result[2], MG_ARETE **__origRefEdge, MG_SOMMET **__splitRefVertex, MG_ARETE *__splitRefEdges[2])
Definition: CAD4FE_PolyCurve.cpp:888
CAD4FE::PolyCurve::RefEdge_GetIndex
unsigned int RefEdge_GetIndex(MG_ARETE *__refEdge)
Definition: CAD4FE_PolyCurve.cpp:473
CAD4FE::PolyCurve::RefVertex_GetS
double RefVertex_GetS(MG_SOMMET *__refVertex)
Definition: CAD4FE_PolyCurve.cpp:256