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

  • Default thresholds

    The heights the filter uses when the caller gives none.

    h₀ = 0.3 × cell; h_max = 6 × cell; low noise = slope × cell × 3 + 3 × h₀

    Ground points from an unclassified point cloud ground-classify.js
    • CivilCraft
    64-bit
  • Lowest point per cell

    Sorts the points into grid cells and keeps the lowest of each.

    column = ⌊(x − minₓ) ÷ cell⌋; row = ⌊(y − min_y) ÷ cell⌋

    Ground points from an unclassified point cloud ground-classify.js
    • CivilCraft
    64-bit
  • Stray low points

    Drops single points that lie far below their neighbors.

    stray when median(neighbors) − z > low-noise limit

    Ground points from an unclassified point cloud ground-classify.js
    • CivilCraft
    64-bit
  • Opening with growing windows

    Marks cells that stand above the opened surface as objects, round by round.

    wₖ = 2ᵏ + 1; dhₖ = min(h_max, slope × (wₖ − wₖ₋₁) × cell + h₀); object when z − opened > dhₖ

    Ground points from an unclassified point cloud ground-classify.js
    • CivilCraft
    64-bit
  • Morphological opening

    The minimum, then the maximum, over a square window around each cell.

    Ground points from an unclassified point cloud ground-classify.js
    • CivilCraft
    64-bit
  • Coordinates read from a row

    Takes the northing, easting and elevation of one line of a point file.

    Survey point files: reading and writing points.js
    • CivilCraft
    64-bit
  • Points written as a PNEZD file

    Writes point number, northing, easting, elevation and description, comma separated.

    N, E and Z written with dec decimals (3 by default)

    Survey point files: reading and writing points.js
    • CivilCraft
    64-bit
  • Point count per group

    Counts the points of each description group.

    Survey point files: reading and writing points.js
    • CivilCraft
    Exact
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • Stand-in ground for a road with no survey

    The elevation and extent of the flat ground a corridor is drawn on when the project has no surface.

    z = mean of the PVI elevations, rounded to 0.01; margin = (60 m or 200 ft) + 6 × (z_max − z_min)

    Project: stand-in ground, volumes and saved points project.js
    • CivilCraft
    64-bit
  • Cut and fill inside the daylight lines

    The total cut and fill and the figures per graded item.

    Project: stand-in ground, volumes and saved points project.js
    • CivilCraft
    64-bit
  • Points in the project file

    Writes each survey point to the .civilcraft.json file.

    Project: stand-in ground, volumes and saved points project.js
    • CivilCraft
    64-bit
  • Default rate table

    The rates by radius and the relative gradient a new corridor starts with.

    Superelevation: runoff, runout and lane slopes superelev.js
    • CivilCraft
    64-bit
  • Rate for a radius

    Looks up the superelevation rate of a curve.

    Superelevation: runoff, runout and lane slopes superelev.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • Line sent to the team

    Turns a feature line into the points that are shared.

    Shared feature lines: units and geometry team-lines.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • Clear spacing a bar asks for

    The least clear distance between parallel bars for a bar size and aggregate.

    max(25.4, d_b, 4/3 × aggregate) mm; BS bars: max(d_b, aggregate + 5, 20) mm

    Rebar congestion map of a footing congestion.js
    • DetailCraft
    64-bit
  • Free gap at a point

    The length of the free stretch that contains a point, between the bars either side of it.

    gap = right − left; 0 inside a bar

    Rebar congestion map of a footing congestion.js
    • DetailCraft
    64-bit
  • Need and grid size

    Sets what the concrete needs and how fine the map is.

    cell = max(5, given, or max(10, ⌈max(L, B) ÷ 160 ÷ 5⌉ × 5)); columns = round(L ÷ cell)

    Rebar congestion map of a footing congestion.js
    • DetailCraft
    64-bit
  • Opening and ratio per cell, and the worst place

    Fills the map and finds the tightest opening and the number of cells that are too tight.

    opening = min of the gaps in each layer; ratio = need ÷ opening

    Rebar congestion map of a footing congestion.js
    • DetailCraft
    64-bit
  • Share of the open area that is too tight

    The fraction of free cells whose ratio is over 1.

    share = cells with ratio > 1 ÷ cells with opening > 0

    Rebar congestion map of a footing congestion.js
    • DetailCraft
    32-bit in part
  • The congestion problem

    The warning or error listed for a footing whose steel is too tight.

    Rebar congestion map of a footing congestion.js
    • DetailCraft
    32-bit in part
  • Conversion constants and two-decimal rounding

    The pound and inch factors and the helper that writes two decimals.

    lb = kg × 2.20462262185; in = mm ÷ 25.4; f2(v) = round(v × 100) ÷ 100

    KISS file: quantities, sizes and weights kiss.js
    • DetailCraft
    64-bit
  • Weight and plate area fields

    The weight and area written on a line, in metric or imperial units.

    weight = kg, or kg × 2.20462262185 lb; area = m², or m² × 10.7639104167 sq ft

    KISS file: quantities, sizes and weights kiss.js
    • DetailCraft
    64-bit
  • Inches as a fraction to 1/16

    Writes a plate or bolt size in inches and sixteenths.

    n = round(inches × 16); whole = ⌊n ÷ 16⌋; fraction reduced by halving

    KISS file: quantities, sizes and weights kiss.js
    • DetailCraft
    64-bit
  • Size designation

    The type code and size text of a part's profile.

    KISS file: quantities, sizes and weights kiss.js
    • DetailCraft
    64-bit
  • Detail line: quantity, length, weight, area

    One D line of the file for a part mark.

    plate area m² = width × length ÷ 10⁶

    KISS file: quantities, sizes and weights kiss.js
    • DetailCraft
    64-bit
  • Hole counts by size

    The labor lines that count a part's holes by diameter and thickness.

    KISS file: quantities, sizes and weights kiss.js
    • DetailCraft
    64-bit
  • 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.js
    • DetailCraft
    64-bit
  • 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.js
    • DetailCraft
    64-bit
  • Picture corners

    The four corners of the picture's outline.

    corner = middle ± size ÷ 2

    Reference picture size and position picture.js
    • DetailCraft
    64-bit
  • Picture values read from a file

    Checks a picture's numbers when a model is opened.

    Reference picture size and position picture.js
    • DetailCraft
    64-bit
  • Area, mass per meter, width, depth and perimeter

    Fills in the values every member, bill of materials and drawing reads from a profile.

    mass kg/m = published value, else area mm² × 10⁻⁶ × ρ kg/m³

    Steel profiles: area, mass per meter and sizes profiles.js
    • DetailCraft
    64-bit
  • Plate name

    The name of a plate profile from its thickness and width.

    PL<t>x<w>, each to 2 decimals

    Steel profiles: area, mass per meter and sizes profiles.js
    • DetailCraft
    64-bit
  • Thickness a hole goes through

    The material thickness on the face a hole is made in.

    Steel profiles: area, mass per meter and sizes profiles.js
    • DetailCraft
    64-bit
  • Profile summary in the properties panel

    The rows of sizes, area and mass shown for a profile.

    area cm² = area mm² ÷ 100

    Steel profiles: area, mass per meter and sizes profiles.js
    • DetailCraft
    64-bit
  • Custom profile sizes

    Checks the sizes of a profile a person defines.

    Steel profiles: area, mass per meter and sizes profiles.js
    • DetailCraft
    64-bit
  • A part's solid

    Builds the side faces and end caps of one steel part.

    USD export of the steel model usd-detailcraft.js
    • DetailCraft
    64-bit
  • Millimeters to meters

    Converts a world point for the USD file.

    (x, y, z) m = (x, y, z) mm ÷ 1000

    USD export of the steel model usd-detailcraft.js
    • DetailCraft
    64-bit
  • Length and weight attributes

    The length in meters and the weight in kilograms written on each part.

    length m = length mm ÷ 1000

    USD export of the steel model usd-detailcraft.js
    • DetailCraft
    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.