Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-25 09:22:35

0001 // Created on: 2016-07-07
0002 // Copyright (c) 2016 OPEN CASCADE SAS
0003 // Created by: Oleg AGASHIN
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _BRepMesh_Classifier_HeaderFile
0017 #define _BRepMesh_Classifier_HeaderFile
0018 
0019 #include <IMeshData_Types.hxx>
0020 #include <NCollection_Handle.hxx>
0021 
0022 #include <memory>
0023 
0024 class gp_Pnt2d;
0025 class CSLib_Class2d;
0026 
0027 //! Auxiliary class intended for classification of points
0028 //! regarding internals of discrete face.
0029 class BRepMesh_Classifier : public Standard_Transient
0030 {
0031 public:
0032   //! Constructor.
0033   Standard_EXPORT BRepMesh_Classifier();
0034 
0035   //! Destructor.
0036   Standard_EXPORT virtual ~BRepMesh_Classifier();
0037 
0038   //! Performs classification of the given point regarding to face internals.
0039   //! @param thePoint Point in parametric space to be classified.
0040   //! @return TopAbs_IN if point lies within face boundaries and TopAbs_OUT elsewhere.
0041   Standard_EXPORT TopAbs_State Perform(const gp_Pnt2d& thePoint) const;
0042 
0043   //! Registers wire specified by sequence of points for
0044   //! further classification of points.
0045   //! @param theWire Wire to be registered. Specified by sequence of points.
0046   //! @param theTolUV Tolerance to be used for calculations in parametric space.
0047   //! @param theUmin Lower U boundary of the face in parametric space.
0048   //! @param theUmax Upper U boundary of the face in parametric space.
0049   //! @param theVmin Lower V boundary of the face in parametric space.
0050   //! @param theVmax Upper V boundary of the face in parametric space.
0051   Standard_EXPORT void RegisterWire(const NCollection_Sequence<const gp_Pnt2d*>&   theWire,
0052                                     const std::pair<Standard_Real, Standard_Real>& theTolUV,
0053                                     const std::pair<Standard_Real, Standard_Real>& theRangeU,
0054                                     const std::pair<Standard_Real, Standard_Real>& theRangeV);
0055 
0056   DEFINE_STANDARD_RTTIEXT(BRepMesh_Classifier, Standard_Transient)
0057 
0058 private:
0059   NCollection_Vector<NCollection_Handle<CSLib_Class2d>> myTabClass;
0060   IMeshData::VectorOfBoolean                            myTabOrient;
0061 };
0062 
0063 #endif