PDA

View Full Version : Spline Extrude Question


omerit
12-02-2006, 10:46 PM
Hi All,
I'm very new to maxscript and am trying to produce a simple script.
I have a series of different sized rectangles which are editable splines
and I want to select all of them and extude each one in an amount that relates to its area.
since i don't know of a possibility in max to use a shape's area as a parameter (if anyone does please let me know), i am thinking of using the x and y length parameters.
For example a spline with an x length smaller than 10 and y length smaller than 5 will extrude at a different amount than a spline with bigger values.
please help with any ideas or directions i could follow.
Thxs!

rdg
12-04-2006, 07:36 AM
as your editable splines are rectangles ypu can get the width and length wit the
.min and .max properties.

the area of such a spline should the be calculated by (dpending on th orientation of the pivot ...)

thearea = ($.max.x - $.min.x) * ($.max.z - $.min.z)

to extrude all selected rectangles:

theSel = selection as array

for i = 1 to theSel.count do (
theArea = (theSel[i].max.x - theSel[i].min.x) * (theSel[i].max.z - theSel[i].min.z)
theExtr = extrude()
theExtr.amount = theArea
addModifier theSel[i] theExtr
)

Georg

Deadalus
12-04-2006, 04:46 PM
maybe you should go take a look at chuggnut's Draw EX script
if i undertand correctly it could do wath you want it to
video: http://www.chuggnut.com/scripts/drawcurve/drawEX.wmv

www.chuggnut.com (http://www.chuggnut.com)

CGTalk Moderation
12-04-2006, 04:46 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.