Finding Corner points

Maybe something like this?

import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino

crvID=rs.GetObject("Select a polycurve",4,True)
if crvID:
    pc=rs.coercecurve(crvID)
    
    #find discontinuities
    dom=pc.Domain
    cornerParams=[]
    t=dom[0]
    cont=Rhino.Geometry.Continuity.C2_locus_continuous
    while True:
        rc,t=pc.GetNextDiscontinuity(cont,t,dom[1])
        if not rc: break
        cornerParams.append(t)
    
    #add points to see
    for t in cornerParams:
        sc.doc.Objects.AddPoint(pc.PointAt(t))
    sc.doc.Views.Redraw()
1 Like