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.
Calculations
-
Convert between two units
A value in one unit as a value in another unit of the same kind.
result = v × (n₁ × d₂) ÷ (d₁ × n₂)
Unit conversion unit-table.js Every appExact -
Typed text to a unit
What was typed, with its unit, as a value in the unit the field wants.
3 yd typed into a feet field = convert(3, yd, ft) = 9
Unit conversion unit-table.js Every appExact -
A value to the base unit
A number in any unit as meters, square meters, cubic meters, radians or rise over run.
base = v × n ÷ d (v × π × n ÷ d for degrees and gons)
Unit conversion unit-table.js Every app64-bit -
A base value to a unit
A stored base value as a number in the unit shown.
value = base × d ÷ n (base ÷ π × d ÷ n for degrees and gons)
Unit conversion unit-table.js Every app64-bit -
Length of a segment or arc
The true length of one straight or curved piece of a run.
θ = 4 · atan(b); r = c ÷ (2 · sin(θ ÷ 2)); length = r × |θ|
Takeoff lengths and areas geom.js64-bit- TakeoffCraft
-
Area under an arc
The area between an arc and its chord.
area = r² × (θ − sin θ) ÷ 2
Takeoff lengths and areas geom.js64-bit- TakeoffCraft
-
Area of an outline
The area inside a closed outline by the shoelace formula, arcs included.
A = ½ Σ (xᵢ · yᵢ₊₁ − xᵢ₊₁ · yᵢ) + Σ arc areas
Takeoff lengths and areas geom.js64-bit- TakeoffCraft
-
Perimeter
The length around a closed outline.
P = Σ segment lengths, the closing segment included
Takeoff lengths and areas geom.js64-bit- TakeoffCraft
-
Net area with cut-outs
Gross area, cut-outs, net area and perimeter of an area mark.
net = gross − Σ cut-outs
Takeoff lengths and areas geom.js64-bit- TakeoffCraft
-
Centroid
The center of area of an outline, where its label goes.
C_x = Σ (xᵢ + xᵢ₊₁) · fᵢ ÷ 6A, fᵢ = xᵢ · yᵢ₊₁ − xᵢ₊₁ · yᵢ
Takeoff lengths and areas geom.js64-bit- TakeoffCraft
-
Add, subtract, multiply, divide
The four operations on values that carry units.
a + b and a − b need the same dimensions; a × b and a ÷ b combine them
Calc sheets calc.js Every app64-bit -
Comparisons
Pass or fail checks such as M <= 40 kN m.
a ≤ b is true when a ≤ b + 1e-12 × max(1, |a|, |b|)
Calc sheets calc.js Every app64-bit -
Number shown
A result as text in the sheet.
6 significant digits; exponent form from 1e9 up and below 1e-4
Calc sheets calc.js Every app64-bit -
Combine two transforms
The product of two plan transforms, each six numbers.
[a b c d e f]: x′ = a·x + c·y + e, y′ = b·x + d·y + f
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Block insert transform
Where the content of a block lands: insertion point, rotation, scale, base point and its place in a row and column array.
M = T(insert) · R(rotation) · S(sx, sy) · T(−base + (col × colSpacing ÷ sx, row × rowSpacing ÷ sy))
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Tilted block seen from above
The plan transform of an insert whose extrusion direction is neither up nor down.
Ax = unit(Wz × N) (or Wy × N when |Nx| and |Ny| < 1/64); Ay = unit(N × Ax); offset = N·z
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Downward extrusion
Mirrors an entity in X when its extrusion direction points down.
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Transform points
A list of points moved through a transform into the space's coordinates.
x′ = a·x + c·y + e; y′ = b·x + d·y + f
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Segments in an arc
How many straight segments stand in for an arc.
n = max(8, min(128, ⌈|sweep| ÷ 2π × 72⌉))
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Points along an arc or circle
An arc or circle as points on it.
pᵢ = (cx + r·cos aᵢ, cy + r·sin aᵢ), aᵢ = a₀ ± sweep × i ÷ n
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Points along an ellipse
An ellipse or elliptical arc as points on it.
p(t) = c + R(rot) · (L·cos t, L·ratio·sin t), L = |major axis|, rot = atan2(my, mx)
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Polyline with bulge arcs
A polyline whose segments may be arcs, as points.
θ = 4·atan(bulge); r = chord ÷ (2·sin(θ ÷ 2)); center = chord middle + normal × r·cos(θ ÷ 2)
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Points along a spline
A spline as points: its fit points, or samples of the B-spline from its control points.
de Boor: dⱼ = (1 − a)·dⱼ₋₁ + a·dⱼ, a = (u − kᵢ) ÷ (kᵢ₊ₚ₋ᵣ₊₁ − kᵢ); point = (Σ w·P) ÷ Σ w
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
What a sheet viewport looks at
The model point at the middle of a viewport on a sheet.
vx = target_x + cos(tw)·cx + sin(tw)·cy; vy = target_y − sin(tw)·cx + cos(tw)·cy
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
A viewport's window on the model
The box in model space that a viewport shows, used to say when it looks at nothing.
half width = w ÷ 2 × viewHeight ÷ h; half height = viewHeight ÷ 2; corners turned by the twist
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Picture placement
The transform from a picture's pixels to drawing coordinates.
world = P + u·px − v·py + v·h (pixel y runs down; P is the lower left corner)
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Lines of a paragraph of text
Where each line of a multi-line text starts.
pitch = h × 1.667 × line spacing; line i at insert + (top − pitch × i) along the up direction
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Text position, height and angle
One line of text carried through the entity's transform.
H = h × |second column of M|; angle = atan2(m₁, m₀) ± rotation (− when M mirrors)
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Paper unit of a sheet
Whether a sheet is in inches or millimeters.
unit = mm when the sheet is wider than 100 units, else inches
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Line weight in millimeters
A stored line weight, in hundredths of a millimeter, as millimeters.
mm = v ÷ 100 for 0 ≤ v ≤ 211, else 0.25
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Pointer position in drawing coordinates
The drawing coordinates under the pointer, for the coordinate readout.
x = cx + (px − W ÷ 2) ÷ zoom; y = cy − (py − H ÷ 2) ÷ zoom
DWG and DXF drawings compiled for the plan view dwg-view.js64-bit- BimCraft
- TakeoffCraft
-
Model to sheet through a viewport
The transform that carries a model point onto the sheet through one viewport.
k = h ÷ viewHeight; paper = center + k · R(twist) · (model − view point)
DWG and DXF drawings compiled for the plan view dwg-view.js64-bit- BimCraft
- TakeoffCraft
-
Millimeters per paper unit
The size of one paper unit of a sheet in millimeters, for line weights.
1 for millimeters, 25.4 for inches
DWG and DXF drawings compiled for the plan view dwg-view.jsExact- BimCraft
- TakeoffCraft
-
SI value of a file unit
Meters per file length unit and radians per file angle unit.
SI unit: 10^prefix; conversion-based unit: factor × factor of its base unit; by name: degree π ÷ 180, inch 0.0254, foot 0.3048
IFC units and placements ifc/geo-ctx.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Axis placement as a matrix
The matrix of an IfcAxis2Placement3D, 2D or IfcAxis1Placement.
columns = (x, z × x, z, origin), x = reference direction projected square to z
IFC units and placements ifc/geo-ctx.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
First projection axis
The X axis of a placement: the reference direction projected into the plane normal to Z.
x = normalize(v − z (v · z))
IFC units and placements ifc/geo-ctx.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Cartesian transformation operator
The matrix of an IfcCartesianTransformationOperator, uniform or not, in 2D or 3D.
columns = (x s₁, y s₂, z s₃, origin)
IFC units and placements ifc/geo-ctx.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
World matrix of a placement
The position of an element in the model from its chain of relative placements.
world = parent world × local
IFC units and placements ifc/geo-ctx.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Grid placement
The point where two grid axes meet, with their offsets, as a placement.
t = ((pB − pA) × dB) ÷ (dA × dB); point = pA + dA t
IFC units and placements ifc/geo-ctx.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Map conversion
The matrix that takes model coordinates to map coordinates, with its rotation and scale.
map = (E, N, H) + R(θ) · S · model; θ = atan2(ordinate, abscissa)
IFC units and placements ifc/geo-ctx.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Matrix product
The product of two 4 × 4 matrices.
IFC units and placements ifc/geo-math.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Point through a matrix
Transforms a point by a matrix.
p' = M · (x, y, z, 1)
IFC units and placements ifc/geo-math.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Matrix inverse
The inverse of a 4 × 4 matrix, or null when it has none.
M⁻¹ = adjugate ÷ determinant
IFC units and placements ifc/geo-math.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Rotation about an axis
The matrix that turns by an angle about an axis through the origin.
R = c I + s [a]× + (1 − c) a aᵀ
IFC units and placements ifc/geo-math.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Polygon normal
The normal of a 3D polygon, with a length of twice its area.
n = Σ ((yₐ − y_b)(zₐ + z_b), (zₐ − z_b)(xₐ + x_b), (xₐ − x_b)(yₐ + y_b))
IFC units and placements ifc/geo-math.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Signed area of a 2D polygon
The area of a profile outline, positive when counter-clockwise; used to orient outlines and holes.
A = Σ (xₐ y_b − x_b yₐ) ÷ 2
IFC units and placements ifc/geo-math.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Positions and normals handed to the app
Packs the mesh into the vertex and index arrays the apps read.
vertices = Float32Array of (x, y, z, nx, ny, nz) per vertex
Triangle mesh built from IFC geometry ifc/geo-mesh.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Planar face
Adds one planar face with holes as triangles, all with the face's normal.
Triangle mesh built from IFC geometry ifc/geo-mesh.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Mesh moved by a matrix
Adds another mesh, transformed, with its normals turned to match.
p' = M p; n' = normalize((M⁻¹)ᵀ n); a mirror swaps the winding
Triangle mesh built from IFC geometry ifc/geo-mesh.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Signed volume
The volume enclosed by the mesh, positive when the triangles face outward.
V = Σ a · (b × c) ÷ 6
Triangle mesh built from IFC geometry ifc/geo-mesh.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
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.