nortikin / sverchok

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

Viewer Draw Issue if faces socket is connected and no faces data. #5009

Open satabol opened 1 year ago

satabol commented 1 year ago

Sverchok 1.3.0-alpha, Blender 3.6.x, Windows 11.

This is good expected example. If box is a first and plane is a second then all look good: image

This is bad example. If plane is a first and box is a second then nothing is visible: image

This is bad example. If polygons are disconnected then visible only verts and edges. It is only part on mesh: image

test file: issue_5009.ViewerDraw.if faces socket is connected and no faces data.blend.zip

zeffii commented 1 year ago

i recall some part of about why this is. the node wass set up to expect a consistent set of inputs... so the node analyses the first set of incoming data, and expects the rest of the data to be similar. For example, If the verts set of inputs are verts+edges, then it expects all consecutive sets to be verts and valid edges. This intended to help speed up preprocessing, it helps assume the form of all the data, by looking only at the first set.

satabol commented 1 year ago

Hi @zeffii , thank you.

Do exist combination data for faces and edges to skip them out if they do not exists and sockets are connected?

Is there any combination of data which lets to the node to work in case when the sockets are connected?

I refactor Spatial->delaunay_3d. It can generate geometry with only vertices, vertices and edges, vertices edges faces. But there is a problem - if all sockets are connected and no faces are generated by Delaunay (verts and edges only) then nothing is visible. P.S. If source cloud of dots is on straight line then result is only vertices and edges, no faces and no output. This can be raise at dinamic situations.

zeffii commented 1 year ago

it's a known issue (bug? .. )

The current input handling is purely an optimization, because for the most part the input data is going to be homogenous. Look at the subtly complicated setup you had to configure to show the node's failure . We could make a test special mode (it could be made permanent default mode if it's not significantly slower) that makes no assumptions about consecutive sets of input data.

I would like to push #4983 first..