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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _TopOpeBRepBuild_ShellFaceClassifier_HeaderFile
18 #define _TopOpeBRepBuild_ShellFaceClassifier_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.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;
33 //! Classify faces and shells.
34 //! shapes are Shells, Elements are Faces.
35 class TopOpeBRepBuild_ShellFaceClassifier : public TopOpeBRepBuild_CompositeClassifier
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);
48 Standard_EXPORT void Clear();
50 //! classify shell <B1> with shell <B2>
51 Standard_EXPORT TopAbs_State CompareShapes (const TopoDS_Shape& B1, const TopoDS_Shape& B2);
53 //! classify face <F> with shell <S>
54 Standard_EXPORT TopAbs_State CompareElementToShape (const TopoDS_Shape& F, const TopoDS_Shape& S);
56 //! prepare classification involving shell <S>
57 //! calls ResetElement on first face of <S>
58 Standard_EXPORT void ResetShape (const TopoDS_Shape& S);
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);
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);
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();
86 Standard_Boolean myFirstCompare;
89 BRep_Builder myBuilder;
90 TopOpeBRepTool_SolidClassifier mySolidClassifier;
91 TopTools_DataMapOfShapeShape myFaceShellMap;
103 #endif // _TopOpeBRepBuild_ShellFaceClassifier_HeaderFile