# Deconstruct Brep Edges

**URL:** <https://discourse.mcneel.com/t/deconstruct-brep-edges/145512>\
**Category:** Grasshopper\
**Tags:** windows, mac\
**Created:** [July 19, 2022, 9:23pm UTC](https://discourse.mcneel.com/t/deconstruct-brep-edges/145512 "2022-07-19T21:23:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rteuman](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/rteuman/32/639032_2.png) [@rteuman](https://discourse.mcneel.com/u/rteuman)\
**Post date:** [July 19, 2022, 9:23pm UTC](https://discourse.mcneel.com/t/deconstruct-brep-edges/145512/1 "2022-07-19T21:23:05Z")

</div>

Hello, I’m trying to divide a surface into equally long pieces, and then deconstruct that to get the same edge from each.

So when I do this with a single surface, I can easily get the edge I want, let’s say I want to get the vertical edge on the right:  
 ![script23](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/7/2/972cb05f070be3525ffb0766eb817a8e424b8c78.gif)

But when I split a longer surface into many pieces, deconstruct Brep edge doesn’t give me the same edge of each surface consistently, I would like to be able to get the same edge from each surface at once.

this is the issue:  
 ![script233](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/5/d/35de9af2012fa45f0d285978833bfa7cde75ad09.gif)

How can I consistently get the same edge from each of these surfaces? Thank you!

Renan

---

<div class="post-metadata">

**Author:** ![antoinemaes](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/antoinemaes/32/499716_2.png) [@antoinemaes](https://discourse.mcneel.com/u/antoinemaes)\
**Post date:** [July 20, 2022, 6:19am UTC](https://discourse.mcneel.com/t/deconstruct-brep-edges/145512/2 "2022-07-20T06:19:18Z")

</div>

Hey !

Could you send your file with internalized surface and curves?

I’m not sure if split surface is consistent, but why shouldn’t it be… (or maybe it’s behaving differently on the far left and right end of the surface, where it’s not splitting)

Either you’re sub surfaces have not the same normal orientation, or UV has been swapped…  
My guess is that the curves you’re using are not all in the same direction at first(?)

---

<div class="post-metadata">

**Author:** ![flixchameroy](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/flixchameroy/32/540973_2.png) [@flixchameroy](https://discourse.mcneel.com/u/flixchameroy)\
**Post date:** [July 20, 2022, 6:58am UTC](https://discourse.mcneel.com/t/deconstruct-brep-edges/145512/3 "2022-07-20T06:58:56Z")

</div>

Hi Renan, List item is indeed inconsistent. If you’re frequently changing your definition inputs, I’d recommend to select your brep edges using another logic. For example in your case you could measure each edge length, and select only the two biggest.

---

<div class="post-metadata">

**Author:** ![ErikBeeren](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/erikbeeren/32/693596_2.png) [@ErikBeeren](https://discourse.mcneel.com/u/ErikBeeren)\
**Post date:** [July 20, 2022, 9:23am UTC](https://discourse.mcneel.com/t/deconstruct-brep-edges/145512/4 "2022-07-20T09:23:01Z")

</div>

![edges](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/f/5/3f5dcc24b15728b92697627dee9418a3fa65f3b5.png)  
Two options one with pufferfish. [Pufferfish | Food4Rhino](https://www.food4rhino.com/en/app/pufferfish)

[decon edges.gh](https://discourse.mcneel.com/uploads/short-url/pLVcl0VJfRMZCsvzID8gn3VCZeX.gh) (9.9 KB)

---

<div class="post-metadata">

**Author:** ![rteuman](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/rteuman/32/639032_2.png) [@rteuman](https://discourse.mcneel.com/u/rteuman)\
**Post date:** [July 20, 2022, 3:19pm UTC](https://discourse.mcneel.com/t/deconstruct-brep-edges/145512/5 "2022-07-20T15:19:01Z")

</div>

Thank you for your replies Antoine, Felix and Erik! They are all very helpful. I’m going to share my script file here.  
[contour split.gh](https://discourse.mcneel.com/uploads/short-url/6XoPdJpTLSDWwhOX4rg2pbpoKjY.gh) (13.4 KB)

 ![screenshot](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/8/c/e8cd402de25c28490eeca3ae3dbbb9164b049787.jpeg)

I think you’re right Antoine, the curves I’m using are not all in the same direction, perhaps because of something happening when I contour the surface.

Erik, your method works for me, but I also need to divide the surface into a specific distance, that’s why I have been using contour. I think either I find another method of selecting the Brep edges as per Felix’ suggestion, or I can find another way to divide this larger surface into 2meter pieces. Any suggestions?

Thank you!

---

<div class="post-metadata">

**Author:** ![flokart](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/flokart/32/765122_2.png) [@flokart](https://discourse.mcneel.com/u/flokart)\
**Post date:** [July 20, 2022, 7:29pm UTC](https://discourse.mcneel.com/t/deconstruct-brep-edges/145512/6 "2022-07-20T19:29:26Z")

</div>

You could also sort your edges by distance to the first edge from the divided base surface.

---

<div class="post-metadata">

**Author:** ![flixchameroy](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/flixchameroy/32/540973_2.png) [@flixchameroy](https://discourse.mcneel.com/u/flixchameroy)\
**Post date:** [July 20, 2022, 7:45pm UTC](https://discourse.mcneel.com/t/deconstruct-brep-edges/145512/7 "2022-07-20T19:45:58Z")

</div>

Hi, here is a way to select brep biggest crv as a guide for your contouring. It still uses List Item component but in a predictable way.

 ![contour split](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/d/5/fd59dc884ebbe0747357b26d2781d72ec22ecd0b.png)  
[contour split.gh](https://discourse.mcneel.com/uploads/short-url/7owoXeNEX8HN5txGe8QtgBLkRS0.gh) (10.8 KB)

To keep a more consistent output, you could also compare the selected edge to a certain guide vector (X-axis here), and flip the curve if the curve is reversed :

 ![contour split-flip](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/2/6/c26fbce21f4f6d1fc70cf630c7d68edba3c7c3a7.png)  
[contour split-flip.gh](https://discourse.mcneel.com/uploads/short-url/jPVtecbofFsNHrA9gRYUjFUMfad.gh) (12.0 KB)

Once you’re happy with the consistency of your edge selection, and you find it flexible enough, you can place it inside a cluster to keep an easy reading definition.

 ![contour split-flip-cluster](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/7/e/67e561c922d3e42134415e8651b147529642bfeb.png)  
[contour split-flip-cluster.gh](https://discourse.mcneel.com/uploads/short-url/hs8qkcmsrlvx81IZFAEfhWRV3A0.gh) (13.7 KB)

PS : Try to internalize your geometries before sharing a GH script, it makes it easier to help.

---

<div class="post-metadata">

**Author:** ![rteuman](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/rteuman/32/639032_2.png) [@rteuman](https://discourse.mcneel.com/u/rteuman)\
**Post date:** [July 20, 2022, 9:27pm UTC](https://discourse.mcneel.com/t/deconstruct-brep-edges/145512/8 "2022-07-20T21:27:28Z")

</div>

Thank you all!
