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
-
Global section
States the file's number sizes, unit, resolution and largest coordinate.
unit flag 2 (MM); scale 1; resolution 10⁻⁶; largest coordinate = max |x| over all control points
IGES files of NURBS curves and surfaces nurbs/iges.js64-bit- ModelCraft
- PartCraft
-
A number from IGES text
Reads one real number from the file.
IGES files of NURBS curves and surfaces nurbs/iges.js64-bit- ModelCraft
- PartCraft
-
Unit factors
Millimeters per file unit, by the file's unit flag.
1: 25.4; 2: 1; 3: 25.4 × 12; 4: 1609344; 5: 10⁶; 6: 1000; 7: 10⁶; 8: 10⁻³; 9: 10⁻³; 10: 10; 11: 25.4 × 10⁻⁶
IGES files of NURBS curves and surfaces nurbs/iges.js64-bit- ModelCraft
- PartCraft
-
Control points in millimeters
Scales a curve's control points by the file's unit as it is read.
scale = UNITS[flag] (1 when unknown); p′ = p × scale
IGES files of NURBS curves and surfaces nurbs/iges.js64-bit- ModelCraft
- PartCraft
-
End derivative coefficients
The factors that link the first control points to the first and second derivative at the start.
a₁ = p ÷ (U[p+1] − U[1]); b₁ = p ÷ (U[p+2] − U[2]); c₂ = (p − 1) ÷ (U[p+1] − U[2])
Matching and blending NURBS curves and surfaces nurbs/match.js64-bit- ModelCraft
- PartCraft
-
Point, direction and curvature at an end
What a curve's end looks like to the curve that must meet it.
t = C′ ÷ |C′|; out = ± t; speed = |C′|
Matching and blending NURBS curves and surfaces nurbs/match.js64-bit- ModelCraft
- PartCraft
-
Curve end matched to a target
Moves the first one to three control points so the curve meets the target with G0, G1 or G2.
P₀ = T; P₁ = P₀ + out × speed ÷ a₁; D₂ = out (C″ · out) + κ speed²; P₂ = P₁ + (a₁ (P₁ − P₀) + D₂ ÷ c₂) ÷ b₁
Matching and blending NURBS curves and surfaces nurbs/match.js64-bit- ModelCraft
- PartCraft
-
Blend curve between two ends
A Bézier curve joining two curve ends with the asked continuity.
G1: P₁ = A + out × α ÷ 3; G2: P₁ = A + out × α ÷ 5, P₂ = 2 P₁ − A + κ α² ÷ 20; α = chord × bulge
Matching and blending NURBS curves and surfaces nurbs/match.js64-bit- ModelCraft
- PartCraft
-
Frame on the target's edge
For a point near the target's edge: the nearest edge point, the outward direction in the tangent plane, the normal and the normal curvature.
d = (n × tₑ) ÷ |n × tₑ|, turned to point away from the surface
Matching and blending NURBS curves and surfaces nurbs/match.js64-bit- ModelCraft
- PartCraft
-
Surface edge matched to a target
Refits the first one to three rows of control points so the surface meets the target along an edge.
stations vᵢ = i ÷ M, M = max(samples, 4 × columns); rows fitted by least squares; accepted when gap ≤ g0, angle ≤ g1 and Δκ ≤ g2 (or relative ≤ g2rel)
Matching and blending NURBS curves and surfaces nurbs/match.js64-bit- ModelCraft
- PartCraft
-
Blend surface between two edges
A surface joining two surface edges, built from blend sections along them.
sections at t = i ÷ n, n = 8, 16, … ≤ 128; each a Bézier of degree 1, 3 or 5; interpolated along the edge
Matching and blending NURBS curves and surfaces nurbs/match.js64-bit- ModelCraft
- PartCraft
-
A number as STEP text
Writes one real number into the file.
String(x), with a decimal point added when it has none
STEP files of NURBS curves and surfaces nurbs/step.js64-bit- ModelCraft
- PartCraft
-
Knots and multiplicities
Turns a full knot vector into STEP's list of distinct knots with their counts.
STEP files of NURBS curves and surfaces nurbs/step.js64-bit- ModelCraft
- PartCraft
-
Edges that have collapsed to a point
Leaves a zero-length boundary edge, such as a pole, out of the face loop.
skipped when arc length ≤ 10⁻⁹ × surface size
STEP files of NURBS curves and surfaces nurbs/step.js64-bit- ModelCraft
- PartCraft
-
Trim loop written as a curve
Writes a trim loop as one closed curve on the face.
3D point = S(u, v) for each loop point; curve = straight segments through them
STEP files of NURBS curves and surfaces nurbs/step.js64-bit- ModelCraft
- PartCraft
-
Length unit of a file
Millimeters per file unit.
SI: prefix × 1000; conversion-based: value × its base unit
STEP files of NURBS curves and surfaces nurbs/step.js64-bit- ModelCraft
- PartCraft
-
Control points in millimeters
Reads each control point and scales it by the file's unit.
p′ = p × unit
STEP files of NURBS curves and surfaces nurbs/step.js64-bit- ModelCraft
- PartCraft
-
Trim loops read back
Turns a face's boundary edges into trim loops in the surface's own parameters.
33 samples per curved edge; each projected to (u, v); outer when |area| < 0.999 × (u range × v range)
STEP files of NURBS curves and surfaces nurbs/step.js64-bit- ModelCraft
- PartCraft
-
Value of a number row
The number handed to the app when a person changes a number box.
v = min(max, max(min, typed value))
Numbers typed into the property grid app-propgrid.js Every app64-bit -
Rounding of a slider value
Removes binary noise such as 0.30000000000000004 from a slider's value.
v = round to (decimals of the step + 2) decimals, at most 8
Numbers typed into the property grid app-propgrid.js Every app64-bit -
Value of a slider row
The number handed to the app while a slider is dragged or its box is changed.
v = fix(clamp(value, min, max), step)
Numbers typed into the property grid app-propgrid.js Every app64-bit -
Integer or float
Decides how a number is written.
Numbers sent between people editing together live-client.js Every app64-bit -
Writing a float
Writes a number as 8 bytes.
Numbers sent between people editing together live-client.js Every app64-bit -
Writing an integer
Writes a whole number in the shortest integer form that holds it.
Numbers sent between people editing together live-client.js Every appExact -
Reading a float
Reads a 4-byte or an 8-byte float from a message.
Numbers sent between people editing together live-client.js Every app64-bit -
Reading a 64-bit integer
Reads an unsigned or signed 64-bit integer.
Numbers sent between people editing together live-client.js Every appExact -
Cost of one call
The cost of a call from its token counts and the model's prices.
cost = (in × price in + out × price out) ÷ 1,000,000
Spending on a person's own AI model ai-byok.js Every app64-bit -
Spending today and this month
The cost, tokens and number of calls for the current day and month, and the calls in the last hour.
amount = Σ cost of the calls in the period
Spending on a person's own AI model ai-byok.js Every app64-bit -
Check before a call
Refuses a call when the calls per hour, the day's or month's spending, or the day's tokens could pass a limit.
refuse when spent + worst-case cost > limit; worst case = cost(estimated input, largest allowed output)
Spending on a person's own AI model ai-byok.js Every app64-bit -
Recorded cost and the token estimate
Stores each call's cost and estimates the input tokens of the next request.
estimated tokens = ⌈JSON length ÷ 3⌉ + 500
Spending on a person's own AI model ai-byok.js Every app64-bit -
Flow through a passage
Persons per second through a door or corridor of a given width.
rate = max(0, Fsm × (width − 2 × boundary))
People flow and evacuation time people.js Every app64-bit -
Speed and specific flow at a density
Walking speed and flow per meter of width at a given density of people.
S = k × (1 − 0.266 × D); Fs = S × D; k = 1.4 m/s
People flow and evacuation time people.js Every app64-bit -
Rate and speed of each passage
The flow rate and walking speed each passage gets, from its own values or the defaults for its kind.
People flow and evacuation time people.js Every app64-bit -
Door service time and walking time
How long a door takes per person, how long the passage takes to walk, and each room's distance to an exit in time.
service = 1 ÷ rate; walk = length ÷ speed; to exit = least total walking time
People flow and evacuation time people.js Every app64-bit -
Which way a room empties
The next passage for people in a room: the one with the least remaining walking time to an exit.
keep a hop when toExit(next) < toExit(room) − 1e-9; choose the least walk + toExit(next)
People flow and evacuation time people.js Every app64-bit -
Evacuation results
People evacuated, the time the last person reaches an exit, peak occupancy and density per room, and queues per door.
time = latest arrival at any exit; density = peak people in a room ÷ its area
People flow and evacuation time people.js Every app64-bit -
Joint frames at a pose
Each joint's rotation and offset from its parent at the given joint values.
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Joint torques for a motion (inverse dynamics)
The torque or force each joint needs for given positions, velocities and accelerations, with gravity, external loads and damping.
outward: ω, α, a of each link; F = m × a_com; N = I α + ω × (I ω); inward: τᵢ = axis · n (revolute) or axis · f (prismatic) + damping × q̇ᵢ
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Mass matrix
The joint-space mass matrix at a pose.
column j = rnea(q, q̇ = 0, q̈ = unit vector j) with no gravity, damping or external loads
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Joint accelerations for given torques (forward dynamics)
The acceleration of each joint under applied torques.
M q̈ = τ − h
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Kinetic and potential energy
The mechanism's kinetic, potential and total energy at a pose and velocity.
KE = ½ q̇ᵀ M q̇; PE = −Σ m × (g · p_com)
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Simulated motion over time
Joint positions and velocities at each time step under gravity and applied torques.
RK4: y₊ = y + dt ÷ 6 × (k₁ + 2k₂ + 2k₃ + k₄); steps = round(T ÷ dt); t = step × dt
Rigid-body dynamics of a mechanism dynamics.js Every app64-bit -
Courtyard of a footprint
The rectangle around all pads, grown by a margin.
courtyard = (min(x − w ÷ 2) − m, min(y − h ÷ 2) − m, max(x + w ÷ 2) + m, max(y + h ÷ 2) + m)
Parametric PCB footprints footlib.js Every app64-bit -
Two-terminal chip
Two pads at half the pitch either side of the center.
x = ∓ pitch ÷ 2
Parametric PCB footprints footlib.js Every app64-bit -
Dual-row surface-mount package
Pads in two rows, numbered counter-clockwise from the top left.
y = ((n ÷ 2 − 1) ÷ 2 − i) × pitch; x = ∓ row spacing ÷ 2
Parametric PCB footprints footlib.js Every app64-bit -
Dual in-line through-hole package
Drilled pads in two rows.
y = ((n ÷ 2 − 1) ÷ 2 − i) × pitch; x = ∓ row spacing ÷ 2
Parametric PCB footprints footlib.js Every app64-bit -
Pin header
Drilled pads in one or two rows at a pitch.
x = (r − (rows − 1) ÷ 2) × pitch; y = ((n − 1) ÷ 2 − i) × pitch
Parametric PCB footprints footlib.js Every app64-bit -
Quad flat package
Pads on four sides, numbered counter-clockwise from the top left.
along a side: ((n − 1) ÷ 2 − i) × pitch; across: ± span ÷ 2
Parametric PCB footprints footlib.js Every app64-bit -
Axial through-hole part
Two drilled pads at half the lead pitch either side of the center.
x = ∓ pitch ÷ 2
Parametric PCB footprints footlib.js Every app64-bit -
Round a box edge outward to 32-bit
A 32-bit number that is never above (down) or never below (up) the 64-bit value.
Ray hits against 32-bit triangle records compute/bvh-core.js32-bit in part- BimCraft
- ModelCraft
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.