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
-
Holes for the hole table
Collects each hole's axis, diameter and callout from the kernel's cylindrical faces.
diameter = 2 × smallest radius on the axis
Drawing sheet views, dimensions and PDF drawing.js64-bit- PartCraft
-
Hole table rows
The X and Y of each hole measured from the view's lower-left corner, and its tag.
x = o · right − u₀; y = o · up − v₀
Drawing sheet views, dimensions and PDF drawing.js64-bit- PartCraft
-
Sheet scale
Picks the drawing scale for a paper size.
first s in the ISO 5455 series with width × s ≤ 0.82 × area width and height × s ≤ 0.82 × area height
Drawing sheet views, dimensions and PDF drawing.jsExact- PartCraft
-
Dimension text
The text of an overall dimension or a hole table position.
text = value rounded to 2 decimals
Drawing sheet views, dimensions and PDF drawing.js64-bit- PartCraft
-
Overall dimensions
The width and height on the front view and the depth on the top view.
width = u₁ − u₀; height = v₁ − v₀
Drawing sheet views, dimensions and PDF drawing.js64-bit- PartCraft
-
Numbers in the PDF
Writes one coordinate or size into the PDF content.
Drawing sheet views, dimensions and PDF drawing.js64-bit- PartCraft
-
PDF page content
Writes the sheet's lines, fills and texts in millimeters under a millimeter to point transform.
1 mm = 72 ÷ 25.4 pt
Drawing sheet views, dimensions and PDF drawing.js64-bit- PartCraft
-
Binary STL
Writes each triangle's unit normal and three corners.
n = (v₁ − v₀) × (v₂ − v₀) ÷ |(v₁ − v₀) × (v₂ − v₀)|
Part export to STL, 3MF, DXF and STEP export.js64-bit- PartCraft
-
Numbers in a 3MF file
Writes one vertex coordinate as text.
Part export to STL, 3MF, DXF and STEP export.js64-bit- PartCraft
-
3MF model
Writes the mesh's vertices and triangles as a 3MF package in millimeters.
Part export to STL, 3MF, DXF and STEP export.js64-bit- PartCraft
-
Numbers in a DXF file
Writes one coordinate, radius or angle as text.
Part export to STL, 3MF, DXF and STEP export.js64-bit- PartCraft
-
Sketch to DXF
Writes a sketch's lines, circles, arcs, splines and points as DXF R12 entities.
angle in degrees = radians × 180 ÷ π, reduced to [0, 360)
Part export to STL, 3MF, DXF and STEP export.js64-bit- PartCraft
-
Flat pattern to DXF
Writes a sheet metal flat pattern's outline, bend lines and bend notes.
Part export to STL, 3MF, DXF and STEP export.js64-bit- PartCraft
-
Numbers in a STEP file
Writes one real number in STEP's exponent form.
Part export to STL, 3MF, DXF and STEP export.js64-bit- PartCraft
-
Outer loop of a planar STEP face
Picks the outer boundary of a planar face as the loop with the largest signed area.
area = ½ n · Σ pᵢ × pᵢ₊₁
Part export to STL, 3MF, DXF and STEP export.js64-bit- PartCraft
-
Plane placement of a STEP face
The x direction of the plane a planar face lies on.
x = (e − (e · n) n) ÷ |e − (e · n) n|, e = (1,0,0) unless |n_x| ≥ 0.9, then (0,1,0)
Part export to STL, 3MF, DXF and STEP export.js64-bit- PartCraft
-
Elastic matrix
The 6 × 6 isotropic stress-strain matrix for a unit modulus.
λ = ν ÷ ((1 + ν)(1 − 2ν)); μ = 1 ÷ (2(1 + ν)); D_ii = λ + 2μ, D_ij = λ, shear = μ
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Hexahedron stiffness and stress operators
The 24 × 24 stiffness of a unit cube and the operators that give stress at its corners and center.
K = Σ_gauss Bᵀ D B × ⅛; K_e = K_cc − K_ci K_ii⁻¹ K_ic; σ = (E ÷ h) S u
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Small dense solve
Solves a small system by Gaussian elimination with row exchanges.
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Stiffness times displacement
Applies the whole model's stiffness to a vector, element by element.
y = Σ_e s_e × K_e x_e, s_e = E h × scale_e
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Node-block preconditioner
Inverts each node's 3 × 3 diagonal block of the stiffness.
A⁻¹ = adj(A) ÷ det(A)
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Constraint projections
Turns each node's held directions into a projection that removes them.
P = I − Σ q qᵀ over the orthonormal held directions q
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Eigenvalues of a small symmetric matrix
Eigenvalues and vectors by cyclic Jacobi rotations.
t = sign(θ) ÷ (|θ| + √(θ² + 1)), θ = (a_qq − a_pp) ÷ (2 a_pq)
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Is the body held
Checks that the supports stop all six rigid motions.
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Gravity load
Shares each element's weight equally to its eight corners.
corner force = scale × ρ g h³ ÷ 8 × unit direction
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Stress at element corners and center
The six stress components and von Mises stress at each element's eight corners and center, and the largest center value.
σ = scale × (E ÷ h) × S u_e − scale × E α ΔT ÷ (1 − 2ν) on the direct components
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Reactions and compliance
The support reactions and the work of the loads.
R = (K u − f) projected on the held directions; compliance = Σ fᵢ uᵢ
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Field value at a point
Interpolates a nodal result at a point inside the grid.
value = Σ wᵢ vᵢ ÷ Σ wᵢ over the active corners of the cell
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Lumped mass
The mass at each node for the modal analysis.
node mass = Σ over its elements of ρ h³ ÷ 8
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Natural frequencies
The lowest natural frequencies and mode shapes.
f = √λ ÷ (2π); stop when |λ − λ(previous)| ≤ 1e-6 × λ for every wanted mode
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Mesh volume and mass
The volume and mass reported with a study.
volume = elements × h³; mass (kg) = volume × ρ (t/mm³) × 1000
Voxel stress analysis: elements, loads, reactions and modes fea.js64-bit- PartCraft
-
Cylinder surface
A triangle surface of a cylinder with n sides.
(r cos(2π i ÷ n), r sin(2π i ÷ n))
CraftScript meshes and element kernels cs-lib-mesh.js64-bit- PartCraft
-
Sphere surface
A triangle surface of a sphere from rings and segments.
CraftScript meshes and element kernels cs-lib-mesh.js64-bit- PartCraft
-
Structured hexahedron grid
Node coordinates and elements of a box divided into equal cells.
x = o + l × i ÷ n
CraftScript meshes and element kernels cs-lib-mesh.js64-bit- PartCraft
-
Voxel mesh nodes
Node coordinates of a voxel grid as a script mesh.
x = origin + i × h
CraftScript meshes and element kernels cs-lib-mesh.js64-bit- PartCraft
-
Hexahedron stiffness for a script
The 24 × 24 stiffness of a cube of side h.
K = E × h × K_unit
CraftScript meshes and element kernels cs-lib-mesh.js64-bit- PartCraft
-
Hexahedron stress operator for a script
The matrix that turns a cube's nodal displacements into stresses at its corners and center.
σ = (E ÷ h) × S u
CraftScript meshes and element kernels cs-lib-mesh.js64-bit- PartCraft
-
Mean stress of quadratic tetrahedra
Each element's stress as the average of its four Gauss points.
σ_e = ¼ Σ σ_gauss
CraftScript meshes and element kernels cs-lib-mesh.js64-bit- PartCraft
-
Voxel element stress for a script
Stress components and von Mises stress at the center of each voxel element.
σ = (E ÷ h) × S_center u_e
CraftScript meshes and element kernels cs-lib-mesh.js64-bit- PartCraft
-
Voxel solve for a script
Solves a voxel model for displacements with the multigrid conjugate gradient solver.
CraftScript meshes and element kernels cs-lib-mesh.js64-bit- PartCraft
-
Lattice Boltzmann fields for a script
Velocity and density of every cell as tensors.
CraftScript meshes and element kernels cs-lib-mesh.js64-bit- PartCraft
-
Fluid properties
Density and viscosity of air and water at 20 °C.
ρ_air = p ÷ (R T); μ_air = μ₀ (T ÷ T₀)^1.5 (T₀ + S) ÷ (T + S)
Flow study: lattice Boltzmann solver flow.js64-bit- PartCraft
-
Lattice links and boundary terms
Connects each fluid cell to its neighbors and sets the term of every boundary link.
moving wall: a = 6 wᵢ (cᵢ · u); interpolated wall when |q − ½| > 1e-6, q clamped to [0.001, 1]
Flow study: lattice Boltzmann solver flow.js64-bit- PartCraft
-
Population arriving from a boundary
The value a boundary link returns to its cell.
q < ½: 2q f_o + (1 − 2q) f_behind; q ≥ ½: (f_o + (2q − 1) f_q) ÷ (2q); pressure: −f_o + 2 wᵢ ρ_w (1 + 4.5 (c·u)² − 1.5 u²)
Flow study: lattice Boltzmann solver flow.js64-bit- PartCraft
-
Initial state and relaxation times
Fills every cell with the equilibrium for the starting velocity and sets the two relaxation rates.
f_eq = wᵢ (1 + 3 c·u + 4.5 (c·u)² − 1.5 u²); τ⁻ = ½ + Λ ÷ (τ − ½)
Flow study: lattice Boltzmann solver flow.js64-bit- PartCraft
-
Boundary links as linear terms
Writes every wall, moving-wall and slip link as two coefficients and a constant, for the time step's inner loop.
f = c₁ f₁ + c₂ f₂ + a; q < ½: c₁ = 2q, c₂ = 1 − 2q; q ≥ ½: c₁ = 1 ÷ (2q), c₂ = (2q − 1) ÷ (2q)
Flow study: lattice Boltzmann solver flow.js64-bit- PartCraft
-
One time step: stream and collide
Pulls the populations into each cell, takes density and velocity, and relaxes toward equilibrium.
ρ = Σ fᵢ; u = (Σ cᵢ fᵢ + F ÷ 2) ÷ ρ
Flow study: lattice Boltzmann solver flow.js64-bit- PartCraft
-
Collision with an eddy viscosity
The collision used in turbulent runs, with a per-cell viscosity and a stabilizer.
τ = ½ + 3(ν + ν_t); τ_s = ¼ + √(1/16 + 4.5 √2 C² |Π| ÷ ρ); τ = max(τ, τ_s)
Flow study: lattice Boltzmann solver flow.js64-bit- PartCraft
-
Mass through boundaries and force on walls
Sums the net mass rate per boundary group and the momentum-exchange force on the part.
mass = Σ (f_in − f_out); F = −Σ cᵢ (f_in + f_out)
Flow study: lattice Boltzmann solver flow.js64-bit- PartCraft
-
Stepping to a steady state
Repeats time steps until the velocity field stops changing.
res = √(Σ |u − u_prev|² ÷ Σ |u|²) ÷ steps between checks
Flow study: lattice Boltzmann solver flow.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.