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.

  • 6,917 calculations in 1,248 source files
  • 143 exact
  • 6,286 in 64-bit
  • 335 with a 32-bit step
  • Last reviewed

Calculations

  • Smoothed surface mesh and its volume

    Smooths the surface, restores its volume, and returns the mesh with its volume.

    Generative design by topology optimization topopt.js
    • PartCraft
    32-bit in part
  • Surface smoothing

    Smooths the surface mesh without shrinking it as much as plain averaging would.

    p ← p + f (mean of neighbors − p), f alternating 0.5 and −0.53

    Generative design by topology optimization topopt.js
    • PartCraft
    64-bit
  • Volume restored after smoothing

    Moves every vertex along its normal by one distance so the mesh volume is the voxel volume again.

    d = (V₀ − V) ÷ area, three steps

    Generative design by topology optimization topopt.js
    • PartCraft
    64-bit
  • Volume of a closed mesh

    The volume enclosed by a triangle mesh.

    V = Σ a · (b × c) ÷ 6

    Generative design by topology optimization topopt.js
    • PartCraft
    64-bit
  • Check of the solid design

    The mass, volume, largest stress and displacement and the safety factor of the kept elements, solved again with the real material.

    volume = elements × h³; mass in kg = volume × ρ (t/mm³) × 1000; safety = yield ÷ max von Mises

    Generative design by topology optimization topopt.js
    • PartCraft
    64-bit
  • Compliance for another material

    Rescales the compliance of a shape when an outcome uses a different material.

    c = c₀ × E₀ ÷ E

    Generative design by topology optimization topopt.js
    • PartCraft
    64-bit
  • Unit vector

    Scales a vector to length 1.

    a ÷ |a|

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Frame of a plane

    The origin and the x, y and normal axes given to a sketch plane.

    o = (p·n) n; x = Y × n (or world X made square to n when |n_y| > 0.9); y = n × x

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Sketch point to model space

    The 3D position of a sketch point (u, v) on its plane.

    p = o + u x + v y

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Model point to sketch coordinates

    The sketch coordinates of a 3D point on a plane.

    u = (p − o)·x; v = (p − o)·y

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Rotation about an axis

    The matrix that turns geometry by an angle about an axis through a point.

    R = c I + s [d]× + (1 − c) d dᵀ, c = cos a, s = sin a, a = deg × π ÷ 180; translation = p − R p

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Reflection in a plane

    The matrix that mirrors geometry in a plane.

    M = I − 2 n nᵀ; translation = 2 (o·n) n

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Matrix applied to a point

    Transforms a point by a 4 × 4 matrix.

    p′ = M₃ₓ₃ p + t

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Matrix product

    Multiplies two 4 × 4 matrices.

    C = A B

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Small linear system

    Solves A x = b for a small dense system.

    Gaussian elimination with partial pivoting, then back substitution

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Number shown with up to four decimals

    Formats a length or number for display.

    text = value rounded to dp decimals (4 by default); |value| < 10⁻⁹ shown as 0

    Vectors, plane frames and transforms vec.js
    • PartCraft
    64-bit
  • Triangle buffer for drawing

    Copies the part's mesh into the vertex buffer the GPU draws.

    3D view of the part view3d.js
    • PartCraft
    32-bit, display only
  • Result colors on the part

    Spreads per-vertex or per-corner result colors onto the drawn triangles.

    3D view of the part view3d.js
    • PartCraft
    32-bit, display only
  • What is under the pointer

    Finds the face, edge or plane under the pointer.

    3D view of the part view3d.js
    • PartCraft
    32-bit, display only
  • Grid size and origin

    The number of cubes along each axis and where the grid starts.

    n = max(1, ceil(size ÷ h − 10⁻⁶)); origin = box center − n h ÷ 2

    Voxel grid of a part voxel.js
    • PartCraft
    64-bit
  • Bounding box of the mesh

    The smallest box around the part's surface triangles.

    Voxel grid of a part voxel.js
    • PartCraft
    64-bit
  • Study size estimate

    The rough element count, node count and memory shown before a voxel study is meshed.

    elements ≈ round(volume ÷ h³)

    Voxel grid of a part voxel.js
    • PartCraft
    64-bit
  • Where a row's ray crosses the surface

    The x positions at which the ray through a row of cube centers enters and leaves the part.

    x = (w₀ xₐ + w₁ x_b + w₂ x_c) ÷ (w₀ + w₁ + w₂), w from the y/z projection

    Voxel grid of a part voxel.js
    • PartCraft
    64-bit
  • Cubes between two crossings

    Marks the cubes of a row whose centers lie between an entry and an exit crossing.

    i from ceil((x_in − origin) ÷ h − 0.5) to floor((x_out − origin) ÷ h − 0.5)

    Voxel grid of a part voxel.js
    • PartCraft
    64-bit
  • Position of a grid node

    The coordinates of a grid node from its index.

    p = origin + (i, j, k) × h

    Voxel grid of a part voxel.js
    • PartCraft
    64-bit
  • Distance from a point to a triangle

    The squared distance from a grid node or cube center to a surface triangle.

    Voxel grid of a part voxel.js
    • PartCraft
    64-bit
  • Faces nearest a point

    Which of the part's faces a grid node lies on, with each face's normal there.

    faces with d² ≤ max(d_min² + (10⁻³ h)², (d_min + 10⁻³ h)²)

    Voxel grid of a part voxel.js
    • PartCraft
    64-bit
  • Tributary area of surface nodes

    The share of a picked face's area carried by each grid node, used to spread loads.

    each exposed cube face with all four corners on the picked faces gives h² ÷ 4 to each corner; area = Σ h²

    Voxel grid of a part voxel.js
    • PartCraft
    64-bit
  • Mean outward normal at picked nodes

    The direction used for pressure and normal force at each node of a picked face.

    n = Σ face normals ÷ |Σ face normals|

    Voxel grid of a part voxel.js
    • PartCraft
    32-bit in part
  • Cubes near picked faces

    Marks the cubes whose centers are within a distance of picked faces, for preserve and obstacle regions.

    kept when the distance from the cube center to the faces' triangles ≤ dist

    Voxel grid of a part voxel.js
    • PartCraft
    64-bit
  • Section outline at its anchor

    The section's outline moved so the chosen anchor point sits on the member's line, with its width, height and radius.

    w = u_max − u_min; h = v_max − v_min; R = max |point|

    Structural members and their cut list weldment.js
    • PartCraft
    64-bit
  • Member orientation

    The across and depth directions of a member's section about its line.

    v = up − (up·d) d, normalized; u = v × d; then rotated about d

    Structural members and their cut list weldment.js
    • PartCraft
    64-bit
  • When line ends meet

    The distance within which two line ends count as one joint.

    tol = 10⁻⁶ × max(1, largest |end point|, longest member)

    Structural members and their cut list weldment.js
    • PartCraft
    64-bit
  • How far a member runs past a corner

    The extra length a raw member needs so a miter cut still has material.

    ext = min(50 R, R ÷ max(tan(angle ÷ 2), 0.02)) + R

    Structural members and their cut list weldment.js
    • PartCraft
    64-bit
  • Miter cut plane

    The plane halfway between two members that both are cut on.

    n = (d_in + d_out) ÷ |d_in + d_out|; offset = n·P

    Structural members and their cut list weldment.js
    • PartCraft
    64-bit
  • Butt cut planes

    Where the through member ends and where the other is cut square against it.

    reach = max |(u U + v V)·d| over the outline; offsets = ∓(d·P) ∓ reach

    Structural members and their cut list weldment.js
    • PartCraft
    64-bit
  • Gusset plate

    The triangular plate in a corner and the angle listed for it.

    corners (0, 0), (s, 0), (s d_out·x, s d_out·y); angle = acos(x·d_out)

    Structural members and their cut list weldment.js
    • PartCraft
    64-bit
  • Cut length and end angles of a member

    The length of each finished piece along its line and the angle of each end cut, as stored in the cut list.

    length = round((max s − min s) × 10) ÷ 10, s = (vertex − a)·d; angle = round(acos(|cut·d|) × 180 ÷ π × 100) ÷ 100

    Structural members and their cut list weldment.js
    • PartCraft
    32-bit in part
  • Cut list rows

    Groups identical pieces and counts them.

    same piece when section, length to one decimal, both angles and both end kinds match

    Structural members and their cut list weldment.js
    • PartCraft
    32-bit in part
  • Cut list CSV

    Writes the cut list as CSV text.

    member: length with one decimal; cap: w × h with one decimal

    Structural members and their cut list weldment.js
    • PartCraft
    32-bit in part
  • Cage move from the gizmo

    The transform applied to the selected cage vertices while the gizmo is dragged.

    M = W_now × W_start⁻¹

    Freeform cage edits from the workspace ws-form.js
    • PartCraft
    64-bit
  • Point for a new face

    The position stored when a face is drawn by clicks.

    existing vertex within 9 px, else ray ∩ plane y = 0 rounded to 0.001

    Freeform cage edits from the workspace ws-form.js
    • PartCraft
    64-bit
  • Direction of an edge extrusion

    The direction and distance open edges are extruded by.

    d = Σ (edge middle − face center); offset = d ÷ |d| × distance

    Freeform cage edits from the workspace ws-form.js
    • PartCraft
    64-bit
  • Tolerance for joining a new face

    The distance within which a new face's points join existing cage vertices.

    tol = 10⁻⁶ × max(1, size setting)

    Freeform cage edits from the workspace ws-form.js
    • PartCraft
    64-bit
  • Picked point as an anchor

    The anchor position in the part's own axes and the face normal at the pick.

    p = M⁻¹ p_pick, each coordinate rounded to 6 decimals; n = (b − a) × (c − a) ÷ length

    Anchor points of manual annotations ws-illustrate.js
    • PartCraft
    64-bit
  • Is a face square to the tool axis

    Decides whether a picked flat or round face can be machined from the setup's tool axis.

    accepted when ||n·axis| − 1| ≤ 10⁻⁹

    Machining picks and readouts ws-manufacture.js
    • PartCraft
    64-bit
  • Matching a pick to one already stored

    Decides whether a clicked face is already in the operation's geometry, to add or remove it.

    same when names agree and |at − ref| < 10⁻³

    Machining picks and readouts ws-manufacture.js
    • PartCraft
    64-bit
  • Numbers shown in the panel

    Formats stock sizes, feeds, gouge depth and remaining stock for the panel.

    text = value rounded to dp decimals (3 by default), trailing zeros dropped

    Machining picks and readouts ws-manufacture.js
    • PartCraft
    64-bit
  • Part mesh for scripts

    The open part as a triangle mesh a script can compute on through part().

    Script workspace: the part handed to scripts and picked values ws-script.js
    • PartCraft
    32-bit in part
  • Picked point and nearest node

    The coordinates of the clicked point and the mesh node closest to it.

    node = the hit triangle's corner with the least √(Δx² + Δy² + Δz²) to the hit point

    Script workspace: the part handed to scripts and picked values ws-script.js
    • PartCraft
    32-bit in part

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.