Request

Response

    Autodesk.DataVisualization

    SurfaceShadingGroup

    A grouping data structure that allows rendering units to be organized in a hierarchical manner. It can contain zero or more sub-groups and/or SurfaceShadingNode leaf nodes as child.

    new SurfaceShadingGroup(id, name)

    Constructs an instance of SurfaceShadingGroup object.

    Parameters

    id*
    string
    The identifier of the group.
    name
    string
    Optional identifier associated with this SurfaceShadingGroup object. Equivalent to id by default.
    * Required

    Examples

     const cylinders = [
        new Autodesk.DataVisualization.Core.SurfaceShadingNode("engine-cylinder-00", ...),
        new Autodesk.DataVisualization.Core.SurfaceShadingNode("engine-cylinder-01", ...),
        new Autodesk.DataVisualization.Core.SurfaceShadingNode("engine-cylinder-02", ...),
        new Autodesk.DataVisualization.Core.SurfaceShadingNode("engine-cylinder-03", ...),
    ];
    
    const groupName = "front-cylinders";
    const frontCylinders = new Autodesk.DataVisualization.Core.SurfaceShadingGroup(groupName);
    cylinders.forEach(cylinder => frontCylinders.addChild(cylinder));
    
    // User selects to visualize a group of cylinders from the UI
    onEngineCylinderGroupSelected(cylinderGroupName) {
        const sensorType = "vibration";
        const confidenceSize = 300;
    
        // 'cylinderGroupName' can be "front-cylinders"
        dataVizExt.renderSurfaceShading([cylinderGroupName],
            sensorType, getSensorValue, confidenceSize);
    }
    
    Show More

    Properties

    children
    The child nodes, each of which is either another shading group, or ashading leaf node.

    Methods

    addChild(child)

    Adds a child node to the shading group.

    Parameters

    child*Thechild node to be added to the shading group. A child node caneither be another SurfaceShadingGroup, or SurfaceShadingNode.
    * Required

    getNodeById(id)

    Find a child node by matching the id

    Parameters

    id*
    string
    node id
    * Required

    Returns