# Flip matrix grasshopper

**URL:** <https://discourse.mcneel.com/t/flip-matrix-grasshopper/210950>\
**Category:** Grasshopper\
**Tags:** windows, flip-matrix\
**Created:** [October 14, 2025, 2:44pm UTC](https://discourse.mcneel.com/t/flip-matrix-grasshopper/210950 "2025-10-14T14:44:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alessandro\_Barbisan](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alessandro_barbisan/32/764771_2.png) [@Alessandro\_Barbisan](https://discourse.mcneel.com/u/Alessandro_Barbisan)\
**Post date:** [October 14, 2025, 2:44pm UTC](https://discourse.mcneel.com/t/flip-matrix-grasshopper/210950/1 "2025-10-14T14:44:31Z")

</div>

Hello guys, maybe it’s simpler than I think, but I can’t manage to perform a flip matrix separately within each branch of my tree shown in the figure. Each branch is a separate surface. Can anyone help me?

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/c/d/9cddab0d0804c3dda57aa6ce85de78e5229315e0.png)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/0/4/b/04b798cffe47c54c76e460c94b6c576e74cb5512.jpeg)

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [October 14, 2025, 3:11pm UTC](https://discourse.mcneel.com/t/flip-matrix-grasshopper/210950/2 "2025-10-14T15:11:36Z")

</div>

I think I’d try with the path mapper.

---

<div class="post-metadata">

**Author:** ![Alessandro\_Barbisan](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alessandro_barbisan/32/764771_2.png) [@Alessandro\_Barbisan](https://discourse.mcneel.com/u/Alessandro_Barbisan)\
**Post date:** [October 14, 2025, 3:14pm UTC](https://discourse.mcneel.com/t/flip-matrix-grasshopper/210950/3 "2025-10-14T15:14:02Z")

</div>

@martinsiegrist Yeah, I was working on it, but I can’t find the correct syntax for the mapper

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [October 14, 2025, 3:15pm UTC](https://discourse.mcneel.com/t/flip-matrix-grasshopper/210950/4 "2025-10-14T15:15:15Z")

</div>

Please share I Grasshopper definition

---

<div class="post-metadata">

**Author:** ![Alessandro\_Barbisan](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alessandro_barbisan/32/764771_2.png) [@Alessandro\_Barbisan](https://discourse.mcneel.com/u/Alessandro_Barbisan)\
**Post date:** [October 14, 2025, 3:22pm UTC](https://discourse.mcneel.com/t/flip-matrix-grasshopper/210950/5 "2025-10-14T15:22:44Z")

</div>

@martinsiegrist i found the solution:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/a/0/ca0edabceb8560e6e1412e4759f26bcc4b534180.png)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/c/a/4ca8fac337cf5f9186b6de36d924eea67c56425d.jpeg)

---

<div class="post-metadata">

**Author:** ![Ali\_Najmaei](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ali_najmaei/32/636031_2.png) [@Ali\_Najmaei](https://discourse.mcneel.com/u/Ali_Najmaei)\
**Post date:** [October 14, 2025, 8:45pm UTC](https://discourse.mcneel.com/t/flip-matrix-grasshopper/210950/6 "2025-10-14T20:45:33Z")

</div>

This solution doesn’t seems to be true as long as you have overlapped branches in your data tree .  
This only works as long as you don’t add a component which complex your tree .  
You have to `Simplify` and use this in path mapper instead : `{A;B}(i) --------->{A;i}(B)` so it works in all cases .

---

<div class="post-metadata">

**Author:** ![Volker\_Rakow](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/volker_rakow/32/758767_2.png) [@Volker\_Rakow](https://discourse.mcneel.com/u/Volker_Rakow)\
**Post date:** [October 14, 2025, 10:31pm UTC](https://discourse.mcneel.com/t/flip-matrix-grasshopper/210950/7 "2025-10-14T22:31:09Z")

</div>

And even then:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/a/1/9a17f2d439d7a2928c52200d7ab4dd35802f8b26.png)

you will only be able to flip matrix as a _generalization_ (i.e. when you don’t know the structure of the branch labels) if you reduce to path indices.

---

<div class="post-metadata">

**Author:** ![Alessandro\_Barbisan](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alessandro_barbisan/32/764771_2.png) [@Alessandro\_Barbisan](https://discourse.mcneel.com/u/Alessandro_Barbisan)\
**Post date:** [October 15, 2025, 9:22am UTC](https://discourse.mcneel.com/t/flip-matrix-grasshopper/210950/8 "2025-10-15T09:22:05Z")

</div>

I’ve followed your suggestion, and everything works perfectly. Thank you!
