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

    [Plugin] Select by Z

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

      @earthmover said:

      Thanks BTM - that makes sense and I follow the logic behind the code. Perhaps I will try and find time to learn the language. I am good at obsessing and not so good at multi-tasking, so it may have to wait till the snow is falling and my work slows down.

      Regarding the script, it indeed is working. However, it is not properly defining the edges end bounds. The script is selecting any edge which has one of the their bounds (verticies) corresponding with the selection, so it is thus selecting also vertical lines and diagonal lines who's start bounds is on the Z in relevance to the selection. Any suggestions for further defining the end bounds so that the script will only select lines only completely on the same XY plane as the selection?

      Ah, here:

      def selectedgesbyz()
        model=Sketchup.active_model
        ss=model.selection; edge=ss[0]; ss.clear
        model.active_entities.each{|e|ss.add(e)if e.class==Sketchup;;Edge and (edge.start.position.z)== (edge.end.position.z) and (e.bounds.min.z)==(edge.start.position.z) and (e.bounds.max.z)==(edge.start.position.z)}
      end#if
      UI.menu("Plugins").add_item("Select Edges by Z"){selectedgesbyz} if not file_loaded?(File.basename(__FILE__))
      file_loaded(File.basename(__FILE__))
      
      1 條回覆 最後回覆 回覆 引用 0
      • EarthMoverE 離線
        EarthMover
        最後由 編輯

        Thanks BTM! It's working great. I see defining the max bounds for the edges was the trick!

        3D Artist at Clearstory 3D Imaging
        Guide Tool at Winning With Sketchup
        Content Creator at Skapeup

        1 條回覆 最後回覆 回覆 引用 0
        • C 離線
          conconbrr
          最後由 編輯

          Hello,

          I was searching for long for such a plugin. So, first of all thanks for it, it's quite useful to select all the contour lines at one level (topography).

          I just wondered if it is possible to make a small improvement on the execution procedure.

          In addition of the current method (select one edge or face and then execute the plugin), could it be possible to execute the plugin first and then enter a Z value on the VCB (I don't know if the name is correct, the little box on the right bottom 😉) and finally validate with "enter"?

          In order to keep the current method, the general procedure could be:

          1. Execute the plugin
          2. Enter a value on the VCB OR select an edge or a face
          3. Push "enter"

          At each step some short information could be displayed on the status bar.

          I just discover ruby and its power and unfortunately I don't really have the time to learn it so that I can make this modification.

          Thank you

          1 條回覆 最後回覆 回覆 引用 0
          • R 離線
            ricomon35
            最後由 編輯

            Any chance to get a rbz version that can b installed in 2019 or higher?

            1 條回覆 最後回覆 回覆 引用 0
            • BoxB 離線
              Box
              最後由 編輯

              The version in the extension store by Tig works in newer versions.

              1 條回覆 最後回覆 回覆 引用 0
              • 1
              • 2
              • 2 / 2
              • 第一個貼文
                最後的貼文
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement