sketchucation logo sketchucation
    • Login
    1. Home
    2. ryu
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    R
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 9
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Running Sketchup as a service with sinatra

      This now works in windows Sketchup 2014. Probably ruby 2.x.x solved the problem.

      -Robert

      posted in Developers' Forum
      R
      ryu
    • RE: Run Validity Check

      Hi,
      Has someone figured out what the equivalent of send_action 21124 for the mac is?
      Thanks,
      Robert

      posted in Developers' Forum
      R
      ryu
    • RE: Running Sketchup as a service with sinatra

      Hi,

      Yes, on windows, I installed ruby187, replaced the msvcrt-ruby18.dll, and updated the $LOAD_PATH. The sinatra gem loads fine. Here is a snippet from the ruby console
      ("try.rb" is the ruby code shown in my first post):

      load "./try.rb"
      C:/ruby187/lib/ruby/1.8/set.rb:86: warning: method redefined; discarding old size
      C:/ruby187/lib/ruby/1.8/set.rb:89: warning: discarding old length
      C:/ruby187/lib/ruby/1.8/set.rb:92: warning: method redefined; discarding old empty?
      C:/ruby187/lib/ruby/1.8/set.rb:97: warning: method redefined; discarding old clear
      C:/ruby187/lib/ruby/1.8/set.rb:117: warning: method redefined; discarding old to_a
      C:/ruby187/lib/ruby/1.8/set.rb:157: warning: method redefined; discarding old include?
      C:/ruby187/lib/ruby/1.8/set.rb:193: warning: method redefined; discarding old each
      C:/ruby187/lib/ruby/1.8/set.rb:219: warning: method redefined; discarding old delete
      true
      MyTest.run!
      [2013-09-03 17:26:03] INFO WEBrick 1.3.1
      [2013-09-03 17:26:03] INFO ruby 1.8.7 (2011-06-30) [i386-mingw32]
      == Sinatra/1.4.3 has taken the stage on 4567 for development with backup from WEBrick[2013-09-03 17:26:03] INFO WEBrick::HTTPServer#start: pid=6088 port=4567

      These are the same messages I get on the MAC. The MAC sketchup cursor then becomes
      a "spinning wheel" and sketchup responds to http gets.

      On the PC, sketchup does not go into any "busy" mode, and sketchup does not respond to http gets.

      Thanks for your help.

      -Robert

      posted in Developers' Forum
      R
      ryu
    • RE: Running Sketchup as a service with sinatra

      I see no errors in the windows ruby console. One difference is that on the mac, after I run "MyTest.run!", the cursor becomes "busy". On the windows, after I run "MyTest.run!", sinatra does not start up. However, if I run "irb" on windows and load the same test, sinatra works.

      posted in Developers' Forum
      R
      ryu
    • RE: Running Sketchup as a service with sinatra

      On the Mac I get the model named as expected. But on Windows, the browser sits and waits for Sinatra to respond.

      posted in Developers' Forum
      R
      ryu
    • Running Sketchup as a service with sinatra

      Hi,

      I am looking into providing sketchup as a service through sinatra. I was able
      to load the sinatra gem into sketchup. I created just a couple of routes:

      require 'rubygems'
      require 'sinatra/base'
      
      class MyTest < Sinatra;;Base
          get '/test' do
              "thankyouverymuch"
          end
          get '/model' do
              Sketchup.active_model.name
          end
      end
      
      MyTest.run!
      

      From a browwer I was able to get http://localhost:4567/model to respond with the model name,
      but this only worked on the mac version. I was not able to get it to work on the windows version. I am using the latest version 8. Anyone try this before? Why does the windows version behave differently?

      -Robert

      posted in Developers' Forum
      R
      ryu
    • RE: [Plugin] Camera Recorder (Pixero update)

      Hi,

      I was looking for a way to capture a 3d walkthrough from sketchup
      and stumbled across the Chris' way cool clf_camera_recorder. I added a few
      lines of code to the "export_images" section so that it creates
      the left eye view from the captured datapoints. This means when it
      generates the images, it will actually create twice as many and will take
      twice as long. The left sided images all begin with "left_".

      After the images have been created, you can convert it to a video stream
      using quicktime pro, or with the opensource program ffmpeg. For example,
      if my images were called "imagexxxxx.png", then use:

      ffmpeg.exe -i image%05d.png -vcodec png right_image.mov
      ffmpeg.exe -i left_image%05d.png -vcodec png left_image.mov

      You can then view it using your favorite 3d viewer. I use the one
      available from 3dtv.at.

      Enjoy!

      -Robert


      clf_camera_recorder_v1.9.zip

      posted in Plugins
      R
      ryu
    • RE: Loading rubygems and other packages ?

      After digging around various threads I figured it out:

      1. Install the "loadpaths.rb" script (http://forums.sketchucation.com/viewtopic.php?f=180&t=29412)
        into SU Plugins. I modified it with:

      $LOAD_PATH << "#{pre}/gems/1.8/gems/ruby-ole-1.2.10.1/lib"
      $LOAD_PATH << "#{pre}/gems/1.8/gems/spreadsheet-0.6.4.1/lib"

      1. Backup and clobber the msvcrt-ruby18.dll with the one from the ruby1.8.6 release.

      2. require 'spreadsheet.rb' -> true

      -Robert

      posted in Newbie Forum
      R
      ryu
    • Loading rubygems and other packages ?

      Hello,
      How do I load rubygems into sketchup? I am interested in being
      able to use rubygems to load other packages, like

      gem install spreadsheet

      Or maybe it is better to load the spreadsheet gem directly.
      I have tried copying the gems files into the plugin directory
      but it complained about 'date' method undefined.

      Thanks,
      Robert

      posted in Newbie Forum sketchup
      R
      ryu
    • 1 / 1