Forgot password?

Create an account!

Forum

« back

RhinoScript – Hydrostatics Rhino.Command arguments

Messages

Please log in to write a message.

  • 3. heliaca (Dec 14, 2010 14.17):

    Hi, Hanno.

    You got it! It does indeed help.

    Here is a log excerpt:
    ================================================================================
    Running command: -Hydrostatics 502.000390447602 Symmetric=No Longitude=Y _Enter Clipboard _Enter
    Command: -Hydrostatics
    Choose hydrostatics options ( WaterlineElevation=502 Symmetric=No Longitude=X ): 502.000390447602
    Choose hydrostatics options ( WaterlineElevation=502 Symmetric=No Longitude=X ): Symmetric=No
    Choose hydrostatics options ( WaterlineElevation=502 Symmetric=No Longitude=X ): Longitude=Y
    Choose hydrostatics options ( WaterlineElevation=502 Symmetric=No Longitude=Y ): _Enter
    Choose hydrostatics options ( WaterlineElevation=502 Symmetric=No Longitude=Y ):
    Calculating water plane hydrostatics... Press Esc to cancel
    Calculating immersed volume hydrostatics... Press Esc to cancel
    Text destination <HistoryWindow> ( HistoryWindow File Clipboard Dialog ): Clipboard
    Command: _Enter
    printResults: Volume Displacement= 12881200000
    printResults: Center of Buoyancy= 0.00,11949.20,336.35
    printResults: Wetted Surface Area= 50169500
    printResults: Waterline Length= 19152.8
    printResults: Maximum Waterline Beam= 3361.48
    printResults: Water Plane Area= 47455800
    printResults: Center of Floatation= -0.00,11500.80,502.00
    ==============================================================================

    Thanks a lot.

    Heliaca

  • 2. Hanno (Dec 14, 2010 09.42):

    Hi,

    I don't know anything about the hydrostatics plugin, but if you say that you cannot set the options by typing when running the command manually, there is no way you can do this in a script. In the end all the script does is running the command exactly like if you had typed it.

    What you could try is to type e.g. Longitude=Y instead of Y. Maybe this helps.

    Regards

    Hanno

  • 1. heliaca (Dec 14, 2010 03.02):

    Greetings Rhino Script experts.

    There are appears to be no way to pass all 3 arguments to Hydrostatics plugin when using Rhino.Command.

    Here is an excerpt from the log produced by the script I developed:
    =====================================================================
    Running command: -Hydrostatics 501.452260460215 No Y _Enter Clipboard _Enter
    Command: -Hydrostatics
    Choose hydrostatics options ( WaterlineElevation=516.299 Symmetric=No Longitude=X ): 501.452260460215
    Choose hydrostatics options ( WaterlineElevation=501.452 Symmetric=No Longitude=X ): No
    Choose hydrostatics options ( WaterlineElevation=501.452 Symmetric=No Longitude=X ): Y
    Choose hydrostatics options ( WaterlineElevation=501.452 Symmetric=No Longitude=X ): _Enter
    Choose hydrostatics options ( WaterlineElevation=501.452 Symmetric=No Longitude=X ):
    Calculating water plane hydrostatics... Press Esc to cancel
    Calculating immersed volume hydrostatics... Press Esc to cancel
    Text destination <HistoryWindow> ( HistoryWindow File Clipboard Dialog ): Clipboard
    Command: _Enter
    printResults: Volume Displacement= 12855200000
    printResults: Center of Buoyancy= -0.00,11950.10,336.02
    printResults: Wetted Surface Area= 50134700
    printResults: Waterline Length= 3360.23
    printResults: Maximum Waterline Beam= 19148
    printResults: Water Plane Area= 47429200
    printResults: Center of Floatation= 0.00,11501.10,501.45
    ============================================================================
    The problem is seen in the following lines:

    Choose hydrostatics options ( WaterlineElevation=501.452 Symmetric=No Longitude=X ): Y
    Choose hydrostatics options ( WaterlineElevation=501.452 Symmetric=No Longitude=X ): _Enter

    Even though I pass "Y" for Longitude, it remains unchanged at "X".

    In reality the option for "Symmetric=No" cannot be changed either. It just happen to be "No" already.

    Only the "WaterlineElevation" is set OK i.e. changed from 516.299 to 501.452.

    BTW, when playing with Hydrostatics on Rhino command line, I also cannot input all 3 options by typing. I can do it only by clicking using the mouse.

    I hope somebody can give me a good advise on how to make the script work. I can of course pre-select the options manually and then run the script. I however seek for a smarter solution.

    This message refers to Rhinoceros 4.0

Recommend

Why are these buttons gray?