CR32614 Coding - get rid of unsused forward declarations [Adaptor2d to GccAna]
[occt.git] / src / BRepBuilderAPI / BRepBuilderAPI_FindPlane.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-11-02
2// Created by: Jing Cheng MEI
3// Copyright (c) 1995-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _BRepBuilderAPI_FindPlane_HeaderFile
18#define _BRepBuilderAPI_FindPlane_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Real.hxx>
25#include <Standard_Boolean.hxx>
26class Geom_Plane;
42cf5bc1 27class TopoDS_Shape;
28
29
30//! Describes functions to find the plane in which the edges
31//! of a given shape are located.
32//! A FindPlane object provides a framework for:
33//! - extracting the edges of a given shape,
34//! - implementing the construction algorithm, and
35//! - consulting the result.
36class BRepBuilderAPI_FindPlane
37{
38public:
39
40 DEFINE_STANDARD_ALLOC
41
42
43 //! Initializes an empty algorithm. The function Init is then used to define the shape.
44 Standard_EXPORT BRepBuilderAPI_FindPlane();
45
46 //! Constructs the plane containing the edges of the shape S.
47 //! A plane is built only if all the edges are within a distance
48 //! of less than or equal to tolerance from a planar surface.
49 //! This tolerance value is equal to the larger of the following two values:
50 //! - Tol, where the default value is negative, or
51 //! - the largest of the tolerance values assigned to the individual edges of S.
52 //! Use the function Found to verify that a plane is built.
53 //! The resulting plane is then retrieved using the function Plane.
54 Standard_EXPORT BRepBuilderAPI_FindPlane(const TopoDS_Shape& S, const Standard_Real Tol = -1);
55
56 //! Constructs the plane containing the edges of the shape S.
57 //! A plane is built only if all the edges are within a distance
58 //! of less than or equal to tolerance from a planar surface.
59 //! This tolerance value is equal to the larger of the following two values:
60 //! - Tol, where the default value is negative, or
61 //! - the largest of the tolerance values assigned to the individual edges of S.
62 //! Use the function Found to verify that a plane is built.
63 //! The resulting plane is then retrieved using the function Plane.
64 Standard_EXPORT void Init (const TopoDS_Shape& S, const Standard_Real Tol = -1);
65
66 //! Returns true if a plane containing the edges of the
67 //! shape is found and built. Use the function Plane to consult the result.
68 Standard_EXPORT Standard_Boolean Found() const;
69
70 //! Returns the plane containing the edges of the shape.
71 //! Warning
72 //! Use the function Found to verify that the plane is built. If
73 //! a plane is not found, Plane returns a null handle.
74 Standard_EXPORT Handle(Geom_Plane) Plane() const;
75
76
77
78
79protected:
80
81
82
83
84
85private:
86
87
88
89 Handle(Geom_Plane) myPlane;
90
91
92};
93
94
95
96
97
98
99
100#endif // _BRepBuilderAPI_FindPlane_HeaderFile