0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_MakeFilling.cxx
CommitLineData
b311480e 1// Created on: 1998-08-26
2// Created by: Julia GERASIMOVA
3// Copyright (c) 1998-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
7fd59977 17
42cf5bc1 18#include <BRepOffsetAPI_MakeFilling.hxx>
19#include <gp_Pnt.hxx>
20#include <Standard_ConstructionError.hxx>
21#include <Standard_OutOfRange.hxx>
22#include <StdFail_NotDone.hxx>
23#include <TopoDS_Edge.hxx>
24#include <TopoDS_Face.hxx>
25#include <TopoDS_Shape.hxx>
7fd59977 26
01697018
J
27//=======================================================================
28//function : Constructor
29//purpose :
30//======================================================================
7fd59977 31BRepOffsetAPI_MakeFilling::BRepOffsetAPI_MakeFilling( const Standard_Integer Degree,
32 const Standard_Integer NbPtsOnCur,
33 const Standard_Integer NbIter,
34 const Standard_Boolean Anisotropie,
35 const Standard_Real Tol2d,
36 const Standard_Real Tol3d,
37 const Standard_Real TolAng,
38 const Standard_Real TolCurv,
39 const Standard_Integer MaxDeg,
40 const Standard_Integer MaxSegments ) :
41myFilling( Degree, NbPtsOnCur, NbIter, Anisotropie, Tol2d, Tol3d, TolAng, TolCurv, MaxDeg, MaxSegments )
42{
43}
44
01697018
J
45//=======================================================================
46//function : SetConstrParam
47//purpose :
48//======================================================================
7fd59977 49void BRepOffsetAPI_MakeFilling::SetConstrParam( const Standard_Real Tol2d,
50 const Standard_Real Tol3d,
51 const Standard_Real TolAng,
52 const Standard_Real TolCurv )
53{
54 myFilling.SetConstrParam( Tol2d, Tol3d, TolAng, TolCurv );
55}
56
01697018
J
57//=======================================================================
58//function : SetResolParam
59//purpose :
60//======================================================================
7fd59977 61void BRepOffsetAPI_MakeFilling::SetResolParam( const Standard_Integer Degree,
62 const Standard_Integer NbPtsOnCur,
63 const Standard_Integer NbIter,
64 const Standard_Boolean Anisotropie )
65{
66 myFilling.SetResolParam( Degree, NbPtsOnCur, NbIter, Anisotropie );
67}
68
01697018
J
69//=======================================================================
70//function : SetApproxParam
71//purpose :
72//======================================================================
7fd59977 73void BRepOffsetAPI_MakeFilling::SetApproxParam( const Standard_Integer MaxDeg,
74 const Standard_Integer MaxSegments )
75{
76 myFilling.SetApproxParam( MaxDeg, MaxSegments );
77}
78
01697018
J
79//=======================================================================
80//function : LoadInitSurface
81//purpose :
82//======================================================================
7fd59977 83void BRepOffsetAPI_MakeFilling::LoadInitSurface( const TopoDS_Face& Surf )
84{
85 myFilling.LoadInitSurface( Surf );
86}
87
01697018
J
88//=======================================================================
89//function : Add
90//purpose : adds an edge as a constraint
91//======================================================================
7fd59977 92Standard_Integer BRepOffsetAPI_MakeFilling::Add( const TopoDS_Edge& Constr,
93 const GeomAbs_Shape Order,
94 const Standard_Boolean IsBound )
95{
96 return myFilling.Add( Constr, Order, IsBound );
97}
98
01697018
J
99//=======================================================================
100//function : Add
101//purpose : adds an edge with supporting face as a constraint
102//======================================================================
7fd59977 103Standard_Integer BRepOffsetAPI_MakeFilling::Add( const TopoDS_Edge& Constr,
104 const TopoDS_Face& Support,
105 const GeomAbs_Shape Order,
106 const Standard_Boolean IsBound )
107{
108 return myFilling.Add( Constr, Support, Order, IsBound );
109}
110
01697018
J
111//=======================================================================
112//function : Add
113//purpose : adds a "free constraint": face without edge
114//======================================================================
7fd59977 115Standard_Integer BRepOffsetAPI_MakeFilling::Add( const TopoDS_Face& Support,
116 const GeomAbs_Shape Order )
117{
118 return myFilling.Add( Support, Order );
119}
120
01697018
J
121//=======================================================================
122//function : Add
123//purpose : adds a point constraint
124//======================================================================
7fd59977 125Standard_Integer BRepOffsetAPI_MakeFilling::Add( const gp_Pnt& Point )
126{
127 return myFilling.Add( Point );
128}
129
01697018
J
130//=======================================================================
131//function : Add
132//purpose : adds a point constraint on a face
133//======================================================================
7fd59977 134Standard_Integer BRepOffsetAPI_MakeFilling::Add( const Standard_Real U,
135 const Standard_Real V,
136 const TopoDS_Face& Support,
137 const GeomAbs_Shape Order )
138{
139 return myFilling.Add( U, V, Support, Order );
140}
141
142
01697018
J
143//=======================================================================
144//function : Build
145//purpose : builds the resulting face
146//======================================================================
7fd59977 147void BRepOffsetAPI_MakeFilling::Build()
148{
149 myFilling.Build();
150 myShape = myFilling.Face();
151}
152
01697018
J
153//=======================================================================
154//function : IsDone
155//purpose :
156//======================================================================
7fd59977 157Standard_Boolean BRepOffsetAPI_MakeFilling::IsDone() const
158{
159 return myFilling.IsDone();
160}
161
01697018
J
162//=======================================================================
163//function : Generated
164//purpose : returns the new edge (first in list) made from old edge "S"
165//=======================================================================
166const TopTools_ListOfShape& BRepOffsetAPI_MakeFilling::Generated(const TopoDS_Shape& S)
167{
168 return myFilling.Generated(S);
169}
170
171//==========================================================================
172//function : G0Error
173//purpose : returns maximum distance from boundary to the resulting surface
174//==========================================================================
7fd59977 175Standard_Real BRepOffsetAPI_MakeFilling::G0Error() const
176{
177 return myFilling.G0Error();
178}
179
01697018
J
180//=======================================================================
181//function : G1Error
182//purpose : returns maximum angle between the resulting surface
183// and constraint surfaces at boundaries
184//======================================================================
7fd59977 185Standard_Real BRepOffsetAPI_MakeFilling::G1Error() const
186{
187 return myFilling.G1Error();
188}
189
01697018
J
190//=======================================================================
191//function : G2Error
192//purpose : returns maximum difference of curvature between
193// the resulting surface and constraint surfaces at boundaries
194//======================================================================
7fd59977 195Standard_Real BRepOffsetAPI_MakeFilling::G2Error() const
196{
197 return myFilling.G2Error();
198}
199
01697018
J
200//==========================================================================
201//function : G0Error
202//purpose : returns maximum distance between the constraint number Index
203// and the resulting surface
204//==========================================================================
7fd59977 205Standard_Real BRepOffsetAPI_MakeFilling::G0Error( const Standard_Integer Index )
206{
207 return myFilling.G0Error( Index );
208}
209
01697018
J
210//==========================================================================
211//function : G1Error
212//purpose : returns maximum angle between the constraint number Index
213// and the resulting surface
214//==========================================================================
7fd59977 215Standard_Real BRepOffsetAPI_MakeFilling::G1Error( const Standard_Integer Index )
216{
217 return myFilling.G1Error( Index );
218}
219
01697018
J
220//==========================================================================
221//function : G2Error
222//purpose : returns maximum difference of curvature between
223// the constraint number Index and the resulting surface
224//==========================================================================
7fd59977 225Standard_Real BRepOffsetAPI_MakeFilling::G2Error( const Standard_Integer Index )
226{
227 return myFilling.G2Error( Index );
228}