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
-
Is a ray to the sun blocked
Whether the line from a point toward the sun meets a triangle of the model.
det = e₁ · (d × e₂); u = (t · (d × e₂)) ÷ det; v = (d · (t × e₁)) ÷ det; hit if 0 ≤ u, 0 ≤ v, u + v ≤ 1 and distance > tMin
Solar array shading pv-shade.js64-bit- BimCraft
- CivilCraft
-
Sample points on the modules
The points on each module from which rays are cast.
p = bilinear blend of the four corners at ((a + ½) ÷ k, (b + ½) ÷ k) + normal × lift
Solar array shading pv-shade.js64-bit- BimCraft
- CivilCraft
-
Shade fraction by month and hour
The share of the sample points in shadow at each of 12 × 24 sun positions.
frac = shaded points ÷ points
Solar array shading pv-shade.js64-bit- BimCraft
- CivilCraft
-
Beam light lost to shadows
The share of the direct sunlight the array loses to shading, over the year or chosen months.
loss = Σ beam × frac ÷ Σ beam
Solar array shading pv-shade.js64-bit- BimCraft
- CivilCraft
-
Module voltage at a temperature
The open-circuit voltage of a module at a cell temperature.
V(T) = V × (1 + β × (T − 25))
Solar string sizing pv-string.js64-bit- BimCraft
- CivilCraft
-
Longest and shortest string
The most and the fewest modules a string may have.
nMax = min(⌊V_limit ÷ (Voc,cold × f) + 1e-9⌋, ⌊MPPT max ÷ Vmp,cold + 1e-9⌋); nMin = ⌈MPPT min ÷ Vmp,hot − 1e-9⌉
Solar string sizing pv-string.js64-bit- BimCraft
- CivilCraft
-
String length and number of strings
The string length inside the window that leaves the fewest modules over.
count = ⌊modules ÷ n⌋; left = modules − count × n
Solar string sizing pv-string.jsExact- BimCraft
- CivilCraft
-
String voltage checks
The string's cold and hot voltages against the inverter's and the system's limits.
V_string = round(n × round(V_module, 2 decimals), 2 decimals)
Solar string sizing pv-string.js64-bit- BimCraft
- CivilCraft
-
Strings per inverter input
How many strings one input can carry by its current limits, and how many inputs are needed.
per input = min(⌊I_dc max ÷ Imp + 1e-9⌋, ⌊I_sc max ÷ Isc + 1e-9⌋); inputs needed = ⌈count ÷ per input⌉
Solar string sizing pv-string.js64-bit- BimCraft
- CivilCraft
-
DC to AC ratio
The array's peak power against the inverter's AC rating.
kWp = n × count × Wp ÷ 1000; DC ÷ AC = kWp ÷ (P_ac × inverters)
Solar string sizing pv-string.js64-bit- BimCraft
- CivilCraft
-
Cell temperature
The temperature of the cells from the air temperature and the light on the module.
T_cell = T_amb + (NOCT − 20) ÷ 800 × G
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Module DC power
The power of one module at a given irradiance and cell temperature.
P = Wp × G ÷ 1000 × (1 + γ × (T_cell − 25))
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Loss chain
The share of the DC energy left after soiling, mismatch, wiring, downtime and the inverter.
chain = (1 − soiling) × (1 − mismatch) × (1 − wiring) × (1 − availability) × inverter efficiency
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Power in one hour
The light on the array, the cell temperature and the DC and AC power for one hour of a month's representative day.
G = beam × (1 − shade) + sky + ground; P = n × max(0, module power); AC before clipping = P ÷ 1000 × chain
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Monthly figures
A month's light, shade loss and DC energy from its representative day.
month = day × days in month; shade loss % = (unshaded − shaded) ÷ unshaded × 100
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Inverter clipping and monthly AC energy
The AC energy of each month after the inverter's rating limits the hourly power.
scale = P_ac ÷ Σ P when Σ P > P_ac; month AC = Σₕ P × scale × days, rounded to 0.1 kWh
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Annual energy, specific yield and performance ratio of an array
An array's yearly DC and AC energy, kWh per kWp and performance ratio.
AC = Σ rounded months; specific yield = AC ÷ kWp; PR = AC ÷ (kWp × POA)
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Plant totals
The energy, specific yield, performance ratio, clipping and shade loss of all arrays together.
PR = Σ AC ÷ Σ(kWp × POA); clipped % = clipped ÷ unclipped × 100
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Stair parameters
The sizes and counts the stair family is made with.
Width, Height, Gap = round(v × 100) ÷ 100; Tread, Rise = round(v × 1e4) ÷ 1e4; Rise = Height ÷ Steps
Stair family from a sketch stair-family.js64-bit- BimCraft
-
Where the stair family is placed
The insertion point and rotation that put the family on the sketch.
rot = ((angle mod 360) + 360) mod 360
Stair family from a sketch stair-family.js64-bit- BimCraft
-
Tag values of an element
An element's tags as their kinds keep them, lengths in millimeters.
length in mm = round(value × unitMm × 1e6) ÷ 1e6
Length tags and tag schedules tags.js64-bit- BimCraft
-
Tag value written to the file
A tag as the IFC property that holds it.
stored length = round(u(value) × 1e6) ÷ 1e6
Length tags and tag schedules tags.js64-bit- BimCraft
-
Schedule rows and groups
The rows of a tag schedule and the groups they fall in.
length column = round(value × unitMm × 1e6) ÷ 1e6
Length tags and tag schedules tags.js64-bit- BimCraft
-
Mesh points of an element
The vertices of each element as the USD file stores them.
(x′, y′, z′) = P · (x, y, z, 1); stored as (x′, −z′, y′)
USD export and render hand-off usd-bimcraft.js32-bit in part- BimCraft
-
Inverse of a placement
The matrix that undoes a model's placement.
R⁻¹ = Rᵀ ÷ s², s² = m₀² + m₁² + m₂²; t⁻¹ = −R⁻¹ · t
USD export and render hand-off usd-bimcraft.js64-bit- BimCraft
-
Site transform back to the file's coordinates
The transform on each Site that returns the exported points to the IFC file's own coordinates.
toFile = A · (P · C)⁻¹ · A⁻¹
USD export and render hand-off usd-bimcraft.js64-bit- BimCraft
-
Storey elevation in meters
Each storey's elevation as an attribute of the USD file.
elevation in m = elevation × (mm per file unit ÷ 1000)
USD export and render hand-off usd-bimcraft.js64-bit- BimCraft
-
Inverse of a placement (hand-off)
The matrix that undoes a model's placement, for the render hand-off.
R⁻¹ = Rᵀ ÷ s²; t⁻¹ = −R⁻¹ · t
USD export and render hand-off handoff-bim.js64-bit- BimCraft
-
Viewer scene to the USD stage
The transform that takes camera, sun and lamp positions from the viewer's scene to the exported file's world.
toStage = A · (P · C)⁻¹; A alone when the model has no coordination matrix
USD export and render hand-off handoff-bim.js64-bit- BimCraft
-
Sizes a spec allows
The pipe sizes between the spec's smallest and largest.
min − 1e-9 ≤ nominal ≤ max + 1e-9
Pipe spec rules addons/plant/lib/spec.js64-bit- BimCraft
-
How a branch is made
Whether a branch on a header is a tee, a reducing tee or a stub-in.
ratio = branch ÷ header; rule = first with ratio ≤ limit + 1e-9
Pipe spec rules addons/plant/lib/spec.js64-bit- BimCraft
-
Bend radius of a spec
The center-line radius of the spec's elbows for a size, in inches.
short: max(nominal size, outside diameter); long: the table's radius
Pipe spec rules addons/plant/lib/spec.js64-bit- BimCraft
-
Adding tile results to the picture
The sums of red, green, blue and sample count of every pixel after a pass.
out[pixel] += tile[pixel]
Rendered picture: sample sums and color tables compute/cpu-render.js32-bit, display only- BimCraft
- ModelCraft
-
Mean radiance of each pixel
The picture as the average of its samples.
color = Σ ÷ n
Rendered picture: sample sums and color tables compute/cpu-render.js32-bit, display only- BimCraft
- ModelCraft
-
Color through a .cube table
A color after the table's 1D and 3D look-ups.
x = clamp((r − lo) ÷ (hi − lo)); trilinear: c = c₀ + (c₁ − c₀) × d along each axis in turn
Rendered picture: sample sums and color tables exr/cube.js32-bit, display only- BimCraft
- ModelCraft
-
Table rows read from a .cube file
The entries of a color table as they are held in memory.
Rendered picture: sample sums and color tables exr/cube.js32-bit, display only- BimCraft
- ModelCraft
-
Numbers written to a .cube file
A table entry as text in a saved color table.
text = Number(v.toPrecision(7))
Rendered picture: sample sums and color tables exr/cube.js32-bit, display only- BimCraft
- ModelCraft
-
Starter door sizes
Width and height of each starter door type in millimeters.
width = inches × 25.4
Starter door and window sizes opening-types.js64-bit- BimCraft
-
Starter window sizes
Width, height and sill height of each starter window type in millimeters.
size = inches × 25.4
Starter door and window sizes opening-types.js64-bit- BimCraft
-
Reading time of a line
How long a spoken line takes, for placing the next one.
max(2, round(words ÷ 2.5, 1 decimal))
Narration cue times narration.js64-bit- BimCraft
-
Cue times from a script
The start time of each cue from a typed script, and the squeeze when the speech is longer than the walk.
t = round(min × 60 + s, 1 decimal); squeezed t = round(t × duration ÷ end, 1 decimal)
Narration cue times narration.js64-bit- BimCraft
-
Subtitle timestamp
A cue time as an SRT or WebVTT timestamp.
ms = round(s × 1000); h, m, s, ms by integer division
Narration cue times narration.js64-bit- BimCraft
-
Stored size, roughness and bump
The numbers saved with a photo material.
x = round(clamp(x) × 100) ÷ 100
Photo material settings photo-materials.js64-bit- BimCraft
-
Width and height in pixels
The pixel size of the picture.
h = round(w × vh ÷ vw); k = min(1, MAX ÷ w, MAX ÷ h)
Rendered picture size render-tools.js64-bit- BimCraft
-
Value and time of one reading
A single reading of a feed with its time.
t = tt × 1000 if tt < 1e11, else tt
Live feed values and times assets-bim-live.js64-bit- BimCraft
-
Outside diameter handed to the router
The pipe's outside diameter in millimeters for a route between two ports.
od = od in × 25.4
Pipe route clearance size addons/plant/main.js64-bit- BimCraft
-
Mesh handed to the solid kernel
Welds the mesh's corners and passes it to manifold-3d.
weld grid = 10⁻⁶ × max(Δx, Δy, Δz); positions → Float32Array
IFC openings, clippings and half-space cuts ifc/geo-bool.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Boolean of two solids
The difference, union or intersection of two element meshes.
c = center of a's box; R = (a − c) OP (b − c); result = R + c
IFC openings, clippings and half-space cuts ifc/geo-bool.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Element minus all its openings
Subtracts every opening from an element, one after another.
A₀ = base − c; Aᵢ = Aᵢ₋₁ − (cutterᵢ − c); result = Aₙ + c
IFC openings, clippings and half-space cuts ifc/geo-bool.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Face planes of a convex cutter
Finds the outward planes of a cutter and decides whether it is convex.
n = (b − a) × (c − a) ÷ |…|; d = n · a; convex when n · p − d ≤ 10 ε for every corner p
IFC openings, clippings and half-space cuts ifc/geo-bool.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
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.