Created by: Durman
Solution description
Node with really simple functionality of merging two 2d meshes in one with finding all intersections between them.
But it also has output of mask which represents belonging new faces to input meshes.
It is has the same basic algorithm as intersection edges node: #2480 Actually it still remains a lot of work to do. And I'm not even sure that the node work properly at this stage. I would appreciate any help in testing it. It will be more easier to fix bugs at this moment while the node did not come more complicated.
Index mask
Since last commit index mask is available. I would say this mask is compromise between flexibility and simplicity.
This mask gives separately for each output mesh faces index of initial face from mesh A and B. If mesh A and mesh B does not have self intersection then for each output face there is only one related face from A and B. If mesh A or mesh B has self intersection this figure can be increased. This mask ignores such cases and just takes smallest index of related face from A and B.
Why this mask? This intended to help bind information of initial mesh to final result after the node process. I will show on simple example how this should work.
example
Consider intersection between four squares and circle. In the example below mask index A marks faces with indexes of input mesh A. I decide to mark faces which have not related faces from initial face by -1 value. It is easier to handle.
Suppose the initial squares had information about their height for extrude node. With such mask we can apply such values to new mesh. But output mesh has also some polygons which are related with mesh B only. For such faces the value of height should be generated. Suppose squares will have height 1 and rest of mesh 0. For this we should generate simple mask which will mark only faces related with mesh A. And rest of work will be done by switch node.
This just simple example. With such mask there are plenty of room for creativity.
New mask can be found on N panel.
To do:
-
Handling of coincidence edges case -
Hole detection -
Monotonization of polygons -
Advanced mask
Preflight checklist
-
Code changes complete. -
Code documentation complete. -
Documentation for users complete. -
Manual testing done. -
Ready for merge.