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!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Soften-Edges using by ruby

    Scheduled Pinned Locked Moved Developers' Forum
    23 Posts 7 Posters 4.4k Views 7 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.
    • TIGT Online
      TIG Moderator
      last edited by

      Assuming ss=Sketchup.active_model.selection...

      defns=[]
      ss.grep(Sketchup;;ComponentInstance).each{|e|defns << e.definition}
      defns.uniq!
      defns.each{|defn|
        defn.entities.grep(Sketchup;;Edge).each{|e|
          if e.faces.length==2
            e.soft=true
            e.smooth=true
          end
        }
      }
      

      or something similar...

      TIG

      1 Reply Last reply Reply Quote 0
      • G Offline
        glro
        last edited by

        @tig said:

        Assuming ss=Sketchup.active_model.selection...

        defns=[]
        > ss.grep(Sketchup;;ComponentInstance).each{|e|defns << e.definition}
        > defns.uniq!
        > defns.each{|defn|
        >   defn.entities.grep(Sketchup;;Edge).each{|e|
        >     if e.faces.length==2
        >       e.soft=true
        >       e.smooth=true
        >     end
        >   }
        > }
        

        or something similar...

        yes...it works

        this will save me time, since i noticed that some components edges come back visible in my models, for unknown reason...

        now with just one clic, the problem is solved

        thank you

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

          The unexpected reversion of smoothed edges to solid is a known bug.
          Never save when in a edit session. Even an auto-save can trigger this, so never stay inside an edit session for longer than you need to...

          TIG

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

          Advertisement