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

Formula node mk3

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

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

Created by: portnov

Addressed problem description

Our current "Formula" node has a couple of problems:

  • Inconvenient syntax with only variables being available "X" and "n[0]" .. "n[150]"
  • weird code with Lenin and some other strange people being involved for some reason >_<

It is also not very convenient to use it to produce curves or surfaces, because you have to write something like "[sin(n[0]), cos(n[0]), 0]".

Solution description

Re-implement Formula node:

  • Allow to write arbitrary Python expressions with arbitrary variable names, so that you can just write R*sin(phi). Use the same technique as in "mesh evaluate" node to manage input sockets.
  • Add possibility to write not only single formula, but up to 4. So to generate an ellipse, you have to write A*cos(t) in one input box, B*sin(t) in another, and that's it, no brackets and so on. By default, show only one input box to save screen space for most cases.
  • Support a flag to enclose each vector produced by several formulas into separate sub-list. It is usually required when you have more than one formula; it is usually not required if you have only one formula; but there may be other options.
  • Support a flag to enclose the whole output into additional pair of brackets, which other nodes may want to see.

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.
  • Migration from old node supported.
  • Ready for merge.
Ответственный
Назначить
Проверяющие
Запросить ревью
Оценка трудозатрат
Исходная ветка: formula3