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
-
Gap that separates parts
The distance below which two objects count as one part.
gap = max(Δx, Δy, 1e-9) × 0.04
Automatic sheet layout autosheet.js64-bit- CadCraft
-
Size of a part's viewport at a scale
The paper width and height a part needs at a scale 1:n, with padding and a caption band.
w = Δx × s + 2 × 4 mm × k; h = Δy × s + 2 × 4 mm × k + 7 mm × k; k = 1 ÷ mm per paper unit
Automatic sheet layout autosheet.js64-bit- CadCraft
-
Shelf packing
Places boxes in rows inside the free zone and returns each box's lower-left corner, or nothing when they do not fit.
Automatic sheet layout autosheet.js64-bit- CadCraft
-
Scale and place for every part on one paper
Chooses the scale or scales and the position of each viewport on a given paper.
Automatic sheet layout autosheet.js64-bit- CadCraft
-
Scale on automatic paper
With no scale given and automatic paper, the scale the largest part gets on the default paper.
Automatic sheet layout autosheet.js64-bit- CadCraft
-
Viewport placed for a part
The viewport stored for each part: paper size and center, model center and scale.
h = packed h − 7 mm × k; paper center = (x + w ÷ 2, y + 7 mm × k + h ÷ 2); model center = midpoint of the window
Automatic sheet layout autosheet.js64-bit- CadCraft
-
Point coordinates
The x, y and z of one point record.
x = X × scaleₓ + offsetₓ (and the same for y and z)
LAS and LAZ point coordinates las.js64-bit- CadCraft
- BimCraft
- CivilCraft
-
Scale, offset and bounds from the header
Reads the header's scale, offset, minimum and maximum and refuses a scale that cannot be used.
LAS and LAZ point coordinates las.js64-bit- CadCraft
- BimCraft
- CivilCraft
-
64-bit counts and offsets
Reads an unsigned 64-bit integer (LAS 1.4 point count, extended record positions and lengths).
value = hi × 2³² + lo
LAS and LAZ point coordinates las.js64-bit- CadCraft
- BimCraft
- CivilCraft
-
Points the file really holds
The number of whole point records between the first point and the end of the point data.
available = ⌊(end − offset to points) ÷ record length⌋, at most the header's count
LAS and LAZ point coordinates las.jsExact- CadCraft
- BimCraft
- CivilCraft
-
Registered position of a point
One point in the registered frame: its stored position plus the scan's origin, moved by the scan's matrix.
p = M × (pos + origin)
Registered scans written as LAS and E57 scan-export.js32-bit in part- CadCraft
- BimCraft
-
Bounds of the registered cloud
The minimum and maximum x, y, z over every moved point, and the point count.
Registered scans written as LAS and E57 scan-export.js32-bit in part- CadCraft
- BimCraft
-
LAS scale and offset
Chooses the scale and offset the LAS file stores its integer coordinates with.
scale = first of 0.0001, 0.001, 0.01, 0.1, 1 with extent ÷ scale < 2e9; offset = ⌊min ÷ 100⌋ × 100
Registered scans written as LAS and E57 scan-export.js64-bit- CadCraft
- BimCraft
-
LAS point record
Stores one point's x, y, z as integers in the LAS file.
X = round((p − offset) ÷ scale)
Registered scans written as LAS and E57 scan-export.js32-bit in part- CadCraft
- BimCraft
-
E57 point record
Stores one point's x, y, z in an E57 data packet and widens the scan's bounds.
Registered scans written as LAS and E57 scan-export.js32-bit in part- CadCraft
- BimCraft
-
Numbers written as text in the E57 header
Writes a bound or a time stamp as text in the E57 XML section.
Registered scans written as LAS and E57 scan-export.js64-bit- CadCraft
- BimCraft
-
Parameter values in dependency order
Evaluates every parameter after the ones it uses and reports cycles and missing values.
Parameters and equations params.js64-bit- CadCraft
- PartCraft
-
Equation results written to their targets
Evaluates each equation and writes the result into the dimension or feature value it drives.
written when |current − v| > 1e-12 × max(1, |v|)
Parameters and equations params.js64-bit- CadCraft
- PartCraft
-
Limits on a driven value
Checks a value against its target's kind: whole number, minimum, maximum.
Parameters and equations params.js64-bit- CadCraft
- PartCraft
-
Backward solve for a driving parameter
Finds the parameter value that makes an equation give the value a person typed.
secant: c = b − f(b) × (b − a) ÷ (f(b) − f(a)); stop when |f| ≤ 1e-10 × max(1, |target|, |x₀|)
Parameters and equations params.js64-bit- CadCraft
- PartCraft
-
Rounding of the solved value
Replaces the solved value by the roundest number near it that still solves the equation.
first of round(x, d decimals) for d = 0…10, then x to 12 significant digits, that keeps |f| within tolerance; else x
Parameters and equations params.js64-bit- CadCraft
- PartCraft
-
Edited dimension written back to a parameter
When a driven value is edited, changes the driving parameter behind its equation, or rewrites a constant equation to the new number.
Parameters and equations params.js64-bit- CadCraft
- PartCraft
-
Value typed for a parameter
Sets a driving parameter to a typed value, or solves the driving parameter behind a driven one.
Parameters and equations params.js64-bit- CadCraft
- PartCraft
-
Removing a parameter and writing its value in
Removes a parameter and, when asked, writes its current value into every expression that used it.
Parameters and equations params.js64-bit- CadCraft
- PartCraft
-
Design table row made permanent
Writes a set of override values into the parameters.
Parameters and equations params.js64-bit- CadCraft
- PartCraft
-
Frame a sheet maps onto
The drawing area a redline sheet is mapped onto: a given box, or the extents of everything drawn.
Redline items placed in the drawing redline.js64-bit- CadCraft
-
Item geometry in drawing units
An item's box, points and center in drawing coordinates.
x = x0 + fx × (x1 − x0); y = y0 + fy × (y1 − y0); center = midpoint of the box
Redline items placed in the drawing redline.js64-bit- CadCraft
-
Cloud arc length and margin
The arc length of a revision cloud, the margin round the item and the text height of the revision mark.
base = text height × dimension scale; arc = 4 × base; margin = arc; text = 1.4 × base
Redline items placed in the drawing redline.js64-bit- CadCraft
-
Revision cloud outline
The rectangle a revision cloud is drawn round: the item's box grown by the margin.
x0 − margin, y0 − margin, x1 + margin, y1 + margin
Redline items placed in the drawing redline.js64-bit- CadCraft
-
Picture scale
Drawing units per pixel of a pasted picture.
units per pixel = W ÷ pixel width
Pasted picture size pastepic.js64-bit- CadCraft
-
Drawing units per millimeter
The factor that turns a size in millimeters into the drawing's units.
units per mm = units per point × 72 ÷ 25.4
Pasted picture size pastepic.js64-bit- CadCraft
-
Size of a copied area
The width and height a copied area takes in the drawing, on paper or at its real size.
size = size in mm × units per mm
Pasted picture size pastepic.js64-bit- CadCraft
-
Region size, enclosing triangle and tolerances
Measures the region and sets the tolerances every later test uses.
D = max(Δx, Δy); eps = 1e-13 × D; epsA = 1e-13 × D²
Triangulation of solid faces acis/cdt.js64-bit- CadCraft
- ModelCraft
-
Orientation of three points
Twice the signed area of the triangle a, b, c: positive when anticlockwise.
(x_b − x_a) × (y_c − y_a) − (y_b − y_a) × (x_c − x_a)
Triangulation of solid faces acis/cdt.js64-bit- CadCraft
- ModelCraft
-
In-circle test
Whether point d lies inside the circle through a, b and c.
det of rows (a − d, |a − d|²), (b − d, |b − d|²), (c − d, |c − d|²) > 0
Triangulation of solid faces acis/cdt.js64-bit- CadCraft
- ModelCraft
-
Triangle that holds a point
Walks from the last triangle to the one a new point falls in.
Triangulation of solid faces acis/cdt.js64-bit- CadCraft
- ModelCraft
-
Inserting a point
Adds one point: merged into a corner it coincides with, splitting an edge it lies on, or splitting the triangle it is inside.
Triangulation of solid faces acis/cdt.js64-bit- CadCraft
- ModelCraft
-
Do two segments cross
Whether edge c–d properly crosses boundary segment a–b.
Triangulation of solid faces acis/cdt.js64-bit- CadCraft
- ModelCraft
-
Face corners in model units
The corners of an add-on's solid in the 3D model's units, and where the solid is placed.
local = (q − o) × k; translation = o × k
Add-on solids placed on the 3D tab addons/cadcraft-api.js64-bit- CadCraft
-
Rule read into the library
Checks a rule from a file or from storage and sets the base size's move to zero.
Grade rule library addons/apparel/lib/rules.js64-bit- CadCraft
-
Rule applied to a piece
A library rule as moves for a piece's own size range and units.
move = round to 6 decimals of (m − base) × k; k = 1, 25.4 or 1 ÷ 25.4
Grade rule library addons/apparel/lib/rules.js64-bit- CadCraft
-
Rules read from a RUL file
Turns a RUL file's rules into library entries measured from the sample size.
move = value for the size − value for the sample size
Grade rule library addons/apparel/lib/rules.js64-bit- CadCraft
-
Rules written to a RUL file
Writes the library's rules as the delta lines of a RUL file.
Grade rule library addons/apparel/lib/rules.js64-bit- CadCraft
-
Face-frame default sizes
The stile and rail width, overlay and door gap a job uses when it sets none.
stile = rail = 38 mm; overlay = 12 mm; gap = 3 mm; inch job: round(mm ÷ 25.4 × 16) ÷ 16
CabinetCraft parts, fronts and face frames addons/cabinetcraft/lib/build.js64-bit- CadCraft
- BimCraft
- ModelCraft
- PartCraft
-
Carcass depth behind a face frame
The depth the carcass is built with when a face frame takes part of the cabinet's depth.
d = max(1, d − frame thickness)
CabinetCraft parts, fronts and face frames addons/cabinetcraft/lib/build.js64-bit- CadCraft
- BimCraft
- ModelCraft
- PartCraft
-
Face-frame openings and overlay fronts
The rails, the openings between them and the doors or drawer fronts that cover each opening.
opening h = (box h − (2 + mids) × rail) ÷ (mids + 1); front h = opening h + lap below + lap above; pair door w = (opening w + 2 × overlay − gap) ÷ 2
CabinetCraft parts, fronts and face frames addons/cabinetcraft/lib/build.js64-bit- CadCraft
- BimCraft
- ModelCraft
- PartCraft
-
Door and blind panel of a blind corner
The door over the open part of a blind corner cabinet and the panel over the blind part.
door w = (w − blind) − reveal; panel w = blind − reveal; h = box h − reveal
CabinetCraft parts, fronts and face frames addons/cabinetcraft/lib/build.js64-bit- CadCraft
- BimCraft
- ModelCraft
- PartCraft
-
Part size stored in the cut list
Adds one part with its length, width, thickness and material.
CabinetCraft parts, fronts and face frames addons/cabinetcraft/lib/build.js64-bit- CadCraft
- BimCraft
- ModelCraft
- PartCraft
-
Frame rail length and counts
The length of the frame's rails and how many rails and mid rails a cabinet needs.
rail length = w − 2 × stile − blind
CabinetCraft parts, fronts and face frames addons/cabinetcraft/lib/build.js64-bit- CadCraft
- BimCraft
- ModelCraft
- PartCraft
-
Doors and drawer fronts counted by size
Groups equal fronts into one cut-list line with a quantity.
CabinetCraft parts, fronts and face frames addons/cabinetcraft/lib/build.jsExact- CadCraft
- BimCraft
- ModelCraft
- PartCraft
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.