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

  • Resolution in dots per inch

    The horizontal and vertical resolution of a page, in dots per inch.

    dpi = resolution × 2.54 (centimeter files); dpi = resolution (inch files)

    TIFF scan resolution raster/tiff.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • CivilCraft
    • PartCraft
    64-bit
  • Triangulate a polygon with holes

    The triangles of a polygon, as indexes into its point list.

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Winding of a ring

    Whether a ring runs clockwise or counterclockwise.

    sum = Σ (xⱼ − xᵢ) × (yᵢ + yⱼ)

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Orientation of three points

    On which side of the line through two points a third point lies.

    area = (q.y − p.y) × (r.x − q.x) − (q.x − p.x) × (r.y − q.y)

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Removing duplicate and collinear points

    Drops points that repeat their neighbor or lie on the line between their neighbors.

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Ear test

    Whether a corner can be cut off as a triangle: it is convex and no other point of the ring lies inside it.

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Point in triangle

    Whether a point lies inside or on a triangle.

    three cross products of (corner − point) pairs, each ≥ 0

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Bridge from a hole to the outer ring

    The point of the outer ring a hole is connected to.

    x = p.x + (h.y − p.y) × (p′.x − p.x) ÷ (p′.y − p.y); tan = |h.y − p.y| ÷ (h.x − p.x)

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Do two segments cross

    Whether two edges intersect, including touching and collinear overlap.

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Is the middle of a diagonal inside the polygon

    Whether a diagonal between two corners runs through the inside of the polygon.

    midpoint = ((a.x + b.x) ÷ 2, (a.y + b.y) ÷ 2); even-odd count of edges crossed by a ray

    Polygon triangulation (ear clipping) usd/earcut.js
    • CadCraft
    • BimCraft
    • ModelCraft
    • TakeoffCraft
    • CivilCraft
    • DetailCraft
    • PartCraft
    64-bit
  • Unit factor

    Chooses the factor that turns the file's unit into meters.

    k = meters per file unit, or 0.001 when that is missing, zero or not finite

    3DM import: units, placements and mesh points io/3dm-import.js
    • ModelCraft
    • PartCraft
    64-bit
  • Mesh points in meters

    Scales a mesh's points and builds the model's mesh from them.

    p′ = p × k

    3DM import: units, placements and mesh points io/3dm-import.js
    • ModelCraft
    • PartCraft
    64-bit
  • Block placement matrix

    Turns a block reference's matrix into the model's placement.

    m[c × 4 + r] = x[r × 4 + c]; translation × k

    3DM import: units, placements and mesh points io/3dm-import.js
    • ModelCraft
    • PartCraft
    64-bit
  • Curve points in meters

    Scales each curve's points and drops segments of no length.

    a′ = a × k; kept when a′ ≠ b′

    3DM import: units, placements and mesh points io/3dm-import.js
    • ModelCraft
    • PartCraft
    64-bit
  • Mesh record: 32-bit and 64-bit points

    Reads a mesh's points from the file and chooses between its 32-bit and 64-bit copies.

    use the 64-bit points when |aᵢ − vᵢ| ≤ |vᵢ| × 10⁻⁶ + 10⁻⁶ × max(1, |aᵢ|) for every coordinate

    3DM import: units, placements and mesh points io/3dm/objects.js
    • ModelCraft
    • PartCraft
    64-bit
  • Orientation of three points

    Twice the signed area of a triangle: which way it turns.

    (b − a) × (c − a) = (bₓ − aₓ)(c_y − a_y) − (b_y − a_y)(cₓ − aₓ)

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Point inside a circumcircle

    Whether a fourth point lies inside the circle through three others.

    determinant of the rows (pₓ − dₓ, p_y − d_y, |p − d|²) for p = a, b, c; inside when it is positive

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Triangle that holds a point

    Walks from the last triangle toward the point, then searches all triangles if the walk fails.

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Point insertion

    Splits the triangle a new point falls in, or the side it falls on.

    ε = 10⁻⁶ × orient(a, b, c); on a side when a sub-area ≤ ε

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Edge flip

    Flips an edge while the opposite corner lies inside the circumcircle.

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Flips with no new points

    Makes an existing triangulation Delaunay by flipping edges.

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Multiplicity of a knot

    How many times a value occurs in a knot vector.

    count of |Uᵢ − u| ≤ tol × (U_last − U_first)

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Distinct knots

    The different knot values with their multiplicities.

    a knot joins the previous one when |x − u_prev| ≤ tol × range

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Clamped uniform knot vector

    A knot vector with evenly spaced interior knots.

    uᵢ = a + (b − a) × i ÷ (inner + 1)

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Knot vector check

    Checks a knot vector read from a file: count, order, clamping and multiplicities.

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Greville abscissae

    One parameter value per control point.

    gᵢ = (Uᵢ₊₁ + … + Uᵢ₊ₚ) ÷ p

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Binomial coefficients

    The number of ways to choose k of n.

    C(n, k) = C(n − 1, k − 1) + C(n − 1, k)

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    Exact
  • A number as IGES text

    Writes one real number into the file.

    whole numbers below 10¹⁵: digits and a point; otherwise String(x) with E → D

    IGES files of NURBS curves and surfaces nurbs/iges.js
    • ModelCraft
    • PartCraft
    64-bit
  • Global section

    States the file's number sizes, unit, resolution and largest coordinate.

    unit flag 2 (MM); scale 1; resolution 10⁻⁶; largest coordinate = max |x| over all control points

    IGES files of NURBS curves and surfaces nurbs/iges.js
    • ModelCraft
    • PartCraft
    64-bit
  • A number from IGES text

    Reads one real number from the file.

    IGES files of NURBS curves and surfaces nurbs/iges.js
    • ModelCraft
    • PartCraft
    64-bit
  • Unit factors

    Millimeters per file unit, by the file's unit flag.

    1: 25.4; 2: 1; 3: 25.4 × 12; 4: 1609344; 5: 10⁶; 6: 1000; 7: 10⁶; 8: 10⁻³; 9: 10⁻³; 10: 10; 11: 25.4 × 10⁻⁶

    IGES files of NURBS curves and surfaces nurbs/iges.js
    • ModelCraft
    • PartCraft
    64-bit
  • Control points in millimeters

    Scales a curve's control points by the file's unit as it is read.

    scale = UNITS[flag] (1 when unknown); p′ = p × scale

    IGES files of NURBS curves and surfaces nurbs/iges.js
    • ModelCraft
    • PartCraft
    64-bit
  • End derivative coefficients

    The factors that link the first control points to the first and second derivative at the start.

    a₁ = p ÷ (U[p+1] − U[1]); b₁ = p ÷ (U[p+2] − U[2]); c₂ = (p − 1) ÷ (U[p+1] − U[2])

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Point, direction and curvature at an end

    What a curve's end looks like to the curve that must meet it.

    t = C′ ÷ |C′|; out = ± t; speed = |C′|

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Curve end matched to a target

    Moves the first one to three control points so the curve meets the target with G0, G1 or G2.

    P₀ = T; P₁ = P₀ + out × speed ÷ a₁; D₂ = out (C″ · out) + κ speed²; P₂ = P₁ + (a₁ (P₁ − P₀) + D₂ ÷ c₂) ÷ b₁

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Blend curve between two ends

    A Bézier curve joining two curve ends with the asked continuity.

    G1: P₁ = A + out × α ÷ 3; G2: P₁ = A + out × α ÷ 5, P₂ = 2 P₁ − A + κ α² ÷ 20; α = chord × bulge

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Frame on the target's edge

    For a point near the target's edge: the nearest edge point, the outward direction in the tangent plane, the normal and the normal curvature.

    d = (n × tₑ) ÷ |n × tₑ|, turned to point away from the surface

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Surface edge matched to a target

    Refits the first one to three rows of control points so the surface meets the target along an edge.

    stations vᵢ = i ÷ M, M = max(samples, 4 × columns); rows fitted by least squares; accepted when gap ≤ g0, angle ≤ g1 and Δκ ≤ g2 (or relative ≤ g2rel)

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • Blend surface between two edges

    A surface joining two surface edges, built from blend sections along them.

    sections at t = i ÷ n, n = 8, 16, … ≤ 128; each a Bézier of degree 1, 3 or 5; interpolated along the edge

    Matching and blending NURBS curves and surfaces nurbs/match.js
    • ModelCraft
    • PartCraft
    64-bit
  • A number as STEP text

    Writes one real number into the file.

    String(x), with a decimal point added when it has none

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Knots and multiplicities

    Turns a full knot vector into STEP's list of distinct knots with their counts.

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Edges that have collapsed to a point

    Leaves a zero-length boundary edge, such as a pole, out of the face loop.

    skipped when arc length ≤ 10⁻⁹ × surface size

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Trim loop written as a curve

    Writes a trim loop as one closed curve on the face.

    3D point = S(u, v) for each loop point; curve = straight segments through them

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Length unit of a file

    Millimeters per file unit.

    SI: prefix × 1000; conversion-based: value × its base unit

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Control points in millimeters

    Reads each control point and scales it by the file's unit.

    p′ = p × unit

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Trim loops read back

    Turns a face's boundary edges into trim loops in the surface's own parameters.

    33 samples per curved edge; each projected to (u, v); outer when |area| < 0.999 × (u range × v range)

    STEP files of NURBS curves and surfaces nurbs/step.js
    • ModelCraft
    • PartCraft
    64-bit
  • Volume and box of each body

    The volume and bounding box the body list shows.

    volume = Σ volume of the body's solids; box = min and max over them

    Bodies: volume, move and scale brep-bodies.js
    • PartCraft
    64-bit
  • Move matrix

    The matrix a Move body feature applies: by distances, point to point, about an axis, or plane to plane.

    points: T(to − from); align: rotate n_a onto ∓n_b about c, then t = n_b ((o_b − c) · n_b)

    Bodies: volume, move and scale brep-bodies.js
    • PartCraft
    64-bit
  • Shape under a move or a uniform scale

    Applies the matrix or the scale to a solid in the kernel.

    Bodies: volume, move and scale brep-bodies.js
    • PartCraft
    64-bit
  • Scale center and affine map

    Chooses the center of a scale and builds the map for unequal factors.

    c = picked point, or (box min + box max) × 0.5; A = diag(sₓ, s_y, s_z); t = c (1 − s)

    Bodies: volume, move and scale brep-bodies.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.