hello
i made a similar grasshopper populate command in C#
i hope its help to you
you can using this class easily
PopulateGeometry .cs (2.8 KB)
sample code
var popPoints = new PopulateGeometry(myGeometry).populatePoints(15);
the class need Curve or Polyline for input
and return random points with good distance ( lookalike grasshopper populate )
like blow
enjoy