How to use “Warp” feature?


‘Warp’ feature is used when applying generated toolpath over bended, curved or uneven surfaces.

This feature comes in great help to users that mill their own PCB’s. Since the PCB milling procedure itself is very delicate and precise (distance between two pads can be only xx mils), already smallest PCB surface height irregularities can create bad results.
Precision of milling and the distances between pads depend on the milling tools used. In many cases conical or D-bit tools are used. So it is very important that the depth of milling is constant over the whole milling procedure.

The most important step of the ‘Warp’ procedure is how we measure the surface. In case of non-conductive material we can use touching probe to measure the surface of material.

In case of PCB milling, where workpiece material itself is already conductive, we only need to connect PCB board to controller ‘Sensor’ input and tool itself can be already used as probe.

This tutorial will show you how to measure surface height points over workpiece surface whether you are using conductive or non-conductive workpiece material.

‘ Warp’ step by step guide for conductive materials (PCB’s):

Step 1:
Place your workpiece material (in future text ‘copper board’) to machines table. Mount it properly, so that you avoid any inconveniences later such as vibration, dislocation etc…also make sure that copper board is not in contact with the machine table.

Step 2:

Since copper board itself is conductive it can already be used as sensor. You can solder wire to it or you could just use mounting screw to attach connection wire to your workpiece.

Now connect your copper board to controllers ‘sensor’ input.

Mk2/4 and Mk2 controller have designated tool sensor inputs, while Mk3 controller has software assignable inputs, so you can connect your board at any input.

Sensor wiring for Mk2 and Mk2/4:

Mk2/4: Designated sensor input is input 5.


Mk2: Designated sensor input is input 5.


Sensor wiring for Mk3:

Mk3: Has 8 assignable inputs. In settings set selected input as “Sensor”.

As a safety precaution, connect the tool and the copper plane with some wire to make a contact. In left corner of CNC USB controller interface, word ‘Sensor’ should appear for every contact between the tool and the copper plane. Also jog Z axis down very slowly so that tool will touch the surface of the cooper board, so you can be sure that everything is working as it should.


Step 3:

Jog your machine to initial starting point of your copper board, usually its corner, and click: “Machine/Offset/Current XY” to set X0 Y0 offset.

With offset XY now being set, you have initial point of your workpiece material from which you will start your ‘Warp’ measuring as also your g-code program.
So no matter where you jog your machine or wherever your machine will park after ‘Warp’ measuring procedure, you will be able to return to your initial point with “Go To – Zero XY” feature.

Step 4:

Click: “Capture & Measure Points/Measure/Measure Grid Z Offset” to set Z0.
Surface of the board is set as Z0 and is now stored in the table with other captured points.

Step 5:

Dimensions (extents) of your g-code program basically represent the size of your ‘Warp’ measuring grid (keep that in mind when setting “Grid size – Size XY”).

For best milling results, it is recommended that the surface is measured with good point density. High point density can extend the time of measuring and compromise should be made between measuring time and number of measuring points.

So, click “Capture & Measure Points/Measure/Set Grid …” to set grid size and point density.


In case of using copper board, this parameter should be set to 0, because cooper plane is also milling surface.

Value represents distance for which machine ascends to safe height. This parameter can be value 0, if parameter ‘Return Distance’ already is set at proper value.

Size XY:
Here you enter values for XY dimensions of measuring area surface.

This number is desirable distance between two adjacent points.

Alternatively you can enter number of measuring points that you wish to have over the length of selected axis. If you click the arrow button, then ‘Length’ value calculation will be based on this value.

Return distance: Value represents distance for which tool returns once it has touched the surface of copper board to release contact.

Step 6: Start measuring procedure

Make sure that your current position is at X=0, Y=0.

Click “Capture & Measure Points/Measure/Measure Grid Z” to start measuring.

Automatic measuring procedure will start. Machine will descend at current machine position (your XY offset) and when tool touches copper board it ascends and moves in X+ directions to the next point etc..
Speed at which machine descends can be set in “Settings/Tool Senor/Speed”.

Machine will stop at the position of last measured point. If you now open ‘Measure’ menu you will be able to see your measured points number in brackets. These points can also be saved and used again if something goes wrong.

Now use “Go To – Zero XY” button to move machine to current offset XY position, to have a nice “clean” start.

Step 7: Load g-code

Import your g-code program in CNCUSB controller software and make sure that is placed over the measured surface of your material.

Step 8: Warping your g-code

Now click “Program/Advanced/Warp” to apply “Warp”. Dialog will appear which displays the number of captured points. There is also an option to load points if you have saved points in a file.

Z coordinate values of your g-code program will be changed according to the measured surface.

During milling process, machine will be adjusting Z axis so that depth of milling will be constant over workpiece surface no matter on the unevenness of the surface.