sketchucation logo sketchucation
    • Login
    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!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Delete hidden geometry

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 1.5k Views 2 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.
    • B Offline
      Boein
      last edited by

      Hi all,

      After importing a dxf file (coming from an exported floorplan drawing) in sketchup2015, my model had a lot of X's. It looks like every endpoint of a surface/shape was joined by a line during the import. So I had to remove a lot, and a mean really a lot of those lines. Removing them was sometimes dangerous, deleting the wrong line could delete a part of a surface. So I used the smooth edges tool, clicking on the line and using the smooth edges, removed the line and the surface divided by the 'cross' became again a plain surface. But I didn't know I was not actually deleting the line, just hiding it. Using the show hidden geometry option makes them reappear, and I guess those lines have an impact on processing although they are useless. If using the "show hidden geometry" can show these lines again, I guess it must be possible to create a ruby script to only delete those lines? Anyone knows how?

      Regards,
      Boein

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        Sounds like the faces are triangulated.
        Get thomthom's CleanUp toolset from the PluginStore.
        That has options to delete edges making coplanar in faces [merge-faces?].
        Thus undoing any unnecessary triangulation.

        Alternatively switch on Hidden Geometry, Edit>Select-all, then copy+paste this snippet into the Ruby Console + <enter>

        model=Sketchup.active_model
        edges=model.selection.grep(Sketchup;;Edge).find_all{|e| e.faces.length == 2 }
        togos=[]
        counter=0 
        model.start_operation("Delete Coplanar Edges")
        edges.each{|e|
          next unless e.valid?
          if e.faces[0].normal.dot(e.faces[1].normal)>0.9999999999999 && e.faces[0].material==e.faces[1].material && e.faces[0].back_material==e.faces[1].back_material
            togos << e
            counter+=1
            Sketchup;;set_status_text(("Coplanar Edges Erased = #{counter}"),SB_PROMPT)
          end#if
        }
        model.active_entities.erase_entities(togos)
        model.commit_operation
        

        It is one step undo-able...

        TIG

        1 Reply Last reply Reply Quote 0
        • B Offline
          Boein
          last edited by

          Ok found it, I installed the thomthom's CleanUp toolset and using the "merge faces" did the trick (5119 faces merged). Saved me a lot of work thanks for the suggestion!

          Regards,
          Boein

          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