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 <TColStd_HArray1OfReal.hxx>
23 #include <BRepAdaptor_Curve.hxx>
28 class TColStd_HArray1OfReal;
30 //! Auxiliary class provides correct parameters
31 //! on curve regarding SameParameter flag.
32 class BRepMesh_EdgeParameterProvider
39 //! @param theEdge edge which parameters should be processed.
40 //! @param theFace face the parametric values are defined for.
41 //! @param theParameters parameters corresponded to discretization points.
42 BRepMesh_EdgeParameterProvider(
43 const TopoDS_Edge& theEdge,
44 const TopoDS_Face& theFace,
45 const Handle(TColStd_HArray1OfReal)& theParameters);
47 //! Returns parameter according to SameParameter flag of the edge.
48 //! If SameParameter is TRUE returns value from parameters w/o changes,
49 //! elsewhere scales initial parameter and tries to determine resulting
50 //! value using projection of the corresponded 3D point on PCurve.
51 Standard_Real Parameter(const Standard_Integer theIndex,
52 const gp_Pnt& thePoint3d);
56 Handle(TColStd_HArray1OfReal) myParameters;
58 Standard_Boolean myIsSameParam;
59 Standard_Real myFirstParam;
61 Standard_Real myOldFirstParam;
62 Standard_Real myScale;
64 Standard_Real myCurParam;
65 Standard_Real myFoundParam;
67 BRepAdaptor_Curve myCurveAdaptor;
68 Extrema_LocateExtPC myProjector;