1 -- Created on: 1992-04-27
2 -- Created by: Laurent BUCHARD
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 deferred class Intersection from IntRes2d
20 ---Purpose: Defines the root class of all the Intersections
21 -- between two 2D-Curves, and provides all the methods
22 -- about the results of the Intersections Algorithms.
25 uses IntersectionPoint from IntRes2d,
26 IntersectionSegment from IntRes2d,
27 SequenceOfIntersectionPoint from IntRes2d,
28 SequenceOfIntersectionSegment from IntRes2d
30 raises NotDone from StdFail,
31 OutOfRange from Standard
37 ---Purpose: Empty constructor.
42 Initialize(Other: Intersection from IntRes2d)
48 ---Purpose: returns TRUE when the computation was successful.
50 returns Boolean from Standard
56 ---Purpose: Returns TRUE if there is no intersection between the
58 -- The exception NotDone is raised if IsDone returns FALSE.
60 returns Boolean from Standard
61 raises NotDone from StdFail
67 ---Purpose: This function returns the number of intersection
68 -- points between the 2 curves.
69 -- The exception NotDone is raised if IsDone returns FALSE.
72 returns Integer from Standard
73 raises NotDone from StdFail
77 Point(me; N : Integer from Standard)
79 ---Purpose: This function returns the intersection point
81 -- The exception NotDone is raised if IsDone returns FALSE.
82 -- The exception OutOfRange is raised if (N <= 0)
86 returns IntersectionPoint from IntRes2d
87 ---C++: return const &
88 raises NotDone from StdFail,
89 OutOfRange from Standard
95 ---Purpose: This function returns the number of intersection
96 -- segments between the two curves.
97 -- The exception NotDone is raised if IsDone returns FALSE.
100 returns Integer from Standard
101 raises NotDone from StdFail
105 Segment(me; N : Integer)
107 ---Purpose: This function returns the intersection segment
109 -- The exception NotDone is raised if IsDone returns FALSE.
110 -- The exception OutOfRange is raised if (N <= 0)
111 -- or (N > NbPoints).
114 returns IntersectionSegment from IntRes2d
115 ---C++: return const &
116 raises NotDone from StdFail,
117 OutOfRange from Standard
122 SetValues(me: in out; Inter: Intersection from IntRes2d)
124 --Purpose: Copies the Inters values into the current object.
129 Append(me: in out; Inter : Intersection from IntRes2d;
130 FirstParam1: Real from Standard;
131 LastParam1 : Real from Standard;
132 FirstParam2: Real from Standard;
133 LastParam2 : Real from Standard)
135 --Purpose: Appends the Inters values to the current object
136 -- FirstParam and LastParam are the parameters of
137 -- the bounds of the parameter interval of the
143 Append(me: in out; Seg: IntersectionSegment from IntRes2d)
145 --Purpose: Appends a new Intersection Segment.
150 Append(me: in out; Pnt: IntersectionPoint from IntRes2d)
152 --Purpose: Appends a new Intersection Point.
157 Insert(me: in out; Pnt: IntersectionPoint from IntRes2d)
159 --Purpose: Inserts a new Intersection Point.
164 ResetFields(me: in out)
166 --Purpose: Resets all fields.
171 SetReversedParameters(me: in out; Reverseflag: Boolean from Standard)
173 --Purpose: Initialize the reverse flag. This flag is used to
174 -- determine if the first and second parameters have
175 -- to be swaped when the intersection points and
176 -- segments are created.
181 ReversedParameters(me)
183 --Purpose: Returns the value of the reverse flag.
185 returns Boolean from Standard
190 done : Boolean from Standard is protected;
191 reverse : Boolean from Standard;
192 lpnt : SequenceOfIntersectionPoint from IntRes2d;
193 lseg : SequenceOfIntersectionSegment from IntRes2d;