04-28-2020 10:02 AM
I'm working on displaying a grid on a 3D display and would like to utilise variables that you can change on the front panel to change the dimensions of the grid. Problem is i cant put any of the variables into the vertex array. I've posted a picture below. this is my first post so sorry about any format issues.
Solved! Go to Solution.
04-28-2020 11:42 AM
Hello,
Your problem description isn't clear.
I'm working on displaying a grid on a 3D display and would like to utilise variables that you can change on the front panel to change the dimensions of the grid.
Does that mean the grid is 3 dimensional ?
Problem is i cant put any of the variables into the vertex array.
The vertex array is the grid ? And the variables are the sizes of each dimension of the array/grid right ?
So why do you want to insert (put) the sizes in the array ?
I've posted a picture below.
All I see arrays of cluster of 3 DBL. Why is there 3 times the same constant ? I suppose the control is the same type as the constants.
What I imagine you want is : resize a 3D array of numbers (DBL) with controls on the front panel. Am I right ?
Yddet
04-28-2020 11:51 AM - edited 04-28-2020 11:55 AM
To make it more clear I've got a 3D object displayed on the front panel and i would like to automate the a grid creation process to show its position in the XYZ axis through the use of a loop. I would like to have the user input 3 variables for the length, width and depth of the area and have a grid span only to that area. I've included more in-depth pictures below, sorry for the vague question. I've made a bit of progress since but still a work in progress
grid creation
manual input grid that i made earlier
This is where i put the data in for the manual input, i need to somehow generate 2 separate vertex points and put them into this 1D array which is the crux of my problem.
04-28-2020 02:18 PM - edited 04-28-2020 02:21 PM
Hi Earl,
@Earl_Toucan wrote:
This is where i put the data in for the manual input, i need to somehow generate 2 separate vertex points and put them into this 1D array which is the crux of my problem.
When you want to "add" elements to an array you can use BuildArray (in concatenation mode) to add at array start or end. Or use InsertIntoArray to "add" elements somewhere into the array…
On your code image:
Why are there backwards wires?
Why are there coercion dots?
Why do you try to insert into an empty array?
Why don't you attach the real code? (We cannot debug images in LabVIEW…)
04-28-2020 06:11 PM
Hi
Thanks for the help, I've only just started with Labview and i haven't had much practise with arrays yet. There are backwards wires because this is only a section of the code i want to work on and i didn't think the rest was relevant (ive included the rest below but its still a work in progress).
I didn't even know what coercion dots were before you pointed them out but they'er there because the double and integer values are being divided. Should i rather use a double to get rid of the coercion?
Do you mean i should be entering in values into an empty array ?
Thanks for the advice
04-28-2020 06:54 PM
The more concerning coercion dot is the one on the green wire going from the subVI to the Drawable input of the SceneObject property node.
04-29-2020 12:43 AM
Hi Earl,
@Earl_Toucan wrote:
I didn't even know what coercion dots were before you pointed them out but they'er there because the double and integer values are being divided.
I haven't seen this in the image posted with the first message.
I was concerned about the coercion dots at the BundleByName function: why are there coercion dots when all the constants around this function are under your control?
04-29-2020 03:53 AM
04-29-2020 07:12 AM - edited 04-29-2020 07:16 AM
I got it to work by using 2 for loops for each axis then bundling the values and inserting them into an array,I've included my solution below in case u want to see. Thanks for all the help 🙂
This is an extra side note but does Labview support a render distance function as if i make a large grid i tends to slow down the simulation ?