1 -- Created on: 1992-08-26
2 -- Created by: Remi GILET
3 -- Copyright (c) 1992-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.
22 class MakeHypr2d from gce inherits Root from gce
24 ---Purpose :This class implements the following algorithms used to
25 -- create a 2d Hyperbola from gp.
26 -- * Create a 2d Hyperbola from its center and two points:
27 -- one on its axis of symmetry giving the major radius, the
28 -- other giving the value of the small radius.
29 -- * Create a 2d Hyperbola from its major axis and its major
30 -- radius and its minor radius.
35 -- FirstConjugateBranch
38 -- --------------------- C ------------------------------>XAxis
42 -- SecondConjugateBranch
45 -- An axis placement (one axis) is associated with the hyperbola.
46 -- This axis is the "XAxis" or major axis of the hyperbola. It is
47 -- the symmetry axis of the main branch of hyperbola.
48 -- The "YAxis" is normal to this axis and pass throught its location
49 -- point. It is the minor axis.
51 -- The major radius is the distance between the Location point
52 -- of the hyperbola C and the vertex of the Main Branch (or the
53 -- Other branch). The minor radius is the distance between the
54 -- Location point of the hyperbola C and the vertex of the First
55 -- (or Second) Conjugate branch.
56 -- The major radius can be lower than the minor radius.
64 raises NotDone from StdFail
68 Create(S1,S2 : Pnt2d from gp;
69 Center : Pnt2d from gp) returns MakeHypr2d;
70 ---Purpose: Constructs a hyperbola
71 -- centered on the point Center, where:
72 -- - the major axis of the hyperbola is defined by Center and point S1,
73 -- - the major radius is the distance between Center and S1, and
74 -- - the minor radius is the distance between point S2 and the major axis.
76 Create (MajorAxis : Ax2d from gp ;
77 MajorRadius : Real from Standard;
78 MinorRadius : Real from Standard;
79 Sense : Boolean from Standard) returns MakeHypr2d;
80 --- Purpose : Constructs a hyperbola with major and minor radii MajorRadius and
81 -- MinorRadius, where:
82 -- - the center of the hyperbola is the origin of the axis MajorAxis, and
83 -- - the major axis is defined by MajorAxis if Sense
84 -- is true, or the opposite axis to MajorAxis if Sense is false; or
85 -- - centered on the origin of the coordinate system
86 -- A, with major and minor radii MajorRadius and
87 -- MinorRadius, where its major axis is the "X Axis"
88 -- of A (A is the local coordinate system of the hyperbola).
90 Create (A : Ax22d from gp ;
91 MajorRadius : Real from Standard;
92 MinorRadius : Real from Standard) returns MakeHypr2d;
93 --- Purpose :Creates a Hypr2d centered on the origin of the coordinate system
94 -- A, with major and minor radii MajorRadius and
95 -- MinorRadius, where its major axis is the "X Axis"
96 -- of A (A is the local coordinate system of the hyperbola).
99 Value(me) returns Hypr2d from gp
102 ---C++: return const&
103 ---Purpose: Returns the constructed hyperbola.
104 -- Exceptions StdFail_NotDone if no hyperbola is constructed.
106 Operator(me) returns Hypr2d from gp
108 ---C++: return const&
109 ---C++ : alias "Standard_EXPORT operator gp_Hypr2d() const;"
113 TheHypr2d : Hypr2d from gp;
114 --The solution from gp.