DInsight Home
IKO_Geom_BSplineSurface

# IKO_Geom_BSplineSurface Interface

Describes a BSpline surface. In each parametric direction, a BSpline surface can be:

ï¿½ uniform or non-uniform,
ï¿½ rational or non-rational,
ï¿½ periodic or non-periodic. A BSpline surface is defined by:
ï¿½ its degrees, in the u and v parametric directions,
ï¿½ its periodic characteristic, in the u and v parametric directions,
ï¿½ a table of poles, also called control points (together with the associated weights if the surface is rational), and
ï¿½ a table of knots, together with the associated multiplicities. The degree of a Geom_BSplineSurface is limited to a value (25) which is defined and controlled by the system. This value is returned by the function MaxDegree. Poles and Weights Poles and Weights are manipulated using two associative double arrays:
ï¿½ the poles table, which is a double array of gp_Pnt points, and
ï¿½ the weights table, which is a double array of reals. The bounds of the poles and weights arrays are:
ï¿½ 1 and NbUPoles for the row bounds (provided that the BSpline surface is not periodic in the u parametric direction), where NbUPoles is the number of poles of the surface in the u parametric direction, and
ï¿½ 1 and NbVPoles for the column bounds (provided that the BSpline surface is not periodic in the v parametric direction), where NbVPoles is the number of poles of the surface in the v parametric direction. The poles of the surface are the points used to shape and reshape the surface. They comprise a rectangular network. If the surface is not periodic:
ï¿½ The points (1, 1), (NbUPoles, 1), (1, NbVPoles), and (NbUPoles, NbVPoles) are the four parametric "corners" of the surface.
ï¿½ The first column of poles and the last column of poles define two BSpline curves which delimit the surface in the v parametric direction. These are the v isoparametric curves corresponding to the two bounds of the v parameter.
ï¿½ The first row of poles and the last row of poles define two BSpline curves which delimit the surface in the u parametric direction. These are the u isoparametric curves corresponding to the two bounds of the u parameter. If the surface is periodic, these geometric properties are not verified. It is more difficult to define a geometrical significance for the weights. However they are useful for representing a quadric surface precisely. Moreover, if the weights of all the poles are equal, the surface has a polynomial equation, and hence is a "non-rational surface". The non-rational surface is a special, but frequently used, case, where all poles have identical weights. The weights are defined and used only in the case of a rational surface. The rational characteristic is defined in each parametric direction. A surface can be rational in the u parametric direction, and non-rational in the v parametric direction. Knots and Multiplicities For a Geom_BSplineSurface the table of knots is made up of two increasing sequences of reals, without repetition, one for each parametric direction. The multiplicities define the repetition of the knots. A BSpline surface comprises multiple contiguous patches, which are themselves polynomial or rational surfaces. The knots are the parameters of the isoparametric curves which limit these contiguous patches. The multiplicity of a knot on a BSpline surface (in a given parametric direction) is related to the degree of continuity of the surface at that knot in that parametric direction: Degree of continuity at knot(i) = Degree - Multi(i) where:
ï¿½ Degree is the degree of the BSpline surface in the given parametric direction, and
ï¿½ Multi(i) is the multiplicity of knot number i in the given parametric direction. There are some special cases, where the knots are regularly spaced in one parametric direction (i.e. the difference between two consecutive knots is a constant).
ï¿½ "Uniform": all the multiplicities are equal to 1.
ï¿½ "Quasi-uniform": all the multiplicities are equal to 1, except for the first and last knots in this parametric direction, and these are equal to Degree + 1.
ï¿½ "Piecewise Bezier": all the multiplicities are equal to Degree except for the first and last knots, which are equal to Degree + 1. This surface is a concatenation of Bezier patches in the given parametric direction. If the BSpline surface is not periodic in a given parametric direction, the bounds of the knots and multiplicities tables are 1 and NbKnots, where NbKnots is the number of knots of the BSpline surface in that parametric direction. If the BSpline surface is periodic in a given parametric direction, and there are k periodic knots and p periodic poles in that parametric direction:
ï¿½ the period is such that: period = Knot(k+1) - Knot(1), and
ï¿½ the poles and knots tables in that parametric direction can be considered as infinite tables, such that: Knot(i+k) = Knot(i) + period, and Pole(i+p) = Pole(i) Note: The data structure tables for a periodic BSpline surface are more complex than those of a non-periodic one.

References : . A survey of curve and surface methods in CADG Wolfgang BOHM CAGD 1 (1984) . On de Boor-like algorithms and blossoming Wolfgang BOEHM cagd 5 (1988) . Blossoming and knot insertion algorithms for B-spline curves Ronald N. GOLDMAN . Modelisation des surfaces en CAO, Henri GIAUME Peugeot SA . Curves and Surfaces for Computer Aided Geometric Design, a practical guide Gerald Farin

Query IKO_gp_Object from this interface to obtain or modify location and orientation of the curve

Query IKO_gp_Transformation to transform position and orientation

IKO_Standard_Object to create a copy or obtain type name

Init
Init2
ExchangeUV
SetUPeriodic
Distance
Contains
SetVPeriodic
PeriodicNormalization
SetUOrigin
SetVOrigin
UReverse
VReverse
IncreaseDegree
InsertUKnots
InsertVKnots
RemoveUKnot
RemoveVKnot
IncreaseUMultiplicity
IncreaseUMultiplicity2
IncrementUMultiplicity
IncreaseVMultiplicity
IncreaseVMultiplicity2
IncrementVMultiplicity
InsertUKnot
InsertVKnot
Segment
CheckAndSegment
SetUKnot
SetUKnots
SetUKnot2
SetVKnot
SetVKnots
SetVKnot2
LocateU
LocateV
SetPole
SetPole2
SetPoleCol
SetPoleCol2
SetPoleRow
SetPoleRow2
SetWeight
SetWeightCol
SetWeightRow
MovePoint
IsUClosed
IsVClosed
IsCNu
IsCNv
IsUPeriodic
IsURational
IsVPeriodic
IsVRational
IsCacheValid
Bounds
Continuity
FirstUKnotIndex
FirstVKnotIndex
LastUKnotIndex
LastVKnotIndex
NbUKnots
NbUPoles
NbVKnots
NbVPoles
Pole
Poles
UDegree
UKnot
UKnotDistribution
UKnots
UKnotSequence
UMultiplicity
UMultiplicities
VDegree
VKnot
VKnotDistribution
VKnots
VKnotSequence
VMultiplicity
VMultiplicities
Weight
Weights
D0
D1
D2
D3
DN
UIso
VIso
Resolution

HRESULT Init(IKO_TColgp_Array2OfPnt* Poles, IKO_TColStd_Array1OfReal* UKnots, IKO_TColStd_Array1OfReal* VKnots, IKO_TColStd_Array1OfInteger* UMults, IKO_TColStd_Array1OfInteger* VMults, int UDegree, int VDegree, VARIANT_BOOL UPeriodic_deft_false, VARIANT_BOOL VPeriodic_deft_false)

Constructs a non-rational B_spline curve on the basis of degree .

HRESULT Init2(IKO_TColgp_Array2OfPnt* Poles, IKO_TColStd_Array2OfReal* Weights, IKO_TColStd_Array1OfReal* UKnots, IKO_TColStd_Array1OfReal* VKnots, IKO_TColStd_Array1OfInteger* UMults, IKO_TColStd_Array1OfInteger* VMults, int UDegree, int VDegree, VARIANT_BOOL UPeriodic_deft_false, VARIANT_BOOL VPeriodic_deft_false)

Remarks:

Creates a rational B_spline curve on the basis of degree . Raises ConstructionError subject to the following conditions 0 < Degree <= MaxDegree. Weights.Length() == Poles.Length() Knots.Length() == Mults.Length() >= 2 Knots(i) < Knots(i+1) (Knots are increasing) 1 <= Mults(i) <= Degree On a non periodic curve the first and last multiplicities may be Degree+1 (this is even recommanded if you want the curve to start and finish on the first and last pole). On a periodic curve the first and the last multicities must be the same. on non-periodic curves Poles.Length() == Sum(Mults(i)) - Degree - 1 >= 2 on periodic curves Poles.Length() == Sum(Mults(i)) except the first or last

HRESULT ExchangeUV()

Exchanges the u and v parametric directions on this BSpline surface. As a consequence: the poles and weights tables are transposed, the knots and multiplicities tables are exchanged, degrees of continuity, and rational, periodic and uniform characteristics are exchanged, and the orientation of the surface is inverted.

HRESULT SetUPeriodic(VARIANT_BOOL periodic)

Sets the surface U periodic

HRESULT SetVPeriodic(VARIANT_BOOL periodic)

Modifies this surface to be periodic in the u (or v) parametric direction. To become periodic in a given parametric direction a surface must be closed in that parametric direction, and the knot sequence relative to that direction must be periodic. To generate this periodic sequence of knots, the functions FirstUKnotIndex and LastUKnotIndex (or FirstVKnotIndex and LastVKnotIndex) are used to compute I1 and I2. These are the indexes, in the knot array associated with the given parametric direction, of the knots that correspond to the first and last parameters of this BSpline surface in the given parametric direction. Hence the period is: Knots(I1) - Knots(I2) As a result, the knots and poles tables are modified. Exceptions Standard_ConstructionError if the surface is not closed in the given parametric direction.

HRESULT PeriodicNormalization(double* U, double* V)

returns the parameter normalized within the period if the surface is periodic : otherwise does not do anything

HRESULT SetUOrigin(int Index)

Assigns the knot of index Index in the knots table in the corresponding parametric direction to be the origin of this periodic BSpline surface. As a consequence, the knots and poles tables are modified. Exceptions Standard_NoSuchObject if this BSpline surface is not periodic in the given parametric direction. Standard_DomainError if Index is outside the bounds of the knots table in the given parametric direction.

HRESULT SetVOrigin(int Index)

Assigns the knot of index Index in the knots table in the corresponding parametric direction to be the origin of this periodic BSpline surface. As a consequence, the knots and poles tables are modified. Exceptions Standard_NoSuchObject if this BSpline surface is not periodic in the given parametric direction. Standard_DomainError if Index is outside the bounds of the knots table in the given parametric direction.

HRESULT UReverse()

Changes the direction of parametrization of . The Knot sequence is modified, the FirstParameter and the LastParameter are not modified. The StartPoint of the initial curve becomes the EndPoint of the reversed curve and the EndPoint of the initial curve becomes the StartPoint of the reversed curve.

HRESULT VReverse()

Modifies this BSModifies this BSpline curve by assigning the value K to the knot of index Index in the knots table. This is a relatively local modification because K must be such that: Knots(Index - 1) < K < Knots(Index + 1) The second syntax allows you also to increase the multiplicity of the knot to M (but it is not possible to decrease the multiplicity of the knot with this function). Standard_ConstructionError if: K is not such that: Knots(Index - 1) < K < Knots(Index + 1) M is greater than the degree of this BSpline curve or lower than the previous multiplicity of knot of index Index in the knots table. Standard_OutOfRange if Index is outside the bounds of the knots table.

HRESULT IncreaseDegree(int UDegree, int VDegree)

Increases the degrees of this BSpline surface to UDegree and VDegree in the u and v parametric directions respectively. As a result, the tables of poles, weights and multiplicities are modified. The tables of knots is not changed. Note: Nothing is done if the given degree is less than or equal to the current degree in the corresponding parametric direction. Exceptions Standard_ConstructionError if UDegree or VDegree is greater than Geom_BSplineSurface::MaxDegree().

HRESULT InsertUKnots(IKO_TColStd_Array1OfReal* Knots, IKO_TColStd_Array1OfInteger* Mults, double ParametricTolerance, VARIANT_BOOL Add)

See comments for the next method

HRESULT InsertVKnots(IKO_TColStd_Array1OfReal* Knots, IKO_TColStd_Array1OfInteger* Mults, double ParametricTolerance, VARIANT_BOOL Add)

Inserts into the knots table for the corresponding parametric direction of this BSpline surface: the value U, or V, with the multiplicity M (defaulted to 1), or the values of the array Knots, with their respective multiplicities, Mults. If the knot value to insert already exists in the table, its multiplicity is: increased by M, if Add is true (the default), or increased to M, if Add is false. The tolerance criterion used to check the equality of the knots is the larger of the values ParametricTolerance and Standard_Real::Epsilon(val), where val is the knot value to be inserted. Warning If a given multiplicity coefficient is null, or negative, nothing is done. The new multiplicity of a knot is limited to the degree of this BSpline surface in the corresponding parametric direction. Exceptions Standard_ConstructionError if a knot value to insert is outside the bounds of this BSpline surface in the specified parametric direction. The comparison uses the precision criterion ParametricTolerance.

HRESULT RemoveUKnot(int Index, int M, double Tolerance, VARIANT_BOOL* retVal)

See comments for the next method

HRESULT RemoveVKnot(int Index, int M, double Tolerance, VARIANT_BOOL* retVal)

Reduces to M the multiplicity of the knot of index Index in the given parametric direction. If M is 0, the knot is removed. With a modification of this type, the table of poles is also modified. Two different algorithms are used systematically to compute the new poles of the surface. For each pole, the distance between the pole calculated using the first algorithm and the same pole calculated using the second algorithm, is checked. If this distance is less than Tolerance it ensures that the surface is not modified by more than Tolerance. Under these conditions, the function returns true; otherwise, it returns false. A low tolerance prevents modification of the surface. A high tolerance "smoothes" the surface. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table of this BSpline surface.

HRESULT IncreaseUMultiplicity(int UIndex, int M)

Increases the multiplicity of the knot of range UIndex in the UKnots sequence. M is the new multiplicity. M must be greater than the previous multiplicity and lower or equal to the degree of the surface in the U parametric direction. //! Raised if M is not in the range [1, UDegree] Raised if UIndex is not in the range [FirstUKnotIndex, LastUKnotIndex] given by the methods with the same name.

HRESULT IncreaseUMultiplicity2(int FromI1, int ToI2, int M)

Increases until order M the multiplicity of the set of knots FromI1,...., ToI2 in the U direction. This method can be used to make a B_spline surface into a PiecewiseBezier B_spline surface. If was uniform, it can become non uniform. Raised if FromI1 or ToI2 is out of the range [FirstUKnotIndex, LastUKnotIndex]. M should be greater than the previous multiplicity of the all the knots FromI1,..., ToI2 and lower or equal to the Degree of the surface in the U parametric direction.

HRESULT IncrementUMultiplicity(int FromI1, int ToI2, int Step)

Increments the multiplicity of the consecutives uknots FromI1..ToI2 by step. The multiplicity of each knot FromI1,.....,ToI2 must be lower or equal to the UDegree of the B_spline. Raised if FromI1 or ToI2 is not in the range [FirstUKnotIndex, LastUKnotIndex] Raised if one knot has a multiplicity greater than UDegree.

HRESULT IncreaseVMultiplicity(int VIndex, int M)

Increases the multiplicity of a knot in the V direction. M is the new multiplicity. M should be greater than the previous multiplicity and lower than the degree of the surface in the V parametric direction. Raised if VIndex is not in the range [FirstVKnotIndex, LastVKnotIndex] given by the methods with the same name.

HRESULT IncreaseVMultiplicity2(int FromI1, int ToI2, int M)

Increases until order M the multiplicity of the set of knots FromI1,...., ToI2 in the V direction. This method can be used to make a BSplineSurface into a PiecewiseBezier B_spline surface. If was uniform, it can become non-uniform. Raised if FromI1 or ToI2 is out of the range [FirstVKnotIndex, LastVKnotIndex] given by the methods with the same name. M should be greater than the previous multiplicity of the all the knots FromI1,..., ToI2 and lower or equal to the Degree of the surface in the V parametric direction.

HRESULT IncrementVMultiplicity(int FromI1, int ToI2, int Step)

Increments the multiplicity of the consecutives vknots FromI1..ToI2 by step. The multiplicity of each knot FromI1,.....,ToI2 must be lower or equal to the VDegree of the B_spline. Raised if FromI1 or ToI2 is not in the range [FirstVKnotIndex, LastVKnotIndex] Raised if one knot has a multiplicity greater than VDegree.

HRESULT InsertUKnot(double U, int M, double ParametricTolerance, VARIANT_BOOL Add)

Inserts a knot value in the sequence of UKnots. If U is a knot value this method increases the multiplicity of the knot if the previous multiplicity was lower than M else it does nothing. The tolerance criterion is ParametricTolerance. ParametricTolerance should be greater or equal than Resolution from package gp. Raised if U is out of the bounds [U1, U2] given by the methods Bounds, the criterion ParametricTolerance is used. Raised if M is not in the range [1, UDegree].

HRESULT InsertVKnot(double V, int M, double ParametricTolerance, VARIANT_BOOL Add)

Inserts a knot value in the sequence of VKnots. If V is a knot value this method increases the multiplicity of the knot if the previous multiplicity was lower than M otherwise it does nothing. The tolerance criterion is ParametricTolerance. ParametricTolerance should be greater or equal than Resolution from package gp. raises if V is out of the Bounds [V1, V2] given by the methods Bounds, the criterion ParametricTolerance is used. raises if M is not in the range [1, VDegree].

HRESULT Segment(double U1, double U2, double V1, double V2)

Segments the surface between U1 and U2 in the U-Direction. between V1 and V2 in the V-Direction. The control points are modified, the first and the last point are not the same. Warnings : Even if is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the surface or if the surface makes loop. //! raises if U2 < U1 or V2 < V1

HRESULT CheckAndSegment(double U1, double U2, double V1, double V2)

Segments the surface between U1 and U2 in the U-Direction. between V1 and V2 in the V-Direction. same as Segment but do nothing if U1 and U2 (resp. V1 and V2) are equal to the bounds in U (resp. in V) of . For example, if is periodic in V, it will be always periodic in V after the segmentation if the bounds in V are unchanged Warnings : Even if is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the surface or if the surface makes loop. //! raises if U2 < U1 or V2 < V1

HRESULT SetUKnot(int UIndex, double K)

Substitutes the UKnots of range UIndex with K. Raised if UIndex < 1 or UIndex > NbUKnots Raised if K >= UKnots(UIndex+1) or K <= UKnots(UIndex-1

HRESULT SetUKnots(IKO_TColStd_Array1OfReal* UK)

Changes all the U-knots of the surface. The multiplicity of the knots are not modified. Raised if there is an index such that UK (Index+1) <= UK (Index). Raised if UK.Lower() < 1 or UK.Upper() > NbUKnots

HRESULT SetUKnot2(int UIndex, double K, int M)

Changes the value of the UKnots of range UIndex and increases its multiplicity. Raised if UIndex is not in the range [FirstUKnotIndex, LastUKnotIndex] given by the methods with the same name. Raised if K >= UKnots(UIndex+1) or K <= UKnots(UIndex-1) M must be lower than UDegree and greater than the previous multiplicity of the knot of range UIndex.

HRESULT SetVKnot(int VIndex, double K)

Substitutes the VKnots of range VIndex with K. Raised if VIndex < 1 or VIndex > NbVKnots Raised if K >= VKnots(VIndex+1) or K <= VKnots(VIndex-1)

HRESULT SetVKnots(IKO_TColStHRESULT SetVKnots(IKO_TColStd_Array1OfReal* VK)

Changes all the V-knots of the surface. The multiplicity of the knots are not modified. Raised if there is an index such that VK (Index+1) <= VK (Index). Raised if VK.Lower() < 1 or VK.Upper() > NbVKnots

HRESULT SetVKnot2(int VIndex, double K, int M)

Changes the value of the VKnots of range VIndex and increases its multiplicity. Raised if VIndex is not in the range [FirstVKnotIndex, LastVKnotIndex] given by the methods with the same name. Raised if K >= VKnots(VIndex+1) or K <= VKnots(VIndex-1) M must be lower than VDegree and greater than the previous multiplicity of the knot of range VIndex.

HRESULT LocateU(double U, double ParametricTolerance, int* I1, int* I2, VARIANT_BOOL WithKnotRepetition)

Locates the parametric value U in the sequence of UKnots. If "WithKnotRepetition" is True we consider the knot's representation with repetition of multiple knot value, otherwise we consider the knot's representation with no repetition of multiple knot values. UKnots (I1) <= U <= UKnots (I2) . if I1 = I2 U is a knot value (the tolerance criterion ParametricTolerance is used). . if I1 < 1 => U < UKnots(1) - Abs(ParametricTolerance) . if I2 > NbUKnots => U > UKnots(NbUKnots)+Abs(ParametricTolerance)

HRESULT LocateV(double V, double ParametricTolerance, int* I1, int* I2, VARIANT_BOOL WithKnotRepetition)

Locates the parametric value U in the sequence of knots. If "WithKnotRepetition" is True we consider the knot's representation with repetition of multiple knot value, otherwise we consider the knot's representation with no repetition of multiple knot values. VKnots (I1) <= V <= VKnots (I2) . if I1 = I2 V is a knot value (the tolerance criterion ParametricTolerance is used). . if I1 < 1 => V < VKnots(1) - Abs(ParametricTolerance) . if I2 > NbVKnots => V > VKnots(NbVKnots)+Abs(ParametricTolerance) //! poles insertion and removing The following methods are available only if the surface is Uniform or QuasiUniform in the considered direction The knot repartition is modified.

HRESULT SetPole(int UIndex, int VIndex, DIPoint* P)

Substitutes the pole of range (UIndex, VIndex) with P. If the surface is rational the weight of range (UIndex, VIndex) is not modified. Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles.

HRESULT SetPole2(int UIndex, int VIndex, DIPoint* P, double Weight)

Substitutes the pole and the weight of range (UIndex, VIndex) with P and W. Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles. //! Raised if Weight <= Resolution from package gp.

HRESULT SetPoleCol(int VIndex, IKO_TColgp_Array1OfPnt* CPoles)

Changes a column of poles or a part of this column. //! Raised if Vindex < 1 or VIndex > NbVPoles. Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles

HRESULT SetPoleCol2(int VIndex, IKO_TColgp_Array1OfPnt* CPoles, IKO_TColStd_Array1OfReal* CPoleWeights)

Changes a column of poles or a part of this column with the corresponding weights. If the surface was rational it can become non rational. If the surface was non rational it can become rational. //! Raised if Vindex < 1 or VIndex > NbVPoles. Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles Raised if the bounds of CPoleWeights are not the same as the bounds of CPoles. Raised if one of the weight value of CPoleWeights is lower or equal to Resolution from package gp.

HRESULT SetPoleRow(int UIndex, IKO_TColgp_Array1OfPnt* CPoles, IKO_TColStd_Array1OfReal* CPoleWeights)

Changes a row of poles or a part of this row with the corresponding weights. If the surface was rational it can become non rational. If the surface was non rational it can become rational. //! Raised if Uindex < 1 or UIndex > NbUPoles. Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles raises if the bounds of CPoleWeights are not the same as the bounds of CPoles. Raised if one of the weight value of CPoleWeights is lower or equal to Resolution from package gp.

HRESULT SetPoleRow2(int UIndex, IKO_TColgp_Array1OfPnt* CPoles)

Changes a row of poles or a part of this row. //! Raised if Uindex < 1 or UIndex > NbUPoles. Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles.

HRESULT SetWeight(int UIndex, int VIndex, double Weight)

Changes the weight of the pole of range UIndex, VIndex. If the surface was non rational it can become rational. If the surface was rational it can become non rational. Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles Raised if weight is lower or equal to Resolution from package gp

HRESULT SetWeightCol(int VIndex, IKO_TColStd_Array1OfReal* CPoleWeights)

Changes a column of weights of a part of this column. Raised if VIndex < 1 or VIndex > NbVPoles Raised if CPoleWeights.Lower() < 1 or CPoleWeights.Upper() > NbUPoles. Raised if a weight value is lower or equal to Resolution from package gp.

HRESULT SetWeightRow(int UIndex, IKO_TColStd_Array1OfReal* CPoleWeights)

Changes a row of weights or a part of this row. Raised if UIndex < 1 or UIndex > NbUPoles Raised if CPoleWeights.Lower() < 1 or CPoleWeights.Upper() > NbVPoles. Raised if a weight value is lower or equal to Resolution from package gp.

HRESULT MovePoint(double U, double V, DIPoint* P, int UIndex1, int UIndex2, int VIndex1, int VIndex2, int* UFirstIndex, int* ULastIndex, int* VFirstIndex, int* VLastIndex)

Move a point with parameter U and V to P. given u,v as parameters) to reach a new position UIndex1, UIndex2, VIndex1, VIndex2: indicates the poles which can be moved if Problem in BSplineBasis calculation, no change for the curve and UFirstIndex, VLastIndex = 0 VFirstIndex, VLastIndex = 0 Raised if UIndex1 < UIndex2 or VIndex1 < VIndex2 or UIndex1 < 1 || UIndex1 > NbUPoles or UIndex2 < 1 || UIndex2 > NbUPoles VIndex1 < 1 || VIndex1 > NbVPoles or VIndex2 < 1 || VIndex2 > NbVPoles //! characteristics of the surface

HRESULT IsUClosed(VARIANT_BOOL* retVal)

Returns true if the first control points row and the last control points row are identical. The tolerance criterion is Resolution from package gp.

HRESULT IsVClosed(VARIANT_BOOL* retVal)

Returns true if the first control points column and the last last control points column are identical. The tolerance criterion is Resolution from package gp.

HRESULT IsCNu(int N, VARIANT_BOOL* retVal)

Returns True if the order of continuity of the surface in the U direction is N. //! Raised if N < 0.

HRESULT IsCNv(int N, VARIANT_BOOL* retVal)

Returns True if the order of continuity of the surface in the V direction is N. //! Raised if N < 0

HRESHRESULT IsUPeriodic(VARIANT_BOOL* retVal)

Returns True if the surface is closed in the U direction and if the B-spline has been turned into a periodic surface using the function SetUPeriodic.

HRESULT IsURational(VARIANT_BOOL* retVal)

Returns False if for each row of weights all the weights are identical. The tolerance criterion is resolution from package gp. Example : |1.0, 1.0, 1.0| if Weights = |0.5, 0.5, 0.5| returns False |2.0, 2.0, 2.0|

HRESULT IsVPeriodic(VARIANT_BOOL* retVal)

Returns True if the surface is closed in the V direction and if the B-spline has been turned into a periodic surface using the function SetVPeriodic.

HRESULT IsVRational(VARIANT_BOOL* retVal)

Returns False if for each column of weights all the weights are identical. The tolerance criterion is resolution from package gp. Examples : |1.0, 2.0, 0.5| if Weights = |1.0, 2.0, 0.5| returns False |1.0, 2.0, 0.5|

HRESULT IsCacheValid(double UParameter, double VParameter, VARIANT_BOOL* retVal) weight HRESULT IsCacheValid(double UParameter, double VParameter, VARIANT_BOOL* retVal)

Tells whether the Cache is valid for the given parameter Warnings : the parameter must be normalized within the period if the curve is periodic. Otherwise the answer will be false

HRESULT Bounds(double* U1, double* U2, double* V1, double* V2)

Returns the parametric bounds of the surface. Warnings : These parametric values are the bounds of the array of knots UKnots and VKnots only if the first knots and the last knots have a multiplicity equal to UDegree + 1 or VDegree + 1

HRESULT Continuity(int* GeomAbs_Shape_continuity)

Returns the continuity of the surface : C0 : only geometric continuity, C1 : continuity of the first derivative all along the Surface, C2 : continuity of the second derivative all along the Surface, C3 : continuity of the third derivative all along the Surface, CN : the order of continuity is infinite. A B-spline surface is infinitely continuously differentiable for the couple of parameters U, V such thats U != UKnots(i) and V != VKnots(i). The continuity of the surface at a knot value depends on the multiplicity of this knot. Example : If the surface is C1 in the V direction and C2 in the U direction this function returns Shape = C1.

HRESULT FirstUKnotIndex(int* retVal)

Computes the Index of the UKnots which gives the first parametric value of the surface in the U direction. The UIso curve corresponding to this value is a boundary curve of the surface

HRESULT FirstVKnotIndex(int* retVal)

Computes the Index of the VKnots which gives the first parametric value of the surface in the V direction. The VIso curve corresponding to this knot is a boundary curve of the surface.

HRESULT LastUKnotIndex(int* retVal)

Computes the Index of the UKnots which gives the last parametric value of the surface in the U direction. The UIso curve corresponding to this knot is a boundary curve of the surface.

HRESULT LastVKnotIndex(int* retVal)

Computes the Index of the VKnots which gives the last parametric value of the surface in the V direction. The VIso curve corresponding to this knot is a boundary curve of the surface.

HRESULT NbUKnots(int* retVal)

Returns the number of knots in the U direction.

HRESULT NbUPoles(int* retVal)

Returns number of poles in the U direction

HRESULT NbVKnots(int* retVal)

Returns the number of knots in the V direction

HRESULT NbVPoles(int* retVal)

Returns the number of poles in the V direction

HRESULT Pole(int UIndex, int VIndex, DIPoint* pt)

Returns the pole of range (UIndex, VIndex). Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles.

HRESULT Poles(IKO_TColgp_Array2OfPnt* P)

Returns the poles of the B-spline surface. Raised if the length of P in the U and V direction is not equal to NbUpoles and NbVPoles.

HRESULT UDegree(int* retVal)

Returns the degree of the normalized B-splines Ni,n in the U direction.

HRESULT UKnot(int UIndex, double* knot)

Returns the Knot value of range UIndex. //! Raised if UIndex < 1 or UIndex > NbUKnots

HRESULT UKnotDistribution(int* GeomAbs_BSplKnotDistribution_retVal)

Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. If all the knots differ by a positive constant from the preceding knot in the U direction the B-spline surface can be : Uniform if all the knots are of multiplicity 1, QuasiUniform if all the knots are of multiplicity 1 except for the first and last knot which are of multiplicity Degree + 1, PiecewiseBezier if the first and last knots have multiplicity Degree + 1 and if interior knots have multiplicity Degree otherwise the surface is non uniform in the U direction The tolerance criterion is Resolution from package gp.

HRESULT UKnots(IKO_TColStd_Array1OfReal* Ku)

Returns the knots in the U direction. Raised if the length of Ku is not equal to the number of knots in the U direction.

HRESULT UKnotSequence(IKO_TColStd_Array1OfReal* Ku)

Returns the uknots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. Example : Ku = {k1, k1, k1, k2, k3, k3, k4, k4, k4} Raised if the length of Ku is not equal to NbUPoles + UDegree + 1

HRESULT UMultiplicity(int UIndex, int* retVal)

Returns the multiplicity value of knot of range UIndex in the u direction. //! Raised if UIndex < 1 or UIndex > NbUKnots

HRESULT UMultiplicities(IKO_TColStd_Array1OfInteger* Mu)

Returns the multiplicities of the knots in the U direction. Raised if the length of Mu is not equal to the number of knots in the U direction.

HRESULT VDegree(int* retVal)

Returns the degree of the normalized B-splines Ni,d in the V direction

HRESULT VKnot(int VIndex, double* knot)

Returns the Knot value of range VIndex

HRESULT VKnotDistribution(int* GeomAbs_BSplKnotDistribution_retVal)

Returns type of knot distribution. Values are enumerated in GeomAbs_BSplKnotDistribution

Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. If all the knots differ by a positive constant from the preceding knot in the V direction the B-spline surface can be : Uniform if all the knots are of multiplicity 1, QuasiUniform if all the knots are of multiplicity 1 except for the first and last knot which are of multiplicity Degree + 1, PiecewiseBezier if the first and last knots have multiplicity Degree + 1 and if interior knots have multiplicity Degree otherwise the surface is non uniform in the V direction. The tolerance criterion is Resolution from package gp.

HRESULT VKnots(IKO_TColStd_ArrayHRESULT VKnots(IKO_TColStd_Array1OfReal* Kv)

Returns the knots in the V direction. Raised if the length of Kv is not equal to the number of knots in the V direction.

HRESULT VKnotSequence(IKO_TColStd_Array1OfReal* Kv)

Returns the vknots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. Example : Kv = {k1, k1, k1, k2, k3, k3, k4, k4, k4} Raised if the length of Kv is not equal to NbVPoles + VDegree + 1

HRESULT VMultiplicity(int VIndex, int* retVal)

Returns the multiplicity value of knot of range VIndex in the v direction. //! Raised if VIndex < 1 or VIndex > NbVKnots

HRESULT VMultiplicities(IKO_TColStd_Array1OfInteger* Mv)

Returns the multiplicities of the knots in the V direction. Raised if the length of Mv is not equal to the number of knots in the V direction

HRESULT Weight(int UIndex, int VIndex, double* retVal)

Returns the weight value of range UIndex, VIndex. Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles.

HRESULT Weights(IKO_TColStd_Array2OfReal* W)

Returns the weights of the B-spline surface. Raised if the length of W in the U and V direction is not equal to NbUPoles and NbVPoles. //! value and derivatives computation

HRESULT D0(double U, double V, DIPoint* P)

HRESULT D1(double U, double V, DIPoint* P, DIVect* D1U, DIVect* D1V)

HRESULT D2(double U, double V, DIPoint* P, DIVect* D1U, DIVect* D1V, DIVect* D2U, DIVect* D2V, DIVect* D2UV)

HRESULT D3(double U, double V, DIPoint* P, DIVect* D1U, DIVect* D1V, DIVect* D2U, DIVect* D2V, DIVect* D2UV, DIVect* D3U, DIVect* D3V, DIVect* D3UUV, DIVect* D3UVV)

HRESULT DN(double U, double V, int Nu, int Nv, DIVect* retV)

Nu is the order of derivation in the U parametric direction and Nv is the order of derivation in the V parametric direction. Raised if the continuity of the surface is not CNu in the U direction and CNv in the V direction. Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. The following functions computes the point for the parametric values (U, V) and the derivatives at this point on the B-spline surface patch delimited with the knots FromUK1, FromVK1 and the knots ToUK2, ToVK2. (U, V) can be out of these parametric bounds but for the computation we only use the definition of the surface between these knots. This method is useful to compute local derivative, if the order of continuity of the whole surface is not greater enough. Inside the parametric knot's domain previously defined the evaluations are the same as if we consider the whole definition of the surface. Of course the evaluations are different outside this parametric domain.

HRESULT UIso(double U, IKO_Geom_Curve** curve)

Computes the U isoparametric curve. A B-spline curve is returned.

HRESULT VIso(double V, IKO_Geom_Curve** curve)

Computes the V isoparametric curve. A B-spline curve is returned.

HRESULT Resolution(double Tolerance3D, double* UTolerance, double* VTolerance)

UTolerance in the u parametric direction, and VTolerance in the v parametric direction. If f(u,v) is the equation of this BSpline surface, UTolerance and VTolerance guarantee that : If | u1 - u0 | < UTolerance and | v1 - v0 | < VTolerance then |f (u1,v1) - f (u0,v0)| < Tolerance3D