sketchucation logo sketchucation
    • Login
    1. Home
    2. cjthompson
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ”Œ Easy Offset | Offset selected faces in SketchUp in positive and negative offsets. Download
    C
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 19
    • Posts 151
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Looking to make a script, but dunno how.

      @agamemnus said:

      1. I can't seem to convert the target groups to components fast enough -- I used 'if (current_entity.typename == "Group") // current_entity.to_component // end', but that only applies at the end of the script so I have to run it twice.. dunno how to make it convert instantly. Tried shoving "Sketchup.active_model.commit_operation" after and then converting the unique components to base components but it won't budge.

      the reason why is because .to_component creates a new entity.
      Try current_entity = current_entity.to_component.

      posted in Developers' Forum
      C
      cjthompson
    • RE: Looking to make a script, but dunno how.

      are you looking for a script to do what you ask for, or are you asking for a tutorial on how to do it?

      posted in Developers' Forum
      C
      cjthompson
    • RE: Scope of class.initialize

      The reason I was asking was in regards to this post:

      http://forums.sketchucation.com/viewtopic.php?f=180&t=22567

      Is it possible that the bounding box's initialize was interfering with the web dialog's?

      posted in Developers' Forum
      C
      cjthompson
    • RE: Invalid Web Dialog

      I noticed that this was fixed in 7.1

      posted in Developers' Forum
      C
      cjthompson
    • RE: Scope of class.initialize

      @avariant said:

      unless it was somehow interpreting your initialize as the initialize for those other classes.

      I think that is part of it, although it looks like the classes original initialize method runs, too. the global initialize method doesn't run when I instantiate pure ruby classes, so I wonder if it is the C extensions that are triggering it.

      posted in Developers' Forum
      C
      cjthompson
    • RE: TIG Mirror plugin crashes SU7

      Sketchup.send_action(21513) will shrink the outliner, although it will only work on Windows. I'm not sure if it will help or not.

      posted in Developers' Forum
      C
      cjthompson
    • Scope of class.initialize

      Does anyone know what scope the "initialize" method of a class is?

      The reason I'm asking is because I accidently put an initialize method in the global scope, and noticed it was called when dcloader.rb and dynamiccomponents.rb loaded.

      I tried some more tests and noticed that some classes executed the initialize method, while some didn't. It seems like classes that were meant to be initialized in ruby didn't execute it, while ones that weren't (Model,Edge,Face,etc.) did.

      Has anyone else experienced this?

      posted in Developers' Forum
      C
      cjthompson
    • RE: WebDialog Sub Forum? (Poll added)

      yes.

      posted in Developers' Forum
      C
      cjthompson
    • RE: Built-in JSON in Internet Explorer 8 IE8

      this is the user agent string I got from fiddler:

      "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"

      posted in Developers' Forum
      C
      cjthompson
    • RE: Built-in JSON in Internet Explorer 8 IE8

      As far as I can see, the web dialog uses version 7, even if you have 8 installed.

      try creating a web dialog and set the url to: http://www.quirksmode.org/js/detect.html

      you should see "You're using Explorer 7 on Windows!" or something similar.

      posted in Developers' Forum
      C
      cjthompson
    • RE: New API doc - typos and questions

      @newone said:

      @unknownuser said:

      @newone said:

      What's wrong with Colorby Layer ? 🀣

      Try read the value of it. Such a key does not exist.

      hey, that was a joke πŸ˜› I got your point and you are right...

      I'm afraid you are much too easily amused πŸ˜„

      posted in Developers' Forum
      C
      cjthompson
    • RE: Invalid Web Dialog

      Okay. This is just plain stupid.

      I stepped through my code to find the problem, and it turns out that somehow creating a new bounding box invalidates my web dialog.

      here is a code snippet to test with (I used the console):

      
      testWebDialog = UI;;WebDialog.new("Test;",true,"webDAtts",700,500)
      testWebDialog.set_html("<head></head><body>This is a test</body>")
      testWebDialog.show
      puts testWebDialog.visible? #(should return true)
      Geom;;BoundingBox.new
      puts testWebDialog.visible? #(should return false)
      
      
      posted in Developers' Forum
      C
      cjthompson
    • RE: Transformations

      I just looked at the picture you posted again. Do you want flip the axes, instead of rotating them? If so, I don't know if that is possible. It's has to do with the fact that sketchup uses a right hand orientation, instead of left-hand orientation that I'm guessing LDraw uses (http://en.wikipedia.org/wiki/Right-hand_rule).

      Is there a way to change the orientation of axes in LDraw? (I haven't used it myself, so I have no idea)

      posted in Developers' Forum
      C
      cjthompson
    • RE: Transformations

      The transformation.axes method just transforms the object so that it's axes match the internal ones.

      try using transformation.axes on the grouponent (I believe you used that one πŸ˜‰)

      then use

      grouponent.entities.transform_entities(grouponent.transformation.inverse,grouponent.entities.to_a)
      

      EDIT: Just tried it and it should work.

      posted in Developers' Forum
      C
      cjthompson
    • RE: Invalid Web Dialog

      sorry, I meant executing window.location = skp:callback_method_name.

      I think this might be an issue with ASP. I haven't been able to replicate it with html.

      posted in Developers' Forum
      C
      cjthompson
    • RE: Core ruby policies

      @chris fullmer said:

      There is a good chance they are part of the Dynamic Components.

      yeah. they are part of dcutils.rbs

      posted in Developers' Forum
      C
      cjthompson
    • RE: Invalid Web Dialog

      I've been trying to get a code snippet to replicate the problem, but I haven't been able to. I just wanted to know if anyone else has had this problem.

      posted in Developers' Forum
      C
      cjthompson
    • RE: Core ruby policies

      I tried getting rid of the tools folder, and you were right, they aren't part of the core API. I'm trying to figure out which file it is from, but that might take a while.

      posted in Developers' Forum
      C
      cjthompson
    • RE: Core ruby policies

      ok. just tested with a clean plugins folder and the ones I listed are still there.

      posted in Developers' Forum
      C
      cjthompson
    • RE: Core ruby policies

      @jim said:

      It seems like a good idea to stay away from undocumented API methods. They could change at anytime and without notice.

      would you suggest adding them into http://forums.sketchucation.com/viewtopic.php?f=180&t=17047 with a warning/notice? I personally don't have any need for them, but they may be useful for others.

      @newone said:

      Well, tell us about them! πŸ˜„

      The most useful ones I could find were in Sketchup::Transformation: rotx, roty and rotz which will give you rotation in degrees about an axis, and xscale, yscale and zscale which give you the scaling factor.

      posted in Developers' Forum
      C
      cjthompson
    • 1 / 1