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.

  • 6,917 calculations in 1,248 source files
  • 143 exact
  • 6,286 in 64-bit
  • 335 with a 32-bit step
  • Last reviewed

Calculations

  • Steel section as a library item

    The section view or side elevation of a steel section, with its size and weight parameters.

    kg/m = published mass, else area × 10⁻⁶ × 7850; weight = kg/m × length ÷ 1000

    Standard parts and library items shapes/items.js
    • CadCraft
    • PartCraft
    64-bit
  • Bolt drawing dimensions

    The head, shank, chamfer and thread lines of a bolt's side view.

    thread root diameter = D − 1.22687 × pitch; chamfer = min(pitch, D ÷ 4)

    Standard parts and library items shapes/items.js
    • CadCraft
    • PartCraft
    64-bit
  • Standard part as a library item

    The drawing, size parameters and weight of a standard part as a library item.

    Standard parts and library items shapes/items.js
    • CadCraft
    • PartCraft
    64-bit
  • Parameter levels

    The evenly spaced values of a parameter between its two bounds.

    vᵢ = from + (to − from) × i ÷ (steps − 1)

    Design study variants and ranking study/study.js
    • CadCraft
    • BimCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Rounding of parameter values

    Rounds a parameter value before it is put in a variant.

    v → v to 12 significant digits

    Design study variants and ranking study/study.js
    • CadCraft
    • BimCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Variant list

    Every combination of parameter levels, or a seeded random sample between the bounds.

    random: v = from + (to − from) × u, u = 32-bit integer ÷ 2³²

    Design study variants and ranking study/study.js
    • CadCraft
    • BimCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Meeting the limits

    Whether a variant's results meet every limit of the study.

    min goal: value ≤ limit; max goal: value ≥ limit

    Design study variants and ranking study/study.js
    • CadCraft
    • BimCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Trade-off front

    The variants that no other variant beats on every goal at once.

    a dominates b when a is no worse on every goal and better on at least one

    Design study variants and ranking study/study.js
    • CadCraft
    • BimCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Weighted ranking

    A score for each feasible variant from its goals and the weights a person gives.

    x = (value − lo) ÷ (hi − lo); score = Σ w × (x for max goals, 1 − x for min goals)

    Design study variants and ranking study/study.js
    • CadCraft
    • BimCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Matrix product

    Combines two transforms into one.

    o[c][r] = Σₖ a[k][r] × b[c][k]

    USD transforms and placement usd/geom.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Matrix inverse

    The transform that undoes another.

    inverse = cofactor matrix ÷ determinant

    USD transforms and placement usd/geom.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Transforming a point

    Applies a transform to a point.

    p′ = (M × [x, y, z, 1]) ÷ w

    USD transforms and placement usd/geom.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Rotation about an axis

    The matrix of a rotation by an angle in degrees about X, Y or Z.

    a = deg × π ÷ 180; entries cos a, ± sin a

    USD transforms and placement usd/geom.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Quaternion to rotation matrix

    The rotation matrix of an orientation stored as a quaternion.

    q ÷ |q|; R₀₀ = 1 − 2(y² + z²), R₀₁ = 2(xy + wz), …

    USD transforms and placement usd/geom.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Value at a time

    An animated value at a given time, between its stored samples.

    v = a + (b − a) × (t − t₀) ÷ (t₁ − t₀)

    USD transforms and placement usd/geom.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • An object's own transform

    Builds the transform of one object from its list of translate, rotate, scale and matrix operations.

    M = op₁ × op₂ × … in the listed order; an inverted operation uses its inverse

    USD transforms and placement usd/geom.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • World transform

    The transform of an object in the scene, through all its parents.

    W = M_root × … × M_parent × M_own

    USD transforms and placement usd/geom.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Scene units and up axis

    The transform from the scene's own units and up axis to meters with Z up.

    scale by metersPerUnit; Y-up scenes: rotate 90° about X

    USD transforms and placement usd/geom.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Placement of instanced copies

    The transform of each copy of a point instancer from its position, orientation and scale.

    M = translate(p) × rotate(q) × scale(s)

    USD transforms and placement usd/scene.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Writing an object's transform

    Stores an object's placement in the exported scene.

    USD transforms and placement usd/build.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Angle to (−π, π]

    Brings a direction difference into one turn, so a deflection is read the short way round.

    Alignment lines and circular curves alignment.js
    • CivilCraft
    64-bit
  • Deflection, tangent lengths and curve center at a PI

    The deflection angle at each PI, the tangent length of a plain curve, and for a curve with transitions the center and the two tangent lengths.

    Δ = a₂ − a₁; T = R·tan(Δ/2); center from n₁·c = R + p₁, n₂·c = R + p₂; T₁ = k₁ − u₁·c, T₂ = u₂·c + k₂

    Alignment lines and circular curves alignment.js
    • CivilCraft
    64-bit
  • Circular curve and its facts

    The arc's center, start angle, length, external, middle ordinate and chord, and the PC and PT stations.

    L = R·Δ; E = R·(1 ÷ cos(Δ/2) − 1); M = R·(1 − cos(Δ/2)); chord = 2R·sin(Δ/2)

    Alignment lines and circular curves alignment.js
    • CivilCraft
    64-bit
  • Transition, curve, transition at one PI

    The circular arc left between two transitions and the stations TS, SC, CS and ST.

    Δc = |Δ| − θ₁ − θ₂; Lc = R·Δc

    Alignment lines and circular curves alignment.js
    • CivilCraft
    64-bit
  • Point and direction at a station

    The coordinates and forward direction on the alignment at a station.

    line: p₀ + s·(cos dir, sin dir); arc: c + R·(cos a, sin a), a = a₀ ± s ÷ R

    Alignment lines and circular curves alignment.js
    • CivilCraft
    64-bit
  • Station and offset of a point

    The nearest station on the alignment to a point, and how far left or right of it the point lies.

    line: s = (p − p₀)·u clamped to the element; arc: s = R × swept angle; offset = (p − foot) × direction

    Alignment lines and circular curves alignment.js
    • CivilCraft
    64-bit
  • Station ticks

    The points at every whole multiple of the station interval.

    station = k × step, k whole

    Alignment lines and circular curves alignment.js
    • CivilCraft
    64-bit
  • Systems the coordinates fit

    The catalog systems in which a project point falls inside the system's area of use.

    Coordinate system helpers crs-pick.js
    • CivilCraft
    64-bit
  • Latitude and longitude as degrees, minutes, seconds

    The status bar text for a latitude or longitude.

    seconds = round(|v| × 360000) ÷ 100, then split into D, M, S

    Coordinate system helpers crs-pick.js
    • CivilCraft
    64-bit
  • Latitude and longitude as decimal degrees

    The status bar text in decimal degrees.

    Coordinate system helpers crs-pick.js
    • CivilCraft
    64-bit
  • Typed latitude or longitude

    A typed angle, decimal or in degrees, minutes and seconds, with a sign or a hemisphere letter.

    value = ±(D + M ÷ 60 + S ÷ 3600)

    Coordinate system helpers crs-pick.js
    • CivilCraft
    64-bit
  • Local fit: project to grid

    Grid coordinates of a project point through a scale, rotation and shift.

    grid = to + scale · R(rotation) · (p − from)

    Coordinate system helpers crs-pick.js
    • CivilCraft
    64-bit
  • Misclosure of a third control point

    How far a two-point fit puts a third known point from its grid coordinates, as a distance and in parts per million.

    ppm = distance ÷ span × 10⁶

    Coordinate system helpers crs-pick.js
    • CivilCraft
    64-bit
  • Converting a project's coordinates

    Every stored x and y of the project (points, breaklines, boundary, alignment PIs, pads, structures) passed through a conversion.

    Coordinate system helpers crs-pick.js
    • CivilCraft
    64-bit
  • Arc from two points and a bulge

    The center, radius, start angle, sweep and length of the arc between two vertices.

    k = (1 − b²) ÷ (4b); center = chord middle + k·(−Δy, Δx); r = c·(1 + b²) ÷ (4|b|); sweep = 4·atan(b); L = r·|sweep|

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • Bulge of an arc through three points

    The bulge of the arc drawn from a start, through a middle point, to an end.

    sweep = 2·(π − angle at the middle point); bulge = sign × tan(sweep ÷ 4)

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • Bulge for a typed radius

    The bulge of the shorter arc of a given radius between two vertices.

    Δ = 2·asin(c ÷ 2r); bulge = ±tan(Δ ÷ 4)

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • Point and direction along a segment

    The plan point and travel direction at a fraction of a straight or arc segment.

    arc: p = c + r·(cos θ, sin θ), θ = a₀ + sweep × u

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • Segment lengths and grades

    Each segment's plan length, chord, 3D length, rise and grade.

    length = chord or r·|sweep|; 3D length = √(L² + Δz²); grade = Δz ÷ L

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • Stations along a feature line

    The plan distance from the start to each vertex.

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • Elevation from a grade

    The far vertex of a segment moved to the elevation a typed grade gives.

    z₂ = z₁ + grade × length

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • One grade between two vertices

    The vertices between two chosen ones placed on a single grade.

    z = z₀ + (z₁ − z₀) × (s − s₀) ÷ L

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • Stepped offset

    A copy of the line moved sideways with mitred corners and raised by a height or a cross slope.

    corner shift = bisector × d ÷ cos(half angle); z + Δz, or z + |d| × slope

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • Straight segment against an alignment element

    Where a straight feature line segment crosses a line or arc of the alignment, with the station.

    line: 2×2 solve by cross products; arc: A·t² + B·t + C = 0, t = (−B ± √(B² − 4AC)) ÷ 2A

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • Arc segment against an alignment element

    Where an arc of a feature line crosses a line or arc of the alignment.

    two circles: along = (r₁² − r₂² + d²) ÷ 2d; h = √(r₁² − along²)

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • Feature line read from a file

    The vertices kept when a feature line is read from a project file or a drawing.

    Feature line grades, arcs, offsets and crossings featureline.js
    • CivilCraft
    64-bit
  • Elevations of a newly drawn line

    The elevation each vertex of a new feature line gets.

    Feature line grades, arcs, offsets and crossings features-ui.js
    • CivilCraft
    64-bit
  • Elevation and grade boxes

    A typed vertex elevation or segment grade applied to the line.

    grade = typed percent ÷ 100

    Feature line grades, arcs, offsets and crossings features-ui.js
    • CivilCraft
    64-bit
  • Offset distance and amount

    The typed offset distance and height or slope passed to the stepped offset.

    slope = typed percent ÷ 100

    Feature line grades, arcs, offsets and crossings features-ui.js
    • CivilCraft
    64-bit
  • Layers made end to end

    The depth limits of a boring's layers after gaps and overlaps are removed.

    Boring logs and the soil profile between borings geotech.js
    • CivilCraft
    64-bit

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.