# Random cladding wall (based on 3 defined widths)

**URL:** <https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053>\
**Category:** Revit\
**Created:** [September 23, 2017, 1:37pm UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053 "2017-09-23T13:37:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![w\_de\_bruijn](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@w\_de\_bruijn](https://forum.dynamobim.com/u/w_de_bruijn)\
**Post date:** [September 23, 2017, 1:37pm UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/1 "2017-09-23T13:37:19Z")

</div>

Hi, I hope someone here on this forum can help me out with the following:

For a project I’m currently working on, the architect wants to have vertical wooden planks as the façade for the building.  
The planks are in 3 different widths: 46, 95 and 145mm, wich has to be randomly divided over the length of the wall:  
145mm - 50%  
95mm - 30%  
46mm - 20%  
The gap between each plank is 10mm.

I already tried it with a curtain wall with the 3 family types (curtain panels) wich kind of works, but I can’t tell Revit to get the gap between these 3 types 10mm, since the horizontal grid in Revit can’t be adjusted randomly according to these family types.

Please does anyone has an idea how to do this? Any help on this is more than welcome!

Hope I described the problem well enough for you to understand, English is not my native tongue 🙂 (dutch is)

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [September 23, 2017, 1:40pm UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/2 "2017-09-23T13:40:15Z")

</div>

How do you think Dynamo could help with this? Did you find any related thread on the forum?

---

<div class="post-metadata">

**Author:** ![w\_de\_bruijn](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@w\_de\_bruijn](https://forum.dynamobim.com/u/w_de_bruijn)\
**Post date:** [September 23, 2017, 1:42pm UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/3 "2017-09-23T13:42:08Z")

</div>

![Example](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/8/884ff162ba6a3a30baf165f2271f0c20d3acbe38.JPG)

---

<div class="post-metadata">

**Author:** ![w\_de\_bruijn](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@w\_de\_bruijn](https://forum.dynamobim.com/u/w_de_bruijn)\
**Post date:** [September 23, 2017, 1:43pm UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/4 "2017-09-23T13:43:29Z")

</div>

No, I found nothing related, been searching all morning…

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [September 23, 2017, 1:47pm UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/5 "2017-09-23T13:47:33Z")

</div>

You could start by building a graph to model a regularly divided curtain wall and see what’s possible with the panels lengths

---

<div class="post-metadata">

**Author:** ![w\_de\_bruijn](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@w\_de\_bruijn](https://forum.dynamobim.com/u/w_de_bruijn)\
**Post date:** [September 23, 2017, 1:54pm UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/6 "2017-09-23T13:54:34Z")

</div>

what do you mean by that? I think a curtain wall can’t do the trick becaus of the randomly divided (= the 3 different widths) vertical grids,

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 23, 2017, 1:56pm UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/7 "2017-09-23T13:56:55Z")

</div>

Curtain wall can do the trick - you have to use one that has the vertical grid disabled.

---

<div class="post-metadata">

**Author:** ![w\_de\_bruijn](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@w\_de\_bruijn](https://forum.dynamobim.com/u/w_de_bruijn)\
**Post date:** [September 23, 2017, 2:28pm UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/8 "2017-09-23T14:28:52Z")

</div>

This is what I have so far, and explains my problem:

 ![Example2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/e/cea221ab4634b43af1b7230cc1048a678ebe003a.JPG)

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [September 24, 2017, 9:12am UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/9 "2017-09-24T09:12:13Z")

</div>

@w_de_bruijn Something like this?

 ![paneling](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/c/ec10155246fee370cdd088292a82e29c9305a860.png)

If so, try to reverse engineer and extend this to serve your purpose …

```
//Facade dimensions
l = 2;
h = 2;

//Panel widths
pw1 = 0.145;
pw2 = 0.095;
pw3 = 0.046;
spc = 0.010;

pw11 = pw1+spc;
pw21 = pw2+spc;
pw31 = pw3+spc;

//Panel count percentage
pwn1 = Math.Floor((0.5*l)/pw11);
pwn2 = Math.Floor((0.3*l)/pw21);
pwn3 = Math.Floor((0.2*l)/pw31);

pw12 = List.Cycle(pw11,pwn1);
pw22 = List.Cycle(pw21,pwn2);
pw32 = List.Cycle(pw31,pwn3);

a = List.Shuffle(Flatten({pw12,pw22,pw32}));
b = Math.Sum(List.TakeItems(a,1..List.Count(a))<1>);
c = b - a;
d = b - spc;

bp = Point.Origin();
dr = Vector.XAxis();

st = bp.Translate(dr,c);
en = bp.Translate(dr,d);
ln = Line.ByStartPointEndPoint(st,en);
sr = ln.Extrude(Vector.ZAxis(),h);
```

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [September 24, 2017, 11:22am UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/10 "2017-09-24T11:22:13Z")

</div>

What is described in other posts concerning minimal attachments shouldn’t be applied to every requests? Why are the forum guidelines once more not followed here?

---

<div class="post-metadata">

**Author:** ![w\_de\_bruijn](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@w\_de\_bruijn](https://forum.dynamobim.com/u/w_de_bruijn)\
**Post date:** [September 24, 2017, 11:23am UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/11 "2017-09-24T11:23:12Z")

</div>

Yes that’s exacly what I ment 🙂  
I’m not really known to modeling surfaces in Dynamo, but this helps me so much, thanks for the example!

I got the code working in Dynamo, so now I should also put a Depth on de surfaces to load it as elements into Revit. Let’s see if I can do that.

---

<div class="post-metadata">

**Author:** ![w\_de\_bruijn](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@w\_de\_bruijn](https://forum.dynamobim.com/u/w_de_bruijn)\
**Post date:** [September 24, 2017, 12:46pm UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/12 "2017-09-24T12:46:43Z")

</div>

Fixed it, thanks again Vikram\_Subbaiah for your help!

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [September 24, 2017, 6:50pm UTC](https://forum.dynamobim.com/t/random-cladding-wall-based-on-3-defined-widths/15053/13 "2017-09-24T18:50:10Z")

</div>

Please think about sharing what you did. It’s a very bad practice here to ask someone to do a work from scratch, while asking for an “idea” without any graph or piece of code simply looks like an order form for free work. This forum is essentially dedicated to learn and improve Dynamo. If you missed that point, please see here:

> [@How to get help on the Dynamo forums](https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677):
>
> One of the main goals of the Dynamo community is to help others. One way to do that is by answering your questions. But to get the right answer, you’ll first have to ask your question in the right way. Although people are generally very helpful, there are things you can do to improve your chances of getting good and quick answers. Below you will find some suggestions on how to achieve that. Do not think of these suggestions as rules and especially do not take them as a guarantee of getting an an…
