# Alternate grid using split tree

**URL:** <https://discourse.mcneel.com/t/alternate-grid-using-split-tree/86176>\
**Category:** Grasshopper\
**Created:** [July 14, 2019, 7:08pm UTC](https://discourse.mcneel.com/t/alternate-grid-using-split-tree/86176 "2019-07-14T19:08:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mia.k](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mia.k/32/257709_2.png) [@mia.k](https://discourse.mcneel.com/u/mia.k)\
**Post date:** [July 14, 2019, 7:08pm UTC](https://discourse.mcneel.com/t/alternate-grid-using-split-tree/86176/1 "2019-07-14T19:08:40Z")

</div>

Hi, I used the split tree component to get an alternate grid structure, and further to use this grid for a zig-zag polyline.  
But the split tree component is showing weird results.

Gh definition is attached below:  
[zigzag.gh](https://discourse.mcneel.com/uploads/short-url/4nrDunTe8fwBme59EcvMcKHbGL3.gh) (6.1 KB)  
“Desired result” ![xxxsxsxs](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/3/a/3a264e3eef3d46097ce701213879305f4528c31f.jpeg)

I hope to get some help with this.  
Thanks!!

---

<div class="post-metadata">

**Author:** ![danielbent](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielbent/32/631123_2.png) [@danielbent](https://discourse.mcneel.com/u/danielbent)\
**Post date:** [July 14, 2019, 7:25pm UTC](https://discourse.mcneel.com/t/alternate-grid-using-split-tree/86176/2 "2019-07-14T19:25:12Z")

</div>

like this?

 ![Canvas%20at%2021%3B23%3B58](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/f/6/f698f23ff4e2d7b38f10b48fd6e8ec4cad355d41.png)

[zigzag\_re.gh](https://discourse.mcneel.com/uploads/short-url/v6SO0LfomuXe9TWiELckr6JM4Wj.gh) (8.4 KB)

---

<div class="post-metadata">

**Author:** ![mia.k](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mia.k/32/257709_2.png) [@mia.k](https://discourse.mcneel.com/u/mia.k)\
**Post date:** [July 14, 2019, 7:27pm UTC](https://discourse.mcneel.com/t/alternate-grid-using-split-tree/86176/3 "2019-07-14T19:27:15Z")

</div>

Yes!!  
Thanks, would mind explaining me where was it getting wrong?

---

<div class="post-metadata">

**Author:** ![HS\_Kim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/hs_kim/32/473975_2.png) [@HS\_Kim](https://discourse.mcneel.com/u/HS_Kim)\
**Post date:** [July 14, 2019, 7:38pm UTC](https://discourse.mcneel.com/t/alternate-grid-using-split-tree/86176/4 "2019-07-14T19:38:00Z")

</div>

Check this as well.

 ![Canvas%20at%2004%3B32%3B06](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/1/b/1b2e2113eb6c524533cf6fe74a04f2f5638f78d8.png)  
[zigzag\_re.gh](https://discourse.mcneel.com/uploads/short-url/97DEgLRPrVrdanEBujqZhQfQjYQ.gh) (8.2 KB)

---

<div class="post-metadata">

**Author:** ![danielbent](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielbent/32/631123_2.png) [@danielbent](https://discourse.mcneel.com/u/danielbent)\
**Post date:** [July 14, 2019, 7:38pm UTC](https://discourse.mcneel.com/t/alternate-grid-using-split-tree/86176/5 "2019-07-14T19:38:11Z")

</div>

Well u didnt think about how to “weave” two branches together to get the desired result I don’t think split tree can do that.

But I guess there is a more eglegant way with Relative Item component, but I’m not familiar with it.

Edit: thanks @HS_Kim for the more elegant solution 🙂

---

<div class="post-metadata">

**Author:** ![mia.k](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mia.k/32/257709_2.png) [@mia.k](https://discourse.mcneel.com/u/mia.k)\
**Post date:** [July 14, 2019, 7:43pm UTC](https://discourse.mcneel.com/t/alternate-grid-using-split-tree/86176/6 "2019-07-14T19:43:05Z")

</div>

Thanks bud!

---

<div class="post-metadata">

**Author:** ![mia.k](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mia.k/32/257709_2.png) [@mia.k](https://discourse.mcneel.com/u/mia.k)\
**Post date:** [July 14, 2019, 7:47pm UTC](https://discourse.mcneel.com/t/alternate-grid-using-split-tree/86176/7 "2019-07-14T19:47:05Z")

</div>

I tried this with cull pattern logic , it gives me same result as yours. But i was intrested in doing with splittree.  
Thanks for your help.
