sketchucation logo sketchucation
    • 登入
    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!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    Soften-Edges using by ruby

    已排程 已置頂 已鎖定 已移動 Developers' Forum
    23 貼文 7 Posters 4.8k 瀏覽 7 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • TIGT 離線
      TIG Moderator
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • G 離線
        glro
        最後由 編輯

        @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 條回覆 最後回覆 回覆 引用 0
        • TIGT 離線
          TIG Moderator
          最後由 編輯

          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 條回覆 最後回覆 回覆 引用 0
          • 1
          • 2
          • 2 / 2
          • 第一個貼文
            最後的貼文
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement