I wrote a very simple gcode plotter last weekend that is triggered through the Plugin menu in SU. It is Windows only for now but is using OpenGL so it might work under Wine. There is currently no error checking and I am just using it to get a quick visualization of the gcode put out by the PhlatscripT. This shouldn't be considered part of the PhlatscripT but it does rely on version 0.918 or greater. Place GPlot.rb and GPlot.dll and Win32API.so (this comes from a standard Ruby 1.8 install) in your SU Plugin folder. After generating the gcode for a model select the Plugins | Plot GCode menu item. Edit The bugsplat was from me linking against a development library. The zip file has been replaced. Edit 9/19/2009 v1.2 - Added ability to pan and rotate about the origin with the mouse. - Added Menu items for opening gcode files - Added Menu item to change the drawing colors based on motion code (G0, G1, G2, G3) - Added right click menu to copy and paste sections of gcode - Copy GPlot.exe and GPlot.rb to your sketchup plugins folder. The old GPlot.dll and Win32API.so can be removed Edit 11/26/2009 v1.3 - Fixed error when I,J or K arc offsets are followed by a float. - Added syntax highlighting to the gcode editor - Vastly improved the speed of the parser (20,000 line file now takes about 5 seconds) - Allow refreshing of plot from changes in editor - Created optional installer package There are two options for installation. 1. Download the zip file and unzip it anywhere you want. Copy the gplot.exe and gplot.rb files to your GoogleGoogle SketchUp 7Plugins folder. 2. Download the MSI installer and run it. Locate the gplot folder in the program files folder. Copy the gplot.exe and gplot.rb files to your GoogleGoogle SketchUp 7Plugins folder if you want to enable the Sketchup plugin. Attached files GPlot.zip (469.4 KB)Â GPlot1.2.zip (498.7 KB)Â GPlot1.3.msi (1.4 MB)Â GPlot1.3.zip (1.4 MB)Â
Thanks for the feedback. Guess I'll have to try it on another machine that doesn't have my development environment installed.
Must have something to do with my development environment on this machine. I'll get it on another one and figure out the problem.
It was a problem on my end. I was linking against a development library I can't distribute. The updated zip has been tested on Windows 2K in VMWare and XP Pro.
I think that is due to the fact that it is open in Sketchup or Mach3 I get that error when I output to Mach3 and forget and leave it open in Mach3 and try to regenerate the code in Sketchup. Mark p.s. I have not had the chance to try this program out yet but I plan on giving it a go today Looks cool!
Can some help the village idiot, please? I didn't get it to work. I had put all three files in the plugin folder. I generated the g-code with the PS and then clicked on the 'Plot Gcode' in the plugin menu and nothing happens. What did I do wrong? I'm too in XP Pro and SU7.
What is the full path to the gcode file you generated? I will try to recreate the same path and name and see if it has something to do with it. Could you also try opening the ruby console in SU under the Windows menu and then run the plugin? If you get anything printed in the console copy and paste it here.
I had put the gcode in a file of my choosing. The windows system on my computer is on drive 'd' as is SU. The code is on drive 'c'. Edit: Just to make sure, I tried saving the gcode on both drives. In both cases the folder name is 'Zip'. The name of the file is 'Superfly 38 inch.cnc' which is the file name in SU. I'm using PS v0.920
That is the problem. I have the path hardcoded as C. You can open GPlot.rb in a simple text editor like Notepad (don't use Word or it will insert the wrong line breaks) and change the path to the dll. Just change the drive letter and path to point at you plugins directory. From GPlot.rb: [pre] def initialize @PlotGCode = Win32API.new("C:/Program Files/Google/Google SketchUp 7/Plugins/GPlot.dll", "PlotGCode", ['P'], 'V') end [/pre]
You've answered before I finished my editing. I'll try it now with the above change. Thanks, gasmasher.
Nope, didn't work either. I tried saving the on either dive as stated above and didn't work in either case. I just get nothing at all. No error, no nothing. As if I didn't press the link at all.
Would you mind trying the ruby console in SU? Before running the plugin select the menu Window | Ruby Console. When you run the plugin any fatal errors should print to the console. Sorry you are having problems.
Duh, he said while hitting himself on the forehead. I didn't restart SU after making the change to the ruby file. It works now, thanks.
Hey gasmasher, he said in cute singsong voice, can we have the pluging also doing editing and then refreshing too?