0023022: This is desirable to access OpenGl extensions and core API (1.2+) in one...
[occt.git] / src / ShapeCustom / ShapeCustom_BSplineRestriction.cdl
CommitLineData
7fd59977 1-- File: ShapeCustom_BSplineRestriction.cdl
2-- Created: Fri Jun 18 12:02:57 1999
3-- Author: Galina Koulikova
4-- <gka@zamox.nnov.matra-dtv.fr>
5---Copyright: Matra Datavision 1999
6
7private class BSplineRestriction from ShapeCustom inherits Modification from BRepTools
8
9 ---Purpose: this tool intended for aproximation surfaces, curves and pcurves with
10 -- specified degree , max number of segments, tolerance 2d, tolerance 3d. Specified
11 -- continuity can be reduced if approximation with specified continuity was not done.
12
13uses
14 Surface from Geom,
15 Curve from Geom,
16 Curve from Geom2d,
17 Shape from TopoDS,
18 Face from TopoDS,
19 Edge from TopoDS,
20 Vertex from TopoDS,
21 Location from TopLoc,
22 Shape from GeomAbs,
23 Pnt from gp,
24 RestrictionParameters from ShapeCustom
25
26is
27 Create returns mutable BSplineRestriction from ShapeCustom;
28 ---Purpose: Empty constructor.
29
30
31 Create(anApproxSurfaceFlag,
32 anApproxCurve3dFlag,
33 anApproxCurve2dFlag : Boolean;
34 aTol3d, aTol2d : Real;
35 aContinuity3d, aContinuity2d: Shape from GeomAbs ;
36 aMaxDegree, aNbMaxSeg : Integer;
37 Degree, Rational : Boolean)
38 returns mutable BSplineRestriction from ShapeCustom;
39 ---Purpose: Initializes with specified parameters of aproximation.
40
41 Create(anApproxSurfaceFlag, anApproxCurve3dFlag, anApproxCurve2dFlag: Boolean from Standard;
42 aTol3d, aTol2d : Real;
43 aContinuity3d, aContinuity2d : Shape from GeomAbs ;
44 aMaxDegree, aNbMaxSeg : Integer;
45 Degree, Rational : Boolean;
46 aModes : RestrictionParameters from ShapeCustom)
47 returns mutable BSplineRestriction from ShapeCustom;
48 ---Purpose: Initializes with specified parameters of aproximation.
49
50 NewSurface(me: mutable; F : Face from TopoDS;
51 S : out Surface from Geom;
52 L : out Location from TopLoc;
53 Tol : out Real from Standard;
54 RevWires : out Boolean from Standard;
55 RevFace : out Boolean from Standard)
56
57 ---Purpose: Returns Standard_True if the face <F> has been
58 -- modified. In this case, <S> is the new geometric
59 -- support of the face, <L> the new location,<Tol>
60 -- the new tolerance.<RevWires> has to be set to
61 -- Standard_True when the modification reverses the
62 -- normal of the surface.(the wires have to be
63 -- reversed). <RevFace> has to be set to
64 -- Standard_True if the orientation of the modified
65 -- face changes in the shells which contain it.
66 --
67 -- Otherwise, returns Standard_False, and <S>, <L>,
68 -- <Tol> , <RevWires> ,<RevFace> are not significant.
69
70
71 returns Boolean from Standard;
72
73
74 NewCurve(me: mutable; E : Edge from TopoDS;
75 C : out Curve from Geom;
76 L : out Location from TopLoc;
77 Tol: out Real from Standard)
78
79 returns Boolean from Standard;
80
81 ---Purpose: Returns Standard_True if curve from the edge <E> has been
82 -- modified. In this case, <C> is the new geometric
83 -- support of the edge, <L> the new location, <Tol>
84 -- the new tolerance.
85 -- Otherwise, returns Standard_True if Surface is modified or
86 -- one of pcurves of edge is modified. In this case C is copy of
87 -- geometric support of the edge.
88 -- In other cases returns Standard_False, and <C>, <L>, <Tol> are not
89 -- significant.
90
91 NewCurve2d(me: mutable; E : Edge from TopoDS;
92 F : Face from TopoDS;
93 NewE : Edge from TopoDS;
94 NewF : Face from TopoDS;
95 C : out Curve from Geom2d;
96 Tol : out Real from Standard)
97
98 returns Boolean from Standard;
99
100 ---Purpose: Returns Standard_True if the edge <E> has been modified.
101 -- In this case,if curve on the surface is modified, <C>
102 -- is the new geometric support of the edge, <L> the
103 -- new location, <Tol> the new tolerance. If curve on the surface
104 -- is not modified C is copy curve on surface from the edge <E>.
105 --
106 -- Otherwise, returns Standard_False, and <C>, <L>,
107 -- <Tol> are not significant.
108 --
109 -- <NewE> is the new edge created from <E>. <NewF>
110 -- is the new face created from <F>. They may be usefull.
111
112
113 ConvertSurface(me: mutable; aSurface : Surface from Geom; S : out Surface from Geom;
114 UF,UL,VF,VL : Real from Standard;
115 IsOf : Boolean from Standard = Standard_True)
116 returns Boolean from Standard;
117 ---Purpose: Returns Standard_True if the surface has been modified.
118 -- if flag IsOf equals Standard_True Offset surfaces are aproximated to Offset
119 -- if Standard_False to BSpline
120
121 ConvertCurve(me: mutable;aCurve : in out Curve from Geom; C : out Curve from Geom; IsConvert : Boolean;
122 First, Last : Real; TolCur : in out Real;IsOf : Boolean from Standard = Standard_True)
123 returns Boolean from Standard;
124 ---Purpose: Returns Standard_True if the curve has been modified.
125 -- if flag IsOf equals Standard_True Offset curves are aproximated to Offset
126 -- if Standard_False to BSpline
127
128 ConvertCurve2d(me: mutable;aCurve : in out Curve from Geom2d; C : out Curve from Geom2d; IsConvert : Boolean;
129 First, Last : Real; TolCur : in out Real;IsOf : Boolean from Standard = Standard_True)
130 returns Boolean from Standard;
131 ---Purpose: Returns Standard_True if the pcurve has been modified.
132 -- if flag IsOf equals Standard_True Offset pcurves are aproximated to Offset
133 -- if Standard_False to BSpline
134
135 -- Methods for setting and obtaining fields
136
137 SetTol3d(me: mutable; Tol3d : Real from Standard);
138 ---C++: inline
139 ---Purpose: Sets tolerance of aproximation for curve3d and surface
140
141 SetTol2d(me: mutable; Tol2d : Real from Standard);
142 ---C++: inline
143 ---Purpose: Sets tolerance of aproximation for curve2d
144
145 ModifyApproxSurfaceFlag(me : mutable) returns Boolean;
146 ---C++: inline
147 ---C++: return &
148 ---Purpose: Returns (modifiable) the flag which defines whether the
149 -- surface is aproximated.
150
151 ModifyApproxCurve3dFlag(me : mutable) returns Boolean;
152 ---C++: inline
153 ---C++: return &
154 ---Purpose: Returns (modifiable) the flag which defines whether the
155 -- curve3d is aproximated.
156
157 ModifyApproxCurve2dFlag(me : mutable) returns Boolean;
158 ---C++: inline
159 ---C++: return &
160 ---Purpose: Returns (modifiable) the flag which defines whether the curve2d is aproximated.
161
162 SetContinuity3d(me : mutable; Continuity3d : Shape from GeomAbs);
163 ---C++: inline
164 ---Purpose: Sets continuity3d for aproximation curve3d and surface.
165
166 SetContinuity2d(me : mutable; Continuity2d : Shape from GeomAbs);
167 ---C++: inline
168 ---Purpose: Sets continuity3d for aproximation curve2d.
169
170 SetMaxDegree(me : mutable; MaxDegree : Integer from Standard);
171 ---C++: inline
172 ---Purpose: Sets max degree for aproximation.
173
174 SetMaxNbSegments(me : mutable; MaxNbSegments : Integer from Standard);
175 ---C++: inline
176 ---Purpose: Sets max number of segments for aproximation.
177
178 SetPriority(me : mutable; Degree : Boolean from Standard);
179 ---C++: inline
180 ---Purpose: Sets priority for aproximation curves and surface.
181 -- If Degree is True approximation is made with degree less
182 -- then specified MaxDegree at the expense of number of spanes.
183 -- If Degree is False approximation is made with number of
184 -- spans less then specified MaxNbSegment at the expense of
185 -- specified MaxDegree.
186
187 SetConvRational(me : mutable; Rational : Boolean from Standard);
188 ---C++: inline
189 ---Purpose: Sets flag for define if rational BSpline or Bezier is
190 -- converted to polynomial. If Rational is True approximation
191 -- for rational BSpline and Bezier is made to polynomial even
192 -- if degree is less then MaxDegree and number of spans is less
193 -- then specified MaxNbSegment.
194
195 GetRestrictionParameters(me)
196 returns RestrictionParameters from ShapeCustom;
197 ---C++: inline
198 ---Purpose: Returns the container of modes which defines
199 -- what geometry should be converted to BSplines.
200
201 SetRestrictionParameters(me: mutable;
202 aModes: RestrictionParameters from ShapeCustom);
203 ---C++: inline
204 ---Purpose: Sets the container of modes which defines
205 -- what geometry should be converted to BSplines.
206
207 Curve3dError(me) returns Real;
208 ---C++: inline
209 ---Purpose:Returns error for aproximation curve3d.
210
211 Curve2dError(me) returns Real;
212 ---C++: inline
213 ---Purpose:Returns error for aproximation curve2d.
214
215 SurfaceError(me) returns Real;
216 ---C++: inline
217 ---Purpose:Returns error for aproximation surface.
218
219 NewPoint(me: mutable; V : Vertex from TopoDS;
220 P : out Pnt from gp;
221 Tol: out Real from Standard)
222
223 returns Boolean from Standard;
224
225 NewParameter(me: mutable; V : Vertex from TopoDS;
226 E : Edge from TopoDS;
227 P : out Real from Standard;
228 Tol: out Real from Standard)
229
230 returns Boolean from Standard;
231
232
233
234
235 Continuity(me: mutable; E : Edge from TopoDS;
236 F1,F2 : Face from TopoDS;
237 NewE : Edge from TopoDS;
238 NewF1,NewF2: Face from TopoDS)
239
240 returns Shape from GeomAbs;
241
242 MaxErrors (me; aCurve3dErr, aCurve2dErr : out Real) returns Real from Standard;
243 ---Purpose:Returns error for aproximation surface, curve3d and curve2d.
244
245 NbOfSpan (me) returns Integer from Standard;
246 ---Purpose:Returns number for aproximation surface, curve3d and curve2d.
247
248
249fields
250 myContinuity3d,
251 myContinuity2d : Shape from GeomAbs;
252 myMaxDegree,
253 myNbMaxSeg : Integer from Standard;
254 myTol3d,
255 myTol2d,
256 mySurfaceError,
257 myCurve3dError,
258 myCurve2dError : Real from Standard;
259 myNbOfSpan : Integer from Standard;
260 myApproxSurfaceFlag,
261 myApproxCurve3dFlag,
262 myApproxCurve2dFlag : Boolean from Standard;
263 myDeg : Boolean from Standard;
264 myConvert : Boolean from Standard;
265 myRational : Boolean from Standard;
266
267 myParameters : RestrictionParameters from ShapeCustom;
268
269
270end BSplineRestriction;