OpenBuilds.COM
Phlatboyz SketchUcam(PhlatScripT)
SketchUcam Version 1.5
May 2020

Check for Latest Version of SketchUcam
Introduction
SketchUcam is a set of tools in the form of a plugin for Google/Trimble SketchUp (up to V2017). It allows for assigning of CNC cut/fold/drill/mill, etc. functions to SketchUp designs as a full featured CAM solution. It was designed for use with the Phlatboyz easy to assemble and learn CNC machine kits and has since been extended to work with harder materials in the newer breed of CNC routers the Openbuilds LEAD Machine, Sphinx, WorkBee, MiniMill and C-Beam Machine and as of V1.5 it has OpenBuildsCONTROL integration .

For more information about these affordable Kits, please visit Openbuilds parts store



The vision and direction of SketchUcam is Mark and Trish Carew's of Phlatboyz, LLC and is released under GLN licensing terms. Since this code and the ideas behind it is a collaborative effort among many people, it can not be sold in any form. For more information, please contact Mark and Trish Carew through www.openbuilds.com or kram2422@comcast.net. It has come to fruition through the help of many volunteer programmers, testers, and users. We want to thank everyone for your efforts put forth to make this a reality. SketchUcam is an ever changing and evolving program.

This is a great project and if you would like to contribute your time and talents to help SketchUcam grow, please contact us
Since SketchUcam is released as open source, anyone and everyone is welcome to download it and experiment with it. The ultimate goal is to create a complete and powerful CAM solution directly within SketchUp capable of outputting 3D tool paths and possibly in the future will be the ability to not only output the g-code but control the Phlatprinter as well :) Have fun and please let us know how you are using SketchUcam at OpenBuilds.com
SketchUcam or any form of this code can not be used for commercial gain or sold in any form. This code is a volunteer collaboration project that consists of the efforts of many people. We are keeping this truly open source.
Please send questions or comments to Phlatboyz,LLC
Openbuilds Forum

New in V1.5 (May 2020)

Display SFM and feed per tooth on the parameters dialog.
SFM and then the feed per tooth for 1, 2 and 4 teeth.
This helps with setting feedrates to good values.

Send Gcode to OpenBuildsCONTROL
This button appears only on Sketchup Make 2014 and later
If you have OpenBuildSCONTROL active then this button will send the most recently generated Gcode to it.
Limit length of ramps to multiple of tool diameter.
Only for straight segments, arcs remain at arc length which is normally short anyway.
This is a time saver since plunge rate is normally lower than cut rate. The old way would ramp along the entire length of a segment, now the ramp is limited to 5 times the bit diameter.
Gplot.exe upgraded -
Display scaling is improved.
Display of arcs is much improved.
Right mouse button will now rotate view, in addition to the middle button.
The display angle is saved between runs.
Some additional Gcode words are handled to prevent errors.
Optimize prograss bar so it updates the screen only when needed, this speeds up Gcode generation.
Continual screen updates take processing power away from the process, by only updating when the actual display will change we get noticeably faster Gcode generation for complex operations.
Fix Gcode Joiner to handle new start and end formats (which use G53) as well as old files.
The old start and end safe Z moves could result in a crash on machines with limited Z height. By using 'G53 G0 Z0' style moves Z is always safely raised at the beginning and end of the job.
Improved spiral bore retracts.
Under some circumstances the retract from a bored hole could leave a mark on the internal surface which is now impossible.
Offset for G53 Z raise codes.
Raising to Z0 may hit a home switch, this offset allows for stopping short of the limit, like Z-5 (in mm).
Reduce feedrate in arcs
This option reduces feedrate in arcs (eg. for plungeholes and inlets on outside cuts) according to the ratio of the bitdiameter to the arc diameter.
Bug Fixes
Multipass in laser mode, always use set power, without scaling.
Add faces to plunge hole groups, this helps a lot with keeping existing lines from interfering with holes, but is not perfect.
Toolchange tweak to prevent errors on multi %s strings.
Prevent Gplot opening if gcode generation is cancelled.
If user sets offset to the center of a hole, gcode was not generated correctly, fixed.
Prevent G53 Z moves in laser mode.
Remove 'use plunge/pocket CW' options and make those cuts follow the OverheadGantry setting for direction.

New in V1.4d (Jan 2017)

Help updates
added MAC help section
arcmoveij() is INCREMENTAL mode.
  • The 'incremental' form of IJ is used so make sure you set your controller to incremental mode by issuing G91.1
  • If your controller is in the absolute mode it will display arc segments as HUGE CIRCLES (Mach3 does this).
  • Setting or un-setting this does not change the actual Gcode, arcs are ALWAYS incremental mode, this setting just tells the controller what to expect.
  • An option to output G91.1 as part of the Gcode header has been added to the Feature Options menu.
  • GPLOT will NOT accept this option and will not display the plot. You should rather set your controller to default to this mode.
Solve failure to find profile path on Mac (for real this time)
Sketchup on MAC still has the old .openpanel bug that prevents the use of wildcards. Mac platform is now detected and wildcards avoided.
Note that the file select dialog allows selection of a folder, but the profiles folder will always be used no matter what you select.

New in V1.4c (Dec 2016)

Help updates
added 3D section
arcmoveij() now always used for arc outputs
this improves arc accuracy and keeps Marlin happy
the 'incremental' form of IJ is used so make sure you set your controller to incremental mode by issuing G91.1
Old files with arcs that have no center property will be rejected, they have to be recoded
Early versions did not store the arc centers and they are needed for arcmoveij()
Errant G0 move with no code removed from plungebore in Marlin mode.
a bug prevented the correct output of a G0 move
Marlin mode streamlined
some changes to make Marlin code cleaner
Solve failure to find profile path on Mac due to iOS changing version string
The code was checking the iOS version to figure out where the files are, but that changed so it failed to find the files.
Update translation file {- still need to add a lot of strings though
The translation file is woefully out of date, but now has some new strings.
Pocketing - new method for complicated faces
Pocketing complicated shapes just got a whole lot easier!
laser mode holes
GRBL 1.1 in laser mode will not make a simple spot without motion, so we now draw a small circle.
for large holes > bit_diameter, always draw a circle of the given diameter
Change options at Hole Feature Options
GRBL 1.1 laser power control mode
Using M4 to enable GRBL's new laser power control mode

New in V1.4b (July 2016)

TABs in laser cut mode
Tabs and Vtabs fixed for laser cutting.
Do not use V-tabs, only half of a V-tab will be cut.
Set tab depth to 0% 'to be removed' if you want the laser OFF during the tab cut.
Fix for compatibility menu
The order of multipass options was incorrect, preventing depth setting.
Streamlined Countersinks and Counterbores
They now avoid recutting the hole that has already been cut if it is larger than 2xBitdiam.
Feed speeds adjusted.
Feedrates
Sometimes a required feedrate was not output because of using the wrong comparison method. Now using notequal() to compare to 0.0001".
Initial plungefeed rate will be output on the G90... header line so that there is always a defined feedrate.
Toolchange
Help updated with improved examples.
Centerlines
Fix for 'backtacking' when centerlines are sometimes cut forward and sometimes backward within one curve.

New in V1.4a (June 2016)

Bug fixes
Many additions to help.
New Features
Centerline cuts: prevent retract when possible
If doing multipass cuts, centerline cuts that form loops do not need to retract between passes since start and end point are equal.
This applies to all cuts based on centerline cuts, centerline, fold, and pockets.
Fast approach:
Approach the surface using G00 to within 0.5mm, then switch to G01 to begin cutting.
This reduces cut time greatly when the safe height is relatively high, and to a lesser extent for normal safe heights.
(This was already implemented for ramping cuts, and has now been added to non-ramping cuts).
Very small arcs converted to lines
Arc segments with radius <= 0.010" can cause problems with some simulators and controllers. Convert them to line segments. Note that drawing such a small arc is almost impossible in Sketchup, but they can result from scaling a drawing, or from importing a scanned DXF file.
Chamfer wizard
Tool to set cutter diameter and depth for a chamfer cut
Accessed via Tools|Phlatboyz|Set Chamfer parameters
Note: set the cutline AFTER using this tool, and delete and redo it if you change parameters. Generate Gcode directly after creating cut line.
See the full HOWTO here
Gcode Joiner
adds default extension if not user supplied
Number formatting
remove trailing 0's in plunge holes to shorten lines for GRBL
Plunge holes
streamlined G00 moves when 'use reduced safe height' is true
added 'force all Gcodes on' processing for spirals in plunge holes
Laser cutter/engraver control
Tick the Laser Control box on the parameters dialog and G-code will be output suitable for laser cutting on a machine that uses spindle commands to control the laser.
The current control scheme replaces all Z movements (start and end of cuts) with M03 and M05 spindle motor on/off commands.
The M03 is combined with an S word giving PWM control of the laser power.
This value is set to the cut depth percentage of the current 'Spindle speed' set in the parameters dialog.

For example, if your controller accepts 10000rpm as the maximum spinde speed, then set that in the parameters dialog.
Now, for a 100% deep centerline cut, laser on command will be
M03 S10000
and a 50% deep centerline cut will be
M03 S5000

If you are using GRBL 0.9 the default max spindle speed is 1000.

If your laser only supports full on and full off and cannot use PWM, then always use 100% deep cuts (and a correctly set maximum spindle speed as well) and the spindle control output will always be either on or off.

DO NOT select 'multipass', 'ramping' nor 'Gen3D' when Laser Control is desired.
Ramping and Gen3D will be turned off automatically.
Multipass can be used to get cleaner edges in some materials. Experiment for yourself!

Plunge holes: there are 2 modes: GRBL mode will draw a 0.2mm diam circle, not GRBL mode will create a dot at the center of the hole. The length of the delay at this dot can be adjusted via the Hole Feature Options dialog.
Large holes will draw a circle of the defined diameter.

Large file load speed
A very old version of SketchUcam (Phlatscript 0.918) used attributes that had to be upgraded for 0.919 and up.
This upgrade checks every edge and takes a long time for large files.
The upgrader is now turned off by default. If you have very old Sketchup files that are encoded using 0.918 edge format (they will generate very bad G-code, if anything at all), you need to delete all the cut lines and re-insert them.

New in V1.4 (Nov 2015)

Bug fixes
Fix for Phlatten tool.
Since Make 2014, Phlatten has failed to actually phlatten due to not liking the order used for deleting faces. Faces are now deleted separately from edge collection.
Fold/centerline/pocket tool depth in VCB.
The depth can now be set to floating point number, eg 10.6% or 34.15% etc.
Inputbox error checking.
All input boxes use exception rescuing to detect errors in number formats and 'retry'.  This is a step on the way to handling regionalized number formats.
Note that a side effect of this is that the main parameters dialog will fail silently if it is given an invalid number and the corresponding variable will not be set. For example if you type 45t for Safe Height the safe height will not be changed AND you will not be notified.
Joiner tool - bug in long filenames.
When the joiner tried to create a comment from a long filename, the chunking operation failed. Replaced with .scan().
Added features
Make the path to the gplot program a string in options so it is preserved between versions.
By setting a path to a program that can display Gcode files you can use any program that takes a Gcode file as a parameter for preview.
Tools|PhlatBoyz|Options|File options|Gcode plotter program
set to 'default' to use Gplot.exe the default plotter
set to the full path and filename of your choice of plotter program, such as NC-Plot.
Multiselect pockets
If multiple faces are selected when the pocket tool is selected, all the faces will be pocketed.
All selected entities will be Unselected after this process.
If only one thing is selected, nothing is done, process is ignored.
Make sure you have the correct pocket parameters before doing the multiselect operation!
Large plunge holes with sticky size
Holding down shift when clicking for a plunge hole allows you to set size, but until now you had to do that for every hole. Now you can tap the HOME key to set 'LARGE LOCK' on and be prompted for a hole diameter that will persist until you select another tool or tap HOME again.
Holes in a grid
Select the Plunge hole tool
Hold down ALT and select the point for the bottom left hole
You will be prompted for the spacing and number of holes
A grid of holes is created
You can hold SHIFT at the same time and give a size for the gridded holes
CounterSink/CounterBore tool
CounterSink, extension of the plunge tool, does counter sinks at the top of holes.
Grids and size selection same as for plunge tool.
Depth is always overcut% - hopefully always deeper than the bottom of the countersink.
 
CounterBore, does a counter bore on top of a hole.
Grids and size selection same as for plunge tool.
Depth is always overcut% - make sure it is deeper than the counterbore!
Ramping is forced ON for the counterbore to prevent the unnecessary center drill op.
Simple ABC axis commands
On the Quicktools toolbar, use the rotate icon to set values for A, B and C axes, values will be output before all other motion, and zeroed after homing
Toolchange
The T icon on the Quicktools toolbar enables the use of toolchange commands. For controllers that understand the 'Tx M6' command you can output the command with a given tool number. Optionally include G43 (apply offset) and Hx, select offset.

The alternative option for controllers that do not understand T1 commands is to include a 'macro' file of Gcode commands that achieve the tool change for you. The tool commands can include a '%s' string: this is where the tool offset is inserted.
Activate this toolbar by ticking the View|Toolbars|SketchUcam Quick Tools item.
Rapid approach for Z plunge
When starting a cut, Z will now rapid down to within 0.5mm of the surface before switching to plunge feed rate in the same way that ramping does. This should make cutting with high safe heights much quicker.
view previous changes (V1.2 through V1.3a)

Where to go next

  1. First things to do after install
  2. Learn about the toolbar

 



Thank you for your interest in the Phlatboyz project. Please take the time to visit the Phlatforum for lots of great people sharing great ideas and designs created with SketchUcam on their Phlatboyz machines!