1 // Created on: 2016-04-19
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_EdgeTessellationExtractor_HeaderFile
17 #define _BRepMesh_EdgeTessellationExtractor_HeaderFile
19 #include <IMeshTools_CurveTessellator.hxx>
20 #include <BRepMesh_EdgeParameterProvider.hxx>
21 #include <TColStd_Array1OfInteger.hxx>
22 #include <TopLoc_Location.hxx>
24 //! Auxiliary class implements functionality retrieving tessellated
25 //! representation of an edge stored in polygon.
26 class BRepMesh_EdgeTessellationExtractor : public IMeshTools_CurveTessellator
31 Standard_EXPORT BRepMesh_EdgeTessellationExtractor (
32 const IMeshData::IEdgeHandle& theEdge,
33 const IMeshData::IFaceHandle& theFace);
36 Standard_EXPORT virtual ~BRepMesh_EdgeTessellationExtractor ();
38 //! Returns number of tessellation points.
39 Standard_EXPORT virtual Standard_Integer PointsNb () const Standard_OVERRIDE;
41 //! Returns parameters of solution with the given index.
42 //! @param theIndex index of tessellation point.
43 //! @param theParameter parameters on PCurve corresponded to the solution.
44 //! @param thePoint tessellation point.
45 //! @return True in case of valid result, false elewhere.
46 Standard_EXPORT virtual Standard_Boolean Value (
47 const Standard_Integer theIndex,
49 Standard_Real& theParameter) const Standard_OVERRIDE;
51 DEFINE_STANDARD_RTTIEXT(BRepMesh_EdgeTessellationExtractor, IMeshTools_CurveTessellator)
55 BRepMesh_EdgeParameterProvider<Handle(TColStd_HArray1OfReal)> myProvider;
56 const Poly_Triangulation* myTriangulation;
57 const TColStd_Array1OfInteger* myIndices;
58 TopLoc_Location myLoc;