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.

  • 6,917 calculations in 1,248 source files
  • 143 exact
  • 6,286 in 64-bit
  • 335 with a 32-bit step
  • Last reviewed

Calculations

  • Solver tolerances of a buckling study

    How tightly the pre-stress solve and each inner solve are converged.

    pre-stress: 1e-10; each K⁻¹ solve: 1e-9

    Buckling load factors and thermal stress setup buckling.js
    • PartCraft
    64-bit
  • Temperature rise at each node

    The temperature change that drives thermal stress: a uniform rise, or the temperature field minus the stress-free temperature.

    ΔT = T − T_ref, T_ref = 20 when not given

    Buckling load factors and thermal stress setup buckling.js
    • PartCraft
    64-bit
  • Time step for a transient thermal load

    Which saved time step of a transient run is nearest the requested time.

    step = round(time ÷ (t ÷ steps)), held in [0, steps]; time = step × dt

    Buckling load factors and thermal stress setup buckling.js
    • PartCraft
    64-bit
  • Voxel model volume and mass

    The volume and mass of the analysis model listed with the study.

    volume = elements × h³; mass = volume × density (tonne/mm³) × 1000

    Buckling load factors and thermal stress setup buckling.js
    • PartCraft
    64-bit
  • Numbers written to the deck

    Formats every coordinate, material value, load and penalty for the input deck.

    text = v.toExponential(10)

    CalculiX deck export and result import calculix.js
    • PartCraft
    64-bit
  • Material cards

    Writes elastic constants, density and the two-point plastic curve of each part's material.

    density (tonne/mm³) = density (kg/m³) × 1e-12; plastic: (σ_y, 0) and (σ_y + H, 1)

    CalculiX deck export and result import calculix.js
    • PartCraft
    64-bit
  • Support directions

    Writes each held direction, and a local axis system for supports on slanted faces.

    axis when ||v| − 1| < 1e-9; slanted: local x = n, local y = unit(t − (t · n) n)

    CalculiX deck export and result import calculix.js
    • PartCraft
    64-bit
  • Nodal loads

    Writes the nodal forces of the study as concentrated loads.

    one line per non-zero force component

    CalculiX deck export and result import calculix.js
    • PartCraft
    64-bit
  • Load increments

    The first and smallest load increment given to the other program.

    first = 1 ÷ steps; smallest = 1 ÷ (64 × steps); total and largest = 1

    CalculiX deck export and result import calculix.js
    • PartCraft
    64-bit
  • Reading the result file

    Reads node positions and result values from the text result file.

    value = parseFloat(12-character field, D exponent read as E)

    CalculiX deck export and result import calculix.js
    • PartCraft
    64-bit
  • Default penalty stiffness

    The contact stiffness used when none is given.

    kn = 20 × E ÷ h

    Contact between parts in stress analysis contact.js
    • PartCraft
    64-bit
  • Closest point on a triangle

    The point of a flat triangle nearest a given point, as weights of the three corners.

    region tests on d₁ … d₆ = dot products of edges with corner-to-point vectors; inside: v = v_b ÷ (v_a + v_b + v_c)

    Contact between parts in stress analysis contact.js
    • PartCraft
    64-bit
  • Closest point on a curved face

    The nearest point of a six-node master face, in the face's own coordinates.

    best of 4 flat sub-triangles (corners and midsides); (L₁, L₂) = weights × reference coordinates

    Contact between parts in stress analysis contact.js
    • PartCraft
    64-bit
  • Point and normal on a face

    The position and outward unit normal of a six-node face at given face coordinates.

    x = Σ N_k x_k; n = unit(Σ ∂N_k/∂L₁ x_k × Σ ∂N_k/∂L₂ x_k)

    Contact between parts in stress analysis contact.js
    • PartCraft
    64-bit
  • Integration weights on the slave face

    The area each contact point on a slave face stands for.

    w = w_q × |∂x/∂L₁ × ∂x/∂L₂| ÷ 2

    Contact between parts in stress analysis contact.js
    • PartCraft
    64-bit
  • Pairing slave points with the master

    Finds the master point each slave point faces, and reports whether the pairing changed.

    paired when d² ≤ cutoff²; moved when the face changes or |ΔL| > 2e-3

    Contact between parts in stress analysis contact.js
    • PartCraft
    64-bit
  • Gap, contact force and stiffness

    The normal gap at a contact point and the force and stiffness it adds.

    g = n · (x_s − x_m); force = kn × w × (−g) when g < 0; stiffness = kn × w × c cᵀ ⊗ n nᵀ; pressure = force ÷ w

    Contact between parts in stress analysis contact.js
    • PartCraft
    64-bit
  • Bonded tie

    Holds a slave point to the master point it started nearest to.

    rel = (x_s − x_m) − (x_s − x_m) at the first call; force = −kt × w × rel

    Contact between parts in stress analysis contact.js
    • PartCraft
    64-bit
  • Machined part: stock, cutting, holes, handling

    The cost rows of a part cut from a block of stock.

    stock = (size + 2 × allowance) per axis; stock cost = stock volume × density × 1e-9 × price per kg; cutting minutes = (stock volume − volume) ÷ removal rate × finishing; cost = minutes ÷ 60 × rate per hour

    Manufacturing cost estimate cost.js
    • PartCraft
    64-bit
  • Printed part: filament and machine time

    The cost rows of a 3D-printed part.

    printed volume = volume × fill; filament = printed volume × density × 1e-9 × price per kg; hours = printed volume ÷ volume per hour

    Manufacturing cost estimate cost.js
    • PartCraft
    64-bit
  • Cost per part and rounding

    The cost of each part at the given quantity, the share of each row, and the rounded figures returned.

    total = unit + setup ÷ quantity; share = row ÷ total; returned amounts = round to 0.01

    Manufacturing cost estimate cost.js
    • PartCraft
    64-bit
  • Rounding to two decimals

    Rounds an amount or a listed quantity to hundredths.

    r2(v) = round(v × 100) ÷ 100

    Manufacturing cost estimate cost.js
    • PartCraft
    64-bit
  • Number of holes

    Counts the holes the part has, for the time per hole.

    hole features + circles in cut sketches, each × (pattern count − 1) more for patterns

    Manufacturing cost estimate cost.js
    • PartCraft
    Exact
  • Stock block

    The size and position of the stock around the part.

    offset mode: min = box min − (side, side, bottom), max = box max + (side, side, top); cylinder: r = ½ × box diagonal in XY + side

    Part and stock in machine coordinates cam.js
    • PartCraft
    64-bit
  • Work origin and frame change

    Moves points from model coordinates to the work frame (G54) and back.

    work = (p · x, p · y, p · z) − origin

    Part and stock in machine coordinates cam.js
    • PartCraft
    64-bit
  • Mesh in the work frame and snap tolerance

    Copies the part's mesh into work coordinates and sets how close a mesh point must be to an exact edge to be taken as that edge.

    tol = 1e-4 + 2e-6 × largest model dimension

    Part and stock in machine coordinates cam.js
    • PartCraft
    32-bit in part
  • Where a vertical line meets the part

    The heights at which a vertical line through (x, y) crosses the part's surface.

    weights l₁, l₂, l₃ from the triangle's XY corners; z = l₁ z₁ + l₂ z₂ + l₃ z₃

    Part and stock in machine coordinates cam.js
    • PartCraft
    32-bit in part
  • Top facet and its slope

    The height and slope of the highest mesh triangle under a point, used by 3D finishing.

    g_x = ((z₂ − z₁)(y₃ − y₁) − (z₃ − z₁)(y₂ − y₁)) ÷ d₂; g_y likewise

    Part and stock in machine coordinates cam.js
    • PartCraft
    32-bit in part
  • Material below a point

    Whether there is part material just under a height at (x, y), used to tell a through hole from a blind one.

    first surface below z faces up

    Part and stock in machine coordinates cam.js
    • PartCraft
    32-bit in part
  • Circles of round edges

    The center and radius of each circular edge lying in a plane square to the tool.

    full circle: c = (a + mid) ÷ 2, r = |a − mid| ÷ 2; arc: circle through a, mid, b

    Part and stock in machine coordinates cam.js
    • PartCraft
    64-bit
  • Circle through three points

    The center and radius of the circle through three 2D points.

    d = 2 (a_x (b_y − c_y) + b_x (c_y − a_y) + c_x (a_y − b_y)); u_x = (|a|² (b_y − c_y) + |b|² (c_y − a_y) + |c|² (a_y − b_y)) ÷ d

    Part and stock in machine coordinates cam.js
    • PartCraft
    64-bit
  • Arc from start, middle and end

    The signed sweep of an arc about a known center that passes from a start through a middle point to an end.

    counterclockwise when mod(a_m − a₀, 2π) < mod(a₁ − a₀, 2π); sweep = ± mod(a₁ − a₀, 2π)

    Part and stock in machine coordinates cam.js
    • PartCraft
    64-bit
  • Exact outline of a flat face

    Turns a face's mesh boundary into lines and arcs whose ends are the exact edge ends.

    mesh corner within tol of an edge end → that end; mesh run within tol of an edge circle → arc on that circle

    Part and stock in machine coordinates cam.js
    • PartCraft
    64-bit
  • Hole position, size and depth

    The center, radius, top and bottom of a round face along the tool axis, and whether it is a hole and goes through.

    c, r from the exact cylinder; top, bottom = mesh z range snapped to an edge end within tol

    Part and stock in machine coordinates cam.js
    • PartCraft
    64-bit
  • Chaining picked edges into a loop

    Orders picked edges into one closed outline and makes each start exactly on the previous end.

    ends join when closer than tol; then next.start = previous.end

    Part and stock in machine coordinates cam.js
    • PartCraft
    64-bit
  • Length of a line or arc

    The length of one piece of an outline or toolpath.

    line: |e − s|; arc: |sweep| × r

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Point along a piece

    The point a given fraction of the way along a line or arc.

    line: s + (e − s) t; arc: c + r (cos, sin)(a₀ + sweep × t)

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Is an angle on an arc

    Whether a direction from the center falls within an arc, and how far along.

    u = mod(±(a − a₀), 2π); on the arc when u ≤ |sweep| + eps; t = u ÷ |sweep|

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Distance from a point to a line or arc

    The shortest distance from a point to one piece of an outline.

    line: |q − (s + d × clamp(((q − s) · d) ÷ |d|², 0, 1))|; arc: ||q − c| − r| when the direction is on the arc, else the nearer end

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Signed area of a loop

    The area enclosed by a loop of lines and arcs, positive when counterclockwise.

    A = ½ Σ [line: s × e; arc: r c_x (sin a₁ − sin a₀) − r c_y (cos a₁ − cos a₀) + r² × sweep]

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Winding number

    How many times the loops wind round a point, which says whether the point is inside.

    count signed crossings of a ray to +x; arc crossing at x = c_x ± √(r² − (q_y − c_y)²)

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Line and line

    The point where two line pieces cross, or the ends of their overlap when they lie on one line.

    t_a = ((B.s − A.s) × s) ÷ (r × s); parallel when |r × s| ≤ 1e-12 |r| |s|

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Line and arc

    The points where a line piece meets an arc.

    a t² + b t + c = 0; t = (−b ± √(b² − 4ac)) ÷ 2a

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Arc and arc

    The points where two arcs meet.

    a = (r_A² − r_B² + d²) ÷ 2d; h = √(r_A² − a²); p = c_A + a u ± h n

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Raw offset of a loop

    Moves every piece of a loop sideways by the offset and joins the corners with arcs.

    line: s, e + d × left normal; arc: r ∓ d; corner arc radius d, sweep = atan2(t_a × t_b, t_a · t_b)

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Splitting pieces at intersections

    Cuts every offset piece where it meets another.

    cut at parameter t unless within 1e-5 mm of an end or of the previous cut

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Offset of a region

    The outline at a fixed distance inside or outside a region, which is the path of the tool center.

    keep a piece when dist(midpoint, original outline) ≥ d − 1e-6 and the midpoint is on the offset side

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Chaining pieces into loops

    Joins the kept pieces end to start into closed loops.

    next piece starts within 4e-5 mm of the current end; sharpest left turn wins; then next.start = current.end

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Merging collinear lines and co-circular arcs

    Joins neighboring pieces that lie on the same line or circle into one.

    lines: |u × v| < 1e-10 and end within 1e-9 mm of the line; arcs: centers and radii within 1e-9 mm, same direction

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit
  • Splitting arcs to half turns

    Cuts arcs so none sweeps more than 180°, as G-code controls expect.

    n = ceil(|sweep| ÷ π); piece i from a₀ + sweep × i ÷ n

    2D curve offsets for toolpaths cam-offset.js
    • PartCraft
    64-bit

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.