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
-
Thread diameters
The major, minor and pitch diameter and the thread depth of a size.
ISO: depth = 5√3 ÷ 16 × P, d₁ = d − 2 × depth, d₂ = d − 0.649519 P; trapezoidal: depth = P ÷ 2, d₂ = d − P ÷ 2
Thread dimensions and modeled threads threads.js64-bit- PartCraft
-
Size that fits a round face
Chooses the thread size nearest a shaft's or a bore's diameter.
shaft: nearest d; bore: nearest (d₁ + d₂) ÷ 2; accepted when the difference ≤ 0.12 × the face diameter
Thread dimensions and modeled threads threads.js64-bit- PartCraft
-
Profile corners over one pitch
The crest, flank and root corners of the thread profile as axial position and radius.
ISO: crest P ÷ 8, root P ÷ 4; trapezoidal: crest = root = P (0.5 − tan(π ÷ 12) ÷ 2); flank = (P − crest − root) ÷ 2
Thread dimensions and modeled threads threads.js64-bit- PartCraft
-
Profile radius at an axial position
The radius of the thread profile at any position along the axis.
r = r₀ + (r₁ − r₀)(w − u₀) ÷ (u₁ − u₀), w = u mod P
Thread dimensions and modeled threads threads.js64-bit- PartCraft
-
Cross-section of a modeled thread
The polygon cut square to the axis whose twisted extrusion is the thread.
point = (r cos θ, r sin θ), r = profile(∓P θ ÷ 2π)
Thread dimensions and modeled threads threads.js64-bit- PartCraft
-
Helical solid
The thread's solid shape from the cross-section.
turns = h ÷ P; slices = ceil(turns × max(24, segments)); twist = 360° × turns
Thread dimensions and modeled threads threads.js64-bit- PartCraft
-
Cutting tool of a modeled thread
The solid that is cut from a shaft or a bore to leave the thread, with its clearance.
profile shifted by ∓clearance; start moved back by ceil(ext₀ ÷ P) × P
Thread dimensions and modeled threads threads.js64-bit- PartCraft
-
Numbers in the thread callout
Formats the pitch and the thread length written in a drawing's thread note.
text = value rounded to 3 decimals, trailing zeros dropped
Thread dimensions and modeled threads threads.js64-bit- PartCraft
-
Rounding to 3 decimals
Rounds a number to a multiple of 0.001 before it is stored.
round(v × 1000) ÷ 1000
Add-on display bodies: stored coordinates and placement addons/addon-bodies.js64-bit- PartCraft
-
Body coordinates as stored
The box corners or mesh positions, offset and turn of one body as they go into the part file.
Add-on display bodies: stored coordinates and placement addons/addon-bodies.js64-bit- PartCraft
-
Body placed in the world
Turns a body's points about the Y axis and moves them by its offset.
x′ = x cos a + z sin a + t_x; y′ = y + t_y; z′ = −x sin a + z cos a + t_z; a = rotY × π ÷ 180
Add-on display bodies: stored coordinates and placement addons/addon-bodies.js64-bit- PartCraft
-
Box of all add-on bodies
The least and largest coordinates of every placed add-on body.
Add-on display bodies: stored coordinates and placement addons/addon-bodies.js64-bit- PartCraft
-
Power and logarithm used
Which power and logarithm functions the curves are evaluated with.
Material packs: property curves by temperature engineer/material-pack.js64-bit- PartCraft
-
One curve segment
The fitted curve's value at a temperature.
y = 10^(Σ cᵢ Lⁱ), L = log10 T; or y = c₀ + T(c₁ + T(c₂ + T(c₃ + T c₄)))
Material packs: property curves by temperature engineer/material-pack.js64-bit- PartCraft
-
Property at a temperature
The property value with its unit, range, fit error and source.
value = curve(T) × scale
Material packs: property curves by temperature engineer/material-pack.js64-bit- PartCraft
-
Series coefficients
The factors 1/n! of the sine and cosine series.
cₙ = ±1 ÷ n!
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Angle reduction
Brings an angle into [−π, π].
n = floor(x ÷ 2π + ½); r = (x − n × 2π_hi) − n × 2π_lo
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Sine series
The sine of a reduced angle.
sin r = r(c₀ + c₁r² + … + c₁₂r²⁴)
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Cosine series
The cosine of a reduced angle.
cos r = c₀ + c₁r² + … + c₁₂r²⁴
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Sine
sin x for any finite x.
sin r = sin(π − r) for r > π/2; sin r = sin(−π − r) for r < −π/2
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Cosine
cos x for any finite x.
cos r = −cos(π − |r|) for |r| > π/2
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Exponential
The exponential eˣ of a number.
k = floor(x ÷ ln 2 + ½); r = (x − k × ln2_hi) − k × ln2_lo; eˣ = 2ᵏ × Σ rⁿ ÷ n! (n = 0 … 18)
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Natural logarithm
The natural logarithm ln x of a number.
x = m × 2ᵉ, m in [√2/2, √2]; ln m = 2(s + s³/3 + … + s²⁹/29), s = (m − 1) ÷ (m + 1); ln x = e × ln2_hi + (ln m + e × ln2_lo)
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Base-2 logarithm
The base-2 logarithm log₂ x of a number.
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Base-10 logarithm
The base-10 logarithm log₁₀ x of a number.
log₁₀ x = ln x ÷ 2.302585092994046
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Whole-number power
xⁿ for a whole n ≥ 0.
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Power
A number x raised to a power y.
xʸ = exp(y × ln x) for a fractional y
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Arctangent
The arctangent atan x of a number.
atan z = 2·atan(z ÷ (1 + √(1 + z²))), twice; then 4(z − z³/3 + … + z⁴¹/41)
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Two-argument arctangent
The angle of the point (x, y).
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Arcsine
The arcsine asin x of a number in [−1, 1].
asin x = atan2(x, √((1 − x)(1 + x)))
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Arccosine
The arccosine acos x of a number in [−1, 1].
acos x = 2·atan2(√(1 − x), √(1 + x))
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Tangent
The tangent tan x of an angle.
tan x = sin x ÷ cos x
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Hyperbolic sine
The hyperbolic sine sinh x of a number.
sinh x = (eˣ − e⁻ˣ) ÷ 2
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Hyperbolic cosine
The hyperbolic cosine cosh x of a number.
cosh x = (eˣ + 1 ÷ eˣ) ÷ 2
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Hyperbolic tangent
The hyperbolic tangent tanh x of a number.
tanh x = (e²ˣ − 1) ÷ (e²ˣ + 1)
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Cube root
The cube root ∛x of a number.
r₀ = exp(ln|x| ÷ 3); r ← r − (r³ − |x|) ÷ (3r²), twice
Deterministic sine, cosine, exp, log and power field/detmath.js64-bit- PartCraft
-
Sphere
Signed distance to a sphere.
d = √((x − cx)² + (y − cy)² + (z − cz)²) − r
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Box with rounded edges
Signed distance to a box, optionally with rounded edges and corners.
q = |p − c| − (half − round); d = |max(q, 0)| + min(max(q_x, q_y, q_z), 0) − round
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Cylinder
Signed distance to a cylinder between two points.
t = (p − m)·u; d_r = |p − m − t·u| − r; d_t = |t| − L ÷ 2; d = |max(d_r, d_t, 0)| + min(max(d_r, d_t), 0)
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Torus
Signed distance to a torus about the z axis.
d = √((√(x² + y²) − R)² + z²) − r
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Half space
Signed distance to a plane.
d = (n·p − d₀) ÷ |n|
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Solid of revolution
Signed distance to the solid under a profile r(x) turned about the x axis.
ρ = √(y² + z²); d = least distance from (x, ρ) to the profile's segments; inside when ρ ≤ r(x)
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Union, intersection and subtraction
Combines shapes by union, intersection or subtraction.
union = min(a, b); intersection = max(a, b); subtraction = max(a, −b)
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Smooth minimum
Blends two shapes with a radius k.
h = clamp(½ + (b − a) ÷ 2k, 0, 1); s = b + (a − b)h − k·h(1 − h)
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Offset and shell
Grows or shrinks a shape, or hollows it to a wall thickness.
offset: d − δ; shell inward: max(d, −d − t); shell centered: |d| − t ÷ 2
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Move, turn and scale
A shape under a rigid motion and a uniform scale.
q = Rᵀ(p − move) ÷ s; d = d₀(q) × s
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Rotation matrix
The 3 × 3 matrix of a turn about an axis by an angle.
R = c·I + s·[u]ₓ + (1 − c)·u uᵀ, c = cos θ, s = sin θ
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Beam or round cone
Signed distance to a beam whose radius changes from one end to the other.
t = clamp((p − a)·(b − a) ÷ |b − a|², 0, 1); d = |p − a − t(b − a)| − (r₀ + (r₁ − r₀)t)
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Lattice of beams
The least distance to many beams.
Field shapes: signed distance functions field/field.js64-bit- PartCraft
-
Ramped cell size and wall
A number that changes linearly along an axis or with radius.
v = v₀ + (v₁ − v₀) × clamp((p − a) ÷ (b − a), 0, 1)
Field shapes: signed distance functions field/field.js64-bit- PartCraft
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.