1 // Created on: 2014-08-13
2 // Created by: Oleg AGASHIN
3 // Copyright (c) 2011-2014 OPEN CASCADE SAS
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_EdgeParameterProvider_HeaderFile
17 #define _BRepMesh_EdgeParameterProvider_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Extrema_LocateExtPC.hxx>
22 #include <Handle_TColStd_HArray1OfReal.hxx>
27 class TColStd_HArray1OfReal;
29 //! Auxiliary class provides correct parameters
30 //! on curve regarding SameParameter flag.
31 class BRepMesh_EdgeParameterProvider
38 //! @param theEdge edge which parameters should be processed.
39 //! @param theFace face the parametric values are defined for.
40 //! @param theParameters parameters corresponded to discretization points.
41 BRepMesh_EdgeParameterProvider(
42 const TopoDS_Edge& theEdge,
43 const TopoDS_Face& theFace,
44 const Handle(TColStd_HArray1OfReal)& theParameters);
46 //! Returns parameter according to SameParameter flag of the edge.
47 //! If SameParameter is TRUE returns value from parameters w/o changes,
48 //! elsewhere scales initial parameter and tries to determine resulting
49 //! value using projection of the corresponded 3D point on PCurve.
50 Standard_Real Parameter(const Standard_Integer theIndex,
51 const gp_Pnt& thePoint3d);
55 Handle(TColStd_HArray1OfReal) myParameters;
57 Standard_Boolean myIsSameParam;
58 Standard_Real myFirstParam;
60 Standard_Real myOldFirstParam;
61 Standard_Real myScale;
63 Standard_Real myCurParam;
64 Standard_Real myFoundParam;
66 Extrema_LocateExtPC myProjector;