Forgot password?

Create an account!


« back

RhinoScript – getting planeArray from planeId


Please log in to write a message.

  • 5. pool338 (Sep 06, 2011 10.13):

    Thanks for help...i didnt know before, that it were two types.
    The "AddPlaneSurface" part is needed, because i use it to compute the direction of the normal of the plane.

    I now can place Texts on the plane in any direction i want...thank u very much again.

  • 4. Johannes (Sep 02, 2011 15.35):

    still two types... AddPlaneSurface is the confusing part.

    you create a surface from a plane, you flip the direction of the surface and nothing happens with the plane...

    if you want to change the direction of the plane you need to change the order of your points (Rhino.PlaneFitFromPoints(points)).
    1. point = origin
    2. point = x axis
    3. point = y axis

    the text will be aligned at the x axis with a starpoint at the origin.


  • 3. pool338 (Sep 02, 2011 14.47):

    I will try to explain in more detail what i'm trying to do:
    1. I get a 3D model with 4 points on it. this points are the corners for an area into which i have to place text.
    So what i do is:

    plane = Rhino.PlaneFitFromPoints(points)
    dblDX = VectorLength(plane(1))
    dblDY = VectorLength(plane(2))
    strPlane = Rhino.AddPlaneSurface(plane, dblDX, dblDY)

    2. But because i dont know if the orientation of the plane is correct i cant do:

    Rhino.AddText(text, plane)

    So what i do is do check if orientation of plane is correct and if not i use:

    Rhino.Command(\"_-SelID \" & strPlane)

    3. This correctly flips the drawn plane into right direction, but

    Rhino.AddText(text, plane)

    still places the text on wrong side of plane.

    Hope this explains little better what i'm supposed to do and anyone can help me.


    P.S. Sorry for my poor English, it's not my first language

  • 2. Johannes (Sep 02, 2011 14.25):

    hi, i think we talk about two different types. a plane and a planar surface. a plane cannot be build as an rhino model. its defined by an origin and two direction vectors and has an n-dimensional space.


    arrPlane = Rhino.PlaneFromPoints (arrOrigin, arrPointX, arrPointY)
    arrPlane = Rhino.PlaneFromPoints (array(0,0,0), array(1,0,0), array(0,1,0))

    second one is equal to the worldxy plane (Rhino.WorldXYPlane()).


  • 1. pool338 (Sep 02, 2011 14.12):

    Hello everyone,
    i have a model with defined plane on it. i can get the objectid of the plane by

    Rhino.Command(-SelName )

    Now i want to place a Text on this plane with

    Rhino.AddText(text, plane)

    But therefore i nedd a planeArray with Origin, X-direction, Y-direction and Z-direction.

    How can i get this Information, when i only have the id and the name of the plane?


Why are these buttons gray?