• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] 2.5D CAM Plugin 20121202

Scheduled Pinned Locked Moved Plugins
80 Posts 32 Posters 91.3k Views
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.
  • S Offline
    squartochi
    last edited by 2 Jul 2012, 15:12

    Same as above, looks like it makes some passes. But no popup save window. This is from the ruby console

    C:/Program Files/Google/Google SketchUp 7/Plugins/CNC-profile_v02.rb:833:in `call'
    (eval):892

    Thanks,
    Scott

    1 Reply Last reply Reply Quote 0
    • C Offline
      crash5050
      last edited by 26 Jul 2012, 20:27

      Ok, I must be doing something wrong.

      1. I went out to 3d warehouse and grabbed a hutch that I want to cut on my CNC. http://sketchup.google.com/3dwarehouse/details?mid=792d164e6a059ae8958113d6831abae2&prevstart=0

      I Imported it into Sketchup, and selected all and made it a group amdI still keep getting this darned error. Am I doing something that is impossible?

      1 Reply Last reply Reply Quote 0
      • F Offline
        Fritzache
        last edited by 2 Dec 2012, 10:21

        Hi. Interesting plugin. So? no more support for it? I have the same problem as the guys above.
        No save window appears. thank you in advance.

        1 Reply Last reply Reply Quote 0
        • J Offline
          jgro11
          last edited by 2 Dec 2012, 13:22

          I need more details. Do you have the ruby console open? What does it say when you run the plugin.

          jgro

          1 Reply Last reply Reply Quote 0
          • D Offline
            Dave R
            last edited by 2 Dec 2012, 15:17

            Hi Joel,

            I gave your plugin a try and I seem to be getting the same result. No Save window. I also don't seem to see the tool path as you show in your images, either. Here are some screen shots for you.

            CNC1.png
            the setup. Note that Units is set to Decimal and units aren't displayed. The thing is a group.

            CNC2.png
            Immediately after running the plugin. No save option.

            CNC3.png
            And the same in X-ray.

            Etaoin Shrdlu

            %

            (THERE'S NO PLACE LIKE)

            G28 X0.0 Y0.0 Z0.0

            M30

            %

            1 Reply Last reply Reply Quote 0
            • J Offline
              jgro11
              last edited by 2 Dec 2012, 19:23

              I just uploaded the latest version V03. (look at the first post) Give that a try. It has been changed to work for english and metric units and it should work on macs. (Special thanks to MichaelV for helping me with that!) Hopefully this should fix the problem. If not, upload the .skp file here and I'll take a look at it.

              jgro

              1 Reply Last reply Reply Quote 0
              • D Offline
                Dave R
                last edited by 2 Dec 2012, 20:03

                Joel, I tried the latest version. Still no Save box. Here's the dump from the Console.

                C:/Program Files/Google/Google SketchUp 8/Plugins/CNC_Files/CNC_Profile_Defaults.txt

                2

                Error: #<NoMethodError: undefined method offset' for #<Sketchup::Face:0xab8d4cc>> C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:712:in inside_offset'
                C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:655:in each' C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:655:in inside_offset'
                C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:215:in mode' C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:72:in activate'
                C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:912:in `select_tool'
                C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:912

                This time the green face displayed at the bottom instead of the top.

                Another odd thing is that unticking the visibility box for the 'path' layer makes no change.

                I would like to also suggest that when the path layer is created it is not made as the active layer. Layer 0 should remain active. And it would be nice if the .rb file kept the same name through version changes so installing a new version just overwrites the old.

                Thanks for taking a look at this.

                Etaoin Shrdlu

                %

                (THERE'S NO PLACE LIKE)

                G28 X0.0 Y0.0 Z0.0

                M30

                %

                1 Reply Last reply Reply Quote 0
                • T Offline
                  TIG Moderator
                  last edited by 2 Dec 2012, 20:16

                  Looks like you need ' offset.rb' in the Plugins folder - it's freely available from http://Smustard.com ... http://www.smustard.com/script/Offset
                  That file should also have a 'require' at the start of your script's code, as it needs to loaded before the script...

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dave R
                    last edited by 2 Dec 2012, 20:41

                    I thought I had that file installed already from long ago. It is now and I get the following:

                    C:/Program Files/Google/Google SketchUp 8/Plugins/CNC_Files/CNC_Profile_Defaults.txt
                    Error: #<NoMethodError: undefined method typename' for nil:NilClass> C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:164:in find_bounds'
                    C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:71:in activate' C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:912:in select_tool'
                    C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:912

                    Etaoin Shrdlu

                    %

                    (THERE'S NO PLACE LIKE)

                    G28 X0.0 Y0.0 Z0.0

                    M30

                    %

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      jgro11
                      last edited by 2 Dec 2012, 22:13

                      OK, I added "require 'offset.rb' to the plugin and uploaded as V.04. (Thanks for the catch TIG!). I also renamed the plugin back to CNC-profile.rb so you can just load it over the top of what you have in your plugins folder. The version number will still exist in the plugins menu.

                      Quote "I would like to also suggest that when the path layer is created it is not made as the active layer. Layer 0 should remain active." The path layer is set active during the geometry creation and at the end of the plugin the active layer gets changed back to the default layer. You never got to the end of the plugin, so it never got the chance to change it back to the default layer.

                      Quote "C:/Program Files/Google/Google SketchUp 8/Plugins/CNC_Files/CNC_Profile_Defaults.txt
                      Error: #<NoMethodError: undefined method typename' for nil:NilClass> C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:164:in find_bounds'
                      C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:71:in activate' C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:912:in select_tool'
                      C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:912"

                      Try deleting the CNC_Profile_Defaults.txt from the CNC_files folder in your plugins folder. It should create a new one when you run the plugin. See if that helps.

                      jgro

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        TIG Moderator
                        last edited by 2 Dec 2012, 22:15

                        @Dave...
                        That part of the code is checking that the first item in the current selection is a group.
                        Unfortunately if there's no selection that 'nil' and that has no .typename...
                        There are better ways yo check what's selected, if anything is...

                        To get it to work as it is... make sure you have something selected before using the tool, and ensure that it's a group... πŸ˜’

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          Dave R
                          last edited by 2 Dec 2012, 22:17

                          I'll try deleting the TXT file and retry.

                          TIG, I did have the group selected before starting the plugin. I even made sure to make it a group even though I don't like to use groups. πŸ˜‰

                          Etaoin Shrdlu

                          %

                          (THERE'S NO PLACE LIKE)

                          G28 X0.0 Y0.0 Z0.0

                          M30

                          %

                          1 Reply Last reply Reply Quote 0
                          • T Offline
                            TIG Moderator
                            last edited by 2 Dec 2012, 22:21

                            Edit the .rb file with a plain-text editor like Notepad...
                            The line reads
                            if Sketchup.active_model.selection[0].typename != "Group"
                            Change it to read
                            unless selection[0] && selection[0].is_a?(Sketchup::Group)
                            This will at least get over that hurdle... πŸ˜•

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              Dave R
                              last edited by 2 Dec 2012, 22:35

                              I deleted the TXT file and tried running it. It worked! The script did give me the save box and I was able to save the file. Unfortunately it left the path layer as active when it completed.

                              I'll edit the rb file with your additions, TIG.

                              Another request: Could you set it to save to the same location as the SKP file? You could actually automate the save process giving the file the same name as the SKP file.

                              gcode.png

                              Edit to add:

                              I closed the SKP file without saving it and edited the text per TIG's instruction. Then re-tried it. It worked but I got the following in the console. Note the error message at the end.

                              C:/Program Files/Google/Google SketchUp 8/Plugins/CNC_Files/CNC_Profile_Defaults.txt

                              2

                              #Sketchup::Face:0xaae9034

                              2

                              #Sketchup::Face:0xaac57d8

                              2

                              #Sketchup::Face:0xaaa1f04

                              2

                              #Sketchup::Face:0xaa7c4ac

                              2

                              #Sketchup::Face:0xaa69a8c

                              #Sketchup::Face:0xaa68204

                              Error: #<TypeError: can't convert nil into String>
                              C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:879:in initialize' C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:879:in new'
                              C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:879:in gcode_write' C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:275:in mode'
                              C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:72:in activate' C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:912:in select_tool'
                              C:/Program Files/Google/Google SketchUp 8/Plugins/CNC-profile_v03.rb:912

                              Etaoin Shrdlu

                              %

                              (THERE'S NO PLACE LIKE)

                              G28 X0.0 Y0.0 Z0.0

                              M30

                              %

                              1 Reply Last reply Reply Quote 0
                              • T Offline
                                timj
                                last edited by 11 Dec 2012, 20:27

                                I'm having similar issues. OS X, sketchup 8

                                Everything is installed correctly, 3D model made to be a group. No save window or new layer appear. Here is the dialog box output:

                                /Users/timjerome/Library/Application Support/Google SketchUp 8/SketchUp/Plugins/CNC_Files/CNC_Profile_Defaults.txt
                                Error: #<Errno::ENOENT: No such file or directory - /Users/timjerome/Library/Application Support/Google SketchUp 8/SketchUp/Plugins/CNC_Files/CNC_Profile_Defaults.txt>
                                /Library/Application Support/Google SketchUp 8/SketchUp/Plugins/CNC-profile.rb:118:in initialize' /Library/Application Support/Google SketchUp 8/SketchUp/Plugins/CNC-profile.rb:118:in new'
                                /Library/Application Support/Google SketchUp 8/SketchUp/Plugins/CNC-profile.rb:118:in inputs' /Library/Application Support/Google SketchUp 8/SketchUp/Plugins/CNC-profile.rb:71:in activate'
                                /Library/Application Support/Google SketchUp 8/SketchUp/Plugins/CNC-profile.rb:914:in `select_tool'
                                /Library/Application Support/Google SketchUp 8/SketchUp/Plugins/CNC-profile.rb:914

                                1 Reply Last reply Reply Quote 0
                                • D Offline
                                  Dave R
                                  last edited by 11 Dec 2012, 21:23

                                  Did you install Offset.rb?

                                  Make sure the Plugins folder has read and write permissions enabled.

                                  Etaoin Shrdlu

                                  %

                                  (THERE'S NO PLACE LIKE)

                                  G28 X0.0 Y0.0 Z0.0

                                  M30

                                  %

                                  1 Reply Last reply Reply Quote 0
                                  • T Offline
                                    timj
                                    last edited by 12 Dec 2012, 11:09

                                    Yes offset.rb is installed within my plugins folder (I've also checked the read and write permissions). I've tried reinstalling the plugins and am still getting the same errors. I'm not sure what else to try?

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      TIG Moderator
                                      last edited by 12 Dec 2012, 11:38

                                      @timj
                                      Your error says:
                                      **/Users/timjerome/Library/Application Support/Google SketchUp 8/SketchUp/Plugins**/CNC_Files/CNC_Profile_Defaults.txt
                                      So some code is expecting the tool's subfolder and thereby the txt file to be in that Plugins folder structure.
                                      BUT that is NOT the right MAC 'plugins' folder - do NOT install into the 'User' one, rather use the one in the HD tree - ensuring you have full read+write permissions to this folder:
                                      Macintosh HD/Library/Application Support/Google Sketchup 8/Sketchup/plugins

                                      Another potential issue is that if your MAC has a case-sensitive system some files can NOT be 'found' - so for example if a folder is named 'plugins' and a script assumes it's called 'Plugins' it will be found OK on a PC or most MACs, but on a case-sensitive MAC system it will fail... This is unlikely, but if all else fails...

                                      TIG

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        Dave R
                                        last edited by 12 Dec 2012, 11:51

                                        Good call, TIG. I missed that "Users" detail.

                                        Etaoin Shrdlu

                                        %

                                        (THERE'S NO PLACE LIKE)

                                        G28 X0.0 Y0.0 Z0.0

                                        M30

                                        %

                                        1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          jgro11
                                          last edited by 6 Jan 2013, 18:36

                                          I uploaded V05 in the first post. This version's major change is that I incorporated TIG'S Smart Offset plugin. So now you don't have to have inside fillets on your part larger than half the mill diameter. See image below. The fillet radius is .100 and I'm cutting it with a .25 diameter cutter (.125 radius). It creates a nice sharp corner, like it should.

                                          Capture.JPG

                                          I also added the ability to have stock left after machining to either the inside or outside cuts.

                                          Enjoy!

                                          jgro11

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

                                          Advertisement