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

  • Height above the level

    The lines of a readout: the level and the height above its floor, X and Y from the project origin, Z, and the map position.

    height above the level = z − level elevation

    Coordinate readouts and survey point coords.js
    • BimCraft
    64-bit
  • Plan point to file coordinates

    A point in a storey's plan, in the file's coordinates.

    q = M (x, y, 0)

    Coordinate readouts and survey point coords.js
    • BimCraft
    64-bit
  • File coordinates to plan point

    A point in the file's coordinates, in a storey's plan.

    p = M⁻¹ q

    Coordinate readouts and survey point coords.js
    • BimCraft
    64-bit
  • File coordinates to the 3D view

    Where a point of the file sits in the 3D view, to draw the origin and survey markers.

    (x, y, z) × unit → (x, z, −y) → C → placement

    Coordinate readouts and survey point coords.js
    • BimCraft
    64-bit
  • A length as text

    Millimeters as feet and inches to 1/16 inch, or as a decimal number in mm, cm, m, inches or feet.

    sixteenths = round(|mm| ÷ 25.4 × 16); feet = ⌊sixteenths ÷ 192⌋; inches = ⌊rest ÷ 16⌋

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • Unit factors

    How many millimeters, square millimeters and cubic millimeters one display unit is.

    in = 25.4 mm; ft = 12 × 25.4 mm; cm = 10 mm; m = 1000 mm

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • A coordinate as a number

    A coordinate in millimeters as a number in the display unit, with a fixed count of decimals.

    value = mm ÷ factor, to 1 (mm), 2 (cm, in) or 3 (m, ft) decimals

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • A small length to three figures

    A tolerance or a scale per pixel as text with three significant figures.

    value = mm ÷ factor, toPrecision(3)

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • An area or a volume as text

    Square or cubic millimeters as text in the matching square or cubic display unit.

    value = v ÷ factor, to the unit's decimals; in² = 25.4² mm²; ft² = (12 × 25.4)² mm²; ft³ = (12 × 25.4)³ mm³

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • From meters, square meters and cubic meters

    What calculations give in SI, handed to the same formatters.

    mm = m × 1000; mm² = m² × 10⁶; mm³ = m³ × 10⁹

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • Lengths inside a message

    Rewrites plain "N mm" and "N m" inside a message into the display unit.

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • Quantities inside a sentence

    Rewrites lengths, areas and volumes inside a calculation's sentence into the display unit.

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • A paper size as text

    A sheet's width and height in the display unit.

    value = mm ÷ factor, to 1 (mm, cm), 2 (in) or 3 (m, ft) decimals

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • Area of a region

    The signed area of a closed outline, used to refuse a hatch with no area.

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

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Points taken from a drawing gesture

    The points of a new line or region, without repeats.

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Points read from the file

    A drafting item's points in millimeters, from the IFC polyline that stores them.

    mm = stored coordinate × file length unit in mm

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Hatch spacing and angle written to the file

    The IFC fill style of a pattern: one hatching per line family with its spacing and angle.

    spacing = gap × scale in file units; angle = degrees × π ÷ 180 (× 180 ÷ π when the file's angles are degrees)

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Is the item big enough

    Refuses a hatch with fewer than 3 corners or under 100 mm², and a line under 10 mm.

    L = Σ √(Δx² + Δy²); refuse when L < 10 mm or |area| < 100 mm²

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Move drafting items

    Every point of the picked items moved by one offset.

    (x, y) → (x + dx, y + dy)

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Is a point inside the region

    Whether a point lies inside the outline and outside its holes.

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

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Clip a stroke to the region

    The pieces of a straight stroke that lie inside the region.

    t = ((c − a) × e) ÷ (d × e), u = ((c − a) × d) ÷ (d × e); keep 0 < t < 1, 0 ≤ u ≤ 1

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Strokes of a hatch pattern

    The lines, dots or zigzags of a pattern inside a region, at its scale.

    line k of a family: n · p = ⌊(n_min − offset) ÷ gap⌋ × gap + k × gap, gap = pattern gap × scale

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Pattern scale

    The scale of a hatch pattern as it is kept.

    scale = min(50, max(0.1, v)), or 1 when v is not a positive number

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • A typed point

    The next point of a drafting line from typed coordinates, a typed offset, a typed length and angle, or a typed length along the pointer's direction.

    polar: (x + L·cos(a·π ÷ 180), y + L·sin(a·π ÷ 180)); length only: last + L × (to − last) ÷ |to − last|

    Drafting lines and hatch regions drafting-ui.js
    • BimCraft
    64-bit
  • Viewport windows on the model

    For each sheet viewport, the half width and half height of the model area it shows.

    k = h ÷ viewHeight; half width = w ÷ 2 ÷ k; half height = h ÷ 2 ÷ k

    Equipment list from drawing tags dwg-equipment.js
    • BimCraft
    64-bit
  • Sheets that show a point

    Which sheets show a given model point.

    u = dx·cos − dy·sin, v = dx·sin + dy·cos; inside when |u| ≤ half width and |v| ≤ half height

    Equipment list from drawing tags dwg-equipment.js
    • BimCraft
    64-bit
  • Quantity of a row

    The scheduled quantity of an item tagged in several places.

    qty = Σ tag quantities

    Equipment list from drawing tags dwg-equipment.js
    • BimCraft
    64-bit
  • A piece as stored

    One stud, plate, header, joist or rafter with its length and its place in the panel.

    stored value = round(v × 10) ÷ 10

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Stud length of a wall

    The length of a full-height stud: the wall height less the plates.

    stud length = H − (top plates + 1) × plate thickness

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Studs on the spacing grid

    Where the regular studs stand, left out where an opening is.

    center c = spacing, 2 × spacing, …; stud from c − face ÷ 2 to c + face ÷ 2

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Framing round an opening

    The jack studs, header, cripples and sill of one opening.

    jack = sill + opening height − bottom plate; header = opening width + 2 × stud face; cripple above = H − top plates − header top

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Floor panel

    The joists, rim joists and blocking of a floor panel.

    joist length = span − 2 × rim thickness; blocking = clear gap between neighboring joists

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Roof panel

    The rafters and ridge board of a gable roof panel, and its pitch.

    slope = √(run² + rise²); rafter = slope + overhang × slope ÷ run; pitch = atan2(rise, run) × 180 ÷ π

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Piece count and total length

    How many pieces a panel has and their total length in meters.

    meters = Σ piece lengths ÷ 1000, rounded to 0.01

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Cut list

    One row per mark: size, length, count and total length.

    total (m) = round(length × count) ÷ 1000

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Panel placed in the model

    A point of the panel turned by the panel's angle and moved to its place in the model.

    P = O + u·(cos a, sin a) + n·(−sin a, cos a) + (0, 0, z), each coordinate rounded to 0.1 mm

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Timber profile and weight

    The profile a placed timber piece gets: its dressed size and a density for its weight.

    b × t = dressed size, rounded to 0.1 mm; density = 500 kg/m³

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Scale of the shop sheet

    The scale the panel is drawn at on its sheet, and the scale printed in the title block.

    k = min(drawing width ÷ panel width, drawing height ÷ panel height); printed scale = 1 : round(1 ÷ k)

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Scale text in the title block

    The line of the title block that states the scale and the piece count.

    text = "1:" + max(1, round(1 ÷ k))

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Map conversion as a matrix

    The transform from model units to map units, from the conversion's numbers.

    (ax, ay) = (XAxisAbscissa, XAxisOrdinate) ÷ |…|; E = Eastings + s·(ax·x − ay·y); N = Northings + s·(ay·x + ax·y); H = Height + s·z

    Georeference written to the IFC file georef-model.js
    • BimCraft
    64-bit
  • Meters per map unit

    The size of the map's length unit in meters, from its name.

    US survey foot = 1200 ÷ 3937 m; foot = 0.3048 m; otherwise 1

    Georeference written to the IFC file georef-model.js
    • BimCraft
    64-bit
  • Length unit of the map system

    Finds or makes the IFC unit for the map's coordinates.

    wanted mm per unit: m 1000, ft 304.8, US survey ft 1200 ÷ 3937 × 1000; match when |unit − wanted| < 10⁻⁹ × wanted

    Georeference written to the IFC file georef-model.js
    • BimCraft
    64-bit
  • Latitude and longitude as degrees, minutes, seconds

    An angle in decimal degrees split into the four whole numbers the IFC site stores.

    d = ⌊|deg|⌋; m = ⌊(|deg| − d) × 60⌋; s = ⌊rest × 60⌋; millionths = round((rest − s) × 10⁶)

    Georeference written to the IFC file georef-model.js
    • BimCraft
    64-bit
  • Map conversion written to the file

    The six conversion numbers written into IfcMapConversion, new or in place.

    Georeference written to the IFC file georef-model.js
    • BimCraft
    64-bit
  • Height of a column

    The height a column is built with: up to its top level plus an offset, else its fixed height.

    h = top elevation − own elevation + offset

    Columns: height and quantities model-columns.js
    • BimCraft
    64-bit
  • Cross-section area and volume

    The quantities written on a column.

    area = π (w ÷ 2)² or w × d; volume = area × h

    Columns: height and quantities model-columns.js
    • BimCraft
    64-bit
  • Sizes saved with a column

    The width, depth, angle and heights kept in the column's property set, which is what is read back.

    Columns: height and quantities model-columns.js
    • BimCraft
    64-bit
  • Columns following a level

    Rebuilds columns whose height no longer matches their levels.

    rebuild when |stored − wanted| > 0.5 mm

    Columns: height and quantities model-columns.js
    • BimCraft
    64-bit
  • Grid lines by spacing

    The ends of numbered and lettered grid lines from a count, a spacing or list of spacings, an origin and an angle.

    xᵢ = xᵢ₋₁ + spacing; P = origin + R(angle) × (x, y)

    Grid lines model-grids.js
    • BimCraft
    64-bit
  • Where grid lines cross

    The crossing points of every pair of grid lines, for snapping.

    den = r × s; t = (q − p) × s ÷ den; point = p + t r

    Grid lines model-grids.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.