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

  • Elbow area and angle

    The sheet-metal area of an elbow and the angle in its name.

    area = perimeter × centerline length; name angle = round(θ × 180 ÷ π)

    Duct runs, fittings and schedule addons/hvac/lib/duct.js
    • CadCraft
    64-bit
  • Transition area

    The sheet-metal area of a transition between two sizes.

    rectangular: bottom + top + two sides as trapezoids over their slant lengths; other: (pₐ + p_b) ÷ 2 × slant length

    Duct runs, fittings and schedule addons/hvac/lib/duct.js
    • CadCraft
    64-bit
  • Straight pieces

    The length and area of each straight piece of a run.

    du = s₁ − s₀; length = lenOut(du); area = perimeter × du

    Duct runs, fittings and schedule addons/hvac/lib/duct.js
    • CadCraft
    64-bit
  • Schedule totals

    The total duct length, total sheet-metal area and number of fittings.

    length = Σ rows; area = Σ duct areas + Σ fitting areas

    Duct runs, fittings and schedule addons/hvac/lib/duct.js
    • CadCraft
    64-bit
  • A run in the other unit system

    Converts a run's sizes and airflows between inches with cfm and millimeters with L/s.

    size × 25.4 or ÷ 25.4; airflow × 0.47194745 or ÷ 0.47194745

    Duct runs, fittings and schedule addons/hvac/lib/duct.js
    • CadCraft
    64-bit
  • A typed duct size

    Reads a size such as 24x12 or Ø14.

    Duct runs, fittings and schedule addons/hvac/main.js
    • CadCraft
    64-bit
  • A point pulled onto a run's centerline

    Moves a point picked inside a duct's outline onto its centerline, to start or end a branch there.

    inside when distance ≤ W ÷ 2 + 1e-9

    Duct runs, fittings and schedule addons/hvac/main.js
    • CadCraft
    64-bit
  • Schedule table in the drawing

    The rows of the duct schedule placed in the drawing.

    shown length and area = value.toFixed(1), trailing zeros removed

    Duct runs, fittings and schedule addons/hvac/main.js
    • CadCraft
    64-bit
  • Schedule CSV

    Writes the duct schedule as CSV.

    length, perimeter, area: 3 decimals; velocity: 0 decimals (inch units) or 2; friction rate: 4 decimals

    Duct runs, fittings and schedule addons/hvac/main.js
    • CadCraft
    64-bit
  • Liters per second in one cfm

    The factor that converts airflow from cubic feet per minute to liters per second.

    1 cfm = 0.3048³ ÷ 60 × 1000 L/s = 0.4719474432 L/s exactly

    Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js
    • CadCraft
    64-bit
  • Millimeters per drawing unit

    The factors that take a run's coordinates, sizes and airflow to millimeters and L/s.

    draw = k × 25.4 (inch) or k; size = 25.4 or 1; lps = CFM_LPS or 1

    Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js
    • CadCraft
    64-bit
  • Turn at a corner

    The angle a run turns through at a corner, in degrees.

    turn = acos(u·v ÷ (|u| |v|)) × 180 ÷ π

    Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js
    • CadCraft
    64-bit
  • Runs handed to the engine

    Each run's vertices in millimeters, its section size in millimeters, and its free ends with their airflow.

    vertex mm = p × draw; w mm = w × size; z mm = z × draw

    Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js
    • CadCraft
    64-bit
  • Fan point matched to a run end

    Finds the run end the fan sits on and takes its height.

    nearest end by √(Δx² + Δy²); accepted when ≤ 60 mm

    Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js
    • CadCraft
    64-bit
  • Terminal airflows

    The airflow in L/s at each free end of the network.

    L/s = q × lps factor of the run

    Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js
    • CadCraft
    64-bit
  • Pascals to inches of water

    Converts a pressure in pascals to inches of water gauge.

    in. w.g. = Pa ÷ 249.08891

    Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js
    • CadCraft
    Exact
  • Network result CSV

    Writes the result rows as CSV.

    length 2 decimals; airflow 1; velocity 2; rate 3; pressures 1

    Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js
    • CadCraft
    64-bit
  • Numbers read from an IES file

    Splits the numeric part of an IES file into numbers.

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • IES candela values and luminaire size

    Scales the candela table and converts the luminous opening to millimeters.

    cd = value × multiplier × ballast factor; lumens = lamps × lumens per lamp; size mm = value × 304.8 (feet) or × 1000 (meters)

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Full set of horizontal planes

    Mirrors the horizontal planes of a symmetric IES file to cover 0 to 360 degrees.

    quadrant: a, 180 − a, 180 + a, 360 − a; bilateral: a, 360 − a

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • EULUMDAT lamp flux and watts

    Adds up the lamp flux and wattage of the lamp sets in an EULUMDAT file.

    lumens = Σ |count| × flux; watts = Σ watts

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • EULUMDAT candela scale

    Turns the file's cd per 1000 lm values into candela.

    cd = value × (lumens ÷ 1000) × (LORL ÷ 100) × conversion factor

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Position in an angle table

    Finds the two table angles on either side of an angle and the fraction between them.

    f = (x − a_lo) ÷ (a_hi − a_lo)

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Candela in a direction

    The luminous intensity at a vertical and horizontal angle, interpolated from the table.

    I = (1 − f_h) (I₀₀ (1 − f_v) + I₀₁ f_v) + f_h (I₁₀ (1 − f_v) + I₁₁ f_v)

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Luminaire axes

    The nadir, C0 and C90 directions of an aimed and rotated luminaire.

    n = aim ÷ |aim|; r₀ = axis − (axis·n) n, normalized; r = r₀ cos t + (n × r₀) sin t

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Illuminance at a point

    The direct illuminance in lux at a point on a surface from all luminaires.

    E = LLF × Σ I(γ, C) × scale × cos θ ÷ d², d in meters

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Calculation grid

    The points the illuminance is computed at: cell centers inside the area at the working height.

    nₓ = max(1, round(width ÷ spacing)); x = x₀ + (width ÷ nₓ) × (i + 0.5)

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Minimum, average, maximum and uniformity

    The statistics of the grid values.

    avg = Σ E ÷ n; uniformity = min ÷ avg; min ÷ max

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Area and lighting power density

    The area in square meters, the total lumens and watts, and the watts per square meter.

    area m² = |Σ (xᵢ yᵢ₊₁ − xᵢ₊₁ yᵢ)| ÷ 2e6; LPD = watts ÷ area

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Checks against typed targets

    Compares the average, minimum, uniformity and power density with the targets the person typed.

    avg ≥ target; min ≥ target; min ÷ avg ≥ target; LPD ≤ limit

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Grid CSV

    Writes each grid point and its illuminance.

    x, y, z = round(mm); lux = value.toFixed(1)

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Lighting report CSV

    Writes one row per area with its totals and statistics, then every grid point.

    area and lux 1 decimal; lumens and watts 0; W/m² and min ÷ avg 2

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Inputs of an illuminance run

    The mounting height, working height, grid spacing and light loss factor asked for a run.

    mount ≥ 100 mm; work ≥ 0; spacing ≥ 50 mm; 0.05 ≤ LLF ≤ 1

    Luminaire files and point-by-point illuminance addons/lighting/main.js
    • CadCraft
    • BimCraft
    64-bit
  • Result printed in the command line

    The summary line of an illuminance run.

    min, avg, max: whole lux; uniformity 2 decimals; area and W/m² 1 decimal

    Luminaire files and point-by-point illuminance addons/lighting/main.js
    • CadCraft
    • BimCraft
    64-bit
  • Length of a position

    The length of a pipe, truss or floor line along its points.

    L = Σ √(Δx² + Δy²)

    Stage lighting plot: positions, fixtures and loads addons/lighting/lib/model.js
    • CadCraft
    64-bit
  • Where a point is on a position

    The distance along a position to the point nearest a fixture, and the fixture's distance from the line.

    u = clamp((p − a)·(b − a) ÷ |b − a|², 0, 1); s = length before + u × |b − a|; off = |p − q|

    Stage lighting plot: positions, fixtures and loads addons/lighting/lib/model.js
    • CadCraft
    64-bit
  • Position a fixture belongs to

    The nearest named position within reach of a point.

    nearest with off ≤ tol

    Stage lighting plot: positions, fixtures and loads addons/lighting/lib/model.js
    • CadCraft
    64-bit
  • Fixture data checked

    Checks a fixture's stored data: scale, wattage, DMX footprint and aim angle.

    aim = ((aim mod 360) + 360) mod 360

    Stage lighting plot: positions, fixtures and loads addons/lighting/lib/model.js
    • CadCraft
    64-bit
  • Wattage of a fixture

    The watts of a fixture: its own value, or its type's typical value.

    Stage lighting plot: positions, fixtures and loads addons/lighting/lib/model.js
    • CadCraft
    64-bit
  • Point at a distance along a position

    The drawing point a given distance along a position's line.

    u = clamp((s − run) ÷ l, 0, 1); p = a + (b − a) × u

    Stage lighting plot: positions, fixtures and loads addons/lighting/main.js
    • CadCraft
    64-bit
  • Fixtures spread along a position

    Places n fixtures evenly along a position.

    sᵢ = L × (i + 0.5) ÷ n

    Stage lighting plot: positions, fixtures and loads addons/lighting/main.js
    • CadCraft
    64-bit
  • A position moved, turned or scaled

    Applies a move, rotation or scale to a position's points and its scale.

    k′ = k × √(m₀² + m₁²); p′ = M · p

    Stage lighting plot: positions, fixtures and loads addons/lighting/main.js
    • CadCraft
    64-bit
  • Fixture symbol turned to its aim

    Rotates a fixture's symbol by its aim angle.

    x′ = x cos a − y sin a; y′ = x sin a + y cos a

    Stage lighting plot: positions, fixtures and loads addons/lighting/lib/draw.js
    • CadCraft
    64-bit
  • Position length in millimeters

    The length of a position for the schedule and the capacity warning.

    mm = length in drawing units ÷ k

    Stage lighting plot: positions, fixtures and loads addons/lighting/lib/draw.js
    • CadCraft
    64-bit
  • Legend totals

    The total number of fixtures and total watts at the foot of the legend.

    total = Σ count; total watts = Σ watts

    Stage lighting plot: positions, fixtures and loads addons/lighting/lib/draw.js
    • CadCraft
    64-bit
  • A drawing object as a nest loop

    Turns a circle or closed polyline into a loop of points with bulges.

    circle = (cx + r, cy) and (cx − r, cy), each with bulge 1

    Nesting add-on: outlines in, placed copies out addons/nesting/lib/parts.js
    • CadCraft
    64-bit
  • Outline as chords for containment

    Points along an outline, with each arc as 8 chords, used to test which outline contains which.

    θ = 4 atan(b); r = c ÷ (2 sin(θ ÷ 2)); center = chord middle + normal × r cos(θ ÷ 2)

    Nesting add-on: outlines in, placed copies out addons/nesting/lib/parts.js
    • CadCraft
    64-bit
  • Parts and their holes

    Groups outlines into parts with holes and moves each part to its own corner.

    parent = smallest larger outline containing the first point; shifted point = p − (x₀, y₀)

    Nesting add-on: outlines in, placed copies out addons/nesting/lib/parts.js
    • CadCraft
    64-bit
  • A part's object placed on the sheet

    Moves and turns one object of a part to where the engine placed it.

    q = at + (x, y) + R(rot) · (p − origin)

    Nesting add-on: outlines in, placed copies out addons/nesting/lib/parts.js
    • CadCraft
    64-bit
  • Sheet rectangles and labels

    A rectangle for each sheet, side by side, and the part names over the copies.

    xₖ₊₁ = xₖ + w + gap, gap = max(20, 0.1 × h) by default; label at the mean of the outline's points

    Nesting add-on: outlines in, placed copies out addons/nesting/lib/parts.js
    • CadCraft
    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.