Forgot password?

Create an account!

Forum

« back

RhinoScript – Scale plane ON plane

Messages

Please log in to write a message.

  • 4. ledisnomad (Aug 06, 2008 18.13):

    I've been using the help file, thanks. What seems simple to somebody in the know like you, may be difficult to a rookie like me, even with the help file. When or why to use R1, R2, or R3 space, as a concept not just which methods, still confuses me sometimes.

    I was using arrParam and eFrame for a MoveObject after the scale.

    The uniform scaling worked and that is probably all I need for now, but a non-uniform scaling using the normal (or the other vectors in eFrame?) would be good. That's what I thought I needed to do. Thanks for your help, ivo. I'll probably be back for the next function I'm writing!

  • 3. ivo (Aug 06, 2008 13.47):

    edit: just checked the documentation of the command surfaceAreaCentriod, which says that you really need to pass only arrPt1(0). i dont understand what you are trying to do with arrParam and eFrame (non-uniform scaling?). arrScaleV is giving you a normal vector of the surface. Think of how you might use that vector for scaling. I think, there is the real chalange.

    suggestion:

    - try first if it works with a uniform scaling fator like array(1.1,1.1,1.1). if that works we might have a look at your arrScaleV.


    regards

  • 2. ivo (Aug 06, 2008 11.21):

    RTFM: there is a help file which describes the rhino functions quite well.

    you are messing up with the variable tipes. in order to use the scaleObject command, you need a srf(as string), which is the objects ID in form of a string (lettres). then you need a 3d point in order to define the origin, which is a one dimensional array of doubles like array(0,0,0). i think your arrPt1 should work. dont pass just arrPt1(0) but rather the whole array arrPT1. the last thing you need is the scaling factor, which is expressed as an array(x,y,z). for your use, uniform scaling should work fine, which means that all the values in that array are strictly the same, like array(2,2,2). this would scale your plane by 200%.

    regards...


    ...ivo

  • 1. ledisnomad (Aug 06, 2008 00.43):

    This should be simple: I just want to scale a planar surface on the same plane. Given a surface, "srf", this is what I was trying:

    arrPt1 = Rhino.SurfaceAreaCentroid(srf)
    arrParam = Rhino.SurfaceClosestPoint(srf, arrPt1(0))
    eFrame = Rhino.SurfaceFrame(srf, arrParam)
    arrScaleV = Rhino.VectorScale(eFrame(2), 1.1)
    Call Rhino.ScaleObject(srf, arrPt1(0), arrScaleV)

    As a new Rhinoscripter, some problems seem easy, but then I have a lot of problem with the. Like this. Thanks!

Recommend

Why are these buttons gray?