[Closed] Spline Extrude Question
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!
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
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