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 MakeHyperbola from GC inherits Root from GC |
23 | |
24 | ---Purpose :This class implements construction algorithms for a hyperbola in |
25 | -- 3D space. The result is a Geom_Hyperbola hyperbola. |
26 | -- A MakeHyperbola object provides a framework for: |
27 | -- - defining the construction of the hyperbola, |
28 | -- - implementing the construction algorithm, and |
29 | -- - consulting the results. In particular, the Value |
30 | -- function returns the constructed hyperbola. |
31 | -- To define the main branch of an hyperbola. |
32 | -- The parameterization range is ]-infinite,+infinite[ |
33 | -- It is possible to get the other branch and the two conjugate |
34 | -- branches of the main branch. |
35 | -- |
36 | -- ^YAxis |
37 | -- | |
38 | -- FirstConjugateBranch |
39 | -- | |
40 | -- Other | Main |
41 | -- --------------------- C ------------------------------>XAxis |
42 | -- Branch | Branch |
43 | -- | |
44 | -- SecondConjugateBranch |
45 | -- | |
46 | -- |
47 | -- The major radius is the distance between the Location point |
48 | -- of the hyperbola C and the apex of the Main Branch (or the |
49 | -- Other branch). The major axis is the XAxis. |
50 | -- The minor radius is the distance between the Location point |
51 | -- of the hyperbola C and the apex of the First (or Second) |
52 | -- Conjugate branch. The minor axis is the YAxis. |
53 | -- The major radius can be lower than the minor radius. |
54 | |
55 | uses Pnt from gp, |
56 | Hypr from gp, |
57 | Ax2 from gp, |
58 | Hyperbola from Geom |
59 | |
60 | raises NotDone from StdFail |
61 | |
62 | is |
63 | |
64 | Create (H : Hypr from gp) returns MakeHyperbola; |
65 | --- Purpose : |
66 | -- Creates an Hyperbola from a non persistent hyperbola from package gp by conversion. |
67 | |
68 | Create (A2 : Ax2 from gp ; |
69 | MajorRadius, MinorRadius : Real from Standard) returns MakeHyperbola; |
70 | --- Purpose : Constructs a hyperbola centered on the origin of the coordinate system |
71 | -- A2, with major and minor radii MajorRadius and MinorRadius, where: |
72 | -- the plane of the hyperbola is defined by the "X Axis" and "Y Axis" of A2, |
73 | -- - its major axis is the "X Axis" of A2. |
74 | |
75 | Create(S1,S2 : Pnt from gp; |
76 | Center : Pnt from gp) returns MakeHyperbola; |
77 | ---Purpose: Constructs a hyperbola centered on the point Center, where |
78 | -- - the plane of the hyperbola is defined by Center, S1 and S2, |
79 | -- - its major axis is defined by Center and S1, |
80 | -- - its major radius is the distance between Center and S1, and |
81 | -- - its minor radius is the distance between S2 and the major axis; |
82 | |
83 | Value(me) returns Hyperbola from Geom |
84 | raises NotDone |
85 | is static; |
86 | ---Purpose: Returns the constructed hyperbola. |
87 | -- Exceptions StdFail_NotDone if no hyperbola is constructed. |
88 | ---C++: return const& |
89 | |
90 | Operator(me) returns Hyperbola from Geom |
91 | is static; |
92 | ---C++: return const& |
93 | ---C++: alias "Standard_EXPORT operator Handle_Geom_Hyperbola() const;" |
94 | |
95 | fields |
96 | |
97 | TheHyperbola : Hyperbola from Geom; |
98 | --The solution from Geom. |
99 | |
100 | end MakeHyperbola; |