Rhinoscript: evaluation points from surface do not take the shape of the surface

I am trying to extract point from a surface that was created from separated curves. The problem is the outcome points are regular grid of points although the surface shape is irregular. Is there a command to extract points from a surface of the exact shape? if not, is there a way to delete the points outside the surface, thank you for your help

is it a trimmed surface ?
so you get the points outside the trimmed area as well - as you query the underlaying untrimmed Nurbs-Surface.

i would give a first try to
IsPointInSurface() and IsPointOnSurface

if this does not work, you have to test with
Rhino.SurfaceClosestPoint (strObject, arrPoint [, blnTrimmed])
and set blnTrimmed to true
Then compare the Distance of the initial and the pulled point - which should be within Tolerance for Points on trimmed Surface.

hope that helps, otherwise you might want to post a sample Surface and a corresponding script.
best -tom

Thank you Tom very much it worked perfectly
I have used:
if rs.IsPointOnSurface(surface, point) != False:
rs.AddPoint(point)
and all the inside points on the surface was selected
Thanks again