Solid Edge Geometry Type Library
GetBSpline2dData Method
Specifies the total number of poles to be returned in the Poles argument.
Specifies the number of knot values to be returned in the Knots argument.
Specifies the number of weight values to be returned in the Weights argument. If the surface is non-rational, this value is 0. Otherwise, NumWeights is equal to the total number of poles (NumPoles).
Returns the poles that make up the curve.
Returns the knot values that make up the knot vector.
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 GetBSpline2dData( _
   ByVal NumPoles As Long, _
   ByVal NumKnots As Long, _
   ByVal NumWeights As Long, _
   ByRef Poles() As Double, _
   ByRef Knots() As Double, _
   ByRef Weights() As Double _
) 
Parameters
NumPoles
Specifies the total number of poles to be returned in the Poles argument.
NumKnots
Specifies the number of knot values to be returned in the Knots argument.
NumWeights
Specifies the number of weight values to be returned in the Weights argument. If the surface is non-rational, this value is 0. Otherwise, NumWeights is equal to the total number of poles (NumPoles).
Poles
Returns the poles that make up the curve.
Knots
Returns the knot values that make up the knot vector.
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 objPBCurve As solidedgegeometry.ParamBSplineCurve
    Dim lngNPoles As Long
    Dim lngNKnots As Long
    Dim lngNWeights As Long
    Dim dblPoles() As Double
    Dim dblKnots() As Double
    Dim dblWeights() As Double
    Const TESTFILE = "T:\vbtests\testcases\freeform.par"
    ' 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
    Call objDoc.Close
    ' opening the test case file
    Set objDoc = objApp.Documents.Open(TESTFILE)
    ' getting a ParamBSplineCurve from the test case
    Set objPBCurve = objDoc.Models(1).Body.Shells(1).Faces(1).Loops(1).EdgeUses(1).Geometry
    ' getting the 2D BSpline data
    lngNPoles = 2
    lngNKnots = 4
    lngNWeights = 2
    Call objPBCurve.GetBSpline2dData(NumPoles:=lngNPoles, NumKnots:=lngNKnots, NumWeights:=lngNWeights, _
                                     Poles:=dblPoles, Knots:=dblKnots, Weights:=dblWeights)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objPBCurve = Nothing
End Sub
See Also

ParamBSplineCurve Object  | ParamBSplineCurve Members