summaryrefslogtreecommitdiff
path: root/inc/gce_MakeHypr.hxx
blob: b4d3bdefe08b15a65623c98d4edf0ece62d3cd45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _gce_MakeHypr_HeaderFile
#define _gce_MakeHypr_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _gp_Hypr_HeaderFile
#include <gp_Hypr.hxx>
#endif
#ifndef _gce_Root_HeaderFile
#include <gce_Root.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
class StdFail_NotDone;
class gp_Ax2;
class gp_Pnt;
class gp_Hypr;


//!This class implements the following algorithms used to <br>
//!          create Hyperbola from gp. <br>
//!          * Create an Hyperbola from its center, and two points: <br>
//!            one on its axis of symmetry giving the major radius, the <br>
//!            other giving the value of the small radius. <br>
//!            The three points give the plane of the hyperbola. <br>
//!          * Create an hyperbola from its axisplacement and its <br>
//!            MajorRadius and its MinorRadius. <br>
//! <br>
//! <br>
//!                         ^YAxis <br>
//!                         | <br>
//!                  FirstConjugateBranch <br>
//!                         | <br>
//!        Other            |                Main <br>
//!   --------------------- C ------------------------------>XAxis <br>
//!        Branch           |                Branch <br>
//!                         | <br>
//!                         | <br>
//!                   SecondConjugateBranch <br>
//!                         | <br>
class gce_MakeHypr  : public gce_Root {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  
//!  A2 is the local coordinate system of the hyperbola. <br>
//!  In the local coordinates system A2 the equation of the <br>
//!  hyperbola is : <br>
//!  X*X / MajorRadius*MajorRadius - Y*Y / MinorRadius*MinorRadius = 1.0 <br>
//!  It is not forbidden to create an Hyperbola with MajorRadius = <br>
//!  MinorRadius. <br>
//!  For the hyperbola the MajorRadius can be lower than the <br>
//!  MinorRadius. <br>
//!  The status is "NegativeRadius" if MajorRadius < 0.0 and <br>
//!  "InvertRadius" if MinorRadius > MajorRadius. <br>
  Standard_EXPORT   gce_MakeHypr(const gp_Ax2& A2,const Standard_Real MajorRadius,const Standard_Real MinorRadius);
  //! Constructs a hyperbola <br>
//!   -   centered on the point Center, where: <br>
//!  -   the plane of the hyperbola is defined by Center, S1 and S2, <br>
//!   -   its major axis is defined by Center and S1, <br>
//!   -   its major radius is the distance between Center and S1, and <br>
//! -   its minor radius is the distance between S2 and the major axis. <br>
//!	Warning <br>
//! If an error occurs (that is, when IsDone returns <br>
//! false), the Status function returns: <br>
//! -   gce_NegativeRadius if MajorRadius is less than 0.0; <br>
//! -   gce_InvertRadius if: <br>
//!   -   the major radius (computed with Center, S1) is <br>
//!    less than the minor radius (computed with Center, S1 and S2), or <br>
//!   -   MajorRadius is less than MinorRadius; or <br>
//! -   gce_ColinearPoints if S1, S2 and Center are collinear. <br>
  Standard_EXPORT   gce_MakeHypr(const gp_Pnt& S1,const gp_Pnt& S2,const gp_Pnt& Center);
  //! Returns the constructed hyperbola. <br>
//! Exceptions StdFail_NotDone if no hyperbola is constructed. <br>
  Standard_EXPORT    const gp_Hypr& Value() const;
  
  Standard_EXPORT    const gp_Hypr& Operator() const;
Standard_EXPORT operator gp_Hypr() const;





protected:





private:



gp_Hypr TheHypr;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif