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

  • Difference between the two methods

    How far the engine's design loads are from the quick loads, per room.

    ratio = (engine − quick) ÷ quick

    Energy model input file (IDF) and its results energy-ep.js
    • BimCraft
    64-bit
  • Rooms the two methods disagree on

    A note for each room whose design heating differs by more than 15 %.

    note when |ratio| > 0.15

    Energy model input file (IDF) and its results energy-ep.js
    • BimCraft
    64-bit
  • A parameter's value as kept

    A typed or imported value made safe for its kind.

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • When two sizes are the same

    The key that tells one size of a family from another.

    key = every input value rounded to 0.001

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • Parameters driven by formulas

    The value of every parameter that has a formula.

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • A solid's numbers

    The evaluated box, profile, depth, axis, angle, path and radius of each solid, and the check that it is not flat.

    box = (min, max) of each pair; a negative depth moves the start: at = at + depth, depth = −depth

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • Copies in an array

    The solids of an array, each moved by a whole number of steps.

    copy i is moved by (dx × i, dy × i, dz × i), count = round(count expression)

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • A family placed inside another

    The position and quarter-turn of a nested family.

    turns = rotation ÷ 90; accepted when round(turns × 10⁶) ÷ 10⁶ is a whole number; k = turns mod 4

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • Quarter turn of a solid

    An evaluated solid turned 90° about the vertical axis.

    (x, y) → (−y, x)

    Family geometry from parameters family-model.js
    • BimCraft
    Exact
  • Move a solid

    An evaluated solid moved by an offset in the family's axes.

    p → p + (dx, dy, dz), mapped to the profile plane's own axes

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • Area of a profile

    The area of a profile with its arcs, used to refuse a flat outline.

    area = ½ Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ) with arcs flattened to chords

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • Is the profile on one side of the axis

    Whether a revolve's profile stays on one side of its axis.

    s = ((axis direction) × (p − axis start)) ÷ |axis|; sides counted beyond ±0.01 mm

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • Middle point of a profile arc

    The point halfway along an arc given by its two ends and a bulge.

    sagitta = bulge × chord ÷ 2; middle = chord middle + sagitta × (dy, −dx) ÷ chord

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • Chords of a profile arc

    The points inside an arc, for outlines that cannot hold a true arc.

    θ = 4·atan(bulge); n = max(2, ⌈|θ| ÷ 15°⌉); center = circle through start, middle and end

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • Profile written to the file

    A closed profile as an IFC curve: lines and true arcs in IFC4, a polyline in IFC2X3.

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • A solid written to the file

    One box, extrusion, revolve or swept solid as its IFC item.

    revolve axis direction = (u₁ − u₀, v₁ − v₀) ÷ L; angle = degrees × π ÷ 180 (file in radians)

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • Plan outline written to the file

    The outline other programs see in plan: the family's symbol, or each solid's outline from above.

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • Plan bounds of a solid

    The smallest plan rectangle round a solid.

    revolve: R = largest distance of a profile point from the axis; bounds = axis start ± R, joined with the profile

    Family geometry from parameters family-model.js
    • BimCraft
    64-bit
  • A plan symbol's numbers

    The evaluated lines, rectangles, circles, arcs, outlines and texts of a family's 2D symbol.

    Family geometry from parameters family-symbol.js
    • BimCraft
    64-bit
  • Circles and arcs of a symbol

    A symbol's circle or arc as points.

    n = max(2, ⌈sweep ÷ 7.5°⌉); pᵢ = (cx + r·cos aᵢ, cy + r·sin aᵢ)

    Family geometry from parameters family-symbol.js
    • BimCraft
    64-bit
  • A symbol placed in the plan

    The symbol turned by the element's rotation and moved to its place.

    (u, v) → (x + u·cos a − v·sin a, y + u·sin a + v·cos a), a = rotation × π ÷ 180

    Family geometry from parameters family-symbol.js
    • BimCraft
    64-bit
  • Where a placed family stands

    A placed element's position and rotation in its level's plan.

    x = M₁₂, y = M₁₃, z = M₁₄; rotation = atan2(M₁, M₀) × 180 ÷ π

    Family geometry from parameters family-ops.js
    • BimCraft
    64-bit
  • Connector written as a port

    A family's pipe or duct connector written on a placed element: its point, direction and nominal size.

    Family geometry from parameters family-ops.js
    • BimCraft
    64-bit
  • Snap to a step

    A sketch coordinate moved to the nearest multiple of the grid step.

    v → round(v ÷ step) × step

    Family editor: sketch points, handles and solved sizes family-edit.js
    • BimCraft
    64-bit
  • Quarter-arc bulge

    The bulge that makes a segment a quarter circle, and the cycle straight, left arc, right arc.

    bulge = tan(90° ÷ 4) = tan(π ÷ 8) = √2 − 1

    Family editor: sketch points, handles and solved sizes family-edit.js
    • BimCraft
    64-bit
  • Move a sketch point

    A profile or path point moved to a new place.

    Family editor: sketch points, handles and solved sizes family-edit.js
    • BimCraft
    64-bit
  • Set a segment's bulge

    Makes a profile segment straight or an arc of a given bulge.

    bulge = tan(angle ÷ 4), rounded to 12 decimals, |bulge| ≤ 10

    Family editor: sketch points, handles and solved sizes family-edit.js
    • BimCraft
    64-bit
  • Bounds of a family

    The box round a family's visible solids.

    Family editor: sketch points, handles and solved sizes family-edit.js
    • BimCraft
    64-bit
  • Height range of a solid

    The lowest and highest point of one solid.

    sweep: path z ± radius; revolve on the floor plane: at ± largest |profile point|

    Family editor: sketch points, handles and solved sizes family-edit.js
    • BimCraft
    64-bit
  • Which parameter moves which face

    Finds, for each input length, the face of the family it pushes out.

    nudge the parameter by 10 mm; the face that moves most, and by more than 0.5 mm, is its handle

    Family editor: sketch points, handles and solved sizes family-edit.js
    • BimCraft
    64-bit
  • Solve for a parameter

    The parameter value that puts a face or a hotspot at the dragged position.

    secant: c = b − f(b)·(b − a) ÷ (f(b) − f(a)); then bisection on a bracket; stop at |f| < 10⁻⁷

    Family editor: sketch points, handles and solved sizes family-edit.js
    • BimCraft
    64-bit
  • Drag a hotspot

    The size values after a hotspot is dragged along its axis.

    x = solve(position(x) = dragged position); kept value = round(x × 1000) ÷ 1000

    Family editor: sketch points, handles and solved sizes family-edit.js
    • BimCraft
    64-bit
  • Drag a size or solid handle

    The recipe or the size values after a handle is dragged to a position.

    literal field: value = round(position × 1000) ÷ 1000; bound field: the input parameter solved, then rounded to 0.001

    Family editor: sketch points, handles and solved sizes family-edit.js
    • BimCraft
    64-bit
  • Position of a 3D grip along its axis

    How far along a hotspot's axis the pointer's ray comes closest, when a grip is dragged in the 3D view.

    t = (b·e − c·d) ÷ (c − b²), b = axis · ray, c = ray · ray, d = axis · w, e = ray · w

    Family editor: sketch points, handles and solved sizes family-ui.js
    • BimCraft
    64-bit
  • Pointer in the family's own axes

    The plan pointer position turned into the axes of a placed family, for dragging a hotspot in the plan.

    (dx, dy) = p − element position; local = (dx·cos a − dy·sin a, dx·sin a + dy·cos a), a = −rotation × π ÷ 180

    Family editor: sketch points, handles and solved sizes family-ui.js
    • BimCraft
    64-bit
  • Rotation shown in Properties

    A placed family's rotation in the Properties panel, and the value taken when it is changed.

    shown = round(rotation × 100) ÷ 100

    Family editor: sketch points, handles and solved sizes family-ui.js
    • BimCraft
    64-bit
  • Corners of a piece

    The four plan corners of a piece, or of the zone kept clear round it.

    corner = (x + u·cos r − v·sin r, y + u·sin r + v·cos r), u ∈ ±(w ÷ 2 + side), v ∈ [−front, d]

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Do two pieces overlap

    Whether two rectangles overlap by more than a hair.

    separate when, on any edge normal of either, a_max ≤ b_min + 1 mm or b_max ≤ a_min + 1 mm

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Is a point in the room

    Whether a point lies inside the room's outline.

    even-odd count of edges crossed by a ray toward +x

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Does a piece fit in the room

    Whether a rectangle lies inside the room and outside its holes.

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Which way the outline runs

    The signed area of the room's outline, used to turn it counter-clockwise.

    area = ½ Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Zone kept clear at a door

    The rectangle round a door where nothing is placed.

    width = door width + 300 mm; depth = one door width on each side of the wall

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • A piece against a wall

    The first free place for a piece along a wall, with its back on the wall.

    t = w ÷ 2 + side, then every 100 mm; (x, y) = wall start + direction × t + inward normal × depth; kept: round(x), round(y), rotation to 0.001°

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • A piece in the middle of the room

    The first free place for a free-standing piece, starting at the middle of the room.

    middle of the outline's box, then offsets of k × 150 mm (k = 1…20) along ±x and ±y, at the longest wall's angle and at 90° to it

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Footprint of a placed piece

    The four plan corners of a piece from its stored position.

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Room depth at each time sample

    The water depth in every room at each time step, from the outside level and the openings the water has passed.

    level(t) = linear between hydrograph points; depth = max(0, level − floor) for a room the water reaches

    Flood depth and wind load playback hazard.js
    • BimCraft
    64-bit
  • Maximum depth, first wet time and wet duration

    For each room: the deepest water, the first sample time it was wet and how long it stayed wet.

    maxDepth = round(max × 1000) ÷ 1000; wetFor = (number of wet samples) × dt

    Flood depth and wind load playback hazard.js
    • BimCraft
    64-bit
  • Hydrostatic push on a wall

    The force of standing water on one meter of wall, from the depth.

    F = ½ × ρ × g × d² (ρ = 1000 kg/m³, g = 9.80665 m/s²)

    Flood depth and wind load playback hazard.js
    • BimCraft
    64-bit
  • Wind force, shear and moment by story

    The wind force on each story and the shear and overturning moment summed from the top story down.

    V = V10 × (max(z, 5) ÷ 10)^α; q = ½ ρ V²; force = q × G × (Cp,w + Cp,l) × width × h; shear = Σ force above; moment = Σ force × z

    Flood depth and wind load playback hazard.js
    • BimCraft
    64-bit
  • Eigenvalues of a symmetric matrix

    The eigenvalues and eigenvectors behind the building's periods and mode shapes.

    t = sign(θ) ÷ (|θ| + √(θ² + 1)), θ = (a_qq − a_pp) ÷ (2 a_pq); c = 1 ÷ √(t² + 1); s = t × c

    Earthquake time-history of a building hazard.js
    • BimCraft
    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.