1 // Created on: 1995-06-02
2 // Created by: Xavier BENVENISTE
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Approx_SameParameter_HeaderFile
18 #define _Approx_SameParameter_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Real.hxx>
26 class Geom2d_BSplineCurve;
27 class Adaptor2d_HCurve2d;
28 class Adaptor3d_HCurve;
29 class Adaptor3d_HSurface;
30 class Standard_OutOfRange;
31 class Standard_ConstructionError;
37 //! Approximation of a PCurve on a surface to make its
38 //! parameter be the same that the parameter of a given 3d
40 class Approx_SameParameter
48 //! Warning: the C3D and C2D must have the same parametric domain.
49 Standard_EXPORT Approx_SameParameter(const Handle(Geom_Curve)& C3D, const Handle(Geom2d_Curve)& C2D, const Handle(Geom_Surface)& S, const Standard_Real Tol);
51 Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D, const Handle(Geom2d_Curve)& C2D, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol);
54 //! Warning: the C3D and C2D must have the same parametric domain.
55 Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D, const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol);
57 Standard_Boolean IsDone() const;
59 Standard_Real TolReached() const;
61 //! Tells whether the original data had already the same
62 //! parameter up to the tolerance : in that case nothing
64 Standard_Boolean IsSameParameter() const;
66 //! Returns the 2D curve that has the same parameter as
67 //! the 3D curve once evaluated on the surface up to the
68 //! specified tolerance
69 Handle(Geom2d_BSplineCurve) Curve2d() const;
83 //! Compute the Pcurve (internal use only).
84 Standard_EXPORT void Build (const Standard_Real Tol);
87 Standard_Boolean mySameParameter;
88 Standard_Boolean myDone;
89 Standard_Real myTolReached;
90 Handle(Geom2d_BSplineCurve) myCurve2d;
91 Handle(Adaptor2d_HCurve2d) myHCurve2d;
92 Handle(Adaptor3d_HCurve) myC3d;
93 Handle(Adaptor3d_HSurface) mySurf;
99 #include <Approx_SameParameter.lxx>
105 #endif // _Approx_SameParameter_HeaderFile