sketchucation logo sketchucation
    • Login
    1. Home
    2. TIG
    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!
    ⚠️ Important | Libfredo 15.8b introduces important bugfixes for Fredo's Extensions Update
    Offline
    • Profile
    • Following 0
    • Followers 12
    • Topics 264
    • Posts 19,745
    • Groups 6

    Posts

    Recent Best Controversial
    • RE: Width, Depth and Length of Component Instance

      Even if it's not rectangular you can still find horizontal and vertical faces of an enclosing rectangle for its main faces.

      horizontal>>> face.normal.z==-1 >>>down ...==1 >>>up
      vertical>>> face.normal.z==0

      you can find the bottom down face (faceh), find its edges, then find an edge that matches in the se of vertical faces' edge (if you might have say several vertical faces then find the one with the longer edges if that's the one you need etc...)

      you now have a long bottom face (faceh) and an adjoining vertical face (facev) that's sharing a (long) edge.

      faceh.bounds.max.x-faceh.bounds.min.x and similarly for .y give the plan size (x & y) and facev.bounds.max.z-facev.bounds.min.z give the overall height (z) ?

      posted in Developers' Forum
      TIGT
      TIG
    • RE: Width, Depth and Length of Component Instance

      If it's a solid faced rectangule then get the bounds of two (or three) of the 3D opposed faces... then you can work out the xyz dims of the object, without resort to it's over all bounds...

      posted in Developers' Forum
      TIGT
      TIG
    • RE: Ruby Tutorial: How to create and add a component from Ruby

      Try using groups as an alternative...
      ...
      entities=model.active_entities
      group=entities.add_group
      gents=group.entities
      ...
      gents.add_line(pt1,pt2)
      gents.add_face(pt1,pt2,pt3...)

      etc, all made inside the group NOT model

      then transform group etc

      group1=group.copy
      group1.make_unique

      transform group1 etc

      ...

      posted in Developers' Forum
      TIGT
      TIG
    • RE: Ruby Tutorial: How to create and add a component from Ruby

      But the Joist and Rafter tools make a component that is repeatedly copied AND if you subsequently edit one of them then they all change ! If you want parts that are unconnected then use Groups - but make each unique - as I said within a script they can be viewed as clones of the same thing and they'll edit together, but doing an edit in the "real world " has each of them treated as a single entity...

      posted in Developers' Forum
      TIGT
      TIG
    • RE: Ruby Tutorial: How to create and add a component from Ruby

      If you make a component and place it several times then anything you do to one instance affects all of the others - unless you use 'make_unique' on it first. Using groups and copying them avoids this, BUT a recently noted but undocumented quirk in the SUp Ruby coding means you must use 'make_unique' on a group as you copy it... otherwise that copy is treated as an 'instance' (just as if it were a component anyway !!!) and then both might change as you alter one...

      posted in Developers' Forum
      TIGT
      TIG
    • RE: Ruby Tutorial: How to create and add a component from Ruby

      @tomot said:

      How do I code a radial array of cubes about a central point?
      tia

      Look into my "Grow.rb" script to see how to do all types of matrix arraying etc - Move, Rotate and Scale of copies...

      posted in Developers' Forum
      TIGT
      TIG
    • RE: ½ PIPE ALONG PATH

      I smile inside.

      posted in Developers' Forum
      TIGT
      TIG
    • RE: ½ PIPE ALONG PATH

      The twisting is a part of followme. To keep it flat needs a new followme writing, which would be too much for mortal man - when he's not getting paid !

      posted in Developers' Forum
      TIGT
      TIG
    • RE: ½ PIPE ALONG PATH

      See the adjacent thread about make 'logs'. Didier already has a Balustrade tool...

      You could make a ExtrudeSelectedFaceAlongPath.rb... A sort of combination of my set of ...AlongPath... tools and RickW's CopyAlongPath... script

      Then you could draw any face shape you like - half pipe, cornice etc without the need to orient it at 90 degrees to the start of the path. You'd select the face and the path and it'd do it for you ? Alternatively you could use external face components - like Didier's Balustrade... script and extrude those along the path - ExtrudeSelectedComponentsFaceAlongPath.rb...

      This is all possible... but is it worth doing when you can already draw and do this with a little effort and pushpull/followme ? Perhaps an alternative idea would be a script that orients a selected face at 90 degrees to the start of a selected path for the later pushpull or followme... that way you use the inbuilt base tools for the main work, but we'd have a neat tool to start you off - OrientFaceToPath.rb ?

      posted in Developers' Forum
      TIGT
      TIG
    • RE: [Plugin] Script for making of logs

      If it's too difficult to code in Ruby (though drawing two coplanar arcs that will face doesn't seem that impossible ?), then why not change tack and follow Didier's example in his 'Balustrade.rb' script (or even Todd's 3Dtext tool) ?

      This method allows you to draw any section you like... In your case you'd draw up a a set of simple outlines with the curved top and the bottom slot etc, with a face centred at 0,0,0... and then save them as say log300,skp, log400.skp etc. These are the 'component' "log" faces your script will load into the model... as you might choose from a dialog's list (which itself is made by looking into your ../Plugins/../Logs/ folder and listing its current contents - that way you can add to/subtract from the available log section component faces as you wish). Your script would then place the desired face component and explode it, then take its face and pushpull it by the amount you specified in the other entry in the dialog...

      posted in Plugins
      TIGT
      TIG
    • RE: Old West Board sidewalks..

      Can't you use the joist tool anyway ? First do a bit of preparation - decide the board width, and thickness(=depth) and spacing(=centers) = board + gap, e.g. let's say your plank width is 6" and say its depth is 2", then with a gap=0.5" > centers=6"+0.5"=6.5". Enter these into the joist tool as the three parameters in their order.

      You get your board-walk planking...

      posted in Plugins
      TIGT
      TIG
    • Section Cut Face

      Updated SectionCutFace.rb ruby script is here
      http://www.sketchucation.com/forums/scf/viewtopic.php?f=153&t=1517

      posted in Plugins
      TIGT
      TIG
    • RE: Weird behaviour

      @unknownuser said:

      ...the french name went away but there still is something weird going on. what you can see in the attached picture is the result of clicking twice along the green axis (and thus defining a line parallel to it) and then return. it did mirror the box but the new one is below the ground plane. what could be the reason for that?

      edson

      I can't get that error to occur on my PC. What's your platform, version of SUp, units, size/scale of cube etc ?

      posted in Developers' Forum
      TIGT
      TIG
    • RE: Weird behaviour

      Didier's site seems to have a glitch with Mirror.rb - 'lost in translation'. The imperial AND metric versions should be the same, except that Didier translates the text/prompts to French in his metric version. Either version will work in any units. You can get the English one from: Dead link

      Save this into the Plugins folder - it's Mirror.rb: delete any similar files in that folder, e.g. Mirror3.1.rb...

      posted in Developers' Forum
      TIGT
      TIG
    • RE: Request: Automatically add ConstructionPoint at Center of Ci

      In principle you'd have some 'observer' auto-made in each model that's watching for new geometry to be added. If it forms an arc or circle a simple script adds a centre point ?

      posted in Plugins
      TIGT
      TIG
    • RE: Tubealongpath.rb

      Feel free... it's the only way we learn...

      posted in Plugins
      TIGT
      TIG
    • RE: Tubealongpath.rb

      Typically at the end of an interactive script there's a menu section, something like:

      if( not file_loaded?("............."))

      XXXXXXXXXXXXXXXXX

      file_loaded="..........."

      The "............." is the script's name and the XXXXXXXXXXXXXXXX part is the menu definition - this is so it only loads once if for some reason you manually load the script etc you'll only get one menu item.

      To add a right-click context-menu you need to add some code - like azuby's or similar forms. You replace the title and 'action' to suit... so in "Mirror.rb" it's:
      ...
      UI.add_context_menu_handler do |menu|
      if Sketchup.active_model.selection
      menu.add_separator
      menu.add_item("Mirror Selection") { Sketchup.active_model.select_tool MirrorTool.new}
      end#if
      end#do menu
      ...
      inside the if loop at the end as well as the normal Plugins Menu instructions...

      Azuby's equivalent way would be:
      ...
      UI.add_context_menu_handler{|menu|menu.add_separator;menu.add_item("Mirror Selection"){Sketchup.active_model.select_tool MirrorTool.new}}
      ...

      posted in Plugins
      TIGT
      TIG
    • RE: Tubealongpath.rb

      Glad my script is useful...

      posted in Plugins
      TIGT
      TIG
    • RE: Hourglass on Right Click

      Try a full virus check. But it might be something that even a good virus checker fails to spot like ye olde 'nashi-worm' ? You can catch all sorts of things in hotels....

      posted in Corner Bar
      TIGT
      TIG
    • RE: Attributes - Export / Create More / Linking with Database ?

      Here's v1.6.

      It sorts out file/folder paths slightly differently, which might avoid the Mac crash. It also corrects the typo in a dialog reported by Didier...

      301 Moved Permanently

      favicon

      (www.sketchucation.com)

      posted in SketchUp Discussions
      TIGT
      TIG
    • 1
    • 2
    • 982
    • 983
    • 984
    • 985
    • 986
    • 987
    • 988
    • 984 / 988