1 -- Created on: 1993-04-21
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class SurfaceOfLinearExtrusion from Adaptor3d inherits Surface from Adaptor3d
19 --- Purpose: Generalised cylinder. This surface is obtained by sweeping a curve in a given
20 -- direction. The parametrization range for the parameter U is defined
21 -- with referenced the curve.
22 -- The parametrization range for the parameter V is ]-infinite,+infinite[
23 -- The position of the curve gives the origin for the
25 -- The continuity of the surface is CN in the V direction.
28 Array1OfReal from TColStd,
30 SurfaceType from GeomAbs,
40 BezierSurface from Geom,
41 BSplineSurface from Geom,
42 HSurface from Adaptor3d,
47 OutOfRange from Standard,
48 NoSuchObject from Standard,
49 DomainError from Standard
53 -- Methods specific of SurfaceOfLinearExtrusion.
56 Create returns SurfaceOfLinearExtrusion from Adaptor3d;
59 Create(C : HCurve from Adaptor3d)
60 returns SurfaceOfLinearExtrusion from Adaptor3d;
61 ---Purpose: The Curve is loaded.
63 Create(C : HCurve from Adaptor3d; V : Dir from gp)
64 returns SurfaceOfLinearExtrusion from Adaptor3d;
65 ---Purpose: Thew Curve and the Direction are loaded.
68 Load( me : in out ; C : HCurve from Adaptor3d)
69 ---Purpose: Changes the Curve
72 Load( me : in out ; V : Dir from gp)
73 ---Purpose: Changes the Direction
78 -- Implementation of Surface from Adaptor3d methods.
82 -- Global methods - Apply to the whole surface.
85 FirstUParameter(me) returns Real
88 LastUParameter(me) returns Real
91 FirstVParameter(me) returns Real
94 LastVParameter(me) returns Real
97 UContinuity(me) returns Shape from GeomAbs
100 VContinuity(me) returns Shape from GeomAbs
101 ---Purpose: Return CN.
104 NbUIntervals(me; S : Shape from GeomAbs) returns Integer
105 ---Purpose: Returns the number of U intervals for continuity
106 -- <S>. May be one if UContinuity(me) >= <S>
109 NbVIntervals(me; S : Shape from GeomAbs) returns Integer
110 ---Purpose: Returns the number of V intervals for continuity
111 -- <S>. May be one if VContinuity(me) >= <S>
114 UIntervals(me; T : in out Array1OfReal from TColStd;
115 S : Shape from GeomAbs )
116 ---Purpose: Returns the intervals with the requested continuity
117 -- in the U direction.
120 OutOfRange from Standard -- if Index < 1 or Index > NbIntervals
123 VIntervals(me; T : in out Array1OfReal from TColStd;
124 S : Shape from GeomAbs )
125 ---Purpose: Returns the intervals with the requested continuity
126 -- in the V direction.
128 OutOfRange from Standard -- if Index < 1 or Index > NbIntervals
131 UTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
132 ---Purpose: Returns a surface trimmed in the U direction
133 -- equivalent of <me> 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 VTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
142 ---Purpose: Returns a surface trimmed in the V direction between
143 -- parameters <First> and <Last>. <Tol> is used to
144 -- test for 3d points confusion.
146 OutOfRange from Standard
147 ---Purpose: If <First> >= <Last>
148 is redefined static ;
150 IsUClosed(me) returns Boolean
153 IsVClosed(me) returns Boolean
156 IsUPeriodic(me) returns Boolean
159 UPeriod(me) returns Real
161 DomainError from Standard -- if the curve is not periodic
164 IsVPeriodic(me) returns Boolean
167 VPeriod(me) returns Real
169 DomainError from Standard -- if the curve is not periodic
172 Value (me; U, V : Real) returns Pnt from gp
173 --- Purpose : Computes the point of parameters U,V on the surface.
176 D0 (me; U, V : Real; P : out Pnt from gp)
177 --- Purpose : Computes the point of parameters U,V on the surface.
180 D1 (me; U, V : Real; P : out Pnt from gp; D1U, D1V : out Vec from gp)
181 --- Purpose : Computes the point and the first derivatives on
183 raises DomainError from Standard
184 --- Purpose : Raised if the continuity of the current
185 -- intervals is not C1.
188 D2 (me; U, V : Real; P : out Pnt from gp; D1U, D1V, D2U, D2V, D2UV : out Vec from gp)
189 --- Purpose : Computes the point, the first and second
190 -- derivatives on the surface.
191 raises DomainError from Standard
192 --- Purpose : Raised if the continuity of the current
193 -- intervals is not C2.
196 D3 (me; U, V : Real; P : out Pnt from gp;
197 D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV : out Vec from gp)
198 --- Purpose : Computes the point, the first, second and third
199 -- derivatives on the surface.
200 raises DomainError from Standard
201 --- Purpose : Raised if the continuity of the current
202 -- intervals is not C3.
205 DN (me; U, V : Real; Nu, Nv : Integer) returns Vec from gp
206 --- Purpose : Computes the derivative of order Nu in the direction U and Nv
207 -- in the direction V at the point P(U, V).
208 raises DomainError from Standard,
209 --- Purpose : Raised if the current U interval is not not CNu
210 -- and the current V interval is not CNv.
211 OutOfRange from Standard
212 --- Purpose : Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
215 UResolution(me; R3d : Real ) returns Real
216 ---Purpose : Returns the parametric U resolution corresponding
217 -- to the real space resolution <R3d>.
220 VResolution(me; R3d : Real ) returns Real
221 ---Purpose : Returns the parametric V resolution corresponding
222 -- to the real space resolution <R3d>.
225 GetType(me) returns SurfaceType from GeomAbs
226 ---Purpose: Returns the type of the surface : Plane, Cylinder,
227 -- Cone, Sphere, Torus, BezierSurface,
228 -- BSplineSurface, SurfaceOfRevolution,
229 -- SurfaceOfExtrusion, OtherSurface
233 -- The following methods must be called when GetType returned
234 -- the corresponding type.
237 Plane(me) returns Pln from gp
238 raises NoSuchObject from Standard
241 Cylinder(me) returns Cylinder from gp
242 raises NoSuchObject from Standard
245 Cone(me) returns Cone from gp
246 raises NoSuchObject from Standard
249 Sphere(me) returns Sphere from gp
250 raises NoSuchObject from Standard
253 Torus(me) returns Torus from gp
254 raises NoSuchObject from Standard
258 UDegree(me) returns Integer
259 raises NoSuchObject from Standard
262 NbUPoles(me) returns Integer
263 raises NoSuchObject from Standard
266 VDegree(me) returns Integer
267 raises NoSuchObject from Standard
270 NbVPoles(me) returns Integer
271 raises NoSuchObject from Standard
275 NbUKnots(me) returns Integer
277 NoSuchObject from Standard
281 NbVKnots(me) returns Integer
283 NoSuchObject from Standard
287 IsURational(me) returns Boolean
289 NoSuchObject from Standard
292 IsVRational(me) returns Boolean
294 NoSuchObject from Standard
299 Bezier(me) returns BezierSurface from Geom
301 NoSuchObject from Standard
304 BSpline(me) returns BSplineSurface from Geom
306 NoSuchObject from Standard
309 AxeOfRevolution(me) returns Ax1 from gp
311 NoSuchObject from Standard -- only for SurfaceOfRevolution
314 Direction(me) returns Dir from gp
316 NoSuchObject from Standard -- only for SurfaceOfExtrusion
319 BasisCurve(me) returns HCurve from Adaptor3d
321 NoSuchObject from Standard
322 -- Only for SurfaceOfExtrusion and SurfaceOfRevolution
327 myBasisCurve : HCurve from Adaptor3d;
328 myDirection : Dir from gp;
332 end SurfaceOfLinearExtrusion;