CamBam Scripts & Plugins

Special tasks in CamBam can often be undertaken with purpose-built scripts or plugins.  A script is written in a scripting language and then executed by the script interpreter provided by CamBam.  Scripts can be VB or Python.  Scripts are relatively easy to work with as they can be created using the builtin editor, so special programing tools are  not required.  Scripts, however, need to be edited to change the geometry and cut parameters, so they are a little vulnerable to becoming  corrupted.

On the other hand plugins are "hard-coded" and are provided as executable code that can be linked into the CamBam framework at runtime.  Plugins can handle  more complex user interface issues, data checking and beter integration into the CamBam framework.  They are, however, more complex to create and require the use of a develpment environment, like Visual Studio.  They are "closed" to the typical user and thus more secure.

Over the last year of so I have created a number of plugins for CamBam.  These are summarized below.  The actual script can be down loaded from the CamBam Forum web site at from the Scripts and  Plugins Sub-section of the Resources Section.  Individual links are incudelkd below.

Curved Surface Plugin

This plugin is intended to assist in the creation of CNC paths for machining of curved and sloped surfaces (in the vertical plane).  Specifically, there are 5 options

Can be found here.

Wrapper Plugin

This plugin for CamBam is intended to take a G-Code file defined in X,Y,Z space and transform it into one wrapped around a cylinder shape for either the X or Y-axis is to give an A-axis (rotational) model.  The Z-axis defines the height of the surface.

Can be found here

Digitizer Input Plugin

The Digitizer input plugin provides a number of tools relating to the peparation of 3D models suitabled for carving. 

The plugin provides a simple way of taking a file containing digitized point (point cloud) data obtained from a digitizing process, e.g. from Mach3, or from any other digitizing device, and to create an STL (Stereo Lithography) file, and optionally import it into CamBam to create a surface object for machining.  The saved STL file may be used for other purposes.

The digitized model is expected to be only 2.5D, i.e. a relief type shape, not a full 3D shape.  The surface triangulation will not work on true 3D models, or cloud models that have coincident points in the X-Y plane.

The digitized data can come from a 6 axis scanner (i.e. the axes X, Y, Z, A, B and C).  It is assumed that the surface being digitized is still essentially a 2.5D surface, i.e. the coordinate axes are coming from any, and only, three of the six possible axes.  With the appropriate scaling a 3D surface MOP can be created which then in turn can be transformed into a multi-axis G-Code model using the built in post processor.

A  point cloud data set can be cropped to a 3D rectangular prism before processing  and  it is possible to create an STL file from a surface model that has been created from the G-Code MOP -> Surface option in CamBam .  This option is useful for converting a MOP crerated by another application back to a 3D model for further manipulation.

Can be found here.

Squircle Constructor and Squircle Constructor Pro Plugins

This plugin for CamBam is intended to create squircle and super ellipse-shaped polylines.  The squircle (or rounded square, super ellipse, or perhaps more correctly the Lamé curve) is a shape that is somewhere between a circle (or ellipse) and a square (or rectangle).  It is a shape that has certain aesthetic qualities and is often used in the design and manufacture of tactile objects.

This “Pro” version is a further development of the original plugin that extends the shape capabilities to the Superellipse family as described on the Wolfram Research web site (

These polylines can then be used to construct CamBam models.

Can be found here.

Texture Builder Plugin

Textured surfaces are commonly used in CNC machining to create interesting or contrasting backgrounds on carved items.  Essentially a textured surface suitable for CNC machining is a 2.5D surface with a Z (depth) varying over an X-Y plane.

This plugin is built on the following premises:

ˇ         That the surface to be textured is a tessellation of a series of 2.5D tiles.

ˇ         Each tile can be repeated over the surface using some combination of:

o   Copying

o   Translating

o   Scaling

o   Repeating on an X-Y grid, or around a circular arc in the X-Y plane.

ˇ         The tile element must be predefined (using some other tool) as:

o    a height cloud (a set of X,Y,Z coordinate points) in a CSV file,

o   an STL model (Sterolithographic file, in ASCII or Binary formats),

o   a RAW file (sets of X,Y,Z point triplets defining each surface triangular surface patch, as defined for CamBam, in ASCII format), or 

o   an image file (BMP. GIF, JPG, PNG or TIFF formatted) where the grey scale values are to be interpreted as a height map (in the range 0 to 255).

ˇ         Once the scene is constructed, the complete scene surface can be saved as a XYZ height cloud, an STL file or a RAW file, for input into CamBam, or other CAM modellers.

Can be found here.

Voronoi Builder Plugin
This plugin provides a tool to create Voronoi patterns inside closed shapes. These patterns might then be used for creating textures or profiles for machining. A Voronoi diagram is defined as (Wikipedia):
“In mathematics, a Voronoi diagram is a partitioning of a plane into regions based on distance to points in a specific subset of the plane. That set of points (called seeds, sites, or generators) is specified beforehand, and for each seed there is a corresponding region consisting of all points closer to that seed than to any other. These regions are called Voronoi cells.”
The dual to the Voronoi diagram is the Delaunay triangulation of the seed points; this diagram can also be created.

It is also possible create 2.5D surfaces based on the Voronoi diagram, as a textured surface with various options for surface forms. These are created as image bitmaps that can be saved and imported to generate a height map surface in CamBam.

Can be found here.