• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Voxelize - Updated 2011-04-04

Scheduled Pinned Locked Moved Plugins
48 Posts 21 Posters 61.2k Views 21 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.
  • T Offline
    TheDro
    last edited by 24 Mar 2011, 14:59

    Well it's possible to spread out the cubes just by modifying any one of the cubes since they are all instances of the same component. So you can double click on one of the cubes, then use the scaling tool to shrink it, and they will all shrink while remaining in position, and this will produce spacing between them all. As for the plane slicing, I'm not sure I follow. Could explain in more detail, 22curious?

    I'll probably release a new version tonight that calculates the position of the cubes MUCH faster.

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dan Rathbun
      last edited by 24 Mar 2011, 15:08

      @thedro said:

      I'll probably release a new version tonight that calculates the position of the cubes MUCH faster.

      It is customary (here at SCF,) to replace the file in the first post of the topic, with the new version, and then edit the topic title (which only you can do because you "own" the topic,) to reflect the revision date.
      Example revised topic title:
      "[Plugin] Voxelize - Updated 2011-03-24"

      *** standard date format for Ruby is YYYY-MM-DD**

      Then you can slide all the way down to the bottom of the webpage, and click the "Bump" link to bring the topic to the top of the forum list (without needing to post a new message.)

      After you do that, I'll remove my version 1a and put a link back to the first post.

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • 2 Offline
        22curious
        last edited by 24 Mar 2011, 18:31

        @unknownuser said:

        spread out the cubes...double click on one...use scaling tool to shrink it.

        This is where that Homer [doh] audio plugin button comes in handy. Of course!
        'Wearing too many hats, my SKU skills are SKrUsty...

        @unknownuser said:

        As for the plane slicing
        My need may be met using asteronimo's SliceModeler.rb "plugin that slices a solid 3d model along 2 axes, f.i. an X- and a Z-axis." SliceModeler.rb is based on Tig's Slicer.rb (that isn't on the plugins list? but found at http://forums.sketchucation.com/viewtopic.php?f=180&t=10413&p=68825&hilit=slicer.rb#p688). I'm checking SliceModeler and Voxelize out now!

        ...another path may be combining a lattice>>cutting component>>Tig's Hole punching Tool.

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dan Rathbun
          last edited by 25 Mar 2011, 21:16

          Made a few changes for you Andrew:

          • properly module wrapped the plugin.

          • cube size is remembered during session in var @@cube_size

          • made it easier to control menu with constants defined at top of file

          • added validation for the menu item

          I think the "group test" should fire before the inputbox is displayed.
          But otherwise it looks good.


          Latest version now in the first post

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • G Offline
            Gillman
            last edited by 29 Mar 2011, 13:19

            Very intesting plug-in, and practical too. I was looking for a quick way to place a repeating element on a sphere (in this case Clint Howard's ship from Star Trek TOS "The Corbomite Manuver"). I edited the cube and replaced it with a pyramid with geodesic spheres at each angle.Fesperus.jpg

            It turned what would have been a mind-numbing task into something trivial. Now all I have to do is upload it to the warehouse.

            1 Reply Last reply Reply Quote 0
            • T Offline
              TheDro
              last edited by 30 Mar 2011, 12:52

              @Gillman: I'm glad to hear that it was of use to you.

              @Khai: I've been looking at the structure of the .schematic file which is used to import structures into Minecraft using MCEdit. I think I've got it figured out but I still need to write the code and I'm reading the book of ruby to try and figure out the best way to do it.

              @Everyone: I've added a new "spiral" algorithm to prevent interpreting sharp edges of solids as "entrances" to the solids. Basically, I improved the algorithm to work with more solids which is good. I'll upload the new version once I'm not too busy with work/school.

              1 Reply Last reply Reply Quote 0
              • 2 Offline
                22curious
                last edited by 30 Mar 2011, 13:07

                @TheDro, the spiral refinement will be useful - looking forward to it - thanks!

                1 Reply Last reply Reply Quote 0
                • K Offline
                  Khai
                  last edited by 5 Apr 2011, 00:37

                  thanks Dro πŸ˜„

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mitcorb
                    last edited by 5 Apr 2011, 10:55

                    You will discover, while scaling an instance of a component, that the others do not scale accordingly, at least while using the native scale tool.

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

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      TIG Moderator
                      last edited by 5 Apr 2011, 11:18

                      Scaling one Component Instance from the 'outside' won't affect other Component Instances of the same Component BUT scaling a Component Instance's 'contents' will change all Component Instances of that Component - that's because when you edit the contents of a Component Instance you change the Component Definition itself and this is repeated across all of its Instances]...

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        mitcorb
                        last edited by 5 Apr 2011, 11:39

                        Aaah yes. Thank you. πŸ˜„

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

                        1 Reply Last reply Reply Quote 0
                        • L Offline
                          Lobster
                          last edited by 11 Jun 2011, 11:07

                          Thanks for this,

                          Interesting plug in.

                          voxelise.png

                          1 Reply Last reply Reply Quote 0
                          • Dave RD Offline
                            Dave R
                            last edited by 11 Jun 2011, 12:09

                            Is there any chance of making this work to allow selection of a component as well as a group?

                            Etaoin Shrdlu

                            %

                            (THERE'S NO PLACE LIKE)

                            G28 X0.0 Y0.0 Z0.0

                            M30

                            %

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              TheDro
                              last edited by 11 Jun 2011, 13:11

                              I might eventually get to adding that feature but it's hard to say when. I've been pretty busy this summer and plan to be until September so I might not get to programming any time soon. I just checked out some of the methods of components (instance and definition) and there is a "bounds" method (not found in the api documentation...) which I could use to run my script. This means it should be possible to make it work for components but I might not get to it any time soon.

                              Have a great summer πŸ˜„ .

                              1 Reply Last reply Reply Quote 0
                              • T Offline
                                TIG Moderator
                                last edited by 11 Jun 2011, 13:20

                                Of course you could always explode the component-instance and immediately group the highlighted geometry that results... now you have a group to process...

                                TIG

                                1 Reply Last reply Reply Quote 0
                                • Dave RD Offline
                                  Dave R
                                  last edited by 11 Jun 2011, 13:25

                                  That's true, TIG. I guess for no more often than I would use the plugin, that wouldn't be too much trouble.

                                  Etaoin Shrdlu

                                  %

                                  (THERE'S NO PLACE LIKE)

                                  G28 X0.0 Y0.0 Z0.0

                                  M30

                                  %

                                  1 Reply Last reply Reply Quote 0
                                  • L Offline
                                    leminilab
                                    last edited by 12 Jun 2011, 13:56

                                    @unknownuser said:

                                    This screams out for Sketchy Physics to drop all those cubes.

                                    πŸ‘ That's what I thought too!
                                    Can't wait to see that! πŸŽ‰

                                    • "Live every day as if it were your last and then some day you'll be right."
                                    • "ThomThom rules!!!"
                                    1 Reply Last reply Reply Quote 0
                                    • O Offline
                                      octopus2
                                      last edited by 23 Jun 2011, 22:32

                                      Is there a way of knowing how many cubes were generated?

                                      1 Reply Last reply Reply Quote 0
                                      • Dave RD Offline
                                        Dave R
                                        last edited by 24 Jun 2011, 00:18

                                        Since the plugin creates the cubes as instances of a component, select one of them and look at the Entity Info box. It'll tell you how many there are.

                                        Etaoin Shrdlu

                                        %

                                        (THERE'S NO PLACE LIKE)

                                        G28 X0.0 Y0.0 Z0.0

                                        M30

                                        %

                                        1 Reply Last reply Reply Quote 0
                                        • T Offline
                                          TheDro
                                          last edited by 24 Jun 2011, 00:33

                                          If you open up Window>>Ruby Console, before running the plugin, the debug information will tell you how many cubes were created, among other things. The other things are the amount of time each step takes to run. This is probably more helpful to me than to you but remember, this is still in beta πŸ˜„.

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

                                          Advertisement