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

  • Model bounds in the section frame

    The bounds of every drawn vertex in the turned section frame.

    box = min and max of turned vertex positions

    3D view drawing viewer3d.js
    • BimCraft
    32-bit, display only
  • Polygon clipped at a station or an offset

    Cuts a wall outline at an opening's edge or at a layer boundary.

    t = (at − a) ÷ (b − a); new point has the clip coordinate exactly

    Wall layers drawn in plans and sections wall-plan-graphics.js
    • BimCraft
    64-bit
  • Layer bands across a wall in plan

    The band of each wall layer across the wall, from the exterior face inward.

    off₀ = ±t ÷ 2; offᵢ₊₁ = offᵢ ∓ tᵢ

    Wall layers drawn in plans and sections wall-plan-graphics.js
    • BimCraft
    64-bit
  • Layer thicknesses against the wall thickness

    Checks that a wall's layers add up to its thickness before any layer is drawn.

    |Σ tᵢ − t| ≤ 0.005 mm

    Wall layers drawn in plans and sections wall-plan-graphics.js
    • BimCraft
    64-bit
  • Curved wall outlines as chords

    Maps a path from the wall's frame back to the plan, adding points along a curved wall so the chords stay close to the arc.

    step = 2 acos(max(−1, 1 − 0.002 ÷ radius)); n = ⌈|Δstation| ÷ R ÷ step⌉

    Wall layers drawn in plans and sections wall-plan-graphics.js
    • BimCraft
    64-bit
  • Boundary lines between layers

    Finds the stretches of a layer boundary that lie inside the wall's outline.

    x = x_a + (x_b − x_a) × (offset − y_a) ÷ (y_b − y_a)

    Wall layers drawn in plans and sections wall-plan-graphics.js
    • BimCraft
    64-bit
  • Outline of joined wall pieces

    Finds the outer edges of wall pieces that touch, so shared edges inside a joint are not drawn.

    t = cross(c − a, v) ÷ cross(d, v); parallel when |cross(d, v)| < 1e-12 × |d| × |v|

    Wall layers drawn in plans and sections wall-plan-graphics.js
    • BimCraft
    64-bit
  • Building width on an elevation

    The overall width of the building's walls across a view direction, for the width note on an elevation.

    x = p · right ± |n · right| × t ÷ 2 over every wall end

    Wall layers drawn in plans and sections wall-section-graphics.js
    • BimCraft
    64-bit
  • Wall and opening edges for an elevation

    The edges of a straight wall's two faces, its ends and its openings, handed to the hidden-line view.

    P(s, t, h) = a + u s + n t at height h

    Wall layers drawn in plans and sections wall-section-graphics.js
    • BimCraft
    64-bit
  • Walls of every level in one level's axes

    Moves every wall and opening into one level's plan and height, for a section through several levels.

    T = inverse(level) × level_wall; a′ = T a; z = T₁₄ + base offset

    Wall layers drawn in plans and sections wall-section-graphics.js
    • BimCraft
    64-bit
  • Where a section cuts a wall

    The station along a wall at which the section plane cuts it, when the cut is square to the wall.

    s = ((o − a) · dir) ÷ (u · dir)

    Wall layers drawn in plans and sections wall-section-graphics.js
    • BimCraft
    64-bit
  • Layer bands in a section cut

    The rectangle of each wall layer in a section, between the heights the openings leave.

    x = c + off × (n · right); offᵢ₊₁ = offᵢ ∓ tᵢ

    Wall layers drawn in plans and sections wall-section-graphics.js
    • BimCraft
    64-bit
  • Solid of revolution

    Turns a profile of radius and height points into a closed triangle mesh about the vertical axis.

    vertex = (r × cos(2π i ÷ 24), r × sin(2π i ÷ 24), z), i = 0 … 23

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Elliptical head profile

    The outline of a 2:1 elliptical vessel head from the tangent line to the pole.

    (r × cos a, z₀ ± (r ÷ 2) × sin a), a = (π ÷ 2) × i ÷ 6

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Vessel capacity

    The capacity in cubic meters of a vessel or column: a cylinder and two 2:1 elliptical heads.

    V = (π (d ÷ 2)² L + (4 ÷ 3) π (d ÷ 2)² (d ÷ 4)) ÷ 10⁹

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Tank capacity

    The capacity in cubic meters of an atmospheric tank.

    V = π r² h ÷ 10⁹

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Signed volume of a mesh

    The volume enclosed by a triangle mesh in cubic millimeters, positive when the triangles face outward.

    V = Σ p · (q × r) ÷ 6 over the triangles

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Dimensions accepted for a piece of equipment

    Takes the dimensions a person typed, builds the solids and returns their bounding box, nozzles and capacity.

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Equipment moved and turned

    Moves a piece of equipment to a point and turns it about the vertical axis by an angle in degrees.

    (x', y') = (x₀ + x cos a − y sin a, y₀ + x sin a + y cos a), a = rot × π ÷ 180

    Plant equipment solids, capacity and placement addons/plant/lib/equip.js
    • BimCraft
    64-bit
  • Zone solid in millimeters

    Turns a hazard or consequence zone given in meters into a closed solid in millimeters for the model.

    vertex (mm) = vertex (m) × 1000

    Plant equipment solids, capacity and placement addons/plant/lib/engineering.js
    • BimCraft
    64-bit
  • Pipe run handed to the pipe stress input

    Takes the model's pipe run with the most points and gives its points and total length to the pipe stress calculator.

    length = Σ √(Δx² + Δy² + Δz²) over the legs

    Plant equipment solids, capacity and placement addons/plant/lib/engineering.js
    • BimCraft
    64-bit
  • Nozzle port size

    The outside diameter in millimeters stored on a nozzle's port, from its nominal pipe size.

    size = round(od (in) × 25.4 × 10) ÷ 10

    Plant equipment solids, capacity and placement addons/plant/lib/place.js
    • BimCraft
    64-bit
  • Capacity property in the model

    The capacity in cubic meters written to the CadCraft_Plant property set of the placed equipment.

    CapacityM3 = round(V × 1000) ÷ 1000

    Plant equipment solids, capacity and placement addons/plant/lib/place.js
    • BimCraft
    64-bit
  • Number written to the file

    Formats a coordinate, direction component or property value as STEP text.

    num(v) = round(v × 10⁴) ÷ 10⁴

    Plant equipment written as an IFC file addons/plant/lib/ifc-out.js
    • BimCraft
    64-bit
  • Placement of an item

    The position and the turn about the vertical axis of a piece of equipment in the file.

    X direction = (cos a, sin a, 0), a = rot × π ÷ 180

    Plant equipment written as an IFC file addons/plant/lib/ifc-out.js
    • BimCraft
    64-bit
  • Reference direction of a nozzle port

    A unit vector square to a nozzle's outward direction, used as the X axis of the port's placement.

    x = (d × a) ÷ |d × a|, a = (1, 0, 0) or (0, 1, 0)

    Plant equipment written as an IFC file addons/plant/lib/ifc-out.js
    • BimCraft
    64-bit
  • Capacity property

    The capacity in cubic meters written to the CadCraft_Plant property set.

    CapacityM3 = round(V × 1000) ÷ 1000

    Plant equipment written as an IFC file addons/plant/lib/ifc-out.js
    • BimCraft
    64-bit
  • Isometric projection

    The position on the drawing of a 3D point, before fitting to the sheet.

    u = (x − y) × cos 30°; v = z + (x + y) × 0.5

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Length text

    Turns a length in millimeters into the text on the drawing: whole millimeters, or feet and inches to 1/8 inch.

    mm: round(L); inches: round(L ÷ 25.4 × 8) eighths

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Point at a distance along a run

    The 3D point and direction at a given distance along a pipe run, used to place valves and spool balloons.

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Bill of materials quantities

    Pipe length per size and spec, the count of elbows by angle, valves and welds.

    pipe = Σ leg lengths; elbow angle = round(acos(u · v ÷ (|u| |v|)) × 180 ÷ π); welds = 2 × bends + 2 × valves

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Fit to the sheet

    The single scale and offset that place the projected runs inside the drawing area of the sheet.

    scale = min(availW ÷ bw, availH ÷ bh)

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Leg dimension

    The dimension line beside each leg and the number on it.

    real = √(Δx² + Δy² + Δz²) of the leg's 3D ends

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Coordinates in the DXF file

    Formats paper coordinates, text heights and text angles for the DXF output.

    num(v) = v rounded to 4 decimals

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Coordinates in the SVG file

    Formats paper coordinates for the SVG output and flips Y to run downward.

    f(n) = n to 2 decimals; Y = paper height − y

    Piping isometric drawing and its bill of materials addons/plant/lib/iso.js
    • BimCraft
    64-bit
  • Corners of an item

    The four corners in plan of an item of given width, depth, position and turn.

    corner = (x₀ + x cos a − y sin a, y₀ + x sin a + y cos a), a = rot × π ÷ 180

    Factory layout checks addons/plant/lib/layout.js
    • BimCraft
    64-bit
  • Access strips

    The strips beside each side of an item that must stay free, as turned rectangles.

    Factory layout checks addons/plant/lib/layout.js
    • BimCraft
    64-bit
  • Overlap of two convex polygons

    Whether two items, or an item and an access strip or obstacle, overlap by more than a sliver.

    separated if maxA ≤ minB + tol or maxB ≤ minA + tol on any edge normal; tol = 1

    Factory layout checks addons/plant/lib/layout.js
    • BimCraft
    64-bit
  • Distance from a point to a segment

    The shortest distance from a corner of one item to an edge of another.

    t = clamp(((p − a) · (b − a)) ÷ |b − a|², 0, 1); d = |p − (a + t (b − a))|

    Factory layout checks addons/plant/lib/layout.js
    • BimCraft
    64-bit
  • Gap between two items

    The least distance between two items that do not overlap, compared with the minimum aisle width.

    gap = min over corners and edges of the point-to-segment distance

    Factory layout checks addons/plant/lib/layout.js
    • BimCraft
    64-bit
  • Floor load of an item

    The weight of an item divided by its footprint area, compared with the floor load limit.

    load = weight ÷ (area ÷ 10⁶) in kg per m²; area = |Σ (xᵢ yᵢ₊₁ − xᵢ₊₁ yᵢ)| ÷ 2

    Factory layout checks addons/plant/lib/layout.js
    • BimCraft
    64-bit
  • Footprint of Plant equipment

    The width, depth, height and center of a piece of Plant equipment for the layout, from its bounding box.

    Factory layout checks addons/plant/lib/layout.js
    • BimCraft
    64-bit
  • Flow path length

    The length of the path through a sequence of items, measured center to center along X then Y.

    L = Σ (|Δx| + |Δy|)

    Factory layout checks addons/plant/lib/layout.js
    • BimCraft
    64-bit
  • Legs of a route

    The straight legs of a route with their axis and length.

    axis = first of x, y, z with |Δ| > 10⁻⁶; length = |Δ| on that axis

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Route against obstacles

    Whether the center line of a route comes within a clearance of any obstacle box.

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Grid lines of the search

    The X, Y and Z coordinates at which a route may turn.

    lines = nozzle and lead coordinates, obstacle faces ± clearance, levels, two outer lines, and the midpoint of each neighboring pair

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Search state and the minimum leg

    The key that identifies a search state: grid node, direction and the length of the current leg.

    cap = round(minLeg); key = ((node × 6 + direction) × (cap + 1)) + min(cap, round(run))

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Cost of a step

    The cost added for moving to the next grid node.

    cost = g + step × (1 + climbCost if vertical, else 1) + (bendCost if the direction changes)

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Route points and length

    The final corner points of the route with collinear points removed, its length, bends and climbs.

    length = Σ leg lengths; bends = legs − 1

    Orthogonal pipe router addons/plant/lib/route.js
    • BimCraft
    64-bit
  • Openings and walls on a room's edge

    Finds the doors, windows and walls that lie on the outline of a room.

    t = clamp(((p − a) · (b − a)) ÷ |b − a|², 0, 1); d = |p − a − t (b − a)|; on the edge if d ≤ tolerance

    Rooms handed to add-ons with their doors, windows and walls addons/bimcraft-api.js
    • BimCraft
    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.