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
-
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
-
Spline (NURBS) as segments
The points that stand for a spline with control points.
de Boor on homogeneous points (x·w, y·w, w); 12 samples per knot span
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
Spline stored with fit points only
The points that stand for a spline that carries fit points and no control points.
centripetal Catmull–Rom, 12 samples per span
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
Bulge arcs in hatch boundaries
The points of a curved side of a hatch boundary given as a polyline bulge.
center = chord midpoint + ((1 ÷ b − b) ÷ 2) × (chord turned 90°) ÷ 2; sweep = 4 atan b
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
Block insert transform
The transform that places a block, with its scale, rotation and array spacing.
M = T(x, y) · R(rot) · S(s_x, s_y) · T(−base); array offset = R(rot) · (col × d_c, row × d_r)
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
Hatch holes
Which loops of a hatch are outlines and which are holes.
area = ½ |Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)|; a loop inside an odd number of larger loops is a hole
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
3D face corners
The corners of 3D faces and solids, which keep their heights.
(x, y) placed by the block transform; all three × k
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
Text line pitch
The distance between lines of imported multi-line text, which is drawn as edges.
pitch = height × 1.667 × spacing factor
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
Edges of imported solids
How the edges of an imported solid are matched to decide which ones show.
key = round(x × 1e5), round(y × 1e5), round(z × 1e5)
Import of DXF and DWG drawings into the 3D model m3d/io.js64-bit- CadCraft
- ModelCraft
-
OBJ vertex
A vertex line of an OBJ file.
(x, y, z) → (x, −z, y)
Import of OBJ, glTF and Collada models m3d/io.js64-bit- CadCraft
- ModelCraft
-
glTF accessor values
The numbers of a glTF buffer, such as vertex positions.
Import of OBJ, glTF and Collada models m3d/io.js64-bit- CadCraft
- ModelCraft
-
glTF node transform
The matrix of a glTF node from its matrix, or from its translation, rotation and scale.
M = T · R(q) · S
Import of OBJ, glTF and Collada models m3d/io.js64-bit- CadCraft
- ModelCraft
-
glTF vertex in the model
A glTF vertex moved by its node transforms and turned to Z up.
p′ = M · p, then (x, y, z) → (x, −z, y)
Import of OBJ, glTF and Collada models m3d/io.js64-bit- CadCraft
- ModelCraft
-
Collada numbers
How lists of numbers in a Collada file are read.
Import of OBJ, glTF and Collada models m3d/io.js64-bit- CadCraft
- ModelCraft
-
Collada unit and up axis
The change from the file's unit and up axis to Z-up meters.
C = R_up · S(meter); node matrix → C · M · C⁻¹; point → C · p
Import of OBJ, glTF and Collada models 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.