Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-31 08:29:58

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   //! Constructor.
0030   Standard_EXPORT BRepMesh_EdgeTessellationExtractor(const IMeshData::IEdgeHandle& theEdge,
0031                                                      const IMeshData::IFaceHandle& theFace);
0032 
0033   //! Destructor.
0034   Standard_EXPORT virtual ~BRepMesh_EdgeTessellationExtractor();
0035 
0036   //! Returns number of tessellation points.
0037   Standard_EXPORT virtual Standard_Integer PointsNb() const Standard_OVERRIDE;
0038 
0039   //! Returns parameters of solution with the given index.
0040   //! @param theIndex index of tessellation point.
0041   //! @param theParameter parameters on PCurve corresponded to the solution.
0042   //! @param thePoint tessellation point.
0043   //! @return True in case of valid result, false elewhere.
0044   Standard_EXPORT virtual Standard_Boolean Value(const Standard_Integer theIndex,
0045                                                  gp_Pnt&                thePoint,
0046                                                  Standard_Real&         theParameter) const
0047     Standard_OVERRIDE;
0048 
0049   DEFINE_STANDARD_RTTIEXT(BRepMesh_EdgeTessellationExtractor, IMeshTools_CurveTessellator)
0050 
0051 private:
0052   BRepMesh_EdgeParameterProvider<Handle(TColStd_HArray1OfReal)> myProvider;
0053   const Poly_Triangulation*                                     myTriangulation;
0054   const TColStd_Array1OfInteger*                                myIndices;
0055   TopLoc_Location                                               myLoc;
0056 };
0057 
0058 #endif