Hide Table of Contents
ICreateSplinesByEqnParams Method (ISketchManager)

Creates one or more spline segments using the B-curve parameters provided.

.NET Syntax

Visual Basic (Declaration) 
Function ICreateSplinesByEqnParams( _
   ByRef Properties As System.Integer, _
   ByVal KnotArrayCount As System.Integer, _
   ByRef Knots As System.Double, _
   ByVal ControlPointArrayCount As System.Integer, _
   ByRef ControlPoints As System.Double _
) As EnumSketchSegments
Visual Basic (Usage) 
Dim instance As ISketchManager
Dim Properties As System.Integer
Dim KnotArrayCount As System.Integer
Dim Knots As System.Double
Dim ControlPointArrayCount As System.Integer
Dim ControlPoints As System.Double
Dim value As EnumSketchSegments
 
value = instance.ICreateSplinesByEqnParams(Properties, KnotArrayCount, Knots, ControlPointArrayCount, ControlPoints)
C# 
EnumSketchSegments ICreateSplinesByEqnParams( 
   ref System.int Properties,
   System.int KnotArrayCount,
   ref System.double Knots,
   System.int ControlPointArrayCount,
   ref System.double ControlPoints
)
C++/CLI 
EnumSketchSegments^ ICreateSplinesByEqnParams( 
&   System.int% Properties,
&   System.int KnotArrayCount,
&   System.double% Knots,
&   System.int ControlPointArrayCount,
&   System.double% ControlPoints
) 

Parameters

Properties
  • in-process, unmanaged C++: Pointer to an array of dimension, order, number of control points, periodicity (see Remarks)
  • VBA, VB.NET, C#, and C++/CLI: Not supported

    See In-process Methods for details about this type of method.

  • KnotArrayCount
    Number of knots
    Knots
    • in-process, unmanaged C++: Pointer to an array of knots (e.g., knot1, knot2, etc.)
    • VBA, VB.NET, C#, and C++/CLI: Not supported
    ControlPointArrayCount
    Number of control points
    ControlPoints
    • in-process, unmanaged C++: Pointer to an array of control points ( e.g., controlpoint1[dimension], controlpoint2[dimension], etc.)
    • VBA, VB.NET, C#, and C++/CLI: Not supported

    Return Value

    • in-process, unmanaged C++: Pointer to an array of sketch segments of the newly created splines
    • VBA, VB.NET, C#, and C++/CLI: Not supported

    Remarks

    The Properties array contains four longs (placed in the first four doubles in the array):

    • Dimension

    • Order

    • Number of Control Points

    • Periodicity ( true or false)

    The Knots array contains doubles with (Number of Control Points + Order) elements.

    The size of the ControlPoints array is based upon the curve dimension.

    • Dimension = 2 then each Control Point is an array of 2 doubles ( x, y )

    • Dimension = 3 then each Control Point is an array of 3 doubles ( x, y, z)

    • Dimension = 4 then each Control Point is an array of 4 doubles ( x, y, z, w ) where w = weight

    The parameters are provided as three arrays.

    Pass the control point coordinates to this routine in sketch space. The Z value is  interpreted as 0. In certain situations, you must transform your B-curve parameters to sketch space using ISketch::ModelToSketchTransform.

    NOTE: The curve can be either periodic or non-periodic. If the generated spline is a closed spline, then it must be flagged as periodic. Additionally, splines generated in sketches must be G1 continuous. If the data passed to this method does not generate a G1 continuous spline, then it is rejected and a spline is not created. If your data is not G1 continuous, then you must split the spline into multiple G1 segments and call this method for each segment.

    This method does not work with ISketchManager::AddToDB or ISketchManager::DisplayWhenAdded. It always adds the spline directly to the database (as if ISketchManager::AddToDB(True) is in effect), and you must redraw your document window to see the entities that you added (as if ISketchManager::DisplayWhenAdded(False) is in effect).

    To create 3D splines, see IModelDoc2::InsertCurveFilePoint and related functions.

     

    See Also

    Availability

    SOLIDWORKS 2008 FCS, Revision Number 16.0


    Provide feedback on this topic

    SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

    * Required

     
    *Email:  
    Subject:   Feedback on Help Topics
    Page:   ICreateSplinesByEqnParams Method (ISketchManager)
    *Comment:  
    *   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

    Print Topic

    Select the scope of content to print:

    x

    We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

     Never show this message again
    x

    Web Help Content Version: API Help (English only) 2015 SP05

    To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

    To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.