Expand description
3D previews of NX, SOLIDWORKS, Inventor and Creo assemblies and CATIA products.
An assembly’s preview is put together from the previews of its
component files, with the placements the assembly stores: NX in its
structure stream (nxasm), SOLIDWORKS in its component tree
(swpart::placements, sub-assemblies already resolved there), Inventor
in UFRxDoc and AmRxSegment (invplace, sub-assemblies are files of
their own; a parent may re-pose children of a flexible
sub-assembly, invplace::Override), CATIA in the object stream of the
product (catprod, sub-products are files of their own), Creo in the
assembly’s NeuAsmSld section (mesh::creo::asm, sub-assemblies are
files of their own).
- The components are found by file name (
NAME.prtfor NX, the file name of the stored path for SOLIDWORKS and Inventor,name.prtorname.asmfor Creo, whose files are stored without their iteration suffix), the way file references are matched (references::files_of_revision): a file of the assembly’s own revision first, otherwise the latest revision of another item the viewer may see. A CATIA product names no files: a component is the document whoseCATProdContUUID it refers to (among the CATIA files of the product’s revision and those found by name), otherwise<part number>.CATPartor.CATProductby name. Components that are not in TeamCraft are left out. - A component that is an assembly itself is resolved the same way, its placements composed with the parent’s (depth and cycles bounded).
- Every part is converted like any other part (isolated preview
process, cache per content; as many at a time as the preview queue
runs), then every instance is placed straight into the assembly mesh.
The composition runs through
Previews::render: once, however many viewers and thumbnails ask for the assembly at the same time.
The result depends on which component versions were found, so it is
cached under a key built from the content hashes of everything used
(Previews::assembly_path): a new version of a component gives a new
preview, an unchanged assembly is built once.
§Invariants
- Permission: only files the viewer may see are used (the same project-group filter as file references); nothing is written to the database.
- Bounds: at most
MAX_DEPTHlevels,MAX_PLACEDplaced parts andmesh::MAX_TRIANGLEStriangles; an assembly that contains itself is not entered again.
Structs§
- Plan
- The parts of an assembly with their placements in the assembly.
Constants§
- MAX_
DEPTH - Nesting levels of sub-assemblies followed at most.
- MAX_
PLACED - Placed parts at most.