1 -- Created on: 1993-03-09
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 BSplineSurface from Geom inherits BoundedSurface from Geom
25 ---Purpose : Describes a BSpline surface.
26 -- In each parametric direction, a BSpline surface can be:
27 -- - uniform or non-uniform,
28 -- - rational or non-rational,
29 -- - periodic or non-periodic.
30 -- A BSpline surface is defined by:
31 -- - its degrees, in the u and v parametric directions,
32 -- - its periodic characteristic, in the u and v parametric directions,
33 -- - a table of poles, also called control points (together
34 -- with the associated weights if the surface is rational), and
35 -- - a table of knots, together with the associated multiplicities.
36 -- The degree of a Geom_BSplineSurface is limited to
37 -- a value (25) which is defined and controlled by the
38 -- system. This value is returned by the function MaxDegree.
40 -- Poles and Weights are manipulated using two associative double arrays:
41 -- - the poles table, which is a double array of gp_Pnt points, and
42 -- - the weights table, which is a double array of reals.
43 -- The bounds of the poles and weights arrays are:
44 -- - 1 and NbUPoles for the row bounds (provided
45 -- that the BSpline surface is not periodic in the u
46 -- parametric direction), where NbUPoles is the
47 -- number of poles of the surface in the u parametric direction, and
48 -- - 1 and NbVPoles for the column bounds (provided
49 -- that the BSpline surface is not periodic in the v
50 -- parametric direction), where NbVPoles is the
51 -- number of poles of the surface in the v parametric direction.
52 -- The poles of the surface are the points used to shape
53 -- and reshape the surface. They comprise a rectangular network.
54 -- If the surface is not periodic:
55 -- - The points (1, 1), (NbUPoles, 1), (1,
56 -- NbVPoles), and (NbUPoles, NbVPoles)
57 -- are the four parametric "corners" of the surface.
58 -- - The first column of poles and the last column of
59 -- poles define two BSpline curves which delimit the
60 -- surface in the v parametric direction. These are the
61 -- v isoparametric curves corresponding to the two
62 -- bounds of the v parameter.
63 -- - The first row of poles and the last row of poles
64 -- define two BSpline curves which delimit the surface
65 -- in the u parametric direction. These are the u
66 -- isoparametric curves corresponding to the two bounds of the u parameter.
67 -- If the surface is periodic, these geometric properties are not verified.
68 -- It is more difficult to define a geometrical significance
69 -- for the weights. However they are useful for
70 -- representing a quadric surface precisely. Moreover, if
71 -- the weights of all the poles are equal, the surface has
72 -- a polynomial equation, and hence is a "non-rational surface".
73 -- The non-rational surface is a special, but frequently
74 -- used, case, where all poles have identical weights.
75 -- The weights are defined and used only in the case of
76 -- a rational surface. The rational characteristic is
77 -- defined in each parametric direction. A surface can be
78 -- rational in the u parametric direction, and
79 -- non-rational in the v parametric direction.
80 -- Knots and Multiplicities
81 -- For a Geom_BSplineSurface the table of knots is
82 -- made up of two increasing sequences of reals, without
83 -- repetition, one for each parametric direction. The
84 -- multiplicities define the repetition of the knots.
85 -- A BSpline surface comprises multiple contiguous
86 -- patches, which are themselves polynomial or rational
87 -- surfaces. The knots are the parameters of the
88 -- isoparametric curves which limit these contiguous
89 -- patches. The multiplicity of a knot on a BSpline
90 -- surface (in a given parametric direction) is related to
91 -- the degree of continuity of the surface at that knot in
92 -- that parametric direction:
93 -- Degree of continuity at knot(i) = Degree - Multi(i) where:
94 -- - Degree is the degree of the BSpline surface in
95 -- the given parametric direction, and
96 -- - Multi(i) is the multiplicity of knot number i in
97 -- the given parametric direction.
98 -- There are some special cases, where the knots are
99 -- regularly spaced in one parametric direction (i.e. the
100 -- difference between two consecutive knots is a constant).
101 -- - "Uniform": all the multiplicities are equal to 1.
102 -- - "Quasi-uniform": all the multiplicities are equal to 1,
103 -- except for the first and last knots in this parametric
104 -- direction, and these are equal to Degree + 1.
105 -- - "Piecewise Bezier": all the multiplicities are equal to
106 -- Degree except for the first and last knots, which
107 -- are equal to Degree + 1. This surface is a
108 -- concatenation of Bezier patches in the given
109 -- parametric direction.
110 -- If the BSpline surface is not periodic in a given
111 -- parametric direction, the bounds of the knots and
112 -- multiplicities tables are 1 and NbKnots, where
113 -- NbKnots is the number of knots of the BSpline
114 -- surface in that parametric direction.
115 -- If the BSpline surface is periodic in a given parametric
116 -- direction, and there are k periodic knots and p
117 -- periodic poles in that parametric direction:
118 -- - the period is such that:
119 -- period = Knot(k+1) - Knot(1), and
120 -- - the poles and knots tables in that parametric
121 -- direction can be considered as infinite tables, such that:
122 -- Knot(i+k) = Knot(i) + period, and
123 -- Pole(i+p) = Pole(i)
124 -- Note: The data structure tables for a periodic BSpline
125 -- surface are more complex than those of a non-periodic one.
127 -- . A survey of curve and surface methods in CADG Wolfgang BOHM
129 -- . On de Boor-like algorithms and blossoming Wolfgang BOEHM
131 -- . Blossoming and knot insertion algorithms for B-spline curves
133 -- . Modelisation des surfaces en CAO, Henri GIAUME Peugeot SA
134 -- . Curves and Surfaces for Computer Aided Geometric Design,
135 -- a practical guide Gerald Farin
139 uses Array1OfInteger from TColStd,
140 Array1OfReal from TColStd,
141 Array2OfReal from TColStd,
142 HArray1OfInteger from TColStd,
143 HArray1OfReal from TColStd,
144 HArray2OfReal from TColStd,
145 Array1OfPnt from TColgp,
146 Array2OfPnt from TColgp,
149 HArray2OfPnt from TColgp,
153 BSplKnotDistribution from GeomAbs,
159 raises ConstructionError from Standard,
160 DimensionError from Standard,
161 DomainError from Standard,
162 OutOfRange from Standard,
163 NoSuchObject from Standard,
164 RangeError from Standard,
165 UndefinedDerivative from Geom
173 Create (Poles : Array2OfPnt from TColgp;
174 UKnots, VKnots : Array1OfReal from TColStd;
175 UMults, VMults : Array1OfInteger from TColStd;
176 UDegree, VDegree : Integer;
177 UPeriodic : Boolean = Standard_False;
178 VPeriodic : Boolean = Standard_False)
179 returns mutable BSplineSurface
181 ---Purpose : Creates a non-rational b-spline surface (weights
182 -- default value is 1.).
183 raises ConstructionError;
184 ---Purpose: The following conditions must be verified.
185 -- 0 < UDegree <= MaxDegree.
186 -- UKnots.Length() == UMults.Length() >= 2
187 -- UKnots(i) < UKnots(i+1) (Knots are increasing)
188 -- 1 <= UMults(i) <= UDegree
189 -- On a non uperiodic surface the first and last
190 -- umultiplicities may be UDegree+1 (this is even
191 -- recommanded if you want the curve to start and finish on
192 -- the first and last pole).
193 -- On a uperiodic surface the first and the last
194 -- umultiplicities must be the same.
195 -- on non-uperiodic surfaces
196 -- Poles.ColLength() == Sum(UMults(i)) - UDegree - 1 >= 2
197 -- on uperiodic surfaces
198 -- Poles.ColLength() == Sum(UMults(i)) except the first or last
199 -- The previous conditions for U holds also for V, with the
200 -- RowLength of the poles.
205 Create (Poles : Array2OfPnt from TColgp;
206 Weights : Array2OfReal from TColStd;
207 UKnots, VKnots : Array1OfReal from TColStd;
208 UMults, VMults : Array1OfInteger from TColStd;
209 UDegree, VDegree : Integer;
210 UPeriodic : Boolean = Standard_False;
211 VPeriodic : Boolean = Standard_False)
212 returns mutable BSplineSurface
214 ---Purpose : Creates a non-rational b-spline surface (weights
215 -- default value is 1.).
217 raises ConstructionError;
218 ---Purpose: The following conditions must be verified.
219 -- 0 < UDegree <= MaxDegree.
221 -- UKnots.Length() == UMults.Length() >= 2
223 -- UKnots(i) < UKnots(i+1) (Knots are increasing)
224 -- 1 <= UMults(i) <= UDegree
226 -- On a non uperiodic surface the first and last
227 -- umultiplicities may be UDegree+1 (this is even
228 -- recommanded if you want the curve to start and finish on
229 -- the first and last pole).
231 -- On a uperiodic surface the first and the last
232 -- umultiplicities must be the same.
234 -- on non-uperiodic surfaces
236 -- Poles.ColLength() == Sum(UMults(i)) - UDegree - 1 >= 2
238 -- on uperiodic surfaces
240 -- Poles.ColLength() == Sum(UMults(i)) except the first or
244 -- The previous conditions for U holds also for V, with the
245 -- RowLength of the poles.
249 ExchangeUV (me : mutable);
250 ---Purpose: Exchanges the u and v parametric directions on
251 -- this BSpline surface.
253 -- - the poles and weights tables are transposed,
254 -- - the knots and multiplicities tables are exchanged,
255 -- - degrees of continuity, and rational, periodic and
256 -- uniform characteristics are exchanged, and
257 -- - the orientation of the surface is inverted.
259 SetUPeriodic (me : mutable);
260 ---Purpose: Sets the surface U periodic.
262 SetVPeriodic (me : mutable);
263 ---Purpose: Modifies this surface to be periodic in the u (or v)
264 -- parametric direction.
265 -- To become periodic in a given parametric direction a
266 -- surface must be closed in that parametric direction,
267 -- and the knot sequence relative to that direction must be periodic.
268 -- To generate this periodic sequence of knots, the
269 -- functions FirstUKnotIndex and LastUKnotIndex (or
270 -- FirstVKnotIndex and LastVKnotIndex) are used to
271 -- compute I1 and I2. These are the indexes, in the
272 -- knot array associated with the given parametric
273 -- direction, of the knots that correspond to the first and
274 -- last parameters of this BSpline surface in the given
275 -- parametric direction. Hence the period is:
276 -- Knots(I1) - Knots(I2)
277 -- As a result, the knots and poles tables are modified.
279 -- Standard_ConstructionError if the surface is not
280 -- closed in the given parametric direction.
285 PeriodicNormalization(me ; U,V : in out Real) ;
287 ---Purpose : returns the parameter normalized within
288 -- the period if the surface is periodic : otherwise
289 -- does not do anything
291 SetUOrigin (me : mutable; Index : Integer)
292 ---Purpose: Assigns the knot of index Index in the knots table in
293 -- the corresponding parametric direction to be the
294 -- origin of this periodic BSpline surface. As a
295 -- consequence, the knots and poles tables are modified.
297 -- Standard_NoSuchObject if this BSpline surface is
298 -- not periodic in the given parametric direction.
299 -- Standard_DomainError if Index is outside the
300 -- bounds of the knots table in the given parametric direction.
304 SetVOrigin (me : mutable; Index : Integer)
305 ---Purpose: Assigns the knot of index Index in the knots table in
306 -- the corresponding parametric direction to be the
307 -- origin of this periodic BSpline surface. As a
308 -- consequence, the knots and poles tables are modified.
310 -- Standard_NoSuchObject if this BSpline surface is
311 -- not periodic in the given parametric direction.
312 -- Standard_DomainError if Index is outside the
313 -- bounds of the knots table in the given parametric direction.
318 SetUNotPeriodic (me : mutable);
320 SetVNotPeriodic (me : mutable);
321 ---Purpose: Modifies this surface to be periodic in the u (or v) parametric direction.
322 -- To become periodic in a given parametric direction a
323 -- surface must be closed in that parametric direction,
324 -- and the knot sequence relative to that direction must be periodic.
325 -- To generate this periodic sequence of knots, the
326 -- functions FirstUKnotIndex and LastUKnotIndex (or
327 -- FirstVKnotIndex and LastVKnotIndex) are used to
328 -- compute I1 and I2. These are the indexes, in the
329 -- knot array associated with the given parametric
330 -- direction, of the knots that correspond to the first and
331 -- last parameters of this BSpline surface in the given
332 -- parametric direction. Hence the period is:
333 -- Knots(I1) - Knots(I2)
334 -- As a result, the knots and poles tables are modified.
336 -- Standard_ConstructionError if the surface is not
337 -- closed in the given parametric direction.
339 UReverse (me : mutable);
341 VReverse (me : mutable);
342 ---Purpose: Changes the orientation of this BSpline surface in the
343 -- u (or v) parametric direction. The bounds of the
344 -- surface are not changed but the given parametric
345 -- direction is reversed. Hence the orientation of the
346 -- surface is reversed.
347 -- The knots and poles tables are modified.
349 UReversedParameter (me; U : Real) returns Real;
351 VReversedParameter (me; V : Real) returns Real;
352 ---Purpose: Computes the u (or v) parameter on the modified
353 -- surface, produced by reversing its u (or v) parametric
354 -- direction, for the point of u parameter U, (or of v
355 -- parameter V) on this BSpline surface.
356 -- For a BSpline surface, these functions return respectively:
357 -- - UFirst + ULast - U, or
358 -- - VFirst + VLast - V,
359 -- where UFirst, ULast, VFirst and VLast are
360 -- the values of the first and last parameters of this
361 -- BSpline surface, in the u and v parametric directions.
364 IncreaseDegree (me : mutable; UDegree, VDegree : Integer);
365 ---Purpose : Increases the degrees of this BSpline surface to
366 -- UDegree and VDegree in the u and v parametric
367 -- directions respectively. As a result, the tables of poles,
368 -- weights and multiplicities are modified. The tables of
369 -- knots is not changed.
370 -- Note: Nothing is done if the given degree is less than
371 -- or equal to the current degree in the corresponding
372 -- parametric direction.
374 -- Standard_ConstructionError if UDegree or
375 -- VDegree is greater than
376 -- Geom_BSplineSurface::MaxDegree().
379 InsertUKnots (me : mutable; Knots : Array1OfReal from TColStd;
380 Mults : Array1OfInteger from TColStd;
381 ParametricTolerance : Real = 0.0;
382 Add : Boolean = Standard_True);
384 InsertVKnots (me : mutable; Knots : Array1OfReal from TColStd;
385 Mults : Array1OfInteger from TColStd;
386 ParametricTolerance : Real = 0.0;
387 Add : Boolean = Standard_True);
389 ---Purpose: Inserts into the knots table for the corresponding
390 -- parametric direction of this BSpline surface:
391 -- - the value U, or V, with the multiplicity M (defaulted to 1), or
392 -- - the values of the array Knots, with their respective
393 -- multiplicities, Mults.
394 -- If the knot value to insert already exists in the table, its multiplicity is:
395 -- - increased by M, if Add is true (the default), or
396 -- - increased to M, if Add is false.
397 -- The tolerance criterion used to check the equality of
398 -- the knots is the larger of the values ParametricTolerance and
399 -- Standard_Real::Epsilon(val), where val is the knot value to be inserted.
401 -- - If a given multiplicity coefficient is null, or negative, nothing is done.
402 -- - The new multiplicity of a knot is limited to the degree of this BSpline surface in the
403 -- corresponding parametric direction.
405 -- Standard_ConstructionError if a knot value to
406 -- insert is outside the bounds of this BSpline surface in
407 -- the specified parametric direction. The comparison
408 -- uses the precision criterion ParametricTolerance.
411 RemoveUKnot(me : mutable; Index : Integer;
413 Tolerance : Real) returns Boolean
416 RemoveVKnot(me : mutable; Index : Integer;
418 Tolerance : Real) returns Boolean
421 ---Purpose : Reduces to M the multiplicity of the knot of index
422 -- Index in the given parametric direction. If M is 0, the knot is removed.
423 -- With a modification of this type, the table of poles is also modified.
424 -- Two different algorithms are used systematically to
425 -- compute the new poles of the surface. For each
426 -- pole, the distance between the pole calculated
427 -- using the first algorithm and the same pole
428 -- calculated using the second algorithm, is checked. If
429 -- this distance is less than Tolerance it ensures that
430 -- the surface is not modified by more than Tolerance.
431 -- Under these conditions, the function returns true;
432 -- otherwise, it returns false.
433 -- A low tolerance prevents modification of the
434 -- surface. A high tolerance "smoothes" the surface.
436 -- Standard_OutOfRange if Index is outside the
437 -- bounds of the knots table of this BSpline surface.
440 IncreaseUMultiplicity (me : mutable; UIndex : Integer; M : Integer)
442 -- Increases the multiplicity of the knot of range UIndex
443 -- in the UKnots sequence.
444 -- M is the new multiplicity. M must be greater than the
445 -- previous multiplicity and lower or equal to the degree
446 -- of the surface in the U parametric direction.
447 raises ConstructionError,
448 ---Purpose : Raised if M is not in the range [1, UDegree]
451 -- Raised if UIndex is not in the range [FirstUKnotIndex,
452 -- LastUKnotIndex] given by the methods with the same name.
455 IncreaseUMultiplicity (me : mutable; FromI1, ToI2 : Integer; M : Integer)
457 -- Increases until order M the multiplicity of the set of knots
458 -- FromI1,...., ToI2 in the U direction. This method can be used
459 -- to make a B_spline surface into a PiecewiseBezier B_spline
461 -- If <me> was uniform, it can become non uniform.
464 -- Raised if FromI1 or ToI2 is out of the range [FirstUKnotIndex,
468 -- M should be greater than the previous multiplicity of the
469 -- all the knots FromI1,..., ToI2 and lower or equal to the
470 -- Degree of the surface in the U parametric direction.
473 IncrementUMultiplicity (me : mutable; FromI1, ToI2 : Integer; Step : Integer)
475 -- Increments the multiplicity of the consecutives uknots FromI1..ToI2
476 -- by step. The multiplicity of each knot FromI1,.....,ToI2 must be
477 -- lower or equal to the UDegree of the B_spline.
480 -- Raised if FromI1 or ToI2 is not in the range
481 -- [FirstUKnotIndex, LastUKnotIndex]
484 -- Raised if one knot has a multiplicity greater than UDegree.
487 IncreaseVMultiplicity (me : mutable; VIndex : Integer; M : Integer)
489 -- Increases the multiplicity of a knot in the V direction.
490 -- M is the new multiplicity.
491 raises ConstructionError,
493 -- M should be greater than the previous multiplicity and lower
494 -- than the degree of the surface in the V parametric direction.
497 -- Raised if VIndex is not in the range [FirstVKnotIndex,
498 -- LastVKnotIndex] given by the methods with the same name.
501 IncreaseVMultiplicity (me : mutable; FromI1, ToI2 : Integer; M : Integer)
503 -- Increases until order M the multiplicity of the set of knots
504 -- FromI1,...., ToI2 in the V direction. This method can be used to
505 -- make a BSplineSurface into a PiecewiseBezier B_spline
506 -- surface. If <me> was uniform, it can become non-uniform.
509 -- Raised if FromI1 or ToI2 is out of the range [FirstVKnotIndex,
510 -- LastVKnotIndex] given by the methods with the same name.
513 -- M should be greater than the previous multiplicity of the
514 -- all the knots FromI1,..., ToI2 and lower or equal to the
515 -- Degree of the surface in the V parametric direction.
518 IncrementVMultiplicity (me : mutable; FromI1, ToI2 : Integer; Step : Integer)
520 -- Increments the multiplicity of the consecutives vknots FromI1..ToI2
521 -- by step. The multiplicity of each knot FromI1,.....,ToI2 must be
522 -- lower or equal to the VDegree of the B_spline.
525 -- Raised if FromI1 or ToI2 is not in the range
526 -- [FirstVKnotIndex, LastVKnotIndex]
529 -- Raised if one knot has a multiplicity greater than VDegree.
532 InsertUKnot (me : mutable; U : Real; M : Integer; ParametricTolerance : Real;
533 Add : Boolean = Standard_True)
535 -- Inserts a knot value in the sequence of UKnots. If U is a knot
536 -- value this method increases the multiplicity of the knot if the
537 -- previous multiplicity was lower than M else it does nothing. The
538 -- tolerance criterion is ParametricTolerance. ParametricTolerance
539 -- should be greater or equal than Resolution from package gp.
540 raises ConstructionError;
542 -- Raised if U is out of the bounds [U1, U2] given by the methods
543 -- Bounds, the criterion ParametricTolerance is used.
544 -- Raised if M is not in the range [1, UDegree].
547 InsertVKnot (me : mutable; V : Real; M : Integer; ParametricTolerance : Real;
548 Add : Boolean = Standard_True)
550 -- Inserts a knot value in the sequence of VKnots. If V is a knot
551 -- value this method increases the multiplicity of the knot if the
552 -- previous multiplicity was lower than M otherwise it does nothing.
553 -- The tolerance criterion is ParametricTolerance.
554 -- ParametricTolerance should be greater or equal than Resolution
556 raises ConstructionError;
558 -- raises if V is out of the Bounds [V1, V2] given by the methods
559 -- Bounds, the criterion ParametricTolerance is used.
560 -- raises if M is not in the range [1, VDegree].
563 Segment (me : mutable; U1, U2, V1, V2 : Real)
565 -- Segments the surface between U1 and U2 in the U-Direction.
566 -- between V1 and V2 in the V-Direction.
567 -- The control points are modified, the first and the last point
570 -- Even if <me> is not closed it can become closed after the
571 -- segmentation for example if U1 or U2 are out of the bounds
572 -- of the surface <me> or if the surface makes loop.
573 raises DomainError from Standard;
574 ---Purpose: raises if U2 < U1 or V2 < V1
577 CheckAndSegment (me : mutable; U1, U2, V1, V2 : Real)
579 -- Segments the surface between U1 and U2 in the U-Direction.
580 -- between V1 and V2 in the V-Direction.
582 -- same as Segment but do nothing if U1 and U2 (resp. V1 and V2) are
583 -- equal to the bounds in U (resp. in V) of <me>.
584 -- For example, if <me> is periodic in V, it will be always periodic
585 -- in V after the segmentation if the bounds in V are unchanged
588 -- Even if <me> is not closed it can become closed after the
589 -- segmentation for example if U1 or U2 are out of the bounds
590 -- of the surface <me> or if the surface makes loop.
591 raises DomainError from Standard;
592 ---Purpose: raises if U2 < U1 or V2 < V1
595 SetUKnot (me : mutable; UIndex : Integer; K : Real)
596 ---Purpose : Substitutes the UKnots of range UIndex with K.
599 -- Raised if UIndex < 1 or UIndex > NbUKnots
602 -- Raised if K >= UKnots(UIndex+1) or K <= UKnots(UIndex-1)
605 SetUKnots (me : mutable; UK : Array1OfReal from TColStd)
606 ---Purpose : Changes all the U-knots of the surface.
607 -- The multiplicity of the knots are not modified.
608 raises ConstructionError,
610 -- Raised if there is an index such that UK (Index+1) <= UK (Index).
613 -- Raised if UK.Lower() < 1 or UK.Upper() > NbUKnots
616 SetUKnot (me : mutable; UIndex : Integer; K : Real; M : Integer)
618 -- Changes the value of the UKnots of range UIndex and
619 -- increases its multiplicity.
622 -- Raised if UIndex is not in the range [FirstUKnotIndex,
623 -- LastUKnotIndex] given by the methods with the same name.
626 -- Raised if K >= UKnots(UIndex+1) or K <= UKnots(UIndex-1)
627 -- M must be lower than UDegree and greater than the previous
628 -- multiplicity of the knot of range UIndex.
631 SetVKnot (me : mutable; VIndex : Integer; K : Real)
632 ---Purpose : Substitutes the VKnots of range VIndex with K.
635 -- Raised if VIndex < 1 or VIndex > NbVKnots
638 -- Raised if K >= VKnots(VIndex+1) or K <= VKnots(VIndex-1)
641 SetVKnots (me : mutable; VK : Array1OfReal from TColStd)
642 ---Purpose : Changes all the V-knots of the surface.
643 -- The multiplicity of the knots are not modified.
644 raises ConstructionError,
646 -- Raised if there is an index such that VK (Index+1) <= VK (Index).
649 -- Raised if VK.Lower() < 1 or VK.Upper() > NbVKnots
653 SetVKnot (me : mutable; VIndex : Integer; K : Real; M : Integer)
655 -- Changes the value of the VKnots of range VIndex and increases
659 -- Raised if VIndex is not in the range [FirstVKnotIndex,
660 -- LastVKnotIndex] given by the methods with the same name.
663 -- Raised if K >= VKnots(VIndex+1) or K <= VKnots(VIndex-1)
664 -- M must be lower than VDegree and greater than the previous
665 -- multiplicity of the knot of range VIndex.
670 ParametricTolerance : Real;
671 I1, I2 : in out Integer;
672 WithKnotRepetition : Boolean = Standard_False);
674 -- Locates the parametric value U in the sequence of UKnots.
675 -- If "WithKnotRepetition" is True we consider the knot's
676 -- representation with repetition of multiple knot value,
677 -- otherwise we consider the knot's representation with
678 -- no repetition of multiple knot values.
679 -- UKnots (I1) <= U <= UKnots (I2)
680 -- . if I1 = I2 U is a knot value (the tolerance criterion
681 -- ParametricTolerance is used).
682 -- . if I1 < 1 => U < UKnots(1) - Abs(ParametricTolerance)
683 -- . if I2 > NbUKnots => U > UKnots(NbUKnots)+Abs(ParametricTolerance)
688 ParametricTolerance : Real;
689 I1, I2 : in out Integer;
690 WithKnotRepetition : Boolean = Standard_False);
692 -- Locates the parametric value U in the sequence of knots.
693 -- If "WithKnotRepetition" is True we consider the knot's
694 -- representation with repetition of multiple knot value,
695 -- otherwise we consider the knot's representation with
696 -- no repetition of multiple knot values.
697 -- VKnots (I1) <= V <= VKnots (I2)
698 -- . if I1 = I2 V is a knot value (the tolerance criterion
699 -- ParametricTolerance is used).
700 -- . if I1 < 1 => V < VKnots(1) - Abs(ParametricTolerance)
701 -- . if I2 > NbVKnots => V > VKnots(NbVKnots)+Abs(ParametricTolerance)
709 ---Purpose : poles insertion and removing
710 -- The following methods are available only if the surface
711 -- is Uniform or QuasiUniform in the considered direction
712 -- The knot repartition is modified.
717 ----Purpose : poles and weights modifications
719 SetPole (me : mutable; UIndex, VIndex : Integer; P : Pnt)
721 -- Substitutes the pole of range (UIndex, VIndex) with P.
722 -- If the surface is rational the weight of range (UIndex, VIndex)
726 -- Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or
727 -- VIndex > NbVPoles.
730 SetPole (me : mutable; UIndex, VIndex : Integer; P : Pnt; Weight : Real)
732 -- Substitutes the pole and the weight of range (UIndex, VIndex)
736 -- Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or
737 -- VIndex > NbVPoles.
739 ---Purpose : Raised if Weight <= Resolution from package gp.
742 SetPoleCol (me : mutable; VIndex : Integer; CPoles : Array1OfPnt from TColgp)
744 -- Changes a column of poles or a part of this column.
746 ---Purpose : Raised if Vindex < 1 or VIndex > NbVPoles.
749 -- Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles.
752 SetPoleCol (me : mutable; VIndex : Integer; CPoles : Array1OfPnt from TColgp;
753 CPoleWeights : Array1OfReal from TColStd)
755 -- Changes a column of poles or a part of this column with the
756 -- corresponding weights. If the surface was rational it can
757 -- become non rational. If the surface was non rational it can
760 ---Purpose : Raised if Vindex < 1 or VIndex > NbVPoles.
763 -- Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles
764 -- Raised if the bounds of CPoleWeights are not the same as the
766 -- Raised if one of the weight value of CPoleWeights is lower or
767 -- equal to Resolution from package gp.
770 SetPoleRow (me : mutable; UIndex : Integer; CPoles : Array1OfPnt from TColgp;
771 CPoleWeights : Array1OfReal from TColStd)
773 -- Changes a row of poles or a part of this row with the
774 -- corresponding weights. If the surface was rational it can
775 -- become non rational. If the surface was non rational it can
778 ---Purpose : Raised if Uindex < 1 or UIndex > NbUPoles.
781 -- Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles
782 -- raises if the bounds of CPoleWeights are not the same as the
784 -- Raised if one of the weight value of CPoleWeights is lower or
785 -- equal to Resolution from package gp.
788 SetPoleRow (me : mutable; UIndex : Integer; CPoles : Array1OfPnt from TColgp)
790 -- Changes a row of poles or a part of this row.
792 ---Purpose : Raised if Uindex < 1 or UIndex > NbUPoles.
795 -- Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles.
798 SetWeight (me : mutable; UIndex, VIndex : Integer; Weight : Real)
800 -- Changes the weight of the pole of range UIndex, VIndex.
801 -- If the surface was non rational it can become rational.
802 -- If the surface was rational it can become non rational.
805 -- Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or
809 -- Raised if weight is lower or equal to Resolution from
813 SetWeightCol (me : mutable; VIndex : Integer;
814 CPoleWeights : Array1OfReal from TColStd)
816 -- Changes a column of weights of a part of this column.
819 -- Raised if VIndex < 1 or VIndex > NbVPoles
822 -- Raised if CPoleWeights.Lower() < 1 or
823 -- CPoleWeights.Upper() > NbUPoles.
824 -- Raised if a weight value is lower or equal to Resolution
828 SetWeightRow (me : mutable; UIndex : Integer;
829 CPoleWeights : Array1OfReal from TColStd)
831 -- Changes a row of weights or a part of this row.
834 -- Raised if UIndex < 1 or UIndex > NbUPoles
837 -- Raised if CPoleWeights.Lower() < 1 or
838 -- CPoleWeights.Upper() > NbVPoles.
839 -- Raised if a weight value is lower or equal to Resolution
842 MovePoint(me: mutable; U, V : Real; P: Pnt;
843 UIndex1, UIndex2, VIndex1, VIndex2: Integer;
844 UFirstIndex, ULastIndex, VFirstIndex, VLastIndex: out Integer)
845 ---Purpose: Move a point with parameter U and V to P.
846 -- given u,v as parameters) to reach a new position
847 -- UIndex1, UIndex2, VIndex1, VIndex2:
848 -- indicates the poles which can be moved
849 -- if Problem in BSplineBasis calculation, no change
851 -- UFirstIndex, VLastIndex = 0
852 -- VFirstIndex, VLastIndex = 0
855 -- Raised if UIndex1 < UIndex2 or VIndex1 < VIndex2 or
856 -- UIndex1 < 1 || UIndex1 > NbUPoles or
857 -- UIndex2 < 1 || UIndex2 > NbUPoles
858 -- VIndex1 < 1 || VIndex1 > NbVPoles or
859 -- VIndex2 < 1 || VIndex2 > NbVPoles
863 ---Purpose : characteristics of the surface
865 IsUClosed (me) returns Boolean;
867 -- Returns true if the first control points row and the last
868 -- control points row are identical. The tolerance criterion
869 -- is Resolution from package gp.
871 IsVClosed (me) returns Boolean;
873 -- Returns true if the first control points column and the
874 -- last last control points column are identical.
875 -- The tolerance criterion is Resolution from package gp.
878 IsCNu (me; N : Integer) returns Boolean
880 -- Returns True if the order of continuity of the surface in the
883 ---Purpose : Raised if N < 0.
886 IsCNv (me; N : Integer) returns Boolean
888 -- Returns True if the order of continuity of the surface
889 -- in the V direction is N.
891 ---Purpose : Raised if N < 0.
894 IsUPeriodic (me) returns Boolean;
896 -- Returns True if the surface is closed in the U direction
897 -- and if the B-spline has been turned into a periodic surface
898 -- using the function SetUPeriodic.
901 IsURational (me) returns Boolean;
903 -- Returns False if for each row of weights all the weights
905 -- The tolerance criterion is resolution from package gp.
908 -- if Weights = |0.5, 0.5, 0.5| returns False
912 IsVPeriodic (me) returns Boolean;
914 -- Returns True if the surface is closed in the V direction
915 -- and if the B-spline has been turned into a periodic
916 -- surface using the function SetVPeriodic.
919 IsVRational (me) returns Boolean;
921 -- Returns False if for each column of weights all the weights
923 -- The tolerance criterion is resolution from package gp.
926 -- if Weights = |1.0, 2.0, 0.5| returns False
929 IsCacheValid(me; UParameter, VParameter : Real) returns Boolean ;
932 -- Tells whether the Cache is valid for the
934 -- Warnings : the parameter must be normalized within
935 -- the period if the curve is periodic. Otherwise
936 -- the answer will be false
939 Bounds (me; U1, U2, V1, V2 : out Real);
941 -- Returns the parametric bounds of the surface.
943 -- These parametric values are the bounds of the array of
944 -- knots UKnots and VKnots only if the first knots and the
945 -- last knots have a multiplicity equal to UDegree + 1 or
949 Continuity (me) returns Shape from GeomAbs;
951 -- Returns the continuity of the surface :
952 -- C0 : only geometric continuity,
953 -- C1 : continuity of the first derivative all along the Surface,
954 -- C2 : continuity of the second derivative all along the Surface,
955 -- C3 : continuity of the third derivative all along the Surface,
956 -- CN : the order of continuity is infinite.
957 -- A B-spline surface is infinitely continuously differentiable
958 -- for the couple of parameters U, V such thats U != UKnots(i)
959 -- and V != VKnots(i). The continuity of the surface at a knot
960 -- value depends on the multiplicity of this knot.
962 -- If the surface is C1 in the V direction and C2 in the U
963 -- direction this function returns Shape = C1.
966 FirstUKnotIndex (me) returns Integer;
968 -- Computes the Index of the UKnots which gives the first
969 -- parametric value of the surface in the U direction.
970 -- The UIso curve corresponding to this value is a
971 -- boundary curve of the surface.
974 FirstVKnotIndex (me) returns Integer;
976 -- Computes the Index of the VKnots which gives the
977 -- first parametric value of the surface in the V direction.
978 -- The VIso curve corresponding to this knot is a boundary
979 -- curve of the surface.
982 LastUKnotIndex (me) returns Integer;
984 -- Computes the Index of the UKnots which gives the
985 -- last parametric value of the surface in the U direction.
986 -- The UIso curve corresponding to this knot is a boundary
987 -- curve of the surface.
990 LastVKnotIndex (me) returns Integer;
992 -- Computes the Index of the VKnots which gives the
993 -- last parametric value of the surface in the V direction.
994 -- The VIso curve corresponding to this knot is a
995 -- boundary curve of the surface.
998 NbUKnots (me) returns Integer;
999 ---Purpose : Returns the number of knots in the U direction.
1001 NbUPoles (me) returns Integer;
1002 ---Purpose : Returns number of poles in the U direction.
1004 NbVKnots (me) returns Integer;
1005 ---Purpose : Returns the number of knots in the V direction.
1007 NbVPoles (me) returns Integer;
1008 ---Purpose : Returns the number of poles in the V direction.
1011 Pole (me; UIndex, VIndex : Integer) returns Pnt
1013 -- Returns the pole of range (UIndex, VIndex).
1016 -- Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or
1017 -- VIndex > NbVPoles.
1020 Poles (me; P : out Array2OfPnt from TColgp)
1021 ---Purpose : Returns the poles of the B-spline surface.
1022 raises DimensionError;
1024 -- Raised if the length of P in the U and V direction
1025 -- is not equal to NbUpoles and NbVPoles.
1028 UDegree (me) returns Integer;
1030 -- Returns the degree of the normalized B-splines Ni,n in the U
1034 UKnot (me; UIndex : Integer) returns Real
1036 -- Returns the Knot value of range UIndex.
1038 ---Purpose : Raised if UIndex < 1 or UIndex > NbUKnots
1041 UKnotDistribution (me) returns BSplKnotDistribution from GeomAbs;
1043 -- Returns NonUniform or Uniform or QuasiUniform or
1044 -- PiecewiseBezier. If all the knots differ by a
1045 -- positive constant from the preceding knot in the U
1046 -- direction the B-spline surface can be :
1047 -- - Uniform if all the knots are of multiplicity 1,
1048 -- - QuasiUniform if all the knots are of multiplicity 1
1049 -- except for the first and last knot which are of
1050 -- multiplicity Degree + 1,
1051 -- - PiecewiseBezier if the first and last knots have
1052 -- multiplicity Degree + 1 and if interior knots have
1053 -- multiplicity Degree
1054 -- otherwise the surface is non uniform in the U direction
1055 -- The tolerance criterion is Resolution from package gp.
1058 UKnots (me; Ku : out Array1OfReal from TColStd)
1059 ---Purpose : Returns the knots in the U direction.
1060 raises DimensionError;
1062 -- Raised if the length of Ku is not equal to the number of knots
1063 -- in the U direction.
1066 UKnotSequence (me; Ku : out Array1OfReal from TColStd)
1067 ---Purpose : Returns the uknots sequence.
1068 -- In this sequence the knots with a multiplicity greater than 1
1071 -- Ku = {k1, k1, k1, k2, k3, k3, k4, k4, k4}
1072 raises DimensionError;
1074 -- Raised if the length of Ku is not equal to NbUPoles + UDegree + 1
1077 UMultiplicity (me; UIndex : Integer) returns Integer
1079 -- Returns the multiplicity value of knot of range UIndex in
1082 ---Purpose : Raised if UIndex < 1 or UIndex > NbUKnots.
1085 UMultiplicities (me; Mu : out Array1OfInteger from TColStd)
1087 -- Returns the multiplicities of the knots in the U direction.
1088 raises DimensionError;
1090 -- Raised if the length of Mu is not equal to the number of
1091 -- knots in the U direction.
1094 VDegree (me) returns Integer;
1096 -- Returns the degree of the normalized B-splines Ni,d in the
1100 VKnot (me; VIndex : Integer) returns Real
1101 ---Purpose : Returns the Knot value of range VIndex.
1103 --- Purpse : Raised if VIndex < 1 or VIndex > NbVKnots
1106 VKnotDistribution (me) returns BSplKnotDistribution from GeomAbs;
1108 -- Returns NonUniform or Uniform or QuasiUniform or
1109 -- PiecewiseBezier. If all the knots differ by a positive
1110 -- constant from the preceding knot in the V direction the
1111 -- B-spline surface can be :
1112 -- - Uniform if all the knots are of multiplicity 1,
1113 -- - QuasiUniform if all the knots are of multiplicity 1
1114 -- except for the first and last knot which are of
1115 -- multiplicity Degree + 1,
1116 -- - PiecewiseBezier if the first and last knots have
1117 -- multiplicity Degree + 1 and if interior knots have
1118 -- multiplicity Degree
1119 -- otherwise the surface is non uniform in the V direction.
1120 -- The tolerance criterion is Resolution from package gp.
1123 VKnots (me; Kv : out Array1OfReal from TColStd)
1124 ---Purpose : Returns the knots in the V direction.
1125 raises DimensionError;
1127 -- Raised if the length of Kv is not equal to the number of
1128 -- knots in the V direction.
1131 VKnotSequence (me; Kv : out Array1OfReal from TColStd)
1132 ---Purpose : Returns the vknots sequence.
1133 -- In this sequence the knots with a multiplicity greater than 1
1136 -- Kv = {k1, k1, k1, k2, k3, k3, k4, k4, k4}
1137 raises DimensionError;
1139 -- Raised if the length of Kv is not equal to NbVPoles + VDegree + 1
1142 VMultiplicity (me; VIndex : Integer) returns Integer
1144 -- Returns the multiplicity value of knot of range VIndex in
1147 ---Purpose : Raised if VIndex < 1 or VIndex > NbVKnots
1150 VMultiplicities (me; Mv : out Array1OfInteger from TColStd)
1152 -- Returns the multiplicities of the knots in the V direction.
1153 raises DimensionError;
1155 -- Raised if the length of Mv is not equal to the number of
1156 -- knots in the V direction.
1159 Weight (me; UIndex, VIndex : Integer) returns Real
1160 ---Purpose : Returns the weight value of range UIndex, VIndex.
1163 -- Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1
1164 -- or VIndex > NbVPoles.
1167 Weights (me; W : out Array2OfReal from TColStd)
1168 ---Purpose : Returns the weights of the B-spline surface.
1169 raises DimensionError;
1171 -- Raised if the length of W in the U and V direction is
1172 -- not equal to NbUPoles and NbVPoles.
1179 ---Purpose : value and derivatives computation
1181 D0 (me; U, V : Real; P : out Pnt);
1184 D1 (me; U, V : Real; P : out Pnt; D1U, D1V : out Vec)
1185 raises UndefinedDerivative;
1186 ---Purpose : Raised if the continuity of the surface is not C1.
1189 D2 (me; U, V : Real; P : out Pnt; D1U, D1V, D2U, D2V, D2UV : out Vec)
1190 raises UndefinedDerivative;
1191 ---Purpose : Raised if the continuity of the surface is not C2.
1194 D3 (me; U, V : Real; P : out Pnt; D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV,
1196 raises UndefinedDerivative;
1197 ---Purpose : Raised if the continuity of the surface is not C3.
1200 DN (me; U, V : Real; Nu, Nv : Integer) returns Vec
1202 -- Nu is the order of derivation in the U parametric direction and
1203 -- Nv is the order of derivation in the V parametric direction.
1204 raises UndefinedDerivative,
1206 -- Raised if the continuity of the surface is not CNu in the U
1207 -- direction and CNv in the V direction.
1210 -- Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
1218 -- The following functions computes the point for the
1219 -- parametric values (U, V) and the derivatives at
1220 -- this point on the B-spline surface patch delimited
1221 -- with the knots FromUK1, FromVK1 and the knots ToUK2,
1222 -- ToVK2. (U, V) can be out of these parametric bounds
1223 -- but for the computation we only use the definition
1224 -- of the surface between these knots. This method is
1225 -- useful to compute local derivative, if the order of
1226 -- continuity of the whole surface is not greater enough.
1227 -- Inside the parametric knot's domain previously defined
1228 -- the evaluations are the same as if we consider the whole
1229 -- definition of the surface. Of course the evaluations are
1230 -- different outside this parametric domain.
1233 LocalD0 (me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer;
1236 ---Purpose : Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1239 -- Raised if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1240 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1241 -- [FirstVKnotIndex, LastVKnotIndex]
1244 LocalD1 (me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer;
1245 P : out Pnt; D1U, D1V : out Vec)
1246 raises UndefinedDerivative,
1248 -- Raised if the local continuity of the surface is not C1
1249 -- between the knots FromUK1, ToUK2 and FromVK1, ToVK2.
1251 ---Purpose : Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1254 -- Raised if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1255 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1256 -- [FirstVKnotIndex, LastVKnotIndex]
1259 LocalD2 (me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer;
1260 P : out Pnt; D1U, D1V, D2U, D2V, D2UV : out Vec)
1261 raises UndefinedDerivative,
1263 -- Raised if the local continuity of the surface is not C2
1264 -- between the knots FromUK1, ToUK2 and FromVK1, ToVK2.
1266 ---Purpose : Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1269 -- Raised if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1270 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1271 -- [FirstVKnotIndex, LastVKnotIndex]
1274 LocalD3 (me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer;
1275 P : out Pnt; D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV :
1277 raises UndefinedDerivative,
1279 -- Raised if the local continuity of the surface is not C3
1280 -- between the knots FromUK1, ToUK2 and FromVK1, ToVK2.
1282 ---Purpose : Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1285 -- Raised if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1286 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1287 -- [FirstVKnotIndex, LastVKnotIndex]
1290 LocalDN (me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer;
1293 raises UndefinedDerivative,
1295 -- Raised if the local continuity of the surface is not CNu
1296 -- between the knots FromUK1, ToUK2 and CNv between the knots
1299 ---Purpose : Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1301 -- Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
1304 -- Raised if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1305 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1306 -- [FirstVKnotIndex, LastVKnotIndex]
1308 LocalValue(me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer)
1310 -- Computes the point of parameter U, V on the BSpline surface patch
1311 -- defines between the knots UK1 UK2, VK1, VK2. U can be out of the
1312 -- bounds [Knot UK1, Knot UK2] and V can be outof the bounds
1313 -- [Knot VK1, Knot VK2] but for the computation we only use the
1314 -- definition of the surface between these knot values.
1317 ---Purpose : Raises if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1320 -- Raises if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1321 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1322 -- [FirstVKnotIndex, LastVKnotIndex]
1326 UIso (me; U : Real) returns mutable Curve;
1328 -- Computes the U isoparametric curve.
1329 -- A B-spline curve is returned.
1332 VIso (me; V : Real) returns mutable Curve;
1334 -- Computes the V isoparametric curve.
1335 -- A B-spline curve is returned.
1338 UIso (me; U : Real; CheckRational : Boolean) returns mutable Curve;
1340 -- Computes the U isoparametric curve.
1341 -- If CheckRational=False, no try to make it non-rational.
1342 -- A B-spline curve is returned.
1345 VIso (me; V : Real; CheckRational : Boolean) returns mutable Curve;
1347 -- Computes the V isoparametric curve.
1348 -- If CheckRational=False, no try to make it non-rational.
1349 -- A B-spline curve is returned.
1355 ---Purpose : transformations
1357 Transform (me : mutable; T : Trsf) ;
1359 --- Purpose: Applies the transformation T to this BSpline surface.
1361 MaxDegree (myclass) returns Integer;
1363 -- Returns the value of the maximum degree of the normalized
1364 -- B-spline basis functions in the u and v directions.
1367 Resolution(me : mutable;
1368 Tolerance3D : Real ;
1369 UTolerance : out Real ;
1370 VTolerance : out Real)
1371 ---Purpose: Computes two tolerance values for this BSpline
1372 -- surface, based on the given tolerance in 3D space
1373 -- Tolerance3D. The tolerances computed are:
1374 -- - UTolerance in the u parametric direction, and
1375 -- - VTolerance in the v parametric direction.
1376 -- If f(u,v) is the equation of this BSpline surface,
1377 -- UTolerance and VTolerance guarantee that :
1378 -- | u1 - u0 | < UTolerance and
1379 -- | v1 - v0 | < VTolerance
1380 -- ====> |f (u1,v1) - f (u0,v0)| < Tolerance3D
1383 Copy (me) returns mutable like me;
1385 ---Purpose: Creates a new object which is a copy of this BSpline surface.
1387 UpdateUKnots(me : mutable)
1388 ---Purpose: Recompute the flatknots, the knotsdistribution, the
1389 -- continuity for U.
1392 UpdateVKnots(me : mutable)
1393 ---Purpose: Recompute the flatknots, the knotsdistribution, the
1394 -- continuity for V.
1398 InvalidateCache(me : mutable)
1399 ---Purpose : Invalidates the cache. This has to be private this has to be private
1402 ValidateCache(me : mutable ; UParameter : Real;
1406 ---Purpose : updates the cache and validates it
1411 urational : Boolean;
1412 vrational : Boolean;
1413 uperiodic : Boolean;
1414 vperiodic : Boolean;
1415 uknotSet : BSplKnotDistribution from GeomAbs;
1416 vknotSet : BSplKnotDistribution from GeomAbs;
1417 Usmooth : Shape from GeomAbs;
1418 Vsmooth : Shape from GeomAbs;
1421 poles : HArray2OfPnt from TColgp;
1422 weights : HArray2OfReal from TColStd;
1423 ufknots : HArray1OfReal from TColStd;
1424 vfknots : HArray1OfReal from TColStd;
1425 uknots : HArray1OfReal from TColStd;
1426 vknots : HArray1OfReal from TColStd;
1427 umults : HArray1OfInteger from TColStd;
1428 vmults : HArray1OfInteger from TColStd;
1429 -- Inplementation of the cache on surfaces
1430 cachepoles : HArray2OfPnt from TColgp;
1431 -- Taylor expansion of the poles function, in homogeneous
1432 -- form if the curve is rational. The taylor expansion
1433 -- is normalized so that the span corresponds to
1434 -- [0 1]x[0 1]. The Taylor expension of lower degree
1435 -- is stored as consecutive Pnt in the array that is
1436 -- if udeg <= vdeg than the array stores the following
1439 -- (1,0) f (u0,v0) f (u0,v0)
1440 -- f (u0,v0) f (u0,v0) ------------- -----------
1444 -- (0,1) (1,1) f (u0,v0) f (u0,v0)
1445 -- f (u0,v0) f (u0,v0) ------------- -----------
1448 -- Otherwise it is stored in the following fashion
1452 -- (0,1) f (u0,v0) f (u0,v0)
1453 -- f (u0,v0) f (u0,v0) ------------- -----------
1457 -- (1,0) (1,1) f (u0,v0) f (u0,v0)
1458 -- f (u0,v0) f (u0,v0) ------------- -----------
1461 -- The size of the array is (1,Max degree) (1, Min degree)
1463 cacheweights : HArray2OfReal from TColStd;
1464 -- Taylor expansion of the poles function, in homogeneous
1465 -- form if the curve is rational. The taylor expansion
1466 -- is normalized so that the span corresponds to
1467 -- [0 1]x[0 1]. The Taylor expension of lower degree
1468 -- is stored as consecutive Real in the array as explained above
1469 ucacheparameter : Real ;
1470 vcacheparameter : Real ;
1471 -- Parameters at which the Taylor expension is stored in
1473 ucachespanlenght : Real ;
1474 vcachespanlenght : Real ;
1475 -- Since the Taylor expansion is normalized in the
1476 -- cache to evaluate the cache one has to use
1477 -- (UParameter - uparametercache) / ucachespanlenght
1478 -- (VParameter - vparametercache) / vcachespanlenght
1479 ucachespanindex : Integer ;
1480 vcachespanindex : Integer ;
1481 -- the span for which the cache is valid if
1483 validcache : Integer ;
1485 -- usefull to evaluate the parametric resolutions
1486 umaxderivinv : Real from Standard;
1487 vmaxderivinv : Real from Standard;
1488 maxderivinvok : Boolean from Standard;