sketchucation logo sketchucation
    • Login
    1. Home
    2. Jim
    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!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 406
    • Posts 4,216
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: [Q] Preferences/File Locations

      I think these might be better named "Save" Locations. These are the locations used whenever you save something out of the model. As far as I can tell, anyway.

      posted in SketchUp Discussions
      J
      Jim
    • RE: Add column in SU file name

      Wow, there are a surprising number of fields available in Detail view (Windows 8.1 Explorer.) Not sure how to use them..

      2014-12_166.png

      posted in Developers' Forum
      J
      Jim
    • RE: Dynamic component edit

      I didn't bother with the "bottom only" option, but this should work.

      General methodology

      Add an attribute to allow the user to select which grilles are visible. I added an options list to the top-most component named zShowGrilles with the values:

      ["both", "top", "bottom "]
      

      2014-12_164.png

      The grilles already have a formula to control their visibility:

      HIDDEN; =or(SB!Grille_Int,SB!Lites_HIgh<2)
      
      

      We do not want to interfere with the original formula, but we do want to add another condition for visibility. So I moved the original formula into an attribute named hid1. Then added another attribute named hid2 which is based on the option list.

      
      hid1; =or(SB!Grille_Int,SB!Lites_HIgh<2)
      hid2; =if(Parent!showGrilles = "top", 1, 0)
      
      

      Then changed the built-in HIDDEN attribute to logically OR the 2 hid attributes.

      
      HIDDEN; =OR(hid1, hid2)
      
      

      2014-12_165.png

      Note you need to pass the showGrilles attribute down to each sub-component where it is needed. Attributes can only be "seen" by direct parents or children components.

      Hope this helps.


      modified-marvin.skp

      posted in Newbie Forum
      J
      Jim
    • RE: Component axes problem

      The Axes can be fixed using this: http://sketchucation.com/forums/viewtopic.php?t=30508

      posted in SketchUp Discussions
      J
      Jim
    • RE: Dynamic component edit

      Not sure if you wanted to add an option to the DC Options window, but you could just edit the component and hide them. Use the Outliner to find the parts you want to hide, then right-click them in the Outliner and hide them.

      posted in Newbie Forum
      J
      Jim
    • RE: Remove layer doesn't work?!

      For Color by Layer, see the Rendering Options[1]

      
      Sketchup.active_model.rendering_options['DisplayColorByLayer'] = true
      
      

      I do not think the transparency can be set from Ruby.

      [1] http://www.sketchup.com/intl/en/developer/docs/ourdoc/renderingoptions

      posted in Developers' Forum
      J
      Jim
    • RE: Remove layer doesn't work?!

      Layers.remove is new in SketchUp 2015.
      The API docs show the version of SketchUp methods were introduced.

      Prior to version 15, you need to do it using Layers.purge_unused after moving or deleting any geometry on that Layer.

      TIG posted some code here: http://sketchucation.com/forums/viewtopic.php?p=166985#p166985

      posted in Developers' Forum
      J
      Jim
    • RE: [Plugin] Add Layer [1.1.0]

      @sketchydog said:

      This is NOT working for the primary task. Add a new layer for This Scene Only.
      When I do this, the layer shows up in every scene. Nothing different than making a new layer narmally.
      What is going on?

      SU 2015/Win 7 64 bit

      Make sure to press the Apply button?

      posted in Plugins
      J
      Jim
    • RE: Dynamic components double action

      @garry k said:

      I'm guessing the solution for the flat model lies in the fact that the second doors x must be based on the pivot point radius to x which is offset from the actual x.

      Exactly. However, I had a moment at work today and the answer turned out simpler than I initially estimated. I realized that the x and y offsets you mention need to swap values as the door goes from 0 to 90 degrees. See the X and Y position attributes of the Right door in the attached model.

      So basically, this is an example of making one component follow another in a rotational animation at some (x, y) offset.

      Which is better the flat or nested hierarchy? Person choice, I guess. I would tend toward the flat because it creates a more natural organization of the components. For example, which makes more sense:

      A Frame has 2 doors, which each have hinges and knobs, or
      A Frame has one door, which has 1/2 a hinge, which has 1/2 hinge, which has the other door.

      I think a flat hierarchy will also make the component easier to work with both manually and in code.

      (Note - I somehow got the scale of the right door off.)


      c-bifold-3-flat.skp

      posted in Developers' Forum
      J
      Jim
    • RE: Dynamic components double action

      Again, this is easy if you are OK with nested components. The attached animation took about 5 minutes.

      If your plugin requires a flat hierarchy, it's going to more complex. After some hours I am still unable to recreate the attached animation using a flat hierarchy. I got close, but could not get the hinge right.

      From the detail in your images, I assumed you would want a believable hinge on the doors. I have attached the flat version also.


      dc-bifold-hinge-nested.skp


      dc-bifold-flat.skp

      posted in Developers' Forum
      J
      Jim
    • RE: Dynamic components double action

      @garry k said:

      Thanks Jim,

      I think I get it.
      It appears that the Left Door has its new origin on the right hand side of the right door
      And the Right Door has its new origin on the left hand side of the left door.

      What is a bit wierd is I set the angle to 93 degrees but RotZ only gets to 86.5

      Aha - a bug. I originally was going to run the animation from 0 to 100 percent. In the RotZ of the Doors I then divide by 100.

      The RotZ of the Right door should be simply: Parent!t

      posted in Developers' Forum
      J
      Jim
    • RE: Dynamic components double action

      Here's the "flat" version where the doors are siblings rather than parent-child.

      It's a bit more complex, but it's only trig. Some of the attributes in this model may not strictly be required - I was experimenting with some things.


      dynamic-bi-fold-flat.skp

      posted in Developers' Forum
      J
      Jim
    • RE: Dynamic components double action

      Hi Garry,

      Attached is one of the simplest ways to create the bi-fold doors. I used nested doors and modified axes which minimizes the math involved in the functions.

      It can be done using a flat (not nested) component hierarchy if needed.


      dynamic-bi-fold_v8_2014-12-01.skp

      posted in Developers' Forum
      J
      Jim
    • RE: [Plugin] 3D Parametric Shapes - makes placeable components

      John, in the loader file you should change the line extension.version = "2.2.8 to match the version (2.5?) you refer to in the latest release.

      posted in Plugins
      J
      Jim
    • RE: [Plugin] CleanUp

      What is "Portable" SketchUp? Where did you get it? Whatever it is, it is not a supported installation.

      posted in Plugins
      J
      Jim
    • RE: [Plugin] 3D Parametric Shapes - makes placeable components

      John - the plugin did not get published. It has disappeared. I would guess there is a 'publish' button that needs clicked.

      posted in Plugins
      J
      Jim
    • RE: [request] VisMap 2 update/fix

      It's an easy fix. It has to do with changes to the String class.

      In Ruby 1.8.7, "123"[0] would return the code for "1", or the number 49

      Since Ruby 1.9, "123"[0] returns the character at position 0, or "1". So you need to get ascii value you call "123"[0].ord ==> 49

      I sent an update to Martin via his email.

      posted in Plugins
      J
      Jim
    • RE: WebDialog parameters passed to callback cause .to_l error

      Had this idea today:

      
      separator = (1/Float(2)).to_s[1]
      
      
      posted in Developers' Forum
      J
      Jim
    • RE: SketchUp 2015 is 64bit

      @david_h said:

      I am still struggling with loading some of my old reliable scripts into 2015. (Repair Broken Lines not withstanding) for some this I can change my work flow. But, for some scripts that I bought from SMUSTARD or whatever, years go that have an RBS extension, How do I load those. Plugin store of course uses RBZ.

      Any advice?

      thx,

      D

      For repair_broken_lines.rb - lines 27 and 42 - remove the space after the function name but before the (

      But probably TT's Cleanup plugin is better to use.

      posted in SketchUp Discussions
      J
      Jim
    • RE: [Plugin] Add Layer [1.1.0]

      Not wasted at all - the fact that my guess was correct validates a suspicion I had that the plugin is not as intuitive as it needs to be. Thanks for reporting.

      I find the core of many plugins can be written in few lines of code. It is far more difficult to create a good user experience.

      posted in Plugins
      J
      Jim
    • 1
    • 2
    • 11
    • 12
    • 13
    • 14
    • 15
    • 210
    • 211
    • 13 / 211