Solid Edge Geometry Type Library
GetBSplineData Method
Specifies the total number of poles to be returned in the Poles argument. NumPoles is computed as the number of poles in the u direction times the number in the v direction.
Specifies the number of knot values to be returned in the KnotsU argument. NumKnotsU is the value returned from GetBSplineInfo.
Specifies the number of knot values to be returned in the KnotsV argument. NumKnotsV is the value returned from GetBSplineInfo.
Specifies the number of weight values to be returned in the Weights argument. If the surface is nonrational, this value is 0. Otherwise, NumWeights is equal to the total number of poles (NumPoles).
Returns the poles that make up the surface. The poles are returned as a 2-dimensional matrix in u-major order.
Returns the knot values that make up the knot vector in the u direction.
Returns the knot values that make up the knot vector in the v direction.
Returns the weights-per-pole when the surface is rational.
Description
Returns the poles, weights, and knots that fully define a non-uniform, rational B-Spline object.
Syntax
Visual Basic
Public Sub GetBSplineData( _
   ByVal NumPoles As Long, _
   ByVal NumKnotsU As Long, _
   ByVal NumKnotsV As Long, _
   ByVal NumWeights As Long, _
   ByRef Poles() As Double, _
   ByRef KnotsU() As Double, _
   ByRef KnotsV() As Double, _
   ByRef Weights() As Double _
) 
Parameters
NumPoles
Specifies the total number of poles to be returned in the Poles argument. NumPoles is computed as the number of poles in the u direction times the number in the v direction.
NumKnotsU
Specifies the number of knot values to be returned in the KnotsU argument. NumKnotsU is the value returned from GetBSplineInfo.
NumKnotsV
Specifies the number of knot values to be returned in the KnotsV argument. NumKnotsV is the value returned from GetBSplineInfo.
NumWeights
Specifies the number of weight values to be returned in the Weights argument. If the surface is nonrational, this value is 0. Otherwise, NumWeights is equal to the total number of poles (NumPoles).
Poles
Returns the poles that make up the surface. The poles are returned as a 2-dimensional matrix in u-major order.
KnotsU
Returns the knot values that make up the knot vector in the u direction.
KnotsV
Returns the knot values that make up the knot vector in the v direction.
Weights
Returns the weights-per-pole when the surface is rational.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objBody As SolidEdgeGeometry.Body
    Dim objFaces As Object
    Dim objBSplnSrf As SolidEdgeGeometry.BSplineSurface
    Const TESTFILE = "T:\vbtests\testcases\Curve3d.par"
    Dim lngPols() As Long
    Dim lngKnots() As Long
    Dim dblWts() As Double
    Dim dblKntU() As Double
    Dim dblKntV() As Double
    Dim dblPols() As Double
    ' Report errors
    Const PI = 3.14159265358979
    ' Create/get the application with specific settings
    On Error Resume Next
    Set objApp = GetObject(, "SolidEdge.Application")
    If Err Then
        Err.Clear
        Set objApp = CreateObject("SolidEdge.Application")
        Set objDoc = objApp.Documents.Add("SolidEdge.PartDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    ' Open the TestFile
    Set objDoc = objApp.Documents.Open(TESTFILE)
    ' Get the Model object
    Set objBody = objDoc.Models(1).Body
    ' Get the Faces Collection object
    Set objFaces = objBody.Faces(FaceType:=igQuerySpline)
    ' Get a BSpline Surace
    Set objBSplnSrf = objFaces(1).Geometry
    ' Get the number of Knots and the Poles of the BSpline Surface
    Call objBSplnSrf.GetNumKnots(lngKnots())
    Call objBSplnSrf.GetNumPoles(lngPols())
    ' Get the complete BSplineSurface Data
    Call objBSplnSrf.GetBSplineData(NumPoles:=lngPols(0) * lngPols(1), NumKnotsU:=lngKnots(0), NumKnotsV:=lngKnots(1), NumWeights:=0, _
                                    Poles:=dblPols, KnotsU:=dblKntU, KnotsV:=dblKntV, Weights:=dblWts)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objBody = Nothing
    Set objFaces = Nothing
    Set objBSplnSrf = Nothing
End Sub
See Also

BSplineSurface Object  | BSplineSurface Members

Send comments on this topic.