ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/CAD4FE_PolyCurve.h
Revision: 283
Committed: Tue Sep 13 21:11:20 2011 UTC (13 years, 8 months ago) by francois
Content type: text/plain
File size: 4120 byte(s)
Log Message:
structure de l'écriture

File Contents

# User Rev Content
1 foucault 27 //---------------------------------------------------------------------------
2    
3     #ifndef CAD4FE_PolyCurveH
4 francois 283 #define CAD4FE_PolyCurveH
5 foucault 27 //---------------------------------------------------------------------------
6     // include MAGIC Headers
7     #include "gestionversion.h"
8     #include "mg_geometrie.h"
9     #include "mg_arete.h"
10    
11     //---------------------------------------------------------------------------
12 francois 283 // include STL headers
13 foucault 27 //---------------------------------------------------------------------------
14     #include <map>
15     #include <ostream>
16     #include <string>
17     #include <vector>
18     //---------------------------------------------------------------------------
19    
20     #ifdef WINDOWS_VERSION
21 francois 283 #ifdef BUILT_DLL_GEOMETRIE
22     #define DLLPORTGEOMETRIE __declspec(dllexport)
23 foucault 27 #else
24 francois 283 #define DLLPORTGEOMETRIE __declspec(dllimport)
25 foucault 27 #endif
26 francois 283 #else
27     #define DLLPORTGEOMETRIE
28     #endif
29 foucault 27
30     namespace CAD4FE {
31    
32     class DLLPORTGEOMETRIE PolyCurve : public MG_COURBE
33     {
34     public:
35    
36 francois 283 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 foucault 27
43 francois 283 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 foucault 27
53 francois 283 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 foucault 27
57 francois 283 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 foucault 27
61 francois 283 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 foucault 27
70 francois 283 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 foucault 27
75    
76 francois 283 MG_SOMMET * get_sommet1() ;
77     MG_SOMMET * get_sommet2() ;
78 foucault 27
79 francois 283 double get_sommet1_s() ;
80     double get_sommet2_s() ;
81 foucault 27
82 francois 283 double get_tmin() ;
83     double get_tmax() ;
84 foucault 27
85 francois 283 double get_longueur (double __s_min=-1, double __s_max=-1, double precision=1E-6);
86 foucault 27
87 francois 283 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 foucault 27 private:
98 francois 283 std::vector<MG_ARETE*> lst_ref_edges;
99     std::vector<MG_SOMMET*> lst_vertices;
100     std::vector<double> lst_length;
101 foucault 27 };
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 francois 283