Array issues

 
 
 
Posted by:hotknife
Data created:27 December 2013

I could do with some help on using Arrays - 

in the attached .file I'm combining two Vec3[] arrays but I'm struggling on how to flatten/insert or interrogate the Array manually. I'd expect to be able to cycle through the array using two Series nodes, set to the length of the Array and another Series set to 0,1 for both.

Or Get the values with a value of 0,1 but it reports that the array isn't a two dimensional array ?

Also trying to Insert a value reports that the Array is of fixed length, which is understandable to a point but how do I create an Array that I can Insert.

Again Set Value of an Array using Series - how does this work, I'm assuming that the VoidOutput isn't used?

Anybody fancy a Video on Arrays ?

 


Attached Files:

>Array.max (450560 bytes),

In general, to create a collection containing first the elements of one collection, then the elements of another, you need the Ephere.Math.Concatenate node.

However, currently something seems to be broken with the array element connections of the Concatenate node. First, it should be possible to wire into Concatenate the Vertices of one mesh (which should make a #0 slot appear under the 'collections' port), then the Vertices of the other mesh should be wired into the Add slot of the 'collections' port. This should produce a vector3[] array containing both meshes' vertices in the order they were wired. This is not working (at least for me), which we'll have to investigate.

As for the CreateArray node, it creates a new array where each element is one of the connections wired into it. So if you pass two Vertices lists into it, it will create an array of lists, which is probably not what you want in this case.

 

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev

Thanks - Maybe this is the same problem but .....

I'm trying to draw a Spline between every Vertex of one Mesh to every Vertex of another Mesh.

This I can mostly do...however one thing is slowing me down and I'm wondering what the easiest way to accomplish it is - if indeed I can without the above functionality.

1. So - if I have a Vertex Array {[5,10,10],[1,1,1],[3,3,3,],[6,6,6]}

2. And I want to repeat that array a variable number of times.  And combine it into one final Array as below.

In this case repeated 4 times ....{[5,10,10],[1,1,1],[3,3,3,],[6,6,6],[5,10,10],[1,1,1],[3,3,3,],[6,6,6],[5,10,10],[1,1,1],[3,3,3,],[6,6,6],[5,10,10],[1,1,1],[3,3,3,],[6,6,6]}

 

I realise using Series and Create Array can be used but they both 'repeat' as such [5,10,10],[5,10,10],[5,10,10],[5,10,10],[1,1,1],[1,1,1],[1,1,1],[1,1,1] etc....

I would like to duplicate the Array and maintain it's sequence - is this pobbile without coding ?

 

 

 

Sorry for the late answer, hadn't noticed your post.

This is indeed some strange behavior of Series. But in fact I didn't expect it to work at all for arrays.

To create multiple copies of the same value (without adding an increment to it as Series does) a special metanode would be a better idea, e.g. "Repeat". We'll add that.

 

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev