1 -- Created on: 1993-03-31
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.
24 deferred class Surface from Adaptor3d
26 ---Purpose: Root class for surfaces on which geometric algorithms work.
27 -- An adapted surface is an interface between the
28 -- services provided by a surface and those required of
29 -- the surface by algorithms which use it.
30 -- A derived concrete class is provided:
31 -- GeomAdaptor_Surface for a surface from the Geom package.
32 -- The Surface class describes the standard behaviour
33 -- of a surface for generic algorithms.
35 -- The Surface can be decomposed in intervals of any
36 -- continuity in U and V using the method
37 -- NbIntervals. A current interval can be set. Most
38 -- of the methods apply to the current interval.
39 -- Warning: All the methods are virtual and implemented with a
40 -- raise to allow to redefined only the methods realy
43 Array1OfReal from TColStd,
45 SurfaceType from GeomAbs,
55 BezierSurface from Geom,
56 BSplineSurface from Geom,
57 HSurface from Adaptor3d,
62 OutOfRange from Standard,
63 NoSuchObject from Standard,
64 DomainError from Standard
69 -- Global methods - Apply to the whole surface.
72 Delete(me:out) is virtual;
73 ---C++: alias "Standard_EXPORT virtual ~Adaptor3d_Surface(){Delete();}"
75 FirstUParameter(me) returns Real
78 LastUParameter(me) returns Real
81 FirstVParameter(me) returns Real
84 LastVParameter(me) returns Real
87 UContinuity(me) returns Shape from GeomAbs
90 VContinuity(me) returns Shape from GeomAbs
93 NbUIntervals(me; S : Shape from GeomAbs) returns Integer
94 ---Purpose: Returns the number of U intervals for continuity
95 -- <S>. May be one if UContinuity(me) >= <S>
98 NbVIntervals(me; S : Shape from GeomAbs) returns Integer
99 ---Purpose: Returns the number of V intervals for continuity
100 -- <S>. May be one if VContinuity(me) >= <S>
103 UIntervals(me; T : in out Array1OfReal from TColStd;
104 S : Shape from GeomAbs )
105 ---Purpose: Returns the intervals with the requested continuity
106 -- in the U direction.
108 OutOfRange from Standard -- if the Length of the array does
109 -- have enought slots to accomodate
113 VIntervals(me; T : in out Array1OfReal from TColStd;
114 S : Shape from GeomAbs )
115 ---Purpose: Returns the intervals with the requested continuity
116 -- in the V direction.
118 OutOfRange from Standard -- if the Length of the array does
119 -- have enought slots to accomodate
123 UTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
124 ---Purpose: Returns a surface trimmed in the U direction
125 -- equivalent of <me> between
126 -- parameters <First> and <Last>. <Tol> is used to
127 -- test for 3d points confusion.
129 OutOfRange from Standard
130 ---Purpose: If <First> >= <Last>
133 VTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
134 ---Purpose: Returns a surface trimmed in the V direction between
135 -- parameters <First> and <Last>. <Tol> is used to
136 -- test for 3d points confusion.
138 OutOfRange from Standard
139 ---Purpose: If <First> >= <Last>
142 IsUClosed(me) returns Boolean
145 IsVClosed(me) returns Boolean
148 IsUPeriodic(me) returns Boolean
151 UPeriod(me) returns Real
153 DomainError from Standard -- if the curve is not periodic
156 IsVPeriodic(me) returns Boolean
159 VPeriod(me) returns Real
161 DomainError from Standard -- if the curve is not periodic
164 Value (me; U, V : Real) returns Pnt from gp
165 --- Purpose : Computes the point of parameters U,V on the surface.
168 D0 (me; U, V : Real; P : out Pnt from gp)
169 --- Purpose : Computes the point of parameters U,V on the surface.
172 D1 (me; U, V : Real; P : out Pnt from gp; D1U, D1V : out Vec from gp)
173 --- Purpose : Computes the point and the first derivatives on
175 raises DomainError from Standard
176 --- Purpose : Raised if the continuity of the current
177 -- intervals is not C1.
180 D2 (me; U, V : Real; P : out Pnt from gp; D1U, D1V, D2U, D2V, D2UV : out Vec from gp)
181 --- Purpose : Computes the point, the first and second
182 -- derivatives on the surface.
183 raises DomainError from Standard
184 --- Purpose : Raised if the continuity of the current
185 -- intervals is not C2.
188 D3 (me; U, V : Real; P : out Pnt from gp;
189 D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV : out Vec from gp)
190 --- Purpose : Computes the point, the first, second and third
191 -- derivatives on the surface.
192 raises DomainError from Standard
193 --- Purpose : Raised if the continuity of the current
194 -- intervals is not C3.
197 DN (me; U, V : Real; Nu, Nv : Integer) returns Vec from gp
198 --- Purpose : Computes the derivative of order Nu in the direction U and Nv
199 -- in the direction V at the point P(U, V).
200 raises DomainError from Standard,
201 --- Purpose : Raised if the current U interval is not not CNu
202 -- and the current V interval is not CNv.
203 OutOfRange from Standard
204 --- Purpose : Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
207 UResolution(me; R3d : Real ) returns Real
208 ---Purpose : Returns the parametric U resolution corresponding
209 -- to the real space resolution <R3d>.
212 VResolution(me; R3d : Real ) returns Real
213 ---Purpose : Returns the parametric V resolution corresponding
214 -- to the real space resolution <R3d>.
217 GetType(me) returns SurfaceType from GeomAbs
218 ---Purpose: Returns the type of the surface : Plane, Cylinder,
219 -- Cone, Sphere, Torus, BezierSurface,
220 -- BSplineSurface, SurfaceOfRevolution,
221 -- SurfaceOfExtrusion, OtherSurface
225 -- The following methods must be called when GetType returned
226 -- the corresponding type.
229 Plane(me) returns Pln from gp
230 raises NoSuchObject from Standard
233 Cylinder(me) returns Cylinder from gp
234 raises NoSuchObject from Standard
237 Cone(me) returns Cone from gp
238 raises NoSuchObject from Standard
241 Sphere(me) returns Sphere from gp
242 raises NoSuchObject from Standard
245 Torus(me) returns Torus from gp
246 raises NoSuchObject from Standard
250 UDegree(me) returns Integer
251 raises NoSuchObject from Standard
254 NbUPoles(me) returns Integer
255 raises NoSuchObject from Standard
258 VDegree(me) returns Integer
259 raises NoSuchObject from Standard
262 NbVPoles(me) returns Integer
263 raises NoSuchObject from Standard
267 NbUKnots(me) returns Integer
269 NoSuchObject from Standard
273 NbVKnots(me) returns Integer
275 NoSuchObject from Standard
279 IsURational(me) returns Boolean
281 NoSuchObject from Standard
284 IsVRational(me) returns Boolean
286 NoSuchObject from Standard
291 Bezier(me) returns BezierSurface from Geom
293 NoSuchObject from Standard
296 BSpline(me) returns BSplineSurface from Geom
298 NoSuchObject from Standard
301 AxeOfRevolution(me) returns Ax1 from gp
303 NoSuchObject from Standard -- only for SurfaceOfRevolution
306 Direction(me) returns Dir from gp
308 NoSuchObject from Standard -- only for SurfaceOfExtrusion
311 BasisCurve(me) returns HCurve from Adaptor3d
313 NoSuchObject from Standard -- only for SurfaceOfExtrusion
316 BasisSurface(me) returns HSurface from Adaptor3d
318 NoSuchObject from Standard -- only for Offset Surface
321 OffsetValue(me) returns Real from Standard
323 NoSuchObject from Standard -- only for Offset Surface