Forgot password?

Create an account!


« back

RhinoScript – Project the object onto a specified Cplane!


Please log in to write a message.

  • 9. renjiez20 (Mar 05, 2011 16.45):

    This is a good method. The problem is solved.
    Thank you very much!

  • 8. Hanno (Feb 28, 2011 12.22):


    all Rhino.Get*() Methods return NULL if the user hits ESC. So if the user has to select something for each circle, you can use this as an exit condition:

    myCrv = rhino.getObject("bla")
    If isnull(myCrv) Then Exit For
    ' add CircleAroundCurve ...

    Hope that helps!


  • 7. renjiez20 (Feb 26, 2011 17.57):

    I don't know what time it was just,so I couldn't determine the number.
    As that example:
    Dim i
    For i=1 To 10
    Rhino.command " _Circle _AroundCurve"
    I creat the thirth circle just,but I creat the fifth circle just sometime.
    The figures are not sure.
    So I want to exit the loop by pressing the ESC key or any other key at all time.
    AS the Rhino command ,you can press esc key to exit when it is runing at all time.
    I hope I could use the Rhinoscript to do it.

  • 6. Johannes (Feb 25, 2011 18.28):

    i have no idea...

    what is the reason why you want to exit the loop? i am asking because if you have a reason like a numeric value or something... then you can script that reason and exit the loop with a function:

    If i > x then
    Exit For
    End if

    If x < 10 then
    Exit For
    End if

  • 5. renjiez20 (Feb 25, 2011 18.06):

    Thank you to return me soon!
    That I know.
    My problem is solved.
    I have a new problem.
    I'm trying to do a loop,I want to press the key of the ESC to exit the loop.
    For example :
    Dim i
    For i=1 To 10
    Rhino.command " _Circle _AroundCurve"

    I want to press the keyboard of the ESC to exit loop in the third or fourth cycle. In other words,I want to exit loop at any moment.

    Do you have any idea? Expect your reply.

  • 4. Johannes (Feb 25, 2011 17.35):

    hi, rhino.command is a function to use rhino functions which you can't use with rhinoscript.

    the following script works fine for a projection to the cplane:

            Dim strObject   : strObject = Rhino.GetObject("pick object")
            Call Rhino.SelectObject(strObject)
            Call Rhino.Command("-_projecttocplane ")


    Project the object onto a specified Cplane!
  • 3. renjiez20 (Feb 25, 2011 17.03):

    Thank you all the same. but I mean I wouldn't use the Rhino's command.
    I am a beginner on the rhinoScript,so I would like to finish it with RhinoScript only.

    There are two different methods used before.
    The First:
    I made a straight surface into the specified Cplane,
    then I used the RhinoScript(Rhino.ProjectCurveToSurface).
    It isn't used in surfaces like the rhino's command(projecttocplane),
    and the controlling point of the Curve will be changed.

    The Second:
    I uesed the rhino's command(SetPt or projecttocplane)

    Now I hope The code is able to perform its function like the SetPt and projecttocplane.

    So I'm trying to use he RhinoScript?Rhino.ObjectGripLocation? ,but it isn't run .

  • 2. Johannes (Feb 25, 2011 12.28):

    hi, there is no function like projecttocplane,... in rhinoscript. but you can scipt it with command scripting.

    change the cplane (Rhino.NamedCPlane (strName)), change the camera for your direction (parallel projection, camera and target) and project the object to your cplane (Rhino.Command("projecttocplane ")).


  • 1. renjiez20 (Feb 24, 2011 17.55):

    I Want to project the object(Curves or surfaces) onto a specified Cplane in a specified direction,
    but you do not change the controlling point of the object.
    I tried to change the object's controlling point ,but I failed.
    Could you help me?
    Thanks very much!


Why are these buttons gray?