ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/CAD4FE_PolyCurve.h
Revision: 906
Committed: Mon Nov 13 22:30:18 2017 UTC (7 years, 6 months ago) by couturad
Content type: text/plain
File size: 4545 byte(s)
Log Message:
Nouveau opencascade commit 1

File Contents

# User Rev Content
1 foucault 27 //---------------------------------------------------------------------------
2    
3     #ifndef CAD4FE_PolyCurveH
4 foucault 569 #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 foucault 569 // 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 foucault 569 #ifdef BUILT_DLL_GEOMETRIE
22     #define DLLPORTGEOMETRIE __declspec(dllexport)
23     #else
24     #define DLLPORTGEOMETRIE __declspec(dllimport)
25     #endif
26 foucault 27 #else
27 foucault 569 #define DLLPORTGEOMETRIE
28 foucault 27 #endif
29    
30     namespace CAD4FE {
31    
32     class DLLPORTGEOMETRIE PolyCurve : public MG_COURBE
33     {
34     public:
35    
36 foucault 569 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 foucault 569 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 foucault 27
61 foucault 569 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 couturad 906 bool est_sur_courbe(double *xyz,double precision=1e-6);
70    
71 foucault 569 int est_periodique(void);
72     double get_periode(void);
73 francois 763 void enregistrer(std::ostream& o,double version);
74 foucault 569 int get_type_geometrique(TPL_LISTE_ENTITE<double> &param);
75 foucault 27
76    
77 foucault 569 MG_SOMMET * get_sommet1() ;
78     MG_SOMMET * get_sommet2() ;
79 foucault 27
80 foucault 569 double get_sommet1_s() ;
81     double get_sommet2_s() ;
82 foucault 27
83 foucault 569 double get_tmin() ;
84     double get_tmax() ;
85 foucault 27
86 foucault 569 double get_longueur (double __s_min=-1, double __s_max=-1, double precision=1E-6);
87 foucault 27
88 foucault 569 std::vector<MG_ARETE*> & GetRefEdges() ;
89     static void VerifyRefEdgeT(MG_ARETE * __edge, double & __t);
90    
91     double GetLength(MG_ARETE * __edge);
92     double GetLength(unsigned __index);
93     void VerifyS(double & __s);
94 foucault 27
95 foucault 569 bool IsPoint() const;
96 foucault 27
97 foucault 569 virtual void get_param_NURBS(int& indx_premier_ptctr,TPL_LISTE_ENTITE<double> &param) ;
98 foucault 27 private:
99 foucault 569 std::vector<MG_ARETE*> lst_ref_edges;
100     std::vector<MG_SOMMET*> lst_vertices;
101     std::vector<double> lst_length;
102 foucault 27 };
103    
104    
105     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]);
106     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);
107    
108     }
109    
110     #endif
111 foucault 569