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
-
Outline moved in by a distance
Moves every edge of a floor outline inward by a fixed distance and finds the new corners.
corner = p₀ + u_prev × cross(p₁ − p₀, u) ÷ cross(u_prev, u)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Joist lines and the governing span
Sets the joist lines across a floor and takes the longest clipped joist as the span that sizes them.
c = c₀ + spacing, then + spacing while c < c₁ − 1; span = max(t₁ − t₀)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Joists cut round floor openings
Makes each joist piece, cutting it 3 inches short of an opening it crosses, and records its length.
length = s₁ − s₀
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Trusses across a roof
Places a truss at each spacing along the roof and takes its top profile from the roof's underside.
top profile sampled at t₀ + (t₁ − t₀) × k ÷ 40, k = 0 … 40
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Rafters and their size
Sizes the rafters from the longest horizontal run, places them along each roof face and records each one's sloped length.
run = max((p − o) · n); length = √((t₁ − t₀)² + (z_b − z_a)²)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Collar ties
Places a collar tie every 4 feet under each ridge, two thirds of the way from the plate to the ridge, and finds how far it reaches each way.
z_c = plate + (z_ridge − plate) × 2 ÷ 3; reach by 40 halvings of [0, 20000 mm]
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Ceiling joists
Lays ceiling joists out like floor joists at the plate and sizes them from the ceiling span table.
span = max(joist length); z = plate + depth ÷ 2
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Solid of a sloped member
Builds the solid of a joist, rafter, hip, valley or ridge as a rectangle swept along its 3D line with plumb ends.
slope = |Δz| ÷ √(Δx² + Δy²); plumb depth = depth × √(1 + slope²)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Length and board feet written on a piece
Writes each piece's role, size, length and board feet into the model, and adds up the board feet of the framing.
Length = round(L ÷ unit, 3); BoardFeet = round(bf × plies, 3)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Board feet of a framing
Writes the piece count and the total board feet of one framed wall, floor or roof.
BoardFeet = round(Σ bf, 2)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Cut list by stock length
Groups every framing piece by size and stock length, and totals the counts and board feet.
stock = max(8 ft, ⌈L ÷ 2 ft⌉ × 2 ft); metric: max(2400, ⌈L ÷ 600⌉ × 600)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Posts, balusters and rail length
Places a post at each path point, spaces the balusters between posts and adds up the rail length.
n = max(0, ⌈(clear − gap) ÷ (gap + b)⌉); s_k = post ÷ 2 + k × (clear − n × b) ÷ (n + 1) + b × (k − ½); length = Σ √(L² + Δz²)
Railing posts, balusters and rails res-railing.js64-bit- BimCraft
-
Rail solid along a sloped segment
Builds each rail as a square bar swept along its 3D segment.
sweep direction = (d̂ · z, d̂_z, d̂ · x) in the frame across the rail
Railing posts, balusters and rails res-railing.js64-bit- BimCraft
-
Railing values written to the model
Writes the railing's path, height, base, length and counts into the model.
Points = round(x ÷ unit, 3), round(y ÷ unit, 3); Length = round(length ÷ unit, 6)
Railing posts, balusters and rails res-railing.js64-bit- BimCraft
-
Wall under each roof edge
Finds the drawn wall whose outer face lies along each edge of the building's outline.
d = |cross(û_wall, m − a)|; match when |d − t ÷ 2| ≤ 2 mm
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Per-wall pitch and overhang as stored
Writes each wall's roof setting (pitched, gable or none, with its pitch and overhang) as the text kept in the model.
pitch → round(pitch, 4) degrees; overhang → round(overhang, 2) mm
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Sloped roof slabs
Builds one slab per roof face in the face's own sloped plane.
profile y = ((p − o) · n) ÷ cos θ; depth = thickness ÷ cos θ; sweep direction (0, sin θ, cos θ)
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Gable wall profile
Builds each gable wall from the top of the wall below up to the underside of the roof.
z sampled at a + (b − a) × k ÷ 64, k = 0 … 64, 1 mm inside the edge
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Fascia boards
Builds a fascia board along each eave and rake run and totals their length.
length = Σ board lengths; board profile rises by z_b − z_a over its run
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Soffit area
Adds up the area of the level soffit panels under the eaves.
area = Σ |polygon area|
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Roof areas and line lengths written to the model
Writes the roof's sloped area, projected area and the lengths of its ridges, hips, valleys, eaves and rakes.
GrossArea = plan.area; ProjectedArea = plan.projected; lengths = round(L ÷ unit, 6)
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Eave frame of a plane
Finds the eave direction and the inward direction of a roof plane from its polygon.
u = (p₁ − p₀) ÷ |p₁ − p₀|; n = (−u_y, u_x), flipped when Σ (p − p₀) · n < 0
Manual roof planes res-roofplane.js64-bit- BimCraft
-
Height of the plane at a point
The height of the plane's underside over a plan point.
z = base + tan θ × ((p − o) · n)
Manual roof planes res-roofplane.js64-bit- BimCraft
-
Polygon area
The signed plan area of the plane's polygon.
A = ½ Σ (xᵢ yᵢ₊₁ − yᵢ xᵢ₊₁)
Manual roof planes res-roofplane.js64-bit- BimCraft
-
Sloped slab and areas written to the model
Builds the plane's slab and writes its sloped area, projected area, points, pitch, base and thickness.
profile y = ((p − o) · n) ÷ cos θ; depth = thickness ÷ cos θ; GrossArea = projected ÷ cos θ
Manual roof planes res-roofplane.js64-bit- BimCraft
-
Scale that fits
Chooses the largest standard scale at which a drawing of a given width and height fits the space on the sheet.
first ratio with w ÷ r ≤ room_w and h ÷ r ≤ room_h; else r = ⌈max(w ÷ room_w, h ÷ room_h)⌉
Drawing sheets to scale and the PDF res-sheets.js64-bit- BimCraft
-
Placing a drawing in its cell
Centers a drawing in its space on the sheet at the chosen scale and gives the mapping from drawing millimeters to sheet millimeters.
k = 1 ÷ ratio; sheet = (x + (w − W k) ÷ 2 − x₀ k) + p × k
Drawing sheets to scale and the PDF res-sheets.js64-bit- BimCraft
-
A view placed by hand on a sheet
Works out the scale and the box of a view placed at a given point of a sheet.
ratio = placed ratio, else the view's own, else the scale that fits a third of the sheet; box = middle ± (W ÷ ratio) ÷ 2
Drawing sheets to scale and the PDF res-sheets.js64-bit- BimCraft
-
Arranging the views of a sheet
Picks one standard scale for all the drawn views of a sheet and packs them in rows.
first ratio at which every view fits; x, y = round(middle × 10) ÷ 10
Drawing sheets to scale and the PDF res-sheets.js64-bit- BimCraft
-
Arcs drawn as chords
Turns each arc of a plan symbol, such as a door swing, into a polyline for the sheet.
steps = max(8, ⌈|a₁ − a₀| ÷ (π ÷ 32)⌉)
Drawing sheets to scale and the PDF res-sheets.js64-bit- BimCraft
-
Coordinates written to the PDF
Formats a path coordinate for the PDF.
text = Number(v.toFixed(6))
Drawing sheets to scale and the PDF res-sheets.js64-bit- BimCraft
-
Widths, text positions and matrices written to the PDF
Formats line widths, dash lengths, clip rectangles, text sizes and the text matrix for the PDF.
text = v.toFixed(3), with |v| < 5e-5 written as 0
Drawing sheets to scale and the PDF res-sheets.js64-bit- BimCraft
-
Sheet items to PDF operators
Converts every line, fill, clip and text of a sheet from millimeters to PDF points and writes the page's drawing operators.
points = mm × 72 ÷ 25.4
Drawing sheets to scale and the PDF res-sheets.js64-bit- BimCraft
-
Direction a section line looks
The unit direction along a section line and the horizontal direction it looks.
u = (b − a) ÷ |b − a|; look = (−u_y, u_x) or (u_y, −u_x)
Drawing sheets to scale and the PDF res-sheets.js64-bit- BimCraft
-
Section line written to the model
Writes a section line's two ends, its look side and its depth into the model.
AX, AY, BX, BY, Depth = round(value ÷ unit, 6)
Drawing sheets to scale and the PDF res-sheets.js64-bit- BimCraft
-
Ceiling tile grid
Lays a ceiling pattern's grid lines inside a ceiling's outline, with a tile centered on the outline's box.
lines at c + m ÷ 2 + j × m; crossing = q_a + (q_b − q_a) × (k − p_a) ÷ (p_b − p_a)
Drawing sheets to scale and the PDF views-model.js64-bit- BimCraft
-
Crop region of a view
Orders the four numbers of a crop rectangle and rejects one that is not a real rectangle.
valid when x₁ − x₀ ≥ 100 and y₁ − y₀ ≥ 100
Drawing sheets to scale and the PDF views-model.js64-bit- BimCraft
-
View positions stored on a sheet
Stores where each view sits on a hand-arranged sheet and at which scale.
x, y = round(value, 2) mm; ratio = whole number
Drawing sheets to scale and the PDF views-model.js64-bit- BimCraft
-
Another level drawn under a plan
Moves another level's plan linework into this level's plan as plain segments.
p′ = (T₀ x + T₄ y + T₁₂, T₁ x + T₅ y + T₁₃); arcs as 12 chords
Drawing sheets to scale and the PDF views-model.js64-bit- BimCraft
-
Number of risers and riser height
The number of risers a floor-to-floor height needs, each riser's height, and whether the riser, tread, width and handrail meet the limits.
n = max(2, ⌈H ÷ riser_max − 1e-9⌉); r = H ÷ n; treads = n − 1
Stair risers, treads and stairwell res-stair.js64-bit- BimCraft
-
Treads of a straight flight
The plan rectangle and the height of each tread of a straight stair.
tread i spans i × d to (i + 1) × d; z = (i + 1) × r
Stair risers, treads and stairwell res-stair.js64-bit- BimCraft
-
Treads before and after a turn
Divides the treads of an L, U or winder stair between the flight before the turn and the one after.
before = max(1, min(T − turn − 1, round((T − turn) × split))); after = T − before − turn
Stair risers, treads and stairwell res-stair.js64-bit- BimCraft
-
Landing and second flight of a U stair
The half landing of a U stair and the treads of the flight that comes back beside the first.
landing width = 2 w + gap; flight 2 center at ±(w + gap); z = z_landing + (j + 1) × r
Stair risers, treads and stairwell res-stair.js64-bit- BimCraft
-
Winder treads
Fans three winder treads from the inside corner of a quarter turn.
outer path of length 2 w cut at 2 w k ÷ 3, k = 0 … 3
Stair risers, treads and stairwell res-stair.js64-bit- BimCraft
-
Spiral stair
The wedge treads of a spiral stair round its post, the handrail, the walk line and the outline.
Δθ = tread ÷ (r_post + 12 in); tread i from θ₀ ± i Δθ; arcs chorded at ≤ 6°
Stair risers, treads and stairwell res-stair.js64-bit- BimCraft
-
Floor-to-floor height of a stair
The height a stair climbs: from its level to the level above, else its own fixed height.
H = elevation_top − elevation_bottom when that is more than 100 mm
Stair risers, treads and stairwell res-stair.js64-bit- BimCraft
-
Stairwell opening
Finds the treads and landings that have less than the required headroom under the floor above; their outline is cut out of that floor.
cut where z_tread + headroom > H + offset − thickness
Stair risers, treads and stairwell res-stair.js64-bit- BimCraft
-
Center post of a spiral stair
Builds the spiral stair's round post as a 24-sided column.
vertices at r × (cos 2πj ÷ 24, sin 2πj ÷ 24)
Stair risers, treads and stairwell res-stair.js64-bit- BimCraft
-
Riser and tread written to the model
Writes the number of risers and treads, the riser height, the tread length and the required headroom.
RiserHeight, TreadLength = round(value ÷ unit, 6)
Stair risers, treads and stairwell res-stair.js64-bit- BimCraft
-
Stair settings written to the model
Writes the stair's start point, angle, width, riser limit, tread, split and rail height.
lengths = round(value ÷ unit, 6); Angle = round(angle, 6); Split = round(split, 4)
Stair risers, treads and stairwell res-stair.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.