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

"Relax mesh" node

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

  • Скачать
  • Почтовые патчи
  • Простое отличие
Слиты nikitronn запросил слияние relax_mesh в master Янв 04, 2021
  • Обзор 8
  • Коммиты 5
  • Конвейеры 0
  • Изменения 6

Created by: portnov

This node moves vertices of the input mesh, in order to make it more "relaxed", i.e. for mesh elements to have more even distribution in some sense. There are several algorithms supported, each of which has different definition of what "relaxed" is:

  • Lloyd-based algorithm. This is created after well-known Lloyd algorithm. For each vertex, find centers of all incident faces, and then find the average of those points; this will be the new location of the vertex. Effectively, this algorithm tries to make each face as close to circle as possible. This algorithm shows it's best for meshes that consist of Tris.
  • Edge lengths. Scale each edge up or down, trying to make all edges of the same length. Target edge length can be minimum, maximum or average of all lengths of edges of the source mesh.
  • Face areas. Scale each face up or down, trying to make all faces of the same area. Target face area can be minimum, maximum or average of all areas of faces of the source mes.

These algorithms can change the overall shape of the mesh a lot. In order to try to preserve original shape of the mesh at least partially, the following methods are supported:

  • "Linear" method is supported for Lloyd algorithm only. When the algorithm has found the new location of the vertex, put it at the same distance from the plane where centers of incident faces lie, as the original vertex was. This method can be slow for large meshes.
  • "Tangent": move vertices along tangent planes of original vertexes only (i.e. perpendicular to vertex normal).
  • "BVH": use BVH tree to find the nearest point to the newly calculated vertex on the original mesh.

Screenshot_20210104_140240

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