Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:13

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 
0033   //! Constructor.
0034   Standard_EXPORT BRepMesh_Classifier();
0035 
0036   //! Destructor.
0037   Standard_EXPORT virtual ~BRepMesh_Classifier();
0038   
0039   //! Performs classification of the given point regarding to face internals.
0040   //! @param thePoint Point in parametric space to be classified.
0041   //! @return TopAbs_IN if point lies within face boundaries and TopAbs_OUT elsewhere.
0042   Standard_EXPORT TopAbs_State Perform(const gp_Pnt2d& thePoint) const;
0043 
0044   //! Registers wire specified by sequence of points for 
0045   //! further classification of points.
0046   //! @param theWire Wire to be registered. Specified by sequence of points.
0047   //! @param theTolUV Tolerance to be used for calculations in parametric space.
0048   //! @param theUmin Lower U boundary of the face in parametric space.
0049   //! @param theUmax Upper U boundary of the face in parametric space.
0050   //! @param theVmin Lower V boundary of the face in parametric space.
0051   //! @param theVmax Upper V boundary of the face in parametric space.
0052   Standard_EXPORT void RegisterWire(
0053     const NCollection_Sequence<const gp_Pnt2d*>&   theWire,
0054     const std::pair<Standard_Real, Standard_Real>& theTolUV,
0055     const std::pair<Standard_Real, Standard_Real>& theRangeU,
0056     const std::pair<Standard_Real, Standard_Real>& theRangeV);
0057 
0058   DEFINE_STANDARD_RTTIEXT(BRepMesh_Classifier, Standard_Transient)
0059 
0060 private:
0061 
0062   NCollection_Vector<NCollection_Handle<CSLib_Class2d> > myTabClass;
0063   IMeshData::VectorOfBoolean                             myTabOrient;
0064 };
0065 
0066 #endif