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
-
Brush falloff
How strongly a vertex follows the brush, from 1 at its middle to 0 at its edge.
w(x) = 1 − 3x² + 2x³ for 0 < x < 1; 1 for x ≤ 0; 0 for x ≥ 1
Sculpt brushes mesh/sculpt.js64-bit- ModelCraft
-
Vertex normals for sculpting
A unit normal per vertex from the triangles round it, weighted by triangle area.
N(v) = unit(Σ (b − a) × (c − a))
Sculpt brushes mesh/sculpt.js64-bit- ModelCraft
-
Vertices under the brush
The vertices within the brush radius of its center, each with its falloff weight.
d² = |P(v) − p|² ≤ r²; w = falloff(√d² ÷ r)
Sculpt brushes mesh/sculpt.js64-bit- ModelCraft
-
Brush plane
The normal and center of the surface under the brush, and the size of one step.
n = unit(Σ wᵢ·Nᵢ); c = Σ wᵢ·Pᵢ ÷ Σ wᵢ; step = 0.1·r·k, k = strength × pressure
Sculpt brushes mesh/sculpt.js64-bit- ModelCraft
-
Brush moves
The new position of each vertex under the brush for draw, inflate, flatten, clay, smooth, pinch and crease.
f = w·(1 − mask); draw: p + n·(±step·f); inflate: p + N(v)·(±step·f); flatten: p − n·dd·min(1, f·max(0.1, k)), dd = (p − plane)·n; smooth: p + (mean of neighbors − p)·min(1, f·max(0.1, k))
Sculpt brushes mesh/sculpt.js32-bit in part- ModelCraft
-
Grab
Moves the vertices that were under the brush at the start of the stroke by the pointer's move.
p = p₀ + δ·w·(1 − mask)
Sculpt brushes mesh/sculpt.js32-bit in part- ModelCraft
-
Painting the mask
Raises or lowers the mask of the vertices under the brush, between 0 and 1.
mask = clamp(mask ± w·k, 0, 1)
Sculpt brushes mesh/sculpt.js32-bit in part- ModelCraft
-
Split an edge at its middle
The new vertex when dynamic detail splits a long triangle edge.
mid = (P_a + P_b) ÷ 2
Sculpt brushes mesh/sculpt.js64-bit- ModelCraft
-
Brush radius in mesh units
Turns the brush's radius in pixels into a length in the mesh's own space at the point under the pointer.
r = px × pixel size at w ÷ scale, scale = |first column of the placement matrix|
Sculpt brushes mesh/sculpt-tool.js64-bit- ModelCraft
-
Dabs along a stroke
Places dabs a quarter of the brush radius apart between the last dab and the pointer.
step = 0.25·r; k = min(32, floor(d ÷ step)); pᵢ = last + (hit − last)·i ÷ k
Sculpt brushes mesh/sculpt-tool.js64-bit- ModelCraft
-
Storing an unwrap
Checks which way up the flattened island came out and writes its UVs to the mesh.
signed = Σ over triangles of (u_b − u_a)(v_c − v_a) − (u_c − u_a)(v_b − v_a); u is negated when signed < 0
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
Are two UVs the same
Decides whether two face corners share a UV point, which decides where UV islands end.
|u_a − u_b| ≤ 1e-7 and |v_a − v_b| ≤ 1e-7
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
Box projection
Maps each face onto the side of a box its normal faces most.
u = (pᵢ − loᵢ) ÷ s, v = (pⱼ − loⱼ) ÷ s; u → 1 − u on the sides seen from behind
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
Cylinder projection
u is the angle round an axis through the faces' center, v the height along it.
u = (atan2(p_j − c_j, p_i − c_i) ÷ 2π + 1) mod 1; v = (p_k − lo_k) ÷ height
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
Sphere projection
u is the angle round the axis, v the latitude, seen from the faces' center.
d = p − c; u = (atan2(d_j, d_i) ÷ 2π + 1) mod 1; v = 1 − acos(clamp(d_k ÷ |d|, −1, 1)) ÷ π
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
View projection
UVs from where each corner appears on screen, fitted to the unit square.
s = max(1e-12, width, height); u = (x − x₀) ÷ s; v = 1 − (y − y₀) ÷ s
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
Smallest bounding rectangle
The rotation that makes an island's bounding rectangle smallest.
for each hull edge: θ = −atan2(Δy, Δx); area = (x₁ − x₀)·(y₁ − y₀) of the rotated hull; keep the smallest
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js64-bit- ModelCraft
-
Packing: island scale
Scales each island so that its UV area matches its area on the mesh.
A₃ = Σ |(b − a) × (c − a)| ÷ 2; A₂ = Σ |UV triangle area|; k = √(A₃ ÷ A₂)
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
Packing: placing the islands
Places the islands' rectangles on shelves and scales the whole layout into the unit square.
pad = margin·√(total area)·1.1; widths tried: max(widest, √(sum of areas)·(0.7 + 0.05·k)), k = 0…23; uv = (offset + pad + point) ÷ side
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
Stretch per face
How much each face's UVs distort it, from 0 for none to 1 for a lot.
σ₁,₂ = √(tr ÷ 2 ± √(tr² ÷ 4 − det)); angle: 1 − σ₂ ÷ σ₁; area: min(1, |ln(σ₁·σ₂)| ÷ ln 4); per face: area-weighted mean over its triangles
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
Move, rotate and scale UVs
Moves, turns or scales the selected faces' UVs about their mean as the pointer moves in the UV editor.
move: (u + Δu, v + Δv); rotate by a = atan2(v₁ − c_v, u₁ − c_u) − atan2(v₀ − c_v, u₀ − c_u); scale by k = |p₁ − c| ÷ max(1e-9, |p₀ − c|)
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv-editor.js32-bit in part- ModelCraft
-
UVs and sharp edges of a primitive
Stores a new primitive's positions, its UVs per face corner and the flags of its sharp edges.
sharp when n₁·n₂ < cos(sharpDeg·π ÷ 180)
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/primitives.js32-bit in part- ModelCraft
-
Draft angle
The angle between a surface normal and the plane square to the pull direction, in degrees.
angle = asin(clamp(n · pull, −1, 1)) × 180 ÷ π
Draft and curvature analysis analysis.js64-bit- PartCraft
-
Areas by draft class
The surface area with enough draft, with too little, and facing away from the pull.
area = |(B − A) × (C − A)| ÷ 2; each corner adds area ÷ 3 to its class
Draft and curvature analysis analysis.js32-bit in part- PartCraft
-
Curvature color limit
The curvature value (1/mm) at which the colors reach full blue or red, stated in the panel with its radius.
lim = 95th percentile of |mean curvature|; color weight = clamp(mean ÷ lim, −1, 1)
Draft and curvature analysis analysis.js32-bit in part- PartCraft
-
View scale and position on the sheet
Picks the drawing scale and maps view coordinates to sheet millimeters.
scale = first s with w × s ≤ 0.78 × frame width and h × s ≤ 0.78 × frame height; sheet = origin + (u − u₀) × scale
Assembly drawing sheet and mesh exports asm-drawing.js64-bit- PartCraft
-
Mass text in the bill of materials
Formats a part's mass for the drawing's parts table.
g ≥ 1000: kg with 3 decimals; else g with 2 decimals
Assembly drawing sheet and mesh exports asm-drawing.js64-bit- PartCraft
-
Assembly as one mesh
Moves every part's mesh to its place in the assembly and joins them, for STL export and the 3D-printing check.
p′ = M × p for each vertex
Assembly drawing sheet and mesh exports asm-drawing.js32-bit in part- PartCraft
-
Numbers written to 3MF
Turns a coordinate or a matrix entry into the text stored in the 3MF file.
text = toPrecision(9) of v; |v| < 1e-12 → 0
Assembly drawing sheet and mesh exports asm-drawing.js64-bit- PartCraft
-
Instance placement in 3MF
Converts each instance's placement from Y-up to Z-up and writes it as the item transform.
T = Y_TO_Z × M × Z_TO_Y; 12 entries written row by row
Assembly drawing sheet and mesh exports asm-drawing.js64-bit- PartCraft
-
Overlap volume of a pair
The common volume of two placed parts and whether it counts as a clash.
v = volume(A ∩ B); clash when v > 1e-6
Interference between assembly parts assembly.js32-bit in part- PartCraft
-
Thread zones
Tubes around each cosmetic thread, used to tell a bolt in a tapped hole from a real clash.
r₀ = 0.97 × minor (default 0.8 × major); r₁ = 1.03 × major + 0.001; length = depth + 2 × max(0.05 × major, 0.001)
Interference between assembly parts assembly.js64-bit- PartCraft
-
Motion check steps
Steps one joint value from a start to an end and reports interference at each step.
value_s = from + (to − from) × s ÷ steps, s = 0 … steps
Interference between assembly parts assembly.js64-bit- PartCraft
-
Mesh tolerances
How closely the triangle mesh follows the exact faces.
linear = 2e-4 × bounding-box diagonal; angular = 2π ÷ max(16, resolution)
Exact solid: mesh, volume, area and tables brep.js64-bit- PartCraft
-
Mesh read from the kernel
Copies the mesh's vertices, normals and triangles out of the kernel's memory.
vertices and normals: Float32Array view of the WebAssembly buffer
Exact solid: mesh, volume, area and tables brep.js32-bit in part- PartCraft
-
Welding the mesh
Merges vertices that different faces share so the mesh is watertight.
same vertex when x, y and z are identical
Exact solid: mesh, volume, area and tables brep.js32-bit in part- PartCraft
-
Volume and surface area
The solid's volume and total surface area, from the exact faces.
V = ∭ dV (Gauss–Kronrod, tolerance 1e-12, when a non-line, non-circle edge exists); A = ∬ dA
Exact solid: mesh, volume, area and tables brep.js64-bit- PartCraft
-
Genus
The number of through holes (handles) of the solid, from the welded mesh.
χ = V − E + F; genus = round(bodies − χ ÷ 2)
Exact solid: mesh, volume, area and tables brep.js64-bit- PartCraft
-
Face area and center
Each face's area and center point, listed with the face.
area = ∬ dA over the face; center = its centroid
Exact solid: mesh, volume, area and tables brep.js64-bit- PartCraft
-
Edge length and points
Each edge's length, end points and middle point.
length = ∫ |C′(t)| dt; middle = C((t₀ + t₁) ÷ 2)
Exact solid: mesh, volume, area and tables brep.js64-bit- PartCraft
-
Bounding box
The smallest axis-aligned box around a shape.
min, max per axis from the kernel's optimal box
Exact solid: mesh, volume, area and tables brep.js64-bit- PartCraft
-
Facts about an imported STEP file
The solid count, face count, volume and bounding box shown when a STEP file is imported.
volume = ∭ dV (default integration)
Exact solid: mesh, volume, area and tables brep.js64-bit- PartCraft
-
Stock block
The size and position of the stock around the part.
offset mode: min = box min − (side, side, bottom), max = box max + (side, side, top); cylinder: r = ½ × box diagonal in XY + side
Part and stock in machine coordinates cam.js64-bit- PartCraft
-
Work origin and frame change
Moves points from model coordinates to the work frame (G54) and back.
work = (p · x, p · y, p · z) − origin
Part and stock in machine coordinates cam.js64-bit- PartCraft
-
Mesh in the work frame and snap tolerance
Copies the part's mesh into work coordinates and sets how close a mesh point must be to an exact edge to be taken as that edge.
tol = 1e-4 + 2e-6 × largest model dimension
Part and stock in machine coordinates cam.js32-bit in part- PartCraft
-
Where a vertical line meets the part
The heights at which a vertical line through (x, y) crosses the part's surface.
weights l₁, l₂, l₃ from the triangle's XY corners; z = l₁ z₁ + l₂ z₂ + l₃ z₃
Part and stock in machine coordinates cam.js32-bit in part- PartCraft
-
Top facet and its slope
The height and slope of the highest mesh triangle under a point, used by 3D finishing.
g_x = ((z₂ − z₁)(y₃ − y₁) − (z₃ − z₁)(y₂ − y₁)) ÷ d₂; g_y likewise
Part and stock in machine coordinates cam.js32-bit in part- PartCraft
-
Material below a point
Whether there is part material just under a height at (x, y), used to tell a through hole from a blind one.
first surface below z faces up
Part and stock in machine coordinates cam.js32-bit in part- PartCraft
-
Circles of round edges
The center and radius of each circular edge lying in a plane square to the tool.
full circle: c = (a + mid) ÷ 2, r = |a − mid| ÷ 2; arc: circle through a, mid, b
Part and stock in machine coordinates cam.js64-bit- PartCraft
-
Circle through three points
The center and radius of the circle through three 2D points.
d = 2 (a_x (b_y − c_y) + b_x (c_y − a_y) + c_x (a_y − b_y)); u_x = (|a|² (b_y − c_y) + |b|² (c_y − a_y) + |c|² (a_y − b_y)) ÷ d
Part and stock in machine coordinates cam.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.