Forgot password?

Create an account!

Forum

« back

RhinoScript – Creating an Ellipsoid

Messages

Please log in to write a message.

  • 4. Hanno (Nov 10, 2009 10.48):

    Yep, I think it's the case on many non-english systems. I've just never worked in Itlay ;-)

  • 3. typicalrude (Nov 10, 2009 10.41):

    Thanks Hanno! That was really annoying!!!
    In fact the system is in italian...
    Cheers
    A.P.

  • 2. Hanno (Nov 10, 2009 10.30):

    Hi!

    That's an annoying problem that comes from localization: On German systems floats are written "3,14" instead of "3.14". The simplest solution is to add

    Setlocale "en-us"

    at the top of your script.

    Hope that helps!

    Hanno

  • 1. typicalrude (Nov 09, 2009 11.42):

    Hello!
    I'm trying to running a script that automatically generates an ellipsoid by using simple dimensions input for user: width,depth and height.
    That's the script I created

    Call Ellipsoid
    Sub Ellipsoid
            Dim dblWidth, dblDepth, dblHeight
            dblWidth = 32
            dblDepth = 32
            dblHeight = 10
            Dim strCenter, strPoint01, strPoint02
            strCenter = " w0,0," & dblHeight
            strPoint01 = " w0," & dblWidth/2 & "," & dblHeight
            strPoint02 = " w" & dblDepth/2 & ",0," & dblHeight
            Rhino.Command "_Ellipsoid" & strCenter & strPoint01 & strPoint02 & " w0,0,0"
    End Sub

    It works!, but the problem is that if you put an odd number, the string will became "x,y" and the comma will create confusion on the rhino.command (try it to understand). Is there a solution?
    Thanks!!

Recommend

Why are these buttons gray?