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

  • Torus cage

    The vertices of a torus-shaped starting cage.

    ((R + r cos b) cos a, r sin b, (R + r cos b) sin a), a = 2π i ÷ n, b = 2π j ÷ m

    Freeform bodies: subdivision surface and cage edits form.js
    • PartCraft
    64-bit
  • Mirror partners

    Finds each vertex's partner across the symmetry plane.

    q = p mirrored; partner when |v − q| ≤ 1e-6 × size

    Freeform bodies: subdivision surface and cage edits form.js
    • PartCraft
    64-bit
  • Rebuilding the mirrored half

    Keeps one side of the symmetry plane and mirrors it.

    mirror: x' = 2 × at − x

    Freeform bodies: subdivision surface and cage edits form.js
    • PartCraft
    64-bit
  • Moving, rotating and scaling vertices

    Applies a 4 × 4 transform to the selected vertices, with an optional soft falloff and mirrored motion.

    p' = p + w (M p − p); soft weight w = (1 − (d ÷ R)²)²

    Freeform bodies: subdivision surface and cage edits form.js
    • PartCraft
    64-bit
  • Extruding faces

    Moves a region of faces along its averaged normals and adds side walls.

    new vertex = v + dist × (Σ face normals at v) ÷ |Σ face normals at v|

    Freeform bodies: subdivision surface and cage edits form.js
    • PartCraft
    64-bit
  • Face normal

    The area-weighted normal of a cage face with any number of corners.

    n_x = Σ (p_y − q_y)(p_z + q_z), and cyclic

    Freeform bodies: subdivision surface and cage edits form.js
    • PartCraft
    64-bit
  • Flattening vertices onto a plane

    Projects the selected vertices onto a given plane or their best-fit plane.

    p' = p − n ((p − o) · n)

    Freeform bodies: subdivision surface and cage edits form.js
    • PartCraft
    64-bit
  • Best-fit plane normal

    The direction in which a set of centered points varies least.

    A = Σ p pᵀ; normal = eigenvector of the smallest eigenvalue

    Freeform bodies: subdivision surface and cage edits form.js
    • PartCraft
    64-bit
  • Adding a face through points

    Adds a face, reusing existing vertices that are close to the given points.

    reuse a vertex when |q − p| ≤ 1e-6

    Freeform bodies: subdivision surface and cage edits form.js
    • PartCraft
    64-bit
  • Bridging two loops

    Joins two loops of equal size with rows of quads.

    offset = argmin Σ |aᵢ − b₍offset − i₎|²; row vertex = a + (b − a) × r ÷ segments

    Freeform bodies: subdivision surface and cage edits form.js
    • PartCraft
    64-bit
  • Smooth surface for display

    The limit positions of the refined cage as a triangle mesh.

    Freeform bodies: display mesh form.js
    • PartCraft
    32-bit, display only
  • Tolerance and roughness text

    The text of a tolerance value or an Ra value on the drawing.

    text = value rounded to 4 decimals

    Drawing annotations: tolerance frames, datums and surface finish gdt.js
    • PartCraft
    64-bit
  • Circle and arc points

    The points of a circle or arc in a symbol.

    (c_x + r cos t, c_y + r sin t), t = a₀ + sweep × i ÷ n

    Drawing annotations: tolerance frames, datums and surface finish gdt.js
    • PartCraft
    64-bit
  • Annotation layout

    The frame, compartments, leader, datum triangle and surface texture legs of one annotation.

    frame height = 2h; datum triangle height = side × √3 ÷ 2; texture legs at 60°: offset = leg ÷ tan(π ÷ 3)

    Drawing annotations: tolerance frames, datums and surface finish gdt.js
    • PartCraft
    64-bit
  • Point on a B-spline curve

    The point of a curve at a parameter, from its poles and knots.

    C(t) = Σ Nⱼ(t) × Pⱼ over the p + 1 poles of the span

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Point on a B-spline surface

    The point of the surface at (u, v), from its pole grid and two knot vectors.

    S(u, v) = Σᵢ Σⱼ Nᵢ(u) × Nⱼ(v) × Pᵢⱼ

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Interpolation knots by averaging

    The knot vector used to interpolate points at given parameters.

    inner knot j = (t_j + … + t_(j+p−1)) ÷ p

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Band solve for interpolation

    Factors the collocation matrix once and solves for the poles of every curve that shares its parameters.

    N × P = Q, with N banded; LU without pivoting, then forward and back substitution

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Degree raising and knot refinement

    Re-expresses a curve with a higher degree or more knots without changing its shape.

    new poles = solve(N_fine(g), C(g)), g = Greville points of the finer knot vector

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Merged knot vector

    The smallest knot vector that contains the knot vectors of several curves.

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Joining exact curves end to end

    Makes one B-spline from a chain of lines and splines, with a corner knot at each joint.

    knot = a + (b − a) × u for each piece's inner knots; joint knots repeated d times

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Sketch chains as world curves

    Turns the chosen lines, arcs, circles and splines of a sketch into curves over 0 to 1, one per chain.

    share of a piece = its length ÷ total length; arc length = r × sweep; circle = 2π × r

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Closest points of two segments

    The nearest pair of points on two straight segments, used to find where two curves may cross.

    s = (b·f − c·e) ÷ (a·e − b²), t = (b·s + f) ÷ e, both clamped to 0…1

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Crossing of two curves

    The parameters on a profile and a guide where they meet, and the gap between them there.

    minimize |A(s) − B(t)|² by Gauss–Newton; point = (A(s) + B(t)) ÷ 2; gap = |A(s) − B(t)|

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • All crossings of a profile and a guide

    Finds every place two curves come within the gap tolerance, so the network can be checked to be a grid.

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Common parameters of a curve family

    The shared parameter at which every profile (or guide) meets each curve of the other family.

    t_q = mean over the curves of (x_q − x_first) ÷ (x_last − x_first)

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Monotone reparametrization

    A smooth increasing map from the common parameters to one curve's own crossing parameters.

    m_k = (w₁ + w₂) ÷ (w₁ ÷ d_(k−1) + w₂ ÷ d_k); cubic Hermite on each interval

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Distance from a point to a curve

    How far a point of the fitted surface or curve is from the true curve near a given parameter range.

    golden-section search for the minimum of |g(t) − q|

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Making a curve family compatible

    Gives every profile (or every guide) the same degree and knots, exactly when possible and by fitting otherwise.

    exact: raise degree, merge knots; otherwise: cubic interpolation of C(r(s)), points doubled until error ≤ fitTol

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Boolean sum of the three surfaces

    Adds the surface through the profiles and the surface through the guides and subtracts the surface through the grid points.

    P = Lu + Lv − T, pole by pole

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Tangency to a plane along a boundary

    Makes the surface leave a boundary curve tangent to a plane and reports the angle it made with the plane before.

    second pole row: q ← a + (d − n × (d·n)), d = q − a; angle = asin(|d·n| ÷ |d|)

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Deviation from the input curves

    The largest distance between the finished surface and any profile or guide, shown in the panel.

    dev = max over 401 samples per curve of |S(s) − C(r(s))|

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Fold check

    Refuses a surface whose normal flips between neighboring sample points.

    n = (S(u + h, v) − S(u − h, v)) × (S(u, v + h) − S(u, v − h)), h = 1e-7; fold if n₁·n₂ < 0

    Surface through a network of curves gordon.js
    • PartCraft
    64-bit
  • Point on the handle axis nearest the pointer ray

    How far along the handle's axis the pointer is, read from the pointer's ray.

    t = (b·e − c·d) ÷ (a·c − b²)

    Depth and angle set by dragging a handle handle-math.js
    • PartCraft
    64-bit
  • Dragged extrude depth

    The depth stored on the Extrude after a drag.

    depth = max(step, round((v₀ + scale × (t − t₀)) ÷ step) × step), step = max(0.01, 10^⌊log₁₀|v₀|⌋ ÷ 10)

    Depth and angle set by dragging a handle handle-math.js
    • PartCraft
    64-bit
  • Dragged revolve angle

    The angle stored on the Revolve after a drag.

    angle = atan2(q·w, q·u) in degrees, unwrapped toward the previous value, rounded to 1°, kept in 1…360

    Depth and angle set by dragging a handle handle-math.js
    • PartCraft
    64-bit
  • Hull mesh taken from the built part

    Copies the part's triangle mesh for the hull calculation.

    Hull hydrostatics and righting arms hydrostatics.js
    • PartCraft
    32-bit in part
  • Volume, moments and waterplane under a waterline

    Clips the mesh at the waterline and sums the wet volume, its first moments, the wetted area and the waterplane's boundary integrals.

    V = Σ a·(b × c) ÷ 6; ∫x dV = ½ ∮ x² nₓ dS; A = ½ Σ (pₓ q_z − qₓ p_z); ∫z² dA = Σ (p_z² + p_z q_z + q_z²)(pₓ q_z − qₓ p_z) ÷ 12

    Hull hydrostatics and righting arms hydrostatics.js
    • PartCraft
    32-bit in part
  • Hydrostatic properties at a draft

    Volume, displacement, KB, LCB, waterplane area and centroid, BM, KM, block and waterplane coefficients, and mass per unit immersion.

    V = V_skin + h × A ÷ 3; I_T = ∫z² dA − A × c_z²; BM = I ÷ V; KM = KB + BM; Δ = V × 1e-9 × ρ

    Hull hydrostatics and righting arms hydrostatics.js
    • PartCraft
    32-bit in part
  • Righting arms at fixed displacement

    The righting arm GZ at each heel angle, the metacentric height GM, the largest GZ and the angle where stability vanishes.

    GZ = z(B) − (keel + KG) × sin θ; GM = KM_T − KG; vanishing angle by linear interpolation between samples

    Hull hydrostatics and righting arms hydrostatics.js
    • PartCraft
    32-bit in part
  • Units and rounding of the answer

    Converts the hull results to meters, square meters, cubic meters and tonnes for the tool's answer.

    value_m = round(value_mm ÷ 1000 × 10⁴) ÷ 10⁴; volume_m³ = round(V ÷ 1e9 × 10⁴) ÷ 10⁴

    Hull hydrostatics and righting arms hydrostatics.js
    • PartCraft
    32-bit in part
  • Coordinate and direction text

    Formats a coordinate or a direction component as a STEP real.

    text = v.toFixed(digits), trailing zeros removed; digits = 6 for points, 12 for directions

    IFC export of parts, assemblies and library items ifc-export.js
    • PartCraft
    64-bit
  • Quantity and property value text

    Formats a volume, area, mass, length or parameter value as a STEP real.

    text = Number(v.toPrecision(12))

    IFC export of parts, assemblies and library items ifc-export.js
    • PartCraft
    64-bit
  • Triangulated body

    Writes the vertices and triangles of the built mesh as an IfcTriangulatedFaceSet.

    (x, y, z) → (x, −z, y), each written with 6 decimals

    IFC export of parts, assemblies and library items ifc-export.js
    • PartCraft
    32-bit in part
  • Volume, area, weight and overall size

    The quantity sets of an element: net volume in m³, net surface area in m², net weight in kg and the box dimensions in mm.

    V_m³ = V_mm³ × 1e-9; A_m² = A_mm² × 1e-6; weight_kg = V_mm³ × density_g/cm³ × 1e-6; size = |max − min|

    IFC export of parts, assemblies and library items ifc-export.js
    • PartCraft
    64-bit
  • Volume and area of a library item's body

    Volume, surface area and bounding box of a library item's mesh for its quantities.

    V = |Σ a·(b × c) ÷ 6|; A = Σ |(b − a) × (c − a)| ÷ 2

    IFC export of parts, assemblies and library items ifc-export.js
    • PartCraft
    64-bit
  • Placement of an assembly instance

    Turns an instance's 4 × 4 matrix into an IFC axis placement: location, local z axis and local x axis.

    location = C(column 3); Axis = C(column 1); RefDirection = C(column 0); C(x, y, z) = (x, −z, y)

    IFC export of parts, assemblies and library items ifc-export.js
    • PartCraft
    64-bit
  • Extrude height and start

    The height of the extruded tool and where it starts along the sketch normal, for blind, two-sided, mid-plane and through-all ends.

    two-sided: h = depth + depth₂; mid-plane: z₀ = −h ÷ 2; through all: h = extent + 1 + 0.01 × (max − min)

    Feature tool dimensions on the mesh kernel kernel.js
    • PartCraft
    64-bit
  • Revolve profile in axis coordinates

    Turns each profile point into a radius from the axis and a height along it before the profile is revolved.

    r = max(0, d·n); z = d·u; d = p − a, u = unit axis, n = unit normal to the axis on the profile's side

    Feature tool dimensions on the mesh kernel kernel.js
    • PartCraft
    64-bit
  • Plane, cylinder or cone swept by a profile line

    Classifies the surface a straight profile line sweeps and, for a cone, finds its apex and slope.

    slope = (r₂ − r₁) ÷ (z₂ − z₁); apex height = z₁ − r₁ ÷ slope

    Feature tool dimensions on the mesh kernel kernel.js
    • PartCraft
    64-bit

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.