Get point from a Brep edges

I’m desperately trying to select a point with a constraint of a Brep Edge. This is what I’m trying:

 'Choose surface
            Dim SelectedFace As Rhino.DocObjects.ObjRef = Nothing
            RhinoGet.GetOneObject("Selectioner tôle", False, DocObjects.ObjectType.Surface, SelectedFace)
            Catch ex As Exception
                RhinoApp.WriteLine("Selection invalide")
                Return Result.Nothing
            End Try

Dim SelectedFaceBrep As Rhino.Geometry.Brep = Brep.TryConvertBrep(SelectedFace.Face.DuplicateFace(False))

   Dim SelectedPoint As Rhino.Geometry.Point3d
            Dim gp As New Rhino.Input.Custom.GetPoint
            gp.Constrain(SelectedFaceBrep, 0, -1, False) 'Lock selection on the face

What i’m tring to do is to change the last line to lock on the face edges but I can’t figure out how to do this!

Thanks for your help

I think if you duplicate the face’s naked edges, join the edges to 1 curve, then constrain to that curve, then it will work: (this is C# but that should translate to VB easily)

Brep face = SelectedFace.Face.Duplicate(false);
Curve[] nakedEdges = face.DuplicateNakedEdges(true, false); //only outer naked edges
Curve[] joined = Curve.JoinCurves(nakedEgdes, 2.1*doc.ModelAbsoluteTolerance);
gp.Constrain(joined[0], false);

Thanks for your help it works!