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
-
Newmark time stepping
The floor displacements, velocities and accelerations at every time step of the record.
K* = K + c₁ M + c₂ C, c₁ = 1 ÷ (β Δt²), c₂ = γ ÷ (β Δt), β = 1/4, γ = 1/2; C = a₀ M + a₁ K
Earthquake time-history of a building hazard.js64-bit- BimCraft
-
Peak drift, floor acceleration, base shear and roof displacement
The largest values over the run that the person reads.
drift = uᵢ − uᵢ₋₁; floor acceleration = ü + a_g; base shear = k₀ u₁ (shear building) or Σ m (ü + a_g) (full matrix)
Earthquake time-history of a building hazard.js64-bit- BimCraft
-
Sway under static floor forces
Floor displacements and story drifts under static sideways forces, used for the wind sway.
shear building: driftᵢ = (Σ F above) ÷ kᵢ, u = running sum of drifts; full matrix: K u = F
Earthquake time-history of a building hazard.js64-bit- BimCraft
-
Floor heights from the frame's nodes
Groups the frame's nodes into floors by height and takes the lowest group as the base.
nodes whose heights differ by ≤ tol join one group; floor height = mean of the group
Earthquake time-history of a building hazard-frame.js64-bit- BimCraft
-
Inverse of the flexibility table
Turns the floors' flexibility table into their stiffness matrix.
Earthquake time-history of a building hazard-frame.js64-bit- BimCraft
-
Floor stiffness of a frame
The stiffness the frame gives each floor sideways, and one stiffness per story for the drift check.
F[i][j] = (mean sideways move of floor i under 1000 N on floor j) ÷ 1000 ÷ 1000; K = F⁻¹; k_story = V ÷ drift under forces ∝ height
Earthquake time-history of a building hazard-frame.js64-bit- BimCraft
-
Floor masses from the frame
The mass on each floor: half of each member's weight at each end, plus a load per square meter over the floor's plan box.
member mass = ρ × A × L × 1e-9; floor area = (x extent ÷ 1000) × (y extent ÷ 1000); m = max(1, self + area × load)
Earthquake time-history of a building hazard-frame.js64-bit- BimCraft
-
Placing each vertex of an element
Moves an element's vertices and normals from its own axes into the scene with its placement matrix.
p′ = M × p; n′ = (rotation part of M) × n ÷ |…|
Measuring on the IFC view's mesh ifc-model.js32-bit in part- BimCraft
-
Storing the mesh
Turns the collected positions, normals, indices and element runs of a batch into typed arrays.
Measuring on the IFC view's mesh ifc-model.js32-bit in part- BimCraft
-
Area of a picked flat face
The flat face a picked triangle belongs to and its area.
area = Σ |(b − a) × (c − a)| ÷ 2 over the triangles in the picked plane
Measuring on the IFC view's mesh measure.js32-bit in part- BimCraft
-
Distance between two picked points
The straight-line distance Measure reports.
d = √(Δx² + Δy² + Δz²)
Measuring on the IFC view's mesh measure.js32-bit in part- BimCraft
-
Distance split along the IFC axes
The measured difference as ΔX, ΔY and ΔZ in the file's Z-up axes.
ΔX = Δx; ΔY = −Δz; ΔZ = Δy (the viewer is Y up)
Measuring on the IFC view's mesh measure.js32-bit in part- BimCraft
-
Room floor area and volume from its shape
The floor area and volume of a space measured from its triangles, used when the file states neither.
area = Σ −n_y ÷ 2 over triangles with n_y ÷ |n| < −0.5; volume = |Σ a · (b × c) ÷ 6|
Measuring on the IFC view's mesh ifc-qto.js32-bit in part- BimCraft
-
Room area and volume in the spaces schedule
Chooses the file's stated value or the measured one for each room, and rounds the measured one.
measured value kept as Number(value.toFixed(4))
Measuring on the IFC view's mesh ifc-qto.js32-bit in part- BimCraft
-
Bounding box of each element in a shared frame
The box and triangle count of every element of a model, in coordinates both versions share.
Measuring on the IFC view's mesh ifc-compare.js32-bit in part- BimCraft
-
How far an element moved, and whether its shape changed
The move of an element between two versions and a yes or no on a change of size or triangle count.
moved = |center of box B − center of box A|, reported when > tolerance; reshaped when a box side differs by > tolerance
Measuring on the IFC view's mesh ifc-compare.js32-bit in part- BimCraft
-
Bounding box of chosen elements
The smallest box round the vertices of the chosen elements.
Measuring on the IFC view's mesh ifc-vis.js32-bit in part- BimCraft
-
Reading a property value
Turns an IFC property or quantity value into the number or text the index, the totals and the comparison use.
number kept = round(x × 10⁶) ÷ 10⁶
Quantity totals and schedules from IFC properties ifc-props.js64-bit- BimCraft
-
Rounding a total
Cuts a sum to 12 significant digits so that binary noise such as 0.1 + 0.2 does not show.
tidy(n) = Number(n.toPrecision(12))
Quantity totals and schedules from IFC properties ifc-qto.js64-bit- BimCraft
-
Totals by group
Counts elements and sums the chosen number fields for each combination of group values and for the whole selection.
sum = Σ vᵢ over the elements with a number; counted = how many had one
Quantity totals and schedules from IFC properties ifc-qto.js64-bit- BimCraft
-
Spaces schedule totals
The total floor area and volume of the listed rooms.
Quantity totals and schedules from IFC properties ifc-qto.js64-bit- BimCraft
-
Is a property value the same in both versions
Decides whether a number or text property changed between two versions of a model.
same when |a − b| ≤ 1e-9 × max(1, |a|, |b|)
Quantity totals and schedules from IFC properties ifc-compare.js64-bit- BimCraft
-
Number shown in Properties
How a property or quantity value from the file is written out in the Properties panel.
shown = round(x × 10⁴) ÷ 10⁴
Quantity totals and schedules from IFC properties ifc-model.js64-bit- BimCraft
-
Placement of an item relative to its story
The location and X direction written to the file for a placed item.
(lx, ly) = W⁻¹ × (x ÷ unit, y ÷ unit, story z); direction = W⁻¹ rotation × (cos r, sin r)
Placing and pasting elements in an IFC model ifc-place.js64-bit- BimCraft
-
Position and rotation read back from a placement
The x, y and rotation of each placed item as listed in the equipment schedule and used by copy and paste.
x = W[12] × unit; y = W[13] × unit; rot = round(atan2(W[1], W[0]) in degrees × 1000) ÷ 1000
Placing and pasting elements in an IFC model ifc-place.js64-bit- BimCraft
-
An item's body in the file's unit
Writes a library item's mesh or box as IFC geometry in the file's length unit.
coordinate in file units = millimeters ÷ (millimeters per file unit)
Placing and pasting elements in an IFC model ifc-place.js64-bit- BimCraft
-
Plan outline as polylines
Turns the lines, arcs, circles, ellipses and bulged polylines of an item's plan into the straight segments written as its footprint.
arc: n = max(4, ⌈sweep ÷ 10°⌉) segments; bulge: θ = 4 atan(b), r = chord ÷ (2 sin(θ ÷ 2))
Placing and pasting elements in an IFC model ifc-place.js64-bit- BimCraft
-
Viewer point to model millimeters and back
Converts a point between the viewer's Y-up meters and the model's Z-up millimeters.
model = (x × 1000, −z × 1000, y × 1000) of C⁻¹ × v; viewer = C × (x ÷ 1000, z ÷ 1000, −y ÷ 1000)
Placing and pasting elements in an IFC model ifc-place.js64-bit- BimCraft
-
Move and turn of pasted elements
The matrix that carries copied elements to where they are pasted, with a turn about a point and a change of story.
M = T(about + d) × Rz(rot) × T(−about); dz = elevation of target story − elevation of source story
Placing and pasting elements in an IFC model ifc-elements.js64-bit- BimCraft
-
Placement written for a pasted element
The location, Z axis and X axis of the new placement, from its matrix.
location = round to 6 decimals; axis = column ÷ its length, rounded to 9 decimals
Placing and pasting elements in an IFC model ifc-elements.js64-bit- BimCraft
-
Wall faces in plan
The two long faces of each wall as plan segments in model millimeters, with a normal pointing away from the wall.
Wall faces and plan frames from element meshes ifc-place.js32-bit in part- BimCraft
-
Smallest rectangle round a wall's plan points
The minimum-area bounding rectangle of a set of plan points.
for each hull edge direction u: area = (max u − min u) × (max v − min v); keep the smallest
Wall faces and plan frames from element meshes ifc-place.js64-bit- BimCraft
-
Snapping an item to the nearest wall face
The position and rotation that put an item's back against the nearest wall face.
t = clamp((p − a)·(b − a) ÷ |b − a|², 0, 1); q = a + t (b − a); position = q + n × maxY; rot = atan2(−n_y, −n_x) − 90°
Wall faces and plan frames from element meshes ifc-place.js32-bit in part- BimCraft
-
Plan frame of copied elements
The turn of the first copied element and the box of all copied meshes measured in those turned axes.
rot = atan2(W[1], W[0]) in degrees, rounded to 6 decimals; box from orientedBox
Wall faces and plan frames from element meshes ifc-place.js32-bit in part- BimCraft
-
Box of points in turned plan axes
The bounds of a point list in plan axes turned by an angle, and the box center in model millimeters.
u = x cos r + y sin r; v = −x sin r + y cos r; center = ((u₀ + u₁) ÷ 2, (v₀ + v₁) ÷ 2) turned back
Wall faces and plan frames from element meshes ifc-place.js64-bit- BimCraft
-
Is this mesh a straight prism
Checks that the mesh is closed and consistently wound, and picks candidate directions for the prism's axis.
eps = tol × bounding-box diagonal, tol = 1e-6
Turning a face mesh back into an extrusion ifc-solids.js64-bit- BimCraft
-
Depth, frame and outline of the prism
The prism's depth, its origin and axes, and its outline and holes in the cap's own two axes.
h = v · n; depth = max h − min h; (u, v) = ((p − origin) · x, (p − origin) · y)
Turning a face mesh back into an extrusion ifc-solids.js64-bit- BimCraft
-
Removing collinear outline points
Drops outline corners that lie on the line between their neighbors.
drop b when |(b − a) × (c − b)| ≤ tol × max(1, |c − a|)
Turning a face mesh back into an extrusion ifc-solids.js64-bit- BimCraft
-
Volume of a closed mesh
The signed volume of a closed triangle mesh, used to check a conversion.
V = Σ A · (B × C) ÷ 6
Turning a face mesh back into an extrusion ifc-solids.js64-bit- BimCraft
-
Area of the prism's outline
The outline's area less its holes; times the depth it is the prism's volume.
area = |shoelace(outer)| − Σ |shoelace(hole)|
Turning a face mesh back into an extrusion ifc-solids.js64-bit- BimCraft
-
Writing the prism into the file
The IFC lines of the outline, its placement and the extrusion depth.
each number written as toFixed(6)
Turning a face mesh back into an extrusion ifc-solids.js64-bit- BimCraft
-
Degrees from degrees, minutes, seconds and millionths
Reads an IFC compound angle as decimal degrees.
deg = d + m ÷ 60 + (s + μ ÷ 10⁶) ÷ 3600
Where an IFC model point is on the earth ifc-geo.js64-bit- BimCraft
-
File point to map grid
Easting, northing and height in meters of a point of the file.
[E, N, H] = (matrix × p) × meters per map unit
Where an IFC model point is on the earth ifc-geo.js64-bit- BimCraft
-
Longitude and latitude from the site's reference point
An approximate WGS 84 position of a file point from its offset east and north of the site's point.
w = √(1 − e² sin² φ); N = a ÷ w; M = a (1 − e²) ÷ w³; lon = lon₀ + east ÷ ((N + h) cos φ); lat = lat₀ + north ÷ (M + h)
Where an IFC model point is on the earth ifc-geo.js64-bit- BimCraft
-
Degrees to degrees, minutes and seconds
Formats a latitude or longitude with its hemisphere letter.
d = ⌊|deg|⌋; m = ⌊(|deg| − d) × 60⌋; s = (|deg| − d − m ÷ 60) × 3600, shown with 2 decimals
Where an IFC model point is on the earth ifc-geo.js64-bit- BimCraft
-
Viewer point to the file's own coordinates
Takes a point picked in the viewer back to the file's Z-up coordinates in its own length unit.
y = C⁻¹ × (place⁻¹ × p); file = (y_x, −y_z, y_y) ÷ meters per file unit
Where an IFC model point is on the earth ifc-geo.js64-bit- BimCraft
-
Feature edges of one element
The edges of an element where its faces meet at more than the feature angle, plus its free edges.
edge drawn when n₁ · n₂ ≤ cos(angle), or when only one triangle uses it
Element outlines in the IFC view ifc-vis.js32-bit, display only- BimCraft
-
Edge segments of a batch
Collects every element's edges into one array of line segments with a run per element.
Element outlines in the IFC view ifc-vis.js32-bit, display only- BimCraft
-
Section of a run
The outside diameter, wall and bend radius of a pipe from the size table, or the width and height of a duct, in millimeters.
mm = inches × 25.4
Pipe and duct runs: layout, lengths and sizing mep-model.js64-bit- BimCraft
-
Run corners with the slope applied
The corners of a run with its fall along the horizontal length from the first point.
z = z₀ − slope × Σ horizontal leg length
Pipe and duct runs: layout, lengths and sizing mep-model.js64-bit- BimCraft
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.