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
-
Corner where two fitted lines meet
Places a corner of the sketch at the intersection of the two fitted lines on either side of it.
den = u_d × v_d; t = ((v_p − u_p) × v_d) ÷ den; corner = u_p + t·u_d
Photo to sketch: outline fitting and scale photo-sketch.js64-bit- PartCraft
-
Arc ends and refit
Extends each arc along the outline while the points stay on its circle, fits the circle again and puts the two end points on it.
grow while | |P − c| − r | ≤ min(0.75, tol ÷ 2); end = c + r·(P − c) ÷ |P − c|
Photo to sketch: outline fitting and scale photo-sketch.js64-bit- PartCraft
-
Squaring of near-horizontal and near-vertical lines
Makes a line that is within the squaring angle of horizontal or vertical exactly so, by giving both ends the same coordinate.
angle = |atan2(B_y − A_y, B_x − A_x)| in degrees; shared y = (A_y + B_y) ÷ 2 or shared x = (A_x + B_x) ÷ 2
Photo to sketch: outline fitting and scale photo-sketch.js64-bit- PartCraft
-
Scale of a silhouette
Millimeters per pixel from one stated length, and the mapping of pixel coordinates to sketch coordinates.
mm = stated length ÷ pixel extent; X = (x − x₀) × mm; Y = (y₁ − y) × mm
Photo to sketch: outline fitting and scale photo-sketch.js64-bit- PartCraft
-
Scale of a pen drawing
Millimeters per pixel for traced pen lines, from one stated length and the extent of the traced lines and arcs.
extent from line ends, arc ends and arc centers; mm = stated length ÷ extent
Photo to sketch: outline fitting and scale photo-sketch.js64-bit- PartCraft
-
Density unit change
Converts a material's density from kg/m³ to tonnes/mm³, the unit the solver uses.
ρ (t/mm³) = ρ (kg/m³) × 1e-12
Contact and magnet study results phys-worker.js64-bit- PartCraft
-
Element values averaged to nodes
Gives each node the mean of the values of the elements that share it.
value at a node = Σ element values ÷ number of elements at the node
Contact and magnet study results phys-worker.js64-bit- PartCraft
-
Maximum stress, plastic strain and displacement
The maxima the study reports, and where they occur.
|u| = √(u_x² + u_y² + u_z²); maximum over the elements (stress, plastic strain) and over the nodes (displacement)
Contact and magnet study results phys-worker.js64-bit- PartCraft
-
Per-vertex result arrays
Copies the nodal stress, plastic strain, displacement size and displacement vector to the vertices of the plot mesh.
Contact and magnet study results phys-worker.js32-bit in part- PartCraft
-
Placing a part's mesh in the assembly
Moves each mesh node of a placed part to the assembly frame with the instance's 4 × 4 matrix.
x′ = M · (x, y, z, 1)
Contact and magnet study results phys-worker.js64-bit- PartCraft
-
Contact penalty stiffness
Chooses the stiffness of the contact springs for each pair of touching faces when none is given.
k_n = autoPenalty(min(E_slave, E_master), h_min, factor); factor = 100 (frictionless) or 1000 (bonded)
Contact and magnet study results phys-worker.js64-bit- PartCraft
-
Total contact force and peak pressure
Adds the force at every contact point and finds the highest contact pressure.
F = Σ forceᵢ; p_max = max pressureᵢ
Contact and magnet study results phys-worker.js64-bit- PartCraft
-
Maximum flux density, forces and region areas
The largest flux density of a magnet study and where it is, the force on each requested body, and the area of each region.
B_max = max over the elements of |B|; region area = Σ element areas
Contact and magnet study results phys-worker.js64-bit- PartCraft
-
Flux density and potential fields
The flux density of every element and the magnetic vector potential of every node, as returned to the page.
Contact and magnet study results phys-worker.js32-bit in part- PartCraft
-
Maxima from a results file read back
The largest displacement and von Mises stress in a CalculiX results file read back onto the study's mesh.
σ_vm = √(½·((a − b)² + (b − c)² + (c − a)²) + 3·(d² + e² + f²)); |u| = √(u_x² + u_y² + u_z²)
Contact and magnet study results phys-worker.js64-bit- PartCraft
-
Dot product in chunks
Each thread sums its share of a dot product in chunks of 4096 entries.
P_c = Σ aᵢ·bᵢ over chunk c
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Sum of the chunk partials
Adds the chunk sums of a dot product in chunk order on the coordinating thread.
a·b = Σ P_c
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Conjugate-gradient update
Advances the solution and the residual by one step and sums the new residual's square.
x += α·p; r −= α·q; P_c = Σ rᵢ²
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Sparse matrix times vector
y = A·x for a matrix stored row by row, with the rows split between the threads.
y_r = Σ_k v_k · x[col_k]
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Voxel stiffness times vector
y = K·x for a voxel model without assembling K: each node gathers the contributions of its elements.
y_n = Σ over elements at n of s_e · (K_e · x_e) rows of n, plus the 3 × 3 penalty block of a constrained node
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Node-block preconditioner and smoother
Multiplies each node's three values by its 3 × 3 block, or adds a damped correction ω·M·(b − r).
dst = M·src or dst += ω · M · (b − src)
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Constraint projection
Sets the values of inactive nodes to zero and applies each constrained node's 3 × 3 projector.
v_n = 0 (inactive); v_n ← P_n · v_n (constrained)
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Multigrid restriction
Carries a residual from a fine grid to the grid of half the resolution.
r_c(N) = Σ over the 27 fine neighbors of w · r_f; w = product per axis of 1 (same node) or ½ (between nodes)
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Multigrid prolongation
Adds a coarse-grid correction to the fine grid by linear interpolation.
x_f(n) += w · Σ x_c over the 1, 2, 4 or 8 coarse nodes around n; w = ½ per axis in which n lies between coarse nodes
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Geometric stiffness times vector
y = s·(G ⊗ I₃)·x from per-element blocks, used by the buckling study.
y_n = s · Σ over elements at n of Σ_b G_e[a, b] · x_b
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Conjugate gradients for a voxel model
Solves K·u = f for a voxel stress model on the thread pool.
res = ‖r‖ ÷ ‖b‖; stop when res < tol; α = (r·z) ÷ (p·Kp); β = (r·z)_new ÷ (r·z)_old
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Conjugate gradients for a sparse matrix
Solves A·x = b for an assembled sparse matrix on the thread pool.
res = ‖r‖ ÷ ‖b‖; stop when res < tol; α = (r·z) ÷ (p·Ap)
Threaded solver kernels and conjugate gradients pool.js64-bit- PartCraft
-
Scale factors
The three factors a scale feature multiplies by, from the feature or from its shrinkage allowance.
Scale feature for printing print-features.js64-bit- PartCraft
-
Scale matrix about a fixed point
The 4 × 4 matrix that scales a body about the center, minimum corner, base center or origin of its box.
a = (min + max) ÷ 2 (center); translation = a × (1 − f)
Scale feature for printing print-features.js64-bit- PartCraft
-
Scaled triangles
Applies the scale to every corner of a body's triangles, with the box found from the triangles themselves.
x′ = f_x·x + t_x; y′ = f_y·y + t_y; z′ = f_z·z + t_z
Scale feature for printing print-features.js64-bit- PartCraft
-
Rotation about an axis
Turns a vector about a unit axis by an angle; used for a plane at an angle to another.
v′ = v·cos a + (u × v)·sin a + u·(u · v)·(1 − cos a)
Reference planes, axes and points refgeom.js64-bit- PartCraft
-
Point where three planes meet
The single point that lies on three planes.
solve [nₐ; n_b; n_c] · p = (nₐ·oₐ, n_b·o_b, n_c·o_c)
Reference planes, axes and points refgeom.js64-bit- PartCraft
-
Axis where two planes meet
The line of intersection of two planes: its direction and a point on it.
d = nₐ × n_b; solve nₐ·x = cₐ, n_b·x = c_b, d·x = d·(oₐ + o_b) ÷ 2
Reference planes, axes and points refgeom.js64-bit- PartCraft
-
Offset plane and plane at an angle
A plane parallel to another at a distance, and a plane turned about an axis by an angle in degrees.
o′ = o + n·d; n′ = rotate(n ⊥ axis, axis, angle × π ÷ 180)
Reference planes, axes and points refgeom.js64-bit- PartCraft
-
Plane through three points
The plane through three points, with its center at their mean.
n = (b − a) × (c − a); center = (a + b + c) ÷ 3
Reference planes, axes and points refgeom.js64-bit- PartCraft
-
Mid plane between two planes
The plane half way between two planes, or the one that bisects them when they are not parallel.
n = (nₐ − n_b) ÷ |nₐ − n_b|; c = (oₐ·nₐ − o_b·n_b) ÷ |nₐ − n_b|; parallel and same facing: o = oₐ + n·((o_b − oₐ)·n) ÷ 2
Reference planes, axes and points refgeom.js64-bit- PartCraft
-
Plane tangent to a cylinder
The plane that touches a cylindrical face on the side of a chosen point.
radial = w − d·(w · d); n = radial ÷ |radial|; o = foot on the axis + n·r
Reference planes, axes and points refgeom.js64-bit- PartCraft
-
Plane through a line and a point
The plane that contains a straight edge or axis and one more point.
n = d × (p − o)
Reference planes, axes and points refgeom.js64-bit- PartCraft
-
Where a line meets a plane or a cylinder
The point where a straight edge or axis crosses a plane, a flat face or a cylindrical face.
plane: t = ((o_s − o) · n) ÷ (d · n); cylinder: A·t² + B·t + C = 0, t = (−B ± √(B² − 4AC)) ÷ 2A
Reference planes, axes and points refgeom.js64-bit- PartCraft
-
Slider range of the section
The lowest and highest value of n·p over the model's box, the two ends of the section slider.
lo, hi = min, max of n · p over the 8 box corners
Section view plane section.js32-bit, display only- PartCraft
-
Section through a picked face
The cutting plane through a flat face, placed by the instance matrix of an assembly.
n = unit(M · n_face); c = n · (M · o_face)
Section view plane section.js32-bit, display only- PartCraft
-
Bend allowance
The length of the neutral layer through a bend, which the flat pattern gives to that bend.
BA = θ × (r + k × t)
Sheet metal bends and flat pattern sheetmetal.js64-bit- PartCraft
-
Chain of profile lines
Orders the lines of an open profile end to end, or reports that they are not one chain.
two ends are the same point when their distance ≤ 1e-6 × max(1, largest coordinate size)
Sheet metal bends and flat pattern sheetmetal.js64-bit- PartCraft
-
Bend angle, center and tangent length
For every corner of the profile: the signed bend angle, the radius on the path side and the offset side, the distance the bend takes from each leg, and the bend's center.
θ = atan2(u × w, u · w); d = r_path × tan(|θ| ÷ 2); c = P + left(u) × sign(θ) × r_path − u × d
Sheet metal bends and flat pattern sheetmetal.js64-bit- PartCraft
-
Arc of a bend in the profile
The arc of a bend between its two tangent points, with its middle point and 17 points along it.
sweep = a₁ − a₀ brought to (0, 2π] or [−2π, 0); point = c + r × (cos t, sin t)
Sheet metal bends and flat pattern sheetmetal.js64-bit- PartCraft
-
Straight runs between bends
The flat length of each leg: its drawn length less what the bends at its ends take.
straightⱼ = |Pⱼ₊₁ − Pⱼ| − dⱼ − dⱼ₊₁
Sheet metal bends and flat pattern sheetmetal.js64-bit- PartCraft
-
Developed length and bend lines
The total flat length of a bent profile and where each bend line lies on the flat.
length = Σ straights + Σ BA; bend line at x + BA ÷ 2; angle° = θ × 180 ÷ π
Sheet metal bends and flat pattern sheetmetal.js64-bit- PartCraft
-
Joining straight segments
Joins two straight segments of the flat outline that continue each other through a point no third segment touches.
collinear when |d₁ × d₂| ≤ 1e-9 × |d₁| × |d₂| and d₁ · d₂ > 0
Sheet metal bends and flat pattern sheet-flat.js64-bit- PartCraft
-
Points along an arc for the extent
Sampled points on an arc or circle of the flat, used to find its box.
point = c + r × (cos a, sin a), a = (a₀ + sweep × k ÷ n) × π ÷ 180
Sheet metal bends and flat pattern sheet-flat.js64-bit- PartCraft
-
Flat of a bent base
The developed rectangle of an open bent profile: flat length by depth, with its bend lines and area.
box = L × D; area = L × D
Sheet metal bends and flat pattern sheet-flat.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.