0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
[occt.git] / src / Approx / Approx_SameParameter.hxx
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
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _Approx_SameParameter_HeaderFile
18 #define _Approx_SameParameter_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
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;
32 class Geom_Curve;
33 class Geom2d_Curve;
34 class Geom_Surface;
35
36
37 //! Approximation of a  PCurve  on a surface to  make  its
38 //! parameter be the same that the parameter of a given 3d
39 //! reference curve.
40 class Approx_SameParameter 
41 {
42 public:
43
44   DEFINE_STANDARD_ALLOC
45
46   
47
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);
50   
51   Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D, const Handle(Geom2d_Curve)& C2D, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol);
52   
53
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);
56   
57     Standard_Boolean IsDone() const;
58   
59     Standard_Real TolReached() const;
60   
61   //! Tells whether the original data  had already the  same
62   //! parameter up to  the tolerance :  in that case nothing
63   //! is done.
64     Standard_Boolean IsSameParameter() const;
65   
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;
70
71
72
73
74 protected:
75
76
77
78
79
80 private:
81
82   
83   //! Compute the Pcurve (internal use only).
84   Standard_EXPORT void Build (const Standard_Real Tol);
85
86
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;
94
95
96 };
97
98
99 #include <Approx_SameParameter.lxx>
100
101
102
103
104
105 #endif // _Approx_SameParameter_HeaderFile