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

New sorting modes for Vector Sort node.

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

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

Created by: portnov

This adds several sorting modes:

  • Auto XYZ. Automatically detect a plane where all vertices are lying (or a plane most similar to that). Then sort vertices in the reference frame of that plane: first along X (which is some arbitrary direction along the plane), then, if there are some points with the same X - sort them along Y (which is some another direction in the plane, but perpendicular to X), and then if there are still points with same X and Y - sort them along Z (i.e. along the normal of the plane).
  • Auto Direction. Automatically detect a straight line along which all points are lying (or a line most similar to that). Then sort all vertices along that line.
  • Auto Phi / Z. Automatically detect a plane where all the vertices are lying (or a plane most similar to that); also calculate a central point in that plane (barycenter of all vertices). Then express all vertices in terms of cylindrical coordinates in reference frame of such a plane: Z axis is pointing along plane's normal, Phi is going counterclockwise around plane's normal. Then sort the vertices: first according to Phi value; then, if there are points with the same Phi, sort them according to Z value; and, if there are points with the same Phi and Z, sort them according to Rho value (distance from central normal).

This also adds reverse toggles where it was not so hard to add:

  • Reverse for Auto Direction and Auto Phi / Z modes;
  • Reverse X / Y / Z for XYZ and Auto XYZ modes.

I've also tried to update documentation accordingly. However, I still don't quite understand what exactly Axis mode does, so I had do leave it undocumented.

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.
Ответственный
Назначить
Проверяющие
Запросить ревью
Оценка трудозатрат
Исходная ветка: vector_sort_upgrade