Thanks @Alien you can check the full graph that I needed this for here Grid subdivision from boundary of polygon