Using Depth Expressions for Depth Overrides

<< Click to Display Table of Contents >>

Navigation:  Processing > Drilling >

Using Depth Expressions for Depth Overrides

 

As we know, setting Depth to 0 is an easy way to tell the machine to drill through the plate.  When this happens the machine will use its own overshoot settings for the bit to take the tip beyond the bottom of the plate.

 

We can also specify within a Spindle Operation a Depth Override:

 

The Depth override can be blank, contain a number or a depth expression.  The fn button accesses a menu of available parameters and functions.  In this example, we will take the tip of the drill 8mm below whatever thickness we are drilling.

The Depth override can be blank, contain a number or a depth expression.  The fn button accesses a menu of available parameters and functions.  In this example, we will take the tip of the drill 8mm below whatever thickness we are drilling.

 

Depth Overrides can be blank, in which case the tool depth will be applied (normally 0, meaning "drill through the plate", let Touchcut control the overshoot), or they can be a simple number, telling Touchcut how deep below the top surface of the plate to take the tip of the drill, or they can be Depth Expressions as used here:

 

Depth = Thickness + 8

 

We can make this independent of the units PrimeCut is using if the constant number has mm or " appended to it, for example

 

Depth = Thickness + 8mm

 

(will take the tip 8mm below the plate in both metric and inch display modes within PrimeCut.)

 

NOTE Standard Fractions are supported for the convenience of inch users, eg Thickness+1/4", up to 64ths (and this expression works in metric mode also- note the " used to designate inches)

 

This is particularly useful in the spindle allocation table, where drilling and tapping processes can be set to automatically drill to extra depth, and tap a little shallower, for example:

 

Depth_expressions

 

The fn button access a menu containing available uniy specifiers, parameters and mathematical functions.

Other parameters are also available to be used in the depth calculation:

Thickness Thickness of the material

DrawnD        Diameter of the drawn hole

ToolD        Diameter of the drill bit (as looked up in costing data)

TipAngle        Tip angle in Degrees  (as looked up in costing data).  Degrees are used as these are the native units of the trig functions available (see below).

InnerD        When part of a multi-spindle process, eg countersinking a hole, InnerD for the outer tool will be the diameter of the smaller hole, for example It can be used in the countersink depth formula to represent the diameter of the drilled hole we are countersinking.

 

 

The following unit specifiers are available, if not specified the current display units are assumed:

mm        Value is in mm

"        Value is in inches

 

These mathematical operators are available:

*        Multiply (This must be used for multiplication to achieve twice the thickness, we would write 2*Thickness NOT 2Thickness)

/        Divide

+        Add

-        Subtract

( )        Parentheses

 

 

The following functions are available:

Sin(angle), Cos(angle), Tan(angle)        -all take angle in degrees

DegToRad(angleDeg)                        -takes an angle in degrees and converts it to Radians.

RadToDeg(angleRad)                        -takes an angle in Radians and converts it to degrees.

sqrt(value)                                        -Returns the square root of value

arcTan2(y,x)                                -Two component arcTangent, returning the counterclockwise angle in degrees defined by a line from the origin to (x,y) in the plane.

 

The trigonometric functions are intended to simplify depth programming of countersinks etc.

 

Countersinking Depth Calculation Example:

(see https://ruko.de/en/blog/structure-and-application-of-countersinks for more information on the style of countersink /chamfer tool considered here)

csink

Here we consider a countersinking tool with a flat nose and a prescribed countersink angle.  The angle shown in the diagram above is half the countersink angle.

We want to achieve a top diameter of the countersink (CSink Diameter in the diagram above), so how far (to what Depth) should we travel.  Let's say the nose diameter is 6mm, and the Countersink angle is 90 degrees, and we will set the tool up so that the countersink top-diameter will match that of the drawn hole we are applying it to:

Depth = (DrawnD-6mm)/(2*tan(90/2))

or even better, if the countersink tip angle has been set in the process data:

Depth = (DrawnD-6mm)/(2*tan(tipAngle/2))

Example Countersink Operation using a 49mm diameter, 90 degree tip angle countersink, with a 6mm diameter flat on its end. The drawn hole diameter this is being applied to should match 36.51, so this is the target top diameter for the countersink. Primecut does a test evaluation on an abitrary material thickness of 100mm or 4" (not relevant to this depth calculation) and shows the result below, 15.25mm will be the aapplied depth.

Example Countersink Operation using a 49mm diameter, 90 degree tip angle countersink, with a 6mm diameter flat on its end.
The drawn hole diameter this is being applied to should match 36.51, so this is the target top diameter for the countersink.
Primecut does a test evaluation on an abitrary material thickness of 100mm or 4" (not relevant to this depth calculation) and shows the result below, 15.25mm will be the aapplied depth.

 

Alternatively. instead of using DrawnD, we simply hard code the requested diameter.

(In a future update we may add more variables, for example the Nose Diameter could be looked up from the but data as well, as toolD2 for example)