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
-
Minimum and maximum of a variable
The range shown for each variable in the Variables panel.
CraftScript values: storage, reading and number text cs-values.js64-bit- PartCraft
-
Numeric data as 64-bit
Gives builtins a Float64Array of any numeric value.
CraftScript values: storage, reading and number text cs-values.js64-bit- PartCraft
-
Vertex placement and unit scale
Moves every mesh vertex to where the file places it and converts it to the part's unit.
p′ = (M · p) ÷ w × s; s = meters per file unit × 1000
3DM mesh import: placement and units mesh3dm.js64-bit- PartCraft
-
Combined block placement
Multiplies the placement of a block by the placement of the block inside it.
(A · B)ᵢⱼ = Σₖ Aᵢₖ × Bₖⱼ
3DM mesh import: placement and units mesh3dm.js64-bit- PartCraft
-
Readout rounding and flux units
The text of each number in the results panel.
text = v to p significant digits (p = 4 by default); flux in mWb when |Φ| ≥ 10⁻³ Wb, else µWb
Magnetics add-on: readouts in the panel addons/magnetics/main.js64-bit- PartCraft
-
Air box size
The width and height of the air box shown under the setup.
margin = max(width, height) × pad; box = extent + 2 × margin
Magnetics add-on: readouts in the panel addons/magnetics/main.js64-bit- PartCraft
-
Quantity and mass per row
Counts the placed parts of each row and works out the mass of one and of all.
mass each g = V mm³ × ρ g/cm³ ÷ 1000; total = each × quantity
Manual parts list: quantities and mass illustrate/parts-list.js64-bit- PartCraft
-
Same shape test
Decides whether two parts with the same number or name are one row.
|V₁ − V₂| ≤ 10⁻⁶ × max(V₁, 1) and |A₁ − A₂| ≤ 10⁻⁶ × max(A₁, 1)
Manual parts list: quantities and mass illustrate/parts-list.js64-bit- PartCraft
-
Mass and volume text
The text of the mass and volume cells in the table and the CSV.
volume: 3 decimals; mass ≥ 1000 g: kg with 3 decimals; otherwise g with 2 decimals
Manual parts list: quantities and mass illustrate/parts-list.js64-bit- PartCraft
-
Unit sizes in meters
The length of a meter, a foot and a US survey foot used for elevations.
ft = 0.3048 m; US survey ft = 1200 ÷ 3937 m
GIS import: reprojection and elevation units gis-read.jsExact- CivilCraft
-
Features placed in the project
Reprojects every vertex of every layer and scales its elevation.
z′ = z × (source unit in m ÷ project unit in m)
GIS import: reprojection and elevation units gis-read.js64-bit- CivilCraft
-
Middle of the data in longitude and latitude
Finds where the imported data lies, to suggest a coordinate system near it.
c = (min + max) ÷ 2 of the bounding box
GIS import: reprojection and elevation units gis-read.js64-bit- CivilCraft
-
Survey points given as latitude and longitude
Converts point-file rows in degrees to project coordinates.
GIS import: reprojection and elevation units gis-read.js64-bit- CivilCraft
-
Grades and vertical curves
Builds the grades between PVIs and the curve at each interior PVI.
g = Δz ÷ Δsta; A = (g₂ − g₁) × 100; L = K × |A|; z_BVC = z_PVI − g₁ × L ÷ 2; x_high/low = −g₁ × L ÷ (g₂ − g₁)
Vertical profile: grades and parabolic curves profile.js64-bit- CivilCraft
-
Design elevation at a station
The profile's elevation at any station.
z = z_BVC + g₁ × x + (g₂ − g₁) × x² ÷ (2L), x = sta − BVC; on a tangent z = zᵢ + g × (sta − staᵢ)
Vertical profile: grades and parabolic curves profile.js64-bit- CivilCraft
-
Grade at a station
The profile's slope at any station.
g = g₁ + (g₂ − g₁) × (sta − BVC) ÷ L
Vertical profile: grades and parabolic curves profile.js64-bit- CivilCraft
-
Existing ground along the alignment
Samples the surface's elevation at regular stations and at the alignment's key stations.
step = length ÷ 1000, at least 0.5; stations: start, start + step, …, end, plus key stations
Vertical profile: grades and parabolic curves profile.js64-bit- CivilCraft
-
Default rate table
The rates by radius and the relative gradient a new corridor starts with.
Superelevation: runoff, runout and lane slopes superelev.js64-bit- CivilCraft
-
Rate for a radius
Looks up the superelevation rate of a curve.
Superelevation: runoff, runout and lane slopes superelev.js64-bit- CivilCraft
-
Runoff, runout and transition stations
The lengths and stations of the transition into and out of each curve.
L_r = lane × e ÷ Δ; L_t = (NC ÷ e) × L_r; without a spiral: level at TS − ⅔L_r, full at TS + ⅓L_r
Superelevation: runoff, runout and lane slopes superelev.js64-bit- CivilCraft
-
Outside lane slope through a transition
The cross slope of the outside lane at a station.
runout: NC − NC × (x − nc₀) ÷ L_t; runoff: −e × (x − lc₀) ÷ L_r; result = max(up, down, −e)
Superelevation: runoff, runout and lane slopes superelev.js64-bit- CivilCraft
-
Lane slopes at a station
The fall-away slope of the left and right lanes.
inside = max(NC, −outside)
Superelevation: runoff, runout and lane slopes superelev.js64-bit- CivilCraft
-
Line taken from the team
Turns shared geometry into feature line points in the drawing's unit.
k = 1 (same unit), 0.3048 (ft → m) or 1 ÷ 0.3048 (m → ft); p′ = p × k
Shared feature lines: units and geometry team-lines.js64-bit- CivilCraft
-
Line sent to the team
Turns a feature line into the points that are shared.
Shared feature lines: units and geometry team-lines.js64-bit- CivilCraft
-
One point into its cell
Decides whether an incoming point is kept, replaces the cell's point, or is dropped.
i = ⌊(x − oₓ) ÷ cell⌋; key = i × 2³² + (j + 2³¹); nearest: d² = (fₓ − i − ½)² + (f_y − j − ½)²
Thinning point clouds to a spacing thin.js64-bit- CivilCraft
-
The thinned points
Returns one point per occupied cell.
average mode: x̄ = Σx ÷ n, ȳ = Σy ÷ n, z̄ = Σz ÷ n
Thinning point clouds to a spacing thin.js64-bit- CivilCraft
-
Grid step for a spacing
How many grid nodes to skip so an elevation grid is thinned to about the spacing asked for.
n = max(1, round(spacing ÷ cell size))
Thinning point clouds to a spacing thin.js64-bit- CivilCraft
-
Estimate of points kept
Tells the import dialog about how many points a thinning will keep.
kept ≈ Σ min(points × f, cell area × f ÷ spacing² + 1), f = part of the coarse cell inside the area
Thinning point clouds to a spacing thin.js64-bit- CivilCraft
-
Scale of a pasted picture
Works out how big one pixel of the copied area is in the model.
mm per pixel = width in mm ÷ width in pixels
Reference picture size and position picture.js64-bit- DetailCraft
-
Picture size in millimeters
The width and height of the picture in the model.
w = pixelsₓ × mm per pixel; h = pixels_y × mm per pixel
Reference picture size and position picture.js64-bit- DetailCraft
-
Picture corners
The four corners of the picture's outline.
corner = middle ± size ÷ 2
Reference picture size and position picture.js64-bit- DetailCraft
-
Picture values read from a file
Checks a picture's numbers when a model is opened.
Reference picture size and position picture.js64-bit- 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
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.