Page 1 of 1
Vertex or Vector array in Simulation Flow graph
Posted: Mon Jun 17, 2013 3:21 am
by CG_Nema
How can I store the vertices of a mesh in an array in the new Graphs interface so that I can run them through a loop. I can't seem to find the right nodes for this.
Re: Vertex or Vector array in Simulation Flow graph
Posted: Mon Jun 17, 2013 10:07 am
by galakau
Hi,
please check out the attached image of graph nodes.
This is the way, to get an array of all mesh-vertices.
The "GetObject->GetObjectMesh->ObjectMeshToMesh" Nodes can be
replaced by any other mesh type.
For efficiency reasons, you might remove the "ObjectMeshToMesh"-Node, since
"GetVertices" also accepts ObjectMeshes as input. Just added it, to make clear
that you may access any "Mesh"-Type...
Unfortunately, I have to admit, at this point, it is not possible to set
in return the vertices of meshes via graph-nodes.
To do so, you have to wait for the next patch...
Galakau
Re: Vertex or Vector array in Simulation Flow graph
Posted: Mon Jun 17, 2013 6:35 pm
by CG_Nema
Thank you for the reply, but this is the setup I've been trying. I should have been more specific:
I want to compare the positions of verts with the same index from 2 meshes with identical topology. So I think I need to store the position vectors of the verts into 2 arrays and run them through a compound node. I will try it again with these nodes, this whole visual programming is very new to me, any help would be nice.
I wish the documentation had a node reference like the python reference.
Re: Vertex or Vector array in Simulation Flow graph
Posted: Tue Jun 18, 2013 2:50 pm
by galakau
Hi,
well, then it depends on what exactly you want to do...
But if the topology is equal, you may use the shown graph twice, with different object-inputs.
You will get two vertex-arrays, with same order, since the topology is equal.
If you would like to, e.g., detect changes, you may substract simply the arrays and compare
the resulting vector-array to (0,0,0).
Of course, you also can use a compound and a for-loop for touching all vertices separately.
BTW: We are working on the documentation. But we are publishing at the moment tutorials
on the graph-nodes, check them out, since the basics are already covered:
http://www.youtube.com/user/RealFlowLab ... lf_index=3
more are in production at the moment...