Commit | Line | Data |
---|---|---|
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 | |
17 | #include <BRepOffsetAPI_MakeFilling.ixx> | |
18 | ||
19 | ||
01697018 J |
20 | //======================================================================= |
21 | //function : Constructor | |
22 | //purpose : | |
23 | //====================================================================== | |
7fd59977 | 24 | BRepOffsetAPI_MakeFilling::BRepOffsetAPI_MakeFilling( const Standard_Integer Degree, |
25 | const Standard_Integer NbPtsOnCur, | |
26 | const Standard_Integer NbIter, | |
27 | const Standard_Boolean Anisotropie, | |
28 | const Standard_Real Tol2d, | |
29 | const Standard_Real Tol3d, | |
30 | const Standard_Real TolAng, | |
31 | const Standard_Real TolCurv, | |
32 | const Standard_Integer MaxDeg, | |
33 | const Standard_Integer MaxSegments ) : | |
34 | myFilling( Degree, NbPtsOnCur, NbIter, Anisotropie, Tol2d, Tol3d, TolAng, TolCurv, MaxDeg, MaxSegments ) | |
35 | { | |
36 | } | |
37 | ||
01697018 J |
38 | //======================================================================= |
39 | //function : SetConstrParam | |
40 | //purpose : | |
41 | //====================================================================== | |
7fd59977 | 42 | void BRepOffsetAPI_MakeFilling::SetConstrParam( const Standard_Real Tol2d, |
43 | const Standard_Real Tol3d, | |
44 | const Standard_Real TolAng, | |
45 | const Standard_Real TolCurv ) | |
46 | { | |
47 | myFilling.SetConstrParam( Tol2d, Tol3d, TolAng, TolCurv ); | |
48 | } | |
49 | ||
01697018 J |
50 | //======================================================================= |
51 | //function : SetResolParam | |
52 | //purpose : | |
53 | //====================================================================== | |
7fd59977 | 54 | void BRepOffsetAPI_MakeFilling::SetResolParam( const Standard_Integer Degree, |
55 | const Standard_Integer NbPtsOnCur, | |
56 | const Standard_Integer NbIter, | |
57 | const Standard_Boolean Anisotropie ) | |
58 | { | |
59 | myFilling.SetResolParam( Degree, NbPtsOnCur, NbIter, Anisotropie ); | |
60 | } | |
61 | ||
01697018 J |
62 | //======================================================================= |
63 | //function : SetApproxParam | |
64 | //purpose : | |
65 | //====================================================================== | |
7fd59977 | 66 | void BRepOffsetAPI_MakeFilling::SetApproxParam( const Standard_Integer MaxDeg, |
67 | const Standard_Integer MaxSegments ) | |
68 | { | |
69 | myFilling.SetApproxParam( MaxDeg, MaxSegments ); | |
70 | } | |
71 | ||
01697018 J |
72 | //======================================================================= |
73 | //function : LoadInitSurface | |
74 | //purpose : | |
75 | //====================================================================== | |
7fd59977 | 76 | void BRepOffsetAPI_MakeFilling::LoadInitSurface( const TopoDS_Face& Surf ) |
77 | { | |
78 | myFilling.LoadInitSurface( Surf ); | |
79 | } | |
80 | ||
01697018 J |
81 | //======================================================================= |
82 | //function : Add | |
83 | //purpose : adds an edge as a constraint | |
84 | //====================================================================== | |
7fd59977 | 85 | Standard_Integer BRepOffsetAPI_MakeFilling::Add( const TopoDS_Edge& Constr, |
86 | const GeomAbs_Shape Order, | |
87 | const Standard_Boolean IsBound ) | |
88 | { | |
89 | return myFilling.Add( Constr, Order, IsBound ); | |
90 | } | |
91 | ||
01697018 J |
92 | //======================================================================= |
93 | //function : Add | |
94 | //purpose : adds an edge with supporting face as a constraint | |
95 | //====================================================================== | |
7fd59977 | 96 | Standard_Integer BRepOffsetAPI_MakeFilling::Add( const TopoDS_Edge& Constr, |
97 | const TopoDS_Face& Support, | |
98 | const GeomAbs_Shape Order, | |
99 | const Standard_Boolean IsBound ) | |
100 | { | |
101 | return myFilling.Add( Constr, Support, Order, IsBound ); | |
102 | } | |
103 | ||
01697018 J |
104 | //======================================================================= |
105 | //function : Add | |
106 | //purpose : adds a "free constraint": face without edge | |
107 | //====================================================================== | |
7fd59977 | 108 | Standard_Integer BRepOffsetAPI_MakeFilling::Add( const TopoDS_Face& Support, |
109 | const GeomAbs_Shape Order ) | |
110 | { | |
111 | return myFilling.Add( Support, Order ); | |
112 | } | |
113 | ||
01697018 J |
114 | //======================================================================= |
115 | //function : Add | |
116 | //purpose : adds a point constraint | |
117 | //====================================================================== | |
7fd59977 | 118 | Standard_Integer BRepOffsetAPI_MakeFilling::Add( const gp_Pnt& Point ) |
119 | { | |
120 | return myFilling.Add( Point ); | |
121 | } | |
122 | ||
01697018 J |
123 | //======================================================================= |
124 | //function : Add | |
125 | //purpose : adds a point constraint on a face | |
126 | //====================================================================== | |
7fd59977 | 127 | Standard_Integer BRepOffsetAPI_MakeFilling::Add( const Standard_Real U, |
128 | const Standard_Real V, | |
129 | const TopoDS_Face& Support, | |
130 | const GeomAbs_Shape Order ) | |
131 | { | |
132 | return myFilling.Add( U, V, Support, Order ); | |
133 | } | |
134 | ||
135 | ||
01697018 J |
136 | //======================================================================= |
137 | //function : Build | |
138 | //purpose : builds the resulting face | |
139 | //====================================================================== | |
7fd59977 | 140 | void BRepOffsetAPI_MakeFilling::Build() |
141 | { | |
142 | myFilling.Build(); | |
143 | myShape = myFilling.Face(); | |
144 | } | |
145 | ||
01697018 J |
146 | //======================================================================= |
147 | //function : IsDone | |
148 | //purpose : | |
149 | //====================================================================== | |
7fd59977 | 150 | Standard_Boolean BRepOffsetAPI_MakeFilling::IsDone() const |
151 | { | |
152 | return myFilling.IsDone(); | |
153 | } | |
154 | ||
01697018 J |
155 | //======================================================================= |
156 | //function : Generated | |
157 | //purpose : returns the new edge (first in list) made from old edge "S" | |
158 | //======================================================================= | |
159 | const TopTools_ListOfShape& BRepOffsetAPI_MakeFilling::Generated(const TopoDS_Shape& S) | |
160 | { | |
161 | return myFilling.Generated(S); | |
162 | } | |
163 | ||
164 | //========================================================================== | |
165 | //function : G0Error | |
166 | //purpose : returns maximum distance from boundary to the resulting surface | |
167 | //========================================================================== | |
7fd59977 | 168 | Standard_Real BRepOffsetAPI_MakeFilling::G0Error() const |
169 | { | |
170 | return myFilling.G0Error(); | |
171 | } | |
172 | ||
01697018 J |
173 | //======================================================================= |
174 | //function : G1Error | |
175 | //purpose : returns maximum angle between the resulting surface | |
176 | // and constraint surfaces at boundaries | |
177 | //====================================================================== | |
7fd59977 | 178 | Standard_Real BRepOffsetAPI_MakeFilling::G1Error() const |
179 | { | |
180 | return myFilling.G1Error(); | |
181 | } | |
182 | ||
01697018 J |
183 | //======================================================================= |
184 | //function : G2Error | |
185 | //purpose : returns maximum difference of curvature between | |
186 | // the resulting surface and constraint surfaces at boundaries | |
187 | //====================================================================== | |
7fd59977 | 188 | Standard_Real BRepOffsetAPI_MakeFilling::G2Error() const |
189 | { | |
190 | return myFilling.G2Error(); | |
191 | } | |
192 | ||
01697018 J |
193 | //========================================================================== |
194 | //function : G0Error | |
195 | //purpose : returns maximum distance between the constraint number Index | |
196 | // and the resulting surface | |
197 | //========================================================================== | |
7fd59977 | 198 | Standard_Real BRepOffsetAPI_MakeFilling::G0Error( const Standard_Integer Index ) |
199 | { | |
200 | return myFilling.G0Error( Index ); | |
201 | } | |
202 | ||
01697018 J |
203 | //========================================================================== |
204 | //function : G1Error | |
205 | //purpose : returns maximum angle between the constraint number Index | |
206 | // and the resulting surface | |
207 | //========================================================================== | |
7fd59977 | 208 | Standard_Real BRepOffsetAPI_MakeFilling::G1Error( const Standard_Integer Index ) |
209 | { | |
210 | return myFilling.G1Error( Index ); | |
211 | } | |
212 | ||
01697018 J |
213 | //========================================================================== |
214 | //function : G2Error | |
215 | //purpose : returns maximum difference of curvature between | |
216 | // the constraint number Index and the resulting surface | |
217 | //========================================================================== | |
7fd59977 | 218 | Standard_Real BRepOffsetAPI_MakeFilling::G2Error( const Standard_Integer Index ) |
219 | { | |
220 | return myFilling.G2Error( Index ); | |
221 | } |