0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead...
[occt.git] / src / ChFi3d / ChFi3d_FilBuilder.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-04-25
2// Created by: Modelistation
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 _ChFi3d_FilBuilder_HeaderFile
18#define _ChFi3d_FilBuilder_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <BlendFunc_SectionShape.hxx>
25#include <ChFi3d_Builder.hxx>
26#include <ChFi3d_FilletShape.hxx>
27#include <Standard_Real.hxx>
28#include <Standard_Integer.hxx>
29#include <Standard_Boolean.hxx>
30#include <ChFiDS_SecHArray1.hxx>
31#include <math_Vector.hxx>
32#include <TopAbs_Orientation.hxx>
33#include <TopAbs_State.hxx>
34#include <ChFiDS_SequenceOfSurfData.hxx>
35#include <ChFiDS_ListOfStripe.hxx>
36class TopoDS_Shape;
37class TopoDS_Edge;
38class Law_Function;
39class TopoDS_Vertex;
40class gp_XY;
41class ChFiDS_SurfData;
42class ChFiDS_HElSpine;
43class ChFiDS_Spine;
44class BRepAdaptor_HSurface;
45class Adaptor3d_TopolTool;
46class BRepAdaptor_HCurve2d;
47class BRepBlend_Line;
48class ChFiDS_Stripe;
49
50
51//! Tool of construction of fillets 3d on edges (on a solid).
52class ChFi3d_FilBuilder : public ChFi3d_Builder
53{
54public:
55
56 DEFINE_STANDARD_ALLOC
57
58
59 Standard_EXPORT ChFi3d_FilBuilder(const TopoDS_Shape& S, const ChFi3d_FilletShape FShape = ChFi3d_Rational, const Standard_Real Ta = 1.0e-2);
60
61 //! Sets the type of fillet surface.
62 Standard_EXPORT void SetFilletShape (const ChFi3d_FilletShape FShape);
63
64 //! Returns the type of fillet surface.
65 Standard_EXPORT ChFi3d_FilletShape GetFilletShape() const;
66
67 //! initialisation of a contour with the first edge
68 //! (the following are found by propagation).
69 //! Attention, you need to start with SetRadius.
70 Standard_EXPORT void Add (const TopoDS_Edge& E);
71
72 //! initialisation of the constant vector the corresponding 1st edge.
73 Standard_EXPORT void Add (const Standard_Real Radius, const TopoDS_Edge& E);
74
75 //! Set the radius of the contour of index IC.
76 Standard_EXPORT void SetRadius (const Handle(Law_Function)& C, const Standard_Integer IC, const Standard_Integer IinC);
77
78 //! Returns true the contour is flaged as edge constant.
79 Standard_EXPORT Standard_Boolean IsConstant (const Standard_Integer IC);
80
81 //! Returns the vector if the contour is flagged as edge
82 //! constant.
83 Standard_EXPORT Standard_Real Radius (const Standard_Integer IC);
84
85 //! Reset all vectors of contour IC.
86 Standard_EXPORT void ResetContour (const Standard_Integer IC);
87
88 //! Set a constant on edge E of the contour of
89 //! index IC. Since then E is flagged as constant.
90 Standard_EXPORT void SetRadius (const Standard_Real Radius, const Standard_Integer IC, const TopoDS_Edge& E);
91
92 //! Extracts the flag constant and the vector of edge E.
93 Standard_EXPORT void UnSet (const Standard_Integer IC, const TopoDS_Edge& E);
94
95 //! Set a vector on vertex V of the contour of index IC.
96 Standard_EXPORT void SetRadius (const Standard_Real Radius, const Standard_Integer IC, const TopoDS_Vertex& V);
97
98 //! Extracts the vector of the vertex V.
99 Standard_EXPORT void UnSet (const Standard_Integer IC, const TopoDS_Vertex& V);
100
101 //! Set a vertex on the point of parametre U in the edge IinC
102 //! of the contour of index IC
103 Standard_EXPORT void SetRadius (const gp_XY& UandR, const Standard_Integer IC, const Standard_Integer IinC);
104
105 //! Returns true E is flagged as edge constant.
106 Standard_EXPORT Standard_Boolean IsConstant (const Standard_Integer IC, const TopoDS_Edge& E);
107
108 //! Returns the vector if E is flagged as edge constant.
109 Standard_EXPORT Standard_Real Radius (const Standard_Integer IC, const TopoDS_Edge& E);
110
111 //! Returns in First and Last les extremities of the
112 //! part of variable vector framing E, returns
113 //! False if E is flagged as edge constant.
114 Standard_EXPORT Standard_Boolean GetBounds (const Standard_Integer IC, const TopoDS_Edge& E, Standard_Real& First, Standard_Real& Last);
115
116 //! Returns the rule of elementary evolution of the
117 //! part to variable vector framing E, returns a
118 //! rule zero if E is flagged as edge constant.
119 Standard_EXPORT Handle(Law_Function) GetLaw (const Standard_Integer IC, const TopoDS_Edge& E);
120
121 //! Sets the rule of elementary evolution of the
122 //! part to variable vector framing E.
123 Standard_EXPORT void SetLaw (const Standard_Integer IC, const TopoDS_Edge& E, const Handle(Law_Function)& L);
124
125 Standard_EXPORT void Simulate (const Standard_Integer IC);
126
127 Standard_EXPORT Standard_Integer NbSurf (const Standard_Integer IC) const;
128
129 Standard_EXPORT Handle(ChFiDS_SecHArray1) Sect (const Standard_Integer IC, const Standard_Integer IS) const;
130
131
132
133
134protected:
135
136
79104795 137 Standard_EXPORT void SimulKPart (const Handle(ChFiDS_SurfData)& SD) const Standard_OVERRIDE;
42cf5bc1 138
dde68833 139 Standard_EXPORT Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE;
42cf5bc1 140
141 Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE;
142
143 Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_HCurve2d)& PC2, const Handle(BRepAdaptor_HSurface)& Sref2, const Handle(BRepAdaptor_HCurve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE;
144
145 Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_HCurve2d)& PC2, const Handle(BRepAdaptor_HSurface)& Sref2, const Handle(BRepAdaptor_HCurve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP1, const Standard_Boolean RecRst1, const Standard_Boolean RecP2, const Standard_Boolean RecRst2, const math_Vector& Soldep) Standard_OVERRIDE;
146
79104795 147 Standard_EXPORT Standard_Boolean PerformFirstSection (const Handle(ChFiDS_Spine)& S, const Handle(ChFiDS_HElSpine)& HGuide, const Standard_Integer Choix, Handle(BRepAdaptor_HSurface)& S1, Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real Par, math_Vector& SolDep, TopAbs_State& Pos1, TopAbs_State& Pos2) const Standard_OVERRIDE;
42cf5bc1 148
149 //! Method calculates the elements of construction of the
150 //! fillet (constant or evolutive).
dde68833 151 Standard_EXPORT Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE;
42cf5bc1 152
153 Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE;
154
155 Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_HCurve2d)& PC2, const Handle(BRepAdaptor_HSurface)& Sref2, const Handle(BRepAdaptor_HCurve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE;
156
157 Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_HCurve2d)& PC2, const Handle(BRepAdaptor_HSurface)& Sref2, const Handle(BRepAdaptor_HCurve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP1, const Standard_Boolean RecRst1, const Standard_Boolean RecP2, const Standard_Boolean RecRst2, const math_Vector& Soldep) Standard_OVERRIDE;
158
159 //! Method to split an singular SurfData in several non
160 //! singular SurfData..
161 Standard_EXPORT void SplitSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(BRepBlend_Line)& line);
162
79104795 163 Standard_EXPORT void PerformTwoCorner (const Standard_Integer Index) Standard_OVERRIDE;
42cf5bc1 164
79104795 165 Standard_EXPORT void PerformThreeCorner (const Standard_Integer Index) Standard_OVERRIDE;
42cf5bc1 166
79104795 167 Standard_EXPORT void ExtentOneCorner (const TopoDS_Vertex& V, const Handle(ChFiDS_Stripe)& S) Standard_OVERRIDE;
42cf5bc1 168
79104795 169 Standard_EXPORT void ExtentTwoCorner (const TopoDS_Vertex& V, const ChFiDS_ListOfStripe& LS) Standard_OVERRIDE;
42cf5bc1 170
79104795 171 Standard_EXPORT void ExtentThreeCorner (const TopoDS_Vertex& V, const ChFiDS_ListOfStripe& LS) Standard_OVERRIDE;
42cf5bc1 172
79104795 173 Standard_EXPORT void SetRegul() Standard_OVERRIDE;
42cf5bc1 174
175
176
177
178private:
179
180
181
182 BlendFunc_SectionShape myShape;
183
184
185};
186
187
188
189
190
191
192
193#endif // _ChFi3d_FilBuilder_HeaderFile