summaryrefslogtreecommitdiff
path: root/inc/Plate_Plate.hxx
blob: 715d8059072144aaf605bc2b7b889c6f7c16a08c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _Plate_Plate_HeaderFile
#define _Plate_Plate_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Plate_SequenceOfPinpointConstraint_HeaderFile
#include <Plate_SequenceOfPinpointConstraint.hxx>
#endif
#ifndef _Plate_SequenceOfLinearXYZConstraint_HeaderFile
#include <Plate_SequenceOfLinearXYZConstraint.hxx>
#endif
#ifndef _Plate_SequenceOfLinearScalarConstraint_HeaderFile
#include <Plate_SequenceOfLinearScalarConstraint.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Handle_TColgp_HArray2OfXYZ_HeaderFile
#include <Handle_TColgp_HArray2OfXYZ.hxx>
#endif
class Plate_PinpointConstraint;
class Plate_LinearXYZConstraint;
class Plate_LinearScalarConstraint;
class Plate_GlobalTranslationConstraint;
class Plate_LineConstraint;
class Plate_PlaneConstraint;
class Plate_SampledCurveConstraint;
class Plate_GtoCConstraint;
class Plate_FreeGtoCConstraint;
class gp_XYZ;
class gp_XY;
class TColgp_HArray2OfXYZ;
class TColgp_SequenceOfXY;
class math_Matrix;


//! This class implement a variationnal spline algorithm able <br>
//!          to define a two variable function satisfying some constraints <br>
//!          and minimizing an energy like criterion. <br>
class Plate_Plate  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  
  Standard_EXPORT   Plate_Plate();
  
  Standard_EXPORT   Plate_Plate(const Plate_Plate& Ref);
  
  Standard_EXPORT     Plate_Plate& Copy(const Plate_Plate& Ref) ;
    Plate_Plate& operator=(const Plate_Plate& Ref) 
{
  return Copy(Ref);
}
  
  Standard_EXPORT     void Load(const Plate_PinpointConstraint& PConst) ;
  
  Standard_EXPORT     void Load(const Plate_LinearXYZConstraint& LXYZConst) ;
  
  Standard_EXPORT     void Load(const Plate_LinearScalarConstraint& LScalarConst) ;
  
  Standard_EXPORT     void Load(const Plate_GlobalTranslationConstraint& GTConst) ;
  
  Standard_EXPORT     void Load(const Plate_LineConstraint& LConst) ;
  
  Standard_EXPORT     void Load(const Plate_PlaneConstraint& PConst) ;
  
  Standard_EXPORT     void Load(const Plate_SampledCurveConstraint& SCConst) ;
  
  Standard_EXPORT     void Load(const Plate_GtoCConstraint& GtoCConst) ;
  
  Standard_EXPORT     void Load(const Plate_FreeGtoCConstraint& FGtoCConst) ;
  
  Standard_EXPORT     void SolveTI(const Standard_Integer ord = 4,const Standard_Real anisotropie = 1.0) ;
  //! returns True if all has been correctly done. <br>
  Standard_EXPORT     Standard_Boolean IsDone() const;
  
  Standard_EXPORT     void destroy() ;
~Plate_Plate()
{
  destroy();
}
  //! reset the Plate in the initial state <br>
//!           ( same as after Create()) <br>
  Standard_EXPORT     void Init() ;
  
  Standard_EXPORT     gp_XYZ Evaluate(const gp_XY& point2d) const;
  
  Standard_EXPORT     gp_XYZ EvaluateDerivative(const gp_XY& point2d,const Standard_Integer iu,const Standard_Integer iv) const;
  
  Standard_EXPORT     void CoefPol(Handle(TColgp_HArray2OfXYZ)& Coefs) const;
  
  Standard_EXPORT     void SetPolynomialPartOnly(const Standard_Boolean PPOnly = Standard_True) ;
  
  Standard_EXPORT     Standard_Integer Continuity() const;
  
  Standard_EXPORT     void UVBox(Standard_Real& UMin,Standard_Real& UMax,Standard_Real& VMin,Standard_Real& VMax) const;
  
  Standard_EXPORT     void UVConstraints(TColgp_SequenceOfXY& Seq) const;





protected:





private:

  
  Standard_EXPORT     Standard_Real SolEm(const gp_XY& point2d,const Standard_Integer iu,const Standard_Integer iv) const;
  
        Standard_Real Polm(const gp_XY& point2d,const Standard_Integer iu,const Standard_Integer iv,const Standard_Integer idu,const Standard_Integer idv) const;
  
        Standard_Integer& Deru(const Standard_Integer index) const;
  
        Standard_Integer& Derv(const Standard_Integer index) const;
  
        gp_XYZ& Solution(const Standard_Integer index) const;
  
        gp_XY& Points(const Standard_Integer index) const;
  
  Standard_EXPORT     void SolveTI1(const Standard_Integer IterationNumber) ;
  
  Standard_EXPORT     void SolveTI2(const Standard_Integer IterationNumber) ;
  
  Standard_EXPORT     void SolveTI3(const Standard_Integer IterationNumber) ;
  
  Standard_EXPORT     void fillXYZmatrix(math_Matrix& mat,const Standard_Integer i0,const Standard_Integer j0,const Standard_Integer ncc1,const Standard_Integer ncc2) const;


Standard_Integer order;
Standard_Integer n_el;
Standard_Integer n_dim;
Standard_Address solution;
Standard_Address points;
Standard_Address deru;
Standard_Address derv;
Standard_Boolean OK;
Plate_SequenceOfPinpointConstraint myConstraints;
Plate_SequenceOfLinearXYZConstraint myLXYZConstraints;
Plate_SequenceOfLinearScalarConstraint myLScalarConstraints;
Standard_Real ddu[10];
Standard_Real ddv[10];
Standard_Integer maxConstraintOrder;
Standard_Boolean PolynomialPartOnly;


};


#include <Plate_Plate.lxx>



// other Inline functions and methods (like "C++: function call" methods)


#endif