sketchucation logo sketchucation
    • 登入
    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.6b introduces important bugfixes for Fredo's Extensions Update

    [Plugin] Voxelize - Updated 2011-04-04

    已排程 已置頂 已鎖定 已移動 Plugins
    48 貼文 21 Posters 62.1k 瀏覽 21 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Dan RathbunD 離線
      Dan Rathbun
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • G 離線
        Gillman
        最後由 編輯

        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 條回覆 最後回覆 回覆 引用 0
        • T 離線
          TheDro
          最後由 編輯

          @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 條回覆 最後回覆 回覆 引用 0
          • 2 離線
            22curious
            最後由 編輯

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

            1 條回覆 最後回覆 回覆 引用 0
            • K 離線
              Khai
              最後由 編輯

              thanks Dro 😄

              1 條回覆 最後回覆 回覆 引用 0
              • mitcorbM 離線
                mitcorb
                最後由 編輯

                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 條回覆 最後回覆 回覆 引用 0
                • TIGT 離線
                  TIG Moderator
                  最後由 編輯

                  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 條回覆 最後回覆 回覆 引用 0
                  • mitcorbM 離線
                    mitcorb
                    最後由 編輯

                    Aaah yes. Thank you. 😄

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

                    1 條回覆 最後回覆 回覆 引用 0
                    • L 離線
                      Lobster
                      最後由 編輯

                      Thanks for this,

                      Interesting plug in.

                      voxelise.png

                      1 條回覆 最後回覆 回覆 引用 0
                      • Dave RD 離線
                        Dave R
                        最後由 編輯

                        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 條回覆 最後回覆 回覆 引用 0
                        • T 離線
                          TheDro
                          最後由 編輯

                          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 條回覆 最後回覆 回覆 引用 0
                          • TIGT 離線
                            TIG Moderator
                            最後由 編輯

                            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 條回覆 最後回覆 回覆 引用 0
                            • Dave RD 離線
                              Dave R
                              最後由 編輯

                              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 條回覆 最後回覆 回覆 引用 0
                              • L 離線
                                leminilab
                                最後由 編輯

                                @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 條回覆 最後回覆 回覆 引用 0
                                • O 離線
                                  octopus2
                                  最後由 編輯

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

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • Dave RD 離線
                                    Dave R
                                    最後由 編輯

                                    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 條回覆 最後回覆 回覆 引用 0
                                    • T 離線
                                      TheDro
                                      最後由 編輯

                                      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 條回覆 最後回覆 回覆 引用 0
                                      • F 離線
                                        Flashhawk
                                        最後由 編輯

                                        You are kidding me right? I mean you must kid me!! I did this by hand last week!!! I was totally not aware of your script and i made a voxelized soldier for a 3d Print project (3mm or 1/600 scale infantry) by overlaying a 3d-warehouse model with a matrix of 30x30x30 voxel and then deleting everything that was not used... (like in Michelangelos "I chipped off everything that did not look like a lion") Man i will so much use this next time!!!! Thanks alot!
                                        Flashhawk

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • Dan RathbunD 離線
                                          Dan Rathbun
                                          最後由 編輯

                                          @thedro said:

                                          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...)

                                          Yes it is.

                                          bounds() is defined in class Drawingelement

                                          Group, ComponentDefinition, ComponentInstance are all subclasses of Drawingelement, so they inherit their superclass' instance methods.

                                          At the console:
                                          Sketchup::Group.superclass()

                                          Sketchup::Drawingelement

                                          Sketchup::Drawingelement.superclass()

                                          Sketchup::Entity

                                          .. so they also have all Sketchup::Entity instance methods. And Sketchup::Entity is a subclass of Object so they have all of those instance methods, and module Kernel is mixed into Object, so they will have of those methods.

                                          I'm not here much anymore.

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • A 離線
                                            Anton_S
                                            最後由 編輯

                                            😆 Does anyone play Minecraft? -- everything is made of cubes

                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement