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

    Posts

    Recent Best Controversial
    • RE: Wanted: Stretch tool

      When using Fredo's FredoScale tool, make sure you use the "Stretch" mode, not the "Scale" mode. It should do exactly what you want, even stretching a component without exploding or editing it first. CB.

      posted in Developers' Forum
      daikuD
      daiku
    • RE: Draw angle dimensions

      Excellent. There's already a script out there that does this, but it does not work very well for me. Specifically, it often selects a vertex behind the one I want, and then gives an incorrect angle. It would be much better if you could restrict it to act only in a given plane, like the native protractor tool.

      The existing script by Didier Bur is called dim_angle.rb, and can be found here: http://www.crai.archi.fr/RubyLibraryDepot/Ruby/em_arc_page.htm

      posted in Developers' Forum
      daikuD
      daiku
    • RE: Plugin request

      I'd also love to see a good "skinning" plugin. I my case, I need to skin something like this:Murin_small.jpg

      posted in Developers' Forum
      daikuD
      daiku
    • RE: Is this possible with ruby?

      Yes, it's possible. On a windows PC, you can use win32ole.so to open and read the excel file. CB.

      posted in Developers' Forum
      daikuD
      daiku
    • RE: Ruby performance wierdness.

      Just some guesses: The increased performance on subsequent runs could be due to cacheing. And decreased performance on large arrays could be caused by exhausting an available memory pool (runs fast until that point), and the overhead associated with allocating more (runs slow from there). CB.

      posted in Developers' Forum
      daikuD
      daiku
    • RE: Win32ole.so procedure/load issue

      One quick note: Your intitial post says require <require 'Win32ole.so'>
      Note that in my code, there is no .so file name extension. Perhaps that's the problem?

      posted in Developers' Forum
      daikuD
      daiku
    • RE: Win32ole.so procedure/load issue

      No, I didn't do anything special with the path. Just drop win32ole.so into the plugins folder. I'm running 64-bit vista, but I've tested this on XP as well, and with multiple versions of excel. Default Ruby installation that comes with SU. CB.

      posted in Developers' Forum
      daikuD
      daiku
    • RE: Win32ole.so procedure/load issue

      I haven't used it with Access, but I have used it with Excel. Here's a code snippet:

      		if excel_mode
      			require('win32ole')			
      			excel = WIN32OLE;;new('excel.Application')
      			print( "excel version; " + excel.version.to_s + "\n")
      			unless file_loaded?("excel_constants")
      				WIN32OLE.const_load(excel, ExcelConst)
      				file_loaded("excel_constants")
      			end
      			excel.visible = false
      			if excel.version.to_f >= 12 
      				then tl_file_name = UI.savepanel("Save Timber List", "","timber_list.xlsx")
      				else tl_file_name = UI.savepanel("Save Timber List", "","timber_list.xls")
      			end	
      		end
      
      

      Hope that's helpful. CB.

      posted in Developers' Forum
      daikuD
      daiku
    • RE: What is the best way to find the type of an entity

      The method instance_of? does not check agaisnt the superclasses the way kind_of? does. So it's probably faster, and certainly more specific. CB.

      posted in Developers' Forum
      daikuD
      daiku
    • RE: [Code] layers.purge_unused

      Have you tried manually making the problem layers invisible? If so, does anything disappear? Also, try manually deleting the layer. If it's truly empty, SU will quietly remove it. If it's not empty, SU will warn you, and ask where you want to move the things. CB.

      posted in Developers' Forum
      daikuD
      daiku
    • RE: [Code] UnicodeEx - (0.2.0a) Sketchup + Character Encoding

      Very valuable research, Thom. I've got one user who is currently suffering with these problems, and I now feel armed to release a patch for him. Thanks much. CB.

      posted in Developers' Forum
      daikuD
      daiku
    • RE: [Plugin] Scale2Face.rb

      Check out FredoScale. In particular, the "scale to target" and "stretch to target" modes.

      posted in Plugins
      daikuD
      daiku
    • RE: [Req] Export g-code for 5 axis cnc router

      As far as I know, the CNC machines need output from a solid modeler, and Sketchup is a surface modeler.
      http://en.wikipedia.org/wiki/Solid_modeling

      posted in Plugins
      daikuD
      daiku
    • RE: [Code] file_found?(path) and to_ascii+to_unicode.rb

      @tig said:

      @thomthom said:

      But at least it beats sudoko puzzles... πŸ˜‰

      I can do those !!! πŸ˜‰

      But can you generate a puzzle using ruby code? Sounds like an idea for a ruby challenge.

      posted in Developers' Forum
      daikuD
      daiku
    • RE: [Code] file_found?(path) and to_ascii+to_unicode.rb

      Does this fix umlauts as well? I just had a Swedish user stumble onto this problem last week. CB.

      posted in Developers' Forum
      daikuD
      daiku
    • RE: How to use Geom::Transformation.rotation?

      @unknownuser said:

      Is there any mechanism for feeding back additions and clarifications to the Sketchup documentation? I'd be glad to write something about the meaning of the point and vector arguments and about rotating using the right hand rule. Even a simple example of rotating a line or a face (one that had been written using 45.degrees) would have gone a long way to getting me where I wanted to go much sooner.

      Yes - tack it onto the end of this thread:
      http://forums.sketchucation.com/viewtopic.php?f=180&t=17047

      posted in Developers' Forum
      daikuD
      daiku
    • RE: [REQUEST] Directly Replace One Compenent with Another

      Do you need to do this from within a Ruby script? Otherwise, just select all the instances you want to replace, and then in the component window, right click on the new component, and choose "replace selected". CB.

      posted in Plugins
      daikuD
      daiku
    • RE: New API doc - typos and questions

      I just want to take a second to thank Thomas for his diligence in finding and documenting these inconsistencies. It's really going to make life easier for a lot of folks. CB.

      posted in Developers' Forum
      daikuD
      daiku
    • RE: New API doc - typos and questions

      @thomthom said:

      Face.plane
      http://code.google.com/apis/sketchup/docs/ourdoc/face.html#plane

      @unknownuser said:

      The plane method is used to retrieve the plane of the face. See the Array class for information on how planes are stored.

      It's unclear where this information is. I don't see it.

      From the Geom module:
      The plane is returned as an Array of 4 numbers which are the coefficients of the plane equation Ax + By + Cz + D = 0.

      Along with this helpful tidbit:
      NOTE: Lines and Planes are infinite. There are several good books on 3D math if you are new to the concepts of a line, plane, and vector.
      But if you go back to your high-school geometry text book (or google "plane equation") you'll find something like this:
      [a,b,c] will give a normal vector to the plane, and the normal distance from the origin is given by d / sqrt( a^2 + b^2 +c^2)

      posted in Developers' Forum
      daikuD
      daiku
    • RE: Strange error when setting component axes

      Hi Chris.

      Well, I verified the error messages on another computer using SU7. I also tried it on SU6, and did not get the error messages. Yes, I'm able to set the axes. I find that I am not able to use the newly created component instance to cut a face, but if I grab a copy from the "in model" list of the component window, and place that on a face it will cut. So I guess part of my problem was not understanding how face-cutting components behave: It seems they only like to cut into the first face you stick them to. Chris, did you try setting the component axes while the ruby console was open? CB.

      posted in Developers' Forum
      daikuD
      daiku
    • 1 / 1