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] Face Flattener 0.19

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

      Hey,

      I have made a script to simplify models or correct geometry that is close to coplanar and making it coplanar. Currently the script flattens geometry either to a plane with a normal of (0,0,1) - facing straight up - or (X,Y,0) - facing straight out - and after you flatten to an initial (X,Y,0) direction all else will follow either parallel or perpendicular (90 degrees) to that initial flatten. Faces with a normal within 30 degrees of (0,0,1) will flatten to a plane that just faces straight up, where all else flattens straight out. These settings can be adjusted within the code.

      The order of operations:

      1. Select some geometry
      2. Right click, select Flattening Script
      3. Left click on a face (this decides the plane the geometry will project to)

      Thanks,
      Zach


      faceFlattener019.rb

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

        Thanks, Zach. I was actually thinking about a script like this, fond as I am of the similar "Setpt" command in Rhino.

        col sporcar si trova

        1 條回覆 最後回覆 回覆 引用 0
        • D 離線
          dylan
          最後由 編輯

          Thanks Zack.
          This could prove really useful for the bad AutoCad imports I sometimes get.

          http://dmdarchitecture.co.uk/

          1 條回覆 最後回覆 回覆 引用 0
          • M 離線
            matteo
            最後由 編輯

            Thank you. This may become one of the most used scripts in my daily work.

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

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

              I love the idea!
              Can it also remove the unneeded edges afterwards , so we have clean geometry to push pull?

              1 條回覆 最後回覆 回覆 引用 0
              • cerevellumC 離線
                cerevellum
                最後由 編輯

                No problem, glad it could be useful to some!

                So, in fact there is more functionality to this script, but a lot of the methods are not being used currently. I need to get it up to speed, maybe over the weekend. Basically, if you intersect with model you can erase the inside edges, and I'm working on getting them to remove automatically. The methods are all in the script, they just need to be called, and in the right order (what I have been struggling with).

                Anyway, feel free to play around with the script. I'll do my best to update it, too.

                Thanks again,
                Zach

                1 條回覆 最後回覆 回覆 引用 0
                • Mike LuceyM 離線
                  Mike Lucey
                  最後由 編輯

                  Thanks Zach,

                  This looks like the Ruby that we talked about at the
                  Hotel Avante, very useful indeed.

                  Be sure to get your Avatar up there soon and don't be
                  a stranger 😄

                  Best,

                  Mike

                  Support us so we can support you! Upgrade to Premium Membership!

                  1 條回覆 最後回覆 回覆 引用 0
                  • RayOchoaR 離線
                    RayOchoa
                    最後由 編輯

                    Dang, Sketchup is starting to look more and more like CAD programs like Wings3d and Rhino. he he its going to end up as complicated too. All it needs now is faster control over high poly models

                    CaR DeSiGnS bY mE
                    http://ray-ochoa.com

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

                      @Rayochoa:
                      This is a PLUG-IN. If you don't need it simply don't plug it.
                      IMHO it has a good potential. And if this tool will help me to save a couple of hours per year so why not?

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

                        thanks a lot for the plug-in, sure a big help!!

                        1 條回覆 最後回覆 回覆 引用 0
                        • J 離線
                          Jackson
                          最後由 編輯

                          Zach- thanks for this ingenius ruby, can't wait to give it a try!

                          Jackson

                          1 條回覆 最後回覆 回覆 引用 0
                          • plot-parisP 離線
                            plot-paris
                            最後由 編輯

                            nice tool. I am definittely in danger of flattening every model I can lay my hands on (my colleagues won't like that 😉 ).

                            I am looking forward to the "auto-cleanup" version.

                            cheers,

                            Jakob

                            1 條回覆 最後回覆 回覆 引用 0
                            • RayOchoaR 離線
                              RayOchoa
                              最後由 編輯

                              @rv1974 said:

                              @Rayochoa:
                              This is a PLUG-IN. If you don't need it simply don't plug it.
                              IMHO it has a good potential. And if this tool will help me to save a couple of hours per year so why not?

                              I didin't say i didn't like it i said that all these plugins are taking sketchup very far. But hey i like this better, rather than learning everything at the same time little by little is way better

                              CaR DeSiGnS bY mE
                              http://ray-ochoa.com

                              1 條回覆 最後回覆 回覆 引用 0
                              • RayOchoaR 離線
                                RayOchoa
                                最後由 編輯

                                U maybe wan't to take a look at this


                                cleanup.rb

                                CaR DeSiGnS bY mE
                                http://ray-ochoa.com

                                1 條回覆 最後回覆 回覆 引用 0
                                • MALAISEM 離線
                                  MALAISE
                                  最後由 編輯

                                  😄 Thanks a lot

                                   What a waste of time I got, trying to understand why theses blood... lines didn't made a surface.
                                  

                                  friendly 😍 MALAISE
                                  ( sorry for my approximative english )

                                  La Connaissance n'a de valeur que partagée

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • W 離線
                                    watkins
                                    最後由 編輯

                                    Dear Ray,

                                    I tried out your script on the following simple model.

                                    Draw a rectangle, say 100 mm by 100 mm, and then pull it up 10 mm into a 3D shape.
                                    Use the move tool to pull up one corner on the top face by 0.1 mm.
                                    Draw a few lines on the sides to divide areas into two, and perhaps a few random, un-terminated lines on various surfaces.
                                    Select all and run your script.

                                    When I do this I lose the top face. Interestingly enough this also happens when I run the script cleanup_model.rb (by John H. Aughey). The script deletecoplanaredges.rb (by Jack Dolabany)removes all redundant co-planar lines, but leaves the top face with its centre fold untouched.

                                    I imagine that this is not what you had in mind.

                                    Kind regards,
                                    Bob

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

                                      thanks, will be very useful

                                      THREEDIMENSIONSWEB dot COM

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • cerevellumC 離線
                                        cerevellum
                                        最後由 編輯

                                        Hi Ray and Bob,

                                        This is something I've noticed while working on my flattening script, and I still haven't figured out why it happens. The simplest way of reproducing this is to draw a box, add a rectangle to the top surface and connect it with a line to the outer edge loop. When erasing one of the edges of the rectangle that was added, both faces disappear.

                                        edgeFaceEraseExFinalA.jpg

                                        However, if you were to erase the edge that connects both edge loops first, then you can erase the edges of the inside rectangle just fine. It apparently has to do with the order in which you erase coplanar edges. Delete edges in the following order: edges connected to 0 faces go first, then edges connected to 1 face, and finally edges connected to 2 faces.

                                        edgeFaceEraseExFinalB.jpg

                                        See ya,
                                        Zach

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • W 離線
                                          watkins
                                          最後由 編輯

                                          Dear Zach,

                                          The script deletecoplanaredges.rb failed your example too, so some recoding is needed to get a more reliable cleanup script.

                                          Regards,
                                          Bob

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • GaieusG 離線
                                            Gaieus
                                            最後由 編輯

                                            @cerevellum said:

                                            Hi Ray and Bob,

                                            This is something I've noticed while working on my flattening script, and I still haven't figured out why it happens. The simplest way of reproducing this is to draw a box, add a rectangle to the top surface and connect it with a line to the outer edge loop. When erasing one of the edges of the rectangle that was added, both faces disappear...

                                            Ha! Beautiful! I love these "glitch hunts". And you cannot even heal the face by redrawing an edge of it until you get rid of the leftover geometry in the middle! 👍

                                            Gai...

                                            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