summaryrefslogtreecommitdiff
path: root/inc/GeomAPI_ProjectPointOnSurf.hxx
blob: b7a9bc08682e43a4dc86e9ff821dc0c2b39c3f8a (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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// 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 _GeomAPI_ProjectPointOnSurf_HeaderFile
#define _GeomAPI_ProjectPointOnSurf_HeaderFile

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

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Extrema_ExtPS_HeaderFile
#include <Extrema_ExtPS.hxx>
#endif
#ifndef _GeomAdaptor_Surface_HeaderFile
#include <GeomAdaptor_Surface.hxx>
#endif
#ifndef _Handle_Geom_Surface_HeaderFile
#include <Handle_Geom_Surface.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Quantity_Parameter_HeaderFile
#include <Quantity_Parameter.hxx>
#endif
#ifndef _Quantity_Length_HeaderFile
#include <Quantity_Length.hxx>
#endif
class Standard_OutOfRange;
class StdFail_NotDone;
class gp_Pnt;
class Geom_Surface;
class Extrema_ExtPS;



//! This class implements methods for  computing all the orthogonal <br>
//!  projections of a point onto a  surface. <br>
class GeomAPI_ProjectPointOnSurf  {
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); 
  }

  //! Creates an empty object. Use the <br>
//! Init function for further initialization. <br>
  Standard_EXPORT   GeomAPI_ProjectPointOnSurf();
  //! Create the projection  of a point <P> on a surface <br>
//!          <Surface> <br>
  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface);
  //! Create the projection  of a point <P> on a surface <br>
//!          <Surface> <br>//! Create the projection of a point <P>  on a surface <br>
//!          <Surface>. The solution are computed in the domain <br>
//!          [Umin,Usup] [Vmin,Vsup] of the surface. <br>
  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Standard_Real Tolerance);
  
  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Standard_Real Tolerance);
  //! Init the projection  of a point <P> on a surface <br>
//!          <Surface> <br>
  Standard_EXPORT   GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup);
  
  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Standard_Real Tolerance) ;
  //! Init the projection of a point <P>  on a surface <br>
//!          <Surface>. The solution are computed in the domain <br>
//!          [Umin,Usup] [Vmin,Vsup] of the surface. <br>
  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface) ;
  
  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Standard_Real Tolerance) ;
  //! Init the projection for many points on a surface <br>
//!          <Surface>. The solutions will be computed in the domain <br>
//!          [Umin,Usup] [Vmin,Vsup] of the surface. <br>
  Standard_EXPORT     void Init(const gp_Pnt& P,const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup) ;
  
  Standard_EXPORT     void Init(const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup,const Standard_Real Tolerance) ;
  
  Standard_EXPORT     void Init(const Handle(Geom_Surface)& Surface,const Quantity_Parameter Umin,const Quantity_Parameter Usup,const Quantity_Parameter Vmin,const Quantity_Parameter Vsup) ;
  //! Performs the projection of a point on the current surface. <br>
  Standard_EXPORT     void Perform(const gp_Pnt& P) ;
  
  Standard_EXPORT     Standard_Boolean IsDone() const;
  //! Returns the number of computed orthogonal projection points. <br>
//! Note: if projection fails, NbPoints returns 0. <br>
  Standard_EXPORT     Standard_Integer NbPoints() const;
Standard_EXPORT operator Standard_Integer() const;
  //! Returns the orthogonal projection <br>
//! on the surface. Index is a number of a computed point. <br>
//! Exceptions <br>
//! Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where <br>
//! NbPoints is the number of solution points. <br>
  Standard_EXPORT     gp_Pnt Point(const Standard_Integer Index) const;
  //! Returns the parameters (U,V) on the <br>
//! surface of the orthogonal projection. Index is a number of a <br>
//! computed point. <br>
//! Exceptions <br>
//! Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where <br>
//! NbPoints is the number of solution points. <br>
  Standard_EXPORT     void Parameters(const Standard_Integer Index,Quantity_Parameter& U,Quantity_Parameter& V) const;
  //! Computes the distance between the <br>
//! point and its orthogonal projection on the surface. Index is a number <br>
//! of a computed point. <br>
//! Exceptions <br>
//! Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where <br>
//! NbPoints is the number of solution points. <br>
  Standard_EXPORT     Quantity_Length Distance(const Standard_Integer Index) const;
  //! Returns the nearest orthogonal projection of the point <br>
//! on the surface. <br>
//! Exceptions <br>
//! StdFail_NotDone if projection fails. <br>
  Standard_EXPORT     gp_Pnt NearestPoint() const;
Standard_EXPORT operator gp_Pnt() const;
  //! Returns the parameters (U,V) on the <br>
//! surface of the nearest computed orthogonal projection of the point. <br>
//! Exceptions <br>
//! StdFail_NotDone if projection fails. <br>
  Standard_EXPORT     void LowerDistanceParameters(Quantity_Parameter& U,Quantity_Parameter& V) const;
  //! Computes the distance between the <br>
//! point and its nearest orthogonal projection on the surface. <br>
//! Exceptions <br>
//! StdFail_NotDone if projection fails. <br>
  Standard_EXPORT     Quantity_Length LowerDistance() const;
Standard_EXPORT operator Standard_Real() const;
  //! return the algorithmic object from Extrema <br>
       const Extrema_ExtPS& Extrema() const;





protected:





private:

  
  Standard_EXPORT     void Init() ;


Standard_Boolean myIsDone;
Standard_Integer myIndex;
Extrema_ExtPS myExtPS;
GeomAdaptor_Surface myGeomAdaptor;


};


#include <GeomAPI_ProjectPointOnSurf.lxx>



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


#endif