1 -- File: Adaptor3d_SurfaceOfLinearExtrusion.cdl
2 -- Created: Wed Apr 21 12:39:17 1993
3 -- Author: Bruno DUMORTIER
5 ---Copyright: Matra Datavision 1993
8 class SurfaceOfLinearExtrusion from Adaptor3d inherits Surface from Adaptor3d
10 --- Purpose: Generalised cylinder. This surface is obtained by sweeping a curve in a given
11 -- direction. The parametrization range for the parameter U is defined
12 -- with referenced the curve.
13 -- The parametrization range for the parameter V is ]-infinite,+infinite[
14 -- The position of the curve gives the origin for the
16 -- The continuity of the surface is CN in the V direction.
19 Array1OfReal from TColStd,
21 SurfaceType from GeomAbs,
31 BezierSurface from Geom,
32 BSplineSurface from Geom,
33 HSurface from Adaptor3d,
38 OutOfRange from Standard,
39 NoSuchObject from Standard,
40 DomainError from Standard
44 -- Methods specific of SurfaceOfLinearExtrusion.
47 Create returns SurfaceOfLinearExtrusion from Adaptor3d;
50 Create(C : HCurve from Adaptor3d)
51 returns SurfaceOfLinearExtrusion from Adaptor3d;
52 ---Purpose: The Curve is loaded.
54 Create(C : HCurve from Adaptor3d; V : Dir from gp)
55 returns SurfaceOfLinearExtrusion from Adaptor3d;
56 ---Purpose: Thew Curve and the Direction are loaded.
59 Load( me : in out ; C : HCurve from Adaptor3d)
60 ---Purpose: Changes the Curve
63 Load( me : in out ; V : Dir from gp)
64 ---Purpose: Changes the Direction
69 -- Implementation of Surface from Adaptor3d methods.
73 -- Global methods - Apply to the whole surface.
76 FirstUParameter(me) returns Real
79 LastUParameter(me) returns Real
82 FirstVParameter(me) returns Real
85 LastVParameter(me) returns Real
88 UContinuity(me) returns Shape from GeomAbs
91 VContinuity(me) returns Shape from GeomAbs
92 ---Purpose: Return CN.
95 NbUIntervals(me; S : Shape from GeomAbs) returns Integer
96 ---Purpose: Returns the number of U intervals for continuity
97 -- <S>. May be one if UContinuity(me) >= <S>
100 NbVIntervals(me; S : Shape from GeomAbs) returns Integer
101 ---Purpose: Returns the number of V intervals for continuity
102 -- <S>. May be one if VContinuity(me) >= <S>
105 UIntervals(me; T : in out Array1OfReal from TColStd;
106 S : Shape from GeomAbs )
107 ---Purpose: Returns the intervals with the requested continuity
108 -- in the U direction.
111 OutOfRange from Standard -- if Index < 1 or Index > NbIntervals
114 VIntervals(me; T : in out Array1OfReal from TColStd;
115 S : Shape from GeomAbs )
116 ---Purpose: Returns the intervals with the requested continuity
117 -- in the V direction.
119 OutOfRange from Standard -- if Index < 1 or Index > NbIntervals
122 UTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
123 ---Purpose: Returns a surface trimmed in the U direction
124 -- equivalent of <me> between
125 -- parameters <First> and <Last>. <Tol> is used to
126 -- test for 3d points confusion.
128 OutOfRange from Standard
129 ---Purpose: If <First> >= <Last>
130 is redefined static ;
132 VTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
133 ---Purpose: Returns a surface trimmed in the V direction between
134 -- parameters <First> and <Last>. <Tol> is used to
135 -- test for 3d points confusion.
137 OutOfRange from Standard
138 ---Purpose: If <First> >= <Last>
139 is redefined static ;
141 IsUClosed(me) returns Boolean
144 IsVClosed(me) returns Boolean
147 IsUPeriodic(me) returns Boolean
150 UPeriod(me) returns Real
152 DomainError from Standard -- if the curve is not periodic
155 IsVPeriodic(me) returns Boolean
158 VPeriod(me) returns Real
160 DomainError from Standard -- if the curve is not periodic
163 Value (me; U, V : Real) returns Pnt from gp
164 --- Purpose : Computes the point of parameters U,V on the surface.
167 D0 (me; U, V : Real; P : out Pnt from gp)
168 --- Purpose : Computes the point of parameters U,V on the surface.
171 D1 (me; U, V : Real; P : out Pnt from gp; D1U, D1V : out Vec from gp)
172 --- Purpose : Computes the point and the first derivatives on
174 raises DomainError from Standard
175 --- Purpose : Raised if the continuity of the current
176 -- intervals is not C1.
179 D2 (me; U, V : Real; P : out Pnt from gp; D1U, D1V, D2U, D2V, D2UV : out Vec from gp)
180 --- Purpose : Computes the point, the first and second
181 -- derivatives on the surface.
182 raises DomainError from Standard
183 --- Purpose : Raised if the continuity of the current
184 -- intervals is not C2.
187 D3 (me; U, V : Real; P : out Pnt from gp;
188 D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV : out Vec from gp)
189 --- Purpose : Computes the point, the first, second and third
190 -- derivatives on the surface.
191 raises DomainError from Standard
192 --- Purpose : Raised if the continuity of the current
193 -- intervals is not C3.
196 DN (me; U, V : Real; Nu, Nv : Integer) returns Vec from gp
197 --- Purpose : Computes the derivative of order Nu in the direction U and Nv
198 -- in the direction V at the point P(U, V).
199 raises DomainError from Standard,
200 --- Purpose : Raised if the current U interval is not not CNu
201 -- and the current V interval is not CNv.
202 OutOfRange from Standard
203 --- Purpose : Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
206 UResolution(me; R3d : Real ) returns Real
207 ---Purpose : Returns the parametric U resolution corresponding
208 -- to the real space resolution <R3d>.
211 VResolution(me; R3d : Real ) returns Real
212 ---Purpose : Returns the parametric V resolution corresponding
213 -- to the real space resolution <R3d>.
216 GetType(me) returns SurfaceType from GeomAbs
217 ---Purpose: Returns the type of the surface : Plane, Cylinder,
218 -- Cone, Sphere, Torus, BezierSurface,
219 -- BSplineSurface, SurfaceOfRevolution,
220 -- SurfaceOfExtrusion, OtherSurface
224 -- The following methods must be called when GetType returned
225 -- the corresponding type.
228 Plane(me) returns Pln from gp
229 raises NoSuchObject from Standard
232 Cylinder(me) returns Cylinder from gp
233 raises NoSuchObject from Standard
236 Cone(me) returns Cone from gp
237 raises NoSuchObject from Standard
240 Sphere(me) returns Sphere from gp
241 raises NoSuchObject from Standard
244 Torus(me) returns Torus from gp
245 raises NoSuchObject from Standard
249 UDegree(me) returns Integer
250 raises NoSuchObject from Standard
253 NbUPoles(me) returns Integer
254 raises NoSuchObject from Standard
257 VDegree(me) returns Integer
258 raises NoSuchObject from Standard
261 NbVPoles(me) returns Integer
262 raises NoSuchObject from Standard
266 NbUKnots(me) returns Integer
268 NoSuchObject from Standard
272 NbVKnots(me) returns Integer
274 NoSuchObject from Standard
278 IsURational(me) returns Boolean
280 NoSuchObject from Standard
283 IsVRational(me) returns Boolean
285 NoSuchObject from Standard
290 Bezier(me) returns BezierSurface from Geom
292 NoSuchObject from Standard
295 BSpline(me) returns BSplineSurface from Geom
297 NoSuchObject from Standard
300 AxeOfRevolution(me) returns Ax1 from gp
302 NoSuchObject from Standard -- only for SurfaceOfRevolution
305 Direction(me) returns Dir from gp
307 NoSuchObject from Standard -- only for SurfaceOfExtrusion
310 BasisCurve(me) returns HCurve from Adaptor3d
312 NoSuchObject from Standard
313 -- Only for SurfaceOfExtrusion and SurfaceOfRevolution
318 myBasisCurve : HCurve from Adaptor3d;
319 myDirection : Dir from gp;
323 end SurfaceOfLinearExtrusion;