summaryrefslogtreecommitdiff
path: root/inc/LocalAnalysis_SurfaceContinuity.hxx
blob: 539c3e1fd82dfe79882ec7a57e5390f913fc429a (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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
// 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 _LocalAnalysis_SurfaceContinuity_HeaderFile
#define _LocalAnalysis_SurfaceContinuity_HeaderFile

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

#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _GeomAbs_Shape_HeaderFile
#include <GeomAbs_Shape.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _LocalAnalysis_StatusErrorType_HeaderFile
#include <LocalAnalysis_StatusErrorType.hxx>
#endif
#ifndef _Handle_Geom_Surface_HeaderFile
#include <Handle_Geom_Surface.hxx>
#endif
#ifndef _Handle_Geom2d_Curve_HeaderFile
#include <Handle_Geom2d_Curve.hxx>
#endif
class StdFail_NotDone;
class Geom_Surface;
class Geom2d_Curve;
class GeomLProp_SLProps;



//!          This class gives tools to check local continuity C0 <br>
//!          C1 C2 G1 G2 between  two points situated on two surfaces <br>
class LocalAnalysis_SurfaceContinuity  {
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); 
  }

  
//!           -u1,v1 are  the parameters of the point on Surf1 <br>
//!           -u2,v2  are  the  parameters of the point on Surf2 <br>
//!           -Order  is the required continuity: <br>
//!            GeomAbs_C0    GeomAbs_C1  GeomAbs_C2 <br>
//!            GeomAbs_G1 GeomAbs_G2 <br>
//! <br>
//!           -EpsNul  is  used to  detect a  a vector with nul <br>
//!           magnitude <br>
//! <br>
//!           -EpsC0 is used for C0  continuity to confuse two <br>
//!            points (in mm) <br>
//! <br>
//!           -EpsC1 is  an angular  tolerance in radians  used <br>
//!            for C1 continuity  to compare the angle between <br>
//!            the first derivatives <br>
//! <br>
//!           -EpsC2 is an   angular tolerance in radians  used <br>
//!           for C2  continuity to  compare the angle  between <br>
//!           the second derivatives <br>
//! <br>
//!           -EpsG1 is an  angular  tolerance in radians  used <br>
//!           for G1  continuity to compare  the angle  between <br>
//!           the  normals <br>
//! <br>
//! <br>
//!           -Percent  : percentage of  curvature variation (unitless) <br>
//!           used for G2 continuity <br>
//! <br>
//!           - Maxlen is the maximum length of Surf1 or Surf2  in <br>
//!           meters used to detect null curvature (in mm) <br>
//! <br>
//! <br>
//! <br>
//!           the constructor computes the quantities  which are <br>
//!           necessary to check the continuity in the following cases: <br>
//! <br>
//!           case  C0 <br>
//!           -------- <br>
//!           - the distance between P1 and P2  with P1=Surf (u1,v1)  and <br>
//!           P2=Surfv2(u2,v2) <br>
//! <br>
//! <br>
//!           case C1 <br>
//!           ------- <br>
//! <br>
//!           - the angle between the first derivatives in u : <br>
//! <br>
//!             dSurf1(u1,v1)               dSurf2(u2,v2) <br>
//!             -----------      and        --------- <br>
//!             du                           du <br>
//! <br>
//!             the angle value is between 0 and PI/2 <br>
//! <br>
//!           - the angle between the first derivatives in v : <br>
//! <br>
//!             dSurf1(u1,v1)               dSurf2(u2,v2) <br>
//!             --------         and         --------- <br>
//!             dv                           dv <br>
//! <br>
//!           - the ratio between  the magnitudes of  the first derivatives  in  u <br>
//!           - the  ratio  between  the magnitudes of the first derivatives in v <br>
//! <br>
//!             the angle value is between  0 and pi/2 <br>
//! <br>
//!           case  C2 <br>
//!           ------- <br>
//!           - the  angle  between the second derivatives in u <br>
//!                2                  2 <br>
//!               d Surf1(u1,v1)    d  Surf2(u2,v2) <br>
//!               ----------        ---------- <br>
//!                2                  2 <br>
//!               d u               d  u <br>
//! <br>
//!          - the ratio between the  magnitudes of the second derivatives in  u <br>
//!          - the  ratio between the  magnitudes of the  second derivatives in v <br>
//! <br>
//!            the angle value is between 0 and PI/2 <br>
//! <br>
//!           case G1 <br>
//!           ------- <br>
//!           -the angle between  the normals  at each point <br>
//!           the angle value is between 0 and PI/2 <br>
//! <br>
//!           case  G2 <br>
//!           ------- <br>
//!           - the maximum  normal curvature gap between the two <br>
//!           points <br>
//! <br>
  Standard_EXPORT   LocalAnalysis_SurfaceContinuity(const Handle(Geom_Surface)& Surf1,const Standard_Real u1,const Standard_Real v1,const Handle(Geom_Surface)& Surf2,const Standard_Real u2,const Standard_Real v2,const GeomAbs_Shape Order,const Standard_Real EpsNul = 0.001,const Standard_Real EpsC0 = 0.001,const Standard_Real EpsC1 = 0.001,const Standard_Real EpsC2 = 0.001,const Standard_Real EpsG1 = 0.001,const Standard_Real Percent = 0.01,const Standard_Real Maxlen = 10000);
  
  Standard_EXPORT   LocalAnalysis_SurfaceContinuity(const Handle(Geom2d_Curve)& curv1,const Handle(Geom2d_Curve)& curv2,const Standard_Real U,const Handle(Geom_Surface)& Surf1,const Handle(Geom_Surface)& Surf2,const GeomAbs_Shape Order,const Standard_Real EpsNul = 0.001,const Standard_Real EpsC0 = 0.001,const Standard_Real EpsC1 = 0.001,const Standard_Real EpsC2 = 0.001,const Standard_Real EpsG1 = 0.001,const Standard_Real Percent = 0.01,const Standard_Real Maxlen = 10000);
  
//! This  constructor  is  used  when  we  want  to compute  many  analysis. <br>
//! After  we  use  the  method  ComputeAnalysis <br>
  Standard_EXPORT   LocalAnalysis_SurfaceContinuity(const Standard_Real EpsNul = 0.001,const Standard_Real EpsC0 = 0.001,const Standard_Real EpsC1 = 0.001,const Standard_Real EpsC2 = 0.001,const Standard_Real EpsG1 = 0.001,const Standard_Real Percent = 0.01,const Standard_Real Maxlen = 10000);
  
  Standard_EXPORT     void ComputeAnalysis(GeomLProp_SLProps& Surf1,GeomLProp_SLProps& Surf2,const GeomAbs_Shape Order) ;
  
  Standard_EXPORT     Standard_Boolean IsDone() const;
  
  Standard_EXPORT     GeomAbs_Shape ContinuityStatus() const;
  
  Standard_EXPORT     LocalAnalysis_StatusErrorType StatusError() const;
  
  Standard_EXPORT     Standard_Real C0Value() const;
  
  Standard_EXPORT     Standard_Real C1UAngle() const;
  
  Standard_EXPORT     Standard_Real C1URatio() const;
  
  Standard_EXPORT     Standard_Real C1VAngle() const;
  
  Standard_EXPORT     Standard_Real C1VRatio() const;
  
  Standard_EXPORT     Standard_Real C2UAngle() const;
  
  Standard_EXPORT     Standard_Real C2URatio() const;
  
  Standard_EXPORT     Standard_Real C2VAngle() const;
  
  Standard_EXPORT     Standard_Real C2VRatio() const;
  
  Standard_EXPORT     Standard_Real G1Angle() const;
  
  Standard_EXPORT     Standard_Real G2CurvatureGap() const;
  
  Standard_EXPORT     Standard_Boolean IsC0() const;
  
  Standard_EXPORT     Standard_Boolean IsC1() const;
  
  Standard_EXPORT     Standard_Boolean IsC2() const;
  
  Standard_EXPORT     Standard_Boolean IsG1() const;
  
  Standard_EXPORT     Standard_Boolean IsG2() const;





protected:





private:

  
  Standard_EXPORT     void SurfC0(const GeomLProp_SLProps& Surf1,const GeomLProp_SLProps& Surf2) ;
  
  Standard_EXPORT     void SurfC1(GeomLProp_SLProps& Surf1,GeomLProp_SLProps& Surf2) ;
  
  Standard_EXPORT     void SurfC2(GeomLProp_SLProps& Surf1,GeomLProp_SLProps& Surf2) ;
  
  Standard_EXPORT     void SurfG1(GeomLProp_SLProps& Surf1,GeomLProp_SLProps& Surf2) ;
  
  Standard_EXPORT     void SurfG2(GeomLProp_SLProps& Surf1,GeomLProp_SLProps& Surf2) ;


Standard_Real myContC0;
Standard_Real myContC1U;
Standard_Real myContC1V;
Standard_Real myContC2U;
Standard_Real myContC2V;
Standard_Real myContG1;
Standard_Real myLambda1U;
Standard_Real myLambda2U;
Standard_Real myLambda1V;
Standard_Real myLambda2V;
Standard_Real myETA1;
Standard_Real myETA2;
Standard_Real myETA;
Standard_Real myZETA1;
Standard_Real myZETA2;
Standard_Real myZETA;
Standard_Real myAlpha;
GeomAbs_Shape myTypeCont;
Standard_Real myepsC0;
Standard_Real myepsnul;
Standard_Real myepsC1;
Standard_Real myepsC2;
Standard_Real myepsG1;
Standard_Real myperce;
Standard_Real mymaxlen;
Standard_Real myGap;
Standard_Boolean myIsDone;
LocalAnalysis_StatusErrorType myErrorStatus;


};





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


#endif