List manipulation creating a pyramid from a polygon

Hello! N00b question here…

I´m trying to create a pyramid from a polygon. What i want is to have each face of the pyramyd scaled down in order to make a “window” in each face.

So far, i did:

  • Create the polygon
  • Find the center and move it upwards (Z+)
  • Make a line between each polygon vertex and the moved point

And here is where i hit the problem. My reasoning is to select one of the created lines and the immediate one at its side, make a new line between the two ends, join the three lines and then scale down the result.

So, this is a for each problem: for each line, select the closest one, extract ends, etc…

So far i’ve tried dispatch, shift list and uglier solutions, with no total success. I’m pretty sure i’m overcomplicating myself and this is a flatten / graft issue.

Could you please enlight me?

Here is my definition so far: Pyramid.gh (7.1 KB)

My idea is to apply this in more complex geometries, like platonic solids.

Thanks in advance!


Pyramid_2019Nov6a.gh (13.9 KB)

1 Like

You are right. You are grafting the lines that form the polygon into a correct list, but you didn’t do the same with the other curve lists you are trying to input into the join component:


To fix that you just need to graft and simplify the other lists, just like you did with the lines from the polygon.

Pyramid2.gh (16.4 KB)

1 Like

Thanks a lot!!!

Thanks a lot!!! I was sure my problem was between the chair and the keyboard :stuck_out_tongue: