# Generation of a space truss along two curves

**URL:** <https://discourse.mcneel.com/t/generation-of-a-space-truss-along-two-curves/180925>\
**Category:** Grasshopper\
**Tags:** windows, rhino7, grasshopperrhino, parametric\
**Created:** [April 26, 2024, 2:30am UTC](https://discourse.mcneel.com/t/generation-of-a-space-truss-along-two-curves/180925 "2024-04-26T02:30:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Islam\_Hashem](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/islam_hashem/32/549482_2.png) [@Islam\_Hashem](https://discourse.mcneel.com/u/Islam_Hashem)\
**Post date:** [April 26, 2024, 2:30am UTC](https://discourse.mcneel.com/t/generation-of-a-space-truss-along-two-curves/180925/1 "2024-04-26T02:30:50Z")

</div>

Hi, I’ve created a space truss unit and this unit should repeat itself along the two curves here, BUT the result is giving random shape.

The general idea is to generate the space truss between two points, this happens correctly when dealing with just two points, but when creating two curves, and dividing these two curves with the same number of points, the space truss should be generated at every two points from the two curves, this doesn’t happen.

 ![1](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/3/6/536fda3ce2ebd4ba2b8c423db3a551b31e7f9c52.png)  
 ![2](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/f/a/6fa6b7ad0c3068aeef8cebe43f660b970fe54d74.png)  
 ![3](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/1/f/a1f00bb1f249f93794cad261567abc937b0358c0.png)

this is the GH file

[Curved Space Truss.gh](https://discourse.mcneel.com/uploads/short-url/tlUQ3JiYt3DXGZNvVP4ecGEtpuT.gh) (21.3 KB)

---

<div class="post-metadata">

**Author:** ![daniMunthali](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danimunthali/32/758132_2.png) [@daniMunthali](https://discourse.mcneel.com/u/daniMunthali)\
**Post date:** [April 26, 2024, 7:12am UTC](https://discourse.mcneel.com/t/generation-of-a-space-truss-along-two-curves/180925/2 "2024-04-26T07:12:33Z")

</div>

Hi,

![divide points](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/2/d/82d202cb3b35549d67d5a759cf55e61c8b9666e7.png)

[Curved Space Truss rev1.gh](https://discourse.mcneel.com/uploads/short-url/uAqKXMAX8uzlS6sWagdzGoFJLTJ.gh) (44.6 KB)

To have your script repeated for each pair of points along the curves, you want to graft each of the points coming out of each divided curve.  
But usually flattening stuff in your script, undoes the effect of grafting going further upstream, so I undid where you flattened your points, and where necessary applied trim.

Regards

---

<div class="post-metadata">

**Author:** ![Islam\_Hashem](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/islam_hashem/32/549482_2.png) [@Islam\_Hashem](https://discourse.mcneel.com/u/Islam_Hashem)\
**Post date:** [April 26, 2024, 12:48pm UTC](https://discourse.mcneel.com/t/generation-of-a-space-truss-along-two-curves/180925/3 "2024-04-26T12:48:51Z")

</div>

Thanks Dani, this is amazing, thanks man!
