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

[Plugin] CleanUp

Scheduled Pinned Locked Moved Plugins
974 Posts 217 Posters 788.3k Views 217 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
    thomthom
    last edited by 21 Oct 2009, 17:44

    @ecuadorian said:

    Thank you, man. I have the perfect file to test it. πŸ˜„

    A particular troublesome file? Please let me know how it goes. Not sure if I've got it fully tuned in yet.

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

    1 Reply Last reply Reply Quote 0
    • R Offline
      remus
      last edited by 21 Oct 2009, 17:45

      Cheers thom, a very useful script.

      http://remusrendering.wordpress.com/

      1 Reply Last reply Reply Quote 0
      • E Offline
        Ecuadorian
        last edited by 21 Oct 2009, 17:51

        😲 Wow... no more lost faces (as happened with other cleanup scripts), and cleanup is top-notch.
        before.jpg
        after.jpg

        Here it is applied only to the horizontal white borders:
        before2.jpg
        after2.jpg

        You do realize the importance of this script in the history of SketchUp, do you? Thanks again! πŸ‘

        -Miguel Lescano
        Subscribe to my house plans YouTube channel! (30K+ subs)

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 21 Oct 2009, 17:56

          Good to see it working on other complex models. I only tried it against one complex one, large triangulated terrain with 80K+ faces. (Though that model had all the potential problems you could run into AFIK.)

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

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jim
            last edited by 21 Oct 2009, 18:05

            Ack! it doesn't look at materials?

            Oh, and thank you! πŸ‘

            Hi

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 21 Oct 2009, 18:07

              @jim said:

              Ack! it doesn't look at materials?

              Oh, and thank you! πŸ‘

              No, but that's a very good suggestion.

              Ecuadorian did find some issues with some geometry, so I'll push an update when I've gotten around to look at it.

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

              1 Reply Last reply Reply Quote 0
              • T Offline
                thomthom
                last edited by 21 Oct 2009, 18:13

                Ecuadorian:
                I had a look at your sample file. I see the issues. I think it's a tolerance issue. I'll have to investigate a little more to tune in the tolerance.

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

                1 Reply Last reply Reply Quote 0
                • E Offline
                  Ecuadorian
                  last edited by 21 Oct 2009, 18:25

                  Thanks! I think I now remember what the problem might be, also. The model is scaled a lot. πŸ˜•

                  -Miguel Lescano
                  Subscribe to my house plans YouTube channel! (30K+ subs)

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    thomthom
                    last edited by 21 Oct 2009, 18:42

                    This is strange. When I compare the dot product of various faces, I find an overlap in the return value for faces where you can erase the connecting edge:

                    
                    	# Not coplanar
                    	# 0.999999999898786
                    	# 0.999999999901467
                    	# 0.99999999992968
                    	# 0.99999999995352
                    	# 0.999999999959393
                    	# 0.999999999974808
                    	#
                    	# Coplanar
                    	# 0.999999999917881
                    	# 0.999999999918562
                    	# 0.999999999984962
                    	# 0.999999999999148
                    	# 0.999999999999408
                    
                    

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

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      thomthom
                      last edited by 21 Oct 2009, 18:42

                      @ecuadorian said:

                      Thanks! I think I now remember what the problem might be, also. The model is scaled a lot. πŸ˜•

                      I did notice that - but I exploded it and it still occurs...

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

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        Chris Fullmer
                        last edited by 21 Oct 2009, 19:46

                        Could you take the edge, find its connected faces. Then get the object id for those faces, and get all their vertices positions. Then delete the edge if it is planar. Then test to see if those faces still exist. If they do, move on. If they do not, then rebuild them using their vertices' positions? Painful yes, but maybe useful?

                        Chris

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

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          thomthom
                          last edited by 21 Oct 2009, 19:48

                          @chris fullmer said:

                          Could you take the edge, find its connected faces. Then get the object id for those faces, and get all their vertices positions. Then delete the edge if it is planar. Then test to see if those faces still exist. If they do, move on. If they do not, then rebuild them using their vertices' positions? Painful yes, but maybe useful?

                          Chris

                          I did that kind of stuff in my previous version, prior to 7.1 - wasn't stable. So many cases to take into account. Faces with inner holes etc...

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

                          1 Reply Last reply Reply Quote 0
                          • T Offline
                            thomthom
                            last edited by 21 Oct 2009, 19:49

                            I think I might have misunderstood this whole DOT product from vectors... will have to look deeper into it.

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

                            1 Reply Last reply Reply Quote 0
                            • C Offline
                              Chris Fullmer
                              last edited by 21 Oct 2009, 19:49

                              Can you hit ctrl-z in ruby? πŸ˜„

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

                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                remus
                                last edited by 21 Oct 2009, 19:57

                                @thomthom said:

                                I think I might have misunderstood this whole DOT product from vectors... will have to look deeper into it.

                                What do you think is not working? from my quick browse of your script the dot product should do what you want.

                                http://remusrendering.wordpress.com/

                                1 Reply Last reply Reply Quote 0
                                • T Offline
                                  thomthom
                                  last edited by 21 Oct 2009, 19:58

                                  @chris fullmer said:

                                  Can you hit ctrl-z in ruby? πŸ˜„

                                  Yea, http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/sketchup.html#undo
                                  But that would ruin any kind of possibility to undo the whole erase coplanar operation.

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

                                  1 Reply Last reply Reply Quote 0
                                  • T Offline
                                    thomthom
                                    last edited by 21 Oct 2009, 20:00

                                    ...could create a temp group and use that to replicate the two faces (when within a range where we can't be certain.)

                                    but I'd still try to avoid that if I can calculate this.

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

                                    1 Reply Last reply Reply Quote 0
                                    • H Offline
                                      honoluludesktop
                                      last edited by 21 Oct 2009, 20:50

                                      Hi Thomas, I lost a texture from a face in a 61k faces model. BTW what happens when you have coplaner faces with different textures, or images placed on textured faces (say a run on a wood floor). Didn't read all the post, so sorry if already covered.

                                      1 Reply Last reply Reply Quote 0
                                      • T Offline
                                        thomthom
                                        last edited by 21 Oct 2009, 20:52

                                        @honoluludesktop said:

                                        Hi Thomas, I lost a texture from a face in a 61k faces model. BTW what happens when you have coplaner faces with different textures, or images placed on textured faces (say a run on a wood floor).

                                        At the moment it doesn't take into account materials. Only geometry.

                                        Images? You mean an actual Image entity (It says "Image" in Entity Info when you select it?)

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

                                        1 Reply Last reply Reply Quote 0
                                        • T Offline
                                          thomthom
                                          last edited by 21 Oct 2009, 20:57

                                          @honoluludesktop said:

                                          Well, I often import images (as images, not textures), and place them on textured faces.

                                          They would be ignored.
                                          However, I do plan on adding an option for it to respect the material of the geometry. Just got to sort out some other issue first.

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

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 48
                                          • 49
                                          • 1 / 49
                                          1 / 49
                                          • First post
                                            12/974
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement