• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Merging adjacent faces how / Finding entity ID

Scheduled Pinned Locked Moved SketchUp Discussions
sketchup
14 Posts 4 Posters 1.8k Views
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.
  • M Offline
    M1le
    last edited by M1le 24 Feb 2014, 14:21

    Hello,

    I am trying to merge adjacent faces with the Cleanup tool, but it just doesn't merge them. Event with coplanar faces on the z-axis I am having problems. What I do is Select faces --> select also boundaring edges ---> merge edges (Cleanup), but it just doesn't work.

    I am trying to merge the faces, because I have so many faces on my object it will just make the result analysis really time consuming for me. I am doing my master thesis so any help with this problem would be very welcome.

    Picture of the problem:


    http://s27.postimg.org/suqbm2ysf/merging2.jpg

    Cheers,

    Milan

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dave R
      last edited by 24 Feb 2014, 14:28

      Maybe you could post the SKP file?

      What happens if you use the Eraser tool to erase the edges between coplanar faces?

      Etaoin Shrdlu

      %

      (THERE'S NO PLACE LIKE)

      G28 X0.0 Y0.0 Z0.0

      M30

      %

      1 Reply Last reply Reply Quote 0
      • C Offline
        cotty
        last edited by 24 Feb 2014, 16:02

        Maybe there are inner faces?

        my SketchUp gallery

        1 Reply Last reply Reply Quote 0
        • T Offline
          TIG Moderator
          last edited by 24 Feb 2014, 16:25

          Cotty just beat me to it !

          A 'coplanar edge' only has two faces - and those faces must must be coplanar, and share a common normal [facing direction], and have the same material on both sides.
          Then plugins that 'erase coplanar edges' will work as you expect.

          BUT if the apparently 'coplanar edge' is also used by one or more additional internal faces ['partitions'] then these plugins will not work.

          If you Erase this type of edge manually, then the two coplanar faces should merge, but then the internal face[s] will vanish - because a face cannot exist without one of the edges forming its perimeter.

          TIG

          1 Reply Last reply Reply Quote 0
          • M Offline
            M1le
            last edited by 24 Feb 2014, 17:34

            Hello,

            I am attaching the sketchup file... I haven't read all of the comments but will do it ASAP. I hope the attached sketchup file will provide a solution to my problem. Thanks for the help everybody.

            Cheers


            3D final.skp

            1 Reply Last reply Reply Quote 0
            • D Offline
              Dave R
              last edited by 24 Feb 2014, 17:51

              Switch to X-ray face style. You'll see there do seem to be a number of internal faces and edges that could be causing issues. There's also a lot of reversed faces that should be corrected before you start applying materials. They might not be causing any clean up issues but at best its sloppy.

              Etaoin Shrdlu

              %

              (THERE'S NO PLACE LIKE)

              G28 X0.0 Y0.0 Z0.0

              M30

              %

              1 Reply Last reply Reply Quote 0
              • C Offline
                cotty
                last edited by 24 Feb 2014, 18:02

                Will you call it Tetris house? 😉


                tetris.jpg

                my SketchUp gallery

                1 Reply Last reply Reply Quote 0
                • M Offline
                  M1le
                  last edited by 24 Feb 2014, 18:04

                  Hm I think I'll have to get some facts straight about reverse/interior faces (having some problems understanding what's what), before I comment on that, but this building isn't meant for rendering purposes, but I will use it in a sun analysis which exports the shading coefficients for each surface anaysed, thus I wanted to join as much areas as possible to avoid unneccessary excel work, but it seems I will have to do it just as well. Anyways I am really glad I found this forum, you guys are awesome.

                  Cheers

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dave R
                    last edited by 24 Feb 2014, 18:10

                    As for the reversed faces...In SketchUp the faces have a front side and a back side. The front side in the style you're using is white while the back side is blue. If you switch to Monochrome face style, you'll see some blue faces on the outside. These can be corrected by selecting them, context clicking and choosing Reversed Faces. Ot you might be able to select a correctly oriented face and choose Orient Faces. This second option doesn't always yield the correct results, though.

                    It could be that your reversed faces might negatively impact the data you get for shadow studies if you are using some plugin that looks at those faces. It's not uncommon for the front face normal to be involved in some calculations.

                    Etaoin Shrdlu

                    %

                    (THERE'S NO PLACE LIKE)

                    G28 X0.0 Y0.0 Z0.0

                    M30

                    %

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      M1le
                      last edited by 17 Mar 2014, 09:09

                      Thanks for the reply. I fixed the model so the back sides are facing the correct position. I have another question for which I did not want to open a whole other seperate topic.

                      I am using a plugin which generates the results in an excel sheet table. the problem is that if I select multiple surfaces it generates columns naming each surface by it's faceID. For example "Surface 18411". How can I find the entityID in the sketchup model? Is there any plugin for it?

                      Cheers

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        TIG Moderator
                        last edited by 17 Mar 2014, 10:10

                        Entity IDs are setup per session and so are they are transient.
                        The exception to this is in SUp v2014, where group/component_instance have IDs that are now 'frozen', to allow you to use the Classifier more easily across sessions...
                        In all SUp versions, plain geometry entities [edges/faces] are assigned transient IDs per session.
                        In code you can get yiur face's current ID with:
                        id = face.entityID --> 18411
                        You could also attach a special attribute to each face: that will persist across sessions, but of course if the face is deleted and recreated then the new face will not no longer have that attribute! That's why attribute-tagging groups or component_instances is more reliable.
                        For example add a unique time-stamp ID, like:
                        tid = Time.now.to_f face.set_attribute('M1le', 'face_id', tid)
                        then later to get it back:
                        id = face.get_attribute('M1le', 'face_id', nil)
                        If it's nil the face isn't tagged...
                        Otherwise you have the unique ID for that face...

                        To 'select' a face by its XLS given entityID... this snippet in the Ruby Console should work, finding the face by its ID in the active context:

                        i=1234;m=Sketchup.active_model;s=m.selection;s.clear;m.active_entities.grep(Sketchup;;Face).each{|f|if f.entityID==i;s.add(f);break;end}
                        

                        Simple change i=1234 to be the integer ID for the specific face...

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          M1le
                          last edited by 17 Mar 2014, 13:23

                          @tig said:

                          In code you can get your face's current ID with:
                          id = face.entityID --> 18411

                          To 'select' a face by its XLS given entityID... this snippet in the Ruby Console should work, finding the face by its ID in the active context:

                          i=1234;m=Sketchup.active_model;s=m.selection;s.clear;m.active_entities.grep(Sketchup;;Face).each{|f|if f.entityID==i;s.add(f);break;end}
                          

                          Simple change i=1234 to be the integer ID for the specific face...

                          So if i write that in the ruby console and select a face it will display the face ID? I am really not such an expert in SU and have never tinkered with ruby scripts...

                          1 Reply Last reply Reply Quote 0
                          • T Offline
                            TIG Moderator
                            last edited by 17 Mar 2014, 15:34

                            NO !
                            The earlier snippet of code finds the face from an entityID - i.e. what was listed in the XLS export.
                            To preselect a face and then get its entitiyID... try this in the Ruby Console instead:

                            f=Sketchup.active_model.selection.grep(Sketchup;;Face)[0]; if f;puts f.entityID;else puts 'NOT A FACE!';end
                            

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              M1le
                              last edited by 17 Mar 2014, 16:10

                              Thank you very much, much appreciated.

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

                              Advertisement