ScriptSpot

Forum topic · Scripts Wanted

How to construct a NURBS POINT CURVE

By amelia · 2010-02-05

Description

I am a beginner.
I am not able to construct a "NURBS Point Curve" with MAXSCRIPT.
I need it for build an "Electric Cable" between two points with a little noise
to modify the straight line.

I need your help.

Thanks.

amelia

Comments (1)

Example in the mxs help

Anubis · 2010-02-05

Read "How do I create a line between two points?" topic in the MaxScript Reference.

-- Example from the help
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]

-- convert the SplineShape to NURBSCurveshape
convertTo newSpline NURBSCurveshape