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
-
A viewport's window on the model
The box in model space that a viewport shows, used to say when it looks at nothing.
half width = w ÷ 2 × viewHeight ÷ h; half height = viewHeight ÷ 2; corners turned by the twist
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Picture placement
The transform from a picture's pixels to drawing coordinates.
world = P + u·px − v·py + v·h (pixel y runs down; P is the lower left corner)
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Lines of a paragraph of text
Where each line of a multi-line text starts.
pitch = h × 1.667 × line spacing; line i at insert + (top − pitch × i) along the up direction
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Text position, height and angle
One line of text carried through the entity's transform.
H = h × |second column of M|; angle = atan2(m₁, m₀) ± rotation (− when M mirrors)
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Paper unit of a sheet
Whether a sheet is in inches or millimeters.
unit = mm when the sheet is wider than 100 units, else inches
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Line weight in millimeters
A stored line weight, in hundredths of a millimeter, as millimeters.
mm = v ÷ 100 for 0 ≤ v ≤ 211, else 0.25
DWG and DXF drawings compiled for the plan view dwg-compile.js64-bit- BimCraft
- TakeoffCraft
-
Pointer position in drawing coordinates
The drawing coordinates under the pointer, for the coordinate readout.
x = cx + (px − W ÷ 2) ÷ zoom; y = cy − (py − H ÷ 2) ÷ zoom
DWG and DXF drawings compiled for the plan view dwg-view.js64-bit- BimCraft
- TakeoffCraft
-
Model to sheet through a viewport
The transform that carries a model point onto the sheet through one viewport.
k = h ÷ viewHeight; paper = center + k · R(twist) · (model − view point)
DWG and DXF drawings compiled for the plan view dwg-view.js64-bit- BimCraft
- TakeoffCraft
-
Millimeters per paper unit
The size of one paper unit of a sheet in millimeters, for line weights.
1 for millimeters, 25.4 for inches
DWG and DXF drawings compiled for the plan view dwg-view.jsExact- BimCraft
- TakeoffCraft
-
Combine two 3D transforms
The product of two 3 × 4 transforms.
DWG and DXF drawings in 3D dwg-compile3d.js64-bit- BimCraft
-
Transform a point
A point carried through a 3 × 4 transform.
x′ = m₀·x + m₁·y + m₂·z + m₃ (and the same for y′, z′)
DWG and DXF drawings in 3D dwg-compile3d.js64-bit- BimCraft
-
Extrusion direction
The unit extrusion direction of an entity, or straight up when it has none.
N = (x, y, z) ÷ √(x² + y² + z²)
DWG and DXF drawings in 3D dwg-compile3d.js64-bit- BimCraft
-
Object coordinate system
The transform from an entity's own plane to world coordinates.
Ax = unit(Wz × N) (or Wy × N when |Nx| and |Ny| < 1/64); Ay = unit(N × Ax); columns Ax, Ay, N
DWG and DXF drawings in 3D dwg-compile3d.js64-bit- BimCraft
-
Thickness vector
The offset between the bottom and top of an entity that has thickness.
up = M · (N × thickness), without the translation
DWG and DXF drawings in 3D dwg-compile3d.js64-bit- BimCraft
-
Block insert transform in 3D
Where the content of a block lands in 3D, with rows and columns.
M = OCS · T(insert) · Rz(rotation) · T(col × colSpacing, row × rowSpacing, 0) · S(sx, sy, sz) · T(−base)
DWG and DXF drawings in 3D dwg-compile3d.js64-bit- BimCraft
-
Ellipse in 3D
An ellipse or elliptical arc as 3D points.
minor = (N × major) × ratio; p(t) = c + cos t · major + sin t · minor
DWG and DXF drawings in 3D dwg-compile3d.js64-bit- BimCraft
-
Half width of a wide polyline
The offset to each side of a polyline that has a start and end width.
w(k) = (sw + (ew − sw) × length so far ÷ segment length) ÷ 2, along the normal of the path at k
DWG and DXF drawings in 3D dwg-compile3d.js64-bit- BimCraft
-
Spline in 3D
A spline as 3D points: its fit points, or samples of the B-spline from its control points.
de Boor on (w·x, w·y, w·z, w); point = (Σ w·P) ÷ Σ w
DWG and DXF drawings in 3D dwg-compile3d.js64-bit- BimCraft
-
Extents of the drawing
The smallest box round everything drawn, in drawing units.
DWG and DXF drawings in 3D dwg-compile3d.js64-bit- BimCraft
-
Section plane offset
Where a section plane cuts the drawing, from a typed offset in drawing units.
at = lo + clamp(offset × s, 0, hi − lo); offset shown = (at − lo) ÷ s, s = 100 ÷ largest extent
DWG and DXF drawings in 3D dwg-view3d.js64-bit- BimCraft
-
Section range
The largest offset a section plane can take along an axis, in drawing units.
size = (max − min) ÷ s
DWG and DXF drawings in 3D dwg-view3d.js64-bit- BimCraft
-
Drawing coordinates to scene coordinates
The positions sent to the GPU: centered on the drawing and scaled to about 100 units across.
scene = (p − center) × 100 ÷ largest extent
DWG and DXF views on screen dwg-view3d.js32-bit, display only- BimCraft
-
Nearest line to the pointer
The distance in pixels from the pointer to a line, for picking.
t = clamp(((p − a) · (b − a)) ÷ |b − a|², 0, 1); d = |a + t·(b − a) − p|
DWG and DXF views on screen dwg-view3d.js32-bit, display only- BimCraft
-
Zoom to the drawing
The zoom and center that show the whole drawing or sheet.
zoom = min(W ÷ w, H ÷ h) × 0.92; center = middle of the bounds
DWG and DXF views on screen dwg-view.js32-bit, display only- BimCraft
-
Viewport windows on the model
For each sheet viewport, the half width and half height of the model area it shows.
k = h ÷ viewHeight; half width = w ÷ 2 ÷ k; half height = h ÷ 2 ÷ k
Equipment list from drawing tags dwg-equipment.js64-bit- BimCraft
-
Sheets that show a point
Which sheets show a given model point.
u = dx·cos − dy·sin, v = dx·sin + dy·cos; inside when |u| ≤ half width and |v| ≤ half height
Equipment list from drawing tags dwg-equipment.js64-bit- BimCraft
-
Quantity of a row
The scheduled quantity of an item tagged in several places.
qty = Σ tag quantities
Equipment list from drawing tags dwg-equipment.js64-bit- BimCraft
-
Heat capacity of air per volume
The energy to warm one cubic meter of air by one kelvin, in watt-hours.
ρ·c = 1.2 kg/m³ × 1005 J/kgK ÷ 3600 = 0.335 Wh/m³K
Heating and cooling loads per room energy-bim.js64-bit- BimCraft
-
Does a ray reach a box
Whether a ray passes through an element's bounding box within its reach.
Heating and cooling loads per room energy-bim.js64-bit- BimCraft
-
Where a ray crosses triangles
Every distance along a ray at which it crosses a triangle of an element.
det = e₁ · (d × e₂); u = (t · (d × e₂)) ÷ det; v = (d · (t × e₁)) ÷ det; distance = (e₂ · (t × e₁)) ÷ det
Heating and cooling loads per room energy-bim.js64-bit- BimCraft
-
Is a point inside a room
Whether a point lies inside the closed shell of a space.
inside when a slanted ray crosses the shell an odd number of times
Heating and cooling loads per room energy-bim.js64-bit- BimCraft
-
Room volume
The volume enclosed by a room's triangles.
V = |Σ a · (b × c)| ÷ 6 over the triangles
Heating and cooling loads per room energy-bim.js64-bit- BimCraft
-
Sample pieces of a room's surface
Cuts each triangle of the room's shell into small pieces and starts one ray from each.
k = ⌈longest edge ÷ 0.25 m⌉; k² pieces of area (triangle area ÷ k²); start = piece center + 1e-4 m × normal
Heating and cooling loads per room energy-bim.js64-bit- BimCraft
-
What lies beyond a bounding element
Whether a piece of the room's surface faces another room, the ground or the outside.
probe = start + normal × (farthest crossing + 0.25 m)
Heating and cooling loads per room energy-bim.js64-bit- BimCraft
-
Window and door areas
Sets each window's and door's area to its own width times height and takes the difference from its wall.
A = OverallWidth × OverallHeight (in m); wall area = wall area − (A − sampled area)
Heating and cooling loads per room energy-bim.js64-bit- BimCraft
-
U-value from material layers
The U-value of an element from the thickness and conductivity of its layers.
U = 1 ÷ (Rsi + Σ dᵢ ÷ λᵢ + Rse); Rsi, Rse = 0.13, 0.04 sideways; 0.10, 0.04 upward; 0.17, 0.04 downward
Heating and cooling loads per room energy-bim.js64-bit- BimCraft
-
Heating load, annual energy and cooling peak
Each room's design heat loss, its degree-day year and its cooling peak.
H_vent = 0.335 × n × V; heat = H_out·ΔT + H_ground·ΔT_g + H_vent·ΔT; annual kWh = (H_out + H_vent + H_ground × ΔT_g ÷ ΔT) × DD × 24 ÷ 1000
Heating and cooling loads per room energy-bim.js64-bit- BimCraft
-
Degree-days from a CSV file
The sum of the degree-day column of a CSV file, for a year.
total = Σ of the last numeric cell of each row
Heating and cooling loads per room energy-bim.js64-bit- BimCraft
-
A number in the file
A value written into the input file as text.
text = round(x × 10ᵈ) ÷ 10ᵈ, d = 4 unless stated
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
-
Triangles grouped into planes
The triangles of a room's shell sorted into the flat faces they belong to.
key = (round(1000·n), round(1000·d)), n = unit normal, d = n · A
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
-
Outline of a face
One polygon from the triangles of a flat face.
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
-
Which way a polygon faces
The normal of a polygon, used to order its corners counter-clockwise seen from outside.
n = Σ ((yᵢ − yⱼ)(zᵢ + zⱼ), (zᵢ − zⱼ)(xᵢ + xⱼ), (xᵢ − xⱼ)(yᵢ + yⱼ))
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
-
Construction by U-value
The thermal resistance written for a wall, roof or floor that has no layer build-up.
R = max(0.001, 1 ÷ U − Rs), Rs = 0.17 wall, 0.14 roof, 0.21 floor
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
-
Mean U-value of a room's walls, roof and floor
The area-weighted U-value of each kind of surface in a room.
U = Σ (Aᵢ × Uᵢ) ÷ Σ Aᵢ
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
-
Boundary of a surface
Whether a surface of a room faces another room, the ground or the outside, and its corners as written.
probe = mean of the corners + 0.6 m × outward normal
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
-
Window rectangle on its wall
The four corners of a window as written on the wall it faces.
k = √(area ÷ (span × height)); half width = span × k ÷ 2; half height = height × k ÷ 2; corners projected onto the wall plane
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
-
Glazing written for every window
The one window construction every window in the file uses.
U = 1.4 W/m²K, solar heat gain 0.6, visible transmittance 0.7
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
-
Site and time zone
The latitude, longitude and time zone written to the file.
time zone = round(longitude ÷ 15)
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
-
Design loads read back
Each zone's design heating and cooling load in watts, from the engine's sizing report.
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
-
Yearly energy per zone
Each zone's yearly heating and cooling energy in kilowatt-hours.
kWh = J ÷ 3.6 × 10⁶
Energy model input file (IDF) and its results energy-ep.js64-bit- BimCraft
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.