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
-
Cut-out inside its area
Checks that a cut-out lies fully inside the outline and does not overlap another cut-out.
Outline checks: inside, crossing, cut-outs geom.js64-bit- TakeoffCraft
-
Convex outline test
Whether a closed outline has no inward corner.
Back-outs clipped out of areas geom.js64-bit- TakeoffCraft
-
Polygon clipped to a convex polygon
The part of a polygon that lies inside a convex polygon.
t = d₁ ÷ (d₁ − d₂); corner = p + (q − p)·t
Back-outs clipped out of areas geom.js64-bit- TakeoffCraft
-
Area a back-out covers
How much of an area mark (outline minus cut-outs) a convex back-out covers, in square PDF units.
overlap = max(0, A(outline ∩ b) − Σ A(cut-out ∩ b))
Back-outs clipped out of areas geom.js64-bit- TakeoffCraft
-
Net area shown for a mark
The area in a mark's properties after its back-outs are taken off.
net = max(0, area − cut); plan area = max(0, plan − cut ÷ factor)
Back-outs clipped out of areas takeoffcraft.js64-bit- TakeoffCraft
-
Typed length to feet
Normalizes what was typed and reads it as one length, or as arithmetic over lengths.
Typed lengths and item units units.js64-bit- TakeoffCraft
-
One length with a metric unit, or feet and inches
Reads one normalized length into feet.
ft = meters ÷ 0.3048
Typed lengths and item units units.jsExact- TakeoffCraft
-
Numbers and fractions in a typed length
Splits the text into numbers, fractions and foot or inch marks.
fraction = a ÷ b (integers)
Typed lengths and item units units.jsExact- TakeoffCraft
-
Feet and inches combined
Combines a feet part and an inches part (whole number plus fraction) into feet.
ft = feet + (inches + fraction) ÷ 12
Typed lengths and item units units.jsExact- TakeoffCraft
-
Bare number in the default unit to feet
Converts a number in feet, inches, meters, centimeters or millimeters to feet.
ft = v ÷ 12; ft = v ÷ 0.3048; ft = v ÷ 1000 ÷ 0.3048
Typed lengths and item units units.jsExact- TakeoffCraft
-
Item unit factors
The factor from feet or square feet to each unit an item can be reported in.
Typed lengths and item units units.jsExact- TakeoffCraft
-
Feet and square feet into an item's unit
Converts a length in feet or an area in square feet to the unit that goes with an item.
m = ft × 0.3048; area = sf × perSqFt
Typed lengths and item units units.jsExact- TakeoffCraft
-
Round half away from zero
Rounds a number to a given count of decimals.
r = ⌊|v|·10ᵈ + 0.5 + 1e-9·max(1, |v|·10ᵈ)⌋ ÷ 10ᵈ
Rounding for display and for money units.js64-bit- TakeoffCraft
-
Grouped fixed-point text
Writes a number with a fixed count of decimals and thousands separators.
Rounding for display and for money units.js64-bit- TakeoffCraft
-
Feet and inches to the nearest fraction
Writes a length in feet as feet, inches and a fraction of an inch.
n = round(|ft|·12·denom + 1e-9); feet = ⌊n ÷ (12·denom)⌋; inches = ⌊rem ÷ denom⌋
Rounding for display and for money units.js64-bit- TakeoffCraft
-
Length in a chosen display unit
Writes a length in feet-inches, decimal feet, inches, meters or millimeters.
m = ft × 0.3048; mm = ft × 0.3048 × 1000
Rounding for display and for money units.js64-bit- TakeoffCraft
-
Feet per sheet unit for a named scale
The scale number for a preset such as 1/4 inch = 1 foot or 1:100.
ftPerUnit = (userUnit ÷ 72) × ratio ÷ 12
Sheet scale: presets, calibration and drawing units units.jsExact- TakeoffCraft
-
Scale from two points and a typed distance
The scale that makes the distance between two picked points equal a typed real distance.
ftPerUnit = realFt ÷ |b − a|
Sheet scale: presets, calibration and drawing units units.js64-bit- TakeoffCraft
-
Named scale a number matches
Finds the preset scale closest to a scale number, if any is close enough.
err = |ftPerUnit − s| ÷ s ≤ 0.005
Sheet scale: presets, calibration and drawing units units.js64-bit- TakeoffCraft
-
Feet per drawing unit by INSUNITS code
The table that turns a drawing's unit code into feet per drawing unit.
code 6: 1 ÷ 0.3048; code 21 as written: 1200 ÷ 3937
Sheet scale: presets, calibration and drawing units cadcount.js64-bit- TakeoffCraft
-
The drawing's length unit
Reads the INSUNITS code and looks up feet per drawing unit.
Sheet scale: presets, calibration and drawing units cadcount.js64-bit- TakeoffCraft
-
Viewport transform, model to paper
The matrix that places model space on the paper through a layout's viewport.
k = h ÷ viewHeight; M = [k·c, k·s, −k·s, k·c, cx − k(c·vx − s·vy), cy − k(s·vx + c·vy)]
Sheet scale: presets, calibration and drawing units cadset.js64-bit- TakeoffCraft
-
Sheet size and the drawing-to-page transform
Puts a layout on a page in points, or fits model space to a page about 2000 units on its longest side.
layout: page = (paper − min) × ptU; model: k = 2000 ÷ extent, page = k·x + (24 − k·minX)
Sheet scale: presets, calibration and drawing units cadset.js64-bit- TakeoffCraft
-
Scale a drawing's sheet starts with
Feet per page unit for a model sheet or a layout.
model: f = ft ÷ k; layout: f = (1 ÷ ptU) ÷ s × ft, s = h ÷ viewHeight
Sheet scale: presets, calibration and drawing units cadset.js64-bit- TakeoffCraft
-
Drawing scale taken over by the takeoff
Gives each sheet of an opened drawing the scale the drawing itself states, when the sheet has none yet.
Sheet scale: presets, calibration and drawing units takeoffcraft.js64-bit- TakeoffCraft
-
Calibration stored on the sheet
Reads the typed distance, computes the scale and stores it with the two points and the text.
Sheet scale: presets, calibration and drawing units takeoffcraft.js64-bit- TakeoffCraft
-
Typed unit rate
Reads a rate such as $1,234.5 into whole 1 ÷ 10000 dollars.
rate4 = round(roundTo(v, 4) × 10000)
Rates, percentages and extended amounts units.jsExact- TakeoffCraft
-
Typed percentage
Reads a percentage such as 7.5 % into whole basis points.
bp = round(roundTo(v, 2) × 100)
Rates, percentages and extended amounts units.jsExact- TakeoffCraft
-
Quantity × rate to the cent
The extended amount of a line in whole cents.
cents = round(qty × rate4 ÷ 100)
Rates, percentages and extended amounts units.js64-bit- TakeoffCraft
-
Quantity with waste
A quantity increased by a waste percentage.
qtyW = qty × (1 + bp ÷ 10000)
Rates, percentages and extended amounts units.js64-bit- TakeoffCraft
-
Cents as dollars text
Writes whole cents as $1,234.56.
Rates, percentages and extended amounts units.jsExact- TakeoffCraft
-
Typed bid amount to cents
Reads an amount typed into the bid leveling sheet as whole cents.
cents = round(rate4 ÷ 100)
Rates, percentages and extended amounts takeoffcraft.jsExact- TakeoffCraft
-
Typed pitch to rise per 12
Reads 6:12, 6/12, 4:10, a bare rise, or an angle in degrees.
rise = tan(a·π ÷ 180) × 12; rise = rise ÷ run × 12
Roof pitch and slope factors units.js64-bit- TakeoffCraft
-
Slope factor of a roof plane
Surface length or area per unit of plan length or area.
f = √(1 + (rise ÷ 12)²)
Roof pitch and slope factors units.js64-bit- TakeoffCraft
-
Hip and valley factor
True length of a hip or valley per unit of its plan length.
f = √(1 + (rise ÷ 12)² ÷ 2)
Roof pitch and slope factors units.js64-bit- TakeoffCraft
-
Pitch as text
Writes the rise as 6:12 or 6.5:12.
Roof pitch and slope factors units.js64-bit- TakeoffCraft
-
Signed coordinate length
Reads one typed coordinate, which may be negative or zero, into feet.
Typed distances and coordinates while drawing typein.js64-bit- TakeoffCraft
-
Sheet direction of a screen direction
The unit vector on the sheet that points along a given direction on the screen.
u = M⁻¹·(sx, −sy); u ÷ |u|
Typed distances and coordinates while drawing typein.js64-bit- TakeoffCraft
-
Point from typed text
Works out the next point from a distance, a distance and angle, or coordinates.
p = last + dir × ft × k, k = 1 ÷ ftPerUnit
Typed distances and coordinates while drawing typein.js64-bit- TakeoffCraft
-
Circle radius typed while drawing
Places a circle's edge point at a typed radius from its center, toward the pointer.
edge = c + (to − c) ÷ |to − c| × ft ÷ ftPerUnit
Typed distances and coordinates while drawing takeoffcraft.js64-bit- TakeoffCraft
-
Typed spot elevation
Reads the elevation typed on a count mark, in decimal feet, feet-inches or meters.
Typed distances and coordinates while drawing takeoffcraft.js64-bit- TakeoffCraft
-
One CAD object as points and bulges
The run or outline that stands for a line, arc, circle, polyline, ellipse, spline or 2D solid.
arc: p = c + r·(cos a, sin a), b = tan(sweep ÷ 4); ellipse: n = max(24, ⌈1440·sweep ÷ 2π⌉) chords
Lengths and areas taken from CAD objects cadgeom.js64-bit- TakeoffCraft
-
Hatch as outlines with holes
The outer loops of a hatch, each with the loops inside it as cut-outs.
Lengths and areas taken from CAD objects cadgeom.js64-bit- TakeoffCraft
-
Object placed on the sheet
Applies the sheet or viewport matrix to an object's points and decides whether a viewport shows it.
p′ = T·(mirror·x, y); b′ = b × sign(det T × mirror)
Lengths and areas taken from CAD objects cadgeom.js64-bit- TakeoffCraft
-
Marks made from picked objects
The point lists a linear or an area item takes from the picked objects.
Lengths and areas taken from CAD objects cadgeom.js64-bit- TakeoffCraft
-
Length and area of what is picked
The total length or net area of the picked objects in page units.
len = Σ length; area = Σ (gross − cut-outs)
Lengths and areas taken from CAD objects cadgeom.js64-bit- TakeoffCraft
-
Picked objects in real units
The length or area of the picked CAD objects shown above the sheet.
SF = area × k²; ft = len × k
Lengths and areas taken from CAD objects takeoffcraft.js64-bit- TakeoffCraft
-
Product of two transforms
Combines two 2 × 3 affine matrices.
Counting blocks, shapes and texts in a CAD drawing cadcount.js64-bit- TakeoffCraft
-
Place of a block reference and its array cells
The point of each copy of a block reference, and the transform its contents get.
p = M·(insert + R(rot)·(c·dx, r·dy))
Counting blocks, shapes and texts in a CAD drawing cadcount.js64-bit- TakeoffCraft
-
Point that stands for a shape
The one point a shape is placed and counted by: a center, a middle, or the middle of its box.
Counting blocks, shapes and texts in a CAD drawing cadcount.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.