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

    Topics

    • S

      Creating a nested component

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      346 Views
      TIGT
      Entering a faces edges/vertices 'in order' to add a clone into another context will determine the normal of the new_face. But it's always possible that the original face has been reversed if you took the edges ? So get the original_face.normal and compare it with the new_face.normal [allowing for the transformation differences!] - then if they don't match you must reverse the new_face...
    • S

      SketchUp API Documentation for redraw and redraw_with_undo

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      388 Views
      Dan RathbunD
      No there is no documentation. Technically... DynamicComponents is a Google/Trimble extension. And it is not OpenSource. Practically... it works (and is thought of,) as part of the Sketchup application itself. (The fact that it's written in Ruby, raises some stability issues if a lot of people began messing with it. And.. also, it would run alot faster if it was re-written in C/C++.) What you may not have realized.. is that DC are really just Sketchup::ComponentInstance instances, that have specially named attribute dictionaries and attributes, that are used by the extension, to do nifty things. Because it is an authored extension, it's internal workings are subject to change. Even it's internal methods could change their names, but externally, end-users, and scripters, might interact with them in the same way (or without much change.) So, much of what we know, has come from little tidbits, revealed by the members of the SU Dev team, .. and we can assume, that they have told "the world", what they are comfortable revealing. Or.. it may be that Google was never willing to spend the money, to produce the documentation. Or perhaps.. maybe the Ruby version V1 is the proof of concept... and they always had hopes of "baking it into" the C-side API code. (But just have never had that phase percolate to the top of the "to do" list.) Anyway.. if that happens, who knows what the method names exposed to Ruby might be ?? This latter possibility, is the reason I never attempted (even though I thought about it,) to write a reference manual for DCs myself. (That and I would imagine, they would have to give their "blessing" for it. I'd never do something like that without asking. Wouldn't like it if someone did it to my closed source work, without permission.)
    • S

      Question about load_handler parameter from load_from_url

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      12
      0 Votes
      12 Posts
      269 Views
      J
      This could be done from the JavaScript too. You could use the onPercentChange to simply set a variable, then use a timer in JS to poll the Ruby script for the value of the variable.
    • S

      Where is favorite Collections info being stored?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      147 Views
      Dan RathbunD
      Well.. hmmm. unless you are an expert at the format of the Mac plist, and the Windows Registry, it's best to tell the user how to add the collection manually. Otherwise see if there is already a library extension by some other plugin author that your plugin could call. Check the Code Snippet list.. and or the Plugin Index in the "Plugins" forum.
    • S

      What is the url for the google account sign in dialog?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      415 Views
      Dan RathbunD
      IF you must, you can instantiate a UI::WebDialog object, that uses: def login_to_3D_warehouse() title = "3D Warehouse Login" key = "3D_Warehouse_Login" settings = Hash[ ;dialog_title, title, ;scrollable, false, ;preferences_key, key, ;min_height, 500, ;min_width, 600, ;height, 500, ;width, 600, ;left, 400, ;top, 300, ;resizable, true, ;mac_only_use_nswindow, true ] dlg = UI;;WebDialog.new( settings ) lang = Sketchup.get_locale[0..1] dlg.set_url("https://www.google.com/accounts/ServiceLogin?service=warehouse&passive=1209600&continue=http://sketchup.google.com/3dwarehouse/?hl%3D#{lang}&followup=http://sketchup.google.com/3dwarehouse/?hl%3D#{lang}") return dlg end # login method # elsewhere in your code; login_to_3D_warehouse().show()
    • 1 / 1