• Converts an array of AcDbOsnapMode values into a single integer bitmask.

    ⚠️ Important: AcDbOsnapMode values are ordinal identifiers, not bit flags. Each mode is mapped to a bit position using the rule:

    bit = (mode - 1)

    This allows multiple object snap modes to be stored efficiently in a single integer using bitwise operations.

    Parameters

    Returns number

    Integer bitmask representing the enabled object snap modes

    const mask = acDbOsnapModesToMask([
    AcDbOsnapMode.EndPoint,
    AcDbOsnapMode.MidPoint,
    AcDbOsnapMode.Perpendicular
    ])
    // mask === 131