• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

[Plugin] Dynamic Snap

Scheduled Pinned Locked Moved Plugins
15 Posts 7 Posters 15.4k 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.
  • M Offline
    mattritzman
    last edited by mattritzman 22 Aug 2009, 06:18

    This plug-in changes the snap distance depending on how zoomed in you happen to be.

    "Why on earth would you want to do that?" you ask. Well, you see I've got a tabletPC (it is way fun), and I'm trying to use the pen as much as possible (gmote is a must!*). It turns out, while using the pen, I can't use the value control box efficiently. So I turned to the snaps. They help, but it is a pain to change them by hand. After a bit of dabbling in Ruby I came up with this solution.

    There are a ton of things that could be done to this script to make it more functional. It currently works only for inches, it could be activated by a button, it could be better integrated into the interface. I don't know if I'll get around to any of them, but you are welcome to do anything you want to it. It is about a 2 on the simplicity scale.

    Please note, this is my first post-able Ruby, so all possible disclaimers apply.

    --Matt

    • http://www.handform.net/gmote.php
      http://forums.sketchucation.com/viewtopic.php?f=15&t=14116&p=106316
      p.s. Thanks Chris for your excellent tutorial.

    Updated (8/22/09): Call manager and provider by name.


    Updated

    1 Reply Last reply Reply Quote 0
    • J Offline
      Jim
      last edited by 22 Aug 2009, 14:10

      Matt,

      I don't have a tablet, but your solution sounds like it could useful for everyone. A dynamic grid, in a way.

      Hi

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by 22 Aug 2009, 14:22

        Matt,

        I found that I had to change this: provider = manager[0] to this: provider = manager['UnitsOptions'] in order for it to work on my machine.

        Should probably do the same with the provider['LengthSnapLength'] statement.

        Apparently, the order that the options providers are returned is not concrete.

        Hi

        1 Reply Last reply Reply Quote 0
        • M Offline
          mattritzman
          last edited by 22 Aug 2009, 15:24

          Thanks, Jim. I made the changes and reposted it. Dynamic Grid would have been a better name.

          1 Reply Last reply Reply Quote 0
          • C Offline
            Chris Fullmer
            last edited by 24 Aug 2009, 05:23

            Hey Matt, good to see you around here, and publishing a script! Glad you got it done, found a little time to learn some Ruby then I guess? πŸ˜„

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            1 Reply Last reply Reply Quote 0
            • S Offline
              solarepiphany
              last edited by 24 Aug 2009, 21:19

              Any chance you can share your tablet specs Matt? I've been looking for one with good SU capabilities for some time now!

              Thanks

              1 Reply Last reply Reply Quote 0
              • M Offline
                mitcorb
                last edited by 24 Aug 2009, 22:58

                I would be interested in this plugin since I have a tablet pc, also. But, I think I will need to observe its progress for a while.

                I take the slow, deliberate approach in my aimless wandering.

                1 Reply Last reply Reply Quote 0
                • M Offline
                  mattritzman
                  last edited by 25 Aug 2009, 16:28

                  @ Chris, just scratching the surface. Even with the tiny bit I've learned it is quite empowering.

                  @ solarepiphany,
                  HP TouchSmart tx2
                  AMD Turion X2 Dual Core 2.1 GHz
                  4 GB RAM
                  64-bit

                  Check out the reviews. It is a bit heavy for a tablet (4lb). It runs a bit hot. The battery life could be much better. It could be a bit sturdier. It also came with a ton of bloatware.

                  But I like it a lot. So far, it does what I want it to do.

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mattritzman
                    last edited by 25 Aug 2009, 16:30

                    @ mitcorb,
                    You are welcome to add to it and improve it.

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      mitcorb
                      last edited by 25 Aug 2009, 22:51

                      Hi, matt:
                      Sorry, I have not learned the Ruby language yet.
                      I can certainly download and test out the plugin and give you my observations from a layman's point of view on this tablet. I wouldn't say that this unit would be recommended, considering the age. I just inserted the specs below for your information.

                      By the way, I am transcribing on my tablet right now.
                      Motion Computing LE1600, an older model slate style with attachable keyboard/dock. I also use a wireless mouse. It helps to be ambidextrous.
                      1.50 gigahertz Intel Pentium M
                      64 kilobyte primary memory cache
                      2048 kilobyte secondary memory cache
                      Bus Clock: 100 megahertz
                      BIOS: Motion Computing - LE1600 A12 12/19/2006
                      Drives Memory Modules 1526 Megabytes Installed Memory (maxed out).
                      Slot 'DIMM A' has 512 MB
                      Slot 'DIMM B' has 1024 MB
                      60.01 Gigabytes Usable Hard Drive Capacity
                      37.11 Gigabytes Hard Drive Free Space
                      Dual Toshiba Li-Ion batteries for approx. 5 hours mobile time in real life, (claimed up to 8 hours).
                      Mobile Intel(R) 915GM/GMS,910GML Express Chipset Family [Display adapter] (2x)
                      Digital Flat Panel (1024x768) [Monitor]
                      The screen is actually a Wacom product laundered, I mean licensed out either to Toshiba or direct to Motion.

                      This unit came with Alias Sketchbook Pro(bought out and thrown on a shelf by Autodesk). That is still fun, when I can get to it.

                      I take the slow, deliberate approach in my aimless wandering.

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        mattritzman
                        last edited by 26 Aug 2009, 15:05

                        Mitcorb,
                        That's a real classic. I remember dreaming about those specs when it first came out.

                        Sketchbook is still awesome! Autodesk hasn't ruined it yet.

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          mitcorb
                          last edited by 26 Aug 2009, 19:36

                          Hi, Matt: I have loaded the plugin. However, cannot see any hint of the script in the menus. Should I operate it from the console? Should I see any command in the menus, or the right click context?
                          I am probably doing something wrong.
                          Lemme know.
                          mitcorb

                          by the way, loaded it on both the tablet and my desktop with no clues.

                          I take the slow, deliberate approach in my aimless wandering.

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            mattritzman
                            last edited by 26 Aug 2009, 20:58

                            Currently, it just starts when you start SketchUp (if it is in your plugin path). I haven't put together an interface; I'm waiting for C.Fullmer's next tutorial before tackling that πŸ˜‰

                            Create a rectangle or draw a line, and watch the VCB. It should snap to whole numbers (unless you are zoomed in really close).

                            The script will give strange results if your units are set to anything but inches 😞

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              matteo
                              last edited by 26 Aug 2009, 23:06

                              hi Matt, and thank you for this plugin.
                              That's a very smart idea. β˜€

                              If you don't mind, I've converted the values so that it works with metric units: my experience with ruby programming is zero, I've just converetd inches into centimeters, after a bit of tweaking. πŸ˜‰

                              What I understand is that sketchup's internal engine works in inches, even if the length is displayed in meters or centimeters.
                              Please correct me if I made some mistakes. 😳

                              /matteo


                              dynamic_snap_mlr_005_metric.rb

                              hire me: http://www.nonsolo3d.it/ !

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                azharsunny Newcomers
                                last edited by 10 Oct 2022, 05:24

                                Find Search Here Now! Search For Juegos para descargar With Us. We just got better. Real-Time Data. Connect Here. Make Things Easy. Connect on any device. Try It Free. Quality tested. Newest look. Results in seconds. Unbeatable Value. descargar apks

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

                                Advertisement