7fd59977 |
1 | -- File: Bisector_BisecPC.cdl |
2 | -- Created: Mon Jan 10 11:49:47 1994 |
3 | -- Author: Yves FRICAUD |
4 | -- <yfr@phylox> |
5 | ---Copyright: Matra Datavision 1994 |
6 | |
7 | |
8 | class BisecPC from Bisector |
9 | |
10 | inherits |
11 | |
12 | Curve from Bisector |
13 | ---Purpose: Provides the bisector between a point and a curve. |
14 | -- the curvature on the curve has to be monoton. |
15 | -- the point can't be on the curve exept at the extremitys. |
16 | -- |
17 | |
18 | uses |
19 | Shape from GeomAbs, |
20 | CurveType from GeomAbs, |
21 | Curve from Geom2d, |
22 | Geometry from Geom2d, |
23 | Pnt2d from gp, |
24 | Vec2d from gp, |
25 | SequenceOfReal from TColStd, |
26 | Trsf2d from gp |
27 | |
28 | |
29 | raises DomainError from Standard, |
30 | RangeError from Standard |
31 | is |
32 | |
33 | Create returns mutable BisecPC; |
34 | |
35 | Create (Cu : Curve from Geom2d; |
36 | P : Pnt2d from gp ; |
37 | Side : Real ; |
38 | DistMax : Real = 500 ) |
39 | |
40 | ---Purpose: Constructs the bisector between the point <P> and |
41 | -- the curve <Cu>. |
42 | -- <Side> = 1. if the bisector curve is on the Left of <Cu> |
43 | -- else <Side> = -1. |
44 | -- <DistMax> is used to trim the bisector.The distance |
45 | -- between the points of the bisector and <Cu> is smaller |
46 | -- than <DistMax>. |
47 | -- |
48 | returns mutable BisecPC from Bisector; |
49 | |
50 | Create (Cu : Curve from Geom2d; |
51 | P : Pnt2d from gp ; |
52 | Side : Real ; |
53 | UMin : Real ; |
54 | UMax : Real ) |
55 | |
56 | ---Purpose: Constructs the bisector between the point <P> and |
57 | -- the curve <Cu> Trimmed by <UMin> and <UMax> |
58 | -- <Side> = 1. if the bisector curve is on the Left of <Cu> |
59 | -- else <Side> = -1. |
60 | -- Warning: the bisector is supposed all over defined between |
61 | -- <UMin> and <UMax>. |
62 | |
63 | returns mutable BisecPC from Bisector; |
64 | |
65 | Perform (me : mutable ; |
66 | Cu : Curve from Geom2d; |
67 | P : Pnt2d from gp ; |
68 | Side : Real ; |
69 | DistMax : Real = 500 ) |
70 | |
71 | ---Purpose: Construct the bisector between the point <P> and |
72 | -- the curve <Cu>. |
73 | -- <Side> = 1. if the bisector curve is on the Left of <Cu> |
74 | -- else <Side> = -1. |
75 | -- <DistMax> is used to trim the bisector.The distance |
76 | -- between the points of the bisector and <Cu> is smaller |
77 | -- than <DistMax>. |
78 | |
79 | is static; |
80 | |
81 | |
82 | |
83 | IsExtendAtStart (me) returns Boolean from Standard |
84 | ---Purpose: Returns True if the bisector is extended at start. |
85 | is static; |
86 | |
87 | IsExtendAtEnd (me) returns Boolean from Standard |
88 | ---Purpose: Returns True if the bisector is extended at end. |
89 | is static; |
90 | |
91 | Reverse (me : mutable) |
92 | --- Purpose : |
93 | -- Changes the direction of parametrization of <me>. |
94 | -- The orientation of the curve is modified. If the curve |
95 | -- is bounded the StartPoint of the initial curve becomes the |
96 | -- EndPoint of the reversed curve and the EndPoint of the initial |
97 | -- curve becomes the StartPoint of the reversed curve. |
98 | is static; |
99 | |
100 | ReversedParameter(me; U : Real) returns Real |
101 | ---Purpose: Returns the parameter on the reversed curve for |
102 | -- the point of parameter U on <me>. |
103 | is static; |
104 | |
105 | Copy (me) returns mutable like me |
106 | is static; |
107 | |
108 | Transform (me : mutable; T : Trsf2d) |
109 | --- Purpose : |
110 | -- Transformation of a geometric object. This tansformation |
111 | -- can be a translation, a rotation, a symmetry, a scaling |
112 | -- or a complex transformation obtained by combination of |
113 | -- the previous elementaries transformations. |
114 | is static; |
115 | |
116 | IsCN (me; N : Integer) returns Boolean |
117 | --- Purpose : Returns the order of continuity of the curve. |
118 | raises RangeError |
119 | --- Purpose : Raised if N < 0. |
120 | is static; |
121 | |
122 | FirstParameter(me) returns Real |
123 | --- Purpose : Value of the first parameter. |
124 | is static; |
125 | |
126 | LastParameter(me) returns Real |
127 | --- Purpose : Value of the last parameter. |
128 | is static; |
129 | |
130 | Continuity(me) returns Shape from GeomAbs |
131 | is static; |
132 | |
133 | NbIntervals(me ) returns Integer |
134 | ---Purpose: If necessary, breaks the curve in intervals of |
135 | -- continuity <C1>. And returns the number of |
136 | -- intervals. |
137 | is static; |
138 | |
139 | IntervalFirst(me ; Index : Integer from Standard ) returns Real |
140 | ---Purpose: Returns the first parameter of the current |
141 | -- interval. |
142 | is static; |
143 | |
144 | IntervalLast (me ; Index : Integer from Standard ) returns Real |
145 | ---Purpose: Returns the last parameter of the current |
146 | -- interval. |
147 | is static; |
148 | |
149 | IntervalContinuity(me) returns Shape from GeomAbs |
150 | is static; |
151 | |
152 | IsClosed(me) returns Boolean |
153 | is static; |
154 | |
155 | IsPeriodic(me) returns Boolean |
156 | is static; |
157 | |
158 | Values (me ; |
159 | U : Real ; |
160 | N : Integer ; |
161 | P : in out Pnt2d ; |
162 | V1 : in out Vec2d ; |
163 | V2 : in out Vec2d ; |
164 | V3 : in out Vec2d ) |
165 | is static private; |
166 | |
167 | Distance (me; U : Real) returns Real |
168 | ---Purpose: Returns the distance between the point of |
169 | -- parameter U on <me> and my point or my curve. |
170 | is static; |
171 | |
172 | D0 (me; U : Real; P : out Pnt2d) |
173 | is static; |
174 | |
175 | D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp) |
176 | is static ; |
177 | |
178 | D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp) |
179 | is static; |
180 | |
181 | D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp) |
182 | is static; |
183 | |
184 | DN (me; U : Real; N : Integer) |
185 | returns Vec2d from gp |
186 | is static; |
187 | |
188 | Dump (me; Deep : Integer = 0; Offset : Integer = 0) is static; |
189 | |
190 | LinkBisCurve (me ; U : Real) returns Real from Standard |
191 | ---Purpose: Returns the parameter on the curve1 of the projection |
192 | -- of the point of parameter U on <me>. |
193 | is static; |
194 | |
195 | LinkCurveBis (me ; U : Real) returns Real from Standard |
196 | ---Purpose: Returns the reciproque of LinkBisCurve. |
197 | is static; |
198 | |
199 | Extension (me ; |
200 | U : Real ; |
201 | P : in out Pnt2d ; |
202 | V1 : in out Vec2d ; |
203 | V2 : in out Vec2d ; |
204 | V3 : in out Vec2d ) |
205 | is static private; |
206 | |
207 | Parameter ( me ; P : Pnt2d from gp) returns Real |
208 | ---Purpose: Returns the parameter on <me> corresponding to <P>. |
209 | is static; |
210 | |
211 | IsEmpty (me) returns Boolean from Standard |
212 | ---Purpose: Returns <True> if the bisector is empty. |
213 | is static; |
214 | |
215 | ComputeIntervals (me : mutable) |
216 | ---Purpose: Computes the interval where the bisector is defined. |
217 | is static private; |
218 | |
219 | CuspFilter (me : mutable) |
220 | is static private; |
221 | |
222 | SearchBound( me ; U1,U2 : Real) returns Real |
223 | is static private; |
224 | |
225 | Init (me : mutable; |
226 | Curve : Curve from Geom2d; |
227 | Point : Pnt2d from gp; |
228 | Sign : Real from Standard; |
229 | StartIntervals : SequenceOfReal from TColStd; |
230 | EndIntervals : SequenceOfReal from TColStd; |
231 | BisInterval : Integer from Standard; |
232 | CurrentInterval: Integer from Standard; |
233 | ShiftParameter : Real from Standard; |
234 | DistMax : Real from Standard; |
235 | IsEmpty : Boolean from Standard; |
236 | IsConvex : Boolean from Standard; |
237 | ExtensionStart : Boolean from Standard; |
238 | ExtensionEnd : Boolean from Standard; |
239 | PointStartBis : Pnt2d from gp; |
240 | PointEndBis : Pnt2d from gp) |
241 | is static private; |
242 | |
243 | fields |
244 | |
245 | curve : Curve from Geom2d; |
246 | point : Pnt2d from gp; |
247 | sign : Real from Standard; |
248 | startIntervals : SequenceOfReal from TColStd; |
249 | endIntervals : SequenceOfReal from TColStd; |
250 | bisInterval : Integer from Standard; |
251 | currentInterval: Integer from Standard; |
252 | shiftParameter : Real from Standard; |
253 | distMax : Real from Standard; |
254 | isEmpty : Boolean from Standard; |
255 | isConvex : Boolean from Standard; |
256 | extensionStart : Boolean from Standard; |
257 | extensionEnd : Boolean from Standard; |
258 | pointStartBis : Pnt2d from gp; |
259 | pointEndBis : Pnt2d from gp; |
260 | |
261 | end BisecPC; |