1 -- Created on: 1993-03-09
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 BSplineSurface from Geom inherits BoundedSurface from Geom
19 ---Purpose : Describes a BSpline surface.
20 -- In each parametric direction, a BSpline surface can be:
21 -- - uniform or non-uniform,
22 -- - rational or non-rational,
23 -- - periodic or non-periodic.
24 -- A BSpline surface is defined by:
25 -- - its degrees, in the u and v parametric directions,
26 -- - its periodic characteristic, in the u and v parametric directions,
27 -- - a table of poles, also called control points (together
28 -- with the associated weights if the surface is rational), and
29 -- - a table of knots, together with the associated multiplicities.
30 -- The degree of a Geom_BSplineSurface is limited to
31 -- a value (25) which is defined and controlled by the
32 -- system. This value is returned by the function MaxDegree.
34 -- Poles and Weights are manipulated using two associative double arrays:
35 -- - the poles table, which is a double array of gp_Pnt points, and
36 -- - the weights table, which is a double array of reals.
37 -- The bounds of the poles and weights arrays are:
38 -- - 1 and NbUPoles for the row bounds (provided
39 -- that the BSpline surface is not periodic in the u
40 -- parametric direction), where NbUPoles is the
41 -- number of poles of the surface in the u parametric direction, and
42 -- - 1 and NbVPoles for the column bounds (provided
43 -- that the BSpline surface is not periodic in the v
44 -- parametric direction), where NbVPoles is the
45 -- number of poles of the surface in the v parametric direction.
46 -- The poles of the surface are the points used to shape
47 -- and reshape the surface. They comprise a rectangular network.
48 -- If the surface is not periodic:
49 -- - The points (1, 1), (NbUPoles, 1), (1,
50 -- NbVPoles), and (NbUPoles, NbVPoles)
51 -- are the four parametric "corners" of the surface.
52 -- - The first column of poles and the last column of
53 -- poles define two BSpline curves which delimit the
54 -- surface in the v parametric direction. These are the
55 -- v isoparametric curves corresponding to the two
56 -- bounds of the v parameter.
57 -- - The first row of poles and the last row of poles
58 -- define two BSpline curves which delimit the surface
59 -- in the u parametric direction. These are the u
60 -- isoparametric curves corresponding to the two bounds of the u parameter.
61 -- If the surface is periodic, these geometric properties are not verified.
62 -- It is more difficult to define a geometrical significance
63 -- for the weights. However they are useful for
64 -- representing a quadric surface precisely. Moreover, if
65 -- the weights of all the poles are equal, the surface has
66 -- a polynomial equation, and hence is a "non-rational surface".
67 -- The non-rational surface is a special, but frequently
68 -- used, case, where all poles have identical weights.
69 -- The weights are defined and used only in the case of
70 -- a rational surface. The rational characteristic is
71 -- defined in each parametric direction. A surface can be
72 -- rational in the u parametric direction, and
73 -- non-rational in the v parametric direction.
74 -- Knots and Multiplicities
75 -- For a Geom_BSplineSurface the table of knots is
76 -- made up of two increasing sequences of reals, without
77 -- repetition, one for each parametric direction. The
78 -- multiplicities define the repetition of the knots.
79 -- A BSpline surface comprises multiple contiguous
80 -- patches, which are themselves polynomial or rational
81 -- surfaces. The knots are the parameters of the
82 -- isoparametric curves which limit these contiguous
83 -- patches. The multiplicity of a knot on a BSpline
84 -- surface (in a given parametric direction) is related to
85 -- the degree of continuity of the surface at that knot in
86 -- that parametric direction:
87 -- Degree of continuity at knot(i) = Degree - Multi(i) where:
88 -- - Degree is the degree of the BSpline surface in
89 -- the given parametric direction, and
90 -- - Multi(i) is the multiplicity of knot number i in
91 -- the given parametric direction.
92 -- There are some special cases, where the knots are
93 -- regularly spaced in one parametric direction (i.e. the
94 -- difference between two consecutive knots is a constant).
95 -- - "Uniform": all the multiplicities are equal to 1.
96 -- - "Quasi-uniform": all the multiplicities are equal to 1,
97 -- except for the first and last knots in this parametric
98 -- direction, and these are equal to Degree + 1.
99 -- - "Piecewise Bezier": all the multiplicities are equal to
100 -- Degree except for the first and last knots, which
101 -- are equal to Degree + 1. This surface is a
102 -- concatenation of Bezier patches in the given
103 -- parametric direction.
104 -- If the BSpline surface is not periodic in a given
105 -- parametric direction, the bounds of the knots and
106 -- multiplicities tables are 1 and NbKnots, where
107 -- NbKnots is the number of knots of the BSpline
108 -- surface in that parametric direction.
109 -- If the BSpline surface is periodic in a given parametric
110 -- direction, and there are k periodic knots and p
111 -- periodic poles in that parametric direction:
112 -- - the period is such that:
113 -- period = Knot(k+1) - Knot(1), and
114 -- - the poles and knots tables in that parametric
115 -- direction can be considered as infinite tables, such that:
116 -- Knot(i+k) = Knot(i) + period, and
117 -- Pole(i+p) = Pole(i)
118 -- Note: The data structure tables for a periodic BSpline
119 -- surface are more complex than those of a non-periodic one.
121 -- . A survey of curve and surface methods in CADG Wolfgang BOHM
123 -- . On de Boor-like algorithms and blossoming Wolfgang BOEHM
125 -- . Blossoming and knot insertion algorithms for B-spline curves
127 -- . Modelisation des surfaces en CAO, Henri GIAUME Peugeot SA
128 -- . Curves and Surfaces for Computer Aided Geometric Design,
129 -- a practical guide Gerald Farin
133 uses Array1OfInteger from TColStd,
134 Array1OfReal from TColStd,
135 Array2OfReal from TColStd,
136 HArray1OfInteger from TColStd,
137 HArray1OfReal from TColStd,
138 HArray2OfReal from TColStd,
139 Array1OfPnt from TColgp,
140 Array2OfPnt from TColgp,
143 HArray2OfPnt from TColgp,
147 BSplKnotDistribution from GeomAbs,
153 raises ConstructionError from Standard,
154 DimensionError from Standard,
155 DomainError from Standard,
156 OutOfRange from Standard,
157 NoSuchObject from Standard,
158 RangeError from Standard,
159 UndefinedDerivative from Geom
167 Create (Poles : Array2OfPnt from TColgp;
168 UKnots, VKnots : Array1OfReal from TColStd;
169 UMults, VMults : Array1OfInteger from TColStd;
170 UDegree, VDegree : Integer;
171 UPeriodic : Boolean = Standard_False;
172 VPeriodic : Boolean = Standard_False)
173 returns BSplineSurface
175 ---Purpose : Creates a non-rational b-spline surface (weights
176 -- default value is 1.).
177 raises ConstructionError;
178 ---Purpose: The following conditions must be verified.
179 -- 0 < UDegree <= MaxDegree.
180 -- UKnots.Length() == UMults.Length() >= 2
181 -- UKnots(i) < UKnots(i+1) (Knots are increasing)
182 -- 1 <= UMults(i) <= UDegree
183 -- On a non uperiodic surface the first and last
184 -- umultiplicities may be UDegree+1 (this is even
185 -- recommanded if you want the curve to start and finish on
186 -- the first and last pole).
187 -- On a uperiodic surface the first and the last
188 -- umultiplicities must be the same.
189 -- on non-uperiodic surfaces
190 -- Poles.ColLength() == Sum(UMults(i)) - UDegree - 1 >= 2
191 -- on uperiodic surfaces
192 -- Poles.ColLength() == Sum(UMults(i)) except the first or last
193 -- The previous conditions for U holds also for V, with the
194 -- RowLength of the poles.
199 Create (Poles : Array2OfPnt from TColgp;
200 Weights : Array2OfReal from TColStd;
201 UKnots, VKnots : Array1OfReal from TColStd;
202 UMults, VMults : Array1OfInteger from TColStd;
203 UDegree, VDegree : Integer;
204 UPeriodic : Boolean = Standard_False;
205 VPeriodic : Boolean = Standard_False)
206 returns BSplineSurface
208 ---Purpose : Creates a non-rational b-spline surface (weights
209 -- default value is 1.).
211 raises ConstructionError;
212 ---Purpose: The following conditions must be verified.
213 -- 0 < UDegree <= MaxDegree.
215 -- UKnots.Length() == UMults.Length() >= 2
217 -- UKnots(i) < UKnots(i+1) (Knots are increasing)
218 -- 1 <= UMults(i) <= UDegree
220 -- On a non uperiodic surface the first and last
221 -- umultiplicities may be UDegree+1 (this is even
222 -- recommanded if you want the curve to start and finish on
223 -- the first and last pole).
225 -- On a uperiodic surface the first and the last
226 -- umultiplicities must be the same.
228 -- on non-uperiodic surfaces
230 -- Poles.ColLength() == Sum(UMults(i)) - UDegree - 1 >= 2
232 -- on uperiodic surfaces
234 -- Poles.ColLength() == Sum(UMults(i)) except the first or
238 -- The previous conditions for U holds also for V, with the
239 -- RowLength of the poles.
243 ExchangeUV (me : mutable);
244 ---Purpose: Exchanges the u and v parametric directions on
245 -- this BSpline surface.
247 -- - the poles and weights tables are transposed,
248 -- - the knots and multiplicities tables are exchanged,
249 -- - degrees of continuity, and rational, periodic and
250 -- uniform characteristics are exchanged, and
251 -- - the orientation of the surface is inverted.
253 SetUPeriodic (me : mutable);
254 ---Purpose: Sets the surface U periodic.
256 SetVPeriodic (me : mutable);
257 ---Purpose: Modifies this surface to be periodic in the u (or v)
258 -- parametric direction.
259 -- To become periodic in a given parametric direction a
260 -- surface must be closed in that parametric direction,
261 -- and the knot sequence relative to that direction must be periodic.
262 -- To generate this periodic sequence of knots, the
263 -- functions FirstUKnotIndex and LastUKnotIndex (or
264 -- FirstVKnotIndex and LastVKnotIndex) are used to
265 -- compute I1 and I2. These are the indexes, in the
266 -- knot array associated with the given parametric
267 -- direction, of the knots that correspond to the first and
268 -- last parameters of this BSpline surface in the given
269 -- parametric direction. Hence the period is:
270 -- Knots(I1) - Knots(I2)
271 -- As a result, the knots and poles tables are modified.
273 -- Standard_ConstructionError if the surface is not
274 -- closed in the given parametric direction.
279 PeriodicNormalization(me ; U,V : in out Real) ;
281 ---Purpose : returns the parameter normalized within
282 -- the period if the surface is periodic : otherwise
283 -- does not do anything
285 SetUOrigin (me : mutable; Index : Integer)
286 ---Purpose: Assigns the knot of index Index in the knots table in
287 -- the corresponding parametric direction to be the
288 -- origin of this periodic BSpline surface. As a
289 -- consequence, the knots and poles tables are modified.
291 -- Standard_NoSuchObject if this BSpline surface is
292 -- not periodic in the given parametric direction.
293 -- Standard_DomainError if Index is outside the
294 -- bounds of the knots table in the given parametric direction.
298 SetVOrigin (me : mutable; Index : Integer)
299 ---Purpose: Assigns the knot of index Index in the knots table in
300 -- the corresponding parametric direction to be the
301 -- origin of this periodic BSpline surface. As a
302 -- consequence, the knots and poles tables are modified.
304 -- Standard_NoSuchObject if this BSpline surface is
305 -- not periodic in the given parametric direction.
306 -- Standard_DomainError if Index is outside the
307 -- bounds of the knots table in the given parametric direction.
312 SetUNotPeriodic (me : mutable);
314 SetVNotPeriodic (me : mutable);
315 ---Purpose: Modifies this surface to be periodic in the u (or v) parametric direction.
316 -- To become periodic in a given parametric direction a
317 -- surface must be closed in that parametric direction,
318 -- and the knot sequence relative to that direction must be periodic.
319 -- To generate this periodic sequence of knots, the
320 -- functions FirstUKnotIndex and LastUKnotIndex (or
321 -- FirstVKnotIndex and LastVKnotIndex) are used to
322 -- compute I1 and I2. These are the indexes, in the
323 -- knot array associated with the given parametric
324 -- direction, of the knots that correspond to the first and
325 -- last parameters of this BSpline surface in the given
326 -- parametric direction. Hence the period is:
327 -- Knots(I1) - Knots(I2)
328 -- As a result, the knots and poles tables are modified.
330 -- Standard_ConstructionError if the surface is not
331 -- closed in the given parametric direction.
333 UReverse (me : mutable);
335 VReverse (me : mutable);
336 ---Purpose: Changes the orientation of this BSpline surface in the
337 -- u (or v) parametric direction. The bounds of the
338 -- surface are not changed but the given parametric
339 -- direction is reversed. Hence the orientation of the
340 -- surface is reversed.
341 -- The knots and poles tables are modified.
343 UReversedParameter (me; U : Real) returns Real;
345 VReversedParameter (me; V : Real) returns Real;
346 ---Purpose: Computes the u (or v) parameter on the modified
347 -- surface, produced by reversing its u (or v) parametric
348 -- direction, for the point of u parameter U, (or of v
349 -- parameter V) on this BSpline surface.
350 -- For a BSpline surface, these functions return respectively:
351 -- - UFirst + ULast - U, or
352 -- - VFirst + VLast - V,
353 -- where UFirst, ULast, VFirst and VLast are
354 -- the values of the first and last parameters of this
355 -- BSpline surface, in the u and v parametric directions.
358 IncreaseDegree (me : mutable; UDegree, VDegree : Integer);
359 ---Purpose : Increases the degrees of this BSpline surface to
360 -- UDegree and VDegree in the u and v parametric
361 -- directions respectively. As a result, the tables of poles,
362 -- weights and multiplicities are modified. The tables of
363 -- knots is not changed.
364 -- Note: Nothing is done if the given degree is less than
365 -- or equal to the current degree in the corresponding
366 -- parametric direction.
368 -- Standard_ConstructionError if UDegree or
369 -- VDegree is greater than
370 -- Geom_BSplineSurface::MaxDegree().
373 InsertUKnots (me : mutable; Knots : Array1OfReal from TColStd;
374 Mults : Array1OfInteger from TColStd;
375 ParametricTolerance : Real = 0.0;
376 Add : Boolean = Standard_True);
378 InsertVKnots (me : mutable; Knots : Array1OfReal from TColStd;
379 Mults : Array1OfInteger from TColStd;
380 ParametricTolerance : Real = 0.0;
381 Add : Boolean = Standard_True);
383 ---Purpose: Inserts into the knots table for the corresponding
384 -- parametric direction of this BSpline surface:
385 -- - the value U, or V, with the multiplicity M (defaulted to 1), or
386 -- - the values of the array Knots, with their respective
387 -- multiplicities, Mults.
388 -- If the knot value to insert already exists in the table, its multiplicity is:
389 -- - increased by M, if Add is true (the default), or
390 -- - increased to M, if Add is false.
391 -- The tolerance criterion used to check the equality of
392 -- the knots is the larger of the values ParametricTolerance and
393 -- Standard_Real::Epsilon(val), where val is the knot value to be inserted.
395 -- - If a given multiplicity coefficient is null, or negative, nothing is done.
396 -- - The new multiplicity of a knot is limited to the degree of this BSpline surface in the
397 -- corresponding parametric direction.
399 -- Standard_ConstructionError if a knot value to
400 -- insert is outside the bounds of this BSpline surface in
401 -- the specified parametric direction. The comparison
402 -- uses the precision criterion ParametricTolerance.
405 RemoveUKnot(me : mutable; Index : Integer;
407 Tolerance : Real) returns Boolean
410 RemoveVKnot(me : mutable; Index : Integer;
412 Tolerance : Real) returns Boolean
415 ---Purpose : Reduces to M the multiplicity of the knot of index
416 -- Index in the given parametric direction. If M is 0, the knot is removed.
417 -- With a modification of this type, the table of poles is also modified.
418 -- Two different algorithms are used systematically to
419 -- compute the new poles of the surface. For each
420 -- pole, the distance between the pole calculated
421 -- using the first algorithm and the same pole
422 -- calculated using the second algorithm, is checked. If
423 -- this distance is less than Tolerance it ensures that
424 -- the surface is not modified by more than Tolerance.
425 -- Under these conditions, the function returns true;
426 -- otherwise, it returns false.
427 -- A low tolerance prevents modification of the
428 -- surface. A high tolerance "smoothes" the surface.
430 -- Standard_OutOfRange if Index is outside the
431 -- bounds of the knots table of this BSpline surface.
434 IncreaseUMultiplicity (me : mutable; UIndex : Integer; M : Integer)
436 -- Increases the multiplicity of the knot of range UIndex
437 -- in the UKnots sequence.
438 -- M is the new multiplicity. M must be greater than the
439 -- previous multiplicity and lower or equal to the degree
440 -- of the surface in the U parametric direction.
441 raises ConstructionError,
442 ---Purpose : Raised if M is not in the range [1, UDegree]
445 -- Raised if UIndex is not in the range [FirstUKnotIndex,
446 -- LastUKnotIndex] given by the methods with the same name.
449 IncreaseUMultiplicity (me : mutable; FromI1, ToI2 : Integer; M : Integer)
451 -- Increases until order M the multiplicity of the set of knots
452 -- FromI1,...., ToI2 in the U direction. This method can be used
453 -- to make a B_spline surface into a PiecewiseBezier B_spline
455 -- If <me> was uniform, it can become non uniform.
458 -- Raised if FromI1 or ToI2 is out of the range [FirstUKnotIndex,
462 -- M should be greater than the previous multiplicity of the
463 -- all the knots FromI1,..., ToI2 and lower or equal to the
464 -- Degree of the surface in the U parametric direction.
467 IncrementUMultiplicity (me : mutable; FromI1, ToI2 : Integer; Step : Integer)
469 -- Increments the multiplicity of the consecutives uknots FromI1..ToI2
470 -- by step. The multiplicity of each knot FromI1,.....,ToI2 must be
471 -- lower or equal to the UDegree of the B_spline.
474 -- Raised if FromI1 or ToI2 is not in the range
475 -- [FirstUKnotIndex, LastUKnotIndex]
478 -- Raised if one knot has a multiplicity greater than UDegree.
481 IncreaseVMultiplicity (me : mutable; VIndex : Integer; M : Integer)
483 -- Increases the multiplicity of a knot in the V direction.
484 -- M is the new multiplicity.
485 raises ConstructionError,
487 -- M should be greater than the previous multiplicity and lower
488 -- than the degree of the surface in the V parametric direction.
491 -- Raised if VIndex is not in the range [FirstVKnotIndex,
492 -- LastVKnotIndex] given by the methods with the same name.
495 IncreaseVMultiplicity (me : mutable; FromI1, ToI2 : Integer; M : Integer)
497 -- Increases until order M the multiplicity of the set of knots
498 -- FromI1,...., ToI2 in the V direction. This method can be used to
499 -- make a BSplineSurface into a PiecewiseBezier B_spline
500 -- surface. If <me> was uniform, it can become non-uniform.
503 -- Raised if FromI1 or ToI2 is out of the range [FirstVKnotIndex,
504 -- LastVKnotIndex] given by the methods with the same name.
507 -- M should be greater than the previous multiplicity of the
508 -- all the knots FromI1,..., ToI2 and lower or equal to the
509 -- Degree of the surface in the V parametric direction.
512 IncrementVMultiplicity (me : mutable; FromI1, ToI2 : Integer; Step : Integer)
514 -- Increments the multiplicity of the consecutives vknots FromI1..ToI2
515 -- by step. The multiplicity of each knot FromI1,.....,ToI2 must be
516 -- lower or equal to the VDegree of the B_spline.
519 -- Raised if FromI1 or ToI2 is not in the range
520 -- [FirstVKnotIndex, LastVKnotIndex]
523 -- Raised if one knot has a multiplicity greater than VDegree.
526 InsertUKnot (me : mutable; U : Real; M : Integer; ParametricTolerance : Real;
527 Add : Boolean = Standard_True)
529 -- Inserts a knot value in the sequence of UKnots. If U is a knot
530 -- value this method increases the multiplicity of the knot if the
531 -- previous multiplicity was lower than M else it does nothing. The
532 -- tolerance criterion is ParametricTolerance. ParametricTolerance
533 -- should be greater or equal than Resolution from package gp.
534 raises ConstructionError;
536 -- Raised if U is out of the bounds [U1, U2] given by the methods
537 -- Bounds, the criterion ParametricTolerance is used.
538 -- Raised if M is not in the range [1, UDegree].
541 InsertVKnot (me : mutable; V : Real; M : Integer; ParametricTolerance : Real;
542 Add : Boolean = Standard_True)
544 -- Inserts a knot value in the sequence of VKnots. If V is a knot
545 -- value this method increases the multiplicity of the knot if the
546 -- previous multiplicity was lower than M otherwise it does nothing.
547 -- The tolerance criterion is ParametricTolerance.
548 -- ParametricTolerance should be greater or equal than Resolution
550 raises ConstructionError;
552 -- raises if V is out of the Bounds [V1, V2] given by the methods
553 -- Bounds, the criterion ParametricTolerance is used.
554 -- raises if M is not in the range [1, VDegree].
557 Segment (me : mutable; U1, U2, V1, V2 : Real)
559 -- Segments the surface between U1 and U2 in the U-Direction.
560 -- between V1 and V2 in the V-Direction.
561 -- The control points are modified, the first and the last point
564 -- Even if <me> is not closed it can become closed after the
565 -- segmentation for example if U1 or U2 are out of the bounds
566 -- of the surface <me> or if the surface makes loop.
567 raises DomainError from Standard;
568 ---Purpose: raises if U2 < U1 or V2 < V1
571 CheckAndSegment (me : mutable; U1, U2, V1, V2 : Real)
573 -- Segments the surface between U1 and U2 in the U-Direction.
574 -- between V1 and V2 in the V-Direction.
576 -- same as Segment but do nothing if U1 and U2 (resp. V1 and V2) are
577 -- equal to the bounds in U (resp. in V) of <me>.
578 -- For example, if <me> is periodic in V, it will be always periodic
579 -- in V after the segmentation if the bounds in V are unchanged
582 -- Even if <me> is not closed it can become closed after the
583 -- segmentation for example if U1 or U2 are out of the bounds
584 -- of the surface <me> or if the surface makes loop.
585 raises DomainError from Standard;
586 ---Purpose: raises if U2 < U1 or V2 < V1
589 SetUKnot (me : mutable; UIndex : Integer; K : Real)
590 ---Purpose : Substitutes the UKnots of range UIndex with K.
593 -- Raised if UIndex < 1 or UIndex > NbUKnots
596 -- Raised if K >= UKnots(UIndex+1) or K <= UKnots(UIndex-1)
599 SetUKnots (me : mutable; UK : Array1OfReal from TColStd)
600 ---Purpose : Changes all the U-knots of the surface.
601 -- The multiplicity of the knots are not modified.
602 raises ConstructionError,
604 -- Raised if there is an index such that UK (Index+1) <= UK (Index).
607 -- Raised if UK.Lower() < 1 or UK.Upper() > NbUKnots
610 SetUKnot (me : mutable; UIndex : Integer; K : Real; M : Integer)
612 -- Changes the value of the UKnots of range UIndex and
613 -- increases its multiplicity.
616 -- Raised if UIndex is not in the range [FirstUKnotIndex,
617 -- LastUKnotIndex] given by the methods with the same name.
620 -- Raised if K >= UKnots(UIndex+1) or K <= UKnots(UIndex-1)
621 -- M must be lower than UDegree and greater than the previous
622 -- multiplicity of the knot of range UIndex.
625 SetVKnot (me : mutable; VIndex : Integer; K : Real)
626 ---Purpose : Substitutes the VKnots of range VIndex with K.
629 -- Raised if VIndex < 1 or VIndex > NbVKnots
632 -- Raised if K >= VKnots(VIndex+1) or K <= VKnots(VIndex-1)
635 SetVKnots (me : mutable; VK : Array1OfReal from TColStd)
636 ---Purpose : Changes all the V-knots of the surface.
637 -- The multiplicity of the knots are not modified.
638 raises ConstructionError,
640 -- Raised if there is an index such that VK (Index+1) <= VK (Index).
643 -- Raised if VK.Lower() < 1 or VK.Upper() > NbVKnots
647 SetVKnot (me : mutable; VIndex : Integer; K : Real; M : Integer)
649 -- Changes the value of the VKnots of range VIndex and increases
653 -- Raised if VIndex is not in the range [FirstVKnotIndex,
654 -- LastVKnotIndex] given by the methods with the same name.
657 -- Raised if K >= VKnots(VIndex+1) or K <= VKnots(VIndex-1)
658 -- M must be lower than VDegree and greater than the previous
659 -- multiplicity of the knot of range VIndex.
664 ParametricTolerance : Real;
665 I1, I2 : in out Integer;
666 WithKnotRepetition : Boolean = Standard_False);
668 -- Locates the parametric value U in the sequence of UKnots.
669 -- If "WithKnotRepetition" is True we consider the knot's
670 -- representation with repetition of multiple knot value,
671 -- otherwise we consider the knot's representation with
672 -- no repetition of multiple knot values.
673 -- UKnots (I1) <= U <= UKnots (I2)
674 -- . if I1 = I2 U is a knot value (the tolerance criterion
675 -- ParametricTolerance is used).
676 -- . if I1 < 1 => U < UKnots(1) - Abs(ParametricTolerance)
677 -- . if I2 > NbUKnots => U > UKnots(NbUKnots)+Abs(ParametricTolerance)
682 ParametricTolerance : Real;
683 I1, I2 : in out Integer;
684 WithKnotRepetition : Boolean = Standard_False);
686 -- Locates the parametric value U in the sequence of knots.
687 -- If "WithKnotRepetition" is True we consider the knot's
688 -- representation with repetition of multiple knot value,
689 -- otherwise we consider the knot's representation with
690 -- no repetition of multiple knot values.
691 -- VKnots (I1) <= V <= VKnots (I2)
692 -- . if I1 = I2 V is a knot value (the tolerance criterion
693 -- ParametricTolerance is used).
694 -- . if I1 < 1 => V < VKnots(1) - Abs(ParametricTolerance)
695 -- . if I2 > NbVKnots => V > VKnots(NbVKnots)+Abs(ParametricTolerance)
703 ---Purpose : poles insertion and removing
704 -- The following methods are available only if the surface
705 -- is Uniform or QuasiUniform in the considered direction
706 -- The knot repartition is modified.
711 ----Purpose : poles and weights modifications
713 SetPole (me : mutable; UIndex, VIndex : Integer; P : Pnt)
715 -- Substitutes the pole of range (UIndex, VIndex) with P.
716 -- If the surface is rational the weight of range (UIndex, VIndex)
720 -- Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or
721 -- VIndex > NbVPoles.
724 SetPole (me : mutable; UIndex, VIndex : Integer; P : Pnt; Weight : Real)
726 -- Substitutes the pole and the weight of range (UIndex, VIndex)
730 -- Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or
731 -- VIndex > NbVPoles.
733 ---Purpose : Raised if Weight <= Resolution from package gp.
736 SetPoleCol (me : mutable; VIndex : Integer; CPoles : Array1OfPnt from TColgp)
738 -- Changes a column of poles or a part of this column.
740 ---Purpose : Raised if Vindex < 1 or VIndex > NbVPoles.
743 -- Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles.
746 SetPoleCol (me : mutable; VIndex : Integer; CPoles : Array1OfPnt from TColgp;
747 CPoleWeights : Array1OfReal from TColStd)
749 -- Changes a column of poles or a part of this column with the
750 -- corresponding weights. If the surface was rational it can
751 -- become non rational. If the surface was non rational it can
754 ---Purpose : Raised if Vindex < 1 or VIndex > NbVPoles.
757 -- Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles
758 -- Raised if the bounds of CPoleWeights are not the same as the
760 -- Raised if one of the weight value of CPoleWeights is lower or
761 -- equal to Resolution from package gp.
764 SetPoleRow (me : mutable; UIndex : Integer; CPoles : Array1OfPnt from TColgp;
765 CPoleWeights : Array1OfReal from TColStd)
767 -- Changes a row of poles or a part of this row with the
768 -- corresponding weights. If the surface was rational it can
769 -- become non rational. If the surface was non rational it can
772 ---Purpose : Raised if Uindex < 1 or UIndex > NbUPoles.
775 -- Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles
776 -- raises if the bounds of CPoleWeights are not the same as the
778 -- Raised if one of the weight value of CPoleWeights is lower or
779 -- equal to Resolution from package gp.
782 SetPoleRow (me : mutable; UIndex : Integer; CPoles : Array1OfPnt from TColgp)
784 -- Changes a row of poles or a part of this row.
786 ---Purpose : Raised if Uindex < 1 or UIndex > NbUPoles.
789 -- Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles.
792 SetWeight (me : mutable; UIndex, VIndex : Integer; Weight : Real)
794 -- Changes the weight of the pole of range UIndex, VIndex.
795 -- If the surface was non rational it can become rational.
796 -- If the surface was rational it can become non rational.
799 -- Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or
803 -- Raised if weight is lower or equal to Resolution from
807 SetWeightCol (me : mutable; VIndex : Integer;
808 CPoleWeights : Array1OfReal from TColStd)
810 -- Changes a column of weights of a part of this column.
813 -- Raised if VIndex < 1 or VIndex > NbVPoles
816 -- Raised if CPoleWeights.Lower() < 1 or
817 -- CPoleWeights.Upper() > NbUPoles.
818 -- Raised if a weight value is lower or equal to Resolution
822 SetWeightRow (me : mutable; UIndex : Integer;
823 CPoleWeights : Array1OfReal from TColStd)
825 -- Changes a row of weights or a part of this row.
828 -- Raised if UIndex < 1 or UIndex > NbUPoles
831 -- Raised if CPoleWeights.Lower() < 1 or
832 -- CPoleWeights.Upper() > NbVPoles.
833 -- Raised if a weight value is lower or equal to Resolution
836 MovePoint(me: mutable; U, V : Real; P: Pnt;
837 UIndex1, UIndex2, VIndex1, VIndex2: Integer;
838 UFirstIndex, ULastIndex, VFirstIndex, VLastIndex: out Integer)
839 ---Purpose: Move a point with parameter U and V to P.
840 -- given u,v as parameters) to reach a new position
841 -- UIndex1, UIndex2, VIndex1, VIndex2:
842 -- indicates the poles which can be moved
843 -- if Problem in BSplineBasis calculation, no change
845 -- UFirstIndex, VLastIndex = 0
846 -- VFirstIndex, VLastIndex = 0
849 -- Raised if UIndex1 < UIndex2 or VIndex1 < VIndex2 or
850 -- UIndex1 < 1 || UIndex1 > NbUPoles or
851 -- UIndex2 < 1 || UIndex2 > NbUPoles
852 -- VIndex1 < 1 || VIndex1 > NbVPoles or
853 -- VIndex2 < 1 || VIndex2 > NbVPoles
857 ---Purpose : characteristics of the surface
859 IsUClosed (me) returns Boolean;
861 -- Returns true if the first control points row and the last
862 -- control points row are identical. The tolerance criterion
863 -- is Resolution from package gp.
865 IsVClosed (me) returns Boolean;
867 -- Returns true if the first control points column and the
868 -- last last control points column are identical.
869 -- The tolerance criterion is Resolution from package gp.
872 IsCNu (me; N : Integer) returns Boolean
874 -- Returns True if the order of continuity of the surface in the
877 ---Purpose : Raised if N < 0.
880 IsCNv (me; N : Integer) returns Boolean
882 -- Returns True if the order of continuity of the surface
883 -- in the V direction is N.
885 ---Purpose : Raised if N < 0.
888 IsUPeriodic (me) returns Boolean;
890 -- Returns True if the surface is closed in the U direction
891 -- and if the B-spline has been turned into a periodic surface
892 -- using the function SetUPeriodic.
895 IsURational (me) returns Boolean;
897 -- Returns False if for each row of weights all the weights
899 -- The tolerance criterion is resolution from package gp.
902 -- if Weights = |0.5, 0.5, 0.5| returns False
906 IsVPeriodic (me) returns Boolean;
908 -- Returns True if the surface is closed in the V direction
909 -- and if the B-spline has been turned into a periodic
910 -- surface using the function SetVPeriodic.
913 IsVRational (me) returns Boolean;
915 -- Returns False if for each column of weights all the weights
917 -- The tolerance criterion is resolution from package gp.
920 -- if Weights = |1.0, 2.0, 0.5| returns False
923 IsCacheValid(me; UParameter, VParameter : Real) returns Boolean ;
926 -- Tells whether the Cache is valid for the
928 -- Warnings : the parameter must be normalized within
929 -- the period if the curve is periodic. Otherwise
930 -- the answer will be false
933 Bounds (me; U1, U2, V1, V2 : out Real);
935 -- Returns the parametric bounds of the surface.
937 -- These parametric values are the bounds of the array of
938 -- knots UKnots and VKnots only if the first knots and the
939 -- last knots have a multiplicity equal to UDegree + 1 or
943 Continuity (me) returns Shape from GeomAbs;
945 -- Returns the continuity of the surface :
946 -- C0 : only geometric continuity,
947 -- C1 : continuity of the first derivative all along the Surface,
948 -- C2 : continuity of the second derivative all along the Surface,
949 -- C3 : continuity of the third derivative all along the Surface,
950 -- CN : the order of continuity is infinite.
951 -- A B-spline surface is infinitely continuously differentiable
952 -- for the couple of parameters U, V such thats U != UKnots(i)
953 -- and V != VKnots(i). The continuity of the surface at a knot
954 -- value depends on the multiplicity of this knot.
956 -- If the surface is C1 in the V direction and C2 in the U
957 -- direction this function returns Shape = C1.
960 FirstUKnotIndex (me) returns Integer;
962 -- Computes the Index of the UKnots which gives the first
963 -- parametric value of the surface in the U direction.
964 -- The UIso curve corresponding to this value is a
965 -- boundary curve of the surface.
968 FirstVKnotIndex (me) returns Integer;
970 -- Computes the Index of the VKnots which gives the
971 -- first parametric value of the surface in the V direction.
972 -- The VIso curve corresponding to this knot is a boundary
973 -- curve of the surface.
976 LastUKnotIndex (me) returns Integer;
978 -- Computes the Index of the UKnots which gives the
979 -- last parametric value of the surface in the U direction.
980 -- The UIso curve corresponding to this knot is a boundary
981 -- curve of the surface.
984 LastVKnotIndex (me) returns Integer;
986 -- Computes the Index of the VKnots which gives the
987 -- last parametric value of the surface in the V direction.
988 -- The VIso curve corresponding to this knot is a
989 -- boundary curve of the surface.
992 NbUKnots (me) returns Integer;
993 ---Purpose : Returns the number of knots in the U direction.
995 NbUPoles (me) returns Integer;
996 ---Purpose : Returns number of poles in the U direction.
998 NbVKnots (me) returns Integer;
999 ---Purpose : Returns the number of knots in the V direction.
1001 NbVPoles (me) returns Integer;
1002 ---Purpose : Returns the number of poles in the V direction.
1005 Pole (me; UIndex, VIndex : Integer) returns Pnt
1007 -- Returns the pole of range (UIndex, VIndex).
1010 -- Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or
1011 -- VIndex > NbVPoles.
1014 Poles (me; P : out Array2OfPnt from TColgp)
1015 ---Purpose : Returns the poles of the B-spline surface.
1016 raises DimensionError;
1018 -- Raised if the length of P in the U and V direction
1019 -- is not equal to NbUpoles and NbVPoles.
1022 UDegree (me) returns Integer;
1024 -- Returns the degree of the normalized B-splines Ni,n in the U
1028 UKnot (me; UIndex : Integer) returns Real
1030 -- Returns the Knot value of range UIndex.
1032 ---Purpose : Raised if UIndex < 1 or UIndex > NbUKnots
1035 UKnotDistribution (me) returns BSplKnotDistribution from GeomAbs;
1037 -- Returns NonUniform or Uniform or QuasiUniform or
1038 -- PiecewiseBezier. If all the knots differ by a
1039 -- positive constant from the preceding knot in the U
1040 -- direction the B-spline surface can be :
1041 -- - Uniform if all the knots are of multiplicity 1,
1042 -- - QuasiUniform if all the knots are of multiplicity 1
1043 -- except for the first and last knot which are of
1044 -- multiplicity Degree + 1,
1045 -- - PiecewiseBezier if the first and last knots have
1046 -- multiplicity Degree + 1 and if interior knots have
1047 -- multiplicity Degree
1048 -- otherwise the surface is non uniform in the U direction
1049 -- The tolerance criterion is Resolution from package gp.
1052 UKnots (me; Ku : out Array1OfReal from TColStd)
1053 ---Purpose : Returns the knots in the U direction.
1054 raises DimensionError;
1056 -- Raised if the length of Ku is not equal to the number of knots
1057 -- in the U direction.
1060 UKnotSequence (me; Ku : out Array1OfReal from TColStd)
1061 ---Purpose : Returns the uknots sequence.
1062 -- In this sequence the knots with a multiplicity greater than 1
1065 -- Ku = {k1, k1, k1, k2, k3, k3, k4, k4, k4}
1066 raises DimensionError;
1068 -- Raised if the length of Ku is not equal to NbUPoles + UDegree + 1
1071 UMultiplicity (me; UIndex : Integer) returns Integer
1073 -- Returns the multiplicity value of knot of range UIndex in
1076 ---Purpose : Raised if UIndex < 1 or UIndex > NbUKnots.
1079 UMultiplicities (me; Mu : out Array1OfInteger from TColStd)
1081 -- Returns the multiplicities of the knots in the U direction.
1082 raises DimensionError;
1084 -- Raised if the length of Mu is not equal to the number of
1085 -- knots in the U direction.
1088 VDegree (me) returns Integer;
1090 -- Returns the degree of the normalized B-splines Ni,d in the
1094 VKnot (me; VIndex : Integer) returns Real
1095 ---Purpose : Returns the Knot value of range VIndex.
1097 --- Purpse : Raised if VIndex < 1 or VIndex > NbVKnots
1100 VKnotDistribution (me) returns BSplKnotDistribution from GeomAbs;
1102 -- Returns NonUniform or Uniform or QuasiUniform or
1103 -- PiecewiseBezier. If all the knots differ by a positive
1104 -- constant from the preceding knot in the V direction the
1105 -- B-spline surface can be :
1106 -- - Uniform if all the knots are of multiplicity 1,
1107 -- - QuasiUniform if all the knots are of multiplicity 1
1108 -- except for the first and last knot which are of
1109 -- multiplicity Degree + 1,
1110 -- - PiecewiseBezier if the first and last knots have
1111 -- multiplicity Degree + 1 and if interior knots have
1112 -- multiplicity Degree
1113 -- otherwise the surface is non uniform in the V direction.
1114 -- The tolerance criterion is Resolution from package gp.
1117 VKnots (me; Kv : out Array1OfReal from TColStd)
1118 ---Purpose : Returns the knots in the V direction.
1119 raises DimensionError;
1121 -- Raised if the length of Kv is not equal to the number of
1122 -- knots in the V direction.
1125 VKnotSequence (me; Kv : out Array1OfReal from TColStd)
1126 ---Purpose : Returns the vknots sequence.
1127 -- In this sequence the knots with a multiplicity greater than 1
1130 -- Kv = {k1, k1, k1, k2, k3, k3, k4, k4, k4}
1131 raises DimensionError;
1133 -- Raised if the length of Kv is not equal to NbVPoles + VDegree + 1
1136 VMultiplicity (me; VIndex : Integer) returns Integer
1138 -- Returns the multiplicity value of knot of range VIndex in
1141 ---Purpose : Raised if VIndex < 1 or VIndex > NbVKnots
1144 VMultiplicities (me; Mv : out Array1OfInteger from TColStd)
1146 -- Returns the multiplicities of the knots in the V direction.
1147 raises DimensionError;
1149 -- Raised if the length of Mv is not equal to the number of
1150 -- knots in the V direction.
1153 Weight (me; UIndex, VIndex : Integer) returns Real
1154 ---Purpose : Returns the weight value of range UIndex, VIndex.
1157 -- Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1
1158 -- or VIndex > NbVPoles.
1161 Weights (me; W : out Array2OfReal from TColStd)
1162 ---Purpose : Returns the weights of the B-spline surface.
1163 raises DimensionError;
1165 -- Raised if the length of W in the U and V direction is
1166 -- not equal to NbUPoles and NbVPoles.
1173 ---Purpose : value and derivatives computation
1175 D0 (me; U, V : Real; P : out Pnt);
1178 D1 (me; U, V : Real; P : out Pnt; D1U, D1V : out Vec)
1179 raises UndefinedDerivative;
1180 ---Purpose : Raised if the continuity of the surface is not C1.
1183 D2 (me; U, V : Real; P : out Pnt; D1U, D1V, D2U, D2V, D2UV : out Vec)
1184 raises UndefinedDerivative;
1185 ---Purpose : Raised if the continuity of the surface is not C2.
1188 D3 (me; U, V : Real; P : out Pnt; D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV,
1190 raises UndefinedDerivative;
1191 ---Purpose : Raised if the continuity of the surface is not C3.
1194 DN (me; U, V : Real; Nu, Nv : Integer) returns Vec
1196 -- Nu is the order of derivation in the U parametric direction and
1197 -- Nv is the order of derivation in the V parametric direction.
1198 raises UndefinedDerivative,
1200 -- Raised if the continuity of the surface is not CNu in the U
1201 -- direction and CNv in the V direction.
1204 -- Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
1212 -- The following functions computes the point for the
1213 -- parametric values (U, V) and the derivatives at
1214 -- this point on the B-spline surface patch delimited
1215 -- with the knots FromUK1, FromVK1 and the knots ToUK2,
1216 -- ToVK2. (U, V) can be out of these parametric bounds
1217 -- but for the computation we only use the definition
1218 -- of the surface between these knots. This method is
1219 -- useful to compute local derivative, if the order of
1220 -- continuity of the whole surface is not greater enough.
1221 -- Inside the parametric knot's domain previously defined
1222 -- the evaluations are the same as if we consider the whole
1223 -- definition of the surface. Of course the evaluations are
1224 -- different outside this parametric domain.
1227 LocalD0 (me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer;
1230 ---Purpose : Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1233 -- Raised if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1234 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1235 -- [FirstVKnotIndex, LastVKnotIndex]
1238 LocalD1 (me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer;
1239 P : out Pnt; D1U, D1V : out Vec)
1240 raises UndefinedDerivative,
1242 -- Raised if the local continuity of the surface is not C1
1243 -- between the knots FromUK1, ToUK2 and FromVK1, ToVK2.
1245 ---Purpose : Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1248 -- Raised if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1249 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1250 -- [FirstVKnotIndex, LastVKnotIndex]
1253 LocalD2 (me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer;
1254 P : out Pnt; D1U, D1V, D2U, D2V, D2UV : out Vec)
1255 raises UndefinedDerivative,
1257 -- Raised if the local continuity of the surface is not C2
1258 -- between the knots FromUK1, ToUK2 and FromVK1, ToVK2.
1260 ---Purpose : Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1263 -- Raised if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1264 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1265 -- [FirstVKnotIndex, LastVKnotIndex]
1268 LocalD3 (me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer;
1269 P : out Pnt; D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV :
1271 raises UndefinedDerivative,
1273 -- Raised if the local continuity of the surface is not C3
1274 -- between the knots FromUK1, ToUK2 and FromVK1, ToVK2.
1276 ---Purpose : Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1279 -- Raised if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1280 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1281 -- [FirstVKnotIndex, LastVKnotIndex]
1284 LocalDN (me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer;
1287 raises UndefinedDerivative,
1289 -- Raised if the local continuity of the surface is not CNu
1290 -- between the knots FromUK1, ToUK2 and CNv between the knots
1293 ---Purpose : Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1295 -- Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
1298 -- Raised if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1299 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1300 -- [FirstVKnotIndex, LastVKnotIndex]
1302 LocalValue(me; U, V : Real; FromUK1, ToUK2, FromVK1, ToVK2 : Integer)
1304 -- Computes the point of parameter U, V on the BSpline surface patch
1305 -- defines between the knots UK1 UK2, VK1, VK2. U can be out of the
1306 -- bounds [Knot UK1, Knot UK2] and V can be outof the bounds
1307 -- [Knot VK1, Knot VK2] but for the computation we only use the
1308 -- definition of the surface between these knot values.
1311 ---Purpose : Raises if FromUK1 = ToUK2 or FromVK1 = ToVK2.
1314 -- Raises if FromUK1, ToUK2 are not in the range [FirstUKnotIndex,
1315 -- LastUKnotIndex] or if FromVK1, ToVK2 are not in the range
1316 -- [FirstVKnotIndex, LastVKnotIndex]
1320 UIso (me; U : Real) returns Curve;
1322 -- Computes the U isoparametric curve.
1323 -- A B-spline curve is returned.
1326 VIso (me; V : Real) returns Curve;
1328 -- Computes the V isoparametric curve.
1329 -- A B-spline curve is returned.
1332 UIso (me; U : Real; CheckRational : Boolean) returns Curve;
1334 -- Computes the U isoparametric curve.
1335 -- If CheckRational=False, no try to make it non-rational.
1336 -- A B-spline curve is returned.
1339 VIso (me; V : Real; CheckRational : Boolean) returns Curve;
1341 -- Computes the V isoparametric curve.
1342 -- If CheckRational=False, no try to make it non-rational.
1343 -- A B-spline curve is returned.
1349 ---Purpose : transformations
1351 Transform (me : mutable; T : Trsf) ;
1353 --- Purpose: Applies the transformation T to this BSpline surface.
1355 MaxDegree (myclass) returns Integer;
1357 -- Returns the value of the maximum degree of the normalized
1358 -- B-spline basis functions in the u and v directions.
1361 Resolution(me : mutable;
1362 Tolerance3D : Real ;
1363 UTolerance : out Real ;
1364 VTolerance : out Real)
1365 ---Purpose: Computes two tolerance values for this BSpline
1366 -- surface, based on the given tolerance in 3D space
1367 -- Tolerance3D. The tolerances computed are:
1368 -- - UTolerance in the u parametric direction, and
1369 -- - VTolerance in the v parametric direction.
1370 -- If f(u,v) is the equation of this BSpline surface,
1371 -- UTolerance and VTolerance guarantee that :
1372 -- | u1 - u0 | < UTolerance and
1373 -- | v1 - v0 | < VTolerance
1374 -- ====> |f (u1,v1) - f (u0,v0)| < Tolerance3D
1377 Copy (me) returns like me;
1379 ---Purpose: Creates a new object which is a copy of this BSpline surface.
1381 UpdateUKnots(me : mutable)
1382 ---Purpose: Recompute the flatknots, the knotsdistribution, the
1383 -- continuity for U.
1386 UpdateVKnots(me : mutable)
1387 ---Purpose: Recompute the flatknots, the knotsdistribution, the
1388 -- continuity for V.
1392 InvalidateCache(me : mutable)
1393 ---Purpose : Invalidates the cache. This has to be private this has to be private
1396 ValidateCache(me : mutable ; UParameter : Real;
1400 ---Purpose : updates the cache and validates it
1405 urational : Boolean;
1406 vrational : Boolean;
1407 uperiodic : Boolean;
1408 vperiodic : Boolean;
1409 uknotSet : BSplKnotDistribution from GeomAbs;
1410 vknotSet : BSplKnotDistribution from GeomAbs;
1411 Usmooth : Shape from GeomAbs;
1412 Vsmooth : Shape from GeomAbs;
1415 poles : HArray2OfPnt from TColgp;
1416 weights : HArray2OfReal from TColStd;
1417 ufknots : HArray1OfReal from TColStd;
1418 vfknots : HArray1OfReal from TColStd;
1419 uknots : HArray1OfReal from TColStd;
1420 vknots : HArray1OfReal from TColStd;
1421 umults : HArray1OfInteger from TColStd;
1422 vmults : HArray1OfInteger from TColStd;
1423 -- Inplementation of the cache on surfaces
1424 cachepoles : HArray2OfPnt from TColgp;
1425 -- Taylor expansion of the poles function, in homogeneous
1426 -- form if the curve is rational. The taylor expansion
1427 -- is normalized so that the span corresponds to
1428 -- [0 1]x[0 1]. The Taylor expension of lower degree
1429 -- is stored as consecutive Pnt in the array that is
1430 -- if udeg <= vdeg than the array stores the following
1433 -- (1,0) f (u0,v0) f (u0,v0)
1434 -- f (u0,v0) f (u0,v0) ------------- -----------
1438 -- (0,1) (1,1) f (u0,v0) f (u0,v0)
1439 -- f (u0,v0) f (u0,v0) ------------- -----------
1442 -- Otherwise it is stored in the following fashion
1446 -- (0,1) f (u0,v0) f (u0,v0)
1447 -- f (u0,v0) f (u0,v0) ------------- -----------
1451 -- (1,0) (1,1) f (u0,v0) f (u0,v0)
1452 -- f (u0,v0) f (u0,v0) ------------- -----------
1455 -- The size of the array is (1,Max degree) (1, Min degree)
1457 cacheweights : HArray2OfReal from TColStd;
1458 -- Taylor expansion of the poles function, in homogeneous
1459 -- form if the curve is rational. The taylor expansion
1460 -- is normalized so that the span corresponds to
1461 -- [0 1]x[0 1]. The Taylor expension of lower degree
1462 -- is stored as consecutive Real in the array as explained above
1463 ucacheparameter : Real ;
1464 vcacheparameter : Real ;
1465 -- Parameters at which the Taylor expension is stored in
1467 ucachespanlenght : Real ;
1468 vcachespanlenght : Real ;
1469 -- Since the Taylor expansion is normalized in the
1470 -- cache to evaluate the cache one has to use
1471 -- (UParameter - uparametercache) / ucachespanlenght
1472 -- (VParameter - vparametercache) / vcachespanlenght
1473 ucachespanindex : Integer ;
1474 vcachespanindex : Integer ;
1475 -- the span for which the cache is valid if
1477 validcache : Integer ;
1479 -- usefull to evaluate the parametric resolutions
1480 umaxderivinv : Real from Standard;
1481 vmaxderivinv : Real from Standard;
1482 maxderivinvok : Boolean from Standard;
1484 myMutex : Mutex from Standard;
1485 -- protected bsplinesurface-cache