42cf5bc1 |
1 | // Created on: 1993-12-06 |
2 | // Created by: Jacques GOUSSARD |
3 | // Copyright (c) 1993-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 _BRepBlend_CSWalking_HeaderFile |
18 | #define _BRepBlend_CSWalking_HeaderFile |
19 | |
c22b52d6 |
20 | #include <Adaptor3d_Curve.hxx> |
21 | #include <Adaptor3d_Surface.hxx> |
42cf5bc1 |
22 | #include <TColStd_HArray1OfReal.hxx> |
23 | #include <Blend_Point.hxx> |
42cf5bc1 |
24 | #include <BRepBlend_SequenceOfPointOnRst.hxx> |
25 | #include <math_Vector.hxx> |
26 | #include <Blend_Status.hxx> |
c22b52d6 |
27 | |
42cf5bc1 |
28 | class BRepBlend_Line; |
42cf5bc1 |
29 | class Adaptor3d_TopolTool; |
30 | class StdFail_NotDone; |
31 | class Adaptor3d_HVertex; |
42cf5bc1 |
32 | class BRepBlend_HCurve2dTool; |
33 | class Adaptor3d_HSurfaceTool; |
34 | class BRepBlend_HCurveTool; |
35 | class BRepBlend_BlendTool; |
36 | class BRepBlend_PointOnRst; |
37 | class BRepBlend_Extremity; |
38 | class Blend_CSFunction; |
39 | class IntSurf_Transition; |
40 | class gp_Pnt; |
41 | class gp_Pnt2d; |
42 | class gp_Vec; |
43 | class gp_Vec2d; |
44 | |
42cf5bc1 |
45 | class BRepBlend_CSWalking |
46 | { |
47 | public: |
48 | |
49 | DEFINE_STANDARD_ALLOC |
50 | |
51 | |
c22b52d6 |
52 | Standard_EXPORT BRepBlend_CSWalking(const Handle(Adaptor3d_Curve)& Curv, const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain); |
42cf5bc1 |
53 | |
54 | Standard_EXPORT void Perform (Blend_CSFunction& F, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); |
55 | |
56 | Standard_EXPORT Standard_Boolean Complete (Blend_CSFunction& F, const Standard_Real Pmin); |
57 | |
58 | Standard_Boolean IsDone() const; |
59 | |
60 | const Handle(BRepBlend_Line)& Line() const; |
61 | |
42cf5bc1 |
62 | private: |
63 | |
64 | |
65 | Standard_EXPORT void InternalPerform (Blend_CSFunction& F, math_Vector& Sol, const Standard_Real Bound); |
66 | |
c22b52d6 |
67 | Standard_EXPORT void Transition (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc); |
42cf5bc1 |
68 | |
69 | Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Integer Index, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx); |
70 | |
71 | Standard_EXPORT Blend_Status CheckDeflectionOnSurf (const gp_Pnt& Psurf, const gp_Pnt2d& Ponsurf, const gp_Vec& Tgsurf, const gp_Vec2d& Tgonsurf); |
72 | |
73 | Standard_EXPORT Blend_Status CheckDeflectionOnCurv (const gp_Pnt& Pcurv, const Standard_Real Poncurv, const gp_Vec& Tgcurv); |
74 | |
75 | Standard_EXPORT Blend_Status TestArret (Blend_CSFunction& F, const math_Vector& Sol, const Standard_Boolean TestDeflection, const Blend_Status State); |
76 | |
77 | |
78 | Standard_Boolean done; |
79 | Handle(BRepBlend_Line) line; |
c22b52d6 |
80 | Handle(Adaptor3d_Surface) surf; |
81 | Handle(Adaptor3d_Curve) curv; |
42cf5bc1 |
82 | Handle(Adaptor3d_TopolTool) domain; |
83 | Standard_Real tolesp; |
84 | Standard_Real tolgui; |
85 | Standard_Real pasmax; |
86 | Standard_Real fleche; |
87 | Standard_Real param; |
88 | Standard_Real firstparam; |
89 | Handle(TColStd_HArray1OfReal) firstsol; |
90 | Blend_Point previousP; |
91 | Standard_Boolean rebrou; |
92 | Standard_Boolean iscomplete; |
93 | Standard_Boolean comptra; |
94 | Standard_Real sens; |
95 | |
96 | |
97 | }; |
98 | |
99 | #define TheVertex Handle(Adaptor3d_HVertex) |
100 | #define TheVertex_hxx <Adaptor3d_HVertex.hxx> |
c22b52d6 |
101 | #define TheArc Handle(Adaptor2d_Curve2d) |
102 | #define TheArc_hxx <Adaptor2d_Curve2d.hxx> |
103 | #define TheSurface Handle(Adaptor3d_Surface) |
104 | #define TheSurface_hxx <Adaptor3d_Surface.hxx> |
105 | #define TheCurve Handle(Adaptor3d_Curve) |
106 | #define TheCurve_hxx <Adaptor3d_Curve.hxx> |
42cf5bc1 |
107 | #define TheVertexTool Standard_Integer |
108 | #define TheVertexTool_hxx <Standard_Integer.hxx> |
109 | #define TheArcTool BRepBlend_HCurve2dTool |
110 | #define TheArcTool_hxx <BRepBlend_HCurve2dTool.hxx> |
111 | #define TheSurfaceTool Adaptor3d_HSurfaceTool |
112 | #define TheSurfaceTool_hxx <Adaptor3d_HSurfaceTool.hxx> |
113 | #define TheCurveTool BRepBlend_HCurveTool |
114 | #define TheCurveTool_hxx <BRepBlend_HCurveTool.hxx> |
115 | #define Handle_TheTopolTool Handle(Adaptor3d_TopolTool) |
116 | #define TheTopolTool Adaptor3d_TopolTool |
117 | #define TheTopolTool_hxx <Adaptor3d_TopolTool.hxx> |
118 | #define TheBlendTool BRepBlend_BlendTool |
119 | #define TheBlendTool_hxx <BRepBlend_BlendTool.hxx> |
120 | #define ThePointOnRst BRepBlend_PointOnRst |
121 | #define ThePointOnRst_hxx <BRepBlend_PointOnRst.hxx> |
122 | #define TheSeqPointOnRst BRepBlend_SequenceOfPointOnRst |
123 | #define TheSeqPointOnRst_hxx <BRepBlend_SequenceOfPointOnRst.hxx> |
124 | #define TheExtremity BRepBlend_Extremity |
125 | #define TheExtremity_hxx <BRepBlend_Extremity.hxx> |
126 | #define Handle_TheLine Handle(BRepBlend_Line) |
127 | #define TheLine BRepBlend_Line |
128 | #define TheLine_hxx <BRepBlend_Line.hxx> |
129 | #define Blend_CSWalking BRepBlend_CSWalking |
130 | #define Blend_CSWalking_hxx <BRepBlend_CSWalking.hxx> |
131 | |
132 | #include <Blend_CSWalking.lxx> |
133 | |
134 | #undef TheVertex |
135 | #undef TheVertex_hxx |
136 | #undef TheArc |
137 | #undef TheArc_hxx |
138 | #undef TheSurface |
139 | #undef TheSurface_hxx |
140 | #undef TheCurve |
141 | #undef TheCurve_hxx |
142 | #undef TheVertexTool |
143 | #undef TheVertexTool_hxx |
144 | #undef TheArcTool |
145 | #undef TheArcTool_hxx |
146 | #undef TheSurfaceTool |
147 | #undef TheSurfaceTool_hxx |
148 | #undef TheCurveTool |
149 | #undef TheCurveTool_hxx |
150 | #undef Handle_TheTopolTool |
151 | #undef TheTopolTool |
152 | #undef TheTopolTool_hxx |
153 | #undef TheBlendTool |
154 | #undef TheBlendTool_hxx |
155 | #undef ThePointOnRst |
156 | #undef ThePointOnRst_hxx |
157 | #undef TheSeqPointOnRst |
158 | #undef TheSeqPointOnRst_hxx |
159 | #undef TheExtremity |
160 | #undef TheExtremity_hxx |
161 | #undef Handle_TheLine |
162 | #undef TheLine |
163 | #undef TheLine_hxx |
164 | #undef Blend_CSWalking |
165 | #undef Blend_CSWalking_hxx |
166 | |
167 | |
168 | |
169 | |
170 | #endif // _BRepBlend_CSWalking_HeaderFile |