Forgot password?

Create an account!


« back

RhinoScript – How to get selected object's points


Please log in to write a message.

  • 4. jmuneram (Aug 28, 2015 21.45):

    Dim arrEndPoints, strEndPoint ,strStartPoint, arrEndPoint

    Rhino.Command "'_SelPt"

    arrEndPoints = Rhino.GetObjects("Select Objects",,True,True)
    If Not IsArray(arrEndPoints) Then Exit Sub

    For Each strEndPoint In arrEndPoints

    arrEndPoint = Rhino.PointCoordinates(strEndPoint)
    Rhino.Print Rhino.Pt2Str(arrEndPoint)


  • 3. mayur.vadher (Aug 08, 2015 15.44):

    hi, thanks for reply.
    i want to create plugin in
    the plugins is about to attach new object on every points of already selected object.
    i could manage to get object's points by this code :

    List<Point3d> pts= new List<Point3d>();
    RhinoObject obj = GetRhinoObject();
    foreach (Mesh ms in obj.GetMeshes(MeshType.Any))


    public RhinoObject GetRhinoObject()
    RhinoObject obj;
    GetObject objAction = new GetObject();
    objAction.SetCommandPrompt("Please select any object");
    if (objAction.Get() != GetResult.Object)
    RhinoApp.WriteLine("No object selected.");
    Rhino.DocObjects.ObjRef objR = objAction.Object(0);
    obj = objR.Object();
    return obj;

    Now, i want to draw a cone type object like pentagon by starting from each points to ending at the surface (i.e. z-axis is zero)
    And that new pentagon object should be the part of the original selected object.

    I hope you understand my problem.
    Please help me.

    Thanks & Regards,
    Mayur Vadher.

  • 2. chottabhai (Aug 08, 2015 14.36):


    didn't get what you are trying to say, are you meaning that you want to get an array of points into the memory for use / manipulation in scripting? or get the surface points?

    there are a lot of routines for selecting / getting points, try going through the help file..

  • 1. mayur.vadher (Aug 06, 2015 07.35):

    I want to get all the points of selected object in my rhino plugins project in C#.Net or VB.Net.
    its better if i get points near surface.
    Any example or any portion of code in c# or could help me lot.


Why are these buttons gray?