b311480e |
1 | -- Created on: 1992-04-27 |
2 | -- Created by: Laurent BUCHARD |
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 | |
22 | |
23 | |
24 | |
25 | deferred class Intersection from IntRes2d |
26 | |
27 | |
28 | ---Purpose: Defines the root class of all the Intersections |
29 | -- between two 2D-Curves, and provides all the methods |
30 | -- about the results of the Intersections Algorithms. |
31 | |
32 | |
33 | uses IntersectionPoint from IntRes2d, |
34 | IntersectionSegment from IntRes2d, |
35 | SequenceOfIntersectionPoint from IntRes2d, |
36 | SequenceOfIntersectionSegment from IntRes2d |
37 | |
38 | raises NotDone from StdFail, |
39 | OutOfRange from Standard |
40 | |
41 | is |
42 | |
43 | Initialize |
44 | |
45 | ---Purpose: Empty constructor. |
46 | is protected; |
47 | ---C++:inline |
48 | |
49 | |
50 | Initialize(Other: Intersection from IntRes2d) |
51 | ---C++:inline |
52 | is protected; |
53 | |
54 | IsDone(me) |
55 | |
56 | ---Purpose: returns TRUE when the computation was successful. |
57 | ---C++: inline |
58 | returns Boolean from Standard |
59 | is static; |
60 | |
61 | |
62 | IsEmpty(me) |
63 | |
64 | ---Purpose: Returns TRUE if there is no intersection between the |
65 | -- given arguments. |
66 | -- The exception NotDone is raised if IsDone returns FALSE. |
67 | ---C++: inline |
68 | returns Boolean from Standard |
69 | raises NotDone from StdFail |
70 | is static; |
71 | |
72 | |
73 | NbPoints(me) |
74 | |
75 | ---Purpose: This function returns the number of intersection |
76 | -- points between the 2 curves. |
77 | -- The exception NotDone is raised if IsDone returns FALSE. |
78 | ---C++: inline |
79 | |
80 | returns Integer from Standard |
81 | raises NotDone from StdFail |
82 | is static; |
83 | |
84 | |
85 | Point(me; N : Integer from Standard) |
86 | |
87 | ---Purpose: This function returns the intersection point |
88 | -- of range N; |
89 | -- The exception NotDone is raised if IsDone returns FALSE. |
90 | -- The exception OutOfRange is raised if (N <= 0) |
91 | -- or (N > NbPoints). |
92 | ---C++: inline |
93 | |
94 | returns IntersectionPoint from IntRes2d |
95 | ---C++: return const & |
96 | raises NotDone from StdFail, |
97 | OutOfRange from Standard |
98 | is static; |
99 | |
100 | |
101 | NbSegments(me) |
102 | |
103 | ---Purpose: This function returns the number of intersection |
104 | -- segments between the two curves. |
105 | -- The exception NotDone is raised if IsDone returns FALSE. |
106 | ---C++: inline |
107 | |
108 | returns Integer from Standard |
109 | raises NotDone from StdFail |
110 | is static; |
111 | |
112 | |
113 | Segment(me; N : Integer) |
114 | |
115 | ---Purpose: This function returns the intersection segment |
116 | -- of range N; |
117 | -- The exception NotDone is raised if IsDone returns FALSE. |
118 | -- The exception OutOfRange is raised if (N <= 0) |
119 | -- or (N > NbPoints). |
120 | ---C++: inline |
121 | |
122 | returns IntersectionSegment from IntRes2d |
123 | ---C++: return const & |
124 | raises NotDone from StdFail, |
125 | OutOfRange from Standard |
126 | is static; |
127 | |
128 | |
129 | |
130 | SetValues(me: in out; Inter: Intersection from IntRes2d) |
131 | |
132 | --Purpose: Copies the Inters values into the current object. |
133 | |
134 | is static protected; |
135 | |
136 | |
137 | Append(me: in out; Inter : Intersection from IntRes2d; |
138 | FirstParam1: Real from Standard; |
139 | LastParam1 : Real from Standard; |
140 | FirstParam2: Real from Standard; |
141 | LastParam2 : Real from Standard) |
142 | |
143 | --Purpose: Appends the Inters values to the current object |
144 | -- FirstParam and LastParam are the parameters of |
145 | -- the bounds of the parameter interval of the |
146 | -- curves. |
147 | |
148 | is static protected; |
149 | |
150 | |
151 | Append(me: in out; Seg: IntersectionSegment from IntRes2d) |
152 | |
153 | --Purpose: Appends a new Intersection Segment. |
154 | ---C++: inline |
155 | is static protected; |
156 | |
157 | |
158 | Append(me: in out; Pnt: IntersectionPoint from IntRes2d) |
159 | |
160 | --Purpose: Appends a new Intersection Point. |
161 | ---C++: inline |
162 | is static protected; |
163 | |
164 | |
165 | Insert(me: in out; Pnt: IntersectionPoint from IntRes2d) |
166 | |
167 | --Purpose: Inserts a new Intersection Point. |
168 | |
169 | is static protected; |
170 | |
171 | |
172 | ResetFields(me: in out) |
173 | |
174 | --Purpose: Resets all fields. |
175 | ---C++: inline |
176 | is static protected; |
177 | |
178 | |
179 | SetReversedParameters(me: in out; Reverseflag: Boolean from Standard) |
180 | |
181 | --Purpose: Initialize the reverse flag. This flag is used to |
182 | -- determine if the first and second parameters have |
183 | -- to be swaped when the intersection points and |
184 | -- segments are created. |
185 | ---C++: inline |
186 | is static; |
187 | |
188 | |
189 | ReversedParameters(me) |
190 | |
191 | --Purpose: Returns the value of the reverse flag. |
192 | ---C++: inline |
193 | returns Boolean from Standard |
194 | is static protected; |
195 | |
196 | fields |
197 | |
198 | done : Boolean from Standard is protected; |
199 | reverse : Boolean from Standard; |
200 | lpnt : SequenceOfIntersectionPoint from IntRes2d; |
201 | lseg : SequenceOfIntersectionSegment from IntRes2d; |
202 | |
203 | end Intersection; |
204 | |