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 <IMeshData_Types.hxx>
21 #include <BRepMesh_EdgeParameterProvider.hxx>
22 #include <TColgp_Array1OfPnt.hxx>
23 #include <TColStd_Array1OfInteger.hxx>
24 #include <TopLoc_Location.hxx>
26 //! Auxiliary class implements functionality retrieving tessellated
27 //! representation of an edge stored in polygon.
28 class BRepMesh_EdgeTessellationExtractor : public IMeshTools_CurveTessellator
33 Standard_EXPORT BRepMesh_EdgeTessellationExtractor (
34 const IMeshData::IEdgeHandle& theEdge,
35 const IMeshData::IFaceHandle& theFace);
38 Standard_EXPORT virtual ~BRepMesh_EdgeTessellationExtractor ();
40 //! Returns number of tessellation points.
41 Standard_EXPORT virtual Standard_Integer PointsNb () const Standard_OVERRIDE;
43 //! Returns parameters of solution with the given index.
44 //! @param theIndex index of tessellation point.
45 //! @param theParameter parameters on PCurve corresponded to the solution.
46 //! @param thePoint tessellation point.
47 //! @return True in case of valid result, false elewhere.
48 Standard_EXPORT virtual Standard_Boolean Value (
49 const Standard_Integer theIndex,
51 Standard_Real& theParameter) const Standard_OVERRIDE;
53 DEFINE_STANDARD_RTTI_INLINE(BRepMesh_EdgeTessellationExtractor, IMeshTools_CurveTessellator)
57 BRepMesh_EdgeParameterProvider<Handle(TColStd_HArray1OfReal)> myProvider;
58 const TColgp_Array1OfPnt* myNodes;
59 const TColStd_Array1OfInteger* myIndices;
60 TopLoc_Location myLoc;