Navigation: Scripting Reference Manual > Functions & Subroutines > SetSplineCurve

 

SetSplineCurve

 

Contact Us: fredsupport@photonengr.com

 

Description

Sets the parameters for an existing spline curve.

 

Syntax

SetSplineCurve n, entity, degree, breakpoints(), coefs()

 

Parameters

n As Long

Node number of the spline curve whose parameters are being set.

 

entity As T_ENTITY

Structure defining the generic information (parent on the tree, name, description, etc.) of the spline curve.

 

degree As Long

This argument sets the degree for each parametric segment in the spline curve.  Each segment in the spline will then contain degree+1 coefficients in X, Y and Z.

 

breakpoints() As Double

This array argument contains the breakpoints for the spline curve.  The breakpoint values must be increasing and will define the range of the parametric variable for each segment.  For example, if breakpoints() has an upper bound of 2, with the values [0, 2, 3], this means that there will be two segments in the spline curve.  The first segment has length 2, with the parametric variable ranging from 0 to 2, and the second segment has length 1 with the parametric variable ranging from 0 to 1.

 

coefs() As Double

This argument is a 3xN array that contains the coefficients of all segments in the spline.  The first dimension corresponds to the segment columns as seen in the GUI, which contain the coefficients for the polynomials in X, Y and Z, respectively.  The second dimension corresponds to the segment rows as seen in the GUI, where N is (degree+1)*(Nbreakpoints-1).  For example, if breakpoints() has the values [0,2,3], then Nbreakpoints = 3 and there are 2 segments.  If degree is 1 (i.e. segments are linear), then the second dimension of coefs() has size (2)*(2) = 4.  The first two index values, 0 and 1, correspond to the coefficients of the first segment and the second two index values, 2 and 3, correspond to the coefficients of the second segment.

 

See Also

T_ENTITY

AddSplineCurve 

GetSplineCurve

 

 

 

 

 

 

Copyright © Photon Engineering, LLC