7bd071ed |
1 | // Created on: 2016-07-07 |
2 | // Copyright (c) 2016 OPEN CASCADE SAS |
01a6e62b |
3 | // Created by: Oleg AGASHIN |
01a6e62b |
4 | // |
5 | // This file is part of Open CASCADE Technology software library. |
6 | // |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
12 | // |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
15 | |
16 | #ifndef _BRepMesh_Classifier_HeaderFile |
17 | #define _BRepMesh_Classifier_HeaderFile |
18 | |
7bd071ed |
19 | #include <IMeshData_Types.hxx> |
20 | #include <NCollection_Handle.hxx> |
01a6e62b |
21 | |
7bd071ed |
22 | #include <memory> |
23 | |
24 | class gp_Pnt2d; |
25 | class CSLib_Class2d; |
26 | |
b81b237f |
27 | //! Auxiliary class intended for classification of points |
7bd071ed |
28 | //! regarding internals of discrete face. |
29 | class BRepMesh_Classifier : public Standard_Transient |
01a6e62b |
30 | { |
31 | public: |
32 | |
01a6e62b |
33 | //! Constructor. |
34 | Standard_EXPORT BRepMesh_Classifier(); |
35 | |
36 | //! Destructor. |
7bd071ed |
37 | Standard_EXPORT virtual ~BRepMesh_Classifier(); |
01a6e62b |
38 | |
39 | //! Performs classification of the given point regarding to face internals. |
848fa7e3 |
40 | //! @param thePoint Point in parametric space to be classified. |
7bd071ed |
41 | //! @return TopAbs_IN if point lies within face boundaries and TopAbs_OUT elsewhere. |
01a6e62b |
42 | Standard_EXPORT TopAbs_State Perform(const gp_Pnt2d& thePoint) const; |
43 | |
44 | //! Registers wire specified by sequence of points for |
45 | //! further classification of points. |
848fa7e3 |
46 | //! @param theWire Wire to be registered. Specified by sequence of points. |
47 | //! @param theTolUV Tolerance to be used for calculations in parametric space. |
48 | //! @param theUmin Lower U boundary of the face in parametric space. |
49 | //! @param theUmax Upper U boundary of the face in parametric space. |
50 | //! @param theVmin Lower V boundary of the face in parametric space. |
51 | //! @param theVmax Upper V boundary of the face in parametric space. |
52 | Standard_EXPORT void RegisterWire( |
7bd071ed |
53 | const NCollection_Sequence<const gp_Pnt2d*>& theWire, |
54 | const std::pair<Standard_Real, Standard_Real>& theTolUV, |
55 | const std::pair<Standard_Real, Standard_Real>& theRangeU, |
56 | const std::pair<Standard_Real, Standard_Real>& theRangeV); |
57 | |
4945e8be |
58 | DEFINE_STANDARD_RTTIEXT(BRepMesh_Classifier, Standard_Transient) |
01a6e62b |
59 | |
60 | private: |
61 | |
7bd071ed |
62 | NCollection_Vector<NCollection_Handle<CSLib_Class2d> > myTabClass; |
63 | IMeshData::VectorOfBoolean myTabOrient; |
01a6e62b |
64 | }; |
65 | |
66 | #endif |