b311480e |
1 | -- Created on: 1992-09-28 |
2 | -- Created by: Remi GILET |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
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. |
10 | -- |
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. |
13 | -- |
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. |
20 | |
7fd59977 |
21 | |
22 | class MakeArcOfHyperbola from GCE2d inherits Root from GCE2d |
23 | ---Purpose: Implements construction algorithms for an arc of |
24 | -- hyperbola in the plane. The result is a Geom2d_TrimmedCurve curve. |
25 | -- A MakeArcOfHyperbola object provides a framework for: |
26 | -- - defining the construction of the arc of hyperbola, |
27 | -- - implementing the construction algorithm, and |
28 | -- - consulting the results. In particular, the Value |
29 | -- function returns the constructed arc of hyperbola. |
30 | |
31 | uses Pnt2d from gp, |
32 | Hypr2d from gp, |
33 | Real from Standard, |
34 | Boolean from Standard, |
35 | TrimmedCurve from Geom2d |
36 | |
37 | raises NotDone from StdFail |
38 | |
39 | is |
40 | |
41 | Create(Hypr : Hypr2d from gp ; |
42 | Alpha1, Alpha2 : Real from Standard ; |
43 | Sense : Boolean from Standard = Standard_True) |
44 | returns MakeArcOfHyperbola; |
45 | ---Purpose: Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from |
46 | -- a Hyperbola between two parameters Alpha1 and Alpha2. |
47 | |
48 | Create(Hypr : Hypr2d from gp ; |
49 | P : Pnt2d from gp ; |
50 | Alpha : Real from Standard ; |
51 | Sense : Boolean from Standard = Standard_True) |
52 | returns MakeArcOfHyperbola; |
53 | ---Purpose: Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from |
54 | -- a Hyperbola between point <P> and the parameter |
55 | -- Alpha. |
56 | |
57 | Create(Hypr : Hypr2d from gp ; |
58 | P1 : Pnt2d from gp ; |
59 | P2 : Pnt2d from gp ; |
60 | Sense : Boolean from Standard = Standard_True) |
61 | returns MakeArcOfHyperbola; |
62 | ---Purpose: Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from |
63 | -- a Hyperbola between two points P1 and P2. |
64 | -- Note: the orientation of the arc of hyperbola is: |
65 | -- - the trigonometric sense if Sense is not defined or |
66 | -- is true (default value), or |
67 | -- - the opposite sense if Sense is false. |
68 | -- - IsDone always returns true. |
69 | |
70 | Value(me) returns TrimmedCurve from Geom2d |
71 | raises NotDone |
72 | is static; |
73 | ---C++: return const& |
74 | ---Purpose: Returns the constructed arc of hyperbola. |
75 | |
76 | Operator(me) returns TrimmedCurve from Geom2d |
77 | is static; |
78 | ---C++: return const& |
79 | ---C++: alias "Standard_EXPORT operator Handle_Geom2d_TrimmedCurve() const;" |
80 | |
81 | fields |
82 | |
83 | TheArc : TrimmedCurve from Geom2d; |
84 | --The solution from Geom2d. |
85 | |
86 | end MakeArcOfHyperbola; |