ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/cad4fe_polycurve.h
Revision: 253
Committed: Tue Jul 13 19:40:46 2010 UTC (14 years, 10 months ago) by francois
Content type: text/plain
Original Path: magic/lib/geometrie/src/CAD4FE_PolyCurve.h
File size: 4472 byte(s)
Log Message:
changement de hiearchie et utilisation de ccmake + mise a jour

File Contents

# User Rev Content
1 foucault 27 //---------------------------------------------------------------------------
2    
3     #ifndef CAD4FE_PolyCurveH
4     #define CAD4FE_PolyCurveH
5     //---------------------------------------------------------------------------
6     // include MAGIC Headers
7     #include "gestionversion.h"
8     #include "mg_geometrie.h"
9     #include "mg_arete.h"
10    
11     //---------------------------------------------------------------------------
12     // include STL headers
13     //---------------------------------------------------------------------------
14     #include <map>
15     #include <ostream>
16     #include <string>
17     #include <vector>
18     //---------------------------------------------------------------------------
19    
20     #ifdef WINDOWS_VERSION
21     #ifdef BUILT_DLL_GEOMETRIE
22     #define DLLPORTGEOMETRIE __declspec(dllexport)
23     #else
24     #define DLLPORTGEOMETRIE __declspec(dllimport)
25     #endif
26     #else
27     #define DLLPORTGEOMETRIE
28     #endif
29    
30     namespace CAD4FE {
31    
32     class DLLPORTGEOMETRIE PolyCurve : public MG_COURBE
33     {
34     public:
35    
36     PolyCurve();
37     PolyCurve(MG_ARETE *);
38     PolyCurve(MG_SOMMET *);
39     void InsertCurve(MG_ARETE *);
40     void Merge( PolyCurve &);
41     void SetPeriodicPoleRefVertex(MG_SOMMET * __v);
42    
43     MG_ARETE * GetRefEdge(unsigned int);
44     unsigned int RefEdge_GetIndex(MG_ARETE * __refEdge);
45     unsigned GetRefEdgeCount() ;
46     MG_SOMMET * GetRefVertex(unsigned int);
47     unsigned int RefVertex_GetIndex(MG_SOMMET * __refVertex);
48     unsigned GetRefVertexCount() ;
49     bool ContainsRefEdge(MG_ARETE * __refEdge);
50     bool ContainsRefVertex(MG_SOMMET * __v);
51     bool Contains(MG_ELEMENT_TOPOLOGIQUE * __topo);
52    
53     void RefEdge_GetT ( unsigned __index, double length, double * __t, double * __dt, bool __curvilinearLength);
54     void RefEdge_GetS(unsigned __iEdge, double __t,double *__s, bool __curvilinearLength);
55     double RefVertex_GetS(MG_SOMMET * __refVertex);
56    
57     void Parameter_SToRefEdgeT (double __s, unsigned * __iEdge, double *__t, double * __dt, bool __curvilinearLength);
58     void Parameter_SToRefEdgeT (double __s, MG_ARETE **, double *__t, double * __dt, bool __curvilinearLength);
59     void Parameter_RefEdgeTToS (double __t, MG_ARETE * __edge, double *__s, bool __curvilinearLength);
60    
61     void evaluer (double __s, double __X[3]);
62     void evaluer (double __s, double __X[3], bool __curvilinearLength);
63     void deriver (double __s, double __X[3]);
64     void deriver (double __s, double __X[3], bool __curvilinearLength);
65     void deriver_seconde (double __s, double __ddxyz[3], double *__dxyz = NULL, double * __xyz = NULL);
66     void deriver_seconde (double __s, double __ddxyz[3], double *__dxyz = NULL, double * __xyz = NULL, bool __curvilinearLength=false);
67     void inverser(double & __t, double __point[3], double precision);
68     void inverser(double & __t, double __point[3], double precision, bool __curvilinearLength);
69    
70     int est_periodique(void);
71     double get_periode(void);
72     void enregistrer(std::ostream& o);
73     int get_type_geometrique(TPL_LISTE_ENTITE<double> &param);
74    
75    
76     MG_SOMMET * get_sommet1() ;
77     MG_SOMMET * get_sommet2() ;
78    
79     double get_sommet1_s() ;
80     double get_sommet2_s() ;
81    
82     double get_tmin() ;
83     double get_tmax() ;
84    
85     double get_longueur (double __s_min=-1, double __s_max=-1, double precision=1E-6);
86    
87     std::vector<MG_ARETE*> & GetRefEdges() ;
88     static void VerifyRefEdgeT(MG_ARETE * __edge, double & __t);
89    
90     double GetLength(MG_ARETE * __edge);
91     double GetLength(unsigned __index);
92     void VerifyS(double & __s);
93    
94     bool IsPoint() const;
95    
96     virtual void get_param_NURBS(int& indx_premier_ptctr,TPL_LISTE_ENTITE<double> &param) ;
97     private:
98     std::vector<MG_ARETE*> lst_ref_edges;
99     std::vector<MG_SOMMET*> lst_vertices;
100     std::vector<double> lst_length;
101     };
102    
103    
104     DLLPORTGEOMETRIE 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]);
105     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);
106    
107     }
108    
109     #endif
110