0027105: Make code ISO-compliant [-Wpedantic fixes]
[occt.git] / src / GeomLib / GeomLib_Tool.hxx
CommitLineData
42cf5bc1 1// Created on: 2003-03-18
2// Created by: Oleg FEDYAEV
3// Copyright (c) 2003-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
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.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _GeomLib_Tool_HeaderFile
17#define _GeomLib_Tool_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_DefineAlloc.hxx>
21#include <Standard_Handle.hxx>
22
23#include <Standard_Boolean.hxx>
24#include <Standard_Real.hxx>
25class Geom_Curve;
26class gp_Pnt;
27class Geom_Surface;
28class Geom2d_Curve;
29class gp_Pnt2d;
30
31
32//! Provides various methods with Geom2d and Geom curves and surfaces.
33//! The methods of this class compute the parameter(s) of a given point on a
34//! curve or a surface. The point must be located either
35//! on the curve (surface) itself or relatively to the latter at
36//! a distance less than the tolerance value.
37//! Return FALSE if the point is beyond the tolerance
38//! limit or if computation fails.
39//! Max Tolerance value is currently limited to 1.e-4 for
40//! geometrical curves and 1.e-3 for BSpline, Bezier and
41//! other parametrical curves.
42class GeomLib_Tool
43{
44public:
45
46 DEFINE_STANDARD_ALLOC
47
48
49
50 //! Extracts the parameter of a 3D point lying on a 3D curve
51 //! or at a distance less than the tolerance value.
52 Standard_EXPORT static Standard_Boolean Parameter (const Handle(Geom_Curve)& Curve, const gp_Pnt& Point, const Standard_Real Tolerance, Standard_Real& U);
53
54 //! Extracts the parameter of a 3D point lying on a surface
55 //! or at a distance less than the tolerance value.
56 Standard_EXPORT static Standard_Boolean Parameters (const Handle(Geom_Surface)& Surface, const gp_Pnt& Point, const Standard_Real Tolerance, Standard_Real& U, Standard_Real& V);
57
58 //! Extracts the parameter of a 2D point lying on a 2D curve
59 //! or at a distance less than the tolerance value.
60 Standard_EXPORT static Standard_Boolean Parameter (const Handle(Geom2d_Curve)& Curve, const gp_Pnt2d& Point, const Standard_Real Tolerance, Standard_Real& U);
61
62
63
64
65protected:
66
67
68
69
70
71private:
72
73
74
75
76
77};
78
79
80
81
82
83
84
85#endif // _GeomLib_Tool_HeaderFile