1 // Created on: 2016-07-07
2 // Copyright (c) 2016 OPEN CASCADE SAS
3 // Created by: Oleg AGASHIN
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _BRepMesh_Classifier_HeaderFile
17 #define _BRepMesh_Classifier_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_Macro.hxx>
21 #include <TopAbs_State.hxx>
22 #include <IMeshData_Types.hxx>
23 #include <NCollection_Handle.hxx>
30 //! Auxilary class intended for classification of points
31 //! regarding internals of discrete face.
32 class BRepMesh_Classifier : public Standard_Transient
37 Standard_EXPORT BRepMesh_Classifier();
40 Standard_EXPORT virtual ~BRepMesh_Classifier();
42 //! Performs classification of the given point regarding to face internals.
43 //! @param thePoint Point in parametric space to be classified.
44 //! @return TopAbs_IN if point lies within face boundaries and TopAbs_OUT elsewhere.
45 Standard_EXPORT TopAbs_State Perform(const gp_Pnt2d& thePoint) const;
47 //! Registers wire specified by sequence of points for
48 //! further classification of points.
49 //! @param theWire Wire to be registered. Specified by sequence of points.
50 //! @param theTolUV Tolerance to be used for calculations in parametric space.
51 //! @param theUmin Lower U boundary of the face in parametric space.
52 //! @param theUmax Upper U boundary of the face in parametric space.
53 //! @param theVmin Lower V boundary of the face in parametric space.
54 //! @param theVmax Upper V boundary of the face in parametric space.
55 Standard_EXPORT void RegisterWire(
56 const NCollection_Sequence<const gp_Pnt2d*>& theWire,
57 const std::pair<Standard_Real, Standard_Real>& theTolUV,
58 const std::pair<Standard_Real, Standard_Real>& theRangeU,
59 const std::pair<Standard_Real, Standard_Real>& theRangeV);
61 DEFINE_STANDARD_RTTI_INLINE (BRepMesh_Classifier, Standard_Transient)
65 NCollection_Vector<NCollection_Handle<CSLib_Class2d> > myTabClass;
66 IMeshData::VectorOfBoolean myTabOrient;