Skip to main content

Module invplace

Module invplace 

Source
Expand description

Autodesk Inventor assemblies (.iam): which files are placed where (see docs/src/research/inventor-display-preview.md).

  • The stream UFRxDoc holds the table of referenced files (the author’s absolute path and a file id per file) and one record per occurrence:

    u32 0 | u32 file id | u32 occurrence id | u32 number | u32 instance
    | u32 n, n × UTF-16 title | 6 × 00, 0x80 | flags (0x40: not visible) | …

    The records are followed by property blocks whose layout is not known, so they are found by scanning for exactly this shape with known ids. Each block holds the occurrence’s name record 01 05 01 00 00 00 05 (u32 n, n × UTF-16) and, 31 bytes after its end, the record 01 07 01 00 00 00 07 whose byte is 1 for a suppressed occurrence (the layout invasm reads too; at that place in 2 564 of 2 565 occurrences of the sample set). Suppressed occurrences are left out.

  • The segment AmRxSegment holds one section of class 232792BC per occurrence: u32 0, u16, u32 ref, [u32 0x203], a packed 4 × 4 matrix and a 124-byte tail with the occurrence id at offset 112 and its persistent key at offset 120. The matrix maps component to assembly coordinates as p' = R·p + t (column vectors, centimetres). Its mask has two bits per element (low half: one, high half: zero; both: minus one); elements without a bit follow as f64.

  • Flexible sub-assemblies are re-posed by their parent: a section of class F17A4562 (u32 0, u16, an array of occurrence ids from this assembly down to the sub-assembly, an array of section refs (index + 1) | 1 << 31) points to sections of class 2238DCC5 (u32 0, u16, u32 key, u32 kind, [u32 0x203], a packed matrix, 120 bytes): kind 2 replaces the local placement of the child with that key. Kind 1 (positional representations, empty path) is not applied.

Sub-assemblies are files of their own; services::assemblies resolves them and composes the placements, applying the overrides on the way down (Override::pose, Override::passed_down).

Structs§

Occurrence
A placed occurrence of an Inventor assembly.
Override
A pose a parent assembly gives a component further down.

Constants§

PLACEMENTS
The segment with the occurrence placements.

Functions§

components
The visible components of an assembly (bytes of the whole file); None when it is no Inventor assembly.
kind_of
What an Inventor file is for the preview: an assembly with its visible components (file name and placement), or something else.