summaryrefslogtreecommitdiff
path: root/inc/gce_MakePln.hxx
blob: 00caf1bd1105b4394e42863c876562e15048c815 (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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// 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_MakePln_HeaderFile
#define _gce_MakePln_HeaderFile

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

#ifndef _gp_Pln_HeaderFile
#include <gp_Pln.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_Dir;
class gp_Pln;
class gp_Ax1;


//! This class implements the following algorithms used <br>
//!           to create a Pln from gp. <br>
//!           * Create a Pln parallel to another and passing <br>
//!             through a point. <br>
//!           * Create a Pln passing through 3 points. <br>
//!           * Create a Pln by its normal. <br>
//!  Defines a non-persistent plane. <br>
//!  The plane is located in 3D space with an axis placement <br>
//!  two axis. It is the local coordinate system of the plane. <br>
//! <br>
//!  The "Location" point and the main direction of this axis <br>
//!  placement define the "Axis" of the plane. It is the axis <br>
//!  normal to the plane which gives the orientation of the <br>
//!  plane. <br>
//! <br>
//!  The "XDirection" and the "YDirection" of the axis <br>
//!  placement define the plane ("XAxis" and "YAxis") . <br>
class gce_MakePln  : 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); 
  }

  
//!  The coordinate system of the plane is defined with the axis <br>
//!  placement A2. <br>
//!  The "Direction" of A2 defines the normal to the plane. <br>
//!  The "Location" of A2 defines the location (origin) of the plane. <br>
//!  The "XDirection" and "YDirection" of A2 define the "XAxis" and <br>
//!  the "YAxis" of the plane used to parametrize the plane. <br>
  Standard_EXPORT   gce_MakePln(const gp_Ax2& A2);
  
//!  Creates a plane with the  "Location" point <P> <br>
//!  and the normal direction <V>. <br>
  Standard_EXPORT   gce_MakePln(const gp_Pnt& P,const gp_Dir& V);
  
//!  Creates a plane from its cartesian equation : <br>
//!  A * X + B * Y + C * Z + D = 0.0 <br>
//!  the status is "BadEquation" if Sqrt (A*A + B*B + C*C) <= <br>
//!  Resolution from gp. <br>
  Standard_EXPORT   gce_MakePln(const Standard_Real A,const Standard_Real B,const Standard_Real C,const Standard_Real D);
  //! Make a Pln from gp <ThePln> parallel to another <br>
//!           Pln <Pln> and passing through a Pnt <Point>. <br>
  Standard_EXPORT   gce_MakePln(const gp_Pln& Pln,const gp_Pnt& Point);
  //! Make a Pln from gp <ThePln> parallel to another <br>
//!           Pln <Pln> at the distance <Dist> which can be greater <br>
//!           or less than zero. <br>
//!           In the first case the result is at the distance <br>
//!           <Dist> to the plane <Pln> in the direction of the <br>
//!           normal to <Pln>. <br>
//!           Otherwize it is in the opposite direction. <br>
  Standard_EXPORT   gce_MakePln(const gp_Pln& Pln,const Standard_Real Dist);
  //! Make a Pln from gp <ThePln> passing through 3 <br>
//!           Pnt <P1>,<P2>,<P3>. <br>
//!           It returns false if <P1> <P2> <P3> are confused. <br>
  Standard_EXPORT   gce_MakePln(const gp_Pnt& P1,const gp_Pnt& P2,const gp_Pnt& P3);
  //! Make a Pln from gp <ThePln> perpendicular to the line <br>
//!           passing through <P1>,<P2>. <br>
//!           The status is "ConfusedPoints" if <P1> <P2> are confused. <br>
  Standard_EXPORT   gce_MakePln(const gp_Pnt& P1,const gp_Pnt& P2);
  //! Make a pln  passing through the location of <Axis>and <br>
//!          normal to the Direction of <Axis>. <br>
//! Warning -  If an error occurs (that is, when IsDone returns <br>
//! false), the Status function returns: <br>
//! -   gce_BadEquation if Sqrt(A*A + B*B + <br>
//!   C*C) is less than or equal to gp::Resolution(), <br>
//! -   gce_ConfusedPoints if P1 and P2 are coincident, or <br>
//! -   gce_ColinearPoints if P1, P2 and P3 are collinear. <br>
  Standard_EXPORT   gce_MakePln(const gp_Ax1& Axis);
  //! Returns the constructed plane. <br>
//! Exceptions StdFail_NotDone if no plane is constructed. <br>
  Standard_EXPORT    const gp_Pln& Value() const;
  
  Standard_EXPORT    const gp_Pln& Operator() const;
Standard_EXPORT operator gp_Pln() const;





protected:





private:



gp_Pln ThePln;


};





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


#endif