Resources Numerical accuracy Calculation policy

Placing a linked model

Works out the matrix that puts a linked IFC model in the right place beside the open one, from both files' map positions or from two pairs of picked points.

How the precision is kept

Both methods build a 4 × 4 matrix in 64-bit, in millimeters. Through the maps, six matrices are multiplied and the two large map positions largely cancel in the product. From picked points, the matrix is a turn about the vertical and a move. The matrix is saved with each entry rounded to 9 decimals.

Open item. Save the link matrix with full 64-bit precision instead of 9 decimals.

Calculations under this policy

4 calculations in 1 source file. The code is read from the released app when this page loads. It is the calculation people run, not a copy kept for this page.

model-links.js BimCraft 0.8.1 64-bit 4 calculations Reviewed

Tests tools/bimcraft-test/draw06-test.mjs

In detail

Method
Map: link mm → link units → map meters → host map units → host units → mm. Points: angle = direction of the host pair − direction of the link pair; translation = host point − R × link point.
Number types
64-bit numbers; a matrix is an array of 16, column-major.
Tolerances
Saved entries rounded to 1e-9, absolute.
Checked by
tools/bimcraft-test/draw06-test.mjs calls mapMatrix, pairsMatrix, sceneAdjust and fileOfScene in Node.
Limits
The picked-points method solves a turn about the vertical and a move only; it does not solve a scale, and the second pair gives a direction, not a distance.

Approach: 64-bit, stated limit

The arithmetic is 64-bit, but the method or the data sets the accuracy: a solver tolerance, a mesh, a step size, a datum shift, a table. The limit is stated where the result is shown.

Every policy that takes this approach