Resources Numerical accuracy
Calculations
Every calculation under our calculation policies: what it works out, its formula and the precision it runs at. Open one to see its code as it is in the released app.
Calculations
-
Points along a piece at a chord tolerance
Sample points no farther than a tolerance from an arc, for checks and drawing.
step angle = 2 acos(1 − tol ÷ r)
2D curve offsets for toolpaths cam-offset.js64-bit- PartCraft
-
Bounding box of a piece
The extent of a line or arc, including where an arc bulges past its ends.
ends, plus c ± r along each axis direction the arc passes
2D curve offsets for toolpaths cam-offset.js64-bit- PartCraft
-
Splitting a loop at distances along it
Cuts a loop at given distances from its start, used for tabs and ramps.
t = (cut − length so far) ÷ piece length
2D curve offsets for toolpaths cam-offset.js64-bit- PartCraft
-
Depth levels
The heights of the passes between the top and the bottom of a cut.
n = ceil((top − bottom) ÷ stepdown − 1e-9); z_i = top − (top − bottom)(i + 1) ÷ n; last = bottom
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Clearance, retract and cut heights
The heights an operation moves at, from the stock top and the operation's settings.
clearance = stock top + clearance; retract = min(clearance, stock top + retract); bottom = geometry bottom + offset
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Arc move with changing height
Writes one line or arc as moves, splitting an arc into half turns and sharing the height change among them.
z after a piece = z + (z₁ − z₀) × piece length ÷ arc length; last piece ends at z₁
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Ramp along a path
Lowers the tool linearly while it follows a chain of lines and arcs.
z = z₀ + (z₁ − z₀) × length so far ÷ total length
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Facing rows
The positions of the back-and-forth rows that face the stock.
n = ceil(width ÷ (stepover × d) − 1e-9); row_i = b₀ + (b₁ − b₀) i ÷ n; run from a₀ − R − overhang to a₁ + R + overhang
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Pocket offset levels
The successive inward offsets a pocket is cleared along.
level k at distance d₀ + k × stepover, until nothing is left
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Helix entry
The half-turn arcs that take the tool down into a pocket at a set ramp angle.
pitch = 2π ρ tan(angle); half turns = ceil((z_from − z) ÷ (pitch ÷ 2) − 1e-9); z after half turn i = z_from − (z_from − z)(i + 1) ÷ n
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Ramp entry along a loop
How far along the first loop the tool travels while ramping down a level.
length needed = (z_from − z) ÷ tan(angle); whole loops = floor(needed ÷ L); remainder split off the loop
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Contour offset
The path of the tool center round an outline.
d = R + stock to leave; outside: offset by −d (grow); inside: offset by +d
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Lead-in and lead-out arcs
Quarter-circle arcs that bring the tool onto and off a contour through the air side.
center = start + ρ × left normal; quarter turn ending (or starting) at the contour's start; ρ halved up to 4 times until the arc is in air
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Holding tabs
Where the tool lifts over tabs that keep the part attached.
tab k centered at (k + ½) L ÷ tabs; lifted over tab width + tool diameter; tab top = bottom + tab height
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Drill depth and R plane
How deep each hole is drilled and the height the drill returns to between holes.
through: z = bottom − breakthrough − (tip length when full diameter is asked); R = min(retract, highest stock or part near the hole + R plane)
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Highest point between two holes
The highest part or stock under the drill as it moves from one hole to the next.
max of heights at 9 points across the tool, every 1 mm along the move
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Chamfer depth and offset
How deep and how far out a chamfer mill runs to cut a chamfer of a given width.
β = tool angle ÷ 2; depth = width ÷ tan β; offset = tip radius + tip offset × tan β; z = edge height − depth − tip offset
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Engagement angle of adaptive clearing
The angle of the cutter's rim in material for a set cutting width, listed with the operation.
angle = acos(1 − min(1, w ÷ R)) × 180 ÷ π
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Length of a toolpath segment
The length of a straight or helical move, used for the machining time.
line: |b − a|; arc: √((|sweep| × r)² + Δz²)
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
Points along a toolpath segment
Sample points along an arc move for the simulation overlay and checks.
step angle = 2 acos(1 − tol ÷ r); point i at a₀ + sweep × i ÷ n, z linear
2.5-axis toolpaths cam-paths.js64-bit- PartCraft
-
One-dimensional squared distance transform
For each cell of a row, the squared distance to the nearest marked cell, by lower envelopes of parabolas.
d(q) = min_p ((q − p)² + f(p)); parabolas meet at s = ((f(q) + q²) − (f(p) + p²)) ÷ (2q − 2p)
Adaptive clearing passes cam-adaptive.js64-bit- PartCraft
-
Distance to the nearest marked cell
The straight-line distance, in cells, from every cell to the nearest cell of a mask.
columns then rows of the 1D transform; distance = √(squared distance)
Adaptive clearing passes cam-adaptive.js64-bit- PartCraft
-
Grid over the region
Lays a grid over the region and stores, per cell, whether it is inside and its exact distance to the walls.
cell h = R ÷ 12 (× 1.25 until the grid fits); wall distance from the region's lines and arcs
Adaptive clearing passes cam-adaptive.js64-bit- PartCraft
-
Contour of the distance field
Traces the line where the field crosses zero, which becomes a pass.
crossing on a cell edge at t = a ÷ (a − b)
Adaptive clearing passes cam-adaptive.js64-bit- PartCraft
-
Field whose contour is the next pass
Sets up the field that is zero where the tool center cuts the set width into the remaining material.
F = (R − w) − distance to material (allowed cells); positive elsewhere
Adaptive clearing passes cam-adaptive.js64-bit- PartCraft
-
Keeping passes off the walls
Moves any pass point that came nearer the walls than the tool radius plus stock to leave.
p ← nearest wall point + unit(p − nearest) × (R + leave + 1e-6)
Adaptive clearing passes cam-adaptive.js64-bit- PartCraft
-
Simplifying a pass
Drops points of a pass that lie within a tolerance of the line between their neighbors.
keep the point farthest from the chord when its distance > cell ÷ 4, then repeat on both halves
Adaptive clearing passes cam-adaptive.js64-bit- PartCraft
-
Marking what a pass clears
Marks every grid cell the tool covers along a pass.
cell cleared when its center is within R of the segment
Adaptive clearing passes cam-adaptive.js64-bit- PartCraft
-
Engagement check
Re-simulates the passes on a finer grid and reports the largest engagement angle, the equivalent cutting width, uncut area and the smallest wall clearance.
angle = 360 × (rim points in material) ÷ 360; width = R (1 − cos angle); gouge = min(dist to walls − R − leave)
Adaptive clearing passes cam-adaptive.js64-bit- PartCraft
-
Height grid of the part
Samples the part's top surface on a grid for the first search of the tool-tip height.
H[i, j] = height at cell center; cell = max(0.02, R ÷ 8)
3D finishing toolpaths cam-finish.js32-bit in part- PartCraft
-
Tool-tip height
The lowest height at which the tool at (x, y) touches the part without cutting into it.
z = max(H − h(ρ)) over grid samples within R; refine at ρ* = A + r_c s ÷ √(1 + s²) uphill; then max over triangle edges by ternary search; result = max(z + leave, floor)
3D finishing toolpaths cam-finish.js32-bit in part- PartCraft
-
Slope filter
Whether the surface under a point is within the slope range chosen for the operation.
s = √(g_x² + g_y²); tan(from) − 1e-9 ≤ s ≤ tan(to) + 1e-9
3D finishing toolpaths cam-finish.js32-bit in part- PartCraft
-
Finishing one straight line
The 3D points of a straight pass over the part, dense enough to stay within the tolerance.
split a span while |z(mid) − (z₀ + z₁) ÷ 2| > tol ÷ 2
3D finishing toolpaths cam-finish.js64-bit- PartCraft
-
Thinning a pass
Drops points that lie on a straight run between their neighbors.
drop p when its distance to the line through the last kept point and the next point ≤ tol ÷ 10
3D finishing toolpaths cam-finish.js64-bit- PartCraft
-
Parallel pass lines
The positions of the raster lines across the part at the chosen angle.
n = ceil((v₁ − v₀) ÷ (stepover × d) − 1e-9); line k at v₀ + (v₁ − v₀) k ÷ n
3D finishing toolpaths cam-finish.js64-bit- PartCraft
-
Cusp height
The height of the ridge left between two ball passes a given distance apart on a flat surface.
h = R − √(R² − (s ÷ 2)²)
3D finishing toolpaths cam-finish.js64-bit- PartCraft
-
Pass spacing for a cusp height
The distance between passes that leaves ridges of a given height.
s = 2 √(2 R h − h²); s = 2 R when h ≥ R
3D finishing toolpaths cam-finish.js64-bit- PartCraft
-
Distance over the surface
The distance along the part's top surface from the starting cells to every other cell.
shortest path over grid steps; step length = √((di × c)² + (dj × c)² + ΔH²)
3D finishing toolpaths cam-finish.js64-bit- PartCraft
-
Step directions of the distance search
The set of grid steps the surface-distance search may take.
all (di, dj) with |di|, |dj| ≤ 5 and no common factor
3D finishing toolpaths cam-finish.jsExact- PartCraft
-
Lines of equal surface distance
Traces the lines at a given surface distance, which become the scallop passes.
crossing on a cell edge at f = (level − a) ÷ (b − a)
3D finishing toolpaths cam-finish.js64-bit- PartCraft
-
Scallop spacing and levels
The spacing of scallop passes from the cusp height, and the surface distances they are placed at.
R_b = ball or corner radius + leave; s = spacing(R_b, cusp); level k = (k + ½) s; grid cell = max(0.02, min(s ÷ 3, d ÷ 8))
3D finishing toolpaths cam-finish.js64-bit- PartCraft
-
Simplifying a scallop pass
Reduces the points of a 3D pass while staying within a quarter of the tolerance.
keep the point farthest from the chord when its distance > tolerance ÷ 4, then repeat on both halves
3D finishing toolpaths cam-finish.js64-bit- PartCraft
-
Tool grown by the stock to leave
Models stock to leave by making the cutter larger.
d′ = d + 2 × leave; corner radius′ = corner radius + leave (bull nose)
3D finishing toolpaths cam-finish.js64-bit- PartCraft
-
Simulation grid
Sets the cell size of the stock grid and the tolerances used to call a gouge.
cell = min(2, max(0.1, max(w, h) ÷ 500)); lateral tolerance = 2e-4 × diagonal + 0.01
Stock simulation and machining time cam-sim.js64-bit- PartCraft
-
Cutting along a level move
Lowers the stock cells under one level move of the tool.
z_cell = min(z_cell, z + h(distance from cell center to the track))
Stock simulation and machining time cam-sim.js64-bit- PartCraft
-
Cutting along a sloping move
Cuts a move that changes height as a series of short level moves.
n = ceil(|Δz| ÷ 0.01); piece i cut at the lower of its two end heights
Stock simulation and machining time cam-sim.js64-bit- PartCraft
-
Stock volume
The volume of stock left, from which the volume removed by each operation is found.
V = cell² × Σ (z − stock bottom) over cells in the stock
Stock simulation and machining time cam-sim.js64-bit- PartCraft
-
Part height with lateral tolerance
The part's height at a cell, taken as the lowest of the center and eight points a small distance round it.
min over the center and 8 points at the lateral tolerance, 45° apart
Stock simulation and machining time cam-sim.js64-bit- PartCraft
-
Gouge detection
Finds cells where the stock was cut below the part's surface.
gouge when z_cell < eroded part height − 0.02
Stock simulation and machining time cam-sim.js64-bit- PartCraft
-
Stock left and deepest gouge
The volume of stock left above the part, the thickest stock left and the deepest gouge.
remaining = cell² × Σ (z − max(part height, stock bottom)) where that exceeds 0.02
Stock simulation and machining time cam-sim.js64-bit- PartCraft
A calculation is added only after its source was read. Each statement can be checked in the code shown on its policy's page; the app repositories are public. When a release changes a calculation, its page says so until it has been read again.