Bitbybit Docs
    Preparing search index...

    Interface AssemblyPartDef<T> (Models.OCCT)

    Part definition for assembly structure. Represents a shape that can be instanced multiple times.

    interface AssemblyPartDef<T> {
        id: string;
        shape: T;
        name: string;
        colorRgba?: any;
        edgeColorRgba?: any;
        metallic?: number;
        roughness?: number;
        emissiveRgb?: any;
        faceColors?: AssemblySubShapeColor[];
        edgeColors?: AssemblySubShapeColor[];
        properties?: Record<string, string | number | boolean>;
    }

    Type Parameters

    • T
    Index

    Properties

    id: string

    Unique identifier for referencing this part

    shape: T

    The shape for this part

    name: string

    Display name for the part

    colorRgba?: any

    Optional color for the part

    edgeColorRgba?: any

    Optional color for the edges of the part. Exports write it on the part when the part has a color, and on each edge otherwise, so no reader takes it for the color of the faces.

    metallic?: number

    Optional metalness of the part, from 0 to 1. With roughness and emissiveRgb it gives the part a PBR material that glTF exports read; it needs colorRgba, and what it leaves out keeps glTF's default.

    roughness?: number

    Optional roughness of the part, from 0 to 1, for its PBR material

    emissiveRgb?: any

    Optional light the part gives off, each channel from 0 to 1, as glTF's emissive factor

    faceColors?: AssemblySubShapeColor[]

    Optional colors of some faces, by the indexes shapes.face.getFaces gives; a later entry wins

    edgeColors?: AssemblySubShapeColor[]

    Optional colors of some edges, by the indexes shapes.edge.getEdges gives; a later entry wins

    properties?: Record<string, string | number | boolean>

    Optional properties of the part, such as its part number, which the STEP export writes as user-defined properties of its product