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