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!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update

    [Plugin] "Drill" extension for making holes

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

      I'm making a cabinet in sketchup for export to a shopbot, and it's really a pain to make all the drill holes in the pieces. So here's my first ruby extension, drill.rb. Select it, type a diameter in the VCB, then click on a face. It creates a hole of that diameter (and leaves that "drill bit" installed until you change it) in the face then pushes it through if it can find an opposite, parallel face.


      Drill a hole in an object with one click.

      1 條回覆 最後回覆 回覆 引用 0
      • thomthomT 離線
        thomthom
        最後由 編輯

        Sounds interesting.
        (A screenshot would be very nice 😉 )

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 條回覆 最後回覆 回覆 引用 0
        • david_hD 離線
          david_h
          最後由 編輯

          just gave it a try. It's pretty cool. I like it better than the Holes.rb

          If I make it look easy...It is probably easy

          1 條回覆 最後回覆 回覆 引用 0
          • Chris FullmerC 離線
            Chris Fullmer
            最後由 編輯

            Sounds great, and welcome to the forum! Hope you keep hanging around. There's always lots of good Ruby talk goin on here. And script requests too if you want a new project to start on 😄

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            1 條回覆 最後回覆 回覆 引用 0
            • kenK 離線
              ken
              最後由 編輯

              Drill

              Well drill comes close to a useable plugin. If the item is not a group or component, it works well, and has a function. However, it the item is a group or component, when you edit the group or component, and use drill, the group or component disappears.

              Thanks for script.

              Ken

              Fight like your the third monkey on Noah's Ark gangway.

              1 條回覆 最後回覆 回覆 引用 0
              • Didier BurD 離線
                Didier Bur
                最後由 編輯

                Hi,

                What's the difference with my "opener.rb" script ?
                You can see it here: http://www.crai.archi.fr/RubyLibraryDepot/Ruby/em_arc_page.htm

                DB

                1 條回覆 最後回覆 回覆 引用 0
                • L 離線
                  lunkwill
                  最後由 編輯

                  Neat! The main difference seems to be that drill.rb only drills round holes, and it drills them with only one click.

                  Not being able to drill holes in components and groups (even if the component is in 'edit' mode) is pretty annoying, though. I had hoped that the API wouldn't make me worry about this distinction. Surely there's a standard way in ruby to draw on a face regardless of whether it's part of a component or group?

                  1 條回覆 最後回覆 回覆 引用 0
                  • TIGT 離線
                    TIG Moderator
                    最後由 編輯

                    @lunkwill said:

                    Neat! The main difference seems to be that drill.rb only drills round holes, and it drills them with only one click.

                    Not being able to drill holes in components and groups (even if the component is in 'edit' mode) is pretty annoying, though. I had hoped that the API wouldn't make me worry about this distinction. Surely there's a standard way in ruby to draw on a face regardless of whether it's part of a component or group?

                    The version attached below has been tweaked to change this

                    model.entities
                    

                    to

                    model.active_entities
                    

                    which then lets you work in the model OR inside a group or definition edit...

                    Also - to find the circle-face made by the new circle arc you've just added I think the simplest method is to make it

                    circle=view.model.active_entities.add_circle(center,normal,@@drill_diameter/2)
                    

                    , and when you make a circle it returns an array of its edges ('circle='), now get the first edge circle[0], then get its faces and now faces[0] is the always inner one that you want thus...

                    circleface=circle[0].faces[0]
                    

                    (faces[1] is always the outer face - if it exists - that you will leave alone*)

                    *You are also getting some Ruby Console errors relating to your other_entities which make reference to deleted things - using my outline for finding the faces above should fix that... or use around code-lines in the early 70s

                    if other.valid? and other.typename=="Face"
                    

                    test to avoid error...

                    drill.rb

                    TIG

                    1 條回覆 最後回覆 回覆 引用 0
                    • M 離線
                      meister
                      最後由 編輯

                      @tig said:

                      @lunkwill said:

                      Neat! The main difference seems to be that drill.rb only drills round holes, and it drills them with only one click.

                      Not being able to drill holes in components and groups (even if the component is in 'edit' mode) is pretty annoying, though. I had hoped that the API wouldn't make me worry about this distinction. Surely there's a standard way in ruby to draw on a face regardless of whether it's part of a component or group?

                      Its a possible adding depth of hole?

                      meister

                      1 條回覆 最後回覆 回覆 引用 0
                      • Z 離線
                        zero
                        最後由 編輯

                        I don't know if i have something broken in my install,but i cant snap a hole on any line,construction line or point.is it normal.

                        1 條回覆 最後回覆 回覆 引用 0
                        • B 離線
                          bianhai
                          最後由 編輯

                          Ver good! 👍

                          1 條回覆 最後回覆 回覆 引用 0
                          • utilerU 離線
                            utiler
                            最後由 編輯

                            This is great mate, well done!!
                            I think though; is it possible to somehow enable SU snapping [end point, midpoint, etc...] and also inference locking?

                            Many thanks!!!!

                            Just Curious...

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

                              very interesting plugin, will give it a try, THANKS!

                              1 條回覆 最後回覆 回覆 引用 0
                              • K 離線
                                k2wengen
                                最後由 編輯

                                very simple and efficient tool!! good

                                1 條回覆 最後回覆 回覆 引用 0
                                • M 離線
                                  m3a4
                                  最後由 編輯

                                  sorry to bother the illuminatti with this, but something weird is happening to this plugin (edit: and others)

                                  Only seems to drill a hole size "1". I'm using a metric setup so the hole shows as 22.x mm, I assume it's defaulting to imperial units..?

                                  When ever I try to change the size, it still reverts and drills the hole size "1"

                                  more;.. oops.. just tried another plugin that had an input and that's not allowing a change - or at least taking any notice of what I write in the box.

                                  XP with v8

                                  I've broken something! I've tried the repair from install, if that doesn't work, I'll rip it all out and reinstall? but curious if this has been seen before and what caused it.

                                  Many thanks

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • M 離線
                                    m3a4
                                    最後由 編輯

                                    oh, as I have to "drill" about 1500 holes, THANK YOU for the plugin! 😄

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • D 離線
                                      Dadio61
                                      最後由 編輯

                                      Thanks for the plug-in. It works at drilling a hole in my panel, but the diameter doesn't adjust, even though I'm entering a number in the vcd.
                                      I looked at the sript in notepad and see the diameter number. So why isn't the diameter changing? Any suggestions?

                                      Regards, Les

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

                                        Les, are you hitting Enter after typing the new dimension value? it works for me.

                                        This plugin doesn't seem to utilize inferencing which makes it difficult to accurately place holes. I'd find this a really useful tool if it did.

                                        Etaoin Shrdlu

                                        %

                                        (THERE'S NO PLACE LIKE)

                                        G28 X0.0 Y0.0 Z0.0

                                        M30

                                        %

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • D 離線
                                          Dadio61
                                          最後由 編輯

                                          Dave R,
                                          Thanks for the suggestion on using the enter key. It works fine now.
                                          I noticed that the unit of measure came up in the vcd also. In my case it is in millimeters.
                                          tried several different hole sizes, from five millimeter to twenty millimeter, and all worked. This will work good enough for a model representation.
                                          Thanks for your help.

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

                                            I've edited the plugin to include snapping/inferencing. That was the deal breaker for me—without snapping, this plugin was not useful to me. But with it, I will be using this all the time!

                                            Thank you to lunkwill (the original author) and TIG (another tweaker) for all their work!

                                            Hope you find this as useful as I did.


                                            Updated to include snapping/inferencing.

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

                                            Advertisement