summaryrefslogtreecommitdiff
path: root/inc/BRepBuilderAPI_FindPlane.hxx
blob: b5fa300f781aaccdd3f2e2775b6f7e2b72b3a7f3 (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
// 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 _BRepBuilderAPI_FindPlane_HeaderFile
#define _BRepBuilderAPI_FindPlane_HeaderFile

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

#ifndef _Handle_Geom_Plane_HeaderFile
#include <Handle_Geom_Plane.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
class Geom_Plane;
class Standard_NoSuchObject;
class TopoDS_Shape;


//! Describes functions to find the plane in which the edges <br>
//! of a given shape are located. <br>
//! A FindPlane object provides a framework for: <br>
//! -   extracting the edges of a given shape, <br>
//! -   implementing the construction algorithm, and <br>
//! -   consulting the result. <br>
class BRepBuilderAPI_FindPlane  {
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); 
  }

  //! Initializes an empty algorithm. The function Init is then used to define the shape. <br>
  Standard_EXPORT   BRepBuilderAPI_FindPlane();
  //!  Constructs the plane containing the edges of the shape S. <br>
//! A plane is built only if all the edges are within a distance <br>
//! of less than or equal to tolerance from a planar surface. <br>
//! This tolerance value is equal to the larger of the following two values: <br>
//! -   Tol, where the default value is negative, or <br>
//! -   the largest of the tolerance values assigned to the individual edges of S. <br>
//!   Use the function Found to verify that a plane is built. <br>
//! The resulting plane is then retrieved using the function Plane. <br>
  Standard_EXPORT   BRepBuilderAPI_FindPlane(const TopoDS_Shape& S,const Standard_Real Tol = -1);
  //! Constructs the plane containing the edges of the shape S. <br>
//! A plane is built only if all the edges are within a distance <br>
//! of less than or equal to tolerance from a planar surface. <br>
//! This tolerance value is equal to the larger of the following two values: <br>
//! -   Tol, where the default value is negative, or <br>
//! -   the largest of the tolerance values assigned to the individual edges of S. <br>
//!   Use the function Found to verify that a plane is built. <br>
//! The resulting plane is then retrieved using the function Plane. <br>
  Standard_EXPORT     void Init(const TopoDS_Shape& S,const Standard_Real Tol = -1) ;
  //! Returns true if a plane containing the edges of the <br>
//! shape is found and built. Use the function Plane to consult the result. <br>
  Standard_EXPORT     Standard_Boolean Found() const;
  //! Returns the plane containing the edges of the shape. <br>
//! Warning <br>
//! Use the function Found to verify that the plane is built. If <br>
//! a plane is not found, Plane returns a null handle. <br>
  Standard_EXPORT     Handle_Geom_Plane Plane() const;





protected:





private:



Handle_Geom_Plane myPlane;


};





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


#endif