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
-
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.js64-bit- BimCraft
-
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.js64-bit- BimCraft
-
Area of an outline
The signed area of a polygon.
A = ½ Σ (xᵢ yᵢ₊₁ − yᵢ xᵢ₊₁)
Drawn floors: outline, openings and quantities model-floors.js64-bit- BimCraft
-
Perimeter of an outline
The total length of the outline's edges.
P = Σ |pᵢ₊₁ − pᵢ|
Drawn floors: outline, openings and quantities model-floors.js64-bit- BimCraft
-
Do two edges cross
A yes or no on whether two segments properly cross.
cross when o(a, b, c) × o(a, b, d) < 0 and o(c, d, a) × o(c, d, b) < 0
Drawn floors: outline, openings and quantities model-floors.js64-bit- BimCraft
-
Is the outline usable
Refuses an outline with fewer than 3 corners, one that crosses itself, or one with almost no area.
refuse when |A| < 10 000 mm²
Drawn floors: outline, openings and quantities model-floors.js64-bit- BimCraft
-
Is a point inside the outline
The even-odd test used to check that an opening lies in its floor.
Drawn floors: outline, openings and quantities model-floors.js64-bit- BimCraft
-
Saving and reading the outline
The outline's points written as text in the file's length unit, and read back.
text = round(x ÷ unit, 3) , round(y ÷ unit, 3)
Drawn floors: outline, openings and quantities model-floors.js64-bit- BimCraft
-
Perimeter, area and volume written on a floor
The slab quantities, gross and net of the openings.
net area = A − Σ |hole|; volume = area × thickness
Drawn floors: outline, openings and quantities model-floors.js64-bit- BimCraft
-
Flights and landings of a ramp
Where each flight and landing starts and ends along the ramp, and at what height.
n = max(1, ⌈rise ÷ maxRise − 1e-9⌉); flight run = rise ÷ n × slope; steep when slope < 12 − 1e-9
Ramps: flights, landings and quantities model-ramps.js64-bit- BimCraft
-
Rise of a ramp
The height a ramp climbs: to its top level, else the rise typed.
rise = top elevation − own elevation
Ramps: flights, landings and quantities model-ramps.js64-bit- BimCraft
-
Flight slope, length and volume
The slope angle, sloped length and volume written on each flight.
slope = atan(Δz ÷ len); length = √(len² + Δz²); volume written = length × width × t
Ramps: flights, landings and quantities model-ramps.js64-bit- BimCraft
-
Values saved with a ramp
The start point, sizes, slope and the rise and run used, kept in the ramp's property set.
required slope = atan(1 ÷ slope)
Ramps: flights, landings and quantities model-ramps.js64-bit- BimCraft
-
Ramps following a level
Rebuilds ramps whose rise follows a level that moved.
rebuild when |rise − rise used| > 0.5 mm
Ramps: flights, landings and quantities model-ramps.js64-bit- BimCraft
-
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.js64-bit- BimCraft
-
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.js64-bit- BimCraft
-
Grid lines an elevation shows
The lines that run within 30° of a view's direction, and where they sit across the view.
kept when |e · d| ÷ |e| ≥ 0.866; x = a · right
Grid lines model-grids.js64-bit- BimCraft
-
Is the grid rectangular
A yes or no that decides the grid's type in the file.
parallel when |d₁ × d₂| < 1e-6; square when |u · v| < 1e-6
Grid lines model-grids.js64-bit- BimCraft
-
Grid line ends read from the file
A grid line's two ends in building millimeters, from its polyline and the grid's placement.
world = M × (x × unit, y × unit, 0)
Grid lines model-grids.js64-bit- BimCraft
-
Grid lines in a story's plan
Grid line ends moved from building coordinates into one story's plan axes.
plan = (story world)⁻¹ × point
Grid lines model-grids.js64-bit- BimCraft
-
Link matrix through both files' map positions
The matrix from the linked file's millimeters to the open model's, through the map grid both are placed on.
m = S(host unit) × host map⁻¹ × S(1 ÷ host map unit) × S(link map unit) × link map × S(1 ÷ link unit)
Placing a linked model model-links.js64-bit- BimCraft
-
Link matrix from two pairs of points
The turn and move that carry two picked points of the linked model onto two picked points of the open one.
a = atan2(h₁ − h₀) − atan2(l₁ − l₀); t = h₀ − R(a) × l₀
Placing a linked model model-links.js64-bit- BimCraft
-
The same change in the scene
Carries a link matrix between the file's millimeters and the viewer's scene.
A = F × m × F⁻¹; m = F⁻¹ × A × F
Placing a linked model model-links.js64-bit- BimCraft
-
Saving the link matrix
The matrix written into the model as text.
entry = round(v × 10⁹) ÷ 10⁹
Placing a linked model model-links.js64-bit- BimCraft
-
Boxes of the things that move
The plan box of each wall, drawn floor, column and placed item.
wall corners = end ± n × t ÷ 2
Move, align and distribute model-modify.js64-bit- BimCraft
-
Align
The move that brings each element's chosen side or middle to a common line.
move = target − own; middle = (min + max) ÷ 2
Move, align and distribute model-modify.js64-bit- BimCraft
-
Distribute
The moves that space elements evenly between the first and the last.
gap = (span − Σ sizes) ÷ (n − 1)
Move, align and distribute model-modify.js64-bit- BimCraft
-
Where placed items stand
The position and rotation of each placed library item in its story's plan.
rot = atan2(M[1], M[0]) × 180 ÷ π
Move, align and distribute model-move.js64-bit- BimCraft
-
Moving and turning placed items
The new position and rotation of an item moved by an amount or turned, on its own or about a shared point.
p′ = c + R(Δ) × (p − c); rot = ((rot mod 360) + 540) mod 360 − 180
Move, align and distribute model-move.js64-bit- BimCraft
-
Rejoining wall corners after a type change
The new corner point of two walls that met end to end, after their center lines moved.
s = ((B.a − A.a) × v) ÷ (u × v); p = A.a + s u
Move, align and distribute model-ops.js64-bit- BimCraft
-
Doors and windows when a wall end slides
How far a wall's start moved along its own line, so that what it hosts keeps its place.
shift = (B.a − A.a) · u_A; new offset = offset − shift
Move, align and distribute model-ops.js64-bit- BimCraft
-
Fitting an opening in a wall
The offset along the wall at which an opening of a given width fits.
offset = max(gap, min(len − width − gap, offset))
Doors and windows in walls model-openings.js64-bit- BimCraft
-
Sill of a door
Whether a door stands on its wall's own level or on an upper level the wall passes.
kept when |level elevation − base elevation − sill| ≤ 1 mm
Doors and windows in walls model-openings.js64-bit- BimCraft
-
Offset, size and sill read back
Where an existing door or window sits and how big it is, from the file.
sill = M[14] + base offset; width = stored × unit
Doors and windows in walls model-openings.js64-bit- BimCraft
-
Default offset and height check
Where a new opening goes when no offset is given, and the check that it is not taller than the wall.
offset = (len − W) ÷ 2; refused when sill + height > wall height + 1
Doors and windows in walls model-openings.js64-bit- BimCraft
-
The box that cuts the wall
The body of the opening that is subtracted from the wall.
box: x from 0 to width, y from −t ÷ 2 − 10 to t ÷ 2 + 10, z from 0 to height
Doors and windows in walls model-openings.js64-bit- BimCraft
-
Width, height and area written
The quantities and sizes written on a door or window.
area = width × height
Doors and windows in walls model-openings.js64-bit- BimCraft
-
Shift of a wall's start along its line
How far a wall's start moved along the wall, so hosted openings can keep their place in the world.
shift = (a′ − a) · u
Doors and windows in walls model-openings.js64-bit- BimCraft
-
Door body
The boxes a starter door is built from: frame, leaves, glass.
frame = min(1.5 in, W ÷ 6)
Doors and windows in walls model-openings.js64-bit- BimCraft
-
Window body
The boxes a starter window is built from: frame, rails, stiles, glass and an optional well.
frame = min(2 in, W ÷ 6, H ÷ 6)
Doors and windows in walls model-openings.js64-bit- BimCraft
-
Slope and outline kind
Turns the pitch into a slope and chooses the method for the outline.
s = tan(pitch)
Roof planes over an outline model-roof.js64-bit- BimCraft
-
Faces of a roof over a convex outline
Each pitched edge's face, the eave, the ridges and the area.
keep p where (nᵢ − nⱼ) · p ≤ nᵢ · aᵢ − nⱼ · aⱼ; area = plan area × √(1 + s²)
Roof planes over an outline model-roof.js64-bit- BimCraft
-
Clipping a polygon by a half-plane
Keeps the part of a convex polygon on one side of a line.
t = f_a ÷ (f_a − f_b); point = a + t (b − a)
Roof planes over an outline model-roof.js64-bit- BimCraft
-
Where two offset edges meet
The corner of the eave where two neighboring edges, pushed out by the overhang, cross.
t = ((p₂ − p₁) × d₂) ÷ (d₁ × d₂)
Roof planes over an outline model-roof.js64-bit- BimCraft
-
Roof over an outline with square corners
A hip roof for every largest rectangle that fits in the outline with its overhang.
m = min(w, h) ÷ 2; ridge from (x₀ + m, c_y) to (x₁ − m, c_y)
Roof planes over an outline model-roof.js64-bit- BimCraft
-
Height of the roof over a point
The roof's underside height above the top of the walls at a plan point.
z = z₀ + s × (distance inside the face's eave edge)
Roof planes over an outline model-roof.js64-bit- BimCraft
-
Is the outline convex
Chooses between the two roof methods.
convex when every corner turns the same way
Roof planes over an outline model-roof.js64-bit- BimCraft
-
Plan area of a polygon
The shoelace area used for the eave and the faces.
A = ½ Σ (xᵢ yᵢ₊₁ − yᵢ xᵢ₊₁)
Roof planes over an outline model-roof.js64-bit- BimCraft
-
Dimension chain of a wall
The overall length of a wall along one face and the chain of lengths between its ends and its openings.
overall = e₁ − e₀; piece = sᵢ₊₁ − sᵢ with s rounded to 0.01 mm
Plan view: picked points, wall outlines and dimensions model-plan.js64-bit- BimCraft
-
Wall outline with openings taken out
The pieces of a wall's plan outline left between the openings the cut plane passes through.
Plan view: picked points, wall outlines and dimensions model-plan.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.