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

    Merging adjacent faces how / Finding entity ID

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

      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
      • Dave RD Offline
        Dave R
        last edited by

        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
        • cottyC Offline
          cotty
          last edited by

          Will you call it Tetris house? 😉


          tetris.jpg

          my SketchUp gallery

          1 Reply Last reply Reply Quote 0
          • M Offline
            M1le
            last edited by

            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
            • Dave RD Offline
              Dave R
              last edited by

              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

                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
                • TIGT Offline
                  TIG Moderator
                  last edited by

                  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

                    @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
                    • TIGT Offline
                      TIG Moderator
                      last edited by

                      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

                        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