nortikin / sverchok

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

Testing Point Inside Mesh Node #1746

Closed enzyme69 closed 7 years ago

enzyme69 commented 7 years ago

point_inside_002_2017_07_24_13_03.zip prtscr capture_8

I am testing this node, seems like pretty intuitive, although I might be doing it wrong?

The idea is to somewhat fit the box elements perfectly, kind of creating Remesh, but each voxel box fits inside the 3D mesh input.

enzyme69 commented 7 years ago

ansv_points_inside_outside_001_2017_07_24_13_35.zip prtscr capture_9

AN BVH Inside thing seems to give more accurate points inside.

Wonder why...

zeffii commented 7 years ago

there's a thread for this already.. https://github.com/nortikin/sverchok/issues/1740 and a branch https://github.com/nortikin/sverchok/tree/pinside_mod

AN BVH Inside thing seems to give more accurate points inside. Wonder why...

different code, different algorithm

zeffii commented 7 years ago

These kinds of algorithms should be implemented as core Blender api calls.. so all add-on devs / scripters can use them, and they would be faster.

zeffii commented 7 years ago

look at AnimationNodes' implementation of such algorithm: https://github.com/JacquesLucke/animation_nodes/blob/c44280aae363402797e5da6319e755861b800380/animation_nodes/nodes/bvh_tree/is_inside_volume.py

read that and interpret what it does for yourself.

What do I think?

I think the multiple random direction raycasting from each test point might be the strength of the algorithm. I'm happy to add variations to the node. Excellent project for someone else.

Durman commented 7 years ago

@enzyme69 Points inside mesh have normal working. Do not use mask socket, the points out is already masked. Or use mask with primary points. I a little modernized your node tree.)) https://gist.github.com/f3be5fe21fb571b2fa7797c4b8e50add

2017-07-24_19-20-03

Durman commented 7 years ago

@nortikin Constraints rotation is good, thanks.)

rotation