• S sverchok
  • Информация о проекте
    • Информация о проекте
    • Активность
    • Метки
    • Участники
  • Репозиторий
    • Репозиторий
    • Файлы
    • Коммиты
    • Ветки
    • Теги
    • Участники
    • Диаграмма
    • Сравнение
  • Задачи 148
    • Задачи 148
    • Список
    • Доски
    • Спринты
  • Запросы на слияние 21
    • Запросы на слияние 21
  • CI/CD
    • CI/CD
    • Конвейеры
    • Задания
    • Расписания
  • Развертывания
    • Развертывания
    • Окружения
    • Релизы
  • Пакеты и реестры
    • Пакеты и реестры
    • Реестр пакетов
    • Реестр контейнеров
  • Мониторинг
    • Мониторинг
    • Инциденты
  • Аналитика
    • Аналитика
    • Поток ценности
    • CI/CD
    • Репозиторий
  • Wiki
    • Wiki
  • Сниппеты
    • Сниппеты
  • Активность
  • Диаграмма
  • Создать новую задачу
  • Задания
  • Коммиты
  • Доски с задачами
Свернуть панель
  • nikitronn
  • sverchok
  • Запросы на слияние
  • !2432

Calculate Mask node.

  • Ревью изменений

  • Скачать
  • Почтовые патчи
  • Простое отличие
Слиты nikitronn запросил слияние calc_mask_node в master Июн 02, 2019
  • Обзор 4
  • Коммиты 3
  • Конвейеры 0
  • Изменения 6

Created by: portnov

Addressed problem description

There are nodes, which output, for example, "All faces" and "Processed faces" or smth like that. To do something with that output, it would be usually more effective to deal with "All faces" and "Processed faces mask" instead.

Solution description

The new node takes two sets of objects (numbers, vertices, edges, faces, whatever) and returns a mask: True if item is in subset, otherwise False.

The node can work on different levels of data trees. For example, given Subset = [[1, 2], [3,4]] and Set = [[1, 2], [3, 4], [5, 6]]:

  • with level = 0 it will output [True, True, False]
  • with level = 1 it will output [[True, True], [True, True], [False, False]]

Given Subset = [[1], [5,6]] and Set = [[1, 2, 3], [7, 8, 9]]:

  • with level = 0 it will output [False, False] (because, for example, there is no [1, 2, 3] in the [[1], [5,6]])
  • with level = 1, it will output [[True, False, False], [False, False, False]]

There is also new API data_structure.calc_mask, which may be used by other nodes, including scripted ones.

Preflight checklist

Put an x letter in each brackets when you're done this item:

  • Code changes complete.
  • Code documentation complete.
  • Documentation for users complete (or not required, if user never sees these changes).
  • Manual testing done.
  • Unit-tests implemented.
  • Ready for merge.
Ответственный
Назначить
Проверяющие
Запросить ревью
Оценка трудозатрат
Исходная ветка: calc_mask_node