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

    jasef

    @jasef

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

    jasef Unfollow Follow
    registered-users

    Latest posts made by jasef

    • RE: WebDialogs, "skp:", and Windows 8/IE 10?

      Dan, we tried WebDialog.allow_actions_from_host() with no luck so far.

      Correction: this is not an IE10 issue; Win 8 uses IE10 as the default browser, but SketchUp is using IE7 for web dialogs:

      Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729) Google-SketchUp/8.0 (PC)

      posted in Developers' Forum
      J
      jasef
    • WebDialogs, "skp:", and Windows 8/IE 10?

      When using WebDialogs with JavaScript, you can pass messages from the JS back to the Ruby plugin using this technique:

      window.location = "skp:callback_name@callback_data"

      (described in "Accessing SketchUp from JavaScript" in Automatic SketchUp on page 319)

      The skp: is a psuedo-protocol and the above line of code sends callback_data to the Ruby method callback_name.

      This works fine across Mac (using Safari instances for the WebDialogs) an Windows (IE instances) for local HTML files (using WebDialog.set_file html_filepath) and it works for remote JavaScript web pages (using WebDialog.set_url my_url) in every instance we've seen…except with Windows 8! (which uses IE 10 for WebDialogs?)

      We've looked into workarounds (setting the registry to properly handle "skp:", etc.) but can't find anything easy. Is there anything we can do to get this "skp:" message passing to work in IE 10 WebDialogs for remote .html files?

      Thanks,

      j.

      posted in Developers' Forum
      J
      jasef
    • RE: Workaround for "selectSelectionTool" Mac bug?

      Still no luck. And I just confirmed it's Mac-only, the toolbar refreshes correctly on Win...

      posted in Developers' Forum
      J
      jasef
    • RE: Workaround for "selectSelectionTool" Mac bug?

      @dan rathbun said:

      Well this should also work for ONLY the selectionTool

      Sketchup.active_model.select_tool(nil)

      Nope, same results. In the model window toolbar, the original tool stays visually selected even though the actual tool is now the selection tool (and the floating toolbar shows the selection tool is selected).

      It's some sort of refresh bug, annoying but doesn't hamper functionality...just afraid it'll confuse users that the cursor is now the selection tool even though that toolbar says otherwise.

      posted in Developers' Forum
      J
      jasef
    • Workaround for "selectSelectionTool" Mac bug?

      Hi all,

      I'm using SU 8 on Mac and I've noticed that when I do

      Sketchup.send_action "selectSelectionTool;"
      

      The selected tool in the floating SketchUp toolbar changes, but the one at the top of the model window does not.

      http://i.imgur.com/1rtGE.png

      In the above screenshot, you can see that the floating toolbar (left) has the selection tool, but the selected tool in the window toolbar (right) is still Rectangle. I can even click back and forth on the tools in the floating toolbar and the selected tool in the window bar doesn't change! (Until I "fix it" by selected a tool from that toolbar...)

      Any ideas for a workaround?

      Thanks,

      J

      posted in Developers' Forum
      J
      jasef
    • RE: Duplicate Faces?

      @thomthom said:

      @jasef said:

      Awesome gents, make_unique solved it.

      What about ComponentInstances?

      I hope you're not making them uniqe - as I doubt the user will be expecting that - or be happy to see that happening...

      No, just Groups.

      posted in Developers' Forum
      J
      jasef
    • RE: Duplicate Faces?

      Awesome gents, make_unique solved it.

      Much thanks!

      posted in Developers' Forum
      J
      jasef
    • Duplicate Faces?

      I'm seeing a serious defect in a sizable fraction of SketchUp models, namely the existence of duplicate faces.

      By "duplicate", I mean, forFace a and Face b:

      • The .to_s method returns the same string for a and b* .entityID is identical for a and b* Setting an custom attribute or changing Face properties affects both Face a and Face b

      Note: The two faces are distinct visually and not connected or overlapping.

      This makes a number of model manipulations impossible.
      It's well known that the entityIDs of Faces are not persistent (and maybe not unique?), but this is far worse: saving references to Faces (for example, in a hash map with the key a custom ID attribute) is useless because one reference is referring to two faces.

      In case this still isn't clear, here is the output of printing the string representation of all the Faces in a simple model (and also the entityID):

      @unknownuser said:

      face=#Sketchup::Face:0xf464498, id=52
      face=#Sketchup::Face:0xf464498, id=52
      face=#Sketchup::Face:0xf464240, id=98
      face=#Sketchup::Face:0xf464128, id=1827
      face=#Sketchup::Face:0xf464010, id=1841
      face=#Sketchup::Face:0xf463f34, id=1848
      face=#Sketchup::Face:0xf463e58, id=1855
      face=#Sketchup::Face:0xf463d68, id=1863

      The duplicate faces above (two windows) are both part of separate Groups; I haven't seen this bug in models without groups. If you continually select all entities in the model and "explode", the Faces are then all unique. So basically, this bug is likely due to Groups of Faces.

      Any thoughts?

      posted in Developers' Forum
      J
      jasef
    • Using SketchUp C++ SDK .dll/.dylib on Linux?

      Would it be possible to use the SketchUp SDK C++ libraries for reading .skp files, on Linux in whatever language? (Win or Mac libs)

      For example, using Java and JNI somehow. Maybe in conjuction with WINE?

      Obviously I'm a bit vague, I just want to know if it's technically possible (not concerned with whether it's easy or smart). It's all x86 hardware so it seems to me it must be doable in some way.

      Thanks!

      Jasef

      posted in Developers' Forum
      J
      jasef