hello folks i am preparing a ruby plugin for sketchup, i hope you can
help me with this really nasty problem i am having

here is the method ,which belongs to a class

  def moment_calc

    weight = 0
    variable_load = 0
    permanent_load = 0
    moment = 0

    weight =((25.0*@b*@h) / 10**6)
    prompts = ["Variable Load(kN/m) ", "Permanent Load(kN/m) ", "Max
Moment known(Nmm)"]
    loads = [0.0, 0.0, 0.0]
    results = inputbox prompts, loads, "Other Loads"
    variable_load, permanent_load, moment = results

    if (moment != 0)
      @M = moment
    else
      uls = (1.35*variable_load + 1.5*permanent_load +
1.5*weight)*@length
      @M = 0.11*uls*@length
      @shear = 0.60 * uls
    end
  end

my @b = 280 and @h=300 from before.. when i try to multiply the weight
it should come 2.1 but in this case it is 0.0032 or so.. which is
wrong.. hence because of that my uls values are wrong and hence the
entire following program.. i am pretty sure its problem with the
variables.. just cant figure out where!
-- 
Posted via http://www.ruby-forum.com/.