b311480e |
1 | -- Created on: 1997-05-28 |
2 | -- Created by: Xavier BENVENISTE |
3 | -- Copyright (c) 1997-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 CheckBSplineCurve from GeomLib |
18 | |
ff8178ef |
19 | ---Purpose: Checks for the end tangents : wether or not those |
20 | -- are reversed regarding the third or n-3rd control |
7fd59977 |
21 | |
22 | uses |
23 | Pnt from gp, |
24 | BSplineCurve from Geom, |
25 | BSplineCurve from Geom2d |
26 | |
27 | raises |
28 | |
29 | NotDone from StdFail, |
30 | OutOfRange from Standard |
31 | |
32 | is |
33 | |
34 | Create( Curve : BSplineCurve from Geom ; |
35 | Tolerance : Real from Standard ; |
36 | AngularTolerance : Real from Standard) |
37 | returns CheckBSplineCurve from GeomLib; |
38 | |
39 | IsDone(me) returns Boolean from Standard |
40 | ---C++: inline |
41 | is static; |
42 | |
43 | NeedTangentFix(me; FirstFlag : in out Boolean from Standard ; |
44 | SecondFlag : in out Boolean from Standard) ; |
45 | FixTangent (me : in out ; FirstFlag : Boolean from Standard ; |
46 | LastFlag : Boolean from Standard) ; |
47 | |
48 | FixedTangent (me : in out ; FirstFlag : Boolean from Standard ; |
49 | LastFlag : Boolean from Standard) |
50 | ---Purpose: modifies the curve |
51 | -- by fixing the first or the last tangencies |
52 | -- |
53 | returns BSplineCurve from Geom |
54 | raises |
55 | OutOfRange from Standard, |
56 | ---Purpose: if Index3D not in the Range [1,Nb3dSpaces] |
57 | NotDone from StdFail |
58 | ---Purpose: if the Approx is not Done |
59 | is static; |
60 | |
61 | |
62 | fields |
63 | |
64 | myCurve : BSplineCurve from Geom ; |
65 | myDone : Boolean from Standard ; |
66 | myFixFirstTangent : Boolean from Standard ; |
67 | myFixLastTangent : Boolean from Standard ; |
68 | myAngularTolerance : Real from Standard ; |
69 | myTolerance : Real from Standard ; |
70 | myFirstPole : Pnt from gp ; |
71 | -- the second pole that controls first tangency |
72 | myLastPole : Pnt from gp ; |
73 | -- the before last pole that controls last tangency |
74 | |
75 | end CheckBSplineCurve; |