1 -- Created on: 1994-01-10
2 -- Created by: Yves FRICAUD
3 -- Copyright (c) 1994-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class BisecPC from Bisector
22 ---Purpose: Provides the bisector between a point and a curve.
23 -- the curvature on the curve has to be monoton.
24 -- the point can't be on the curve exept at the extremitys.
29 CurveType from GeomAbs,
34 SequenceOfReal from TColStd,
38 raises DomainError from Standard,
39 RangeError from Standard
42 Create returns BisecPC;
44 Create (Cu : Curve from Geom2d;
47 DistMax : Real = 500 )
49 ---Purpose: Constructs the bisector between the point <P> and
51 -- <Side> = 1. if the bisector curve is on the Left of <Cu>
53 -- <DistMax> is used to trim the bisector.The distance
54 -- between the points of the bisector and <Cu> is smaller
57 returns BisecPC from Bisector;
59 Create (Cu : Curve from Geom2d;
65 ---Purpose: Constructs the bisector between the point <P> and
66 -- the curve <Cu> Trimmed by <UMin> and <UMax>
67 -- <Side> = 1. if the bisector curve is on the Left of <Cu>
69 -- Warning: the bisector is supposed all over defined between
72 returns BisecPC from Bisector;
74 Perform (me : mutable ;
75 Cu : Curve from Geom2d;
78 DistMax : Real = 500 )
80 ---Purpose: Construct the bisector between the point <P> and
82 -- <Side> = 1. if the bisector curve is on the Left of <Cu>
84 -- <DistMax> is used to trim the bisector.The distance
85 -- between the points of the bisector and <Cu> is smaller
92 IsExtendAtStart (me) returns Boolean from Standard
93 ---Purpose: Returns True if the bisector is extended at start.
96 IsExtendAtEnd (me) returns Boolean from Standard
97 ---Purpose: Returns True if the bisector is extended at end.
100 Reverse (me : mutable)
102 -- Changes the direction of parametrization of <me>.
103 -- The orientation of the curve is modified. If the curve
104 -- is bounded the StartPoint of the initial curve becomes the
105 -- EndPoint of the reversed curve and the EndPoint of the initial
106 -- curve becomes the StartPoint of the reversed curve.
109 ReversedParameter(me; U : Real) returns Real
110 ---Purpose: Returns the parameter on the reversed curve for
111 -- the point of parameter U on <me>.
114 Copy (me) returns like me
117 Transform (me : mutable; T : Trsf2d)
119 -- Transformation of a geometric object. This tansformation
120 -- can be a translation, a rotation, a symmetry, a scaling
121 -- or a complex transformation obtained by combination of
122 -- the previous elementaries transformations.
125 IsCN (me; N : Integer) returns Boolean
126 --- Purpose : Returns the order of continuity of the curve.
128 --- Purpose : Raised if N < 0.
131 FirstParameter(me) returns Real
132 --- Purpose : Value of the first parameter.
135 LastParameter(me) returns Real
136 --- Purpose : Value of the last parameter.
139 Continuity(me) returns Shape from GeomAbs
142 NbIntervals(me ) returns Integer
143 ---Purpose: If necessary, breaks the curve in intervals of
144 -- continuity <C1>. And returns the number of
148 IntervalFirst(me ; Index : Integer from Standard ) returns Real
149 ---Purpose: Returns the first parameter of the current
153 IntervalLast (me ; Index : Integer from Standard ) returns Real
154 ---Purpose: Returns the last parameter of the current
158 IntervalContinuity(me) returns Shape from GeomAbs
161 IsClosed(me) returns Boolean
164 IsPeriodic(me) returns Boolean
176 Distance (me; U : Real) returns Real
177 ---Purpose: Returns the distance between the point of
178 -- parameter U on <me> and my point or my curve.
181 D0 (me; U : Real; P : out Pnt2d)
184 D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
187 D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
190 D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
193 DN (me; U : Real; N : Integer)
194 returns Vec2d from gp
197 Dump (me; Deep : Integer = 0; Offset : Integer = 0) is static;
199 LinkBisCurve (me ; U : Real) returns Real from Standard
200 ---Purpose: Returns the parameter on the curve1 of the projection
201 -- of the point of parameter U on <me>.
204 LinkCurveBis (me ; U : Real) returns Real from Standard
205 ---Purpose: Returns the reciproque of LinkBisCurve.
216 Parameter ( me ; P : Pnt2d from gp) returns Real
217 ---Purpose: Returns the parameter on <me> corresponding to <P>.
220 IsEmpty (me) returns Boolean from Standard
221 ---Purpose: Returns <True> if the bisector is empty.
224 ComputeIntervals (me : mutable)
225 ---Purpose: Computes the interval where the bisector is defined.
228 CuspFilter (me : mutable)
231 SearchBound( me ; U1,U2 : Real) returns Real
235 Curve : Curve from Geom2d;
236 Point : Pnt2d from gp;
237 Sign : Real from Standard;
238 StartIntervals : SequenceOfReal from TColStd;
239 EndIntervals : SequenceOfReal from TColStd;
240 BisInterval : Integer from Standard;
241 CurrentInterval: Integer from Standard;
242 ShiftParameter : Real from Standard;
243 DistMax : Real from Standard;
244 IsEmpty : Boolean from Standard;
245 IsConvex : Boolean from Standard;
246 ExtensionStart : Boolean from Standard;
247 ExtensionEnd : Boolean from Standard;
248 PointStartBis : Pnt2d from gp;
249 PointEndBis : Pnt2d from gp)
254 curve : Curve from Geom2d;
255 point : Pnt2d from gp;
256 sign : Real from Standard;
257 startIntervals : SequenceOfReal from TColStd;
258 endIntervals : SequenceOfReal from TColStd;
259 bisInterval : Integer from Standard;
260 currentInterval: Integer from Standard;
261 shiftParameter : Real from Standard;
262 distMax : Real from Standard;
263 isEmpty : Boolean from Standard;
264 isConvex : Boolean from Standard;
265 extensionStart : Boolean from Standard;
266 extensionEnd : Boolean from Standard;
267 pointStartBis : Pnt2d from gp;
268 pointEndBis : Pnt2d from gp;