sketchucation logo sketchucation
    • 登入
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] QHull

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

      I know there was a plugin produced for this a while back, but I wanted to make something that was fully integrated. So, hopefully no offense to the previous developers. I didn't build off anyone else's work, all from scratch.

      This plugin uses the Qhull libraries to produce voronoi, convex hull, delaunay, and half point shapes. Everything is managed by the plugin, so no need to produce data external to SU.

      In the plugins menu, under Qhull, there are 4 submenus:
      Voronoi - produces voronoi shapes, which tend to be rather spiky.
      Convex - produces solid, convex shapes that are a 'shell'
      Delaunay - produces 'mostly' solid (may have holes), convex shapes that contain a lot of internal structure
      Half - produces 'mostly' solid, convex shapes, not sure what else the generated data is supposed to represet... 😆

      Each submenu has items for:
      Small: uses 10 random points
      Medium: uses 50 random points
      Large: uses 100 random points
      Huge: uses 500 random points
      Selection: uses the vertices of the selected data

      Voronoi has some extra options that attempt to produce better visual results
      Selection (sphere) - adds an array of points in a sphere around the selection. Usually produces more 'knobby' results
      Selection (cube) - adds an array of points in a cube around the selection. Usually produces more of a 'star' result
      Selection (free) - doesn't add any extra data. Typically produces VERY spiky results.

      Qhull will not always generate valid data, especially from selection. The plugin will usually warn you if it doesn't produce valid data.
      Also, delaunay can produce A LOT of data, so be careful when using it from selection.
      Half point tends to produce physically very small shapes... I don't know why. I don't really know the math behind that one.

      I don't have much time to update these, so... sorry if I'm not able to make much in the way of improvements. I hope it's useful!

      The zip contains the rb and a qhull directory with the executables for Windows in it. Just extract to your plugins directory. Sorry, don't know what it will take to update for Mac.

      And, of course, QHull is copyright by the Geometry Center, qhull.org.


      voronoi.jpg


      delaunay and convex hull

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

        Cheers, i'll have a play with this later this evening 👍

        http://remusrendering.wordpress.com/

        1 條回覆 最後回覆 回覆 引用 0
        • Chris FullmerC 離線
          Chris Fullmer
          最後由 編輯

          Great job! This has been a highly requested plugin lately.

          Chris

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

          1 條回覆 最後回覆 回覆 引用 0
          • thomthomT 離線
            thomthom
            最後由 編輯

            Would you mind adding "[Plugin]" to this thread's title? It makes it easier to search for plugins posted on this forum.

            Thomas Thomassen — SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

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

              Looks like someone did. Thanks! Sorry about that! 😳

              1 條回覆 最後回覆 回覆 引用 0
              • thomthomT 離線
                thomthom
                最後由 編輯

                👍 😄 👍

                Thomas Thomassen — SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 條回覆 最後回覆 回覆 引用 0
                • pilouP 離線
                  pilou
                  最後由 編輯

                  How is supposed to work? (works with the V6 ?)
                  Must I Selected something on the screen? ... ❓

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

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

                    I haven't tested with V6... I suspect it's not compatible because of I'm using some SU7 flags on the start_operation command. I'll update that to do a version check.

                    Anyway, as I wrote previously, you can either use one of the Small, Medium, etc commands to generate random shape, or select something and use the Selection entry.

                    When using selection, it won't always generate a result. If the selection is all on a single plane, you won't get anything out.

                    EDIT: I updated it to do a version check for SU7 vs SU6. Tested on SU6.

                    1 條回覆 最後回覆 回覆 引用 0
                    • pilouP 離線
                      pilou
                      最後由 編輯

                      Yes! That whas that! Don't works with the V6 😉
                      Works fine with the v7! ☀


                      qhull.jpg

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

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

                        It should work now with V6.

                        1 條回覆 最後回覆 回覆 引用 0
                        • pilouP 離線
                          pilou
                          最後由 編輯

                          Yes works now for the v6 😉
                          "Half" start size is very very very little! Maybe like 5 pixels!!! 😮


                          VORO.jpg

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

                          1 條回覆 最後回覆 回覆 引用 0
                          • T 離線
                            tomasz
                            最後由 編輯

                            Can someone enlighten me, please? What it the purpose of having such a random geometry?
                            ❓

                            Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

                            1 條回覆 最後回覆 回覆 引用 0
                            • halroachH 離線
                              halroach
                              最後由 編輯

                              It's a very nice plugin!
                              It would be even nicer if it were more stable and responsive with user selected points to create the different shapes.
                              I wasn't able to create any shapes out of user selected points. How do I select points? do I select lines? or points created with one of the point plugins? (that didn't work for me either...).
                              This plugin can have great potential...

                              Very Nice!

                              FlexTools - Super Quick Windows, Doors, Slats...

                              1 條回覆 最後回覆 回覆 引用 0
                              • S 離線
                                skybluessy
                                最後由 編輯

                                thanks for the developer,very nice

                                1 條回覆 最後回覆 回覆 引用 0
                                • C 離線
                                  craigbic
                                  最後由 編輯

                                  YES!!!! I have been really.....really....REALLY needing this lately! I can't wait to try this as soon as I am done writing this reply. I'll let you know how it goes.

                                  @unknownuser said:

                                  Can someone enlighten me, please? What it the purpose of having such a random geometry?

                                  Tomasz,

                                  I wouldn't call it "random geometry" as the "randomness" would depend on the point cloud used as the basis for the Voronoi diagram but rather call it "mathematically generated geometry". 3D Voronoi structures (2D Voronoi diagrams aside) are used in cellular-level research, bone fatigue studies, and experimental cellular architecture.

                                  Checkout the Sketchup Graphics Blog at http://sketchupgraphics.com

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • C 離線
                                    craigbic
                                    最後由 編輯

                                    Well, there are a few snags but I am still VERY pleased with this large chunk of progress. Kudus, avariant! This is a major step forward in the Qhull/Voronoi plugin development.

                                    Has ANYBODY been able to get the "selection" versions of Voronoi, convex, Delaunay, or half working at all? I have been unable to do so under any circumstance regardless of point cloud size or attitude in SU6. I use SU6 at work and SU7 at home so I haven't tried it in SU7 yet. I generated lsystem point clouds of various sizes and was totally unable to get them to work. Then I tried various hand-made point clouds, ones generated from sandbox meshes, and even point clouds generated from 2D Voronoi diagrams and all did not work (see error message pic).

                                    On the positive side, all of the operations based on points generated by rbox work just fine and it is really nice to have them working within SU! I guess for now, to generate 3D Voronoi geometry from my own points, I'll have to follow my own procedure as outlined in this post

                                    I feel like we're almost there and it will only take a slight nudge to get this totally working.....I am still quite excited about this.


                                    lsystem point cloud


                                    Error message I get when using a selection of points

                                    Checkout the Sketchup Graphics Blog at http://sketchupgraphics.com

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • pilouP 離線
                                      pilou
                                      最後由 編輯

                                      @unknownuser said:

                                      Has ANYBODY been able to get the "selection" versions of Voronoi, convex, Delaunay, or half working at all?

                                      In fact yes ☀
                                      You must make a group before launch the Qhull plug 😉
                                      Half works also but result is like 111 pixel at the origin so you must rescale the result 🤓

                                      For your points I don't know yet but I suppose if you make a group maybe that works too 😉


                                      voro2.jpg

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

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

                                        OOOhhhhh.... oversight on my part!

                                        When examining the standard SU 'model', there usually aren't construction points. Everything is edges and faces. So, I just search for all the edges and use the starting vertex for each edge (to avoid duplicate points, I don't use the end). It never occurred to me to also search for construction points, but I can see how that would be useful!

                                        To see how the selection part works now, create a random convex shape. Then select the component, and do voronoi on selection. There you will see how it works. In the meantime, I'll update it to capture construction points also.

                                        As far as purpose.... well... it's artistic, right? 😆
                                        Actually, convex hull can have a legitimate purpose. If you have a complex model, do a convex hull selection on it, you'll get a sort of 'shrink wrap' shell of the entire model. I'm sure the others have legitimate purposes too. 😉

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

                                          Add the actual plugin! (D'oh)

                                          EDIT: Updated to work for SU6
                                          EDIT 5/14/2009: Updated to work with ConstructionPoints


                                          QHull.zip

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

                                            Fixed for using Construction Points.

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

                                            Advertisement