Thread Tools
Aug 30, 2019, 08:25 PM
treefinder
springer's Avatar
Thread OP
Discussion

Wafer, new CAM tools for sketchup users SU to Gcode plugin


I have recently completed a CNC machine to cut foam using the needle cutter from this thread: https://www.rcgroups.com/forums/show...d-cutting-foam My machine is shown on page 18 of the thread, and it works a treat for cutting Model Plane Foam and other styrofoam sheet. But this thread is not about it, but rather about a couple of tools I have found to create the files to cut. I use Sketchup V7 almost exclusively, as I find it has most all the features I need and those not native can be added with plugins. When I finished my machine, I needed a way to create the Gcode to drive it. I have the Phlatboys plugins loaded, but hadn't quite figured out how to use them, considering they are really for rotary cutters (i guess - mostly just too lazy to figure it all out!) I wondered if in all the plugins that have been created over the years there was one that automated the translation from .skp to .nc, and after some googling I stumbled onto a google site posting from 2010 of a wafer.rb that seemed to actually work going directly from a sketchup file to a Gcode .nc file. Once I tried it a while i noticed some "issues" with it, and tried to find the author (after 9 years) having only the Google site info. Eventually I found Duncan Law, via Linkedin, and found out that he was a poster here on RCG back in the day as well! We connected and he agreed to revisit the code to fix the issues and enhance it a bit. Turns out he's a programmer by day, so tinkering with ruby scripts is a relaxing diversion (I may be putting words in his mouth, but at least it seem that way).

The plug in is loaded into the plugins folder of V 7 in the normal way, and shows on the plugins pull down menu. To use it, I lay out my templates (all surfaces in z plane) arranged to fit the sheet I'm cutting, select all of them and use the "multiple_push_pull" plugin to extrude 5mm thickness to all of the parts. I then select all and run wafer. I get a dialog box with a bunch of selectable criteria like cutter diameter, etc. So far the defaults have all worked fine. I click OK and it asks for a file name and location to generate the Gcode. Enter that and click OK. It processes and both shows the cutter path next to the original parts and creates the Gcode in the named file. While it was pretty slow when I first tried it, taking a couple of minutes to do a 25part 2x4ft sheet, the last one I did using the V0.2.13 only took 18 seconds to run. The resulting Gcode doesn't have any feed speeds so I need to open and add them. Depending on where you set the Z zero, you may have to change that as well. It defaults to Z=0 as the location to cut, and I set my machine full down stroke to zero at bottom of stroke, so that works for me. I use the Universal Gcode sender program to send the code. It's free and seems to have everything I need: connects to the Arduino (eleksmaker 3 axis) board, browse for .nc file, jog functions to set and return to zero, and a decent path visualization. It also has a pause function that I have had to use from time to time to correct "oops".

The development of wafer is at the point where I can pretty much run it, open the .nc file add feeds and go run the cutter. I figured some of y'all might find that a useful tool set. Here's links to all the sofware:

Wafer: https://github.com/mrdunk/wafer This is Dunk's github page. You can download the latest wafer file (0.2.13) from there. I suppose there is an easy way to download it but I just highlighted all of it, and copied it into a new notepad file named wafer.rb. Had to delete the .txt from the name notepad put on it, before using it.
Universal gcode sender: https://winder.github.io/ugs_website/ UGS is a java script Jar file.
The other plugin I found useful is multiple_push_pull.rb found here:
Ruby Script "Multiple Push/Pull" - SketchUp for Landscape Architects (1 min 15 sec)
Wafer needs part thickness to work, so the single surface templates need to be pulled up to the cutting height. this plugin does that for all templates at once, quite nicely.

I have tried wafer on V7, 2013 and 2015 it seems to work on all of them. I trust some of you will find it all useful!
Last edited by springer; Nov 14, 2020 at 09:15 AM.
Sign up now
to remove ads between posts
Sep 14, 2019, 08:06 AM
treefinder
springer's Avatar
Thread OP
Lots of views, no discussion. Ah well, here's another use for wafer that I have discovered:

A bit of history first: my cnc machine started its existence as an Eleksmaker laser "engraver" ; half watt diode laser, letter size platten. I expanded it with some new extrusions from 8020 and added the Z axis that set me up for the needle cutter application. While the needler works a treat for cutting foam, and i have used it (with wafer generating geometry G-code) for several planes, i started itching for "even more capability". Tough being an inveterate tinkerer! I was able to stop by the home of dkjlinux, the developer of the current version of the needle cutter this summer. There, I saw his 2.5 watt laser and how much he has been doing with it. Back home I found it on sale at banggood.com, so just had to get it. So now I have a needle or laser cnc.

I like to put N number identifications on my planes; makes them look more realistic, helps a bit with orientation and adds a little bling! I have had a friend with a Cricut type vinyl cutter make some, and have printed then hand cut others but wanted to do it myself. I find that the laser can cut the vinyl (or even colored packing tape without burning through it's backing paper/film. The trick is how to get the letters & numbers into gcode.

It turns out that sketchup has the key already built in. Here's my process: in a new file, i click on the 3d text icon. That brings up a dialog box where i enter the text, select font, height/size and extruded distance. I select 5mm as default extrusion. (One beauty of this is you can browse the web for hundreds of free truetype fonts). I then place the text, which is a sketchup group at the origin in the plan view. Once placed I explode the group for editing and running wafer. Sometimes they need a bit of clean up. Last night I did one where a couple letters were overlapping "solids". I removed the extra lines making each separate letter an individual item. Once I like the result, I run Wafer plugin from the plugins drop down menu. That generates a .NC gcode file that I save on desktop for easy access. I open the file and edit the speeds and feeds. Wafer automatically adds a Z action for cutting and retraction between cuts. I edit each of them replacing the G01 commands with M03 commands to turn laser on and off. (On my machine M03 S0 is off and M03 S60 is the right power setting for cutting). I set the laser to correct burn height/focus manually before cutting anything, so there is no need for any Z actions in the file. I have made 5 cuts of logos and N numbers so far and all came out perfect!
Sep 23, 2019, 09:58 AM
Still the "Pro"-crastinator...
Steve85's Avatar
Hey springer,

Just came across this thread and think the SU tools you've found are really interesting. I tinkered with SU 7 a few years ago as a means of visualizing component assemblies in 3D without breaking the bank. Being able to directly from SU to G code saves a couple of steps. Thanks for posting!

Steve
Sep 23, 2019, 10:28 PM
treefinder
springer's Avatar
Thread OP
Cool, hope it works for you. If it generates any questions, just ask. As I noted I tried wafer on both SU 2013 and 2015, and it worked ok.
Apr 10, 2020, 06:02 PM
Registered User
Hi Mike,
Can it also do score cuts?
Apr 10, 2020, 08:16 PM
treefinder
springer's Avatar
Thread OP
Yeah, I have done the fold line for tip dihedral in a couple of Nutballs. It isn't as automated as more sophisticated programs, though. Wafer finds loops and has a couple of routines to make sure the group of points is a totally a loop. It wont "find" a single line, so I made the score line a rectangle 1mm by the line length I wanted. It found it and created the loop. I then had to figure out which loop was it in the .nc file, then instead of setting the cut Z depth to 0, I set it to2 for a 3mm score in a 5mm thick sheet. It is a bit of work, but I learned a good bit about g-code in the process. The nutball is the only model I have done with a score line, all others are regular template parts and all are full loops. I should add that wafer finds slots in parts even though they are loops inside loops. One thing i have had to do is abandon my "shared edges" where several parts are line for line. That works for when Yvonne cuts kits with her laser, but when I use needler and wafer I have to separate them. The planes I have done are readiboard kits I am updating to MPF so I'm rearranging parts anyway.
Apr 21, 2020, 02:08 PM
Registered User
Michael V's Avatar
Funny how we end up always in the same forums/threads
But since we all use CNC, MPF, sketchup, and so on, what else could happen. Next you'll do slope soaring and life will be complete.

Anyway, in the news, just ordered a kit for the edward CNC that will give me a needler for MPF and other foam. I extensively redesigned the 3D printed parts so that I get more accuracy, functionality, etc.. (that's the easy and fun part for me). Redesign is not finished yet, but it will have interchangeable tooling head, which will include needle cutting, laser, maybe routing (we'll see how capable), pen, engraving.
So sometimes this year I shall have a CNC cutter.

I have to figure out if I keep the arduino GRBL system or switch to David's pi based system (my preference) but I don't fully grasp it all yet, so I need more study to understand what's needed and how.

The good thing though is that I'm very proficient in sketchup including many addons, I've written a few myself to do things that were needed (airfoil anyone ). So the fact that there are extensions available, and that I can work on these extensions is a good thing. BTW I don't fully use fusion yet, but it's probably the next thing since sketchup (I use V8) is progressively getting harder and harder to use (by their design )
Fusion is programmed in Python, so there again it shouldn't be too hard to come up with addons that we may need, already working on it (although there is already an addon for airfoils that works just fine as far as I can tell)

I saw someone ask for scorecuts.
It's easy to run different layers for different cuts, generate Gcode per layer, and run one set at full depth, then adjust manually and run another set of gcode at half depth.
To generate profile, import PDF, size to liking, and go over lines (using TIG's 2D tools, but not needed really). Using TIG 2D tools, we can come up with all kind of schemes to show different cuts. We could also design a standard Z depth of parts for cutting and a 1/2 Z for score cuts.
When I look at what people are doing in Inkscape it boggles my mind, way too complicated, I guess it works for raster maybe. I plan to use Sketchup and layers (one layer for cuts, one layer for score cuts, etc.. even maybe one layer for bevels. More to come and to engineer/program/design there), so I probably will adapt some stuff to do that. Score cut from laser/needles are almost useless (too sharp) they really would need to be bevels with angles, that's the point.

In the mean time it's easy to run different layers for different cuts, generate Gcode per layer, and run one set at full depth, then adjust manually and run another set of gcode at half depth.
To generate profile, import PDF, size to liking, and go over lines (again, Fredo 2D tools, but not needed really)
I design all my planes foam and 3d printed, and 3d molded in sketchup so for me it's straight forward anyway.

We'll get there, let me know what you guys come up with, let's brainstorm good solutions.
Also probably will use sketchucam, I will figure out both which one is easier or which one is easier to modify. I even started working on a CAM addon for sketchup some time ago,I'll dig through it too but we have at least 2 functioning. (although bevel and 5 axis needling/lasering might be fun, first we need to put the capabilities in the machines )

Any input on laser power necessary? I'd like to cut balsa too, maybe 1/4 thick. It seems I've seen 2.5W used and working,
Apr 22, 2020, 01:17 AM
Registered User
Michael V's Avatar
OK Here is a more evolved version already, not even close, I already have a full page of modification I want to do.
This one ruby (once extracted) replaces the older one. It adds:
- It is now a command called "Generate Gcode" under the Tools menu. Do you guys want a toolbar button? A context menu entry?, let me know.
- Forces the edge color, so we can now always see them, no need to go into "edge, display by material" to set it up.
- The Gcode file created has the name of the file, (i.e. if you generate code for a "Blue Airplane" sketchup file, the gcode file is named "Blue Airplane .nc")
- As a matter of fact it's renamed "Blue Airplane_Layer0.nc", PROVIDED that all entities selected are on the same layer. That means that you can have several parts in the same sketchup file and if you put them in different layers (i.e. fuse in "fuse" layer, tail in "tail" layer) then the generated files upon respective selection will be "Blue Airplane-fuse.nc" and "Blue Airplane_tail.nc". Both files will have complete G-code (init and closing) so they are both executable. If you select the whole set (fuse and tail) then the file will be unique (have both path) and be named "Blue Airplane.nc"

More to come.
Apr 22, 2020, 01:38 AM
Registered User
Michael V's Avatar
Let me know what you think on how to handle depth.

Right now my idea is to create a tool offset:
Then it defaults everything to 0 level (or to the level of each horizontal face in the model, but more on that later, that's more 2.5D stuff)
So at 0 if you set your blank at 0 on the bottom, the tool will go to z=0 as depth. If you set the tool offset to thickness (laser for example) then the 0 plane will be the top of blank. If you set a negative offset (needle cutter) then the cut will go below the bottom plane of the blank (when z=0 is set up on the machine at bottom of blank"
Each tool would have its own offset.
So you could cut a sheet with offset = -2 (mm) with the needle cutter, and it would go below the bottom plane by 2mm, then change the tool to a laser, and offset 3/16, that would lase the surface, or different pens and that would draw on the surface with different colors (neat huh?)
Another possibility would be to set up a "second tool" with an offset of +2 mm (and still keep same needle cutter) and that would do score cuts with a needle cutting tool, without moving the blank, moving the zeros or anything. (I would probably do score cuts, before full cuts, but either way)

Thus it would allow to put cuts on Layer0, and score cuts on "Score" layer, run both codes with the offset of -2 for the layer0 gcode, and offset of +2 for the "score" gcode. Position the blank, zero the machine on bottom surface, and execute both gcode programs. Interesting?
For now score cuts would still have to be "volumes" but that will change in the near future, so you will be able to cut lines

Any input? Do you guys think of a better way? Let me know.

I will also add a feedrate field BTW, haven't had the time yet, but it's coming.
Apr 22, 2020, 01:55 PM
treefinder
springer's Avatar
Thread OP
"Funny how we end up always in the same forums/threads
But since we all use CNC, MPF, sketchup, and so on, what else could happen. Next you'll do slope soaring and life will be complete."

Ha! Tru dat! Believe me if I had a slope any where near I would be on windy day. Gotta go to the west coast of MI to find them (3 hr drive a bit much for rc flights!)

Wow, you are jumping into wafer! My programming life ended after I finished a food co-op ordering program in basic back in the 70's. I will take a look at your enhancements. For me, the original wafer has been way easier to use than the phlatboys tools or other more advanced tools. As I mentioned in a flitetest forum on needlers, with both needlers and lasers, all I do is trace all the lines right down the middle. (Since in both cases the "tool" kerf is essentially zero for all practical purposes). Wafer gives the gcode for each part tracing and I can add speeds and feeds manually in win notepad. That could be automated, I'm sure, but actually looking at the code has taught me some good info.

On the laser, I got a 2.5 watt one from banggood.com on sale after spending some time with David (dkj4linux) who came up with the needle concept. The 2.5 watt one has a round 'spot' where as I recall, the 3.5 watt and larger have rectangular spots, so the 2.5 is easier to focus to a point. I have cut some light ply with many passes and some burning, don't think I will do much of that. Have cut the N numbers and logos as shown above in vinyl decal stock and colored packing tape (with appropriate vacuum suction of the smoke, of course). Also cut cloth - surprisingly nicely- I cut a plane logo in a black cloth. I have used it to engrave wood blocks and a couple days ago engraved some small stones with words for the wife. Versatile, all using wafer to generate g-code. David made a short file to run a series of ten lines incrementing each line up by 2mm to fine the finest focus using the Z axis instead of the laser unit focus ring. I made my own and find it way easier to use than the ring.

On the score cuts, I hear you on the bevel vs straight edge. But, when I did the 1mm wide loop , the two close spaces lines half way through the foam act a lot like a bevel for the poly tips of the nutball I did it on. Scoring for a 90 fold probably need a bevel or removing the foam between the two lines.
Last edited by springer; Apr 22, 2020 at 02:16 PM.
Apr 22, 2020, 02:21 PM
treefinder
springer's Avatar
Thread OP
On feedrate for lasers, I had a "jump" issue using my laser when turning it of and on between cuts. After some digging, i found that if i use the G00 command to move between cuts and G01 command for cuts, and have laser functionality engaged (forgot the command for that), the laser automatically shuts off and on between cuts and jump is eliminated. Code is simplified too! Enter speed at first cut with feed and every one after uses both.
Apr 22, 2020, 02:28 PM
treefinder
springer's Avatar
Thread OP
Hey Michael, do you have a good plugin for importing a dxf file into SU? I have good ones to export to dxf, but haven't found one to import. I'm having "issues" with sketchucation forums - wont let me in, won't let me update forgotten password, won't let me start over. So I can't get the importer in their warehouse.
Apr 22, 2020, 02:59 PM
Registered User
Michael V's Avatar
Quote:
Originally Posted by springer
On the score cuts, I hear you on the bevel vs straight edge. But, when I did the 1mm wide loop , the two close spaces lines half way through the foam act a lot like a bevel for the poly tips of the nutball I did it on. Scoring for a 90 fold probably need a bevel or removing the foam between the two lines.
Thanks for the info.
This is a GREAT point, I thought I could do like 5 axis stuff, but this gave me a way better and simpler way to do it. No need for making a complex machine (although that would have been much fun in itself).
I will implement at some point.
Apr 22, 2020, 03:14 PM
Registered User
Michael V's Avatar
Quote:
Originally Posted by springer
Hey Michael, do you have a good plugin for importing a dxf file into SU? I have good ones to export to dxf, but haven't found one to import. I'm having "issues" with sketchucation forums - wont let me in, won't let me update forgotten password, won't let me start over. So I can't get the importer in their warehouse.
Not sure. I have an "Import DXF" command in one of the menus, not sure which plugin created it, so here are all my converter plugins, some cannot be found anymore. Some work better than others (it's sketchup) and it depnds how clean the parts were made.

Another way is to go through another software (I use Cenon or Freecad, or maybe draftsight from memory), import DXF, convert to a format sketchup can read (Collada).
Importing from STL works but not great, it takes a lot of time in conversion sometimes (like a 3MB file takes an hour) and I'm not sure but I found the result to maybe not be properly sized. I've imported parts where dimensions ended up being 9.998 or something, You know it wants to be 10.
Apr 22, 2020, 03:21 PM
Registered User
Michael V's Avatar
And here an extension I wrote 2 weeks ago, very simple but useful.
Allows to hide unhide, and soften and unsoften with right click.
In soften unsoften, if you press "alt" (or maybe window key on your machine) it shows hidden and transparency for as long a you hold.

Not available anywhere, tested on 8 and 2015 only (But simple so should work anywhere).
Drag content into plugin folder (changetool.rb and changetoolIcons folder, not the container folder). If you need an rbz, let me know.


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Sketchup Plugin to Prepare 3D Models for 3D printing reemaj3D 3D Printing 0 Feb 24, 2016 07:10 AM
Discussion SketchUp Users Beware T_om The Builders Workshop 9 Oct 18, 2009 11:48 PM
Discussion Online Design tool (CAD) - Google Sketchup Loose_Screws Foamies (Scratchbuilt) 3 Apr 04, 2009 08:10 PM
New Product Servo Tester-- A new tool for R/C user tech.emcs Other Websites 2 Jul 23, 2007 11:14 AM