1 -- Created on: 1995-05-29
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
23 class CurveShapeIntersector from LocOpe
25 ---Purpose: This class provides the intersection between an
26 -- axis or a circle and the faces of a shape. The
27 -- intersection points are sorted in increasing
28 -- parameter along the axis.
31 uses SequenceOfPntFace from LocOpe,
35 Orientation from TopAbs,
39 raises NotDone from StdFail,
40 OutOfRange from Standard
45 ---Purpose: Empty constructor.
46 returns CurveShapeIntersector from LocOpe;
50 Create(Axis: Ax1 from gp; S:Shape from TopoDS)
51 ---Purpose: Creates and performs the intersection betwwen
54 returns CurveShapeIntersector from LocOpe;
57 Create(C: Circ from gp; S:Shape from TopoDS)
58 ---Purpose: Creates and performs yte intersection betwwen
61 returns CurveShapeIntersector from LocOpe;
64 Init(me: in out;Axis: Ax1 from gp; S:Shape from TopoDS)
65 ---Purpose: Performs the intersection between <Ax1 and <S>.
69 Init(me: in out;C: Circ from gp; S:Shape from TopoDS)
70 ---Purpose: Performs the intersection between <Ax1 and <S>.
75 ---Purpose: Returns <Standard_True> if the intersection has
77 returns Boolean from Standard
83 ---Purpose: Returns the number of intersection point.
84 returns Integer from Standard
86 raises NotDone from StdFail
87 -- The exception is raised when IsDone returns <Standard_False>.
91 Point(me; Index: Integer from Standard)
93 ---Purpose: Returns the intersection point of range <Index>.
94 -- The points are sorted in increasing order of
95 -- parameter along the axis.
97 returns PntFace from LocOpe
100 raises NotDone from StdFail,
101 OutOfRange from Standard
105 LocalizeAfter(me; From : Real from Standard;
106 Or : out Orientation from TopAbs;
107 IndFrom : out Integer from Standard;
108 IndTo : out Integer from Standard)
110 ---Purpose: Searches the first intersection point located
111 -- after the parameter <From>, wich orientation is
112 -- not TopAbs_EXTERNAL. If found, returns
113 -- <Standard_True>. <Or> contains the orientation of
114 -- the point, <IndFrom> and <IndTo> represents the
115 -- interval of index in the sequence of intersection
116 -- point corresponding to the point. (IndFrom <=
119 -- Otherwise, returns <Standard_False>.
121 returns Boolean from Standard
122 raises NotDone from StdFail
126 LocalizeBefore(me; From : Real from Standard;
127 Or : out Orientation from TopAbs;
128 IndFrom : out Integer from Standard;
129 IndTo : out Integer from Standard)
131 ---Purpose: Searches the first intersection point located
132 -- before the parameter <From>, wich orientation is
133 -- not TopAbs_EXTERNAL. If found, returns
134 -- <Standard_True>. <Or> contains the orientation of
135 -- the point, <IndFrom> and <IndTo> represents the
136 -- interval of index in the sequence of intersection
137 -- point corresponding to the point (IndFrom <=
140 -- Otherwise, returns <Standard_False>.
142 returns Boolean from Standard
143 raises NotDone from StdFail
147 LocalizeAfter(me; FromInd : Integer from Standard;
148 Or : out Orientation from TopAbs;
149 IndFrom : out Integer from Standard;
150 IndTo : out Integer from Standard)
152 ---Purpose: Searches the first intersection point located
153 -- after the index <FromInd> ( >= FromInd + 1), wich
154 -- orientation is not TopAbs_EXTERNAL. If found,
155 -- returns <Standard_True>. <Or> contains the
156 -- orientation of the point, <IndFrom> and <IndTo>
157 -- represents the interval of index in the sequence
158 -- of intersection point corresponding to the
159 -- point. (IndFrom <= IndTo).
161 -- Otherwise, returns <Standard_False>.
163 returns Boolean from Standard
164 raises NotDone from StdFail
168 LocalizeBefore(me; FromInd : Integer from Standard;
169 Or : out Orientation from TopAbs;
170 IndFrom : out Integer from Standard;
171 IndTo : out Integer from Standard)
173 ---Purpose: Searches the first intersection point located
174 -- before the index <FromInd> ( <= FromInd -1), wich
175 -- orientation is not TopAbs_EXTERNAL. If found,
176 -- returns <Standard_True>. <Or> contains the
177 -- orientation of the point, <IndFrom> and <IndTo>
178 -- represents the interval of index in the sequence
179 -- of intersection point corresponding to the point
180 -- (IndFrom <= IndTo).
182 -- Otherwise, returns <Standard_False>.
184 returns Boolean from Standard
185 raises NotDone from StdFail
190 myDone : Boolean from Standard;
191 myPoints : SequenceOfPntFace from LocOpe;
193 end CurveShapeIntersector;