AdaCAD Library Documentation - v1.1.4
    Preparing search index...

    Function updateMaterialIds

    • used to update materials lists when we remove a material. Works by taking an array of materials and then mapping their indexes to the one identified in the map If a mapping isn't found for a given number in the material list, it is replaced with the replacement value.

      Parameters

      • material_mapping: number[]

        the mapping of rows of cols to a material

      • index_map: MaterialMap[]

        a map from old to new material ids

      • replacement_ndx: number

        anything not found in the map will be replaced by this value

      Returns number[]