1 |
|
5 |
//---------------------------------------------------------------------------
|
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 |
|
|
|
21 |
|
|
#ifdef WINDOWS_VERSION
|
22 |
|
|
#ifdef BUILT_DLL_GEOMETRIE
|
23 |
|
|
#define DLLPORTGEOMETRIE __declspec(dllexport)
|
24 |
|
|
#else
|
25 |
|
|
#define DLLPORTGEOMETRIE __declspec(dllimport)
|
26 |
|
|
#endif
|
27 |
|
|
#else
|
28 |
|
|
#define DLLPORTGEOMETRIE
|
29 |
|
|
#endif
|
30 |
|
|
|
31 |
|
|
namespace CAD4FE {
|
32 |
|
|
|
33 |
|
|
class DLLPORTGEOMETRIE PolyCurve : public MG_COURBE
|
34 |
|
|
{
|
35 |
|
|
public:
|
36 |
|
|
PolyCurve();
|
37 |
|
|
PolyCurve(MG_ARETE *);
|
38 |
|
|
void InsertCurve(MG_ARETE *);
|
39 |
|
|
void Merge( PolyCurve &);
|
40 |
|
|
|
41 |
|
|
MG_ARETE * GetRefEdge(unsigned int);
|
42 |
|
|
unsigned GetRefEdgeCount() ;
|
43 |
|
|
MG_SOMMET * GetRefVertex(unsigned int);
|
44 |
|
|
unsigned GetRefVertexCount() ;
|
45 |
|
|
bool ContainsRefEdge(MG_ARETE * __refEdge);
|
46 |
|
|
|
47 |
|
|
void RefEdge_GetT ( unsigned __index, double length, double * __t, double * __dt, bool __curvilinearLength);
|
48 |
|
|
void RefEdge_GetS(unsigned __iEdge, double __t,double *__s, bool __curvilinearLength);
|
49 |
|
|
|
50 |
|
|
void Parameter_SToRefEdgeT (double __s, unsigned * __iEdge, double *__t, double * __dt, bool __curvilinearLength);
|
51 |
|
|
void Parameter_SToRefEdgeT (double __s, MG_ARETE **, double *__t, double * __dt, bool __curvilinearLength);
|
52 |
|
|
void Parameter_RefEdgeTToS (double __t, MG_ARETE * __edge, double *__s, bool __curvilinearLength);
|
53 |
|
|
|
54 |
|
|
void evaluer (double __s, double __X[3]);
|
55 |
|
|
void evaluer (double __s, double __X[3], bool __curvilinearLength);
|
56 |
|
|
void deriver (double __s, double __X[3]);
|
57 |
|
|
void deriver (double __s, double __X[3], bool __curvilinearLength);
|
58 |
|
|
void deriver_seconde (double __s, double __ddxyz[3], double *__dxyz = NULL, double * __xyz = NULL);
|
59 |
|
|
void deriver_seconde (double __s, double __ddxyz[3], double *__dxyz = NULL, double * __xyz = NULL, bool __curvilinearLength=false);
|
60 |
|
|
void inverser(double & __t, double __point[3], double precision);
|
61 |
|
|
void inverser(double & __t, double __point[3], double precision, bool __curvilinearLength);
|
62 |
|
|
|
63 |
|
|
int est_periodique(void);
|
64 |
|
|
double get_periode(void);
|
65 |
|
|
void enregistrer(std::ostream& o);
|
66 |
|
|
int get_type_geometrique(TPL_LISTE_ENTITE<double> ¶m);
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
MG_SOMMET * get_sommet1() ;
|
70 |
|
|
MG_SOMMET * get_sommet2() ;
|
71 |
|
|
|
72 |
|
|
double get_sommet1_s() ;
|
73 |
|
|
double get_sommet2_s() ;
|
74 |
|
|
|
75 |
|
|
double get_tmin() ;
|
76 |
|
|
double get_tmax() ;
|
77 |
|
|
|
78 |
|
|
double get_longueur (double __s_min=-1, double __s_max=-1, double precision=1E-6);
|
79 |
|
|
|
80 |
|
|
std::vector<MG_ARETE*> & GetRefEdges() ;
|
81 |
|
|
static void VerifyRefEdgeT(MG_ARETE * __edge, double & __t);
|
82 |
|
|
|
83 |
|
|
double GetLength(MG_ARETE * __edge);
|
84 |
|
|
double GetLength(unsigned __index);
|
85 |
|
|
void VerifyS(double & __s);
|
86 |
francois |
19 |
virtual void get_param_NURBS(int& indx_premier_ptctr,TPL_LISTE_ENTITE<double> ¶m) ;
|
87 |
|
5 |
private:
|
88 |
|
|
std::vector<MG_ARETE*> lst_ref_edges;
|
89 |
|
|
std::vector<MG_SOMMET*> lst_vertices;
|
90 |
|
|
std::vector<double> lst_length;
|
91 |
|
|
};
|
92 |
|
|
|
93 |
|
|
|
94 |
|
|
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]);
|
95 |
|
|
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);
|
96 |
|
|
|
97 |
|
|
}
|
98 |
|
|
|
99 |
|
|
#endif
|
100 |
|
|
|