Model.linecreatespline2#
- Model.linecreatespline2(coordlist, startvector, endvector, endcondition1=9, endcondition2=9)#
Creates spline form points and the end vectors.
- Parameters:
coordlist (hwDoubleList) – The list of x, y, z coordinates of the points defining the spline.
startvector (hwTriple) – The vector defining the start direction of the spline. Only required when
endcondition1is 2, 3, or 4.endvector (hwTriple) – The vector defining the end direction of the spline. Only required when
endcondition1is 2, 3, or 4.endcondition1 (int) –
The parameter specifying the constructed spline behavior at curve start. Valid values are:
0 or 9 - Spline direction at endpoint is not constrained
1 - Spline is closed. In this case any other end condition is ignored. Closed smooth cubic spline is constructed.
2 - Spline direction at endpoint is tangent to direction of input vector
startvector.3 - Spline direction at endpoint is normal to direction of input vector
startvector.4 - Spline parametric derivative at endpoint equals to input vector
startvector. Normalized spline parameterization of 0 to 1 is implied.endcondition2 (int) –
The parameter specifying the constructed spline behavior at curve end. Valid values are:
0 or 9 - Spline direction at endpoint is not constrained
1 - Spline is closed. In this case any other end condition is ignored. Closed smooth cubic spline is constructed.
2 - Spline direction at endpoint is tangent to direction of input vector
endvector.3 - Spline direction at endpoint is normal to direction of input vector
endvector.4 - Spline parametric derivative at endpoint equals to input vector
endvector. Normalized spline parameterization of 0 to 1 is implied.
Example#
Create a spline using locations (-1.3 -0.1 0.0). (-0.7 0.1 0.0), (-0.5 -0.2 0.0), (0.2 -0.9 0.0), (0.7 -0.5 0.0), (0.9 -0.4 0.0), direction at the start defined by vector (-1.0, 0.2, 0.0), and unconstrained direction at the end#import hm import hm.entities as ent model = hm.Model() model.linecreatespline2( coordlist=[-1.3, -0.1, 0.0, -0.7, 0.1, 0.0, -0.5, -0.2, 0.0, 0.2, -0.9, 0.0, 0.7, -0.5, 0.0, 0.9, -0.4, 0.0], startvector=[-1.0, 0.2, 0.0], endvector=[0.0, 0.0, 0.0], endcondition1=2, endcondition2=9 )