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

    iaselle

    @iaselle

    10
    Reputation
    1
    Profile views
    8
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    iaselle Unfollow Follow
    registered-users

    Latest posts made by iaselle

    • RE: How to compute dimensions of solar masks

      Thank you very much TIG for your work.

      Your ShadowProjector is great and I'll try to do some reverse engineering on it πŸ˜„

      posted in Developers' Forum
      I
      iaselle
    • How to compute dimensions of solar masks

      Hi everybody,

      I've been browsing this forum for a couple of days but since I'm a dummy about 3D geometry, here is a new thread !

      According to attached image, I have to write a piece of code that will detect, for a dedicated wall, if other faces can cast shadows to it : adjacents wall with re-entrant angles or adjacent horizontal faces like overhangs.

      The variables the code has to compute (imposed by an external program) are the following :

      • distR and deptR (see figure) for a reentrant wall located on the right of the wall
      • distL and deptL for a reentrant wall located on the left of the wall
      • distT and deptT (see figure) for a overhang that is on the top of the wall

      My questions are :

      • how to detect reentrant wall since the "angle_between" function does not work as expected (see post alternative to angle_between?)
      • how to know when an adjacent face is "on the right" or "on the left" of the current face (viewed from outside)
      • how to compute the "left", "right" and "top" distances between a window (componentinstance) and the edges of a wall ?

      Thank you very much in advance πŸ˜„

      PS : here are some posts that might be helping
      alternative to angle_between? http://www.sketchucation.com/forums/viewtopic.php?f=180&t=19300
      http://forums.sketchucation.com/viewtopic.php?f=180&t=31448
      http://groups.google.com/group/Ruby-API/browse_thread/thread/82c3f9c764171be9


      variables to compute for overhangs and adjacent walls with reentrant angle.

      posted in Developers' Forum
      I
      iaselle
    • RE: WebDialogs using Chrome : any interest ?

      OK, so I'm staying tuned of your development and will in the meantime make sure that my plugin is compatible with the different flavors of IE.

      Thanks to Virtualbox, it is now easier to do this ...

      posted in Developers' Forum
      I
      iaselle
    • RE: WebDialogs using Chrome : any interest ?

      Let me make sure I understand well the issue with your setup :

      • If the normal IE browser is not sandboxed anymore, this is an unacceptable security issue

      • If only webdialogs are not sandboxed anymore, the issue would be coming from other applications installed on the computer, that make use of webdialogs and that allow the user to surf on the web with it. I do not know if there are many of them

      First, this problem is only for windows XP users (and the number of XP users is decreasing).
      Users with Vista/seven would be adviced to upgrade to IE9 if necessary.

      I can accept that for those remaining XP users, my plugin could be used only by administrators.
      In that way, could the registry be changed trough the plugin at each startup (before starting the webdialog) and changed back when the users quit the webdialogs ?

      Then the issue could happen only if the user would start another application with webdialog while SU is running.

      posted in Developers' Forum
      I
      iaselle
    • RE: WebDialogs using Chrome : any interest ?

      Hello Dan,

      I think that the option 1 is worth to be tested.
      According to a Computerworld benchmark, IE8 + Google Chrome Fame is 10 times faster that IE8 on its own ... and IE7 and IE6 are 2x slower than IE8 !!

      Option 2 seems to be kind of a burden, with a lot of developing, testing and maintenance concerns.

      In my context, I will have to install an executable that will be shipped with my SU plugin (with imposed set of dlls I'll be obliged to cope with).

      Therefore, a Windows setup will be required (Inno Setup for instance).
      If your option 1 need registry keys to force Chrome Fame Usage, this setup could be used for it.

      posted in Developers' Forum
      I
      iaselle
    • RE: WebDialogs using Chrome : any interest ?

      Ok Dan,

      But back to your first post in this topic, are you about to succeed I implementing WebDialogs using Chrome on the PC ?

      Because, there are still companies that have pools of computers with legacy XP+IE6 ... and javascript execution on IE6 (and even IE7) is very very slow (assuming you're using fancy webdialogs with jQuery etc).

      So, I'm still interested and I'm staying tuned πŸ˜„

      posted in Developers' Forum
      I
      iaselle
    • RE: WebDialogs using Chrome : any interest ?

      Hello Dan,

      I'm very interested in your topic.

      Sketchup uses IE7 as a renderer even on machines with a native IE9. And it seems to uses the quirks mode even with XHTML strict.

      I'm developping a commercial plugin and this is an issue. Therefore, I'm interested in your development.

      What would be the installation process of your plugin (any executable to run first) ?
      Would it impact the usage of the native IE on the computer ?
      What are your financial requirements (you can reply through private message if you wish) ?

      By the way, "Google Frame" works on native IE but not in the frame of Sketchup IE !!

      posted in Developers' Forum
      I
      iaselle
    • RE: SQLite in SketchUp Ruby

      Hello,

      This topic is old but I'm having the same problem and I've just succeeded in solving this problem.
      My plugin now works on an old Mac OS 10.5, on Windows 7 and Windows XP. (still to be tested on Mac os 10.6 and 10.7)
      Furthermore, no need to install anything on a fresh machine except the plugin directory tree.

      On your PC development machine, install ruby, grab the "sqlite3 gem" from http://rubyforge.org/frs/?group_id=254 and install it though "gem install ..."

      On my Mac 10.5 development machine, I had to install rubyosx from http://rubyosx.rubyforge.org . I think that on Mac Os 10.6/7 it might be useless.

      Get the appropriate files from the following directories (path to be adapted depending on your actual installation)

      • C:\ruby\lib\ruby\1.8

      • C:\ruby\lib\ruby\gems\1.8\gems\sqlite3-ruby-1.3.1-x86-mswin32-60\lib

      • /usr/local/lib/ruby/gems/sqlite3-ruby-1.2.5/lib
        And copy those files in your plugin directory. You should have a directory tree as follows :

      
      ** main code of the plugin
      ./test.rb
      **** lib files that are used by sqlite3 gem
      ./lib/date
      ./lib/date/format.rb
      ./lib/date.rb
      ./lib/initpath.rb
      ./lib/parsedate.rb
      ./lib/rational.rb
      ./lib/sqlite3.rb
      ./lib/time.rb
      ***** for Mac Os X only ***
      ./lib/sqlite3_api.bundle
      ******************
      ./lib/sqlite3macOs
      ./lib/sqlite3macOs/constants.rb
      ./lib/sqlite3macOs/database.rb
      ./lib/sqlite3macOs/driver
      ./lib/sqlite3macOs/driver/dl
      ./lib/sqlite3macOs/driver/dl/api.rb
      ./lib/sqlite3macOs/driver/dl/driver.rb
      ./lib/sqlite3macOs/driver/native
      ./lib/sqlite3macOs/driver/native/driver.rb
      ./lib/sqlite3macOs/errors.rb
      ./lib/sqlite3macOs/pragmas.rb
      ./lib/sqlite3macOs/resultset.rb
      ./lib/sqlite3macOs/statement.rb
      ./lib/sqlite3macOs/translator.rb
      ./lib/sqlite3macOs/value.rb
      ./lib/sqlite3macOs/version.rb
      ****** for windows only ********
      ./lib/sqlite3pc
      ./lib/sqlite3pc/1.8
      ./lib/sqlite3pc/1.8/sqlite3_native.so
      ./lib/sqlite3pc/1.9
      ./lib/sqlite3pc/1.9/sqlite3_native.so
      ./lib/sqlite3pc/constants.rb
      ./lib/sqlite3pc/database.rb
      ./lib/sqlite3pc/errors.rb
      ./lib/sqlite3pc/LISEZMOI.txt
      ./lib/sqlite3pc/pragmas.rb
      ./lib/sqlite3pc/resultset.rb
      ./lib/sqlite3pc/statement.rb
      ./lib/sqlite3pc/translator.rb
      ./lib/sqlite3pc/value.rb
      ./lib/sqlite3pc/version.rb
      

      This is the test.rb source code :

      # automatic installation  phase
      # renaming the directories sqlite3macOs or sqlite3pc depending on the target system
      mydir = File.expand_path( File.dirname(__FILE__) ) 
      
      if (!File.exists?(File.join( mydir, "lib/sqlite3" )))
        if (RUBY_PLATFORM.include?('darwin'))
          if File.exists?(File.join( mydir, "lib/sqlite3macOs" ))
             File.rename(File.join( mydir, "lib/sqlite3macOs" ),File.join( mydir, "lib/sqlite3" ))
          end
        else
          if File.exists?(File.join( mydir, "lib/sqlite3pc" ))
             File.rename(File.join( mydir, "lib/sqlite3pc" ),File.join( mydir, "lib/sqlite3" ))
          end
        end
      end
      
      # once the sqlite3 directory has been renamed, you can use it
      require 'lib/initpath'
      require 'sqlite3'
      
      # lauch the test ans see results in the ruby console
      Sketchup.send_action "showRubyPanel;"
      UI.menu("PlugIns").add_item("testsql") {
        testsql
      }
      
      # the tests consists in creating, populating and querying a database
      # !!! (quick & dirty) no test is performed to checks existing elements !!!
      def testsql
      
        puts "starting .."
      
        dbname = File.join( File.expand_path( File.dirname(__FILE__) ), 'test.sqlite' )
        database = SQLite3;;Database.new( dbname )
        database.results_as_hash = true
        
        database.execute( "create table sample_table (id INTEGER PRIMARY KEY, sample_text TEXT, sample_number NUMERIC);" )
         
        database.execute( "insert into sample_table (sample_text,sample_number) values ('Sample Text1', 123)")
        database.execute( "insert into sample_table (sample_text,sample_number) values ('Sample Text2', 456)")
         
        database.execute( "SELECT sample_text,sample_number FROM sample_table;" ) do |ligne|
          puts ligne['sample_text'].to_s  + " " + ligne['sample_number'].to_s
        end
      
      end
      
      

      Notice 1: On a Windows PC, you have to get sqlite3.dll (eg from http://www.sqlite.org/sqlitedll-3_6_16.zip) and put it in the same directory as SketchUp.exe itself.

      Notice 2 : the initpath.rb adds the lib directory to the PATH used for searching required ruby scripts


      Minimal working example

      posted in Developers' Forum
      I
      iaselle