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
-
Scale and turn from two points
The scale, the angle and the point mapping that carry two points on the picture onto the two points where they belong.
scale = |b₂ − b₁| ÷ |a₂ − a₁|; angle = atan2(b₂ − b₁) − atan2(a₂ − a₁); map(p) = b₁ + scale · R(angle) · (p − a₁)
Size of a copied area areaclip.js64-bit- CadCraft
- BimCraft
- MarkupCraft
- DetailCraft
-
Box round a turned picture
The width and height of the upright box round a picture turned by an angle.
w′ = w·|cos θ| + h·|sin θ|; h′ = w·|sin θ| + h·|cos θ|
Size of a copied area areaclip.js64-bit- CadCraft
- BimCraft
- MarkupCraft
- DetailCraft
-
Outline of an elliptical area
The points of the ellipse that fits a box, used as the outline of a round copied area.
pᵢ = (cx + rx·cos(2π·i ÷ n), cy + ry·sin(2π·i ÷ n)), n = 96
Size of a copied area areaclip.js64-bit- CadCraft
- BimCraft
- MarkupCraft
- DetailCraft
-
abs, round, ceil and floor
The four functions an expression may call.
round(x) = floor(x + 0.5) for x ≥ 0, −floor(−x + 0.5) for x < 0; ceil(x) = ⌈x − 1e-9·max(1, |x|)⌉; floor(x) = ⌊x + 1e-9·max(1, |x|)⌋
Arithmetic on typed lengths lencalc.js64-bit- CadCraft
- ModelCraft
- MarkupCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Adding and subtracting
Sums and differences of lengths, left to right.
Arithmetic on typed lengths lencalc.js64-bit- CadCraft
- ModelCraft
- MarkupCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Multiplying and dividing
Products and quotients of a length and plain numbers, left to right.
Arithmetic on typed lengths lencalc.js64-bit- CadCraft
- ModelCraft
- MarkupCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
The answer
The final value and whether it is a length or a plain number.
Arithmetic on typed lengths lencalc.js64-bit- CadCraft
- ModelCraft
- MarkupCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Unit sizes
Builds each unit's row: its fraction of the base unit and the factor used for quick conversion.
factor = n ÷ d (× π for degrees and gons)
Unit table: reading and writing values unit-table.js Every appExact -
Numbers and fractions
Reads 6, 6.5, 6 1/2, 6-1/2 or 1/2 as a number.
whole + numerator ÷ denominator
Unit table: reading and writing values unit-table.js Every app64-bit -
Feet and inches
Reads 12'6", 12'-6 1/2" or 6" as inches.
inches = feet × 12 + inches
Unit table: reading and writing values unit-table.js Every app64-bit -
Degrees, minutes and seconds
Reads 45°30'15" or 45d30m15s as degrees.
degrees + minutes ÷ 60 + seconds ÷ 3600
Unit table: reading and writing values unit-table.js Every app64-bit -
Slopes
Reads 2%, 3H:1V, 1:3 or 6/12 as a grade (rise over run).
percent ÷ 100; H:V → V ÷ H; rise:run → rise ÷ run
Unit table: reading and writing values unit-table.js Every app64-bit -
Writing feet and inches
Writes a length as feet, inches and a fraction of an inch.
n = round(|inches| × den); feet = ⌊n ÷ 12den⌋; inches = ⌊rest ÷ den⌋; fraction = rest ÷ den, reduced
Unit table: reading and writing values unit-table.js Every app64-bit -
Writing degrees, minutes and seconds
Writes an angle as degrees, minutes and seconds.
t = round(|degrees| × 3600 × 10^dec); split by 3600 and 60
Unit table: reading and writing values unit-table.js Every app64-bit -
Writing decimals
Writes a number with a fixed count of decimals.
text = v.toFixed(dec)
Unit table: reading and writing values unit-table.js Every app64-bit -
Guard on every written measure
Decides what is written when a value is missing or not a number.
DWG object values written and read dwg/objects-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Arc angles brought into one turn
Brings an angle into the range from 0 up to 2π before it is written.
r = a mod 2π; r + 2π when r < 0
DWG object values written and read dwg/objects-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Arc
Writes an arc's center, radius and two angles.
DWG object values written and read dwg/objects-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Line
Writes a line's two end points.
DWG object values written and read dwg/objects-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Polyline vertices
Writes the vertices of a lightweight polyline.
DWG object values written and read dwg/objects-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Vertex widths
Writes the start and end width at a polyline vertex.
equal widths: one value, −|width|
DWG object values written and read dwg/objects-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Linetype pattern length
The total length of a linetype's dash pattern.
length = Σ |element length|
DWG object values written and read dwg/objects-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Text direction
The x-axis direction written for a block of text.
x axis = (cos θ, sin θ, 0)
DWG object values written and read dwg/objects-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Block scale
Writes the three scale factors of a block reference in the format's compact form.
DWG object values written and read dwg/objects-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Single-line text
Writes a text's insertion point, height, rotation, width factor and oblique angle.
DWG object values written and read dwg/objects-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Extension record values
Writes the numbers kept in an extension record.
DWG object values written and read dwg/objects-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Block content matrix of a multileader
The 4 × 4 matrix written for a multileader's block content when the model gives none.
M = translate(l) · rotate_z(θ) · scale(s)
DWG object values written and read dwg/mleader-write.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Line read
Reads a line's two end points.
DWG object values written and read dwg/objects-read.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Polyline vertices read
Reads the vertices of a lightweight polyline.
DWG object values written and read dwg/objects-read.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
North direction of older geolocation data
Turns the north angle of a version 1 geolocation object into a direction vector.
north = (sin a, cos a)
DWG object values written and read dwg/objects-read.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Lineweight to the file's lineweight index
Picks the stored lineweight that is nearest to the one the layer or object has.
index = the i with the smallest |table[i] − lineweight|
Values changed when a DWG is written dwg/write.jsExact- CadCraft
- ModelCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Ellipse with a ratio above 1
Rewrites an ellipse whose minor axis is longer than its major axis so the file holds a ratio of 1 or less.
major′ = (−m_y, m_x) × ratio; ratio′ = 1 ÷ ratio; start and end − π ÷ 2
Values changed when a DWG is written dwg/write.js64-bit- CadCraft
- ModelCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Ray and construction line direction
Writes the direction of a ray or construction line as a unit vector.
d′ = d ÷ |d|
Values changed when a DWG is written dwg/write.js64-bit- CadCraft
- ModelCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Drawing extents
The lower left and upper right corner of model space written to the file header.
min and max of x, y, z over the defining points
Values changed when a DWG is written dwg/write.js64-bit- CadCraft
- ModelCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Default angles of a light
The hotspot and falloff angles written for a light that has none of its own.
hotspot = π ÷ 4; falloff = π ÷ 4 + 0.0872664626
Values changed when a DWG is written dwg/solid-write.js64-bit- CadCraft
- ModelCraft
- CivilCraft
- DetailCraft
- PartCraft
-
Standard gravity
The acceleration that turns a member's or plate's mass into its own weight.
g = 9.80665 m/s²
Member axes and section properties frame/frame-model.jsExact- CadCraft
- BimCraft
- DetailCraft
-
Member length and local axes
The length of a member and the three unit vectors its forces and section are measured in.
L = |P_j − P_i|; x = (P_j − P_i) ÷ L; z = unit(Z − (Z·x) x); y = z × x; then y and z turned by the roll
Member axes and section properties frame/frame-model.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Zero-length member test
Removes a member whose two ends are at the same place.
|P_j − P_i| < 1e-6 mm
Member axes and section properties frame/frame-model.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Area and second moments of a polygon section
Area, centroid, second moments about the centroid, principal moments and their angle for a section outline with holes.
A = ½ Σ cᵢ; Iyy = (1 ÷ 12) Σ (v₀² + v₀v₁ + v₁²) cᵢ − A c_v²; cᵢ = u₀v₁ − u₁v₀; I₁,₂ = (Iyy + Izz) ÷ 2 ± √(((Iyy − Izz) ÷ 2)² + Iyz²)
Member axes and section properties frame/frame-model.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Torsion constant
The Saint-Venant torsion constant J of a catalog section or of an outline.
I with fillets: J = ⅔ B T³ + ⅓ (D − 2T) t³ + 2 α D₁⁴ − 0.420 T⁴; open: Σ b t³ ÷ 3; tube: 4 Am² t ÷ p; round tube: π (D⁴ − (D − 2t)⁴) ÷ 32
Member axes and section properties frame/frame-model.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Section properties for the analysis
Chooses the area, the two second moments, J and the roll a drawn section is analyzed with.
A = the profile's exact area if given, else the polygon's; Iy, Iz = Iyy, Izz, or I₁, I₂ with roll = the principal angle
Member axes and section properties frame/frame-model.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
A load split onto the member's axes
Turns one point or distributed load in a global or local direction into pieces along the member's own three axes.
piece = load × (direction · local axis); a, b clamped to [0, L]
Frame analysis: loads, releases, end forces and reactions frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Inverse of the released block
Inverts the small stiffness block of a member's released end actions.
Gauss–Jordan with partial pivoting
Frame analysis: loads, releases, end forces and reactions frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Member stiffness with released ends
Removes pinned or sliding end actions from a member's 12 × 12 stiffness.
k_c = k_kk − k_kr · k_rr⁻¹ · k_rk
Frame analysis: loads, releases, end forces and reactions frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Fixed-end loads with released ends
Moves the load a released end cannot carry onto the member's other end actions.
p_c = p_k − k_kr · k_rr⁻¹ · p_r
Frame analysis: loads, releases, end forces and reactions frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Member stiffness in global axes
Turns a member's stiffness from its own axes to the model's.
k_g = Tᵀ · k · T, by 3 × 3 blocks
Frame analysis: loads, releases, end forces and reactions frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Directions nothing stiffens
Finds translations and rotation directions at a node that no member resists, so they can be held instead of stopping the run.
translation: diagonal + spring ≤ 1e-14 × largest diagonal; rotation: eigenvalue ≤ 1e-10 × largest rotational diagonal
Frame analysis: loads, releases, end forces and reactions frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Eigenvalues of a symmetric 3 × 3 matrix
The principal stiffnesses and directions of the rotation block at a node.
cyclic Jacobi rotations; t = sign(θ) ÷ (|θ| + √(θ² + 1))
Frame analysis: loads, releases, end forces and reactions frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Loads of a case or combination
Adds up node forces and member loads of every case in a set, each times its factor, including the members' own weight.
own weight w = −factor × f × ρ × 1e-9 × A × g (N/mm along −Z)
Frame analysis: loads, releases, end forces and reactions frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Member end forces and reactions
The six forces at each end of every member and the forces at the supports, from the solved displacements.
f = k_c · u_local − p_c; reaction = Σ Tᵀ f − loads applied at the node
Frame analysis: loads, releases, end forces and reactions frame/frame-solve.js64-bit- CadCraft
- BimCraft
- DetailCraft
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.