# Build Pyramid with trinangle base on a surface

**URL:** <https://discourse.mcneel.com/t/build-pyramid-with-trinangle-base-on-a-surface/63440>\
**Category:** Grasshopper\
**Created:** [May 22, 2018, 4:15pm UTC](https://discourse.mcneel.com/t/build-pyramid-with-trinangle-base-on-a-surface/63440 "2018-05-22T16:15:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincent\_D](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/vincent_d/32/94362_2.png) [@vincent\_D](https://discourse.mcneel.com/u/vincent_D)\
**Post date:** [May 22, 2018, 4:15pm UTC](https://discourse.mcneel.com/t/build-pyramid-with-trinangle-base-on-a-surface/63440/1 "2018-05-22T16:15:01Z")

</div>

Hello Super User,

I am learning GH for a month now, and Iam trying to build Pyramids network from triangle base on a curved surface.  
I’ve been using Lunchbox to create the Triangle pattern I want on my surface. And from there I’ve build up the needed edges to create my Pyramids ( see attachment). I though i made the hardest part.

I wanted to create each triangle faces of my pyramides using 3 segment as border. My probelm is that from my definition 1 line is corresponding to edges on 2 pyramid. ( see attachment). And si Iam not able to create my single face.  
I can’t figure out how to break this segment in 2 single one.

I’ve attached my GH file. I hope someone can help me out on this ( Ima pretty sure) rooky problem.  
Thanks alot!!

VD  
[PYRAMID.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/e/3/e39a33cb759de1075de6277475df740837adf46b.gh) (11.8 KB)

 ![3D%20structure](https://global.discourse-cdn.com/mcneel/original/3X/6/3/63f2ce2acfce5dcd9301e8b9da917a41e687d0b5.png) ![Not%20single%20edge](https://global.discourse-cdn.com/mcneel/original/3X/5/6/56eff2e68da47bb793da83d021117cada6a1d786.png)

---

<div class="post-metadata">

**Author:** ![mark\_ortler](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mark_ortler/32/134185_2.png) [@mark\_ortler](https://discourse.mcneel.com/u/mark_ortler)\
**Post date:** [May 23, 2018, 5:52am UTC](https://discourse.mcneel.com/t/build-pyramid-with-trinangle-base-on-a-surface/63440/2 "2018-05-23T05:52:09Z")

</div>

Hey,  
not sure if I get ur full problem.  
Anyway, here an extension to ur script to get each triangle of each pyramid as a surface…  
Are u sure that u want to take the uv(0.5,0.5) of the triangle for the future topPoint of the pyramids? Just asking because this is not giving u the barycenter of the triangle. U can use ‘Area-Calculation’ to get another center.

![triangles](https://global.discourse-cdn.com/mcneel/original/3X/7/9/790684b7716a4bd6be22138d56707d8d232f8e5e.PNG)

A good tip to get trough this, is to check out the branchings of the tree and check if the structure is useful. Than pick a single branch-team and do it for, in this example, a single triangle-baseface. So its easier to get the logic done.

 ![find](https://global.discourse-cdn.com/mcneel/original/3X/6/b/6b37614a216906dfe7f34b42478f411a0fcf651a.PNG)

Furthermore I played around with it a little, using my own [plugin](https://markortler.wordpress.com/tooling/gh/qeds/). 😉

I guess it should become a facade?

 ![ex](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/b/1/b10b23faac354eacc3a395ff35a2ed46d2b98b6c.jpg)

Greets

[PYRAMID.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/5/1/512641668aa4da0354e71e88ad03738dd027a9f5.gh) (20.9 KB)  
[PYRAMID\_ext.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/e/f/ef4fa698d3d435be60a9c5a719d471c2b31720fe.gh) (39.8 KB)

---

<div class="post-metadata">

**Author:** ![vincent\_D](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/vincent_d/32/94362_2.png) [@vincent\_D](https://discourse.mcneel.com/u/vincent_D)\
**Post date:** [May 25, 2018, 7:06am UTC](https://discourse.mcneel.com/t/build-pyramid-with-trinangle-base-on-a-surface/63440/3 "2018-05-25T07:06:44Z")

</div>

Thank you very much Mark, for all the explanation! Problem solved. I tryed to play with the tree logic, but that’s still giving me a hard time. I’ll study your process closely to improve and will check your plugin too!

Thanks alot again very nice 🙂
