42cf5bc1 |
1 | // Created on: 1995-01-27 |
2 | // Created by: Jacques GOUSSARD |
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 _GeomInt_WLApprox_HeaderFile |
18 | #define _GeomInt_WLApprox_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <GeomInt_TheComputeLineOfWLApprox.hxx> |
25 | #include <GeomInt_TheComputeLineBezierOfWLApprox.hxx> |
26 | #include <Approx_MCurvesToBSpCurve.hxx> |
27 | #include <Standard_Boolean.hxx> |
28 | #include <Standard_Real.hxx> |
29 | #include <Standard_Integer.hxx> |
30 | #include <Approx_ParametrizationType.hxx> |
31 | class Standard_OutOfRange; |
32 | class StdFail_NotDone; |
33 | class Adaptor3d_HSurface; |
34 | class Adaptor3d_HSurfaceTool; |
35 | class IntSurf_Quadric; |
36 | class IntSurf_QuadricTool; |
37 | class IntPatch_WLine; |
38 | class GeomInt_ThePrmPrmSvSurfacesOfWLApprox; |
39 | class GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox; |
40 | class GeomInt_TheImpPrmSvSurfacesOfWLApprox; |
41 | class GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox; |
42 | class GeomInt_TheMultiLineOfWLApprox; |
43 | class GeomInt_TheMultiLineToolOfWLApprox; |
44 | class GeomInt_TheComputeLineOfWLApprox; |
45 | class GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox; |
46 | class GeomInt_MyGradientbisOfTheComputeLineOfWLApprox; |
47 | class GeomInt_TheComputeLineBezierOfWLApprox; |
48 | class GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox; |
49 | class AppParCurves_MultiBSpCurve; |
50 | |
51 | |
52 | |
53 | class GeomInt_WLApprox |
54 | { |
55 | public: |
56 | |
57 | DEFINE_STANDARD_ALLOC |
58 | |
59 | |
60 | Standard_EXPORT GeomInt_WLApprox(); |
61 | |
62 | Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ = Standard_True, const Standard_Boolean ApproxU1V1 = Standard_True, const Standard_Boolean ApproxU2V2 = Standard_True, const Standard_Integer indicemin = 0, const Standard_Integer indicemax = 0); |
63 | |
64 | Standard_EXPORT void Perform (const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ = Standard_True, const Standard_Boolean ApproxU1V1 = Standard_True, const Standard_Boolean ApproxU2V2 = Standard_True, const Standard_Integer indicemin = 0, const Standard_Integer indicemax = 0); |
65 | |
66 | Standard_EXPORT void SetParameters (const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer DegMin, const Standard_Integer DegMax, const Standard_Integer NbIterMax, const Standard_Boolean ApproxWithTangency = Standard_True, const Approx_ParametrizationType Parametrization = Approx_ChordLength); |
67 | |
68 | Standard_EXPORT void SetParameters (const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Boolean RelativeTol, const Standard_Integer DegMin, const Standard_Integer DegMax, const Standard_Integer NbIterMax, const Standard_Integer NbPntMax, const Standard_Boolean ApproxWithTangency = Standard_True, const Approx_ParametrizationType Parametrization = Approx_ChordLength); |
69 | |
70 | Standard_EXPORT void Perform(); |
71 | |
72 | Standard_EXPORT Standard_Real TolReached3d() const; |
73 | |
74 | Standard_EXPORT Standard_Real TolReached2d() const; |
75 | |
76 | Standard_EXPORT Standard_Boolean IsDone() const; |
77 | |
78 | Standard_EXPORT Standard_Integer NbMultiCurves() const; |
79 | |
80 | Standard_EXPORT const AppParCurves_MultiBSpCurve& Value (const Standard_Integer Index) const; |
81 | |
82 | |
83 | |
84 | |
85 | protected: |
86 | |
87 | |
88 | |
89 | |
90 | |
91 | private: |
92 | |
0cbfb9f1 |
93 | Standard_EXPORT Standard_Integer CorrectFinishIdx(const Standard_Integer theMinIdx, |
94 | const Standard_Integer theMaxIdx, |
95 | const Handle(IntPatch_WLine)& theline); |
96 | |
42cf5bc1 |
97 | Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf1, const IntSurf_Quadric& Surf2, const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ, const Standard_Boolean ApproxU1V1, const Standard_Boolean ApproxU2V2, const Standard_Integer indicemin, const Standard_Integer indicemax); |
98 | |
99 | Standard_EXPORT void Perform (const IntSurf_Quadric& Surf1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(IntPatch_WLine)& aLine, const Standard_Boolean ApproxXYZ, const Standard_Boolean ApproxU1V1, const Standard_Boolean ApproxU2V2, const Standard_Integer indicemin, const Standard_Integer indicemax); |
100 | |
101 | Standard_EXPORT void UpdateTolReached(); |
102 | |
103 | |
104 | GeomInt_TheComputeLineOfWLApprox myComputeLine; |
105 | GeomInt_TheComputeLineBezierOfWLApprox myComputeLineBezier; |
106 | Approx_MCurvesToBSpCurve myBezToBSpl; |
107 | Standard_Boolean myTolReached; |
108 | Standard_Boolean myApproxBez; |
109 | Standard_Boolean myWithTangency; |
110 | Standard_Real myTol3d; |
111 | Standard_Real myTol2d; |
112 | Standard_Boolean myRelativeTol; |
113 | Standard_Integer myDegMin; |
114 | Standard_Integer myDegMax; |
115 | Standard_Integer myNbPntMax; |
116 | Standard_Integer myNbIterMax; |
117 | Standard_Real myMinFactorXYZ; |
118 | Standard_Real myMinFactorUV; |
119 | Standard_Real myTolReached3d; |
120 | Standard_Real myTolReached2d; |
121 | |
122 | |
123 | }; |
124 | |
125 | |
126 | |
127 | |
128 | |
129 | |
130 | |
131 | #endif // _GeomInt_WLApprox_HeaderFile |