# Rotation Array and Edge Capture

**URL:** <https://discourse.mcneel.com/t/rotation-array-and-edge-capture/80756>\
**Category:** Grasshopper\
**Created:** [March 22, 2019, 9:26pm UTC](https://discourse.mcneel.com/t/rotation-array-and-edge-capture/80756 "2019-03-22T21:26:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasongberger](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jasongberger/32/603365_2.png) [@jasongberger](https://discourse.mcneel.com/u/jasongberger)\
**Post date:** [March 22, 2019, 9:26pm UTC](https://discourse.mcneel.com/t/rotation-array-and-edge-capture/80756/1 "2019-03-22T21:26:55Z")

</div>

Hi all, fairly new to GH and enjoying the logical aspect to it. But I am stumped on this one aspect of a project that I could use your super-brains for:

[Rotation and Edge Capture.3dm](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/8/2/82567dfd587177b50f766d4bbee216ec7a98d2be.3dm) (35.8 KB)  
[Rotation and Edge Capture.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/e/7/e760053786b88cc0487a7dd2dbdec481c120cb02.gh) (14.9 KB)

I am rotating a planar, closed curve 180 degrees in an array both ways along a Nurbs curve, as you can see from my GH file. I want to build a loft along the boundary edges of the rotated curves, but first I need to extract those curves.

I’ve attempted it using two methods, both failed. In the first I made a surface for each closed curve and made a solid union between the two. The output is very strange; it looks like one surface is layered on top of the other. The bottom surface seems to be absorbed by the top, losing its boundary edges, while the top surface retains them.

The second method with the more confusing output, was to create a Region Union to combine the two sets of rotated curves. Unfortunately, it looks like all of the curves along the array somehow got into the mix. Is this a branching issue? I don’t have any experience troubleshooting branching problems.

Looking forward to your feedback!  
-Jason

---

<div class="post-metadata">

**Author:** ![lando.schumpich](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/lando.schumpich/32/636282_2.png) [@lando.schumpich](https://discourse.mcneel.com/u/lando.schumpich)\
**Post date:** [March 22, 2019, 10:22pm UTC](https://discourse.mcneel.com/t/rotation-array-and-edge-capture/80756/2 "2019-03-22T22:22:08Z")

</div>

hey @jasongberger,

I took a quick look at your definition, as you figured out, region union is the most fitting way to combine planar curves, in your definition i used the “weave” component, to weave the data streams together so they match up for region union.

[Rotation and Edge Capture.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/2/6/267064be5b9842ca940a14cd8f88c2b32dfa797f.gh) (19.0 KB)

 ![image](https://global.discourse-cdn.com/mcneel/original/3X/9/3/93ff7fed800882fe06c60b9f975639ba19c68f0e.jpeg)

---

<div class="post-metadata">

**Author:** ![jasongberger](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jasongberger/32/603365_2.png) [@jasongberger](https://discourse.mcneel.com/u/jasongberger)\
**Post date:** [March 22, 2019, 11:39pm UTC](https://discourse.mcneel.com/t/rotation-array-and-edge-capture/80756/3 "2019-03-22T23:39:56Z")

</div>

Wow, thank you Lando! It looks like it took a combination of the two methods to work. For the other method, I never would have thought to use the weave component on my own.

I just wish I could understand how my original first method gave me that strange result.

---

<div class="post-metadata">

**Author:** ![jasongberger](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jasongberger/32/603365_2.png) [@jasongberger](https://discourse.mcneel.com/u/jasongberger)\
**Post date:** [March 23, 2019, 1:54am UTC](https://discourse.mcneel.com/t/rotation-array-and-edge-capture/80756/4 "2019-03-23T01:54:25Z")

</div>

[Rotation and Edge Capture-2nd Step.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/3/5/3567c3a86427a6709acb61edbc8d90163de6be4a.gh) (22.6 KB)

Okay, now I have another question. Say I wanted to draw a curve that follows the shape as it rotates. I know that I can get the new curve points from a curve division of my arrayed curves and use an item index to connect the correct vertices.

How do I streamline it so I don’t have to create more components for a new index and interpolate curve? I tried using the construct a domain component, but I don’t think I’m using it correctly.

The instructionals I found online all introduce list-item and how to select one index, but I want to know how to group the indexes (indices?) and then use those groups to create separate curves.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/3/d/3dd4533429b7ec0ce8e88b58c9f41aaef49a981c.png)

---

<div class="post-metadata">

**Author:** ![lando.schumpich](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/lando.schumpich/32/636282_2.png) [@lando.schumpich](https://discourse.mcneel.com/u/lando.schumpich)\
**Post date:** [March 23, 2019, 9:50am UTC](https://discourse.mcneel.com/t/rotation-array-and-edge-capture/80756/5 "2019-03-23T09:50:54Z")

</div>

Something like this?

 ![image](https://global.discourse-cdn.com/mcneel/original/3X/5/b/5bc83bd4439c9f16fef634da8e628376999900a7.png)

Also its a good idea to have a filter in place because on some rotations your union can have small “inner pockets”

![image](https://global.discourse-cdn.com/mcneel/original/3X/1/f/1f83584b3751f4c65086e345bf8bc3e56572995b.png)

Thats what the sort list and list item stuff in the group does.  
For you particular case, “flip matrix” is the way to go, as it changes your datatree of points from spanning along each individual divided curve, to spanning over all division points of a given index.

[Rotation and Edge Capture-2nd Step.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/8/6/86ebf8bc2bf0a78ecaaffd03cf7ad89f0a129b4c.gh) (18.8 KB)

Generally, if you want to learn more about data handling in grasshopper, this video series by the developer of grasshopper gives really nice explanations to datatrees:

> **[Data Trees Masterclass with David Rutten](https://vimeo.com/channels/datatreegh)**
>
> Spend an some time with the creator of Grasshopper, David Rutten, to learn one of the key concepts of Grasshopper, data trees. This series covers what data trees…
