Expand description
Mass properties of assemblies: the material library, the mass settings of
revisions and files, and the roll-up of mass, centre of gravity and
inertia tensor over the multi-level BOM (see massprops and
docs/src/research/mass-properties.md).
- Frames: every geometry file is taken as exported in the common
assembly / vehicle frame – no placements are applied. A file shows
instancesunits of its item; a BOM line contributesquantity / instancestimes the file’s body (copies at the same place when that is not 1, which is flagged). - Sources per revision, first that applies: the measured mass (with optional CG and inertia; it covers the whole sub-tree), the sum of the BOM children, the geometry file × density (override, else the material library entry of the revision’s material), the geometry file with the entered mass (uniform density), the entered mass alone (counts in the total mass but has no position), nothing (missing).
- Computation: the mesh integrals come from the isolated preview
process and are cached per content hash (
Previews::mass_geometry); this module only scales and adds them (reportis pure). - Read rights: the structure is loaded like the BOM page
(
bom::load_structure); restricted lines are left out and counted.
Structs§
- Geometry
File - A file of a revision that can serve as geometry, with its settings.
- Mass
Line - Mass
Report - Mass
Settings - The stored mass settings of a revision (defaults when none are stored).
- Mass
Settings Update - New mass settings of a revision (and of its geometry file).
- Material
- Material
Input - The editable fields of a material.
- Revision
Mass - The mass settings of a revision the actor may read, its candidate geometry files and the file that is used.
Enums§
- Source
- Where the numbers of a line come from.
Constants§
- GEOMETRY_
FORMATS - Formats whose 3D preview can serve as geometry, in the order the automatic choice prefers them (exported meshes first, then STEP, then the lightweight representations stored in native CAD files).
- MAX_
DENSITY - Highest density accepted (kg/m³; osmium is 22 590).
- MAX_
GEOMETRY_ FILES - Geometry files computed for one roll-up at most (each may need a conversion in the preview process).
Functions§
- choose_
geometry - Chooses the geometry file of a revision (
None= back to automatic), keeping every other mass setting, like the one-click choice on the page. Same rules asupdate_settings. - create_
material - Adds a material to the library (administrators).
- delete_
material - Removes a material from the library (administrators). Revisions keep their material text; their mass is then reported as missing a density.
- material
- materials
- The material library, by name (every signed-in user may read it).
- parse_
point - Parses
x,y,z(m); empty = the origin. - report_
revision_ ids - The revisions a report read (for the read log).
- revision_
settings - rollup
- The mass properties of the structure below a revision the actor may
read, under the revision rule; the inertia is also given about
reference(m). Geometry is computed in the preview process (cached). - to_csv
- The report as CSV: one row per line, the totals first as comment-free
rows with
level0 (TOTAL,INERTIA_CG,INERTIA_REF). - update_
material - Changes name, density and notes of a material (administrators).
- update_
settings - Stores the mass settings of a revision: density override, geometry file with its unit and instance count, measured values.
- validate_
density - Validates a density in kg/m³.