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

    Soften-Edges using by ruby

    Scheduled Pinned Locked Moved Developers' Forum
    23 Posts 7 Posters 4.2k 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 Offline
      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 Offline
          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