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
-
Learned symbol saved and read back
Stores an accepted symbol in the file and reads it back for a later search.
byte = round(ink × 255); ink′ = byte ÷ 255
Automatic count by symbol matching learn.js32-bit in part- TakeoffCraft
-
Same symbol as one already learned
The normalized correlation of two symbols over their common area.
ncc = Σ(a − ā)(b − b̄) ÷ √(Σ(a − ā)² · Σ(b − b̄)²)
Automatic count by symbol matching learn.js64-bit- TakeoffCraft
-
Find placed on the sheet
Maps a find's pixel box back to sheet coordinates and takes its middle as the count mark's point.
p = T⁻¹·((x + w ÷ 2) ÷ wt, (y + h ÷ 2) ÷ wt)
Automatic count by symbol matching takeoffcraft.js64-bit- TakeoffCraft
-
Similarity from two point pairs
The move, turn and uniform scale that take two points of the old sheet to two points of the new one.
c + i·s = (b₂ − b₁) ÷ (a₂ − a₁); t = b₁ − (c + i·s)·a₁
Revision overlay: lining up two sheets and moving the takeoff overlay.js64-bit- TakeoffCraft
-
Scale of an alignment
How much longer a length becomes under the alignment.
scale = √(m₀² + m₁²)
Revision overlay: lining up two sheets and moving the takeoff overlay.js64-bit- TakeoffCraft
-
Marks moved onto the new sheet
Applies the alignment to every point of a mark.
p′ = A·p; b′ = b
Revision overlay: lining up two sheets and moving the takeoff overlay.js64-bit- TakeoffCraft
-
Old sheet's pixels under the new sheet
The matrix from a pixel of the new sheet's raster to a pixel of the old one.
Revision overlay: lining up two sheets and moving the takeoff overlay.js64-bit- TakeoffCraft
-
Applying, multiplying and inverting a transform
The 2 × 3 matrix operations behind sheet transforms.
det = m₀·m₃ − m₁·m₂; M⁻¹ = adj(M) ÷ det
Revision overlay: lining up two sheets and moving the takeoff geom.js64-bit- TakeoffCraft
-
Alignment from four picks
Collects two points on the old sheet and two on the new one and fits the alignment.
Revision overlay: lining up two sheets and moving the takeoff takeoffcraft.js64-bit- TakeoffCraft
-
Scale carried to the new sheet
The scale the moved marks are measured with on the new sheet.
ftPerUnit′ = ftPerUnit ÷ scale(A)
Revision overlay: lining up two sheets and moving the takeoff takeoffcraft.js64-bit- TakeoffCraft
-
Where the two sheets differ
Marks each pixel as removed, added or unchanged, and counts both kinds.
removed: old ≥ 0.35 and max(new within r) < 0.2; added: the reverse
Revision overlay: what changed under a mark overlay.js64-bit- TakeoffCraft
-
How much changed along a mark
The share of a mark's path with changed ink beside it, whether a corner changed, and the changed pixels near it.
share = samples with changed ink within the buffer ÷ samples
Revision overlay: what changed under a mark overlay.js64-bit- TakeoffCraft
-
Changed pixels in a box
How many changed pixels lie in a rectangle of the mask.
n = S[y₁+1][x₁+1] − S[y₀][x₁+1] − S[y₁+1][x₀] + S[y₀][x₀]
Revision overlay: what changed under a mark overlay.jsExact- TakeoffCraft
-
Raster sizes and the mark test
Chooses the two raster scales, builds the pixel map between them and tests every mark of the old sheet.
px = min(2, √(12,000,000 ÷ (W × H)))
Revision overlay: what changed under a mark takeoffcraft.js64-bit- TakeoffCraft
-
Sheet coordinates to feet on the ground
Maps a point of the sheet to feet in the 3D view.
k = ftPerUnit ÷ √|det T|; (x, y) → (dx·k, (height − dy)·k)
3D check view: walls, slabs and their quantities scene3d.js64-bit- TakeoffCraft
-
Wall area of a run
The area of the wall a run with a height stands for.
wall area = L × H
3D check view: walls, slabs and their quantities scene3d.js64-bit- TakeoffCraft
-
Net area and volume of a slab
An area's net square feet after back-outs, and its volume when it has a depth.
net = max(0, A − cut); V = net × D
3D check view: walls, slabs and their quantities scene3d.js64-bit- TakeoffCraft
-
Totals over stacked sheets
Adds the totals of each sheet when several sheets are stacked as floors.
3D check view: walls, slabs and their quantities scene3d.js64-bit- TakeoffCraft
-
Outline of a wall with a thickness
Offsets a run half the thickness to each side, with mitred corners, into one closed outline.
offset = min(half ÷ max(cos, 1e-6), 4 × half) along the bisector
3D check view: walls, slabs and their quantities scene3d.js64-bit- TakeoffCraft
-
Solid from an outline and its cut-outs
Triangulates the top and bottom faces and builds the side faces of a slab or wall.
3D check view: walls, slabs and their quantities scene3d.js64-bit- TakeoffCraft
-
Feet to meters, Z up to Y up
Converts one vertex from the view's feet to glTF's meters and axes.
(x, y, z) ft → (0.3048·x, 0.3048·z, −0.3048·y) m
3D check view exported as glTF glb.js64-bit- TakeoffCraft
-
Vertex positions and normals written
Fills the position and normal buffers of an object.
n = (b − a) × (c − a) ÷ |…|
3D check view exported as glTF glb.js32-bit in part- TakeoffCraft
-
Bounds of each position buffer
The minimum and maximum of a position buffer, written beside it.
3D check view exported as glTF glb.js32-bit in part- TakeoffCraft
-
Quantities carried with each object
Attaches each object's mark, item, kind and measured values to its node.
3D check view exported as glTF glb.js64-bit- TakeoffCraft
-
Arcs as Bézier curves for drawing
Turns a run or an outline into move, line and curve commands.
k = 4 ÷ 3 × tan(φ ÷ 4); c₁ = p₀ + k·r·tangent₀; c₂ = p₃ − k·r·tangent₁
Marks and sheets written to PDF geom.js64-bit- TakeoffCraft
-
A mark's path written to the page
Writes a mark's commands as PDF path operators.
Marks and sheets written to PDF pdfmarks.js64-bit- TakeoffCraft
-
Quantities printed in the legend
The quantity of each item on that sheet, as text in the page's legend.
Marks and sheets written to PDF pdfmarks.js64-bit- TakeoffCraft
-
A drawing's lines written as vector paths
Writes each batch of the drawing's lines to the PDF page under the sheet's matrix.
width = max(0.25, lw × 72 ÷ 25.4 [× 0.5]) ÷ scale
Marks and sheets written to PDF cadpdf.js64-bit- TakeoffCraft
-
Unit conversions to the factor table's basis
How many meters, square meters, cubic meters or items one of each takeoff unit is.
CY → m³: × 0.764554858 (exact: 0.9144³ = 0.764554857984)
Embodied carbon from quantities carbon.js64-bit- TakeoffCraft
-
Quantity in the factor's basis
Converts a line's quantity with waste into the unit its carbon factor is given in.
qty = qtyW × factor; kg basis: qtyW × factor × density
Embodied carbon from quantities carbon.js64-bit- TakeoffCraft
-
Kilograms per line and the total
The carbon of each line for the chosen modules, and their sum.
kg = qty × (A1–A3 + A4 + A5); total = Σ kg
Embodied carbon from quantities carbon.js64-bit- TakeoffCraft
-
Carbon lines written to a file
Writes each line's quantity and kilograms to a CSV file.
written = round(v × 100) ÷ 100
Embodied carbon from quantities carbon.js64-bit- TakeoffCraft
-
Unit conversions for the price table
The table unit and factor for each takeoff unit.
Rates exported as a price table carbon.jsExact- TakeoffCraft
-
Rates converted and rounded
One table row per priced item, with its material rate, labor rate and waste.
rate = round(rate4 ÷ 10000 × factor × 10⁶) ÷ 10⁶
Rates exported as a price table carbon.js64-bit- TakeoffCraft
-
Quantity rounded for the package
Rounds a quantity to 4 decimals before it is sent.
qty = round(v × 10000) ÷ 10000
Quantities sent in a bid package bidsend.js64-bit- TakeoffCraft
-
Scope lines of a package
Builds the lines of a bid package: item, quantity, unit and sheets.
Quantities sent in a bid package bidsend.js64-bit- TakeoffCraft
-
Vertex buffers for the 3D view
Copies an object's triangles into a buffer for the graphics card.
Drawing the 3D check view and CAD sheets on screen view3d.js32-bit, display only- TakeoffCraft
-
Canvas paths for a CAD sheet
Builds the canvas paths of one batch of lines and fills.
Drawing the 3D check view and CAD sheets on screen cadset.js32-bit, display only- TakeoffCraft
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.