Solid Edge Geometry Type Library
GetBSplineInfo Method
Returns the order of the referenced B-Spline.
Returns the number of poles for the referenced curve.
Returns the number of knots for the referenced curve.
Returns True if the curve is rational (that is, a weight is assigned to every pole).
Returns True if the referenced curve is closed
Returns True if the referenced curve is periodic.
Returns True if the referenced curve is considered planar.
Returns the normal to the plane of the polyline when Planar is True. If Planar is False, a NULL vector is returned with its components initialized to 0.
Description
Returns the overall information related to the referenced B-Spline object.
Syntax
Visual Basic
Public Sub GetBSplineInfo( _
   ByRef Order As Long, _
   ByRef NumPoles As Long, _
   ByRef NumKnots As Long, _
   ByRef Rational As Boolean, _
   ByRef Closed As Boolean, _
   ByRef Periodic As Boolean, _
   ByRef Planar As Boolean, _
   ByRef PlaneVector() As Double _
) 
Parameters
Order
Returns the order of the referenced B-Spline.
NumPoles
Returns the number of poles for the referenced curve.
NumKnots
Returns the number of knots for the referenced curve.
Rational
Returns True if the curve is rational (that is, a weight is assigned to every pole).
Closed
Returns True if the referenced curve is closed
Periodic
Returns True if the referenced curve is periodic.
Planar
Returns True if the referenced curve is considered planar.
PlaneVector
Returns the normal to the plane of the polyline when Planar is True. If Planar is False, a NULL vector is returned with its components initialized to 0.
Remarks
Use this method to determine the amount of memory needed to obtain the variable length information that fully defines the object.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objBody As SolidEdgeGeometry.Body
    Dim objEdges As Object
    Dim objBSplnEdge As SolidEdgeGeometry.Edge
    Dim objBSpln As SolidEdgeGeometry.BSplineCurve
    Const TESTFILE = "T:\vbtests\testcases\Curve3d.par"
    Dim bRational As Boolean, bPeriod As Boolean, bPlanar As Boolean, bClosed As Boolean
    Dim lngOrder As Long, lngNumPoles As Long, lngNumKnots As Long
    Dim dblVect() 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 Edges Collection object
    Set objEdges = objBody.Edges(EdgeType:=igQuerySpline)
    ' Get a Spline Edge
    Set objBSplnEdge = objEdges(1)
    ' Get the BSpline Curve
    Set objBSpln = objBSplnEdge.Geometry
    ' Get the BSplineCurve Info
    Call objBSpln.GetBSplineInfo(Order:=lngOrder, NumPoles:=lngNumPoles, _
                                 NumKnots:=lngNumKnots, Rational:=bRational, _
                                 Closed:=bClosed, Periodic:=bPeriod, Planar:=bPlanar, _
                                 PlaneVector:=dblVect)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objBody = Nothing
    Set objBSplnEdge = Nothing
    Set objEdges = Nothing
    Set objBSpln = Nothing
End Sub
See Also

BSplineCurve Object  | BSplineCurve Members

Send comments on this topic.