1 -- File: MakeHypr2d.cdl
2 -- Created: Wed Aug 26 14:31:28 1992
5 ---Copyright: Matra Datavision 1992
7 class MakeHypr2d from gce inherits Root from gce
9 ---Purpose :This class implements the following algorithms used to
10 -- create a 2d Hyperbola from gp.
11 -- * Create a 2d Hyperbola from its center and two points:
12 -- one on its axis of symmetry giving the major radius, the
13 -- other giving the value of the small radius.
14 -- * Create a 2d Hyperbola from its major axis and its major
15 -- radius and its minor radius.
20 -- FirstConjugateBranch
23 -- --------------------- C ------------------------------>XAxis
27 -- SecondConjugateBranch
30 -- An axis placement (one axis) is associated with the hyperbola.
31 -- This axis is the "XAxis" or major axis of the hyperbola. It is
32 -- the symmetry axis of the main branch of hyperbola.
33 -- The "YAxis" is normal to this axis and pass throught its location
34 -- point. It is the minor axis.
36 -- The major radius is the distance between the Location point
37 -- of the hyperbola C and the vertex of the Main Branch (or the
38 -- Other branch). The minor radius is the distance between the
39 -- Location point of the hyperbola C and the vertex of the First
40 -- (or Second) Conjugate branch.
41 -- The major radius can be lower than the minor radius.
49 raises NotDone from StdFail
53 Create(S1,S2 : Pnt2d from gp;
54 Center : Pnt2d from gp) returns MakeHypr2d;
55 ---Purpose: Constructs a hyperbola
56 -- centered on the point Center, where:
57 -- - the major axis of the hyperbola is defined by Center and point S1,
58 -- - the major radius is the distance between Center and S1, and
59 -- - the minor radius is the distance between point S2 and the major axis.
61 Create (MajorAxis : Ax2d from gp ;
62 MajorRadius : Real from Standard;
63 MinorRadius : Real from Standard;
64 Sense : Boolean from Standard) returns MakeHypr2d;
65 --- Purpose : Constructs a hyperbola with major and minor radii MajorRadius and
66 -- MinorRadius, where:
67 -- - the center of the hyperbola is the origin of the axis MajorAxis, and
68 -- - the major axis is defined by MajorAxis if Sense
69 -- is true, or the opposite axis to MajorAxis if Sense is false; or
70 -- - centered on the origin of the coordinate system
71 -- A, with major and minor radii MajorRadius and
72 -- MinorRadius, where its major axis is the "X Axis"
73 -- of A (A is the local coordinate system of the hyperbola).
75 Create (A : Ax22d from gp ;
76 MajorRadius : Real from Standard;
77 MinorRadius : Real from Standard) returns MakeHypr2d;
78 --- Purpose :Creates a Hypr2d centered on the origin of the coordinate system
79 -- A, with major and minor radii MajorRadius and
80 -- MinorRadius, where its major axis is the "X Axis"
81 -- of A (A is the local coordinate system of the hyperbola).
84 Value(me) returns Hypr2d from gp
88 ---Purpose: Returns the constructed hyperbola.
89 -- Exceptions StdFail_NotDone if no hyperbola is constructed.
91 Operator(me) returns Hypr2d from gp
94 ---C++ : alias "Standard_EXPORT operator gp_Hypr2d() const;"
98 TheHypr2d : Hypr2d from gp;
99 --The solution from gp.