Jump to content

3D Picture control with a produce-customer loop


Recommended Posts

Hi guys,

Have a question about 3D Picture Camera control with a produce-customer-Loop. In the first customer I want to control the geometries of an object displayed in a 3D Picture, and in another to control the camera of the 3D picture. But I can't find a way to realize the control of the "set camera" Invoke Nord in the second customer.

Does anyone have an idea on this? I've tried to use the reference or a local variable, but they seemed not the right way.

The loop is as followed, thanks everyone reads this.

3d plot.vi

Edited by tonykun
Link to comment

thanks vugie.

But now appears a new problem, when i add a invoke Nord Redraw linke this, i cant do the control of the geometrie in the first queue any more.

i dont know the reason. do u have some hints?

post-7450-0-98923500-1310645546_thumb.pn

Edited by tonykun
Link to comment
  • 4 weeks later...

post-7450-0-98923500-1310645546_thumb.pn

hello vugie,

your hints so helpful, have learn much from this.

now have a new question, i want to display two objects each as subVi in the loop, and then to realize the controll of one of them. As in the Vi bellow, i suppose to controll the position of the cylinder, and then add it to a 3D picture. But i can display any one, so amusing~~

can u take a look of this and give some hints?

3d Objects.vi

Cylinder.vi

Box.vi

Link to comment

hello vugie,

your hints so helpful, have learn much from this.

now have a new question, i want to display two objects each as subVi in the loop, and then to realize the controll of one of them. As in the Vi bellow, i suppose to controll the position of the cylinder, and then add it to a 3D picture. But i can display any one, so amusing~~

can u take a look of this and give some hints?

I'm not sure what do you want to achieve, but:

  • Box.vi never finishes exectuition (infinite loop), so your middle loop in 3D Objects.vi never starts to work
  • Infinite loop in Cylinder.vi, however as it is called inside a middle loop it also never starts to work.
  • Setting dimensions twice in both cylinder and box VIs is really not needed
  • You always have to create object and its drawable ONCE, then manipulate them using the same reference. If for some reason you want to recreate it (the only reason for that I recall is when you want to animate mesh) you have to remove previous object and close its reference. Otherwise you'll have memory leak.
  • If you want to control something from second vi, call it once and pass to it references of objects to manipulate and queue reference to let it send information back to master vi.

Link to comment

I'm not sure what do you want to achieve, but:

  • Box.vi never finishes exectuition (infinite loop), so your middle loop in 3D Objects.vi never starts to work
  • Infinite loop in Cylinder.vi, however as it is called inside a middle loop it also never starts to work.
  • Setting dimensions twice in both cylinder and box VIs is really not needed
  • You always have to create object and its drawable ONCE, then manipulate them using the same reference. If for some reason you want to recreate it (the only reason for that I recall is when you want to animate mesh) you have to remove previous object and close its reference. Otherwise you'll have memory leak.
  • If you want to control something from second vi, call it once and pass to it references of objects to manipulate and queue reference to let it send information back to master vi.

thank you so much vugie, i've changed the structure, without the produce-consumer-loop any more. just manipulate the geometra as a added object.

have a nice weekend~~

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.