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