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

  • Outlines and heights kept in the site file

    Converts each outline to local meters, thins and rounds it, and sets the item's height.

    ring = round(x × 100) ÷ 100, round(y × 100) ÷ 100; height = source height, else levels × 3

    Site surroundings in local meters site-context.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • Thinning a long outline

    Reduces an outline of more than 400 points by keeping every n-th point.

    step = ⌈points ÷ 400⌉; keep indexes divisible by step

    Site surroundings in local meters site-context.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • Surface areas and mean absorption of each pair

    The area of each pair of opposite surfaces and their mean absorption in a band.

    S_x = 2 L_y L_z; ᾱ_x = (α_west + α_east) ÷ 2; −ln(1 − ᾱ)

    Reverberation time of a box room stat.js
    • BimCraft
    64-bit
  • Sabine, Eyring, Fitzroy and Arau-Puchades times

    The four reverberation times of the room in a band.

    Sabine: 0.161 V ÷ (S ᾱ + A_air); Eyring: 0.161 V ÷ (−S ln(1 − ᾱ) + A_air); Fitzroy: 0.161 V ÷ S² × Σ Sᵢ ÷ (−ln(1 − ᾱᵢ)); Arau: Π [0.161 V ÷ (−S ln(1 − ᾱᵢ) + A_air)]^(Sᵢ ÷ S)

    Reverberation time of a box room stat.js
    • BimCraft
    64-bit
  • Solid of revolution

    Turns a profile of radius and height points into a closed triangle mesh about the vertical axis.

    vertex = (r × cos(2π i ÷ 24), r × sin(2π i ÷ 24), z), i = 0 … 23

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Elliptical head profile

    The outline of a 2:1 elliptical vessel head from the tangent line to the pole.

    (r × cos a, z₀ ± (r ÷ 2) × sin a), a = (π ÷ 2) × i ÷ 6

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Vessel capacity

    The capacity in cubic meters of a vessel or column: a cylinder and two 2:1 elliptical heads.

    V = (π (d ÷ 2)² L + (4 ÷ 3) π (d ÷ 2)² (d ÷ 4)) ÷ 10⁹

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Tank capacity

    The capacity in cubic meters of an atmospheric tank.

    V = π r² h ÷ 10⁹

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Signed volume of a mesh

    The volume enclosed by a triangle mesh in cubic millimeters, positive when the triangles face outward.

    V = Σ p · (q × r) ÷ 6 over the triangles

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Dimensions accepted for a piece of equipment

    Takes the dimensions a person typed, builds the solids and returns their bounding box, nozzles and capacity.

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Equipment moved and turned

    Moves a piece of equipment to a point and turns it about the vertical axis by an angle in degrees.

    (x', y') = (x₀ + x cos a − y sin a, y₀ + x sin a + y cos a), a = rot × π ÷ 180

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Zone solid in millimeters

    Turns a hazard or consequence zone given in meters into a closed solid in millimeters for the model.

    vertex (mm) = vertex (m) × 1000

    Plant equipment solids, capacity and placement addons/plant/lib/engineering.js
    • BimCraft
    64-bit
  • Pipe run handed to the pipe stress input

    Takes the model's pipe run with the most points and gives its points and total length to the pipe stress calculator.

    length = Σ √(Δx² + Δy² + Δz²) over the legs

    Plant equipment solids, capacity and placement addons/plant/lib/engineering.js
    • BimCraft
    64-bit
  • Nozzle port size

    The outside diameter in millimeters stored on a nozzle's port, from its nominal pipe size.

    size = round(od (in) × 25.4 × 10) ÷ 10

    Plant equipment solids, capacity and placement addons/plant/lib/place.js
    • BimCraft
    64-bit
  • Capacity property in the model

    The capacity in cubic meters written to the CadCraft_Plant property set of the placed equipment.

    CapacityM3 = round(V × 1000) ÷ 1000

    Plant equipment solids, capacity and placement addons/plant/lib/place.js
    • BimCraft
    64-bit
  • Number written to the file

    Formats a coordinate, direction component or property value as STEP text.

    num(v) = round(v × 10⁴) ÷ 10⁴

    Plant equipment written as an IFC file addons/plant/lib/ifc-out.js
    • BimCraft
    64-bit
  • Placement of an item

    The position and the turn about the vertical axis of a piece of equipment in the file.

    X direction = (cos a, sin a, 0), a = rot × π ÷ 180

    Plant equipment written as an IFC file addons/plant/lib/ifc-out.js
    • BimCraft
    64-bit
  • Reference direction of a nozzle port

    A unit vector square to a nozzle's outward direction, used as the X axis of the port's placement.

    x = (d × a) ÷ |d × a|, a = (1, 0, 0) or (0, 1, 0)

    Plant equipment written as an IFC file addons/plant/lib/ifc-out.js
    • BimCraft
    64-bit
  • Capacity property

    The capacity in cubic meters written to the CadCraft_Plant property set.

    CapacityM3 = round(V × 1000) ÷ 1000

    Plant equipment written as an IFC file addons/plant/lib/ifc-out.js
    • BimCraft
    64-bit
  • Isometric projection

    The position on the drawing of a 3D point, before fitting to the sheet.

    u = (x − y) × cos 30°; v = z + (x + y) × 0.5

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Length text

    Turns a length in millimeters into the text on the drawing: whole millimeters, or feet and inches to 1/8 inch.

    mm: round(L); inches: round(L ÷ 25.4 × 8) eighths

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Point at a distance along a run

    The 3D point and direction at a given distance along a pipe run, used to place valves and spool balloons.

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Bill of materials quantities

    Pipe length per size and spec, the count of elbows by angle, valves and welds.

    pipe = Σ leg lengths; elbow angle = round(acos(u · v ÷ (|u| |v|)) × 180 ÷ π); welds = 2 × bends + 2 × valves

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Fit to the sheet

    The single scale and offset that place the projected runs inside the drawing area of the sheet.

    scale = min(availW ÷ bw, availH ÷ bh)

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Leg dimension

    The dimension line beside each leg and the number on it.

    real = √(Δx² + Δy² + Δz²) of the leg's 3D ends

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Coordinates in the DXF file

    Formats paper coordinates, text heights and text angles for the DXF output.

    num(v) = v rounded to 4 decimals

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Coordinates in the SVG file

    Formats paper coordinates for the SVG output and flips Y to run downward.

    f(n) = n to 2 decimals; Y = paper height − y

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Legs of a route

    The straight legs of a route with their axis and length.

    axis = first of x, y, z with |Δ| > 10⁻⁶; length = |Δ| on that axis

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Route against obstacles

    Whether the center line of a route comes within a clearance of any obstacle box.

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Grid lines of the search

    The X, Y and Z coordinates at which a route may turn.

    lines = nozzle and lead coordinates, obstacle faces ± clearance, levels, two outer lines, and the midpoint of each neighboring pair

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Search state and the minimum leg

    The key that identifies a search state: grid node, direction and the length of the current leg.

    cap = round(minLeg); key = ((node × 6 + direction) × (cap + 1)) + min(cap, round(run))

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Cost of a step

    The cost added for moving to the next grid node.

    cost = g + step × (1 + climbCost if vertical, else 1) + (bendCost if the direction changes)

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Route points and length

    The final corner points of the route with collinear points removed, its length, bends and climbs.

    length = Σ leg lengths; bends = legs − 1

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Openable share of a window

    How much of a window opens, from its type name.

    fixed, picture, transom: 0; hung: 0.5; anything else: 1

    Regulation checks of rooms, doors, windows and outlets addons/regs/lib/check.js
    • BimCraft
    Exact
  • Net clear opening of a window

    The clear width, height and area of a window for the escape opening rules, estimated from its type.

    hung: w × h ÷ 2; slider: w ÷ 2 × h; other opening types: w × h; fixed: 0

    Regulation checks of rooms, doors, windows and outlets addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Least width of a room

    The narrowest width across a room outline, used for the least room dimension and hall width rules.

    min over edges of (max − min of p · n), n = unit normal of the edge

    Regulation checks of rooms, doors, windows and outlets addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Window area credited to a room

    Adds each window's area and openable area to the room on either face of its wall.

    center = a + u × (offset + width ÷ 2); area = width × height; open = area × share

    Regulation checks of rooms, doors, windows and outlets addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Ceiling height, light and ventilation of a room

    The values compared with the ceiling height, natural light and ventilation rules.

    ceiling = lowest wall height on the level; light % = window area ÷ floor area × 100; vent % = openable area ÷ floor area × 100

    Regulation checks of rooms, doors, windows and outlets addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Egress door clear width

    Finds the widest exterior door and its clear width and height for the egress door rules.

    clear width = max(0, leaf width − 50.8)

    Regulation checks of rooms, doors, windows and outlets addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Position of a point along a room's perimeter

    The distance along the room outline to the point nearest an outlet or a door, and the outline's total length.

    s = Σ earlier edge lengths + t × L; t = clamp(((p − a) · (b − a)) ÷ L², 0, 1)

    Regulation checks of rooms, doors, windows and outlets addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Longest distance to an outlet along the wall

    The greatest distance, measured along the floor line, from any point of a wall space to an outlet in that space.

    per wall space: max(first, length − last, half of each gap between neighbors); a space with no doorway: (first + length − last) ÷ 2

    Regulation checks of rooms, doors, windows and outlets addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Numbers in the regulation schedule

    Formats a found value or a limit for the schedule table.

    percent: 1 decimal; m²: 2 decimals; ratio and U-value: 2 decimals; R-value: 1 decimal; count: whole number

    Regulation checks of rooms, doors, windows and outlets addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Rooms and doors of the escape routes

    Builds the graph of rooms and the doors that join them or lead outside, with each door's clear width.

    clear width = max(0, leaf width − 50.8)

    Regulation checks of rooms, doors, windows and outlets addons/regs/lib/route.js
    • BimCraft
    64-bit
  • Narrowest door on the way out of a room

    The finding for each room: the narrowest door on its best way out against the pack's egress width.

    utilization = minimum ÷ bottleneck; stated width = round(bottleneck)

    Regulation checks of rooms, doors, windows and outlets addons/regs/lib/route.js
    • BimCraft
    64-bit
  • Footing width and thickness from the table

    The footing size the pack's table gives for the number of stories, the foundation type, the snow load and the soil pressure.

    width = inches × 25.4; thickness = inches × 25.4

    Regulation limits read from the pack's tables addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Footing depth below grade

    The depth of the footing's underside below grade compared with the rule and the frost depth.

    required = max(rule, frost depth); found = max(0, depth below the floor − 6 × 25.4)

    Regulation limits read from the pack's tables addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Feet and inches in a table cell

    Turns a span written as feet-inches in a table into millimeters.

    mm = (feet × 12 + inches) × 25.4

    Regulation limits read from the pack's tables addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Header span from the table

    The allowed span of a header for its size, what it carries, the snow load and the building width.

    span = a + (b − a) × (w − lo) ÷ (hi − lo), w = building width ÷ 304.8

    Regulation limits read from the pack's tables addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Span of a header in the model

    The span of a framed header compared with the table.

    span = max(0, length − 3 × 25.4)

    Regulation limits read from the pack's tables addons/regs/lib/check.js
    • BimCraft
    64-bit
  • Stud height and spacing from the table

    The greatest stud height and spacing the table allows for a stud size, bearing or not, and the floors above.

    height = feet × 304.8; spacing = inches × 25.4

    Regulation limits read from the pack's tables addons/regs/lib/check.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.