• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ 30% Off | Artisan 2 on sale until April 30th Buy Now

My ruby's

Scheduled Pinned Locked Moved Plugins
22 Posts 12 Posters 4.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    Pixero
    last edited by 21 Nov 2007, 18:02

    Here are three ruby scripts that I've written. Thanks to those who have helped me learn.

    JS MoveTool

    Description: Moves a selection with the arrow keys.
    Usage:

    1. Select a object or group of objects.
    2. Select the JS MoveTool and enter a distance in the VCB. Press Return/Enter.
    3. Now move with arrow keys.
    4. Use Alt + Up/Down to move in Z axis.
    5. You can enter a new distance at any time.

    Hopefully it will work on both Windows and OSX.
    Assign it to a shortcut hot key. For example Alt+M.

    JS Extrude (based on the Push Pull Z script by Didier Bur)

    Description : Extrudes a face/faces along either X, Y or Z axis or the normal direction.
    Usage : Select a face, select JS Extrude from the Plugins menu, choose direction, enter distance and here you go.

    JS Align

    Description: Use for aligning/flattening edges.
    Issues:

    1. If used on faces they will be triagulated.
      Since the script moves each vertice at a time,
      SketchUp's autofold feature will trangulate all non planar faces.
      I've tried to find a way of auto erasing all edges created by autofold but havens succeded.
      If you know how to fix it please let me know.
    2. The script doesnt work well with faces inside groups/components.

    Get them at my site: http://www.pixero.com

    Enjoy! πŸ˜„

    1 Reply Last reply Reply Quote 0
    • M Offline
      Mike Lucey
      last edited by 21 Nov 2007, 18:03

      Thanks Jan, much appreciated.

      Mike

      Support us so we can support you! Upgrade to Premium Membership!

      1 Reply Last reply Reply Quote 0
      • D Offline
        Daniel S
        last edited by 21 Nov 2007, 18:05

        Thank you Pixero!
        they work well all of them..
        I really like the align tool... Could be possible to make it work for aligning groups?
        I attach a image example.

        Daniel S


        Aligngroups.jpg

        1 Reply Last reply Reply Quote 0
        • P Offline
          Pixero
          last edited by 21 Nov 2007, 18:05

          I've updated JS Align so it works with groups/components as well.
          If using custom value with groups, also use the Align groups: Max, Min or Center.

          Enjoy! πŸ˜„

          1 Reply Last reply Reply Quote 0
          • K Offline
            Krisidious
            last edited by 21 Nov 2007, 18:06

            fantastic... thanks...

            By: Kristoff Rand
            Home DesignerUnique House Plans

            1 Reply Last reply Reply Quote 0
            • D Offline
              Daniel S
              last edited by 21 Nov 2007, 18:06

              I was wishing this feature for a long time.
              Thank you very much!!!

              Daniel S

              1 Reply Last reply Reply Quote 0
              • B Offline
                bellwells
                last edited by 21 Nov 2007, 18:07

                The extrude tool is not working for me neither in SU5 nor SU6. I can get the dialogue box (select a face>Plugins>JS Extrude) and enter my data but nothing happens. Any thoughts? I'll check back in the AM.

                Ron

                1 Reply Last reply Reply Quote 0
                • P Offline
                  Pixero
                  last edited by 21 Nov 2007, 18:07

                  Just a thought... are you extruding in a direction that is possible?
                  (I mean not in 90 degrees from the surface normal.)
                  And of cause you'll have to click ok.
                  Other than that I dont know. Are you on Mac or Windows?

                  And Coen, I want people to come to my site to download.

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    Pixero
                    last edited by 21 Nov 2007, 18:08

                    Two more scripts added.

                    JS Shadow Threshold
                    Set the threshold for when a transparent object will cast shadows.
                    Works on either entire model or a selection.

                    JS Shadow Control
                    Set if a selection should cast or receive shadows.

                    Get them at my site: http://www.pixero.com

                    Enjoy! πŸ˜„

                    Jan

                    1 Reply Last reply Reply Quote 0
                    • ToboboT Offline
                      Tobobo
                      last edited by 21 Nov 2007, 18:09

                      Thanks for the align tool. It'll make my job a lot easier. Those trees will be in line now. (muah ha ha)

                      Toby

                      Philippians 4:13

                      I can do everything through him who gives me strength.

                      1 Reply Last reply Reply Quote 0
                      • I Offline
                        Insitebuilders
                        last edited by 21 Nov 2007, 18:09

                        JS

                        Not sure if I'm missing somethg, is there a way to get a translucent surface (like the glass in a window) to receive a shadow (using JS ShadowControl)? Or is this for opaque objects? Also, at say 75% translucence (>) should the object be casting a faded shadow? I haven't been able to make that work....

                        BTW thanks for these tools, especially your Zoom Selected tool, I've always had to ident the object in the Outliner, the use 3 shortcuts, to Edit, Hide the rest of the model, and then zoom extents. When you issued that one it became one step and I thank you ea time I use it.

                        Thx again.

                        /D

                        1 Reply Last reply Reply Quote 0
                        • B Offline
                          bellwells
                          last edited by 21 Nov 2007, 18:10

                          @pixero said:

                          Just a thought... are you extruding in a direction that is possible?
                          (I mean not in 90 degrees from the surface normal.)
                          And of cause you'll have to click ok.
                          Other than that I dont know. Are you on Mac or Windows?

                          And Coen, I want people to come to my site to download.

                          Jan,

                          Sorry it took me so long to acknowledge your reply. As is often the case, it was my fault-operator error.
                          Thanks.

                          Ron

                          1 Reply Last reply Reply Quote 0
                          • P Offline
                            Pixero
                            last edited by 17 Jan 2008, 20:31

                            Added small update to jsBackgroundColor.rb so you now can control ground color as well.

                            555 Security Incident Detected

                            favicon

                            (www.pixero.com)

                            1 Reply Last reply Reply Quote 0
                            • P Offline
                              Pixero
                              last edited by 6 Feb 2008, 17:42

                              While working on another script I stumbled on this (camera.focal_length) in the docs.
                              I haven't seen this before and since I repeatedly have had problems with using field of view I though I'd share it.
                              Here is a small script called jsFocalLength that lets you set the cameras focal length in mm. You'll find it under Camera menu.

                              555 Security Incident Detected

                              favicon

                              (www.pixero.com)

                              1 Reply Last reply Reply Quote 0
                              • tbdT Offline
                                tbd
                                last edited by 6 Feb 2008, 18:21

                                is not the same as entering "35mm" in VCB while on Zoom tool ?

                                SketchUp Ruby Consultant | Podium 1.x developer
                                http://plugins.ro

                                1 Reply Last reply Reply Quote 0
                                • P Offline
                                  Pixero
                                  last edited by 6 Feb 2008, 21:26

                                  Ok, I never knew it was there. Anyway, if anyone wants it...

                                  1 Reply Last reply Reply Quote 0
                                  • P Offline
                                    Pixero
                                    last edited by 15 Feb 2008, 19:23

                                    Added js Frame Step. A script for showing a specified frame of an animation.
                                    You need at least two scenes for it to work. Type in the frames per second you use (Typically: NTSC 30, PAL 25, Film 24) and then the frame you want to go to.

                                    Added js Camera Tool. A script for offseting camera rotation and translation numericly.

                                    555 Security Incident Detected

                                    favicon

                                    (www.pixero.com)

                                    1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      Pixero
                                      last edited by 7 Sept 2008, 08:55

                                      Updated my jsMoveTool at a request. Now press ctrl (Apple key on Mac) to move 1/10 the entered value and Shift to move 10 * the entered value. (And press alt for moving in Z direction as before.)
                                      Thanks to Rick W for fixing a bug.

                                      Get it at my site http://www.pixero.com

                                      Enjoy! πŸ˜„

                                      1 Reply Last reply Reply Quote 0
                                      • 2 Offline
                                        2myChaGrin
                                        last edited by 7 Sept 2008, 19:24

                                        Thanks so much for you work Jan. I use your scripts quite often and have never officially said thank you.

                                        1 Reply Last reply Reply Quote 0
                                        • Z Offline
                                          zed252000
                                          last edited by 10 Sept 2008, 16:03

                                          πŸ‘
                                          this will be helpful.
                                          thanks!

                                          Whatever we IMAGINE....

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 1 / 2
                                          • First post
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement