Bitbybit Docs
    Preparing search index...

    Interface AssemblyStructureDef<T>

    interface AssemblyStructureDef<T> {
        parts: AssemblyPartDef<T>[];
        nodes: AssemblyNodeDef[];
        removals?: string[];
        partUpdates?: AssemblyPartUpdateDef<T>[];
        loadedParts?: AssemblyLoadedPartDef[];
        clearDocument: boolean;
    }

    Type Parameters

    • T
    Index

    Properties

    parts: AssemblyPartDef<T>[]

    All part definitions (shapes that can be instanced)

    All nodes (assemblies and instances)

    removals?: string[]

    Labels to remove from existing document. Can be part labels, instance labels, or assembly labels. Ignored when creating a new document.

    partUpdates?: AssemblyPartUpdateDef<T>[]

    Updates to apply to existing parts in the document. Each update can change the shape, name, and/or color of a part. Ignored when creating a new document.

    loadedParts?: AssemblyLoadedPartDef[]

    Each entry copies a label tree from a source document into this document, preserving sub-assembly hierarchy, names and colors. The copied root then behaves as a regular part: instance nodes can reference it by partId and place it multiple times with different transforms.

    clearDocument: boolean

    Whether to clear the existing document before adding new content. Only relevant when an existingDocument is provided.

    • true: Clear all existing shapes, then add new parts/nodes (full rebuild)
    • false: Keep existing shapes, apply removals/updates, add new parts/nodes (incremental)
    false