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

  • Copes from rectangular openings

    The length and depth of a cope read from a box-shaped opening.

    length = round(reach × 2) ÷ 2; depth = round(reach × 2) ÷ 2

    IFC import ifc-import.js
    • DetailCraft
    64-bit
  • Bolts from fasteners

    The diameter, length, head point and direction of each bolt read from the file.

    d, length rounded to 0.1 mm; head rounded to 0.001 mm

    IFC import ifc-import.js
    • DetailCraft
    64-bit
  • A number in the file

    How each length and coordinate is written.

    text = toFixed(2); |v| < 0.005 → 0.00

    DSTV NC files nc1.js
    • DetailCraft
    64-bit
  • Header sizes and weights

    The length, section sizes, weight and paint surface written in the header.

    plates: weight = t × steel density ÷ 1000 (kg/m²); others: paint surface = perimeter ÷ 1000

    DSTV NC files nc1.js
    • DetailCraft
    64-bit
  • Skew cut angles of a mitre

    The web and flange cut angles written in the header for a mitred I-shape.

    web = −atan(kv) × 180 ÷ π; flange = atan(ku) × 180 ÷ π

    DSTV NC files nc1.js
    • DetailCraft
    64-bit
  • Web contour with copes

    The outline of the web face, notched for copes or ending on the mitre cut.

    cope corners at (length, depth), (L − length, depth), (L − length, h − depth) …

    DSTV NC files nc1.js
    • DetailCraft
    64-bit
  • Flange contour after copes

    Where a flange starts and ends once the copes on its side are cut.

    x0 = cope length when cope depth ≥ t, else 0

    DSTV NC files nc1.js
    • DetailCraft
    64-bit
  • Contours at a mitre end

    The end points of the web and flange contours where a plane cut crosses them.

    x = x0 + ku·u + kv·v at the web's middle plane and at each flange's outside face

    DSTV NC files nc1.js
    • DetailCraft
    64-bit
  • Hole positions on each face

    The x and y of each hole in the file's own face coordinates.

    web: y = offset + d ÷ 2; flange of an I: y = bf ÷ 2 − offset; plate: y = offset + b ÷ 2

    DSTV NC files nc1.js
    • DetailCraft
    64-bit
  • Reading an NC file back

    The header values and block rows read from an NC file.

    DSTV NC files nc1.js
    • DetailCraft
    64-bit
  • ASTM bar sizes in metric

    The diameter, mass per meter, area and bend diameter of bars #3 to #11.

    d_b = in × 25.4; mass = lb/ft × 1.48816394; area = in² × 645.16; bend D = 6·d_b (to #8) or 8·d_b

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • Metric bar area and mass

    The section area and mass per meter of bars H8 to H40.

    area = π·d² ÷ 4; mass = area × 7850 × 10⁻⁶

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • Number of bars and their spacing

    How many bars go across a width at no more than a given spacing, and the spacing that results.

    n = max(2, ⌈w ÷ s − 1e-9⌉ + 1); spacing = w ÷ (n − 1)

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • Hook leg length

    The out-to-out length of a standard 90 degree hook leg.

    ASTM: D ÷ 2 + d_b + 12·d_b; BS: the tabulated end projection P

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • Cut length of a bent bar

    The length of bar to cut for a straight, L or U shape given its out-to-out sizes.

    ASTM L: A + B − 2k + (π ÷ 2)·r_c; U: A + B + C − 4k + π·r_c; k = D ÷ 2 + d_b, r_c = D ÷ 2 + d_b ÷ 2; BS L: A + B − 0.5r − d; U: A + B + C − r − 2d

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • Center line of a bar

    The center line of a bar in its own plane as straight pieces and quarter-circle arcs.

    arc radius r_c = D ÷ 2 + d_b ÷ 2; points c + r_c·(cos a, sin a)

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • Length of a center line

    The length along a bar's center line.

    Σ straight lengths + Σ r·π ÷ 2

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • Bottom mat bars

    The size, shape, count and position of the bottom bars each way.

    A = run − 2·cover; hook B = min(hook leg, room); offset_i = −width ÷ 2 + cover + d_b ÷ 2 + i·spacing

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • Starter bars

    The length and position of each starter bar.

    z0 = bottom + cover + d_bX + d_bY; A = top + projection − z0; position = ((i − (n − 1) ÷ 2)·s_x, (j − (n − 1) ÷ 2)·s_y)

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • Clear spacing check

    Warns when bars are closer than the minimum clear spacing.

    clear = spacing − d_b ≥ max(25.4, d_b) for ASTM bars, max(20, d_b) for BS bars

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • Concrete volume

    The volume of a footing in cubic meters.

    V = L × B × H × 10⁻⁹

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • Bar marks and schedule weights

    Groups identical bars under one mark and totals their length and weight.

    total length = length × count; weight each = mass × length ÷ 1000; total weight = weight each × count

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • The schedule as a table

    The figures printed in the bending schedule and its export.

    sizes and cut length: whole mm; total length: m, 2 decimals; kg/m: 3 decimals; weights: 2 and 1 decimals

    Reinforcing bars and the bending schedule rebar.js
    • DetailCraft
    64-bit
  • A dimension figure

    The number printed on a dimension line of the shop drawing.

    figure = round(value)

    Single-part shop drawing shop.js
    • DetailCraft
    64-bit
  • Hole stations along the part

    The chain of dimensions from the start of the part through each hole to its end.

    step_i = x_i − x_{i−1}; overall = L

    Single-part shop drawing shop.js
    • DetailCraft
    64-bit
  • Scales of the view

    The scale along the part and the scale across it.

    first n in the list with size ÷ n ≤ room; paper = X0 + x ÷ n

    Single-part shop drawing shop.js
    • DetailCraft
    64-bit
  • Mitre cut angles

    The angle from square of each cut end, in the web's plane and across the flanges.

    angle = atan(|k|) × 180 ÷ π, 1 decimal

    Single-part shop drawing shop.js
    • DetailCraft
    64-bit
  • Weight in the title block

    The weight of one part and of the whole quantity.

    total = weight × count

    Single-part shop drawing shop.js
    • DetailCraft
    64-bit
  • Risers, run and pitch

    The number of risers, the riser height, the run and the pitch.

    n = max(2, ⌈rise ÷ max riser − 1e-9⌉); r = rise ÷ n; run = (n − 1)·going; pitch = atan2(r, going)

    Straight stair geometry stair.js
    • DetailCraft
    64-bit
  • Stringer axis

    The line the stringers run on, and where it meets the lower and upper floor.

    k = r ÷ g; drop = (depth ÷ 2 − 50) ÷ cos(atan k); z(a) = k·(a + g) − drop; a0 = drop ÷ k − g, a1 = (rise + drop) ÷ k − g

    Straight stair geometry stair.js
    • DetailCraft
    64-bit
  • Tread plates

    The size and position of each tread.

    depth = going + nosing; middle = (i − 1)·going − nosing + depth ÷ 2; top = i·r

    Straight stair geometry stair.js
    • DetailCraft
    64-bit
  • Riser, going and comfort checks

    Warnings when the riser, the going or twice the riser plus the going is outside its range.

    102 ≤ r ≤ 178; going ≥ 279; 600 ≤ 2r + going ≤ 650

    Straight stair geometry stair.js
    • DetailCraft
    64-bit
  • Rotation about a vertical line

    The matrix and offset that turn points about a point in plan.

    A = [[c, −s], [s, c]]; t = center − A·center; c = cos(deg·π ÷ 180), s = sin(deg·π ÷ 180)

    Move, rotate and mirror transform.js
    • DetailCraft
    64-bit
  • Mirror in a vertical plane

    The matrix and offset that reflect points across a line in plan.

    A = 2·d·dᵀ − I; t = p₁ − A·p₁; d = (p₂ − p₁) ÷ |p₂ − p₁|

    Move, rotate and mirror transform.js
    • DetailCraft
    64-bit
  • A point through the transform

    The new position of a point.

    p′ = A·p + t

    Move, rotate and mirror transform.js
    • DetailCraft
    64-bit
  • Cleaning a stored coordinate

    The rounding applied to every coordinate and angle a transform stores.

    |n − round(n)| < 10⁻⁶ → round(n); else round(n × 10⁶) ÷ 10⁶

    Move, rotate and mirror transform.js
    • DetailCraft
    64-bit
  • A member's new rotation

    The rotation that puts a member's section axis where the transform sent it.

    rotation = atan2(−want·u₀, want·v₀) × 180 ÷ π, brought into 0 to 360

    Move, rotate and mirror transform.js
    • DetailCraft
    64-bit
  • A member through the transform

    The new end points, rotation, position, holes and copes of a member.

    Move, rotate and mirror transform.js
    • DetailCraft
    64-bit
  • Mirrored angle with a top or bottom position

    Shifts a mirrored angle's line so the steel lands where the mirror image is.

    d = A·v̂·voff − v̂′·voff; start, end += d

    Move, rotate and mirror transform.js
    • DetailCraft
    64-bit
  • A footing through the transform

    The new position and rotation of a footing.

    rotate: rot + deg; mirror: 2·φ − rot; both brought into 0 to 360

    Move, rotate and mirror transform.js
    • DetailCraft
    64-bit
  • Center of a selection

    The plan middle of the selection, used as the point to rotate about.

    ((x_min + x_max) ÷ 2, (y_min + y_max) ÷ 2, z_min)

    Move, rotate and mirror transform.js
    • DetailCraft
    64-bit
  • Offset of a drag

    The offset a dragged part is moved by: onto a grid node, or in steps.

    node − held point, or round(raw ÷ step) × step

    Move, rotate and mirror transform.js
    • DetailCraft
    64-bit
  • Point coordinates

    The x, y and z of one point record.

    x = X × scaleₓ + offsetₓ (and the same for y and z)

    LAS and LAZ point coordinates las.js
    • CadCraft
    • BimCraft
    • CivilCraft
    64-bit
  • Scale, offset and bounds from the header

    Reads the header's scale, offset, minimum and maximum and refuses a scale that cannot be used.

    LAS and LAZ point coordinates las.js
    • CadCraft
    • BimCraft
    • CivilCraft
    64-bit
  • 64-bit counts and offsets

    Reads an unsigned 64-bit integer (LAS 1.4 point count, extended record positions and lengths).

    value = hi × 2³² + lo

    LAS and LAZ point coordinates las.js
    • CadCraft
    • BimCraft
    • CivilCraft
    64-bit
  • Points the file really holds

    The number of whole point records between the first point and the end of the point data.

    available = ⌊(end − offset to points) ÷ record length⌋, at most the header's count

    LAS and LAZ point coordinates las.js
    • CadCraft
    • BimCraft
    • CivilCraft
    Exact
  • Parameter values in dependency order

    Evaluates every parameter after the ones it uses and reports cycles and missing values.

    Parameters and equations params.js
    • CadCraft
    • PartCraft
    64-bit
  • Equation results written to their targets

    Evaluates each equation and writes the result into the dimension or feature value it drives.

    written when |current − v| > 1e-12 × max(1, |v|)

    Parameters and equations params.js
    • CadCraft
    • PartCraft
    64-bit
  • Limits on a driven value

    Checks a value against its target's kind: whole number, minimum, maximum.

    Parameters and equations params.js
    • CadCraft
    • PartCraft
    64-bit
  • Backward solve for a driving parameter

    Finds the parameter value that makes an equation give the value a person typed.

    secant: c = b − f(b) × (b − a) ÷ (f(b) − f(a)); stop when |f| ≤ 1e-10 × max(1, |target|, |x₀|)

    Parameters and equations params.js
    • CadCraft
    • 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.