tangent vector and flat curvature

examine the adjacent points’ tangent vector value to detect the “flat” part of the curve.  Then build metaball around them. download gh file: tangent