0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / BRepLib / BRepLib_FindSurface.hxx
1 // Created on: 1994-07-22
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1994-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 _BRepLib_FindSurface_HeaderFile
18 #define _BRepLib_FindSurface_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <TopLoc_Location.hxx>
25 class Geom_Surface;
26 class TopoDS_Shape;
27
28
29 //! Provides an  algorithm to find  a Surface  through a
30 //! set of edges.
31 //!
32 //! The edges  of  the  shape  given  as  argument are
33 //! explored if they are not coplanar at  the required
34 //! tolerance  the method Found returns false.
35 //!
36 //! If a null tolerance is given the max of the  edges
37 //! tolerances is used.
38 //!
39 //! The method Tolerance returns the true distance  of
40 //! the edges to the Surface.
41 //!
42 //! The method Surface returns the Surface if found.
43 //!
44 //! The method Existed  returns returns  True  if  the
45 //! Surface was already attached to some of the edges.
46 //!
47 //! When Existed  returns True  the  Surface  may have a
48 //! location given by the Location method.
49 class BRepLib_FindSurface 
50 {
51 public:
52
53   DEFINE_STANDARD_ALLOC
54
55   
56   Standard_EXPORT BRepLib_FindSurface();
57   
58   //! Computes the Surface from the edges of  <S> with the
59   //! given tolerance.
60   //! if <OnlyPlane> is true, the computed surface will be
61   //! a plane. If it is not possible to find a plane, the
62   //! flag NotDone will be set.
63   //! If <OnlyClosed> is true,  then  S  should be a wire
64   //! and the existing surface,  on  which wire S is not
65   //! closed in 2D, will be ignored.
66   Standard_EXPORT BRepLib_FindSurface(const TopoDS_Shape& S, const Standard_Real Tol = -1, const Standard_Boolean OnlyPlane = Standard_False, const Standard_Boolean OnlyClosed = Standard_False);
67   
68   //! Computes the Surface from the edges of  <S> with the
69   //! given tolerance.
70   //! if <OnlyPlane> is true, the computed surface will be
71   //! a plane. If it is not possible to find a plane, the
72   //! flag NotDone will be set.
73   //! If <OnlyClosed> is true,  then  S  should be a wire
74   //! and the existing surface,  on  which wire S is not
75   //! closed in 2D, will be ignored.
76   Standard_EXPORT void Init (const TopoDS_Shape& S, const Standard_Real Tol = -1, const Standard_Boolean OnlyPlane = Standard_False, const Standard_Boolean OnlyClosed = Standard_False);
77   
78   Standard_EXPORT Standard_Boolean Found() const;
79   
80   Standard_EXPORT Handle(Geom_Surface) Surface() const;
81   
82   Standard_EXPORT Standard_Real Tolerance() const;
83   
84   Standard_EXPORT Standard_Real ToleranceReached() const;
85   
86   Standard_EXPORT Standard_Boolean Existed() const;
87   
88   Standard_EXPORT TopLoc_Location Location() const;
89
90
91
92
93 protected:
94
95
96
97
98
99 private:
100
101
102
103   Handle(Geom_Surface) mySurface;
104   Standard_Real myTolerance;
105   Standard_Real myTolReached;
106   Standard_Boolean isExisted;
107   TopLoc_Location myLocation;
108
109
110 };
111
112
113
114
115
116
117
118 #endif // _BRepLib_FindSurface_HeaderFile