How do I create a line between two points?

MAXScript Frequently Asked Questions

In order to create a simple line between two points, you have to perform the following steps:

Here is the complete function implementing these steps:

Script:

fn drawLineBetweenTwoPoints pointA pointB =

(

ss = SplineShape pos:pointA

addNewSpline ss

addKnot ss 1 #corner #line PointA

addKnot ss 1 #corner #line PointB

updateShape ss

ss

)

newSpline = drawLineBetweenTwoPoints [10,20,30] [100,200,10]

See also

SplineShape : Shape

Spline Shape Common Properties, Operators, and Methods

How To ... Draw a Freehand Spline

Frequently Asked Questions