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
-
Rough box of an object
A box round an object from its vertices, curve break points and control points, used only to set the tolerance.
3DM surfaces into triangles io/3dm/scene.js64-bit- ModelCraft
- PartCraft
-
Preset curves
The control points of a new curve: an S, a Bézier circle, a NURBS circle or a straight path.
Bézier circle: handle length = r × 0.5522847498; NURBS circle: 8 points on an octagon of radius r ÷ 0.9254
Curve objects mesh/curve.js64-bit- ModelCraft
-
Automatic handles
Places a Bézier point's handles when they are automatic or vector.
auto: along (next − previous) made unit, a third of each neighbor's distance; vector: a third of the way to each neighbor
Curve objects mesh/curve.js64-bit- ModelCraft
-
Point on a cubic Bézier segment
A point of a segment at a fraction t.
p = (1 − t)³ a + 3 (1 − t)² t b + 3 (1 − t) t² c + t³ d
Curve objects mesh/curve.js64-bit- ModelCraft
-
Point on a NURBS spline
A point of a NURBS spline at a parameter.
de Boor on (x w, y w, z w, w), then (x, y, z) ÷ w
Curve objects mesh/curve.js64-bit- ModelCraft
-
Sampling a spline
Points along a spline with tangents, the fraction of the length at each, and the radius and tilt there.
resolution samples per segment; tangent = (next − previous) made unit; s = Σ chord lengths so far ÷ total
Curve objects mesh/curve.js64-bit- ModelCraft
-
Frames along the curve
A side and an up direction at every sample that twist as little as possible, with the tilt applied.
double reflection from one sample to the next; closed curve: the leftover angle is undone in proportion to s
Curve objects mesh/curve.js64-bit- ModelCraft
-
Taper along the curve
The scale of the cross-section at a fraction of the length.
Catmull-Rom through the taper values, not below 0
Curve objects mesh/curve.js64-bit- ModelCraft
-
Cross-section
The outline swept along the curve: a circle, a stadium or a flat ribbon.
circle: 4 (resolution + 1) points at radius depth; stadium: two half circles offset by ± extrude
Curve objects mesh/curve.js64-bit- ModelCraft
-
Sweeping the section
Places the cross-section at every sample and joins the rings into faces.
point = sample + side × (−x k) + up × (y k); k = radius × taper
Curve objects mesh/curve.js64-bit- ModelCraft
-
Offsetting a loop
Moves each vertex of a flat outline outward by a distance, with mitered corners.
m = (n₁ + n₂) made unit; p′ = p + m × d ÷ max(0.25, m · n₁)
Curve objects mesh/curve.js64-bit- ModelCraft
-
Filled shapes
Sorts closed flat loops into outlines and holes and builds the top, bottom and edge of the filled shape.
nesting: a loop inside an even number of others is an outline; direction from the sign of the shoelace area
Curve objects mesh/curve.js64-bit- ModelCraft
-
Adding a point in a segment
Splits a segment at its middle; a Bézier segment keeps its shape.
de Casteljau at t = ½
Curve objects mesh/curve.js64-bit- ModelCraft
-
Moving, scaling and turning points
The new place of each selected point and handle while it is dragged.
grab: p + (M⁻¹ w₁ − M⁻¹ w₀); scale: c + (p − c) × |a₁| ÷ max(1, |a₀|); turn: Rodrigues' formula about the view axis through c
Curve objects mesh/curve-tool.js64-bit- ModelCraft
-
A new point at the pointer
Where a point added after the end of a spline goes.
world point = pick ray ∩ plane through the last point; local = M⁻¹ × world; flat curve: z = 0
Curve objects mesh/curve-tool.js64-bit- ModelCraft
-
Selection center
The mean position of the selected vertices: the pivot for rotate, scale and spin.
c = (Σ pᵢ) × (1 ÷ n)
Mesh edit moves: grab, rotate, scale, extrude, spin, knife, bisect mesh/edit-tool.js64-bit- ModelCraft
-
Point on an axis nearest the pointer
The point of a line through w along dir that is nearest the pointer's ray; used for axis-locked moves and extrude distances.
s = (b·e − c·d) ÷ (a·c − b²); point = w + d₁·s
Mesh edit moves: grab, rotate, scale, extrude, spin, knife, bisect mesh/edit-tool.js64-bit- ModelCraft
-
Grab, rotate and scale
Builds the move applied to every affected vertex in world space.
grab: p′ = p + d; rotate: p′ = R(k, θ)(p − P) + P; scale: p′ = P + f·(p − P), or along a locked axis a: p′ = p + a·((p − P)·a)·(f − 1)
Mesh edit moves: grab, rotate, scale, extrude, spin, knife, bisect mesh/edit-tool.js64-bit- ModelCraft
-
Rotation about an axis
Turns a point about the axis k through c by the angle a.
q = p − c; p′ = c + q·cos a + (n × q)·sin a + n·(n·q)·(1 − cos a)
Mesh edit moves: grab, rotate, scale, extrude, spin, knife, bisect mesh/edit-tool.js64-bit- ModelCraft
-
Extrude distance
Moves the new vertices of an extrusion by the dragged or typed distance along the region's normal, or along each face's own normal.
d = (line point now − line point at start)·dir; p′ = p + dirL·d, dirL = M⁻¹·dir
Mesh edit moves: grab, rotate, scale, extrude, spin, knife, bisect mesh/edit-tool.js64-bit- ModelCraft
-
Knife point on an edge
Where along an edge a knife click lands, as a fraction of the edge from its start.
s = clamp((q − a)·(b − a) ÷ L², 0, 1)
Mesh edit moves: grab, rotate, scale, extrude, spin, knife, bisect mesh/edit-tool.js64-bit- ModelCraft
-
Bisect plane
The cutting plane through two clicked points as seen from the camera, in the mesh's own space.
n = unit((p₂ − p₁) × ray direction); plane = {M⁻¹·p₁, unit(M⁻¹ applied to n as a direction)}
Mesh edit moves: grab, rotate, scale, extrude, spin, knife, bisect mesh/edit-tool.js64-bit- ModelCraft
-
Spin center, axis and angle
The center, axis and total angle handed to the spin operator, in the mesh's own space.
center = M⁻¹·c; axis = unit(M⁻¹ applied to the world axis); angle = typed × π ÷ 180, or −(a₁ − a₀)
Mesh edit moves: grab, rotate, scale, extrude, spin, knife, bisect mesh/edit-tool.js64-bit- ModelCraft
-
Proportional editing weights
For every vertex, how much of the selected vertices' move it follows: 1 for the selected ones, falling to 0 at the radius.
t = distance ÷ radius; smooth: x²(3 − 2x) with x = 1 − t; sphere: √(1 − t²); root: √x; linear: x; sharp: x²; constant: 1
Proportional editing weights and edge creases mesh/ops.js32-bit in part- ModelCraft
-
Set a crease
Stores the crease (0 smooth to 1 sharp) on each listed edge for subdivision.
v = clamp(value, 0, 1)
Proportional editing weights and edge creases mesh/ops.js32-bit in part- ModelCraft
-
Crease shared by edges
The crease the selected edges have in common, shown as the starting value when a crease is edited.
Proportional editing weights and edge creases mesh/ops.js32-bit in part- ModelCraft
-
Applying a move with proportional weights
Writes each affected vertex's new position while a grab, rotate or scale is in progress.
q = T(p); r = p + (q − p)·w; stored position = M⁻¹·r
Proportional editing weights and edge creases mesh/edit-tool.js32-bit in part- ModelCraft
-
Crease from the pointer or the wheel
Turns the pointer's distance from the selection's center, or a wheel step, into a crease between 0 and 1.
pointer: crease = clamp(round(px ÷ 2) ÷ 100, 0, 1); wheel: crease = clamp(round((crease ± 0.1) × 10) ÷ 10, 0, 1)
Proportional editing weights and edge creases mesh/edit-tool.js32-bit in part- ModelCraft
-
Vertex normals
A unit normal per vertex from the faces round it, weighted by face area.
N(v) = unit(Σ Newell normal of each face at v)
Inset, bevel and moves along normals mesh/ops.js64-bit- ModelCraft
-
Inset corner
Where a face corner goes when both of its edges move inward by d.
bis = unit(in₁ + in₂); c = bis·in₁; k = d ÷ c; p′ = p + bis·k
Inset, bevel and moves along normals mesh/ops.js64-bit- ModelCraft
-
Inset of a region's border
The new border vertices of a region inset, each from the two border edges that meet at it, raised by the depth.
n = unit(n(face in) + n(face out)); p′ = insetCorner(p, a, b, n, thickness) + n·depth
Inset, bevel and moves along normals mesh/ops.js64-bit- ModelCraft
-
Bevel: slide along plain edges
How far a new point slides along an edge that is not bevelled, so the bevel is the stated width inside the face.
sin = |u_in × u_out|; slide = width ÷ sin; point = v + u·min(slide, cap)
Inset, bevel and moves along normals mesh/ops.js64-bit- ModelCraft
-
Bevel: where two bevelled edges meet
The point inside a face where the offset lines of two bevelled edges cross.
k = width ÷ |u_in × u_out|; point = v + (u_in + u_out)·k
Inset, bevel and moves along normals mesh/ops.js64-bit- ModelCraft
-
Bevel: profile points
The points between the two sides of a bevelled edge when it has more than one segment.
M = (p₀ + p₁) ÷ 2; Q = M + (p_c − M)·2·profile; B(t) = (1 − t)²·p₀ + 2t(1 − t)·Q + t²·p₁, t = k ÷ segments
Inset, bevel and moves along normals mesh/ops.js64-bit- ModelCraft
-
Shrink or fatten
Moves each listed vertex along its normal by d.
p′ = p + N(v)·d
Inset, bevel and moves along normals mesh/ops.js64-bit- ModelCraft
-
Even cuts along an edge
The new vertices that divide an edge into cuts + 1 parts, shared by both faces on the edge.
s = k ÷ (cuts + 1); with slide: s = clamp(s + slide ÷ (cuts + 1), 0.001, 0.999); p = A + (B − A)·s
Subdivide, loop cut, bisect, knife and grid fill mesh/ops.js64-bit- ModelCraft
-
Subdivide: interior points of a quad
The points inside a quad whose four edges are all cut, placed so they follow the four sides.
u = i ÷ N, w = j ÷ N; p = (1 − w)·S₀ + w·S₂ + (1 − u)·S₃ + u·S₁ − [(1 − u)(1 − w)·c₀₀ + u(1 − w)·c₁₀ + uw·c₁₁ + (1 − u)w·c₀₁]
Subdivide, loop cut, bisect, knife and grid fill mesh/ops.js64-bit- ModelCraft
-
Bisect by a plane
Cuts every listed face's edges where the plane crosses them and splits the faces along the cut.
dist(v) = P(v)·n − p·n; s = dₐ ÷ (dₐ − d_b); point = A + (B − A)·s
Subdivide, loop cut, bisect, knife and grid fill mesh/ops.js64-bit- ModelCraft
-
Knife: where the cut crosses an edge
For each edge of the faces round the current point, whether the cutting plane crosses it and where.
dₐ = (a − A)·n, d_b = (b − A)·n; s = dₐ ÷ (dₐ − d_b); X = a + (b − a)·s
Subdivide, loop cut, bisect, knife and grid fill mesh/ops.js64-bit- ModelCraft
-
Grid fill: interior points
The points inside an open loop filled with a grid of quads, following the loop's four sides.
u = i ÷ a, w = j ÷ b; p = ruled blend of the four side points − bilinear blend of the four corners
Subdivide, loop cut, bisect, knife and grid fill mesh/ops.js64-bit- ModelCraft
-
Merge at center
Joins vertices into one at their mean position, at the first or last of them, or at a given point.
p = (Σ pᵢ) × (1 ÷ n)
Merge, spin, bridge, slide and smooth mesh/ops.js64-bit- ModelCraft
-
Merge by distance
Merges every vertex that lies within the given distance of a vertex already kept.
cell = max(dist, 1e-9); merge v into w when |P(w) − P(v)| ≤ dist
Merge, spin, bridge, slide and smooth mesh/ops.js64-bit- ModelCraft
-
Spin
Extrudes a region or open edges round an axis in a number of steps over a total angle.
aᵢ = angle·i ÷ n; pᵢ = c + q·cos aᵢ + (k × q)·sin aᵢ + k·(k·q)·(1 − cos aᵢ), q = p₀ − c
Merge, spin, bridge, slide and smooth mesh/ops.js64-bit- ModelCraft
-
Source of a copied vertex
Finds the vertex a fresh copy was made from, so spin can rotate from the starting position.
Merge, spin, bridge, slide and smooth mesh/ops.js64-bit- ModelCraft
-
Bridge: pairing two loops
Chooses the rotation and direction that pair the vertices of two loops with the shortest total distance.
d(r, dir) = Σᵢ |P(Aᵢ) − P(B₍r + dir·i₎)|; choose the smallest
Merge, spin, bridge, slide and smooth mesh/ops.js64-bit- ModelCraft
-
Slide along rails
Puts each slid vertex a fraction t of the way from its starting place toward the far end of its rail.
p′ = p + (P(w) − p)·|t|, w = rail end a for t ≥ 0, b for t < 0
Merge, spin, bridge, slide and smooth mesh/ops.js64-bit- ModelCraft
-
Smooth vertices
Moves each vertex part of the way to the average of its neighbors, a number of times.
c = (Σ neighbors) × (1 ÷ n); p′ = p + (c − p)·factor
Merge, spin, bridge, slide and smooth mesh/ops.js64-bit- ModelCraft
-
Scale
Scales the mesh about its own origin by a factor for each axis.
p′ = [x·f_x, y·f_y, z·f_z]
Modifier stack: scale, mirror, array, solidify, displace, lattice, curve, shrinkwrap mesh/modifiers.js64-bit- ModelCraft
-
Mirror
Adds a mirrored copy across the x, y or z plane through the origin and merges the seam.
copy: coordinate k → −k; seam: vertices with |coordinate k| ≤ dist merged within max(2·dist, 1e-12)
Modifier stack: scale, mirror, array, solidify, displace, lattice, curve, shrinkwrap mesh/modifiers.js64-bit- ModelCraft
-
Radial array
Places copies turned round an axis through the origin.
step = (angle·π ÷ 180) ÷ (n for a full circle, else n − 1); aᵢ = step·i; [u′, v′] = [u·cos aᵢ − v·sin aᵢ, u·sin aᵢ + v·cos aᵢ]
Modifier stack: scale, mirror, array, solidify, displace, lattice, curve, shrinkwrap mesh/modifiers.js64-bit- ModelCraft
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.