1 -- Created on: 1992-04-06
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1992-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 RLine from IntPatch
26 inherits Line from IntPatch
28 ---Purpose: Implementation of an intersection line described by a
29 -- restriction line on one of the surfaces.
33 HCurve2d from Adaptor2d,
35 SequenceOfPoint from IntPatch,
36 TypeTrans from IntSurf,
37 Situation from IntSurf,
41 raises DomainError from Standard,
42 OutOfRange from Standard
46 Create(Tang: Boolean from Standard;
47 Trans1,Trans2: TypeTrans from IntSurf)
49 ---Purpose: Creates a restriction as an intersection line
50 -- when the transitions are In or Out.
52 returns mutable RLine from IntPatch;
55 Create(Tang: Boolean from Standard;
56 Situ1,Situ2: Situation from IntSurf)
58 ---Purpose: Creates a restriction as an intersection line
59 -- when the transitions are Touch.
61 returns mutable RLine from IntPatch;
64 Create(Tang: Boolean from Standard)
66 ---Purpose: Creates a restriction as an intersection line
67 -- when the transitions are Undecided.
69 returns mutable RLine from IntPatch;
72 AddVertex(me: mutable; Pnt: Point from IntPatch)
74 ---Purpose: To add a vertex in the list.
81 Replace(me: mutable; Index: Integer from Standard; Pnt: Point from IntPatch)
83 ---Purpose: Replaces the element of range Index in the list
88 raises OutOfRange from Standard
89 --- The exception OutOfRange is raised when Index <= 0
90 -- or Index > NbVertex.
95 SetFirstPoint(me: mutable; IndFirst: Integer from Standard) is static;
100 SetLastPoint(me: mutable; IndLast: Integer from Standard) is static;
105 Add(me: mutable; L: LineOn2S from IntSurf)
114 ---Purpose: Returns True if the intersection is on the domain of the
116 -- Returns False if the intersection is on the domain of
119 returns Boolean from Standard
126 ---Purpose: Returns True if the intersection is on the domain of the
128 -- Returns False if the intersection is on the domain of
131 returns Boolean from Standard
136 SetArcOnS1(me: mutable; A: HCurve2d from Adaptor2d)
140 SetArcOnS2(me: mutable; A: HCurve2d from Adaptor2d)
144 SetParamOnS1(me: mutable; p1,p2: Real from Standard)
145 --- first and last parameters on the restriction of the first
149 SetParamOnS2(me: mutable; p1,p2: out Real from Standard)
150 --- first and last parameters on the restriction of the first
156 ---Purpose: Returns the concerned arc.
158 returns HCurve2d from Adaptor2d
160 ---C++: return const&
162 raises DomainError from Standard
168 ---Purpose: Returns the concerned arc.
170 returns HCurve2d from Adaptor2d
172 ---C++: return const&
174 raises DomainError from Standard
178 ParamOnS1(me; p1,p2: out Real from Standard)
179 --- first and last parameters on the restriction of the first
183 ParamOnS2(me; p1,p2: out Real from Standard)
184 --- first and last parameters on the restriction of the first
190 ---Purpose: Returns True if the line has a known First point.
191 -- This point is given by the method FirstPoint().
193 returns Boolean from Standard
201 ---Purpose: Returns True if the line has a known Last point.
202 -- This point is given by the method LastPoint().
204 returns Boolean from Standard
212 ---Purpose: Returns the IntPoint corresponding to the FirstPoint.
213 -- An exception is raised when HasFirstPoint returns False.
215 returns Point from IntPatch
217 ---C++: return const&
219 raises DomainError from Standard
226 ---Purpose: Returns the IntPoint corresponding to the LastPoint.
227 -- An exception is raised when HasLastPoint returns False.
229 returns Point from IntPatch
231 ---C++: return const&
233 raises DomainError from Standard
240 returns Integer from Standard
246 Vertex(me; Index: Integer from Standard)
248 ---Purpose: Returns the vertex of range Index on the line.
250 returns Point from IntPatch
252 ---C++: return const&
254 raises OutOfRange from Standard
255 --- The exception OutOfRange is raised if Index <= 0 or
263 returns Boolean from Standard
271 ---Purpose: Returns the number of intersection points.
273 returns Integer from Standard
276 raises DomainError from Standard
277 --- The exception DomainError is raised if HasPolygon returns False.
282 Point(me; Index: Integer from Standard)
284 ---Purpose: Returns the intersection point of range Index.
286 returns PntOn2S from IntSurf
288 ---C++: return const&
290 raises OutOfRange from Standard,
291 DomainError from Standard
292 --- The exception DomainError is raised if HasPolygon returns False.
293 --- The exception OutOfRange is raised if Index <= 0 or Index > NbPnts.
298 SetPoint(me:mutable; Index: Integer from Standard; Pnt: Point from IntPatch)
300 ---Purpose: Set the Point of index <Index> in the LineOn2S
304 ComputeVertexParameters(me: mutable; Tol:Real from Standard)
306 ---Purpose: Set the parameters of all the vertex on the line.
307 -- if a vertex is already in the line,
308 -- its parameter is modified
309 -- else a new point in the line is inserted.
315 theArcOnS1 : HCurve2d from Adaptor2d;
316 theArcOnS2 : HCurve2d from Adaptor2d;
317 onS1 : Boolean from Standard;
318 onS2 : Boolean from Standard;
320 ParamInf1 : Real from Standard;
321 ParamSup1 : Real from Standard;
322 ParamInf2 : Real from Standard;
323 ParamSup2 : Real from Standard;
325 curv : LineOn2S from IntSurf;
326 fipt : Boolean from Standard;
327 lapt : Boolean from Standard;
328 indf : Integer from Standard;
329 indl : Integer from Standard;
330 svtx : SequenceOfPoint from IntPatch;