Please note that this mechanism has been superceded by the Tools|Phlatboyz|Options menu system.
Current settings in Constants.rb and MyConstants.rb will be honored but overridden by the new settings mechanism, so it is best if you use that.
The Phlatscript system has long had a file called Constants.rb which contains a long list of contant values. Some of them are used only by the system and are not user settable while others are designed to be user settings that you set once and forget.
Current development of the system revealed that Constants.rb will be changing often as new features are added, thus presenting the problem of 'merging' the new file with your existing options such as default safe cut area and so on.
A new system had to be designed and the simplest is to have a secondary constants file in which you set your options. This file will never be updated by a SketchUcam system upgrade, and so the developers can happily add features without it impacting the upgrade process.
Windows/Mac/Linux users : finding the Plugins/Phlatboyz folder
|
C:\Program Files\Google\Google SketchUp 8\Plugins\Phlatboyz\MyConstants-example.rb
(see path note for Sketchup Make)
which contains mostly the same defaults as Constants.rb except that some are metric and all the system specific
stuff that you don't need to mess with (and shouldn't mess with) has been left out.
The distributed files assume you have a Phlatprinter that is not a Phlatprinter 3, and thus the option for using an overhead gantry is false. Now, you can try to remember to always set that 'true' in the parameters dialog, or you can set the default, BUT HOW?
C:\Program Files\Google\Google SketchUp 8\Plugins\Phlatboyz
Default_overhead_gantry
and change 'false' to 'true'. (The example
file will sometimes have this set true, and sometimes not).Default_overhead_gantry = true
Number formats in the contants file are particularly tricky, so let us look at those:
.inch
or .mm
to tell Sketchup exactly what we mean.
require 'sketchup.rb' # Name Begins With Variable Scope # $ A global variable # @ An instance variable # [a-z] or _ A local variable # [A-Z] A constant # @@ A class variable module PhlatScript # - - - - - - - - - - - - - - - - - # Default Values # - - - - - - - - - - - - - - - - - Default_file_name = "gcode_out.nc" Default_file_ext = ".nc" Default_directory_name = Dir.pwd + "/" Default_spindle_speed = 15000 Default_feed_rate = 2000.0.mm Default_plunge_rate = 1500.mm Default_safe_travel = 3.mm Default_material_thickness = 4.mm Default_cut_depth_factor = 110 Default_bit_diameter = 3.2.mm Default_tab_width = 8.mm Default_tab_depth_factor = 50 Default_vtabs = false Default_fold_depth_factor = 50 Default_safe_origin_x = 0.0.inch Default_safe_origin_y = 0.0.inch Default_safe_width = 1300.mm Default_safe_height = 2500.mm Default_comment_remark = "Davids defaults" Default_overhead_gantry = true Default_multipass = false Default_multipass_depth = 2.mm Default_gen3d = false Default_stepover = 30 # ------------------------- # PhlatScript Features - things you can set here and not in the parameters dialog # ------------------------- # Set this to true if you have problems with the parameter dialog being blank or crashing SU # on Mac, you will probably need this true # on Linux, you might need this, if you do, you can fix Wine by searching the web for the howto on fixing Sketchup WebDialogs Use_compatible_dialogs = false # Set this to true to enable multipass fields in the parameters dialog. When it is false # you will not be prompted to use multipass. When true you will be able to turn it off and # on in the parameters dialog Use_multipass = true # Set this to true if you have an older version of Mach that does not slow down # to the Z maximum speed during helical linear interpolation (G2/3 with Z # movement A.K.A vtabs on an arc). vtabs on arcs will cut at the plunge rate # defined in this file or overriden in the parameters dialog Use_vtab_speed_limit = false # Set this to true to use G61. This will make the machine come to a complete # stop when changing directions instead of rounding out square corners. When # set to false the default for your CNC software will be used. Without G61 # the machine might be in G64 mode, this will maintain the best possible speed # for the cut even if the tool isn't true to the cut path. # Rounded corners at low feedrates aren't very noticeable but anything over # 200"/min starts to generate large radii so that the momentum of the machine can be maintained. Use_exact_path = true # Set this to true, if you want the safe area to always show, when parameters are saved. # Otherwise the safe area will only show, if it's size has been changed. Always_show_safearea = true # Set this to true to use 1/3 of the usual safe travel height during plunge boring moves # this saves a lot of air cutting time Use_reduced_safe_height = true # Set this true and set the height and the Z will retract to this at the end of the job # really only useful for overhead gantries Use_Home_Height = false Default_Home_Height = 100.mm # Set this true to generate pocket outlines that cut in CW instead of usual CCW direction # Please research 'climb milling' before changing this. # Note this is a draw time option, if you change it in the G-code you have to redraw all pocket cuts. Use_pocket_CW = false # Set this true to generate plunge cuts in CW instead of usual CCW cut direction # Please research 'climb milling' before changing this. Use_plunge_CW = false # Outfeed: phlatprinters only! # Set this to true to enable outfeed. At the end of the job it will feed the material out the front of the # machine instead of stopping at X0 with the material out the back. # It will feed to 75% of the material size as given by the safe area settings Use_outfeed = false #Set this to true to have pocket zigzags default to along Y axis, false for along X axis #setting can be changed on the fly with the END key Default_pocket_direction = false end # module PhlatScript
The following lines must stay as they are, where they are, otherwise the file will fail to load, preventing the toolbar from showing, and in fact preventing SketchUcam from operating at all.
require 'sketchup.rb' module PhlatScript # some contants may be here end # module PhlatScript
The paths quoted here assume you have Sketchup 8.
If you have Sketchup Make (the 2013 release) then your path will be
C:\Program Files\SketchUp\SketchUp 2013\Plugins\Phlatboyz
unless you installed it in a custom place. If you can do that, we'll have to assume you can find it again.
If you still cannot find it, follow the instructions in the sidebar.