⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • Anyone Have A List of "default" Ruby Scripts?

    4
    0 Votes
    4 Posts
    861 Views
    J
    Here's an updated list of default plugins that ship with SketchUp 8. [image: d32m_0911.png]
  • Getting bounding box in custom axis

    10
    0 Votes
    10 Posts
    651 Views
    PixeroP
    Thanks.
  • Rotating objects in space

    7
    0 Votes
    7 Posts
    635 Views
    honoluludesktopH
    Well, better late then never. Not as difficult as I thought. First point, then rotate: ` comp.transformation=Geom::Transformation.new(comp.transformation.origin,point_vector) comp.transform! Geom::Transformation.new(comp.transformation.origin,comp.transformation.zaxis, (Math::PI*3)/2)` Thanks everyone.
  • Apple compatibility

    3
    0 Votes
    3 Posts
    231 Views
    honoluludesktopH
    Sounds like the only way to check it, is to run the app on both platforms?
  • SketchUp 8 and Volume Attribute

    4
    0 Votes
    4 Posts
    651 Views
    thomthomT
    @tig said: See this http://code.google.com/apis/sketchup/docs/ourdoc/componentinstance.html#volume It returned for the Instance as it currently is - like the face.area method... He's trying to read data from .skp files on disk - not within SU Ruby API.
  • [Test] defn.count_instances vs defn.instances.lenght

    3
    0 Votes
    3 Posts
    277 Views
    thomthomT
    Duh! Should off course have eliminated new object creations. (They are all too expensive.) Changing it and the numbers are quite different: d=Sketchup.active_model.definitions[0]; inst=d.instances; c=10000000; puts "Counting #{d.count_instances} instances..."; t=Time.now; c.times { d.count_instances }; puts "Count: #{Time.now-t}s"; t=Time.now; c.times { inst.length }; puts "Count: #{Time.now-t}s" Counting 8642 instances... Count: 3.562s Count: 1.795s
  • "Grayed out" Menu items

    3
    0 Votes
    3 Posts
    243 Views
    honoluludesktopH
    Thanks Tom, I really did try to find it.
  • Sketchup 8, serious observer bug?

    19
    0 Votes
    19 Posts
    2k Views
    M
    Well, I'm happy to test it out, on SU7 & 8 Pro. But programming? Nope. But with TIG and ThomThom commenting here you've already got some deep SU Ruby knowledge. If we can ask them to get involved .... As suggested, there's nice exporters for POVray and Kerkythea, which means we may be able to draw on others in the forums too. Supporting another good OSF renderer in SU would be helpful to all involved. What functions do you think needs to be done to move this project along, and then to the next level?
  • Ruby Scrambler Download

    10
    0 Votes
    10 Posts
    5k Views
    Dan RathbunD
    rav11, clarify.. (please) do the Mac scrambled scripts work on SU ver 7.x ?? and not work on SU ver 8.x ??
  • SKM tools

    4
    0 Votes
    4 Posts
    1k Views
    TIGT
    There's an updated 'extra' Material.save_bumpmap(folder, inverted) tool added. http://forums.sketchucation.com/viewtopic.php?p=291646#p291646 It's been sent to 'beta-testers' - are there any others interested in trying it out 'cross-platform'?
  • Film and Stage plugin - need help to fix script

    29
    0 Votes
    29 Posts
    3k Views
    D
    @Tig and Chris, I had a play using view.vpwidth and .vpheight but don't understand why it doesn't work, I ran this code on the same drawing with and without a 'Camera' view and thought it might show you if Mac's handle things differently, or not. I thought using the second set of co-ords to output a file would work, but I'm doing something wrong so I'll leave that off this post. [code] > view = Sketchup.active_model.active_view # Determine the size of the design window h = view.vpheight.to_s w = view.vpwidth.to_s puts "Window dimensions; " + w + ", " + h # Display the locations of the four corners puts "Upper left; " + view.corner(0)[0].to_s + ", " + view.corner(0)[1].to_s puts "Upper right; " + view.corner(1)[0].to_s + ", " + view.corner(1)[1].to_s puts "Bottom left; " + view.corner(2)[0].to_s + ", " + view.corner(2)[1].to_s puts "Bottom right; " + view.corner(3)[0].to_s + ", " + view.corner(3)[1].to_s # Show the location of the window's center center = view.center puts "Center; " + center[0].to_s + ", " + center[1].to_s # Screen coordinates origin = view.screen_coords [0,0,0] puts "Origin; " + origin[0].to_f.to_s + ", " + origin[1].to_f.to_s Window dimensions; 1924, 1089 Upper left; 0, 0 Upper right; 1924, 0 Bottom left; 0, 1089 Bottom right; 1924, 1089 Center; 962, 544 Origin; 579.166591415118, 705.802307848725 nil > view = Sketchup.active_model.active_view # Determine the size of the design window h = view.vpheight.to_s w = view.vpwidth.to_s puts "Window dimensions; " + w + ", " + h # Display the locations of the four corners puts "Upper left; " + view.corner(0)[0].to_s + ", " + view.corner(0)[1].to_s puts "Upper right; " + view.corner(1)[0].to_s + ", " + view.corner(1)[1].to_s puts "Bottom left; " + view.corner(2)[0].to_s + ", " + view.corner(2)[1].to_s puts "Bottom right; " + view.corner(3)[0].to_s + ", " + view.corner(3)[1].to_s # Show the location of the window's center center = view.center puts "Center; " + center[0].to_s + ", " + center[1].to_s # Screen coordinates origin = view.screen_coords [0,0,0] puts "Origin; " + origin[0].to_f.to_s + ", " + origin[1].to_f.to_s Window dimensions; 1924, 1089 Upper left; 0, 135 Upper right; 1924, 135 Bottom left; 0, 954 Bottom right; 1924, 954 Center; 962, 544 Origin; 285.625823583734, 829.482222498574 nil [/code]
  • View.draw_lines point1, point2

    3
    0 Votes
    3 Posts
    261 Views
    honoluludesktopH
    Tig, thanks.
  • Edit the dxf/dwg importer

    3
    0 Votes
    3 Posts
    275 Views
    TIGT
    @pout said: Simple question: Is the dwg/dxf importer accessible? Thx You use Sketchup.active_model.import(path_to_CAD_file.dwg, boolean) The importer knows from the file suffix if it's a dwg or dxf. The boolean controls if a report is displayed - true/false... You can't readily control the 'options' as the ones currently set in the manual Import options for dwg/dxf will be used for the API import... [You can 'script' PC code to open the import dialog and change options but it's a bit clunky - see an old version of my 'Xref Manager' script set...]
  • Plugin running indefinitely

    10
    0 Votes
    10 Posts
    656 Views
    T
    Thanks for all of the help, im now using a timer which solves the problem perfectly
  • Creating an avi file with a plugin

    13
    0 Votes
    13 Posts
    860 Views
    P
    hmm tried mencoder a lot of times and it is not that easy to get ruby running the mencoder line in a command window (things with locatiosn of the imgages and the mencoder exe come back to mind) ffmpeg is easier
  • Sketchup Animation Path Shape

    6
    0 Votes
    6 Posts
    1k Views
    D
    @chris fullmer said: How does VUE set up its animations? With "keyframes" between camera locations, and then you apply a linear or bezeir transition? I do not know if you will be able to accurately recreate the camera path that SketchUp uses. But you could export the camera location at each frame, effectively makeing each frame a key frame with a linear transition betwen them. The ruby API allows you to get the camera object for each frame of its animation. So I would guess that the best way to do what you're looking for is to have the user input the desired frame rate inside of SU, then export the camera location per frame to VUE and have VUE then set up the camera path frame by frame. Chris Thanks Chris. You confirmed what I thought. In Vue, you can create linear or curved animation paths. It appears that Sketchup uses some sort of arc-like movement when the camera is rotated around the scene. I like your idea of capturing intermediate key frames - I'll give this a try.
  • Need help on writing threaded plugin code

    10
    0 Votes
    10 Posts
    1k Views
    RichMorinR
    @thomthom said: UI.timer ? or a Javascript timer? This has to be a UI.timer, because it runs in the plugin (telling the plugin when to look for proxied messages from the JavaScript client code). I'm using SU 8, so the bug you mention isn't a problem for me. However, it would be nice to have a solution that works for earlier versions.
  • PBI - emulate WebDialogs in a browser?

    6
    0 Votes
    6 Posts
    1k Views
    RichMorinR
    @morgan_greywolf said: Sure, I'll take a look at it. I'm running SU8 on Linux/Wine. Great. You can get started with the proxy server and the test page; send me a note off-list (rdm@cfcl.com) letting me know what you find out. As soon as I have my example plugin ready for Alpha testing, I'll let you know. FYI, the plugin no longer sits in a read loop. Instead, I use UI.start_timer to perform periodic scans of the input directory. This seems to work quite nicely, but it does require SU8, because it's using a sub-second interval. Also, I'm still hoping for a CygWin and/or native Windows tester!
  • Inputbox prompts by variable

    3
    0 Votes
    3 Posts
    276 Views
    J
    In the first example, prompts is an Array of Strings, which is the correct form. In the second, p just a String; so when you write prompts = [p], y0u get an Array containing a single String. p = [] p << "What is your Name?" << "What is your Age?" << "Gender" prompts = p Do not use p as a variable. Although it does work, p is a shortcut for the .inspect method. p prompts is the same as puts prompts.inspect
  • Making an objects parallel to a line. (lookat function)

    5
    0 Votes
    5 Posts
    333 Views
    Chris FullmerC
    Then I too think it already exists. Check out Honolulu's script.

Advertisement