Notifications
Clear all

[Closed] Random Mesh Placement on Vertice

Hello everyone. I am not new to 3ds Max but I never really use the MaxScript for my modeling. For part of a particular model I want to add a cone on the vertices of a circle.

I was wondering if someone would be able to help me or atleast guide me in the right direction to either get a script or make my own that will generate a cone on a selected vertices.

Thank you in advance

4 Replies

Something like this should get you started.

c = $
 convertToSplineShape c
 kA = getKnotSelection c 1
 for i=1 to kA.count do (
   p = getKnotPoint c 1 kA[i]
   cone pos:p radius1:5.0 radius2:0.0 height:10.0
 )

Thanks for the reply. That means nothing to me but I will do a little learning on MaxScript so many i can see wht that means.

Let me talk it through line by line.

c = $ – Assigns the currently selected circle to a variable called c
convertToSplineShape c – Converts the circle to a splineshape so we can work with it
kA = getKnotSelection c 1 – create a variable kA that hold an array of knot indexes that are selected
for i=1 to kA.count do ( – Loop through the array of knots (vertices)
p = getKnotPoint c 1 kA[i] – Get the current knot in question and assign the position to a variable “p”
cone pos:p radius1:5.0 radius2:0.0 height:10.0 – create a cone at the position “p”
)

The way you use the script is create a circle, select some of the knots, and then run the script. It will create cones on the selected knots.

oh ok. thanks. i shall try it later on.