0024171: Eliminate CLang compiler warning -Wreorder
[occt.git] / src / TopTrans / TopTrans_SurfaceTransition.cdl
CommitLineData
b311480e 1-- Created on: 1992-01-30
2-- Created by: Didier PIFFAULT
3-- Copyright (c) 1992-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21-- xpu:4/3/97 implementation
7fd59977 22
23
24class SurfaceTransition from TopTrans
25
26 ---Purpose: This algorithm is used to compute the transition
27 -- of a 3D surface intersecting a topological surfacic
28 -- boundary on a 3D curve ( intersection curve ).
29 -- The boundary is described by a set of faces
30 -- each face is described by
31 -- - its support surface,
32 -- - an orientation defining its matter side.
33 -- The geometric elements are described locally at the
34 -- intersection point by a second order development.
35 -- A surface is described by the normal vector, the
36 -- principal directions and the principal curvatures.
37 -- A curve is described by the tangent, the normal
38 -- and the curvature.
39 -- The algorithm keeps track of the two faces elements
40 -- closest to the part of the curve "before" and "after"
41 -- the intersection, these two elements are updated
42 -- for each new face.
43 -- The position of the curve can be computed when at
44 -- least one surface element has been given, this
45 -- position is "In","Out" or "On" for the part of the
46 -- curve "Before" or "After" the intersection.
47
48uses
49 Pnt from gp,
50 Dir from gp,
51 State from TopAbs,
52 Orientation from TopAbs,
53 Array2OfReal from TColStd,
54 Array2OfOrientation from TopTrans
55is
56
57 Create returns SurfaceTransition from TopTrans;
58 ---Purpose: Create an empty Surface Transition.
59
60 Reset ( me : in out;
61 Tgt : Dir from gp; -- curve tangent at this point
62 Norm : Dir from gp; -- surface normal at this point
63 MaxD, MinD : Dir from gp; -- surface principal directions at this point
64 MaxCurv, MinCurv : in Real ); -- curvatures on surface at this point
65 ---Purpose: Initialize a Surface Transition with the local
66 -- description of the intersection curve and of the
67 -- reference surface.
68 -- PREQUESITORY : Norm oriented OUTSIDE "geometric matter"
69
70 Reset ( me : in out;
71 Tgt : Dir from gp;
72 Norm : Dir from gp );
73 ---Purpose: Initialize a Surface Transition with the local
74 -- description of a straight line.
75
76 Compare(me : in out;
77 Tole : Real; -- Cosine tolerance
78 Norm : Dir from gp; -- surface normal oriented at this point
79 MaxD, MinD : Dir from gp; -- surface principal directions at this point
80 MaxCurv, MinCurv : in Real; -- curvatures on surface at this point
81 S : Orientation from TopAbs;
82 O : Orientation from TopAbs );
83 ---Purpose: Add a face element to the boundary.
84 --
85 -- - S defines topological orientation for the face :
86 -- S FORWARD means: along the intersection curve on the
87 -- reference surface, transition states while crossing
88 -- the face are OUT,IN.
89 -- S REVERSED means states are IN,OUT.
90 -- S INTERNAL means states are IN,IN.
91 --
92 -- - O defines curve's position on face :
93 -- O FORWARD means the face is before the intersection
94 -- O REVERSED means the face is AFTER
95 -- O INTERNAL means the curve intersection is in the face.
96 -- PREQUESITORY : Norm oriented OUTSIDE "geometric matter"
97
98 Compare(me : in out;
99 Tole : Real;
100 Norm : Dir from gp;
101 S : Orientation from TopAbs;
102 O : Orientation from TopAbs);
103 ---Purpose: Add a plane or a cylindric face to the boundary.
104
105 StateBefore(me) returns State from TopAbs;
106 ---Purpose: Returns the state of the reference surface before
107 -- the interference, this is the position relative to
108 -- the surface of a point very close to the intersection
109 -- on the negative side of the tangent.
110
111 StateAfter(me) returns State from TopAbs;
112 ---Purpose: Returns the state of the reference surface after
113 -- interference, this is the position relative to the
114 -- surface of a point very close to the intersection
115 -- on the positive side of the tangent.
116
117 --
118 -- Private :
119 --
120
121 UpdateReference(me : in out;
122 Tole : Real;
123 isInfRef : Boolean;
124 CosInf, CosSup : in out Real;
125 Tran : Orientation from TopAbs;
126 TranRef : in out Orientation from TopAbs) is private;
127
128 ComputeCos(me;
129 Tole : Real; -- cosinus tolerance
130 Norm : Dir from gp; -- face normal
131 O : Orientation from TopAbs; -- intersection position on face
132 isleft : out Boolean) returns Real is private;
133
134 GetBefore(myclass;
135 Tran : Orientation from TopAbs)
136 returns State from TopAbs;
137
138 GetAfter(myclass;
139 Tran : Orientation from TopAbs)
140 returns State from TopAbs;
141
142fields
143
144 -- local reference input data :
145 myTgt : Dir from gp; -- intersection curve tangent
146 myNorm : Dir from gp; -- reference surface normal
147 beafter : Dir from gp; -- direction (Before, After) on reference surface.
148 myCurvRef : Real; -- for the reference surface
149
150 -- local data for boundary faces :
151 myAng : Array2OfReal from TColStd;
152 myCurv : Array2OfReal from TColStd;
153 myOri : Array2OfOrientation from TopTrans;
154
155 -- flag for touch case (eap Mar 25 2002)
156 myTouchFlag : Boolean from Standard;
157
158end SurfaceTransition;
159
160