Finding Corner points

Hi, Greetings
I wanted to find corner points, in the given cad profile

The places where the corner points should be found is marked in red color. Is there any function in Python that can find the corner or if not, what approach can we take to find corners especially in the curve places like shown below

I have attached the cad file below for reference

Thanks in Advance :slight_smile:
find_corner_points.stp (9.9 KB)

Just open up grasshopper and use the curve discontinuity component, set L to C2(curvature).

Hi, Thank you, but can you provide solution in python ?

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

Hi, Thank you