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

Sketchup CNC

Scheduled Pinned Locked Moved Woodworking
90 Posts 28 Posters 466.2k 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.
  • M Offline
    Mike Lucey
    last edited by 13 Apr 2012, 23:51

    Yep, I've been using SU since v1 and hardly a week goes by that I don't see some new use it has been adapted for. Maybe not ideally doing the job but still doing the job in some manner.

    I wish I could offer actual productive help on this project but my programming skills are 0! Hopefully others will row in and get involved ๐Ÿ˜„

    Support us so we can support you! Upgrade to Premium Membership!

    1 Reply Last reply Reply Quote 0
    • V Offline
      voljanko
      last edited by 15 Apr 2012, 07:17

      Hello Noel,
      I tried to have some g-code from your plugin.
      After selecting the 2 vertexes with the 2nd button (the model must be edited to select vertex),all the edges has been colored black.
      Then with the 4th button (for generating code) I get this error in the console:
      Error: #<NoMethodError: undefined method each' for nil:NilClass> C:/Program Files/Sketchup8/Plugins/minivistii/concepts.rb:191:in initialize'
      What goes wrong?
      I would like to test the g-code on the simple xyz router to engrave something.What tool and procedure should I select?
      Congratulations for the plugin,the code seems to be very well structured.
      Hope your plugin will be useful also for others.

      SuSolid.com - solid check - solid repair- solid intersection check - weight plugin

      1 Reply Last reply Reply Quote 0
      • N Offline
        noelwarr
        last edited by 15 Apr 2012, 20:16

        Hi there voljanko.
        I'm really pleased you're giving it a go. ๐Ÿ˜„ Don't worry, we'll get it up and running in no time. I've had a look at where the error is coming from and I think there is something strange about the way you have declared your toolpath. Hardly surprising considering the fact there are no instructions, no icons and no nothing. I have written a little article in the wiki of the project. Try following those instructions. If you think you've done it right and it's still giving the same error send me your skp file and I'll take a look.

        From your error I guess the following is the case. You have a group with a bunch of edges that represent your toolpath. The toolpath however is actually defined by the vertices. If there is a vertex in the group that isn't part of the toolpath the method fails. There are a number of reasons this might happen.

        Engraving should be easy enough. Check out this 6 month old post. I think it was about 50 lines of ruby code. It was just an experiment but ever since this project has been bubbling away in my mind. In the photos you can see a sketchup model, the gcode generated from a small script and the finished product.

        https://plus.google.com/u/0/106243199685455140135/posts/3rq4Zep9V5b

        Thanks again for giving it some time voljanko

        1 Reply Last reply Reply Quote 0
        • V Offline
          voljanko
          last edited by 16 Apr 2012, 18:15

          Jeee,it's working now,I have some g-code!
          First I have misunderstood the concept of the toolpath.Your plugin is only accepting lines for toolpath.If I want to declare anything else (shape or body) is giving me that error.
          It's a good start.Now I have to check if the commands and coordinates in the code are compatible with the router.
          Thank you again for your plugin.
          I think it is a good start platform for a standard Sketchup to CNC plugin.

          SuSolid.com - solid check - solid repair- solid intersection check - weight plugin

          1 Reply Last reply Reply Quote 0
          • N Offline
            noelwarr
            last edited by 16 Apr 2012, 19:16

            ๐Ÿ˜Ž Brilliant!

            There is a good chance it won't be compatible with your CNC router. But don't worry, if it isn't, I'll write a simple postprocessor for your machine. A simple postprocessor is what this plugin needs to get others to start tinkering around with it. Let me know how you get on

            1 Reply Last reply Reply Quote 0
            • E Offline
              errror404
              last edited by 16 Apr 2012, 20:19

              I made my own CNC machine using a x2 mini mill... unfortunately, I moved and the machine is still siting at my parent's basement.

              I'll keep an eye, but can't contribute testing right now

              1 Reply Last reply Reply Quote 0
              • N Offline
                noelwarr
                last edited by 17 Apr 2012, 20:55

                Oops... ๐Ÿ˜•

                Just realised a problem with the plugin. Workpieces seem to be taking their origin from the model's origin. Should be an easy fix. Don't know why that's happening. Probably a last minute change before I committed and pushed my code. I'll look into it this weekend. Meanwhile, for testing purposes please position your workpiece origins on the model origin. Thanks.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  Dropout
                  last edited by 18 Apr 2012, 00:48

                  Ok please tell me how to install this and make it run.

                  1 Reply Last reply Reply Quote 0
                  • N Offline
                    noelwarr
                    last edited by 18 Apr 2012, 06:49

                    Hi there dropout.

                    It's a plugin like any other so you just stick the relevant files in your Sketchup plugin directory. The next time you start sketchup they will be read and executed automatically.

                    That said, if you don't feel confident toying around with the code, it's probably best you stay away from this code for the time being. It's all quite exerimental at the moment and the user interface is unfriendly to say the least.

                    Also, you're probably wondering how to download the program. Well, you can't the way you would other programs. What I have uploaded is the repository which allows others to contribute to the source code. If you're still eager but don't want to install GIT you could just copy each file individually creating necessary folders, etc. Good luck

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      tim
                      last edited by 21 Apr 2012, 17:49

                      Noel, excellent start on a really interesting project.
                      I grabbed the code and notice a couple of things immediately:
                      a) you've used some words that would need translating before I had a clue what was going on ('cuchilla', 'graus', etc)
                      b) you've done something I've seen done many, many, times in Smalltalk and Ruby etc - made filenames by concatenating literal strings including the directory separators. Bad move, it makes for OS specific code when you don't want it. There should be useful methods to build a suitable path that avoids that issue. A quick google suggests using things like File.join instead of pwd + '\' + foo

                      1 Reply Last reply Reply Quote 0
                      • N Offline
                        noelwarr
                        last edited by 21 Apr 2012, 18:47

                        Thanks for the feedback Tim. Really encouraging and straight to the point.

                        a) These are Catalan words and they describe the tools that are available to my machine. Every machine is different so the UI needs to be different for every machine. At the moment this means you would need to edit "ui.rb" as well as "postprocessor.rb". It is poorly thought out I agree, but my efforts were concentrated in the "concepts.rb" and "parser.rb" files and getting them right. I belive that the best solution would be to have the "ui.rb", "concepts.rb" and "parser.rb" files stay untouched.
                        It seems obvious to me that a class called something like "CNC" or "Machine" should be declared somewhere in "postprocessor.rb". It should have a method tools() that retrieves the tools available to that machine. This can be piped to the UI and should be easy enough for hobbyists to edit for their machine. This class should also contain other methods to aid the postprocessing. Things like number_of_axes(), pods?(), max_spindle_speed()...

                        b) I thought there was a good chance it would fail on macs but decided to make a concious effort to not loose sleep over it. Something told me that the answer would come to me in the form of a wise man called Tim ๐Ÿ˜„ I'll fix it soon.

                        Thanks again and I'm sorry there are no comments! ๐Ÿ˜ณ

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          tim
                          last edited by 22 Apr 2012, 05:54

                          @noelwarr said:

                          a) These are Catalan words and they describe the tools that are available to my machine.

                          Really? It probably won't surprise you to hear that I know no Catalan at all. I suspect my mother learned a little many, many years ago because she and her red-headed friend Nancy hitch-hiked across Andorra (amongst other parts of Europe) around 1957 or so. I understand they got into quite a few adventures such as sleeping under hedges in snowdriftsโ€ฆ.

                          @noelwarr said:

                          Every machine is different so the UI needs to be different for every machine. At the moment this means you would need to edit "ui.rb" as well as "postprocessor.rb". It is poorly thought out I agree, but my efforts were concentrated in the "concepts.rb" and "parser.rb" files and getting them right. I belive that the best solution would be to have the "ui.rb", "concepts.rb" and "parser.rb" files stay untouched.
                          It seems obvious to me that a class called something like "CNC" or "Machine" should be declared somewhere in "postprocessor.rb". It should have a method tools() that retrieves the tools available to that machine. This can be piped to the UI and should be easy enough for hobbyists to edit for their machine. This class should also contain other methods to aid the postprocessing. Things like number_of_axes(), pods?(), max_spindle_speed()...

                          Sounds a good idea. I'd hazard a guess that somewhere in Ruby-land there is a standard way to provide lists of UI related words and phrases that you can choose from at runtime, depending upon a chosen language setting. It's a fairly standard technique that works tolerably well most of the time.

                          @noelwarr said:

                          b) I thought there was a good chance it would fail on macs but decided to make a concious effort to not loose sleep over it. Something told me that the answer would come to me in the form of a wise man called Tim ๐Ÿ˜„ I'll fix it soon.

                          One lives to serve. ๐Ÿ˜‰

                          As for comments - I always advise against living up to the old joke that goes "Comments? Why do you think it's called code?". A friend put it even better; "Don't document the code, code the document"

                          1 Reply Last reply Reply Quote 0
                          • S Offline
                            Scott M
                            last edited by 29 Apr 2012, 13:55

                            I am also very interested in this plugin one question I have is. Will it be able to generate code for v carvings also 3d carvings etc. I have toyed around with other trial versions of v carve and 3d programs and they have separate post for a multitude of machines of witch even the ones that are set up for ours still have to be edited for our particular machine. I don't know if I have ever seen a single post that was user friendly enough for a person that knows nothing about programing to edit properly. Looking forward to using this in the future

                            https://www.youtube.com/user/ecabinetstips

                            1 Reply Last reply Reply Quote 0
                            • N Offline
                              noelwarr
                              last edited by 29 Apr 2012, 18:14

                              Looking forward to making this code a bit more user-friendly over the next couple of weeks. Anyone willing to design some icons for the UI? They have to come in png file format and come in two different sizes (24px x 24px and 16px x 16px). There are 5 in total and should represent the following.

                              1. Declare an assembly
                              2. Declare a workpiece
                              3. Declare a toolpath
                              4. Declare a hole
                              5. Generate the gcode (or whatever files are necessary for the CNC machine)
                                It would be nice if they blended into the Sketchu UI but you can hand sketch them for all I care. The problem is I'm used to having blank buttons. I just know which one is which and I'll probably never get round to designing them. Since you're all Sketchup users I sugest designing them in the Sketchup model and then just capturing the screen.

                              If you're up for it, send me an IM or email or something. Cheers

                              1 Reply Last reply Reply Quote 0
                              • N Offline
                                noelwarr
                                last edited by 30 Apr 2012, 07:25

                                Hi Scott
                                I see no reason why you shouldn't be able to perform V carvings and 3D toolpaths. As long as your CNC machine is a 3 axis router you can pretty much do anything with this plugin. There are a few things you can't do at the moment but they have a relatively simple fix. These are

                                1. Pure curves
                                2. Assemblies
                                  There are some it will probably never do
                                3. Interpolation in 4 axis routers
                                4. Helicoidal curves (Spirals)

                                As far as the post processors go. There is no getting around the fact that you need one for every machine just like you need a driver for every printer. I have thought of a way to simplify the whole process and to make it as user friendly as possible. I think that you'll probabbly be able to edit it with relative ease. It is however likely that if this project continues to grow, the postprocessor will become a much more complex document with time.
                                Can you tell me a little about your CNC machine?

                                1 Reply Last reply Reply Quote 0
                                • S Offline
                                  Scott M
                                  last edited by 30 Apr 2012, 10:30

                                  Hi Noel
                                  Our Machine is a 3 axes thermwood CS 45 It has the gen 2 super control with a twelve position auto tool changer 7 at the back and 5 at the head .It also has a auto tool length tool measure. By the way I am assuming the file format that the G code will be in is a NC format. Our machine will accept NC files as well as dxf files.

                                  https://www.youtube.com/user/ecabinetstips

                                  1 Reply Last reply Reply Quote 0
                                  • N Offline
                                    noelwarr
                                    last edited by 1 May 2012, 09:40

                                    Hi there Scott.

                                    Well, your CNC is certainly a lot closer to ours than a DIY CNC. The auto tool length sounds really cool (wish I had it!).

                                    The way I understand, it Gcode is NC format. You can organise DXF files in such a way that your CNC machine "imports" them by following polylines according to layer and drilling holes where circles are drawn. I always had the feeling that this was kind of a botch job and haven't really looked into it in any detail.

                                    Indeed, this plugin generates NC files, not DXFs. The way I went about it was simply reverse engineering (Sounds cool but it was my first attempt at it). I defined a simple toolpath from (100,100,19) to (200,200,19) and a simple 5mm diameter hole (50,50,19). I then looked at the file in notepad and with the help of wikipedia http://en.wikipedia.org/wiki/G-code I started figuiring out what each part did. It's a lot simpler than it sounds.

                                    If you send me a NC file with the toolpath and hole I have specified above, I'll let you know how easy/difficult it will be to get a postprocessor working for you.

                                    1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      Scott M
                                      last edited by 1 May 2012, 10:26

                                      Sorry Noel but currently I can not generate a NC. File my self. The programs that I have available that can generate these types of files are only trial versions and will not allow me to save tool paths that I create myself. The main program we use is Ecabinet systems and it creates it own type of file format (TWD) and is encrypted when you open it in notepad.

                                      https://www.youtube.com/user/ecabinetstips

                                      1 Reply Last reply Reply Quote 0
                                      • N Offline
                                        noelwarr
                                        last edited by 1 May 2012, 11:37

                                        So, if i understand correctly, you are only capable of manufacturing whole cabinets. You can't program a couple of hole and a toolpath with a cabinet software solution. I suspect though, there should be some rudimentary application installed on the computer that atually controls the machine that should allow you to program individual operations.

                                        Nonetheless your ecabinet solution generates NC files for your CNC (I very much doubt it exports to DXF). Try designing a ridiculously simple cabinet with no shelves and no door and send me the NC file/files generated from it. I should be able to work out a fair ammount from that.

                                        PS: If your CNC machine also works with job lists, send me that file too.

                                        1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          Scott M
                                          last edited by 1 May 2012, 23:10

                                          Yes Noel we do have A way to create the tool paths you are speaking of Only it is with our hand held programmer of witch I have no experience in using except for moving the head in x,y,z positions for setting fixture offsets and such. This is because there has never ben a need for manually programing such moves as you described. I do have a step by step tutorial that I can try to recreate the file you are wanting. I will try to sneak it in on my breaks.

                                          https://www.youtube.com/user/ecabinetstips

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

                                          Advertisement