nortikin / sverchok

Sverchok
http://nortikin.github.io/sverchok/
GNU General Public License v3.0
2.26k stars 233 forks source link

[PR] List multymask conceptual SNL #3643

Open nortikin opened 4 years ago

nortikin commented 4 years ago

We have not node dealing with masking multiple lists

i.e. i have some obejcts that have different materials indices, i need to calc areas. i need sort pols [p,p,p,p,p,p,p] by materials with mask as [1,2,3,4,5,6,0] if i use list item, it gives indices, but not grouping pols to materials.

SNL multymasking

My commit https://github.com/nortikin/sverchok/commit/8afad585749f25f5149a7ac6b3c6a69fbbcb707e is all about this future node. Interesting, that keys for masking can be strings and other types.

изображение

nortikin commented 4 years ago

weak place here is afterwords process - list del levels most users not understand it. summing areas also (if we need total value area node not gives opportunity). also weakk place - dispatching after process instead vectorising pipeline.

Maybe two nodes -

  1. simple for user to only areas calc, that utilize vertices also
  2. list multimasking to nested list output.
Durman commented 4 years ago

2020-10-13_14-09-22

Durman commented 4 years ago

I would not use monads so surely.

======================================================================
FAIL: test_monad_import (tree_import_tests.MonadImportTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/nortikin/sverchok/installation/blender/2.82/scripts/addons/sverchok/tests/tree_import_tests.py", line 52, in test_monad_import
    JSONImporter.init_from_path(self.get_reference_file_path("monad_1.json")).import_into_tree(new_tree)
  File "/home/travis/build/nortikin/sverchok/installation/blender/2.82/python/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/home/travis/build/nortikin/sverchok/installation/blender/2.82/scripts/addons/sverchok/utils/testing.py", line 549, in assert_logs_no_errors
    self.assertFalse(has_errors, "There were some errors logged")
AssertionError: True is not false : There were some errors logged
----------------------------------------------------------------------
nortikin commented 4 years ago

ok