Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 2016-04-19
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_EdgeTessellationExtractor_HeaderFile
0017 #define _BRepMesh_EdgeTessellationExtractor_HeaderFile
0018 
0019 #include <IMeshTools_CurveTessellator.hxx>
0020 #include <BRepMesh_EdgeParameterProvider.hxx>
0021 #include <TColStd_Array1OfInteger.hxx>
0022 #include <TopLoc_Location.hxx>
0023 
0024 //! Auxiliary class implements functionality retrieving tessellated
0025 //! representation of an edge stored in polygon.
0026 class BRepMesh_EdgeTessellationExtractor : public IMeshTools_CurveTessellator
0027 {
0028 public:
0029 
0030   //! Constructor.
0031   Standard_EXPORT BRepMesh_EdgeTessellationExtractor (
0032     const IMeshData::IEdgeHandle& theEdge,
0033     const IMeshData::IFaceHandle& theFace);
0034 
0035   //! Destructor.
0036   Standard_EXPORT virtual ~BRepMesh_EdgeTessellationExtractor ();
0037 
0038   //! Returns number of tessellation points.
0039   Standard_EXPORT virtual Standard_Integer PointsNb () const Standard_OVERRIDE;
0040 
0041   //! Returns parameters of solution with the given index.
0042   //! @param theIndex index of tessellation point.
0043   //! @param theParameter parameters on PCurve corresponded to the solution.
0044   //! @param thePoint tessellation point.
0045   //! @return True in case of valid result, false elewhere.
0046   Standard_EXPORT virtual Standard_Boolean Value (
0047     const Standard_Integer theIndex,
0048     gp_Pnt&                thePoint,
0049     Standard_Real&         theParameter) const Standard_OVERRIDE;
0050 
0051   DEFINE_STANDARD_RTTIEXT(BRepMesh_EdgeTessellationExtractor, IMeshTools_CurveTessellator)
0052 
0053 private:
0054 
0055   BRepMesh_EdgeParameterProvider<Handle(TColStd_HArray1OfReal)>  myProvider;
0056   const Poly_Triangulation*                                      myTriangulation;
0057   const TColStd_Array1OfInteger*                                 myIndices;
0058   TopLoc_Location                                                myLoc;
0059 };
0060 
0061 #endif