A rather complex GH script of a joint element behaving unexpectedly

Hi guys,

it’s a school project that my fellows and I’ve been developing for the past couple of weeks. It’s almost submission time and I need to animate variations of some joints which started behaving strangely after the script became complex.

This is the breakdown of the code:

  1. Essentialy, I have a surface in Rhino from which I’m extracting a curve
  2. The curve I shatter on both ends and I take the middle of 3 shattered curves as the curve I’ll be doing my script based off
  3. I am subdividing the curve into a couple of pieces (controlled by a slider)
  4. Making frames with center points taken from the start/end points of the subdivided curve
  5. Doing some filleting and intersection, so that I could make the joint look more aesthetically pleasing.

My goal is to be able to control some sliders without the code crashing:
1st slider - number of joints along the curve (curve subdivision slider)
2nd slider - shatter slider
3rd slider - fillet radia

Please find attached both my Grasshopper and Rhino files.joints and central spine.3dm (16.7 MB)
02.11.2018 - joints and central spine v3.gh (51.4 KB)

Many thanks in advance to whoever could help!