MAXScript Frequently Asked Questions
In order to create a simple line between two points, you have to perform the following steps:
Create a new SplineShape object, position at the first point.
Add a new Spline to the new object.
Add a new corner Knot at the first position.
Add a new corner Knot at the second position. Tell both knots to define a linear segment.
Update the SplineShape to reflect the changes.
Return the SplineShape as the result.
Here is the complete function implementing these steps:
fn drawLineBetweenTwoPoints pointA pointB =
ss = SplineShape pos:pointA
addKnot ss 1 #corner #line PointA
addKnot ss 1 #corner #line PointB
newSpline = drawLineBetweenTwoPoints [10,20,30] [100,200,10]
SplineShape : Shape
Spline Shape Common Properties, Operators, and Methods
How To ... Draw a Freehand Spline
Frequently Asked Questions