b311480e |
1 | -- Created on: 1996-06-11 |
2 | -- Created by: Jacques GOUSSARD |
3 | -- Copyright (c) 1996-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 | |
22 | |
23 | |
24 | class CSIntersector from LocOpe |
25 | |
26 | ---Purpose: This class provides the intersection between a set |
27 | -- of axis or a circle and the faces of a shape. The |
28 | -- intersection points are sorted in increasing |
29 | -- parameter along each axis or circle. |
30 | |
31 | |
32 | uses Shape from TopoDS, |
33 | PntFace from LocOpe, |
34 | Orientation from TopAbs, |
35 | SequenceOfLin from LocOpe, |
36 | SequenceOfCirc from LocOpe, |
37 | SequenceOfCurve from TColGeom |
38 | |
39 | |
40 | raises NotDone from StdFail, |
41 | OutOfRange from Standard |
42 | |
43 | is |
44 | |
45 | Create |
46 | ---Purpose: Empty constructor. |
47 | returns CSIntersector from LocOpe; |
48 | ---C++: inline |
49 | |
50 | |
51 | Create(S:Shape from TopoDS) |
52 | ---Purpose: Creates and performs the intersection betwwen |
53 | -- <Ax1> and <S>. |
54 | ---C++: inline |
55 | returns CSIntersector from LocOpe; |
56 | |
57 | |
58 | Init(me: in out; S:Shape from TopoDS) |
59 | ---Purpose: Performs the intersection between <Ax1 and <S>. |
60 | is static; |
61 | |
62 | |
63 | Perform(me: in out; Slin: SequenceOfLin from LocOpe) |
64 | |
65 | is static; |
66 | |
67 | |
68 | Perform(me: in out; Scir: SequenceOfCirc from LocOpe) |
69 | |
70 | is static; |
71 | |
72 | |
73 | Perform(me: in out; Scur: SequenceOfCurve from TColGeom) |
74 | |
75 | is static; |
76 | |
77 | |
78 | IsDone(me) |
79 | ---Purpose: Returns <Standard_True> if the intersection has |
80 | -- been done. |
81 | returns Boolean from Standard |
82 | ---C++: inline |
83 | is static; |
84 | |
85 | |
86 | NbPoints(me; I: Integer from Standard) |
87 | ---Purpose: Returns the number of intersection point on the |
88 | -- element of range <I>. |
89 | returns Integer from Standard |
90 | raises NotDone from StdFail |
91 | -- The exception is raised when IsDone returns <Standard_False>. |
92 | is static; |
93 | |
94 | |
95 | Point(me; I: Integer from Standard; Index: Integer from Standard) |
96 | |
97 | ---Purpose: Returns the intersection point of range <Index> on |
98 | -- element of range <I>. The points are sorted in |
99 | -- increasing order of parameter along the axis. |
100 | |
101 | returns PntFace from LocOpe |
102 | ---C++: return const& |
103 | raises NotDone from StdFail, |
104 | OutOfRange from Standard |
105 | is static; |
106 | |
107 | |
108 | LocalizeAfter(me; I : Integer from Standard; |
109 | From : Real from Standard; |
110 | Tol : Real from Standard; |
111 | Or : out Orientation from TopAbs; |
112 | IndFrom : out Integer from Standard; |
113 | IndTo : out Integer from Standard) |
114 | |
115 | ---Purpose: On the element of range <I>, searches the first |
116 | -- intersection point located after the parameter |
117 | -- <From>, wich orientation is not TopAbs_EXTERNAL. |
118 | -- If found, returns <Standard_True>. <Or> contains |
119 | -- the orientation of the point, <IndFrom> and |
120 | -- <IndTo> represents the interval of index in the |
121 | -- sequence of intersection point corresponding to |
122 | -- the point. (IndFrom <= IndTo). <Tol> is used to |
123 | -- determine if 2 parameters are equal. |
124 | -- |
125 | -- Otherwise, returns <Standard_False>. |
126 | |
127 | returns Boolean from Standard |
128 | raises NotDone from StdFail |
129 | is static; |
130 | |
131 | |
132 | LocalizeBefore(me; I : Integer from Standard; |
133 | From : Real from Standard; |
134 | Tol : Real from Standard; |
135 | Or : out Orientation from TopAbs; |
136 | IndFrom : out Integer from Standard; |
137 | IndTo : out Integer from Standard) |
138 | |
139 | ---Purpose: On the element of range <I>, searches the first |
140 | -- intersection point located before the parameter |
141 | -- <From>, wich orientation is not TopAbs_EXTERNAL. |
142 | -- If found, returns <Standard_True>. <Or> contains |
143 | -- the orientation of the point, <IndFrom> and |
144 | -- <IndTo> represents the interval of index in the |
145 | -- sequence of intersection point corresponding to |
146 | -- the point (IndFrom <= IndTo). <Tol> is used to |
147 | -- determine if 2 parameters are equal. |
148 | -- |
149 | -- Otherwise, returns <Standard_False>. |
150 | |
151 | returns Boolean from Standard |
152 | raises NotDone from StdFail |
153 | is static; |
154 | |
155 | |
156 | LocalizeAfter(me; I : Integer from Standard; |
157 | FromInd : Integer from Standard; |
158 | Tol : Real from Standard; |
159 | Or : out Orientation from TopAbs; |
160 | IndFrom : out Integer from Standard; |
161 | IndTo : out Integer from Standard) |
162 | |
163 | ---Purpose: On the element of range <I>, searches the first |
164 | -- intersection point located after the index |
165 | -- <FromInd> ( >= FromInd + 1), wich orientation is |
166 | -- not TopAbs_EXTERNAL. If found, returns |
167 | -- <Standard_True>. <Or> contains the orientation of |
168 | -- the point, <IndFrom> and <IndTo> represents the |
169 | -- interval of index in the sequence of intersection |
170 | -- point corresponding to the point. (IndFrom <= |
171 | -- IndTo). <Tol> is used to determine if 2 parameters |
172 | -- are equal. |
173 | -- |
174 | -- Otherwise, returns <Standard_False>. |
175 | |
176 | returns Boolean from Standard |
177 | raises NotDone from StdFail |
178 | is static; |
179 | |
180 | |
181 | LocalizeBefore(me; I : Integer from Standard; |
182 | FromInd : Integer from Standard; |
183 | Tol : Real from Standard; |
184 | Or : out Orientation from TopAbs; |
185 | IndFrom : out Integer from Standard; |
186 | IndTo : out Integer from Standard) |
187 | |
188 | ---Purpose: On the element of range <I>, searches the first |
189 | -- intersection point located before the index |
190 | -- <FromInd> ( <= FromInd -1), wich orientation is |
191 | -- not TopAbs_EXTERNAL. If found, returns |
192 | -- <Standard_True>. <Or> contains the orientation of |
193 | -- the point, <IndFrom> and <IndTo> represents the |
194 | -- interval of index in the sequence of intersection |
195 | -- point corresponding to the point (IndFrom <= |
196 | -- IndTo). <Tol> is used to determine if 2 parameters |
197 | -- are equal. |
198 | -- |
199 | -- Otherwise, returns <Standard_False>. |
200 | |
201 | returns Boolean from Standard |
202 | raises NotDone from StdFail |
203 | is static; |
204 | |
205 | |
206 | Destroy(me: in out); |
207 | ---C++: alias ~ |
208 | |
209 | |
210 | fields |
211 | |
212 | myDone : Boolean from Standard; |
213 | myShape : Shape from TopoDS; |
214 | myPoints : Address from Standard; |
215 | myNbelem : Integer from Standard; |
216 | |
217 | end CSIntersector; |