42df5921f96e0e6ad2210009f462bd4103ccb52d
[occt.git] / src / IntRes2d / IntRes2d_IntersectionSegment.cdl
1 -- Created on: 1992-04-03
2 -- Created by: Laurent BUCHARD
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License 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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class IntersectionSegment from IntRes2d
18
19     ---Purpose: Definition of an intersection curve between
20     --          two 2D curves.
21
22 uses IntersectionPoint from IntRes2d
23
24 raises DomainError from Standard
25
26 is
27
28     Create
29
30         ---Purpose: Empty constructor.
31
32         returns IntersectionSegment from IntRes2d;
33
34
35     Create(P1,P2       : IntersectionPoint from IntRes2d; 
36            Oppos       : Boolean           from Standard;  
37            ReverseFlag : Boolean           from Standard)
38            
39         --Purpose: Creates   an    IntersectionSegment    from     two
40         --         IntersectionPoint.  Oppos is  FALSE if the  2 curves
41         --         have the same orientation.  if ReverseFlag is True,
42         --         P1 and P2 are the point on the  first curve, and on
43         --         the  second curve.  else, P1  is   the point on the
44         --         second curve and P2  the intersection point  on the
45         --         first curve.         
46
47         ---C++: inline
48     
49         returns IntersectionSegment from IntRes2d;
50         
51
52     Create(P          : IntersectionPoint from IntRes2d; 
53            First      : Boolean           from Standard; 
54            Oppos      : Boolean           from Standard; 
55            ReverseFlag: Boolean           from Standard)
56            
57         --Purpose: Creates  a  semi-infinite  segment of intersection.
58         --         if First is  set to True,  P is  the first point of
59         --         the segment. Otherwise P is  the  last point of the
60         --         segment.    P  belongs   to  the   first  curve  if
61         --         ReversedFlag is set  to False; otherwise it belongs
62         --         to the second curve.
63
64         ---C++: inline
65     
66         returns IntersectionSegment from IntRes2d;
67
68
69     Create(Oppos: Boolean from Standard)
70     
71         ---Purpose: Creates an infinite segment of intersection.
72
73         ---C++: inline
74
75         returns IntersectionSegment from IntRes2d;
76
77
78     IsOpposite(me)
79     
80         ---Purpose: Returns FALSE if the intersection segment has got
81         --          the same orientation on both curves.
82
83         ---C++: inline
84
85         returns Boolean from Standard
86         is static;
87         
88
89     HasFirstPoint(me)
90     
91         ---Purpose: Returns True if the segment is  limited by a first
92         --          point.   This  point defines  the lowest parameter
93         --          admitted on the first  curve for the  segment.  If
94         --          IsOpposite  returns  False, it  defines the lowest
95         --          parameter on the  second curve, otherwise,  it  is
96         --          the highest parameter on the second curve.
97
98         ---C++: inline
99
100         returns Boolean from Standard
101         is static;
102
103
104     FirstPoint(me)
105     
106         ---Purpose: Returns the  first point   of the segment    as an
107         --          IntersectionPoint (with    a    transition).   The
108         --          exception  DomainError  is raised if HasFirstPoint
109         --          returns False.
110
111         ---C++: inline
112         ---C++: return const &
113        
114         returns IntersectionPoint from IntRes2d
115         raises  DomainError       from Standard
116         is static;
117
118
119     HasLastPoint(me)
120     
121         ---Purpose: Returns True if the segment  is  limited by a last
122         --          point.  This point  defines  the highest parameter
123         --          admitted on the  first curve for  the segment.  If
124         --          IsOpposite returns  False, it  defines the highest
125         --          parameter on  the  second curve, otherwise, it  is
126         --          the lowest parameter on the second curve.
127
128         ---C++: inline
129
130         returns Boolean from Standard
131         is static;
132
133
134     LastPoint(me)
135     
136         ---Purpose: Returns   the  last point  of the    segment as an
137         --          IntersectionPoint   (with  a    transition).   The
138         --          exception        DomainError     is   raised    if
139         --          HasLastExtremity returns False.
140
141         ---C++: inline
142         ---C++: return const &
143        
144         returns IntersectionPoint from IntRes2d
145         raises  DomainError       from Standard
146         is static;
147         
148
149 fields
150
151     oppos   : Boolean           from Standard;
152     first   : Boolean           from Standard;
153     last    : Boolean           from Standard;
154     ptfirst : IntersectionPoint from IntRes2d;
155     ptlast  : IntersectionPoint from IntRes2d;
156
157 end IntersectionSegment;
158