sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    My First Plugin: Spirograph

    Scheduled Pinned Locked Moved Plugins
    6 Posts 3 Posters 1.3k Views 3 Watching
    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.
    • E Offline
      Ellipser
      last edited by

      There is a certain condition when it makes a double line. That needs to be corrected, but for now, this is just something to play with.


      Spirograph.rb

      1 Reply Last reply Reply Quote 0
      • pilouP Offline
        pilou
        last edited by

        An adaptation ? ๐Ÿ˜„

        http://www.samstoybox.com/toypics/SpirographBox.jpg

        Frenchy Pilou
        Is beautiful that please without concept!
        My Little site :)

        1 Reply Last reply Reply Quote 0
        • xiombargX Offline
          xiombarg
          last edited by

          I just bought a used Spirograph for my daughter for Christmas last year. Great toy. ๐Ÿ˜„

          1 Reply Last reply Reply Quote 0
          • pilouP Offline
            pilou
            last edited by

            You must make some examples with some numbers and give us because if you take some big numbers you can only make Alt + Ctrl + Del ๐Ÿ˜ฎ ๐Ÿค“

            spiro.jpg

            Frenchy Pilou
            Is beautiful that please without concept!
            My Little site :)

            1 Reply Last reply Reply Quote 0
            • E Offline
              Ellipser
              last edited by

              The plugin is still in beta. I guess you guys are the beta testers and didn't know it ๐Ÿ˜„ .

              Unfortunately, large settings crash your system. I'll have to put in some sort of limit to what you can put in. I tried to get around the problem by making one curving segment, and then using a rotation matrix to just rotate the segment to save memory, but that hogs up as much memory as just doing the design in one fell-swoop.

              Also, I'm using groups, but what I should be doing is using edges. This way it will be easier to add colors using the paint brush. For the examples below, I cheated ๐Ÿ˜ณ by PrintScreen and then adding colors in Paint.

              For now, look at the pretty colors. Someone out there might want to use it for a kid's room or something playful.


              Sprirograph examples.jpg

              1 Reply Last reply Reply Quote 0
              • E Offline
                Ellipser
                last edited by

                For people just getting started with plug-ins, here's how you use one:

                1. Download the plug-in attached to the thread's first post.

                2. Click/drag it onto your desktop.

                3. Open any folder, and go look for where Sketchup's plugin file is kept on your computer. On mine it's in C:\Program Files (x86)\SketchUp\SketchUp 2013\Plugins
                  This is also called a "path" in computer lingo.

                Your path should be something similar. This is where you get to add features to your copy of Sketchup.

                1. Drop the Spirograph.rb file from step 2 into that folder. You have to re-start Sketchup to use it, because Sketchup only loads plugins at start-up.

                2. You should see a Plugin called "Spirograph". Try some settings like:

                16
                8
                7
                20

                and have fun.

                You can easily crash your system if you over-burden it with too many segments. Every curve can be reduced to line-segments, and "segments" is the setting you change to get a smoother effect. Too much smoothing will result in a system crash. It's sort of like that sandbox tool. It doesn't take too much to crash the system if you have an average-speed computer like mine. (For you pros using a graphics card of something, that probably doesn't apply.)

                20 is a good number for reasonable smoothness for segments.

                Anything above about 30 for the fixed radius is a bit much too. You don't end up with a nice design anyway, but a dense mat of lines/edges.

                At some point it may be possible to use some C++ code to do the heavy multiplications internally done in the plugin to reduce crashes, but for now, I'm using the convenience of Ruby at the expense of system resources.

                Pretty cool, huh? Takes you back to when you were a wee-lad and using those sharp-pins that held down the fixed radius. They wouldn't allow any sharp edges in any toy today, now would they?

                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