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

  • 64-bit whole numbers

    Reads a signed 64-bit whole number from two 32-bit halves.

    v = hi × 2³² + lo when −2²¹ ≤ hi < 2²¹; otherwise decimal text

    FBX reader: number types as stored io/fbx-parse.js
    • ModelCraft
    Exact
  • Arrays by type

    Reads an array of floats, doubles or whole numbers.

    FBX reader: number types as stored io/fbx-parse.js
    • ModelCraft
    64-bit
  • Triangles of a referenced object

    The target's triangles in the modified mesh's space, for booleans and similar modifiers.

    q = (toLocal × placement) × p

    Modifier references and lattice cages mesh/mod-eval.js
    • ModelCraft
    64-bit
  • Cage point displacements

    How far each cage point has been moved from its place on the even grid.

    rest = min + (max − min) × i ÷ (n − 1); disp = M × now − M × rest

    Modifier references and lattice cages mesh/mod-eval.js
    • ModelCraft
    64-bit
  • Cage around a mesh

    A box of grid points around a mesh's bounds.

    d = pad × max side; min′ = min − d; max′ = max + d; p = min′ + (max′ − min′) × i ÷ (n − 1)

    Modifier references and lattice cages mesh/mod-eval.js
    • ModelCraft
    64-bit
  • Face points

    The new point in the middle of each face.

    F = Σ corners ÷ n

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    64-bit
  • Edge points

    The new point on each edge.

    m = (a + b) ÷ 2; e = (a + b + F₁ + F₂) ÷ 4; point = e + (m − e) × s for 0 ≤ s < 1

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    32-bit in part
  • Vertex points

    Where each old vertex moves to.

    smooth = (F̄ + 2 R̄ + (n − 3) V) ÷ n; crease = (6 V + a + b) ÷ 8; k = min(1, (sₐ + s_b) ÷ 2); point = smooth + (crease − smooth) × k

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    32-bit in part
  • Edge sharpness per level

    The sharpness each new edge inherits.

    s′ = max(0, s − 1); open edge: ∞; crease layer = min(1, s′ ÷ 4)

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    32-bit in part
  • Texture coordinates and other corner layers

    Interpolates per-corner values onto the new quads.

    corner: own value; edge: mean of two; face: mean of the face's corners

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    64-bit
  • Limit positions

    Where each vertex of an all-quad mesh lies on the limit surface.

    smooth: (n² V + 4 Σ E + Σ F) ÷ (n (n + 5)); crease or border: (4 V + a + b) ÷ 6

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    64-bit
  • Multiplicity of a knot

    How many times a value occurs in a knot vector.

    count of |Uᵢ − u| ≤ tol × (U_last − U_first)

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Distinct knots

    The different knot values with their multiplicities.

    a knot joins the previous one when |x − u_prev| ≤ tol × range

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Clamped uniform knot vector

    A knot vector with evenly spaced interior knots.

    uᵢ = a + (b − a) × i ÷ (inner + 1)

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Knot vector check

    Checks a knot vector read from a file: count, order, clamping and multiplicities.

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Greville abscissae

    One parameter value per control point.

    gᵢ = (Uᵢ₊₁ + … + Uᵢ₊ₚ) ÷ p

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Binomial coefficients

    The number of ways to choose k of n.

    C(n, k) = C(n − 1, k − 1) + C(n − 1, k)

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    Exact
  • A number as IGES text

    Writes one real number into the file.

    whole numbers below 10¹⁵: digits and a point; otherwise String(x) with E → D

    IGES files of NURBS curves and surfaces nurbs/iges.js
    • ModelCraft
    • PartCraft
    64-bit
  • Global section

    States the file's number sizes, unit, resolution and largest coordinate.

    unit flag 2 (MM); scale 1; resolution 10⁻⁶; largest coordinate = max |x| over all control points

    IGES files of NURBS curves and surfaces nurbs/iges.js
    • ModelCraft
    • PartCraft
    64-bit
  • A number from IGES text

    Reads one real number from the file.

    IGES files of NURBS curves and surfaces nurbs/iges.js
    • ModelCraft
    • PartCraft
    64-bit
  • Unit factors

    Millimeters per file unit, by the file's unit flag.

    1: 25.4; 2: 1; 3: 25.4 × 12; 4: 1609344; 5: 10⁶; 6: 1000; 7: 10⁶; 8: 10⁻³; 9: 10⁻³; 10: 10; 11: 25.4 × 10⁻⁶

    IGES files of NURBS curves and surfaces nurbs/iges.js
    • ModelCraft
    • PartCraft
    64-bit
  • Control points in millimeters

    Scales a curve's control points by the file's unit as it is read.

    scale = UNITS[flag] (1 when unknown); p′ = p × scale

    IGES files of NURBS curves and surfaces nurbs/iges.js
    • ModelCraft
    • PartCraft
    64-bit
  • End derivative coefficients

    The factors that link the first control points to the first and second derivative at the start.

    a₁ = p ÷ (U[p+1] − U[1]); b₁ = p ÷ (U[p+2] − U[2]); c₂ = (p − 1) ÷ (U[p+1] − U[2])

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Point, direction and curvature at an end

    What a curve's end looks like to the curve that must meet it.

    t = C′ ÷ |C′|; out = ± t; speed = |C′|

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Curve end matched to a target

    Moves the first one to three control points so the curve meets the target with G0, G1 or G2.

    P₀ = T; P₁ = P₀ + out × speed ÷ a₁; D₂ = out (C″ · out) + κ speed²; P₂ = P₁ + (a₁ (P₁ − P₀) + D₂ ÷ c₂) ÷ b₁

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Blend curve between two ends

    A Bézier curve joining two curve ends with the asked continuity.

    G1: P₁ = A + out × α ÷ 3; G2: P₁ = A + out × α ÷ 5, P₂ = 2 P₁ − A + κ α² ÷ 20; α = chord × bulge

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Frame on the target's edge

    For a point near the target's edge: the nearest edge point, the outward direction in the tangent plane, the normal and the normal curvature.

    d = (n × tₑ) ÷ |n × tₑ|, turned to point away from the surface

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Surface edge matched to a target

    Refits the first one to three rows of control points so the surface meets the target along an edge.

    stations vᵢ = i ÷ M, M = max(samples, 4 × columns); rows fitted by least squares; accepted when gap ≤ g0, angle ≤ g1 and Δκ ≤ g2 (or relative ≤ g2rel)

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Blend surface between two edges

    A surface joining two surface edges, built from blend sections along them.

    sections at t = i ÷ n, n = 8, 16, … ≤ 128; each a Bézier of degree 1, 3 or 5; interpolated along the edge

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • A number as STEP text

    Writes one real number into the file.

    String(x), with a decimal point added when it has none

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Knots and multiplicities

    Turns a full knot vector into STEP's list of distinct knots with their counts.

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Edges that have collapsed to a point

    Leaves a zero-length boundary edge, such as a pole, out of the face loop.

    skipped when arc length ≤ 10⁻⁹ × surface size

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Trim loop written as a curve

    Writes a trim loop as one closed curve on the face.

    3D point = S(u, v) for each loop point; curve = straight segments through them

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Length unit of a file

    Millimeters per file unit.

    SI: prefix × 1000; conversion-based: value × its base unit

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Control points in millimeters

    Reads each control point and scales it by the file's unit.

    p′ = p × unit

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Trim loops read back

    Turns a face's boundary edges into trim loops in the surface's own parameters.

    33 samples per curved edge; each projected to (u, v); outer when |area| < 0.999 × (u range × v range)

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Volume and box of each body

    The volume and bounding box the body list shows.

    volume = Σ volume of the body's solids; box = min and max over them

    Bodies: volume, move and scale brep-bodies.js
    • PartCraft
    64-bit
  • Move matrix

    The matrix a Move body feature applies: by distances, point to point, about an axis, or plane to plane.

    points: T(to − from); align: rotate n_a onto ∓n_b about c, then t = n_b ((o_b − c) · n_b)

    Bodies: volume, move and scale brep-bodies.js
    • PartCraft
    64-bit
  • Shape under a move or a uniform scale

    Applies the matrix or the scale to a solid in the kernel.

    Bodies: volume, move and scale brep-bodies.js
    • PartCraft
    64-bit
  • Scale center and affine map

    Chooses the center of a scale and builds the map for unequal factors.

    c = picked point, or (box min + box max) × 0.5; A = diag(sₓ, s_y, s_z); t = c (1 − s)

    Bodies: volume, move and scale brep-bodies.js
    • PartCraft
    64-bit
  • Quadrature nodes and weights

    The eight points and weights used to integrate the path's speed.

    Pattern along a path brep-bodies.js
    • PartCraft
    64-bit
  • Length of the path

    The arc length of the path and the running length at each piece boundary.

    piece length = h Σ wᵢ |C′(m + h xᵢ)|, h = (b − a) ÷ 2, m = (a + b) ÷ 2; L = Σ pieces

    Pattern along a path brep-bodies.js
    • PartCraft
    64-bit
  • Parameter at an arc length

    Finds the curve parameter that lies a given length along the path.

    tₙ₊₁ = tₙ − (s(tₙ) − s) ÷ |C′(tₙ)|, kept inside the bracket by bisection

    Pattern along a path brep-bodies.js
    • PartCraft
    64-bit
  • Path point nearest the seed

    The arc length of the path point closest to the center of what is copied.

    root of (C(s) − p) · C′(s) = 0 by bisection, beside the nearest of 8 samples per piece

    Pattern along a path brep-bodies.js
    • PartCraft
    64-bit
  • Turn of each copy

    Rotates each copy so it follows the path's direction without twisting.

    R ← rot(t_prev → t) × R, in n = ⌈distance ÷ (L ÷ 2000)⌉ steps between stations

    Pattern along a path brep-bodies.js
    • PartCraft
    64-bit
  • Modal coordinate word

    Decides whether an address word such as X or Z is written on a line, and writes its value.

    written when round(v × 1000) ≠ round(last × 1000); text = letter + v to 3 decimals

    G-code written by text post definitions cam-postdef.js
    • PartCraft
    64-bit
  • Numbers in a line template

    Fills the {variable} holes of a raw, comment or word template with values.

    G-code written by text post definitions cam-postdef.js
    • PartCraft
    64-bit
  • Whole-number filter

    The int filter a post can put on a value, for example a spindle speed.

    int(s) = round(number(s))

    G-code written by text post definitions cam-postdef.js
    • PartCraft
    64-bit
  • Arc center offsets I and J

    The center of an arc move, written relative to the start point.

    I = round₃(cₓ − round₃(X_last)); J = round₃(c_y − round₃(Y_last))

    G-code written by text post definitions cam-postdef.js
    • PartCraft
    64-bit
  • Equality in post conditions

    The == and != tests a post definition can make on two values.

    G-code written by text post definitions cam-postdef.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.