1 -- Created on: 1994-01-10
2 -- Created by: Yves FRICAUD
3 -- Copyright (c) 1994-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 BisecPC from Bisector
28 ---Purpose: Provides the bisector between a point and a curve.
29 -- the curvature on the curve has to be monoton.
30 -- the point can't be on the curve exept at the extremitys.
35 CurveType from GeomAbs,
40 SequenceOfReal from TColStd,
44 raises DomainError from Standard,
45 RangeError from Standard
48 Create returns mutable BisecPC;
50 Create (Cu : Curve from Geom2d;
53 DistMax : Real = 500 )
55 ---Purpose: Constructs the bisector between the point <P> and
57 -- <Side> = 1. if the bisector curve is on the Left of <Cu>
59 -- <DistMax> is used to trim the bisector.The distance
60 -- between the points of the bisector and <Cu> is smaller
63 returns mutable BisecPC from Bisector;
65 Create (Cu : Curve from Geom2d;
71 ---Purpose: Constructs the bisector between the point <P> and
72 -- the curve <Cu> Trimmed by <UMin> and <UMax>
73 -- <Side> = 1. if the bisector curve is on the Left of <Cu>
75 -- Warning: the bisector is supposed all over defined between
78 returns mutable BisecPC from Bisector;
80 Perform (me : mutable ;
81 Cu : Curve from Geom2d;
84 DistMax : Real = 500 )
86 ---Purpose: Construct the bisector between the point <P> and
88 -- <Side> = 1. if the bisector curve is on the Left of <Cu>
90 -- <DistMax> is used to trim the bisector.The distance
91 -- between the points of the bisector and <Cu> is smaller
98 IsExtendAtStart (me) returns Boolean from Standard
99 ---Purpose: Returns True if the bisector is extended at start.
102 IsExtendAtEnd (me) returns Boolean from Standard
103 ---Purpose: Returns True if the bisector is extended at end.
106 Reverse (me : mutable)
108 -- Changes the direction of parametrization of <me>.
109 -- The orientation of the curve is modified. If the curve
110 -- is bounded the StartPoint of the initial curve becomes the
111 -- EndPoint of the reversed curve and the EndPoint of the initial
112 -- curve becomes the StartPoint of the reversed curve.
115 ReversedParameter(me; U : Real) returns Real
116 ---Purpose: Returns the parameter on the reversed curve for
117 -- the point of parameter U on <me>.
120 Copy (me) returns mutable like me
123 Transform (me : mutable; T : Trsf2d)
125 -- Transformation of a geometric object. This tansformation
126 -- can be a translation, a rotation, a symmetry, a scaling
127 -- or a complex transformation obtained by combination of
128 -- the previous elementaries transformations.
131 IsCN (me; N : Integer) returns Boolean
132 --- Purpose : Returns the order of continuity of the curve.
134 --- Purpose : Raised if N < 0.
137 FirstParameter(me) returns Real
138 --- Purpose : Value of the first parameter.
141 LastParameter(me) returns Real
142 --- Purpose : Value of the last parameter.
145 Continuity(me) returns Shape from GeomAbs
148 NbIntervals(me ) returns Integer
149 ---Purpose: If necessary, breaks the curve in intervals of
150 -- continuity <C1>. And returns the number of
154 IntervalFirst(me ; Index : Integer from Standard ) returns Real
155 ---Purpose: Returns the first parameter of the current
159 IntervalLast (me ; Index : Integer from Standard ) returns Real
160 ---Purpose: Returns the last parameter of the current
164 IntervalContinuity(me) returns Shape from GeomAbs
167 IsClosed(me) returns Boolean
170 IsPeriodic(me) returns Boolean
182 Distance (me; U : Real) returns Real
183 ---Purpose: Returns the distance between the point of
184 -- parameter U on <me> and my point or my curve.
187 D0 (me; U : Real; P : out Pnt2d)
190 D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
193 D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
196 D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
199 DN (me; U : Real; N : Integer)
200 returns Vec2d from gp
203 Dump (me; Deep : Integer = 0; Offset : Integer = 0) is static;
205 LinkBisCurve (me ; U : Real) returns Real from Standard
206 ---Purpose: Returns the parameter on the curve1 of the projection
207 -- of the point of parameter U on <me>.
210 LinkCurveBis (me ; U : Real) returns Real from Standard
211 ---Purpose: Returns the reciproque of LinkBisCurve.
222 Parameter ( me ; P : Pnt2d from gp) returns Real
223 ---Purpose: Returns the parameter on <me> corresponding to <P>.
226 IsEmpty (me) returns Boolean from Standard
227 ---Purpose: Returns <True> if the bisector is empty.
230 ComputeIntervals (me : mutable)
231 ---Purpose: Computes the interval where the bisector is defined.
234 CuspFilter (me : mutable)
237 SearchBound( me ; U1,U2 : Real) returns Real
241 Curve : Curve from Geom2d;
242 Point : Pnt2d from gp;
243 Sign : Real from Standard;
244 StartIntervals : SequenceOfReal from TColStd;
245 EndIntervals : SequenceOfReal from TColStd;
246 BisInterval : Integer from Standard;
247 CurrentInterval: Integer from Standard;
248 ShiftParameter : Real from Standard;
249 DistMax : Real from Standard;
250 IsEmpty : Boolean from Standard;
251 IsConvex : Boolean from Standard;
252 ExtensionStart : Boolean from Standard;
253 ExtensionEnd : Boolean from Standard;
254 PointStartBis : Pnt2d from gp;
255 PointEndBis : Pnt2d from gp)
260 curve : Curve from Geom2d;
261 point : Pnt2d from gp;
262 sign : Real from Standard;
263 startIntervals : SequenceOfReal from TColStd;
264 endIntervals : SequenceOfReal from TColStd;
265 bisInterval : Integer from Standard;
266 currentInterval: Integer from Standard;
267 shiftParameter : Real from Standard;
268 distMax : Real from Standard;
269 isEmpty : Boolean from Standard;
270 isConvex : Boolean from Standard;
271 extensionStart : Boolean from Standard;
272 extensionEnd : Boolean from Standard;
273 pointStartBis : Pnt2d from gp;
274 pointEndBis : Pnt2d from gp;