sketchucation logo sketchucation
    • Login
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Plugin Request "Find Faces by Sides"

    Scheduled Pinned Locked Moved Plugins
    4 Posts 3 Posters 242 Views 3 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.
    • W Offline
      WillieB
      last edited by

      Fredo Tools has a "Count Faces by Sides" plugin, but this only quantifies the number of faces of each type. Is it possible to have a plugin that finds (and selects) faces having a specified number of sides? Often when importing a SketchUp OBJ export, you get an error message "cannot import faces having more than 4 sides" A "Find Faces by Sides" plugin, used in conjunction with Fredo's "Count Faces by Sides" would assist in editing object geometry prior to export. Perhaps some kind "Ruby literate" soul could help in this regard?

      Regards to all,
      Willie

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

        One liner, copy/pasted into Ruby Console + <enter>.
        Change the initial n=4 to the number of sides to highlight...

        n=4;m=Sketchup.active_model;s=m.selection;s.clear;m.active_entities.each{|e|s.add(e) if e.is_a?(Sketchup;;Face)&&e.outer_loop.edges.length==n};
        

        TIG

        1 Reply Last reply Reply Quote 0
        • pilouP Offline
          pilou
          last edited by

          Works fine! β˜€

          (if all the objects have not all the same number of sides for their facetts! πŸ˜‰

          Does it possible to have for example n=7 and n=9 selected on the same time?

          Frenchy Pilou
          Is beautiful that please without concept!
          My Little site :)

          1 Reply Last reply Reply Quote 0
          • W Offline
            WillieB
            last edited by

            Thanks TIG!
            Easy when you know how, I'm going to have to learn Ruby!
            Regards,
            Willie

            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