0024784: Move documentation in CDL files to proper location
[occt.git] / src / LProp / LProp_SLProps.cdl
CommitLineData
b311480e 1-- Created on: 1991-03-26
2-- Created by: Michel CHAUVAT
3-- Copyright (c) 1991-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17generic class SLProps from LProp (Surface as any;
18 Tool as any) -- as ToolSurface(Surface)
19 ---Purpose: Computation of Surface Local Properties:
20 -- - point,
21 -- - derivatives,
22 -- - tangents,
23 -- - normal,
24 -- - tangent plane,
25 -- - principal curvatures and their associated direction,
26 -- - mean curvature,
27 -- - Gaussian curvature.
28
29uses Dir from gp,
30 Pnt from gp,
31 Vec from gp,
32 Status from LProp
33
34raises BadContinuity, DomainError, OutOfRange, NotDefined
35
36is
37 Create(S: Surface; U, V: Real; N: Integer; Resolution: Real)
38 ---Purpose: Initializes the local properties of the surface <S>
39 -- for the parameter values (<U>, <V>).
40 -- The current point and the derivatives are
41 -- computed at the same time, which allows an
42 -- optimization of the computation time.
43 -- <N> indicates the maximum number of derivations to
44 -- be done (0, 1, or 2). For example, to compute
45 -- only the tangent, N should be equal to 1.
46 -- <Resolution> is the linear tolerance (it is used to test
47 -- if a vector is null).
48 returns SLProps
49 raises OutOfRange;
50 -- if N < 0 or N > 2.
51
52 Create(S: Surface; N: Integer; Resolution: Real)
53 ---Purpose: idem as previous constructor but without setting the value
54 -- of parameters <U> and <V>.
55 returns SLProps
56 raises OutOfRange;
57 -- if N < 0 or N > 2.
58
59 Create( N: Integer; Resolution: Real)
60 ---Purpose: idem as previous constructor but without setting the value
61 -- of parameters <U> and <V> and the surface.
62 -- the surface can have an empty constructor.
63
64 returns SLProps
65 raises OutOfRange;
66 -- if N < 0 or N > 2.
67
68 SetSurface(me : in out;S : Surface)
69 ---Purpose: Initializes the local properties of the surface S
70 -- for the new surface.
71 is static;
72
73 SetParameters(me: in out; U, V : Real)
74 ---Purpose: Initializes the local properties of the surface S
75 -- for the new parameter values (<U>, <V>).
76 is static;
77
78 Value(me) returns Pnt
79 ---Purpose: Returns the point.
80 ---C++: return const &
81 is static;
82
83 D1U(me: in out) returns Vec is static;
84 ---Purpose: Returns the first U derivative.
85 -- The derivative is computed if it has not been yet.
86 ---C++: return const &
87
88 D1V(me: in out) returns Vec is static;
89 ---Purpose: Returns the first V derivative.
90 -- The derivative is computed if it has not been yet.
91 ---C++: return const &
92
93 D2U(me: in out) returns Vec is static;
94 ---Purpose: Returns the second U derivatives
95 -- The derivative is computed if it has not been yet.
96 ---C++: return const &
97
98 D2V(me: in out) returns Vec is static;
99 ---Purpose: Returns the second V derivative.
100 -- The derivative is computed if it has not been yet.
101 ---C++: return const &
102
103 DUV(me: in out) returns Vec is static;
104 ---Purpose: Returns the second UV cross-derivative.
105 -- The derivative is computed if it has not been yet.
106 ---C++: return const &
107
108 IsTangentUDefined(me: in out) returns Boolean is static;
109 ---Purpose: returns True if the U tangent is defined.
110 -- For example, the tangent is not defined if the
111 -- two first U derivatives are null.
112
113 TangentU(me: in out; D : out Dir)
114 ---Purpose: Returns the tangent direction <D> on the iso-V.
115 raises NotDefined
116 -- if IsTangentUDefined() == False.
117 is static;
118
119 IsTangentVDefined(me: in out) returns Boolean is static;
120 ---Purpose: returns if the V tangent is defined.
121 -- For example, the tangent is not defined if the
122 -- two first V derivatives are null.
123
124 TangentV(me: in out; D : out Dir)
125 ---Purpose: Returns the tangent direction <D> on the iso-V.
126 raises NotDefined
127 -- if IsTangentVDefined() == False.
128 is static;
129
130 IsNormalDefined(me: in out) returns Boolean is static;
131 ---Purpose: Tells if the normal is defined.
132
133 Normal(me: in out) returns Dir
134 ---Purpose: Returns the normal direction.
135 ---C++: return const &
136 raises NotDefined
137 -- if IsNormalDefined() == False
138 is static;
139
140 IsCurvatureDefined(me: in out)
141 ---Purpose: returns True if the curvature is defined.
142 returns Boolean
143 raises BadContinuity
144 -- if the surface is not C2.
145 is static;
146
147 IsUmbilic(me: in out)
148 ---Purpose: returns True if the point is umbilic (i.e. if the
149 -- curvature is constant).
150 returns Boolean
151 raises NotDefined
152 -- if IsCurvatureDefined() == False
153 is static;
154
155 MaxCurvature(me : in out)
156 ---Purpose: Returns the maximum curvature
157 returns Real
158 raises NotDefined
159 -- if IsCurvatureDefined() == False.
160 is static;
161
162 MinCurvature(me : in out)
163 ---Purpose: Returns the minimum curvature
164 returns Real
165 raises NotDefined
166 -- if IsCurvatureDefined() == False.
167 is static;
168
169 CurvatureDirections(me: in out; MaxD, MinD : out Dir)
170 ---Purpose: Returns the direction of the maximum and minimum curvature
171 -- <MaxD> and <MinD>
172 raises NotDefined
173 -- if IsCurvatureDefined() == False
174 -- or IsUmbilic() == True.
175 is static;
176
177 MeanCurvature(me: in out)
178 ---Purpose: Returns the mean curvature.
179 returns Real
180 raises NotDefined
181 -- if IsCurvatureDefined() == False.
182 is static;
183
184 GaussianCurvature(me: in out)
185 ---Purpose: Returns the Gaussian curvature
186 returns Real
187 raises NotDefined
188 -- if IsCurvatureDefined() == False.
189 is static;
190
191fields
192
32ca7a51 193 mySurf : Surface;
194 myU : Real;
195 myV : Real;
196 myDerOrder : Integer;
197 myCN : Integer;
198 myLinTol : Real;
199
200 myPnt : Pnt from gp;
201 myD1u : Vec from gp;
202 myD1v : Vec from gp;
203 myD2u : Vec from gp;
204 myD2v : Vec from gp;
205 myDuv : Vec from gp;
206
207 myNormal : Dir from gp;
208 myMinCurv : Real;
209 myMaxCurv : Real;
210 myDirMinCurv : Dir from gp;
211 myDirMaxCurv : Dir from gp;
212 myMeanCurv : Real;
213 myGausCurv : Real;
214
215 mySignificantFirstDerivativeOrderU : Integer;
216 mySignificantFirstDerivativeOrderV : Integer;
217
218 myUTangentStatus : Status from LProp;
219 myVTangentStatus : Status from LProp;
220 myNormalStatus : Status from LProp;
221 myCurvatureStatus : Status from LProp;
7fd59977 222
223end SLProps;
224