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
-
Distance from a point to a triangle
The distance used to decide whether a point is inside a face's outline or on it.
Snap points picked in the 3D view m3d/infer.js64-bit- CadCraft
- ModelCraft
-
Midpoint of an edge
The middle of an edge, offered as a snap point.
m = (a + b) × 0.5
Snap points picked in the 3D view m3d/infer.js64-bit- CadCraft
- ModelCraft
-
Point on an edge
The point of an edge nearest the cursor, offered when no end or midpoint is in reach.
Snap points picked in the 3D view m3d/infer.js64-bit- CadCraft
- ModelCraft
-
Point along an axis from the start point
The point on a red, green or blue line (or one parallel or square to an edge) through the start point.
Snap points picked in the 3D view m3d/infer.js64-bit- CadCraft
- ModelCraft
-
Where an axis line meets an edge
The point where the line from the start point along an axis meets the edge or guide under the cursor.
Snap points picked in the 3D view m3d/infer.js64-bit- CadCraft
- ModelCraft
-
Point on a locked direction
The point kept on a line when a direction is locked with Shift or an arrow key.
p = from + d × ((q − from) · d) ÷ (d · d)
Snap points picked in the 3D view m3d/infer.js64-bit- CadCraft
- ModelCraft
-
Distance along a line under the cursor
The point on a line nearest the cursor and how far along it lies, used by push/pull and moves along an axis.
Snap points picked in the 3D view m3d/infer.js64-bit- CadCraft
- ModelCraft
-
Newell normal of a mesh face
The normal of a face with any number of corners; its length is twice the face's area.
N = Σ ((y_a − y_b)(z_a + z_b), (z_a − z_b)(x_a + x_b), (x_a − x_b)(y_a + y_b))
Polygon mesh: normals, areas, triangles and volume m3d/mesh.js64-bit- CadCraft
- ModelCraft
-
Unit normal of a mesh face
The direction a mesh face points.
n = N ÷ |N|
Polygon mesh: normals, areas, triangles and volume m3d/mesh.js64-bit- CadCraft
- ModelCraft
-
Area of a mesh face
The area of one mesh face.
area = |N| ÷ 2
Polygon mesh: normals, areas, triangles and volume m3d/mesh.js64-bit- CadCraft
- ModelCraft
-
Center of a mesh face
The point used as a face's middle.
c = Σ pᵢ ÷ n
Polygon mesh: normals, areas, triangles and volume m3d/mesh.js64-bit- CadCraft
- ModelCraft
-
Is a mesh face flat
Whether every corner of a face lies in one plane, which decides if it stays one face or becomes triangles.
|(p − c) · n| ≤ tol, tol = 1e-6 m by default
Polygon mesh: normals, areas, triangles and volume m3d/mesh.js64-bit- CadCraft
- ModelCraft
-
Triangles of a mesh
The triangles every face is cut into for area, volume, ray tests and drawing.
Polygon mesh: normals, areas, triangles and volume m3d/mesh.js64-bit- CadCraft
- ModelCraft
-
Area and volume of a mesh
The surface area of a mesh and, when it is closed, the volume it encloses.
A = Σ |u × v| ÷ 2; V = Σ a · (b × c) ÷ 6
Polygon mesh: normals, areas, triangles and volume m3d/mesh.js64-bit- CadCraft
- ModelCraft
-
Adding a layer
Creates a layer of 1 to 16 numbers per element.
Polygon mesh: attribute layers (UV, color, crease, weights) m3d/mesh.js32-bit in part- CadCraft
- ModelCraft
-
Storing a value in a layer
Writes the values of one element of a layer.
Polygon mesh: attribute layers (UV, color, crease, weights) m3d/mesh.js32-bit in part- CadCraft
- ModelCraft
-
Blending corner values onto new faces
The values new face corners get when faces are cut or joined, as a weighted mix of old corners.
out = Σ wᵢ × valueᵢ
Polygon mesh: attribute layers (UV, color, crease, weights) m3d/mesh.js32-bit in part- CadCraft
- ModelCraft
-
Layers in the mesh file
The layer data as it is written into the file.
Polygon mesh: attribute layers (UV, color, crease, weights) m3d/mesh.js32-bit in part- CadCraft
- ModelCraft
-
Normal per corner
A unit normal for every corner of every face.
n = normalize(Σ N_f) over the faces of a smooth group
Polygon mesh: shading normals m3d/mesh.js32-bit, display only- CadCraft
- ModelCraft
-
World triangles for export
Every triangle of the model in world coordinates, with its normal.
p_world = M · p; n = normalize((p₁ − p₀) × (p₂ − p₀))
Export to glTF and STL m3d/io.js64-bit- CadCraft
- ModelCraft
-
glTF vertex positions
The vertex coordinates and normals stored in the binary part of a .glb file.
Export to glTF and STL m3d/io.js32-bit in part- CadCraft
- ModelCraft
-
glTF placement matrix
The matrix that places each group or component in the .glb file.
Export to glTF and STL m3d/io.js64-bit- CadCraft
- ModelCraft
-
STL triangles in millimeters
The triangles of a binary STL file.
x_mm = x × 1000, stored as a 32-bit float
Export to glTF and STL m3d/io.js32-bit in part- CadCraft
- ModelCraft
-
OBJ number format
How every coordinate and normal component is written in an OBJ file.
text = x rounded to 6 decimals
Export to OBJ and Collada m3d/io.js64-bit- CadCraft
- ModelCraft
-
OBJ vertex
A vertex of the model as it goes into the OBJ file.
(x, y, z) → M · p → (x, z, −y)
Export to OBJ and Collada m3d/io.js64-bit- CadCraft
- ModelCraft
-
OBJ face normal
The flat normal written for a face.
N = Σ pᵢ × pᵢ₊₁, normalized
Export to OBJ and Collada m3d/io.js64-bit- CadCraft
- ModelCraft
-
OBJ vertex and normal lines
The lines that carry the numbers.
Export to OBJ and Collada m3d/io.js64-bit- CadCraft
- ModelCraft
-
Collada number format
How every number is written in a Collada file.
text = x rounded to 12 significant digits
Export to OBJ and Collada m3d/io.js64-bit- CadCraft
- ModelCraft
-
Collada positions and normals
The vertex positions and face normals of each definition in the Collada file.
Export to OBJ and Collada m3d/io.js64-bit- CadCraft
- ModelCraft
-
Collada placement matrix
The 4×4 matrix of each placement, written row by row.
Export to OBJ and Collada m3d/io.js64-bit- CadCraft
- ModelCraft
-
Is a face convex
Decides whether a face is written as one polygon or as triangles in Collada.
every turn (b − a) × (c − b) ≥ −1e-12 × size²
Export to OBJ and Collada m3d/io.js64-bit- CadCraft
- ModelCraft
-
Unit factor for DXF and DWG
The factor that turns the model's meters into the drawing unit of the export.
inches: 1 ÷ 0.0254; mm: 1000; cm: 100; m: 1
Export of the 3D model to DXF and DWG m3d/io.js64-bit- CadCraft
- ModelCraft
-
Exported point
A vertex of the model in the export's unit.
p′ = (M · p) × k
Export of the 3D model to DXF and DWG m3d/io.js64-bit- CadCraft
- ModelCraft
-
Placement as a block insert
The insertion point, scale, rotation and extrusion direction that stand for a placement matrix.
scale = column lengths; n = third unit column; rot = atan2(r₀ · a_y, r₀ · a_x); insertion = (T · a_x, T · a_y, T · n)
Export of the 3D model to DXF and DWG m3d/io.js64-bit- CadCraft
- ModelCraft
-
DXF number format
How every coordinate, scale and angle is written in the DXF text.
text = x rounded to 15 significant digits
Export of the 3D model to DXF and DWG m3d/io.js64-bit- CadCraft
- ModelCraft
-
DXF insert record
The numbers of one block placement in the DXF text.
rotation in degrees = rot × 180 ÷ π
Export of the 3D model to DXF and DWG m3d/io.js64-bit- CadCraft
- ModelCraft
-
Numbers handed to the DWG writer
The same faces, lines and inserts as objects for the DWG writer.
Export of the 3D model to DXF and DWG m3d/io.js64-bit- CadCraft
- ModelCraft
-
IFC number format
How every coordinate, direction component and elevation is written.
text = x rounded to 9 decimals
Export to IFC m3d/io.js64-bit- CadCraft
- ModelCraft
-
Shared points
The corner points of the faces, each written once.
Export to IFC m3d/io.js64-bit- CadCraft
- ModelCraft
-
Is a placement rigid
Decides whether a group is exported in its own coordinates with a placement, or in world coordinates.
|column| = 1 ± 1e-9; columns square within 1e-9; determinant > 0
Export to IFC m3d/io.js64-bit- CadCraft
- ModelCraft
-
Placement of an element
Where each exported element sits relative to its level.
location = (t_x, t_y, t_z − level elevation); axis = third column; ref direction = first column
Export to IFC m3d/io.js64-bit- CadCraft
- ModelCraft
-
Level of an element
Which level an element is listed under.
the highest level with elevation ≤ z_min + 1e-6
Export to IFC m3d/io.js64-bit- CadCraft
- ModelCraft
-
Precision stated in the file
The precision value the IFC file declares for its geometry.
Export to IFC m3d/io.js64-bit- CadCraft
- ModelCraft
-
Drawing unit factors
The factor from the drawing's unit ($INSUNITS) to meters.
in 0.0254; ft 0.3048; mi 1609.344; mm 0.001; cm 0.01; m 1; km 1000; yd 0.9144
Import of DXF and DWG drawings into the 3D model m3d/io.jsExact- CadCraft
- ModelCraft
-
Which unit factor is used
Picks the factor for a drawing.
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
Mirrored entities
How an entity drawn in a flipped coordinate system is read.
x → −x when the extrusion direction's z is negative
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
Arc angles
The start and end angles of a DXF arc.
radians = degrees × π ÷ 180; mirrored: (a₀, a₁) → (π − a₁, π − a₀)
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
Placing and scaling a segment
Moves each line segment by the block placements above it and converts it to meters.
x′ = a·x + c·y + e; y′ = b·x + d·y + f; then × k
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
Arcs, circles and bulges as segments
The points that stand for an arc, a circle or a polyline bulge.
n = max(2, ⌈|sweep| ÷ (2π ÷ 48)⌉); pⱼ = c + r (cos aⱼ, sin aⱼ), aⱼ = a₀ + sweep × j ÷ n; bulge: sweep = 4 atan b
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
Ellipse as segments
The points that stand for an ellipse or an elliptical arc.
p = c + major × cos t + minor × sin t, minor = major turned 90° × ratio
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- 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.