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
-
Convert between two units
A value in one unit as a value in another unit of the same kind.
result = v × (n₁ × d₂) ÷ (d₁ × n₂)
Unit conversion unit-table.js Every appExact -
Typed text to a unit
What was typed, with its unit, as a value in the unit the field wants.
3 yd typed into a feet field = convert(3, yd, ft) = 9
Unit conversion unit-table.js Every appExact -
A value to the base unit
A number in any unit as meters, square meters, cubic meters, radians or rise over run.
base = v × n ÷ d (v × π × n ÷ d for degrees and gons)
Unit conversion unit-table.js Every app64-bit -
A base value to a unit
A stored base value as a number in the unit shown.
value = base × d ÷ n (base ÷ π × d ÷ n for degrees and gons)
Unit conversion unit-table.js Every app64-bit -
Member stiffness matrix
The 12 by 12 stiffness of one beam-column in its own axes.
EA ÷ L, GJ ÷ L, 12EI ÷ L³, 6EI ÷ L², 4EI ÷ L, 2EI ÷ L
3D frame analysis frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Equivalent nodal loads
A load along a member as forces and moments at its two ends.
p = ∫ N(ξ) · w(ξ) dx, by 4-point Gauss-Legendre quadrature
3D frame analysis frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Banded Cholesky factorisation
Factorises the stiffness matrix once, for every load set.
K = L · Lᵀ; pivot s = k_jj − Σ l²; mechanism when s ≤ 1e-11 × k_jj
3D frame analysis frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Forward and back substitution
Displacements for one load set from the factorised matrix.
L · y = f, then Lᵀ · u = y
3D frame analysis frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Add, subtract, multiply, divide
The four operations on values that carry units.
a + b and a − b need the same dimensions; a × b and a ÷ b combine them
Calc sheets calc.js Every app64-bit -
Comparisons
Pass or fail checks such as M <= 40 kN m.
a ≤ b is true when a ≤ b + 1e-12 × max(1, |a|, |b|)
Calc sheets calc.js Every app64-bit -
Number shown
A result as text in the sheet.
6 significant digits; exponent form from 1e9 up and below 1e-4
Calc sheets calc.js Every app64-bit -
Line and line
The point where two lines cross.
t = ((b₁ − a₁) × d₂) ÷ (d₁ × d₂); parallel when |d₁ × d₂| < 1e-12 × |d₁| × |d₂|
Line, arc and circle intersections geom.js64-bit- CadCraft
-
Line and circle
The points where a line meets a circle or arc.
A·t² + B·t + C = 0; t = (−B ± √(B² − 4AC)) ÷ 2A
Line, arc and circle intersections geom.js64-bit- CadCraft
-
Circle and circle
The points where two circles or arcs meet.
x = (d² + r₁² − r₂²) ÷ 2d; h = √(r₁² − x²)
Line, arc and circle intersections geom.js64-bit- CadCraft
-
Is the point on the object
Whether a computed crossing lies on the drawn part of each object.
−tol ≤ t·L ≤ L + tol, with tol = 1e-7; arcs: the angle within 1e-7 of the sweep
Line, arc and circle intersections geom.js64-bit- CadCraft
-
Rounding of spoken numbers and angles
Turns a number or an angle into the short text that is spoken.
num(v) = round(v × 100) ÷ 100; deg(θ) = num(round(normAngle(θ) × (180 ÷ π) × 100) ÷ 100)
Spoken lengths, directions and extents access.js64-bit- CadCraft
-
Direction as one of eight words
Which of the eight directions (right, up-right, up and so on) leads from one point to another.
index = round(atan2(Δy, Δx) ÷ (π ÷ 4)) mod 8
Spoken lengths, directions and extents access.js64-bit- CadCraft
-
A move in words
The distance, angle and the two components of a move from one point to another.
d = √(Δx² + Δy²); angle = atan2(Δy, Δx)
Spoken lengths, directions and extents access.js64-bit- CadCraft
-
Length along an object
The length of a line, circle, arc or polyline that is read out with the object.
line: √(Δx² + Δy²); circle: 2πr; arc: r × ((a₁ − a₀) mod 2π); polyline: Σ |pᵢ₊₁ − pᵢ|
Spoken lengths, directions and extents access.js64-bit- CadCraft
-
Extents of the visible objects
The width, height and corners of the box round everything visible, said with the object counts.
w = maxX − minX; h = maxY − minY
Spoken lengths, directions and extents access.js64-bit- CadCraft
-
Objects within a radius
The objects within a given distance of a point, nearest first.
Spoken lengths, directions and extents access.js64-bit- CadCraft
-
Distance and side of each nearby object
For each object near the cursor: whether the cursor is on it, or how far away it is and on which side.
Spoken lengths, directions and extents access.js64-bit- CadCraft
-
Measure between two points
The length, angle, Δx and Δy said back after a command takes a point.
d = √(Δx² + Δy²); angle = atan2(Δy, Δx)
Spoken lengths, directions and extents access.js64-bit- CadCraft
-
Snap points near the cursor
The snap points within a radius of a point, nearest first, for stepping from one to the next with a key.
d = √((sx − px)² + (sy − py)²)
Spoken lengths, directions and extents access.js64-bit- CadCraft
-
Transform from point pairs
The move, turn, scale and mirror that carry one to three source points onto their destination points.
turn = atan2(d₂ − d₁) − atan2(s₂ − s₁); k = |d₁d₂| ÷ |s₁s₂|; M = T(d₁) · R(turn) · S(k) · T(−s₁)
Align and distribute align.js64-bit- CadCraft
-
Bounding boxes in the coordinate system in force
Each selected object's bounding box, measured along the axes of the user coordinate system when one is set.
with a UCS: box of R(−angle) · T(−origin) applied to the object
Align and distribute align.js64-bit- CadCraft
-
Edge or middle of a box
The left, center, right, top, middle or bottom coordinate of a bounding box.
center = (minX + maxX) ÷ 2; middle = (minY + maxY) ÷ 2
Align and distribute align.js64-bit- CadCraft
-
Moves that line objects up
For each object, the vector that brings its chosen edge or middle onto the reference.
d = ref − edge(box)
Align and distribute align.js64-bit- CadCraft
-
Moves that space objects evenly
For each object between the first and the last, the vector that makes the middles or the gaps equal.
centers: step = (mid_last − mid_first) ÷ (n − 1); gaps: gap = (span − Σ sizes) ÷ (n − 1)
Align and distribute align.js64-bit- CadCraft
-
Degrees, minutes, seconds to decimal degrees
The decimal angle for text such as 45°23'30", 45d23'30" or, inside a bearing, 45-23-30.
deg = d + m ÷ 60 + s ÷ 3600
Bearings and degrees-minutes-seconds angles.js64-bit- CadCraft
-
Bearing or DMS text to an angle
The angle in degrees, counter-clockwise from east, for a typed bearing such as N45°23'30"E or a plain DMS angle.
N…E: 90 − off; N…W: 90 + off; S…E: 270 + off; S…W: 270 − off
Bearings and degrees-minutes-seconds angles.js64-bit- CadCraft
-
Decimal degrees to degrees, minutes and seconds
The degrees, minutes and seconds text for an angle at the chosen precision.
n = round(deg × unit + 10⁻⁹); d = ⌊n ÷ unit⌋; m = ⌊rest ÷ (unit ÷ 60)⌋; s = (rest − m × unit ÷ 60) ÷ 10^secDec
Bearings and degrees-minutes-seconds angles.js64-bit- CadCraft
-
Angle to a surveyor's bearing
Bearing text such as N45°23'30"E for an angle in degrees.
a = deg mod 360; offset = |90 − a| (north half) or |270 − a| (south half)
Bearings and degrees-minutes-seconds angles.js64-bit- CadCraft
-
Angle in the drawing's angle format
An angle written as decimal degrees, degrees-minutes-seconds, grads, radians or a bearing.
grads = a × 10 ÷ 9; radians = a × π ÷ 180
Bearings and degrees-minutes-seconds angles.js64-bit- CadCraft
-
Bearing of a vector
The bearing text for a direction given by its x and y components.
angle = atan2(dy, dx) × 180 ÷ π
Bearings and degrees-minutes-seconds angles.js64-bit- CadCraft
-
Size in millimeters
The width and height of the copied area, on paper or at the drawing's real size.
paper: mm = pixels × ptPerPx × (25.4 ÷ 72); real: mm = pixels × mmPerPx
Size of a copied area areaclip.js64-bit- CadCraft
- BimCraft
- MarkupCraft
- DetailCraft
-
Render size in pixels
The pixel width and height for an area given in points at a resolution, lowered so neither side passes the cap.
d = dpi × min(1, maxPx ÷ (longer side × dpi ÷ 72)); w = round(wPt × d ÷ 72); h = round(hPt × d ÷ 72)
Size of a copied area areaclip.js64-bit- CadCraft
- BimCraft
- MarkupCraft
- DetailCraft
-
Scale and turn from two points
The scale, the angle and the point mapping that carry two points on the picture onto the two points where they belong.
scale = |b₂ − b₁| ÷ |a₂ − a₁|; angle = atan2(b₂ − b₁) − atan2(a₂ − a₁); map(p) = b₁ + scale · R(angle) · (p − a₁)
Size of a copied area areaclip.js64-bit- CadCraft
- BimCraft
- MarkupCraft
- DetailCraft
-
Box round a turned picture
The width and height of the upright box round a picture turned by an angle.
w′ = w·|cos θ| + h·|sin θ|; h′ = w·|sin θ| + h·|cos θ|
Size of a copied area areaclip.js64-bit- CadCraft
- BimCraft
- MarkupCraft
- DetailCraft
-
Outline of an elliptical area
The points of the ellipse that fits a box, used as the outline of a round copied area.
pᵢ = (cx + rx·cos(2π·i ÷ n), cy + ry·sin(2π·i ÷ n)), n = 96
Size of a copied area areaclip.js64-bit- CadCraft
- BimCraft
- MarkupCraft
- DetailCraft
-
Unit factor and tolerance
The factor between drawing units and the file's units, and the tolerance the comparison uses.
factor = mm per unit ÷ 1000 (meters), ÷ 304.8 (feet), or 1; default tol = 10 ÷ mm per unit
As-built points compared with the drawing asbuilt.js64-bit- CadCraft
-
Comparison and conversion back to the drawing
Compares the two point lists in the file's units and brings as-built points back into drawing coordinates.
compare with tol × factor; drawn point = file point ÷ factor
As-built points compared with the drawing asbuilt.js64-bit- CadCraft
-
Marks and labels in the drawing
A point at each as-built shot, a line from the design point when it is out of tolerance, and a label with the distance.
label = (dh ÷ factor).toFixed(min(4, max(0, ⌈−log₁₀ tol⌉))); text height = max(1.5 × tol, 0.5 × current text height)
As-built points compared with the drawing asbuilt.js64-bit- CadCraft
-
Same object within a tolerance
Whether two objects are the same shape on the same layer, apart from their ids.
Drawing autocomplete autocomplete.js64-bit- CadCraft
-
Next copy of a repeat
The next copy when the last one to four objects were copied at one step twice or more.
step = anchor(B₀) − anchor(A₀); tol = max(10⁻⁶, 0.004 × |step|); next = last group moved by step
Drawing autocomplete autocomplete.js64-bit- CadCraft
-
Next period of a stair
The next riser and tread of an open polyline whose steps repeat.
dⱼ = pⱼ − pⱼ₋₁; repeats when |dⱼ − dⱼ₋ₚ| ≤ max(10⁻⁶, 0.004 × longest step); new vertex = last vertex + dⱼ
Drawing autocomplete autocomplete.js64-bit- CadCraft
-
Chain of segments through the newest line
The run of connected line and polyline segments that the newest line or polyline belongs to, as an ordered list of vertices.
Drawing autocomplete autocomplete.js64-bit- CadCraft
-
Do two segments cross
Whether the closing side would cross another side of the figure.
cross(o, a, b) = (a.x − o.x)(b.y − o.y) − (a.y − o.y)(b.x − o.x); cross when d₁·d₂ < 0 and d₃·d₄ < 0
Drawing autocomplete autocomplete.js64-bit- CadCraft
-
Closing sides of a nearly closed figure
The two missing sides of a rectangle drawn as two sides, or the closing side of a chain of three or more.
rectangle: p₄ = v₀ + (v₂ − v₁), offered when |u·w| ÷ (|u||w|) ≤ 0.01; chain: closing side v_last → v₀
Drawing autocomplete autocomplete.js64-bit- CadCraft
-
Next point of a running line
The point offered after the points picked so far in LINE or PLINE: the next stair step, a rectangle's fourth corner, the first point again, or one more equal step.
tol = max(10⁻⁶, 0.002 × longest step); square when |u·v| ≤ 0.002 × |u||v|; next = last point + a stored step
Drawing autocomplete autocomplete.js64-bit- CadCraft
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.