# SplitAtCorners seems to be on strike

**URL:** <https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248>\
**Category:** Kangaroo\
**Created:** [February 11, 2020, 8:00am UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248 "2020-02-11T08:00:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![osuire](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/osuire/32/656689_2.png) [@osuire](https://discourse.mcneel.com/u/osuire)\
**Post date:** [February 11, 2020, 8:00am UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/1 "2020-02-11T08:00:36Z")

</div>

Hi @DanielPiker , the “SplitAtCorners” is one of those super-useful utilities that I would love to see become more robust.

Here, it just won’t do anything :  
[SpliAtCorners on strike.gh](https://discourse.mcneel.com/uploads/short-url/JnnzSOObKj1Zhnsewo4BpSnCfL.gh) (13.2 KB)

Any idea why ?

---

<div class="post-metadata">

**Author:** ![marteen.petrov](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/marteen.petrov/32/487439_2.png) [@marteen.petrov](https://discourse.mcneel.com/u/marteen.petrov)\
**Post date:** [February 11, 2020, 8:24am UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/2 "2020-02-11T08:24:12Z")

</div>

Hi  
Shouldn’t it be a polyline?

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/5/0/50ca024ee7edf6730285c35a69800758391a6a8f.png)

---

<div class="post-metadata">

**Author:** ![anon39580149](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@anon39580149](https://discourse.mcneel.com/u/anon39580149)\
**Post date:** [February 11, 2020, 8:24am UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/3 "2020-02-11T08:24:19Z")

</div>

It is not a Polyline, two segments are not linear

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

---

<div class="post-metadata">

**Author:** ![osuire](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/osuire/32/656689_2.png) [@osuire](https://discourse.mcneel.com/u/osuire)\
**Post date:** [February 11, 2020, 8:24am UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/4 "2020-02-11T08:24:21Z")

</div>

OK, I get it : I see that some of the segments of my polyline are not lines, thus it’s in fact a poly- **curve**.  
So this is the opportunity to let out a mini-rant about the many curve types GH distinguishes, yet the little means of filtering and sorting we have apart from the text description in the panel :

 ![Curve types galore](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/a/1/a1bf15f4ed764b775b4030289e5d450e8c59d7dd.jpeg)

To me, there should be a more rigorous classification :  
PLANARITY : Planar / Non-Planar  
COMPOSITION : Single / Poly  
TYPOLOGY : Lines / Curves / Mixed  
PERIODICITY : Periodic / Non-periodic  
TERMINATION : Closed / Open

The text description of a curve should comprise all of it’s above characteristic, which would be more useful in the end.

@DavidRutten ? Wouldn’t that be a nice feature in GH2 ?  
As a math stickler, you should be seduced by this idea 😉  
Something similar could be said about surfaces, BTW.

---

<div class="post-metadata">

**Author:** ![osuire](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/osuire/32/656689_2.png) [@osuire](https://discourse.mcneel.com/u/osuire)\
**Post date:** [February 11, 2020, 8:29am UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/5 "2020-02-11T08:29:13Z")

</div>

> [@anon39580149](#):
>
> It is not a Polyline, two segments are not linear

> [@marteen.petrov](#):
>
> Shouldn’t it be a polyline?

You were faster than me 🙂  
Yet, don’t you think that @DanielPiker could make this component even more useful by allowing polycurves ? After all, the angle at corners is also defined with “curved” curves.

---

<div class="post-metadata">

**Author:** ![anon39580149](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@anon39580149](https://discourse.mcneel.com/u/anon39580149)\
**Post date:** [February 11, 2020, 8:41am UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/6 "2020-02-11T08:41:29Z")

</div>

I always use Mesh corners

---

<div class="post-metadata">

**Author:** ![osuire](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/osuire/32/656689_2.png) [@osuire](https://discourse.mcneel.com/u/osuire)\
**Post date:** [February 11, 2020, 8:52am UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/7 "2020-02-11T08:52:13Z")

</div>

An example of ambiguity with curve types is the “Polyline Through points” command in Rhino.  
It allows to set the degree of the resulting curve (which in the case of deg=3 becomes a single curve, and not a “Poly-Curve” !), thus contradicting the very name of the command…

---

<div class="post-metadata">

**Author:** ![DanielPiker](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielpiker/32/666337_2.png) [@DanielPiker](https://discourse.mcneel.com/u/DanielPiker)\
**Post date:** [February 11, 2020, 1:58pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/8 "2020-02-11T13:58:34Z")

</div>

I originally wrote this just for accessing sides of meshes to assign different strengths to individual boundary cables, and there the input would always be a polyline.  
I agree though that it could be useful to have something more general, so here’s a new scripted component that also works with polycurves.  
Apart from accepting polycurves it is the same as the polyline one - it takes an angle threshold above which to split, and outputs a list of corners and segments.  
[curve\_splitter.gh](https://discourse.mcneel.com/uploads/short-url/bWFZGpv9WSYLr9X7yKS3WBFNIZi.gh) (6.1 KB)  
(I can add this as a standard component to the next release)

---

<div class="post-metadata">

**Author:** ![osuire](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/osuire/32/656689_2.png) [@osuire](https://discourse.mcneel.com/u/osuire)\
**Post date:** [February 11, 2020, 2:10pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/9 "2020-02-11T14:10:18Z")

</div>

Super !  
Thank-you Daniel.  
Apparently, there’s something it doesn’t like about that curve though :  
[curve\_splitter bug.gh](https://discourse.mcneel.com/uploads/short-url/tCnReH7gb5CR5ssLREgdA16fXnx.gh) (8.3 KB)

 ![Missing corners](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/8/5/85904c09bfe5dac39abdc212a2bd8d40093dac9c.jpeg)

---

<div class="post-metadata">

**Author:** ![DanielPiker](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielpiker/32/666337_2.png) [@DanielPiker](https://discourse.mcneel.com/u/DanielPiker)\
**Post date:** [February 11, 2020, 2:23pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/10 "2020-02-11T14:23:15Z")

</div>

That’s bizarre. Here’s what I get when opening your file and setting the angle threshold to 6 degrees. All the kinks are properly shown. Which version of Rhino are you testing in?

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

---

<div class="post-metadata">

**Author:** ![osuire](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/osuire/32/656689_2.png) [@osuire](https://discourse.mcneel.com/u/osuire)\
**Post date:** [February 11, 2020, 2:24pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/11 "2020-02-11T14:24:36Z")

</div>

Rhino 6 SR23 2020-1-31

[https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/b/b/bbdd5d07a7b4c1862e6ec738473f44a4d6b516eb.mp4](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/b/b/bbdd5d07a7b4c1862e6ec738473f44a4d6b516eb.mp4)

---

<div class="post-metadata">

**Author:** ![DanielPiker](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielpiker/32/666337_2.png) [@DanielPiker](https://discourse.mcneel.com/u/DanielPiker)\
**Post date:** [February 11, 2020, 2:26pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/12 "2020-02-11T14:26:43Z")

</div>

Is it perhaps finding all 17 kink points and just not displaying them?

---

<div class="post-metadata">

**Author:** ![osuire](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/osuire/32/656689_2.png) [@osuire](https://discourse.mcneel.com/u/osuire)\
**Post date:** [February 11, 2020, 2:28pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/13 "2020-02-11T14:28:22Z")

</div>

Nope, it finds only 8  
My file is in millimeters BTW.

---

<div class="post-metadata">

**Author:** ![Petras\_Vestartas](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/petras_vestartas/32/480531_2.png) [@Petras\_Vestartas](https://discourse.mcneel.com/u/Petras_Vestartas)\
**Post date:** [February 11, 2020, 2:29pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/14 "2020-02-11T14:29:40Z")

</div>

Works for me too 😉

---

<div class="post-metadata">

**Author:** ![osuire](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/osuire/32/656689_2.png) [@osuire](https://discourse.mcneel.com/u/osuire)\
**Post date:** [February 11, 2020, 2:36pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/15 "2020-02-11T14:36:41Z")

</div>

DUh… my Angle Tolerance was set to 1°  
I’ve set it to 0.1°, and now it works.

---

<div class="post-metadata">

**Author:** ![osuire](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/osuire/32/656689_2.png) [@osuire](https://discourse.mcneel.com/u/osuire)\
**Post date:** [August 2, 2024, 4:12pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/16 "2024-08-02T16:12:03Z")

</div>

SplitAtCorners seems to have gone REALLY nuts this time.

[240802\_PROG\_SplitAtCorners gone nuts.gh](https://discourse.mcneel.com/uploads/short-url/lpD0QCD3sgw9CpE5z30aPJH31RE.gh) (8.6 KB)

 ![240802_PROG_SplitAtCorners gone nuts](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/6/a/36a75ca5c16d53452885dabfd707698807b78c53.jpeg)

It generates a bunch of invalid Curves, and closes the polylines for no reason.  
Is there a robust alternative somewhere ? I rely on this for many things.

---

<div class="post-metadata">

**Author:** ![DanielPiker](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielpiker/32/666337_2.png) [@DanielPiker](https://discourse.mcneel.com/u/DanielPiker)\
**Post date:** [August 2, 2024, 5:02pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/17 "2024-08-02T17:02:48Z")

</div>

Did it ever work on open polylines?  
I don’t think I’ve touched the code in that component in over 12 years, so I guess the bug has been there all this time.

Anyway, I think this works now:  
[splitatcorners\_fix.gh](https://discourse.mcneel.com/uploads/short-url/4DI7FAmmkAovpxnpgwQ0zOjePrc.gh) (19.3 KB)  
(it was just missing a “+1” for the case when the curve is open)

---

<div class="post-metadata">

**Author:** ![osuire](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/osuire/32/656689_2.png) [@osuire](https://discourse.mcneel.com/u/osuire)\
**Post date:** [August 2, 2024, 5:07pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/18 "2024-08-02T17:07:53Z")

</div>

> [@DanielPiker](#):
>
> Did it ever work on open polylines?

Now that you mention it…  
But why shouldn’t it ?

> [@DanielPiker](#):
>
> Anyway, I think this works now:

Indeed ! Please push this in the nexr Rhino release

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [August 2, 2024, 5:42pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/19 "2024-08-02T17:42:36Z")

</div>

> [@DanielPiker](#):
>
> Did it ever work on open polylines?

Indeed, and why does the ‘S’ output appear to close them?

---

<div class="post-metadata">

**Author:** ![DanielPiker](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielpiker/32/666337_2.png) [@DanielPiker](https://discourse.mcneel.com/u/DanielPiker)\
**Post date:** [August 2, 2024, 5:46pm UTC](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248/20 "2024-08-02T17:46:12Z")

</div>

Clearly the component is not working, but the script I shared just above is the fix.  
I’ll push the component with this into the next release.

[Next page](https://discourse.mcneel.com/t/splitatcorners-seems-to-be-on-strike/96248.md?page=2)
