DG Kernel Documentation


Skip Navigation Links.
Skip Navigation LinksHome Page > API Reference > General Geometry > IBSplineSurface_DG Search Documentation


IBSplineSurface_DG Interface

Init
Init1
GetAxialSplineProps
GetPoleMatrixSize
GetPole
SetPole
SetPole1
GetPoles
GetWeight
SetWeight
GetWeights
GetPoint
GetNormal
GetJet1
GetJet2
GetJetN
GetIsoCurve
ModifyPoint
SwapUV

IBSplineSurface_DG can be queried from IUVSurface_DG, when the actual surface type, as returned by IUVSurface_DG.GetSurfaceType(), is ESurfaceType_DG.eSurfTypeBSpline. Example of a query: IEntity_DG > GetGeometry() > IGeometry_DG > IBRepGeometry_DG > GetShape() > IBRepShape_DG > IBRepSolid_DG > GetOuterShell() > IBRepShell_DG > GetFace() > IBRepFace_DG > GetSurface() > IUVSurface_DG > IBSplineSurface_DG.

Bspline surface can also be created standalone (possibly to be attached to a face) using a call similar to:
IObjectGenerator_DG iGen = iModel as IObjectGenerator_DG;
IBSplineSurface_DG iBSsurf = iGen.Create("BSplineSurface_DG") as IBSplineSurface_DG;

Implements also: IUVSurface_DG, IGeometricObject_DG, IObject_DG.

All indices are 0-based.


void Init(IPointMatrix_DG poles, IArrayDouble_DG knotsU, IArrayDouble_DG knotsV, IArrayInt_DG multiplicitiesU, IArrayInt_DG multiplicitiesV, int degreeU, int degreeV, bool periodicU, bool periodicV)

Initialises a non-rational b-spline surface with weights = 1.

For input to be valid, the following conditions must be met for both U and V components:
0 < degreeU <= MaxDegree(=14 in this version)
knotsU.GetCount() == multiplicitiesU.GetCount() >= 2
knotsU[i] < knotsU[i+1] knots must be increasing
For internal knots 1 <= multiplicitiesU[i] <= degreeU
On a non u-periodic surface the first and last multiplicities are not greater than degreeU+1 (Set them to degreeU+1 to make ends of the iso curve (and edges of the surface) coinside with the  the first and the last poles).
On a u-periodic surface the first and the last in multiplicitiesU must be the same.
On non-u-periodic surfaces poles.GetRows() must be equal to Sum(multiplicitiesU[i]) - degreeU - 1 >= 2
On u-periodic surfaces poles.GetRows() must be equal to Sum(multiplicitiesU[i]), except for the first or the last.

Defaults: periodicU = false, periodicV = false


void Init1(IPointMatrix_DG poles, IMatrix_DG weights, IArrayDouble_DG knotsU, IArrayDouble_DG knotsV, IArrayInt_DG multiplicitiesU, IArrayInt_DG multiplicitiesV, int degreeU, int degreeV, bool periodicU, bool periodicV)

Initialises a rational b-spline surface.

For input to be valid, the following conditions must be met for both U and V components:
weights.GetRows() == poles.GetRows()
0 < degreeU <= MaxDegree(=14 in this version)
knotsU.GetCount() == multiplicitiesU.GetCount() >= 2
knotsU[i] < knotsU[i+1] knots must be increasing
For internal knots 1 <= multiplicitiesU[i] <= degreeU
On a non u-periodic surface the first and last multiplicities are not greater than degreeU+1 (Set them to degreeU+1 to make ends of the iso curve (and edges of the surface) coinside with the  the first and the last poles).
On a u-periodic surface the first and the last in multiplicitiesU must be the same.
On non-u-periodic surfaces poles.GetRows() must be equal to Sum(multiplicitiesU[i]) - degreeU - 1 >= 2
On u-periodic surfaces poles.GetRows() must be equal to Sum(multiplicitiesU[i]), except for the first or the last.

Defaults: periodicU = false, periodicV = false


IPartialSplineProps_DG GetAxialSplineProps(bool u)

Access to attributes specific for the selected parametric direction


PairInt_DG GetPoleMatrixSize()

Returns number of rows (along range of u parameter) in PairInt_DG.first and number of columns (along range of v parameter) in PairInt_DG.second.


Point_DG GetPole(int indexU, int indexV)

The indices must be in [0, GetAxialSplineProps(u).GetPoleCount()-1] range.


void SetPole(int indexU, int indexV, Point_DG point)

The indices must be in [0, GetAxialSplineProps(u).GetPoleCount()-1] range.


void SetPole1(int indexU, int indexV, Point_DG point, double weight)

The indices must be in [0, GetAxialSplineProps(u).GetPoleCount()-1] range.


IPointMatrix_DG GetPoles()


double GetWeight(int indexU, int indexV)

The indices must be in [0, GetAxialSplineProps(u).GetPoleCount()-1] range.


void SetWeight(int indexU, int indexV, double weight)

The indices must be in [0, GetAxialSplineProps(u).GetPoleCount()-1] range.


IMatrix_DG GetWeights()


Point_DG GetPoint(DG2D uv)


Vect_DG GetNormal(DG2D uv)


void GetJet1(DG2D uv, Point_DG point, out Vect_DG d1u, out Vect_DG d1v)

Returns point and derivatives at the uv parameters


void GetJet2(DG2D uv, Point_DG point, out Vect_DG d1u, out Vect_DG d1v, out Vect_DG d2u, out Vect_DG d2v, out Vect_DG d2uv)

Returns point and derivatives at the uv parameters


Vect_DG GetJetN(DG2D uv, int Nu, int Nv)

Returns point and derivatives of the specified order at the uv parameters


ICurve_DG GetIsoCurve(bool u, double paramAt)

If u is true, returns curve v->S(paramAt, v) parametrised by v. (u, v)->S(u,v) here denotes the surface mapping as defined by GetPoint() method above.
paramAt must be within the range returned by IUVSurface_DG.GetParameterRange(true,min,max). The returned curve will have range IUVSurface_DG.GetParameterRange(false,min,max).

Conversely, if u is false, the method returns curve u->S(u, paramAt) parametrised by u.


void ModifyPoint(DG2D uv, Point_DG point, ref int firstIndexU, ref int lastIndexU, ref int firstIndexV, ref int lastIndexV)

Modifes poles in the specified range so that the surface interpolates (passes through) the point.
In other words, moves the point at uv parameters on this surface to new position pt.
The integer parameters are [in,out]. On start they specify the range of the poles which are allowed to be moved.
On return they contain the indexes of the first and last poles, which were actually modified.


void SwapUV()

Exchanges the u and v parametric directions. As a consequence: The pole and weight tables are transposed, the knot and multiplicity tables are exchanged, degrees of continuity, and rational, periodic and uniform characteristics are exchanged, and the orientation of the surface is inverted.