0033040: Coding - get rid of unused headers [Storage to TopOpeBRepTool]
[occt.git] / src / TopOpeBRepBuild / TopOpeBRepBuild_ShellFaceClassifier.hxx
1 // Created on: 1993-06-17
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1993-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 _TopOpeBRepBuild_ShellFaceClassifier_HeaderFile
18 #define _TopOpeBRepBuild_ShellFaceClassifier_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22
23 #include <gp_Pnt.hxx>
24 #include <TopOpeBRepTool_SolidClassifier.hxx>
25 #include <TopTools_DataMapOfShapeShape.hxx>
26 #include <TopoDS_Shape.hxx>
27 #include <TopOpeBRepBuild_CompositeClassifier.hxx>
28 #include <TopAbs_State.hxx>
29 class TopOpeBRepBuild_BlockBuilder;
30
31
32
33 //! Classify faces and shells.
34 //! shapes are Shells, Elements are Faces.
35 class TopOpeBRepBuild_ShellFaceClassifier  : public TopOpeBRepBuild_CompositeClassifier
36 {
37 public:
38
39   DEFINE_STANDARD_ALLOC
40
41   
42   //! Creates a classifier in 3D space, to compare :
43   //! a face with a set of faces
44   //! a shell with a set of faces
45   //! a shell with a shell
46   Standard_EXPORT TopOpeBRepBuild_ShellFaceClassifier(const TopOpeBRepBuild_BlockBuilder& BB);
47   
48   Standard_EXPORT void Clear();
49   
50   //! classify shell <B1> with shell <B2>
51   Standard_EXPORT TopAbs_State CompareShapes (const TopoDS_Shape& B1, const TopoDS_Shape& B2);
52   
53   //! classify face <F> with shell <S>
54   Standard_EXPORT TopAbs_State CompareElementToShape (const TopoDS_Shape& F, const TopoDS_Shape& S);
55   
56   //! prepare classification involving shell <S>
57   //! calls ResetElement on first face of <S>
58   Standard_EXPORT void ResetShape (const TopoDS_Shape& S);
59   
60   //! prepare classification involving face <F>
61   //! define 3D point (later used in Compare()) on first vertex of face <F>.
62   Standard_EXPORT void ResetElement (const TopoDS_Shape& F);
63   
64   //! Add the face <F> in the set of faces used in 3D point
65   //! classification. Returns FALSE if the face <F> has been already
66   //! added to the set of faces, otherwise returns TRUE.
67   Standard_EXPORT Standard_Boolean CompareElement (const TopoDS_Shape& F);
68   
69   //! Returns state of classification of 3D point, defined by
70   //! ResetElement, with the current set of faces, defined by Compare.
71   Standard_EXPORT TopAbs_State State();
72
73
74
75
76 protected:
77
78
79
80
81
82 private:
83
84
85
86   Standard_Boolean myFirstCompare;
87   gp_Pnt myPoint3d;
88   TopoDS_Shell myShell;
89   BRep_Builder myBuilder;
90   TopOpeBRepTool_SolidClassifier mySolidClassifier;
91   TopTools_DataMapOfShapeShape myFaceShellMap;
92   TopoDS_Shape myShape;
93
94
95 };
96
97
98
99
100
101
102
103 #endif // _TopOpeBRepBuild_ShellFaceClassifier_HeaderFile