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
-
Point in triangle
Whether a point lies inside or on a triangle.
three cross products of (corner − point) pairs, each ≥ 0
Polygon triangulation (ear clipping) usd/earcut.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Bridge from a hole to the outer ring
The point of the outer ring a hole is connected to.
x = p.x + (h.y − p.y) × (p′.x − p.x) ÷ (p′.y − p.y); tan = |h.y − p.y| ÷ (h.x − p.x)
Polygon triangulation (ear clipping) usd/earcut.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Do two segments cross
Whether two edges intersect, including touching and collinear overlap.
Polygon triangulation (ear clipping) usd/earcut.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Is the middle of a diagonal inside the polygon
Whether a diagonal between two corners runs through the inside of the polygon.
midpoint = ((a.x + b.x) ÷ 2, (a.y + b.y) ÷ 2); even-odd count of edges crossed by a ray
Polygon triangulation (ear clipping) usd/earcut.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Mesh handed to the solid kernel
Welds the mesh's corners and passes it to manifold-3d.
weld grid = 10⁻⁶ × max(Δx, Δy, Δz); positions → Float32Array
IFC openings, clippings and half-space cuts ifc/geo-bool.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Boolean of two solids
The difference, union or intersection of two element meshes.
c = center of a's box; R = (a − c) OP (b − c); result = R + c
IFC openings, clippings and half-space cuts ifc/geo-bool.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Element minus all its openings
Subtracts every opening from an element, one after another.
A₀ = base − c; Aᵢ = Aᵢ₋₁ − (cutterᵢ − c); result = Aₙ + c
IFC openings, clippings and half-space cuts ifc/geo-bool.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Face planes of a convex cutter
Finds the outward planes of a cutter and decides whether it is convex.
n = (b − a) × (c − a) ÷ |…|; d = n · a; convex when n · p − d ≤ 10 ε for every corner p
IFC openings, clippings and half-space cuts ifc/geo-bool.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Polygon split by a plane
Cuts a convex polygon into the part in front of a plane and the part behind it.
t = dₐ ÷ (dₐ − d_b); x = a + (b − a) t
IFC openings, clippings and half-space cuts ifc/geo-bool.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Mesh clipped by a plane
Keeps the part of a mesh on one side of a plane and closes the cut.
dᵢ = (pᵢ − p) · n; ε = 10⁻⁹ × (d_max − d_min); cut point = a + (b − a) dₐ ÷ (dₐ − d_b)
IFC openings, clippings and half-space cuts ifc/geo-bool.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Cap of a cut
Joins the cut segments into loops, sorts outer loops from holes and fills them.
key = round(x ÷ tol), round(y ÷ tol), round(z ÷ tol); area = ½ |Σ (xᵢ yᵢ₊₁ − xᵢ₊₁ yᵢ)|
IFC openings, clippings and half-space cuts ifc/geo-bool.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Half-space cut
Removes the part of an element behind a plane, optionally only inside a polygon boundary.
L = 4 × max(1, box diagonal) + |P₀ − box min|; prism height = 2 L
IFC openings, clippings and half-space cuts ifc/geo-bool.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Vertex data of one geometry
Returns a geometry's positions and normals for drawing and for measuring.
IFC geometry handed to the apps ifc/api.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Placement matrix of each piece
The matrix that takes a geometry's vertices to model space in meters, Y up.
M = C × Y-up × scale(u) × placement
IFC geometry handed to the apps ifc/api.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Shift to the origin
Finds the translation that brings the model near the origin.
c = (box min + box max) ÷ 2 of the first element; C = translate(−(Y-up × scale(u) × placement × c))
IFC geometry handed to the apps ifc/api.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
File units to meters, Z up to Y up
Scales a placement by the file's length unit and turns its axes.
M′ = Y-up × scale(u) × M
IFC geometry handed to the apps ifc/api.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Length of a linear mark
The counted, deducted and gross length of a run in feet, along the slope where a segment is a rake or a hip.
segment ft = segment length × ftPerUnit; sloped = segment ft × slope factor; length = Σ counted sloped segments; gross = length + deducted
Takeoff quantities from marks model.js64-bit- TakeoffCraft
-
Area and perimeter of an area mark
The net area of an outline minus its cut-outs in square feet, on the slope when the mark or its item has a pitch, and its perimeter in feet.
area = net × ftPerUnit × ftPerUnit × √(1 + (pitch ÷ 12)²); perimeter = perimeter × ftPerUnit
Takeoff quantities from marks model.js64-bit- TakeoffCraft
-
Totals per item and per sheet
Each item's total length, area, perimeter and count, and the same per sheet, with back-outs taken out and typical groups counted as many times as they repeat.
item total = Σ marks (measure × repeat); area mark = max(0, area − back-out × slope factor)
Takeoff quantities from marks model.js64-bit- TakeoffCraft
-
Back-out area taken from an area mark
How many square feet the back-out marks on the same sheet cover of one area mark.
cut = (Σ overlap areas in sheet units) × ftPerUnit × ftPerUnit
Takeoff quantities from marks model.js64-bit- TakeoffCraft
-
Totals in the item's unit
An item's length, area, perimeter, height and count in the unit the item reports in, as the values assembly formulas use.
L = feet × 0.3048 for a metric item; A = square feet × the unit's factor; wall area = length × height
Takeoff quantities from marks model.js64-bit- TakeoffCraft
-
Quantity of a second condition
The quantity of an item's second kind of mark in that condition's own unit.
Takeoff quantities from marks model.js64-bit- TakeoffCraft
-
One priced row
A row's quantity with waste and its material, labor and total amounts in cents.
qtyW = qty × (1 + waste ÷ 10000); amount = round(qtyW × rate ÷ 100) cents; total = material + labor
Priced estimate model.js64-bit- TakeoffCraft
-
Crew hours and labor
The crew hours, worker hours, crew days and labor amount for a quantity, and the labor rate per unit it comes to.
hours = qtyW ÷ production; worker hours = hours × size; days = hours ÷ 8; labor = round(worker hours × wage ÷ 100) cents; rate = round(size × wage ÷ production)
Priced estimate model.js64-bit- TakeoffCraft
-
Estimate rows and totals
A row for every item, second condition and assembly part, and the material, labor, hours and grand totals.
material total = Σ row material; labor total = Σ row labor; total = material + labor; days = hours ÷ 8
Priced estimate model.js64-bit- TakeoffCraft
-
Estimate of each bid area
A separate estimate for each bid area, from that area's own marks.
Priced estimate model.js64-bit- TakeoffCraft
-
Alternates
What taking each alternate adds to or takes from the base bid.
amount = + Σ row totals for an add; − Σ row totals for a deduct
Priced estimate model.js64-bit- TakeoffCraft
-
Rounding of exported quantities and amounts
How a quantity, an amount in cents and a rate become the numbers written to a file.
quantity → 4 decimals; dollars = cents ÷ 100 → 2 decimals; rate = rate ÷ 10000
Estimate and quantity exports (CSV and XLSX) export.js64-bit- TakeoffCraft
-
Estimate as CSV
The estimate's rows, totals, alternates and bid summary as values in a CSV file.
Estimate and quantity exports (CSV and XLSX) export.js64-bit- TakeoffCraft
-
Per-sheet quantities as CSV
Each item's quantity on each sheet as a CSV row.
Estimate and quantity exports (CSV and XLSX) export.js64-bit- TakeoffCraft
-
Material list
Every part and priced item added up by name and unit across the takeoff.
per name and unit: qty = Σ row qty; qty with waste = Σ row qtyW; material = Σ row cents
Estimate and quantity exports (CSV and XLSX) export.js64-bit- TakeoffCraft
-
Estimate by division
Material, labor and total per division, from the first two digits of each item's CSI number.
Estimate and quantity exports (CSV and XLSX) export.js64-bit- TakeoffCraft
-
Spot elevation point file
The count marks of one sheet that carry an elevation, as northing, easting and elevation in feet.
northing = y × ftPerUnit; easting = x × ftPerUnit; elevation = z
Estimate and quantity exports (CSV and XLSX) export.js64-bit- TakeoffCraft
-
Estimate worksheet row
One priced row of the Estimate sheet: values, live formulas and the cached results.
F = D × (1 + E); I = ROUND(F × G, 2); J = ROUND(F × H, 2); K = I + J
Estimate and quantity exports (CSV and XLSX) export.js64-bit- TakeoffCraft
-
Per-mark quantities on the Marks sheet
Each mark's own length or area in its unit, with its segments, cut-outs and perimeter as text.
length = feet × 0.3048 for a metric unit; area = square feet × the unit's factor
Estimate and quantity exports (CSV and XLSX) export.js64-bit- TakeoffCraft
-
Markup rows under the estimate total
Labor burden, tax, overhead, profit and bond as live rows: base, percent and amount.
amount = ROUND(base × percent, 2); percent = basis points ÷ 10000
Estimate and quantity exports (CSV and XLSX) export.js64-bit- TakeoffCraft
-
By bid area worksheet
Each bid area's rows, a subtotal per area and the sum of the subtotals.
Estimate and quantity exports (CSV and XLSX) export.js64-bit- TakeoffCraft
-
Alternates worksheet
The base bid, each alternate's rows and amount, and the base bid with every add taken.
base with adds = base total + Σ add amounts
Estimate and quantity exports (CSV and XLSX) export.js64-bit- TakeoffCraft
-
Our cost of each item
The sum of an item's estimate rows: the item, its second conditions and its assembly parts.
cost = Σ row totals
Bid packages and leveling level.js64-bit- TakeoffCraft
-
Package scope and cost
The items of each CSI division with their quantity, unit and cost, and the package's cost.
package cost = Σ item costs
Bid packages and leveling level.js64-bit- TakeoffCraft
-
Leveled bids and the low bid
Each bid with plugs for what it leaves out, its difference from our cost, and which bid is low.
leveled = bid + Σ plugs; difference = leveled − our cost; low = smallest leveled
Bid packages and leveling level.js64-bit- TakeoffCraft
-
Package scope file
The scope sent to a subcontractor: item, CSI number, quantity, unit and sheets, without prices.
quantity = round(q × 10000) ÷ 10000
Bid packages and leveling level.js64-bit- TakeoffCraft
-
Base bid with the chosen bids
The estimate with each awarded package priced at its chosen bid instead of our own rates.
total = material + labor + Σ chosen bids
Bid packages and leveling level.js64-bit- TakeoffCraft
-
Paper length of a notation in inches
Reads a fraction, a mixed number or a decimal as inches.
1-1/2 → 1 + 1 ÷ 2; 1/4 → 1 ÷ 4
Sheet scale read from the sheet's text scaletext.js64-bit- TakeoffCraft
-
Ratio of a notation and its listed scale
Every scale notation in the text, each matched to a listed scale.
ratio = (feet × 12 + inches) ÷ paper inches, rounded to 3 decimals
Sheet scale read from the sheet's text scaletext.js64-bit- TakeoffCraft
-
Which scale a sheet gets
The most frequent scale on the sheet, and the other scales found.
Sheet scale read from the sheet's text scaletext.jsExact- TakeoffCraft
-
Stock figure from text
Reads a stock cell such as 1,200 or Out of stock as a number, or as in stock or not.
Supplier stock and lead-time check lib-supply/supply.js64-bit- TakeoffCraft
- DetailCraft
-
Lead time in days
Reads a lead time such as 2-3 weeks or 5 business days as a number of days.
weeks × 7; months × 30; business days → ⌈n × 7 ÷ 5⌉; result rounded to 0.1 day
Supplier stock and lead-time check lib-supply/supply.js64-bit- TakeoffCraft
- DetailCraft
-
Price from text
Reads a price cell as a whole number of 1/10000 dollar.
price = round(n × 10000)
Supplier stock and lead-time check lib-supply/supply.js64-bit- TakeoffCraft
- DetailCraft
-
A need in the supplier's unit
The needed quantity in the unit the supplier's row uses.
tonnes = kilograms ÷ 1000
Supplier stock and lead-time check lib-supply/supply.js64-bit- TakeoffCraft
- 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.