Shattering / Exploding a Curve Based on Angles?

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)

Shatter Angle.gh (1.4 MB)

it’s Sunday morning.. :sweat_smile: 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.

Shatter Angle_dk.gh (1.4 MB)

Kangaroo has a component to extract mesh corners…

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

(post deleted by author)

Here’s another approach:

Shatter box.gh (1.4 MB)

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

@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.


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.”

Contouring a heavily subdivided mesh, which created really short segments

Martin you are my personal goat :folded_hands:

Even better!

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. (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:


Shatter Angle VR 1.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.