r90210

12-03-2008, 01:19 PM

Hi there!

I'm trying to get hold of a simple maxscript to help with an architectural project involving panels.

I'm really after a way to randomly generate the order of certain panels in an array.

There are 11 panel types (a,b,c,d,ee,f,g,h,i,j,k, see below)

a,b,c,d and ee must be included, along with either (f and g and h) or (i) or (j and k)

(eg, a,b,c,d,ee,f,g,h)

or

(eg, a,b,c,d,ee,i)

or

(eg, a,b,c,d,ee,j,k)

The panels are all 3000 tall (see below) and when combined in any order side by side in either of the 3 methods, add up to 2465 wide.

The only other rules are that no panel the same (a and b, d and ee, or f and g and h) can be next to each other, and that panels d or e cant be at the start or on the end of the array.

Just wondering if anyone had any good ideas of where to start?

many thanks!

--Colours, Black, creme, grey

--a.wirecolor = [0,0,0]

--a.wirecolor = [255,214,122]

--a.wirecolor = [123,121,115]

-- create boxes

a = box pos:[0,0,0] width:330 height:3000 length:180

offset = 0.0

a.wirecolor = [123,121,115]

b = box pos:[500,0,0] width:330 height:3000 length:180

offset = 0.0

b.wirecolor = [123,121,115]

c = box pos:[1000,0,0] width:500 height:3000 length:300

offset = 0.0

c.wirecolor = [255,214,122]

d = box pos:[1500,0,0] width:420 height:3000 length:10

offset = 0.0

d.wirecolor = [0,0,0]

ee = box pos:[2000,0,0] width:420 height:3000 length:10

offset = 0.0

ee.wirecolor = [0,0,0]

f = box pos:[2500,0,0] width:155 height:3000 length:80

offset = 0.0

f.wirecolor = [255,214,122]

g = box pos:[3000,0,0] width:155 height:3000 length:80

offset = 0.0

g.wirecolor = [255,214,122]

h = box pos:[3500,0,0] width:155 height:3000 length:80

offset = 0.0

h.wirecolor = [255,214,122]

i = box pos:[4000,0,0] width:465 height:3000 length:80

offset = 0.0

i.wirecolor = [255,214,122]

j = box pos:[4500,0,0] width:155 height:3000 length:80

offset = 0.0

j.wirecolor = [255,214,122]

k = box pos:[5000,0,0] width:345 height:3000 length:80

offset = 0.0

k.wirecolor = [255,214,122]

I'm trying to get hold of a simple maxscript to help with an architectural project involving panels.

I'm really after a way to randomly generate the order of certain panels in an array.

There are 11 panel types (a,b,c,d,ee,f,g,h,i,j,k, see below)

a,b,c,d and ee must be included, along with either (f and g and h) or (i) or (j and k)

(eg, a,b,c,d,ee,f,g,h)

or

(eg, a,b,c,d,ee,i)

or

(eg, a,b,c,d,ee,j,k)

The panels are all 3000 tall (see below) and when combined in any order side by side in either of the 3 methods, add up to 2465 wide.

The only other rules are that no panel the same (a and b, d and ee, or f and g and h) can be next to each other, and that panels d or e cant be at the start or on the end of the array.

Just wondering if anyone had any good ideas of where to start?

many thanks!

--Colours, Black, creme, grey

--a.wirecolor = [0,0,0]

--a.wirecolor = [255,214,122]

--a.wirecolor = [123,121,115]

-- create boxes

a = box pos:[0,0,0] width:330 height:3000 length:180

offset = 0.0

a.wirecolor = [123,121,115]

b = box pos:[500,0,0] width:330 height:3000 length:180

offset = 0.0

b.wirecolor = [123,121,115]

c = box pos:[1000,0,0] width:500 height:3000 length:300

offset = 0.0

c.wirecolor = [255,214,122]

d = box pos:[1500,0,0] width:420 height:3000 length:10

offset = 0.0

d.wirecolor = [0,0,0]

ee = box pos:[2000,0,0] width:420 height:3000 length:10

offset = 0.0

ee.wirecolor = [0,0,0]

f = box pos:[2500,0,0] width:155 height:3000 length:80

offset = 0.0

f.wirecolor = [255,214,122]

g = box pos:[3000,0,0] width:155 height:3000 length:80

offset = 0.0

g.wirecolor = [255,214,122]

h = box pos:[3500,0,0] width:155 height:3000 length:80

offset = 0.0

h.wirecolor = [255,214,122]

i = box pos:[4000,0,0] width:465 height:3000 length:80

offset = 0.0

i.wirecolor = [255,214,122]

j = box pos:[4500,0,0] width:155 height:3000 length:80

offset = 0.0

j.wirecolor = [255,214,122]

k = box pos:[5000,0,0] width:345 height:3000 length:80

offset = 0.0

k.wirecolor = [255,214,122]