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
-
Solar table triangle normal
A flat-shaded triangle with its normal.
n = (b − a) × (c − a) ÷ |…|
Pit and solar table meshes in the 3D view site3d-solar.js32-bit, display only- CivilCraft
-
Pit scene in project units
Converts a pit's ramp and bench outlines from meters back to project units for the 3D view.
coordinate ÷ k, where k is meters per project unit
Pit and solar table meshes in the 3D view pit-view.js32-bit, display only- CivilCraft
-
Bone data for the card
Packs the bone matrices (or dual quaternions) for the kernel.
Skinning on the graphics card anim/skin-gpu.js32-bit, display only- ModelCraft
-
Skinned points read back
Runs one skin on the card and reads the points back.
Skinning on the graphics card anim/skin-gpu.js32-bit, display only- ModelCraft
-
Render buffers of a definition
The triangles of a definition's shown faces as position, normal and texture-coordinate buffers.
Scene handed to the renderer render-mc.js32-bit, display only- ModelCraft
-
Height from a baked displacement map
The displacement height at a texture coordinate.
bilinear blend of the four texels round (u, v), wrapping at the edges, read at texel centers
Scene handed to the renderer render-mc.js32-bit, display only- ModelCraft
-
Displaced mesh point
Moves a mesh point along its averaged normal by the material's height times its scale, for the render.
p′ = p + n̂ × height(u, v) × scale
Scene handed to the renderer render-mc.js32-bit, display only- ModelCraft
-
A placement's surface in world coordinates
Every triangle corner of the selected object with its normal and UV, in world coordinates, for the bake.
Texture bake inputs ws-shading.js32-bit, display only- ModelCraft
-
Bake ray distance and widths
The ray distance, curvature width and cage distance handed to the bake.
dist = given, or 0.25 × bounding box diagonal; width = percent ÷ 100; cage = percent ÷ 100
Texture bake inputs ws-shading.js32-bit, display only- ModelCraft
-
Where a load is drawn on a belt
The distance along a belt at which a load is drawn at a given time.
accumulating: s = min(v × t + c, S); stopping belt: s = D(t) − D at entry; drawn at max(0, s) + L ÷ 2
Material flow drawing and playback addons/flow/lib/playback.js32-bit, display only- ModelCraft
-
Where a vehicle is drawn
A vehicle's point on its path segment at a given time.
f = (t − t₀) ÷ (t₁ − t₀); point = path at f × length
Material flow drawing and playback addons/flow/lib/playback.js32-bit, display only- ModelCraft
-
Belt strips
The boxes drawn for a conveyor between points sampled along its path.
pieces = max(4, ceil(|angle| ÷ 10)) for a curve, else 1; length = √(run² + Δz²); turn = atan2(Δy, Δx)
Material flow drawing and playback addons/flow/view.js32-bit, display only- ModelCraft
-
Loads and vehicles as instanced boxes
Sets the position, turn and size of each load and vehicle box for one frame.
Material flow drawing and playback addons/flow/view.js32-bit, display only- ModelCraft
-
Line buffer
The positions of a polyline in the host's units, for drawing.
Drawing NURBS curves and surfaces nurbs-ui/display.js32-bit, display only- ModelCraft
- PartCraft
-
Surface mesh buffers
The positions, normals, parameters and colors of a surface's triangles, for drawing.
Drawing NURBS curves and surfaces nurbs-ui/display.js32-bit, display only- ModelCraft
- PartCraft
-
Streamlines
Traces lines along the flow from seed points for drawing.
x ← x + ds × v(x + ½ ds v̂) ÷ |v|
Simulation and flow result plots flow.js32-bit, display only- PartCraft
-
Slice of a field
Copies one layer of cells of a field for the cut-plane picture.
Simulation and flow result plots flow.js32-bit, display only- PartCraft
-
Field for coloring
Picks the values and the color range for the cut plane.
Simulation and flow result plots flow-ui.js32-bit, display only- PartCraft
-
Plot mesh
Splits the part's triangles until no edge is longer than the cell size, for drawing a field.
midpoint = (a + b) ÷ 2
Simulation and flow result plots fea.js32-bit, display only- PartCraft
-
Smooth surface for display
The limit positions of the refined cage as a triangle mesh.
Freeform bodies: display mesh form.js32-bit, display only- PartCraft
-
Slider range of the section
The lowest and highest value of n·p over the model's box, the two ends of the section slider.
lo, hi = min, max of n · p over the 8 box corners
Section view plane section.js32-bit, display only- PartCraft
-
Section through a picked face
The cutting plane through a flat face, placed by the instance matrix of an assembly.
n = unit(M · n_face); c = n · (M · o_face)
Section view plane section.js32-bit, display only- PartCraft
-
Sketch coordinates to canvas pixels
Maps a sketch point to its place on the canvas.
x = w ÷ 2 + (u − c_x) × s; y = h ÷ 2 − (v − c_y) × s
Sketch editor drawing sketchview.js32-bit, display only- PartCraft
-
Dimension lines and label
The lines, arcs, arrowheads and text of a dimension as drawn.
label text = fmt(value, 3)
Sketch editor drawing sketchview.js32-bit, display only- PartCraft
-
Display mesh of a surface body
The triangles used to draw each surface body.
linear deflection = 2e-4 × diagonal; angular deflection = 2π ÷ 64
Surface display meshes, curvature map and zebra stripes surface.js32-bit, display only- PartCraft
-
Curvature per vertex
The discrete Gaussian and mean curvature at each vertex of a triangle mesh, for the curvature map.
K = (2π − Σ angles) ÷ A; H = |Σ (cot α + cot β)(pᵢ − pⱼ)| ÷ 4A, A = one third of the area of the triangles at the vertex
Surface display meshes, curvature map and zebra stripes surface.js32-bit, display only- PartCraft
-
Zebra stripe value
Whether a surface normal reflects a light or a dark stripe.
r = d − 2(d · n)·n; stripe = ⌊(atan2(r_x, r_z) ÷ π + 1) × stripes ÷ 2⌋ mod 2
Surface display meshes, curvature map and zebra stripes surface.js32-bit, display only- PartCraft
-
Triangle buffer for drawing
Copies the part's mesh into the vertex buffer the GPU draws.
3D view of the part view3d.js32-bit, display only- PartCraft
-
Result colors on the part
Spreads per-vertex or per-corner result colors onto the drawn triangles.
3D view of the part view3d.js32-bit, display only- PartCraft
-
What is under the pointer
Finds the face, edge or plane under the pointer.
3D view of the part view3d.js32-bit, display only- PartCraft
-
Frame of the study's plane
The origin and axes of the plane the result is drawn in.
x = (helper × n) ÷ |helper × n|; y = n × x
Magnetics add-on: the result drawn as display bodies addons/magnetics/lib/bodies.js32-bit, display only- PartCraft
-
Triangle cut to the crop rectangle
Cuts a field triangle to the rectangle that is shown.
Magnetics add-on: the result drawn as display bodies addons/magnetics/lib/bodies.js32-bit, display only- PartCraft
-
Field color bands
The color band each triangle falls in.
band = min(9, floor(|B| ÷ top × 10))
Magnetics add-on: the result drawn as display bodies addons/magnetics/lib/bodies.js32-bit, display only- PartCraft
-
Projection onto the picture
A model point's place in the picture and its depth.
orthographic: u = aspect ÷ 2 + q·right ÷ 2h; perspective: u = aspect ÷ 2 + q·right ÷ (2 tan(fov ÷ 2) × depth)
Illustrate: projection, hidden lines and vector pictures illustrate/camera.js32-bit, display only- PartCraft
-
Is a picture point hidden
Decides whether a point of an edge is behind a triangle of another surface.
barycentric l₁, l₂, l₃ in the picture; hidden when the triangle's depth < point depth − 10 eps
Illustrate: projection, hidden lines and vector pictures illustrate/hlr.js32-bit, display only- PartCraft
-
Feature edges
The mesh edges drawn as lines: open edges and edges where two faces meet at more than an angle.
drawn when open, or cos(face angle) < cos(angle)
Illustrate: projection, hidden lines and vector pictures illustrate/edges.js32-bit, display only- PartCraft
-
Numbers in the PDF
How a coordinate is written into a PDF page.
Illustrate: projection, hidden lines and vector pictures illustrate/pdf.js32-bit, display only- PartCraft
-
Mesh buffers
The item's box or mesh as geometry for drawing, turned from z up to y up.
Library 3D preview library-3d.js Every app32-bit, display only -
Camera position
Where the camera sits as the view is turned and zoomed.
position = target + dist × (sin φ sin θ, cos φ, sin φ cos θ)
Library 3D preview library-3d.js Every app32-bit, display only -
Variant body buffers
The chosen variant's box or mesh as geometry for drawing.
Library 3D preview library-configurator.js Every app32-bit, display only -
Vertex buffers for the 3D view
Copies an object's triangles into a buffer for the graphics card.
Drawing the 3D check view and CAD sheets on screen view3d.js32-bit, display only- TakeoffCraft
-
Canvas paths for a CAD sheet
Builds the canvas paths of one batch of lines and fills.
Drawing the 3D check view and CAD sheets on screen cadset.js32-bit, display only- TakeoffCraft
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.