# Shattering / Exploding a Curve Based on Angles?

**URL:** <https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [September 13, 2026, 5:59am UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660 "2026-09-13T05:59:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kayne\_Li](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kayne_li/32/759834_2.png) [@Kayne\_Li](https://discourse.mcneel.com/u/Kayne_Li)\
**Post date:** [September 13, 2026, 5:59am UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/1 "2026-09-13T05:59:15Z")

</div>

I have closed planar polyline curves, some with sharp angles and i want them to be sorted or shattered based on the relative angles for example, anything greater than 200 degrees or less than 160, any ideas or solutions for grasshopper?  
(Also, i am fully aware there are at least 3 different ways that are probably quicker and achieve the same result in rhino and grasshopper but im curious if there is a way to do it using this specific method of finding relative angles)

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

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

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/f/e/4fe32644430f479eaa780b2dc78797a784762467.png)

[Shatter Angle.gh](https://discourse.mcneel.com/uploads/short-url/gOAcA5xitSAQqrXMk5RrLVdsOru.gh) (1.4 MB)

---

<div class="post-metadata">

**Author:** ![dk2079](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dk2079/32/771628_2.png) [@dk2079](https://discourse.mcneel.com/u/dk2079)\
**Post date:** [September 13, 2026, 8:26am UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/2 "2026-09-13T08:26:10Z")

</div>

it’s Sunday morning.. 😅 there is probably a simpler way, but this should work:

my path management requires you to switch between evaluating a single or multiple curves, so make sure to use the boolean toggle at the stream filter accordingly.

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

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/4/3/8435eb299d6aacf0e3e43d3e74dae3be8f29bfe0.png)

[Shatter Angle\_dk.gh](https://discourse.mcneel.com/uploads/short-url/6F5NPBpsjzz4yFfivsTJR4VXA3I.gh) (1.4 MB)

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [September 13, 2026, 8:35am UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/3 "2026-09-13T08:35:09Z")

</div>

> [@dk2079](#):
>
> simpler way

Kangaroo has a component to extract mesh corners…

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/0/8/f/08f5e98b9afe38d526655d2a8aa16e254526f3a4.png)

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

---

<div class="post-metadata">

**Author:** ![dk2079](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dk2079/32/771628_2.png) [@dk2079](https://discourse.mcneel.com/u/dk2079)\
**Post date:** [September 13, 2026, 8:44am UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/4 "2026-09-13T08:44:55Z")

</div>

I knew this component should exist somewhere.  
well, I can at least say I didn’t use any plugins 😉

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [September 13, 2026, 10:07am UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/6 "2026-09-13T10:07:48Z")

</div>

Here’s another approach:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/7/5/6757999e4207b69ebd96354505f1556bf84b6fdb.png)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/2/5/6/256fe7ff410083331c432c987d4e654dff8664b0.png)

[Shatter box.gh](https://discourse.mcneel.com/uploads/short-url/ymM3pkencEb8aRW9G3dGgVrloz7.gh) (1.4 MB)

It would be interesting to know how the curves were created as this might allow better solutions…

---

<div class="post-metadata">

**Author:** ![Volker\_Rakow](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/volker_rakow/32/770451_2.png) [@Volker\_Rakow](https://discourse.mcneel.com/u/Volker_Rakow)\
**Post date:** [September 13, 2026, 12:50pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/7 "2026-09-13T12:50:08Z")

</div>

@martinsiegrist @Kayne_Li I mean, if we are going to go the Kangaroo route, there is SplitAtCorners one panel over in `Utilites` that splits a polyline at vertices that have an interior angle below a threshold value.

 ![Screenshot 2026-09-13 164439](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/6/9/169512ce47bda967b7d057a18c627e5983f0c1bd.png)

* * *

None of these option do what the OP requested, which is to split a polygon based on a domain of _exterior_ angles, but this might be more a case of “do as a mean” than “do as I say.”

---

<div class="post-metadata">

**Author:** ![Kayne\_Li](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kayne_li/32/759834_2.png) [@Kayne\_Li](https://discourse.mcneel.com/u/Kayne_Li)\
**Post date:** [September 13, 2026, 2:11pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/8 "2026-09-13T14:11:26Z")

</div>

Contouring a heavily subdivided mesh, which created really short segments

---

<div class="post-metadata">

**Author:** ![Kayne\_Li](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kayne_li/32/759834_2.png) [@Kayne\_Li](https://discourse.mcneel.com/u/Kayne_Li)\
**Post date:** [September 13, 2026, 2:11pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/9 "2026-09-13T14:11:52Z")

</div>

Martin you are my personal goat 🙏

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [September 13, 2026, 3:40pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/10 "2026-09-13T15:40:59Z")

</div>

Even better!

---

<div class="post-metadata">

**Author:** ![Volker\_Rakow](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/volker_rakow/32/770451_2.png) [@Volker\_Rakow](https://discourse.mcneel.com/u/Volker_Rakow)\
**Post date:** [September 13, 2026, 4:25pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/11 "2026-09-13T16:25:06Z")

</div>

> [@dk2079](#):
>
> ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/0/7/a07e8e6118be5e2d3e56402582e130b9d7806a4f.png)

Using Angle, you’re going to be measuring the the smaller or larger of the two angles which may or may not be the exterior angle of the closed polyline. You will have have to switch between the outputs `A` and `R` depending on whether the corner is concave or convex, which you can do using any of the multitude of methods explored [here](https://discourse.mcneel.com/t/select-outer-corners-using-grasshopper/212835). (You might have seen this link already. I deleted my previous post because I was unsure of myself.)

You could also Evaluate Curve and apply a threshold to the incoming/outgoing angle it gives. I would remap curve domain to the vertice count, so that evaluating the curve becomes easy; just the whole number parameters of the curve. Remapping domain also makes shattering easy. Evaluate your mask against bool “true” with Member Index and the indices are your shatter params.

* * *

Less talk, more do. This is what that would look like:

 ![high res test](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/a/6/ea6b06794cdced03631546ffdc64b96eb240af33.png)  
[Shatter Angle VR 1.gh](https://discourse.mcneel.com/uploads/short-url/5XeAqcqBIYycVU2Vza6ojqvogi0.gh) (35.2 KB)

Remapping the domain wasn’t enough. You need to rebuild from the vertices. I imagine this is exactly what SplitAtCorners is, only here you can dig into the conditional and do things like target domains with closed or open bounds.

 ![high res test](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/6/2/6623d9e8241e213ff6db331c1967bbc7856965de.png)

---

<div class="post-metadata">

**Author:** ![Kayne\_Li](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kayne_li/32/759834_2.png) [@Kayne\_Li](https://discourse.mcneel.com/u/Kayne_Li)\
**Post date:** [September 14, 2026, 5:03am UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/12 "2026-09-14T05:03:59Z")

</div>

Thank you Volker, this is very in depth, I didnt know evaluate curve had that feature

---

<div class="post-metadata">

**Author:** ![Fabio\_Franchetti](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/fabio_franchetti/32/773331_2.png) [@Fabio\_Franchetti](https://discourse.mcneel.com/u/Fabio_Franchetti)\
**Post date:** [September 14, 2026, 9:28am UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/13 "2026-09-14T09:28:55Z")

</div>

> [@Volker\_Rakow](#):
>
> Using Angle, you’re going to be measuring the the smaller or larger of the two angles which may or may not be the exterior angle of the closed polyline. You will have have to switch between the outputs `A` and `R` depending on whether the corner is concave or convex

Hello,  
a small integration (I’m working in Rhino7, I don’t know if in Rhino8 it works differently. in that case sorry and please let me know): after exploding the curve and making pairs of consecutives segments, `Angle` result depends on the plane input:

- if you don’t specify any input plane, it always measure the smalller angel between the vectors (blue)
- if you specify a plane, it measure the angle of the vectors projected on plane, from the first vector to the second, going counterclockwise on the plane (yellow, with XY plane in this example)

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

your script acts like using `Angle` without a plane: if you check closely you are still measuring the smallest angle without relationship with being concave or convex.

To correctly measure the internal angle of the polyline, you need to check the polyline orientation, provide the correct plane in `Angle` component, and play with the vectors (in the example below, polyline is counterclockwise in XY, plane is XY and angle is between (i+1) and reverse(i) )

[Shatter Angle.gh](https://discourse.mcneel.com/uploads/short-url/3f8SeF2IGlC6wsA57HNAD3S80nt.gh) (34.6 KB)

---

<div class="post-metadata">

**Author:** ![Volker\_Rakow](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/volker_rakow/32/770451_2.png) [@Volker\_Rakow](https://discourse.mcneel.com/u/Volker_Rakow)\
**Post date:** [September 14, 2026, 12:21pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/14 "2026-09-14T12:21:47Z")

</div>

No, that’s not… I am a little confused whether you addressing @dk2079 or me, because I do not use Angle in my script at all.

The behavior you describe is correct, so as @dk2079 has used Angle (without a plane) it will measure the smaller and larger angles with the outputs `A` and `R` respectively. Evaluate Curve, however, does not find either the smallest/largest angle or the angle in the counter-clockwise direction of the plane. It measures the delta vector at a parameter, meaning the difference of the incoming and outgoing vectors as a positive value. That value can be left or right handed, and it can be smaller than or larger than 180 degrees.

That discrepancy is outlined [here](https://discourse.mcneel.com/t/select-outer-corners-using-grasshopper/212835/16) (Evaluate Curve is placed on the wrong side of the image as I was drawing over an existing one). The difference between Angle andEvaluate Curve is what uniquely positions Angle to ascertain convex / concave corners unlike Evaluate Curve.

The delta vector angle that Evaluate Curve uses seems to be the exact angle that is SplitAtCorners uses for thresholding. At least in testing SplitAtCorners against my script, I got the same results. It is also the more useful angle measurement here as it measures how much “turn” there is in the corner, regardless of direction.

* * *

Edit upon edit upon edit. What is wrong with me today?

---

<div class="post-metadata">

**Author:** ![Fabio\_Franchetti](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/fabio_franchetti/32/773331_2.png) [@Fabio\_Franchetti](https://discourse.mcneel.com/u/Fabio_Franchetti)\
**Post date:** [September 14, 2026, 1:02pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/15 "2026-09-14T13:02:44Z")

</div>

I’m addressing both  
`Evaluate Curve` from @Volker_Rakow’s script measure the angle the same way it’s defined with `Angle` (without plane input and taking A output) from @dk2079’s script: the smallest angle between incoming and outcoming vectors, always smaller than 180 degrees

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [September 14, 2026, 1:12pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/16 "2026-09-14T13:12:41Z")

</div>

> [@Volker\_Rakow](#):
>
> What is wrong with me today?

Bored at work?

---

<div class="post-metadata">

**Author:** ![Volker\_Rakow](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/volker_rakow/32/770451_2.png) [@Volker\_Rakow](https://discourse.mcneel.com/u/Volker_Rakow)\
**Post date:** [September 14, 2026, 1:13pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/17 "2026-09-14T13:13:31Z")

</div>

> [@martinsiegrist](#):
>
> Bored at work?

There’s an assumption there that doesn’t work.

---

<div class="post-metadata">

**Author:** ![Volker\_Rakow](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/volker_rakow/32/770451_2.png) [@Volker\_Rakow](https://discourse.mcneel.com/u/Volker_Rakow)\
**Post date:** [September 14, 2026, 1:21pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/18 "2026-09-14T13:21:37Z")

</div>

> [@Fabio\_Franchetti](#):
>
> `Evaluate Curve` from @Volker_Rakow’s script measure the angle the same way it’s defined with `Angle` (without plane input and taking A output) from @dk2079’s script: the smallest angle between incoming and outcoming vectors, always smaller than 180 degrees

Yes. You are right! I guess I misunderstood the point. AND I was wrong about Evaluate Curve being able to measure angles larger than 180 degrees.

---

<div class="post-metadata">

**Author:** ![dk2079](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dk2079/32/771628_2.png) [@dk2079](https://discourse.mcneel.com/u/dk2079)\
**Post date:** [September 14, 2026, 1:41pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/19 "2026-09-14T13:41:45Z")

</div>

Hi everyone!

thanks for all the scrutiny here.

It’s true, I did not realize that the apparent task at hand was to only get the outside counterclockwise angles.

So what is needed are basically signed angles.  
And it is true that it is possible to get that from `ANGLE` with plane. thanks @Fabio_Franchetti

Still resisting the plugIn temptation (froGH has a signed angle component) I looked at how to calculate this vanilla. (not realizing providing a plane works too)

It is a little series of vector calculations (green blob) and the the signed angles still need to be formatted into 0\<360 (pink blob)

and the it is easy to establish whatever logic to filter some domain of angles.

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

the cleaner version with `ANGLE` and plane looks like this:

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

some ideas about making the whole thing ledgible:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/c/b/7cb727408a6f4568b8191e4b72390b066ac74470.png)

both versions are in this file:  
[shatterAngle\_dk.gh](https://discourse.mcneel.com/uploads/short-url/zS6dhKQ2Nv6BOzs8OmBJhmz1xcf.gh) (2.7 MB)

ps. @Volker_Rakow I haven’t really had time to look into the new version you posted, hope to wrap my head around it later

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [September 14, 2026, 1:43pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/20 "2026-09-14T13:43:22Z")

</div>

How did you create the curves?

---

<div class="post-metadata">

**Author:** ![dk2079](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dk2079/32/771628_2.png) [@dk2079](https://discourse.mcneel.com/u/dk2079)\
**Post date:** [September 14, 2026, 1:46pm UTC](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660/21 "2026-09-14T13:46:14Z")

</div>

what do you mean exactly? 🤔

I shattered the curves at the angle domains and assigned them a colour gradient in relation to their length, so going counter clockwise (forgot to mention we need to align all closed input curves with giude curve to counter clockwise) you find the annotation dot and then the segment in the same colour.

(if we would flip the curve clockwise we get interor angles..)

[Next page](https://discourse.mcneel.com/t/shattering-exploding-a-curve-based-on-angles/222660.md?page=2)
