1 -- Created on: 1993-04-21
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 class SurfaceOfLinearExtrusion from Adaptor3d inherits Surface from Adaptor3d
25 --- Purpose: Generalised cylinder. This surface is obtained by sweeping a curve in a given
26 -- direction. The parametrization range for the parameter U is defined
27 -- with referenced the curve.
28 -- The parametrization range for the parameter V is ]-infinite,+infinite[
29 -- The position of the curve gives the origin for the
31 -- The continuity of the surface is CN in the V direction.
34 Array1OfReal from TColStd,
36 SurfaceType from GeomAbs,
46 BezierSurface from Geom,
47 BSplineSurface from Geom,
48 HSurface from Adaptor3d,
53 OutOfRange from Standard,
54 NoSuchObject from Standard,
55 DomainError from Standard
59 -- Methods specific of SurfaceOfLinearExtrusion.
62 Create returns SurfaceOfLinearExtrusion from Adaptor3d;
65 Create(C : HCurve from Adaptor3d)
66 returns SurfaceOfLinearExtrusion from Adaptor3d;
67 ---Purpose: The Curve is loaded.
69 Create(C : HCurve from Adaptor3d; V : Dir from gp)
70 returns SurfaceOfLinearExtrusion from Adaptor3d;
71 ---Purpose: Thew Curve and the Direction are loaded.
74 Load( me : in out ; C : HCurve from Adaptor3d)
75 ---Purpose: Changes the Curve
78 Load( me : in out ; V : Dir from gp)
79 ---Purpose: Changes the Direction
84 -- Implementation of Surface from Adaptor3d methods.
88 -- Global methods - Apply to the whole surface.
91 FirstUParameter(me) returns Real
94 LastUParameter(me) returns Real
97 FirstVParameter(me) returns Real
100 LastVParameter(me) returns Real
103 UContinuity(me) returns Shape from GeomAbs
106 VContinuity(me) returns Shape from GeomAbs
107 ---Purpose: Return CN.
110 NbUIntervals(me; S : Shape from GeomAbs) returns Integer
111 ---Purpose: Returns the number of U intervals for continuity
112 -- <S>. May be one if UContinuity(me) >= <S>
115 NbVIntervals(me; S : Shape from GeomAbs) returns Integer
116 ---Purpose: Returns the number of V intervals for continuity
117 -- <S>. May be one if VContinuity(me) >= <S>
120 UIntervals(me; T : in out Array1OfReal from TColStd;
121 S : Shape from GeomAbs )
122 ---Purpose: Returns the intervals with the requested continuity
123 -- in the U direction.
126 OutOfRange from Standard -- if Index < 1 or Index > NbIntervals
129 VIntervals(me; T : in out Array1OfReal from TColStd;
130 S : Shape from GeomAbs )
131 ---Purpose: Returns the intervals with the requested continuity
132 -- in the V direction.
134 OutOfRange from Standard -- if Index < 1 or Index > NbIntervals
137 UTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
138 ---Purpose: Returns a surface trimmed in the U direction
139 -- equivalent of <me> between
140 -- parameters <First> and <Last>. <Tol> is used to
141 -- test for 3d points confusion.
143 OutOfRange from Standard
144 ---Purpose: If <First> >= <Last>
145 is redefined static ;
147 VTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
148 ---Purpose: Returns a surface trimmed in the V direction between
149 -- parameters <First> and <Last>. <Tol> is used to
150 -- test for 3d points confusion.
152 OutOfRange from Standard
153 ---Purpose: If <First> >= <Last>
154 is redefined static ;
156 IsUClosed(me) returns Boolean
159 IsVClosed(me) returns Boolean
162 IsUPeriodic(me) returns Boolean
165 UPeriod(me) returns Real
167 DomainError from Standard -- if the curve is not periodic
170 IsVPeriodic(me) returns Boolean
173 VPeriod(me) returns Real
175 DomainError from Standard -- if the curve is not periodic
178 Value (me; U, V : Real) returns Pnt from gp
179 --- Purpose : Computes the point of parameters U,V on the surface.
182 D0 (me; U, V : Real; P : out Pnt from gp)
183 --- Purpose : Computes the point of parameters U,V on the surface.
186 D1 (me; U, V : Real; P : out Pnt from gp; D1U, D1V : out Vec from gp)
187 --- Purpose : Computes the point and the first derivatives on
189 raises DomainError from Standard
190 --- Purpose : Raised if the continuity of the current
191 -- intervals is not C1.
194 D2 (me; U, V : Real; P : out Pnt from gp; D1U, D1V, D2U, D2V, D2UV : out Vec from gp)
195 --- Purpose : Computes the point, the first and second
196 -- derivatives on the surface.
197 raises DomainError from Standard
198 --- Purpose : Raised if the continuity of the current
199 -- intervals is not C2.
202 D3 (me; U, V : Real; P : out Pnt from gp;
203 D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV : out Vec from gp)
204 --- Purpose : Computes the point, the first, second and third
205 -- derivatives on the surface.
206 raises DomainError from Standard
207 --- Purpose : Raised if the continuity of the current
208 -- intervals is not C3.
211 DN (me; U, V : Real; Nu, Nv : Integer) returns Vec from gp
212 --- Purpose : Computes the derivative of order Nu in the direction U and Nv
213 -- in the direction V at the point P(U, V).
214 raises DomainError from Standard,
215 --- Purpose : Raised if the current U interval is not not CNu
216 -- and the current V interval is not CNv.
217 OutOfRange from Standard
218 --- Purpose : Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
221 UResolution(me; R3d : Real ) returns Real
222 ---Purpose : Returns the parametric U resolution corresponding
223 -- to the real space resolution <R3d>.
226 VResolution(me; R3d : Real ) returns Real
227 ---Purpose : Returns the parametric V resolution corresponding
228 -- to the real space resolution <R3d>.
231 GetType(me) returns SurfaceType from GeomAbs
232 ---Purpose: Returns the type of the surface : Plane, Cylinder,
233 -- Cone, Sphere, Torus, BezierSurface,
234 -- BSplineSurface, SurfaceOfRevolution,
235 -- SurfaceOfExtrusion, OtherSurface
239 -- The following methods must be called when GetType returned
240 -- the corresponding type.
243 Plane(me) returns Pln from gp
244 raises NoSuchObject from Standard
247 Cylinder(me) returns Cylinder from gp
248 raises NoSuchObject from Standard
251 Cone(me) returns Cone from gp
252 raises NoSuchObject from Standard
255 Sphere(me) returns Sphere from gp
256 raises NoSuchObject from Standard
259 Torus(me) returns Torus from gp
260 raises NoSuchObject from Standard
264 UDegree(me) returns Integer
265 raises NoSuchObject from Standard
268 NbUPoles(me) returns Integer
269 raises NoSuchObject from Standard
272 VDegree(me) returns Integer
273 raises NoSuchObject from Standard
276 NbVPoles(me) returns Integer
277 raises NoSuchObject from Standard
281 NbUKnots(me) returns Integer
283 NoSuchObject from Standard
287 NbVKnots(me) returns Integer
289 NoSuchObject from Standard
293 IsURational(me) returns Boolean
295 NoSuchObject from Standard
298 IsVRational(me) returns Boolean
300 NoSuchObject from Standard
305 Bezier(me) returns BezierSurface from Geom
307 NoSuchObject from Standard
310 BSpline(me) returns BSplineSurface from Geom
312 NoSuchObject from Standard
315 AxeOfRevolution(me) returns Ax1 from gp
317 NoSuchObject from Standard -- only for SurfaceOfRevolution
320 Direction(me) returns Dir from gp
322 NoSuchObject from Standard -- only for SurfaceOfExtrusion
325 BasisCurve(me) returns HCurve from Adaptor3d
327 NoSuchObject from Standard
328 -- Only for SurfaceOfExtrusion and SurfaceOfRevolution
333 myBasisCurve : HCurve from Adaptor3d;
334 myDirection : Dir from gp;
338 end SurfaceOfLinearExtrusion;