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

  • Drawer boxes of a face-frame cabinet

    The sides, ends and bottom of each drawer box behind a face frame.

    box h = min(front h − clearance, opening h − 20 mm); end = bw − 2t; bottom = (bw − 2t + 2g) × (slide − 2t + 2g); bw = opening w − 2 × slide gap

    CabinetCraft parts, fronts and face frames addons/cabinetcraft/lib/build.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Dowels of a corner cabinet

    The number of dowels a corner cabinet's drilling needs.

    dowels = dowel holes ÷ 2

    CabinetCraft parts, fronts and face frames addons/cabinetcraft/lib/build.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Curved cabinet outline in the cell's own axes

    The outline points of a made-to-order curved cabinet, measured from the cell's origin along its two axes.

    (x′, y′) = ((q − o) · u, (q − o) · n)

    CabinetCraft parts, fronts and face frames addons/cabinetcraft/lib/build.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Closing panel of an angled corner

    The height of the panel that closes a corner which is not a right angle.

    height = cabinet h − plinth height

    CabinetCraft parts, fronts and face frames addons/cabinetcraft/lib/build.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Picked room corner

    A corner of the room outline picked on the plan, snapped to the grid.

    p = round(x ÷ g) × g; g = 50 (mm job) or 2 (inch job)

    CabinetCraft room picking and dry-run units addons/cabinetcraft/main.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Direction of the picked outline

    Whether the corners were picked clockwise, which decides the sign of each arc's sweep.

    Σ (xᵢ × yᵢ₊₁ − xᵢ₊₁ × yᵢ) < 0 means clockwise

    CabinetCraft room picking and dry-run units addons/cabinetcraft/main.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Sheet size in the program's units

    The sheet size, thickness and rapid rate the dry run checks a G-code program against.

    k = (1 ÷ 25.4 or 1) × (25.4 or 1); sheet = job sheet × k; rapid (inch program) = rapid ÷ 25.4

    CabinetCraft room picking and dry-run units addons/cabinetcraft/main.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Numbers on labels and the maker review

    Writes a number with at most 2 decimals.

    text = round(v × 100) ÷ 100

    CabinetCraft room picking and dry-run units addons/cabinetcraft/main.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Job converted to the other unit

    Every size in the job converted from millimeters to inches or back when the job's unit is changed.

    to inches: round(v × (1 ÷ 25.4) × 16) ÷ 16; to millimeters: round(v × 25.4)

    Cabinet job edits that change sizes addons/cabinetcraft/lib/edit.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Gap at a door or window

    The width of the gap put in a run's floor row so that the cabinets after it clear an opening.

    width = ⌈(at + w + clear − start) × 10⌉ ÷ 10

    Cabinet job edits that change sizes addons/cabinetcraft/lib/edit.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Filler for a leftover

    Adds a filler as wide as the space a row leaves on its wall.

    filler width = rest, when 0.5 < rest ≤ 75 mm

    Cabinet job edits that change sizes addons/cabinetcraft/lib/edit.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Notch of a new L or U room

    The first size of the notch when a rectangular room is made L or U shaped.

    notch width = round(W ÷ 3); notch depth = round(D ÷ 2)

    Cabinet job edits that change sizes addons/cabinetcraft/lib/edit.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Drilling distances in inches

    The 32 mm system's drilling and hardware distances for the inch rule set.

    value = round(mm × (1 ÷ 25.4) × 10⁴) ÷ 10⁴

    Cabinet parts from a box and construction rules addons/cabinetcraft/lib/model.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Box sizes

    The box height without the plinth, the inside width and the depth the back takes.

    boxH = h − kick; iw = w − 2t; backDepth = backSetback + backT

    Cabinet parts from a box and construction rules addons/cabinetcraft/lib/model.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Door and drawer front sizes

    The size and position of every door and drawer front in the cabinet's front view.

    one door: (w − reveal) × (boxH − reveal); a pair: each (w − 2·reveal) ÷ 2 wide; n drawer fronts: each (boxH − n·reveal) ÷ n high

    Cabinet parts from a box and construction rules addons/cabinetcraft/lib/model.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Longest drawer slide that fits

    Picks the drawer slide length from the rule's list for the cabinet's inside depth.

    room = panel depth − backDepth − drawerBackClear; the longest listed L with L ≤ room + 1e-9

    Cabinet parts from a box and construction rules addons/cabinetcraft/lib/model.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Part list of one cabinet

    Every part of a cabinet with its length, width, thickness, material, quantity and banded edges.

    back in grooves: (iw + 2·groove) × (boxH − n·t + n·groove); shelf: (iw − 2·shelfClear) × (inside depth − shelfFront); drawer end: iw − 2·slideGap − 2·drawerT

    Cabinet parts from a box and construction rules addons/cabinetcraft/lib/model.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Size checks on a cabinet

    Reports a cabinet that is too narrow, too low or too shallow for its parts, or whose drawers do not fit.

    iw ≤ 0; boxH ≤ 2t; inside depth ≤ shelfFront; Σ fronts + n·reveal > boxH + 1e-9

    Cabinet parts from a box and construction rules addons/cabinetcraft/lib/model.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Linear stock to buy

    The number of pieces and the total length of each hardwood section in the job.

    length = Σ qty × length; pieces = Σ qty

    Cabinet job totals: linear stock and sheet count addons/cabinetcraft/lib/sheets.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Sheets used by a nested job

    The total number of sheets over all materials, with each material's own count and efficiency.

    sheets = Σ sheets per material

    Cabinet job totals: linear stock and sheet count addons/cabinetcraft/lib/sheets.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    Exact
  • Label position on the sheet

    Where each label is printed on the page, so that it lands on the die-cut label.

    x = left + col × (label width + gap x); y = top + row × (label height + gap y)

    Part labels on label sheets addons/cabinetcraft/lib/cutlist/labels.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Bar code module width

    The width of the narrowest bar of a label's Code 128 bar code, fitted to the space beside the id text.

    module = min(0.33 mm, room ÷ (code width + 20))

    Part labels on label sheets addons/cabinetcraft/lib/cutlist/labels.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Cables and their routes

    One cable per circuit with its route length, plus the fill of every tray and conduit it runs in.

    point in mm = plan point × (meters per unit × 1000); cable route = the longest of the board-to-device routes

    Cable routes in trays and conduits on the installation plan addons/electrical/lib/carriers.js
    • CadCraft
    64-bit
  • Fill rows for the list

    The rows of the tray and conduit fill list, with the fill percentage and whether it is within the limit.

    pct = round(fill % × 10) ÷ 10

    Cable routes in trays and conduits on the installation plan addons/electrical/lib/carriers.js
    • CadCraft
    64-bit
  • Tray size in the layer name

    The layer name that records what a route is: a tray of a width and depth, or a conduit of a type and trade size.

    EL-ROUTE-TRAY-round(width)Xround(depth)

    Cable routes in trays and conduits on the installation plan addons/electrical/lib/carriers.js
    • CadCraft
    64-bit
  • Frame grid in drawing coordinates

    The frame's matrix, its inverse and the box of the whole paper in the drawing.

    det = m₀·m₃ − m₁·m₂; inverse = adjugate ÷ det

    Sheet and path of a point on a schematic addons/electrical/lib/project.js
    • CadCraft
    64-bit
  • Path column of a point

    The column number, 1 to the column count, of a point inside a frame; 0 when it is left or right of the grid.

    path = min(cols, ⌊(x − gx0) ÷ ((gx1 − gx0) ÷ cols)⌋ + 1)

    Sheet and path of a point on a schematic addons/electrical/lib/project.js
    • CadCraft
    64-bit
  • Does a wire segment cross the slash

    Whether two segments cross or touch.

    o(p, q, r) = sign((q − p) × (r − p)); cross when o₁ ≠ o₂ and o₃ ≠ o₄

    Cores of a cable on a schematic addons/electrical/lib/reports.js
    • CadCraft
    64-bit
  • Wires of a cable in order

    The wires a cable marker crosses, sorted along the marker, which gives each core its number.

    Cores of a cable on a schematic addons/electrical/lib/reports.js
    • CadCraft
    64-bit
  • Millimeters per drawing unit

    The factor that takes the source drawing's unit to millimeters.

    inches 25.4; feet 304.8; centimeters 10; meters 1000; anything else 1

    Symbols imported from another drawing addons/electrical/lib/symlib.js
    • CadCraft
    Exact
  • Geometry scaled to millimeters

    Every line, polyline, circle, arc, ellipse, hatch and text of the block moved to its base point and scaled.

    x′ = (x − base x) × s; r′ = r × s

    Symbols imported from another drawing addons/electrical/lib/symlib.js
    • CadCraft
    64-bit
  • Connection points found on the outline

    The points where wires connect: terminal attributes, or the ends of leads that leave the symbol's outline straight.

    tol = max(width, height) × 0.001 + 1e-9

    Symbols imported from another drawing addons/electrical/lib/symlib.js
    • CadCraft
    64-bit
  • Stored pin coordinates

    The connection points written into the symbol's data.

    x = round(x × 1000) ÷ 1000

    Symbols imported from another drawing addons/electrical/lib/symlib.js
    • CadCraft
    64-bit
  • Harness segment lengths

    The length in millimeters of each drawn harness segment.

    len = √(Δx² + Δy²) ÷ k (k = drawing units per mm), unless a length is typed

    Wire lengths through a harness or a cabinet addons/harness/lib/route.js
    • CadCraft
    64-bit
  • Shortest route between two nodes

    The segments a wire runs through and their total length.

    len = Σ segment lengths along the shortest path

    Wire lengths through a harness or a cabinet addons/harness/lib/route.js
    • CadCraft
    64-bit
  • Bundle diameter

    The diameter of a bundle of wires from their outside diameters.

    D = √(Σ dᵢ² ÷ packing)

    Wire lengths through a harness or a cabinet addons/harness/lib/route.js
    • CadCraft
    64-bit
  • Cut length of each wire

    Each wire's length with its end allowances, and which wires share each harness segment.

    harness: route + 2 × allow + loop; cabinet: (|Δx| + |Δy|) × slack + 2 × allow + loop

    Wire lengths through a harness or a cabinet addons/harness/lib/route.js
    • CadCraft
    64-bit
  • Fixture positions for the calculation

    Each fixture's position in millimeters, its height and its aim, as the engine reads them.

    p = (x ÷ k, y ÷ k, height)

    Illuminance values written on the lighting plot addons/lighting/lib/lux.js
    • CadCraft
    64-bit
  • Lux written at the grid points

    The text objects that show the illuminance at each grid point in the drawing.

    text = round(E); position = grid point × k

    Illuminance values written on the lighting plot addons/lighting/lib/lux.js
    • CadCraft
    64-bit
  • Tightest limit of a rule

    The minimum and maximum a rule allows when several ticked packs have it.

    min = max(minᵢ); max = min(maxᵢ)

    Regulation limits in force and how values are written addons/regs/lib/adapter.js
    • CadCraft
    • BimCraft
    • CivilCraft
    • DetailCraft
    64-bit
  • Values written in a problem

    How a required or found value is written in a regulation problem, by unit.

    mm: round(v × 10) ÷ 10; m²: round(v × 100) ÷ 100; ratio and U: 2 decimals; R: 1 decimal; count: whole

    Regulation limits in force and how values are written addons/regs/lib/adapter.js
    • CadCraft
    • BimCraft
    • CivilCraft
    • DetailCraft
    64-bit
  • Percentages as text

    A percentage written in the panel, in problems and on the code summary sheet.

    round(v × 10) ÷ 10, then the browser's number format with at most one decimal

    Regulation limits in force and how values are written addons/regs/lib/ui.js
    • CadCraft
    • BimCraft
    • CivilCraft
    • DetailCraft
    64-bit
  • Values on the code summary sheet

    Required and found values on the printable code summary for a permit set.

    Regulation limits in force and how values are written addons/regs/lib/ui.js
    • CadCraft
    • BimCraft
    • CivilCraft
    • DetailCraft
    64-bit
  • Column widths and row heights

    Shares the inner opening between columns or rows: typed sizes keep theirs, the others split what is left equally.

    each free size = (avail − Σ typed) ÷ free count

    Window and door pieces, glass and hardware addons/windows/lib/model.js
    • CadCraft
    64-bit
  • Inner opening

    The opening inside the frame, and the space left for the columns after the mullions.

    inner w = W − 2f; inner h = H − f − tf; columns share inner w − (n − 1) × m

    Window and door pieces, glass and hardware addons/windows/lib/model.js
    • CadCraft
    64-bit
  • Cut length of a profile piece

    The length a piece is sawn to, with the welding allowance, and the merging of equal pieces into one row.

    cut = outer + (mitred ends) × weld ÷ 2

    Window and door pieces, glass and hardware addons/windows/lib/model.js
    • CadCraft
    64-bit
  • Steel reinforcement length

    The length of the steel inside a PVC profile.

    steel = max(10, length − 2 × setback)

    Window and door pieces, glass and hardware addons/windows/lib/model.js
    • CadCraft
    64-bit
  • Sash and glass sizes

    The size of an opening sash and of the glass in a sash or in the frame.

    sash = cell + 2 (overlap − gap); glass in a sash = sash − 2 × face + 2 (seat − glass gap); glass in the frame = cell + 2 (frame seat − glass gap)

    Window and door pieces, glass and hardware addons/windows/lib/model.js
    • CadCraft
    64-bit
  • Glass rows and area

    One row per glass size with its quantity and the area of one pane.

    area = round(gw × gh) ÷ 10⁶ m²

    Window and door pieces, glass and hardware addons/windows/lib/model.js
    • CadCraft
    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.