UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
parspline_service.hpp
1 // parspline_service.hpp
2 // $Id: parspline_service.hpp,v 1.4 2007/08/05 09:50:35 guser1 Exp $
3 //---------------------------------------------------------------------------------------------------------
4 #ifndef ParSplineOneDH
5 #define ParSplineOneDH
6 #include <math.h>
7 #include <string.h>
8 #include <math.h>
9 #include <stdio.h>
10 #include <stdlib.h>
11 //#include <mix/wenv.h>
12 //#include <mix/DoubleAr.H>
13 //#include <mix/IntAr.H>
14 
15 
16 #include "dvoev_ma.hpp"
17 #include "objectar.hpp"
18 #include "s_message.hpp"
19 
20 //---------------------------------------------------------------------------------------------------------
22 struct AlgData
23 {
24  double **MN;
25  double *P;
26  double *abc;
27 };
28 
29 struct AlgData3d
30 {
31  double MN[3][3];
32  double P[3];
33  double abc[3];
34 };
35 
37 {
38  double MN[3][3];
39  double P[3];
40  int index1[3];
41  int index2[3];
42 };
43 
44 //---------------------------------------------------------------------------------------------------------
45 //bool Gauss (int N, double **LN, double *P, double *x);
46 bool Gauss (int N, double **LN, double *P, double *x);
47 bool Gauss (int N, AlgData *alg);
48 bool PointLineIntersection(double x01,double z01,double x11,double z11,double x02,double z02,
49  double x12,double z12,double &xt,double &zt,bool flag1,bool flag2);
50 
51 //int TwoParSplineIntersection(int N1,double_ar *xx1,double_ar *zz1,int N2,double_ar *xx2,double_ar *zz2,
52 //double_ar *xp,double_ar *zp);
53 
54 //int TwoParSplineIntersection(int N1,double_ar *xx1,double_ar *zz1,int N2,double_ar *xx2,double_ar *zz2,
55 // double_ar *xp,double_ar *zp,bool *flag1,bool *flag2);
56 
57 int LineParSplineIntersection(double x0,double z0,double xk,double zk,int N1,double_ar *xx1,double_ar *zz1,
58  double_ar *xp,double_ar *zp,bool flag,int_ar *NumNode,bool *flagd);
59 //, AlgData3d *alg, Gauss3dData *gad);
60 
61 bool LineParSplineIntersection1(double x0,double z0,double xk,double zk,int N1,double_ar *xx1,double_ar *zz1,
62  double &xp,double &zp,double &beta,double &curvity,bool flag,int NumNode,
63  double_ar *Dx,double_ar *Dz,double_ar *curv,bool *flagd);
64 //, AlgData3d *alg, Gauss3dData *gad);
65 //---------------------------------------------------------------------------------------------------------
67 {
68  double_ar *a1x,*a2x,*a3x,*a4x,*a1z,*a2z,*a3z,*a4z,*G,*PHIX,*PHIZ;
69  double dphin3;
70  int N,err,NI;
71  double sigma,amax,MinRc;
72  char *strerr;
73 
74  void DateEditorParSplineOneD();
75  void CubParSplineOneD(double_ar *e,double_ar *a,double_ar *b,double_ar *c,double_ar *d,int ind);
76  void ApproxCubSplineOneD(double_ar *e,double_ar *a,double_ar *b,double_ar *c,double_ar *d,int ind);
77  double MinRadCurvityForFixPoint(int N2,double *x1,double *x2);
78  void InsertNode(int &N0,int k0,int *num,double xt,double zt);
79  void SigmaCalculation();
80  void AmaxCalculation();
81  void InitParameters(double_ar *a,double_ar *b);
82  double Angle(double x01,double x11,double z01,double z11,double x02,double x12,double z02,double z12);
83 
84  public:
85 
86  double_ar *S;
87  double_ar *xx,*zz,*x,*z,*phinorm,*curv,*Dx,*Dz;
88  ParSplineOneD();
89  ParSplineOneD(int N,double *x,double *z,int N1,double *x1,double *z1,double rc);
90  ~ParSplineOneD();
91 
92  // void NewParSpline(int N,double *x,double *z,int N1,double *x1,double *z1,double rc);
93  void GetPoints(int N,double *x,double *z,int flag);
94  int GetN();
95  void SetN(int n);
96  void GetXZ(double *x1,double *z1);
97 
98  void GetABCD(double *a1x,double *b1x,double *c1x,double *d1x, double *a1z,double *b1z,double *c1z,
99  double *d1z);
100 
101  double GetSigma();
102  double GetAmax();
103  double GetMinRc();
104  void InterpolCurve(double g,int &n);
105  bool ParSplineFunction(double s,double &xt,double &zt);
106  bool DerParSplineFunction(double s,double &dx,double &dz);
107  bool Der2ParSplineFunction(double s,double &d2x,double &d2z);
108  bool CurvityParSplineFunction(double s,double &cr);
109  bool RadiusCurvityParSplineFunction(double s,double &rcr);
110 };
111 //---------------------------------------------------------------------------------------------------------
112 
113 
114 #endif
Definition: parspline_service.hpp:22
Definition: parspline_service.hpp:29
Definition: parspline_service.hpp:36
Definition: objectar.hpp:57
Definition: parspline_service.hpp:66
Definition: objectar.hpp:55