Jump to content


Photo
- - - - -

3D Picture control Parent Child Relation with Solidworks


  • Please log in to reply
11 replies to this topic

#1 Virtual World

Virtual World

    1 more post to go.

  • Members
  • 9 posts
  • Location:Texas
  • Version:LabVIEW 2010
  • Since:2009

Posted 04 March 2011 - 06:32 PM

I made SCARA Robot in Solidworks and imported in LAbVIEW using 3D Picture control toolkit.


I am being able to access individual part.....however I still have some mating issues between few parts....

Please have a look at VI I have attached and see how Angle change for Arm2 gives weird Rotation, I guess center of Rotation needs to be moved but don't know how.

Need help. Thanks in advance. Attached File  SCARA.zip   75.13KB   345 downloads

#2 Virtual World

Virtual World

    1 more post to go.

  • Members
  • 9 posts
  • Location:Texas
  • Version:LabVIEW 2010
  • Since:2009

Posted 07 March 2011 - 05:50 PM

No One Posted Image

I made SCARA Robot in Solidworks and imported in LAbVIEW using 3D Picture control toolkit.


I am being able to access individual part.....however I still have some mating issues between few parts....

Please have a look at VI I have attached and see how Angle change for Arm2 gives weird Rotation, I guess center of Rotation needs to be moved but don't know how.

Need help. Thanks in advance. Attached File  SCARA.zip   75.13KB   345 downloads



#3 vugie

vugie

    Extremely Active

  • Premium Member
  • 381 posts
  • Location:Warsaw, Poland
  • Version:LabVIEW 2009
  • Since:2006

Posted 07 March 2011 - 07:51 PM

Save it in 2009 - I'll take a look

#4 Virtual World

Virtual World

    1 more post to go.

  • Members
  • 9 posts
  • Location:Texas
  • Version:LabVIEW 2010
  • Since:2009

Posted 07 March 2011 - 09:21 PM

Here it is ....I just got a reply from Ben to contact you.....Thanks a lot for your helpAttached File  SCARA2009.zip   44.24KB   144 downloads

Save it in 2009 - I'll take a look



#5 vugie

vugie

    Extremely Active

  • Premium Member
  • 381 posts
  • Location:Warsaw, Poland
  • Version:LabVIEW 2009
  • Since:2006

Posted 08 March 2011 - 08:51 AM

I made SCARA Robot in Solidworks and imported in LAbVIEW using 3D Picture control toolkit.
I am being able to access individual part.....however I still have some mating issues between few parts.... Please have a look at VI I have attached and see how Angle change for Arm2 gives weird Rotation, I guess center of Rotation needs to be moved but don't know how.
Need help. Thanks in advance.


The rotation pivot is always in (0,0,0) of local coordinate system. When you import objects from external file, they hasn't any initial transformation (even if they look like). So in order to rotate an object around pivot of your choice, you have to translate the object so that pivot is in (0,0,0) of parent object, then rotate it and translate it back:
SCARAsub_BD.png

Note that Rotate and Translate has to be used instead of Set Rotation and Set Translation (which clear transformation)
  • neBulus likes this

#6 Virtual World

Virtual World

    1 more post to go.

  • Members
  • 9 posts
  • Location:Texas
  • Version:LabVIEW 2010
  • Since:2009

Posted 08 March 2011 - 09:43 AM

Posted Image THANK YOUPosted Image

The rotation pivot is always in (0,0,0) of local coordinate system. When you import objects from external file, they hasn't any initial transformation (even if they look like). So in order to rotate an object around pivot of your choice, you have to translate the object so that pivot is in (0,0,0) of parent object, then rotate it and translate it back:
SCARAsub_BD.png

Note that Rotate and Translate has to be used instead of Set Rotation and Set Translation (which clear transformation)



#7 Virtual World

Virtual World

    1 more post to go.

  • Members
  • 9 posts
  • Location:Texas
  • Version:LabVIEW 2010
  • Since:2009

Posted 24 March 2011 - 10:38 PM

Hello Vugie ...Few more favors plzzz

Is there a way I can focus and zoom in zoom out particular portion of the scene, I can do it along Z axis but it will zoom whole scene. I guess Camera Control setting but not getting how to do it.

Also

1. When I RUN a vi, change camera (spherical) position and STOP a vi, next time I run my vi scene display shows last Camera position, Is there a way that for every new RUN of a program Scene Display erases old image and starts over again. Looks like re initializing Camera Position.

2. Scene in Continuous loop and Camera Controller >> Spherical. Scene display gives kind of broken and flashy display while changing camera position using mouse.

3. If I translate any object and again translate-rotate to change center of rotation, isn't it Total translation and then rotation.

4. When I plan to show stretch/compress from one end, it will be again translating object half a distance similar to Pivot ???

Is there any easy way to find Translation you apply to move your center of rotation, I waste lot of time when I import someone's vrml model, its lot easy if I make my own using 3D geometries at least I know half a distance to move.
<br clear="all"> Also see another method I am trying in which I have all 3 objects imported as a separate vrml and I called via one vrml. I tried different translate-rotate combination but nothings working out :wacko:

Thanks in Advance

For Some reason I am not being able to attach I also posted same question on NI forum which is here at the end, to download my vi SCARA3309

#8 vugie

vugie

    Extremely Active

  • Premium Member
  • 381 posts
  • Location:Warsaw, Poland
  • Version:LabVIEW 2009
  • Since:2006

Posted 25 March 2011 - 12:25 AM

Is there a way I can focus and zoom in zoom out particular portion of the scene, I can do it along Z axis but it will zoom whole scene. I guess Camera Control setting but not getting how to do it.

What do you mean by zooming, but not the whole scene? And programatically or with native interface? I guess you know Shift+LMB+drag and Ctrl+LMB+drag combos...

1. When I RUN a vi, change camera (spherical) position and STOP a vi, next time I run my vi scene display shows last Camera position, Is there a way that for every new RUN of a program Scene Display erases old image and starts over again. Looks like re initializing Camera Position.

Setup Camera method of 3D Picture control. You might also like to play with Modelview Matrix (property of 3D Picture). Refer to uncle G. and this forum. Keywords: modelview, OpenGL

2. Scene in Continuous loop and Camera Controller >> Spherical. Scene display gives kind of broken and flashy display while changing camera position using mouse.

Probably you have "Auto Redraw" checked. Control is updated periodically and it may happen that it is being refreshed in the middle of some transformation. Particularly if you do transformation each iteration.

3. If I translate any object and again translate-rotate to change center of rotation, isn't it Total translation and then rotation.

Yes, but rotation always is first. So you have to sum rotated translations.

4. When I plan to show stretch/compress from one end, it will be again translating object half a distance similar to Pivot ???

Is there any easy way to find Translation you apply to move your center of rotation, I waste lot of time when I import someone's vrml model, its lot easy if I make my own using 3D geometries at least I know half a distance to move.
<br clear="all"> Also see another method I am trying in which I have all 3 objects imported as a separate vrml and I called via one vrml. I tried different translate-rotate combination but nothings working out :wacko:

Internally transformations are stored as 4x4 Transformation Matrix (it is a property of SceneObject). Total object transformation (rotation, translation and scale) in relation to parent is coded inside it. There are many good articles about it. Understanding it helps a lot. Similar issues where already mentioned on this forum as well.

As for the file attached - again - 2009 please

And please clearly mark if you do cross-posting (indicating links at both places)
  • Virtual World likes this

#9 Virtual World

Virtual World

    1 more post to go.

  • Members
  • 9 posts
  • Location:Texas
  • Version:LabVIEW 2010
  • Since:2009

Posted 25 March 2011 - 01:46 AM

[quote name='vugie' timestamp='1301012708' post='84494']
What do you mean by zooming, but not the whole scene? And programatically or with native interface? I guess you know Shift+LMB+drag and Ctrl+LMB+drag combos...

Yes I know about native interface, I want to do it programmatically. If you see in figure below cyan box is the scope and there is horizontal Z Arm base (Red) with Object (Blue). I want to zoom in/out base and view the object from close distance.

Setup Camera method of 3D Picture control. You might also like to play with Modelview Matrix (property of 3D Picture). Refer to uncle G. and this forum. Keywords: modelview, OpenGL

I can not find this links by Uncle G.

I resolved that AutoRedraw check issue

I will search more about model matrix in open GL...thanks for guiding me

Attached 2009 version VI and on NI website here

Sorry if I am not following particular protocols and asking primitive question....Just consider me as a beginner :frusty:

Thanks again

Edited by Virtual World, 25 March 2011 - 01:54 AM.


#10 vugie

vugie

    Extremely Active

  • Premium Member
  • 381 posts
  • Location:Warsaw, Poland
  • Version:LabVIEW 2009
  • Since:2006

Posted 25 March 2011 - 09:15 AM

Yes I know about native interface, I want to do it programmatically. If you see in figure below cyan box is the scope and there is horizontal Z Arm base (Red) with Object (Blue). I want to zoom in/out base and view the object from close distance.

If you want to use perspective projection, use either Setup Camera, Projection.Frustum, or Projection.Perspective methods to zoom. For orthographic projection you have to directly modify projection matrix (property of 3D Picture).

I can not find this links by Uncle G.

Here, here, here, here, here, here

#11 Virtual World

Virtual World

    1 more post to go.

  • Members
  • 9 posts
  • Location:Texas
  • Version:LabVIEW 2010
  • Since:2009

Posted 25 March 2011 - 12:45 PM

Thanks Vugie

I will check those properties. Also have you looked at the 2009 v VI I attched on NI website. Can you please have a look.

#12 Virtual World

Virtual World

    1 more post to go.

  • Members
  • 9 posts
  • Location:Texas
  • Version:LabVIEW 2010
  • Since:2009

Posted 28 March 2011 - 01:35 PM

Thanks Vugie

I will check those properties. Also have you looked at the 2009 v VI I attched on NI website. Can you please have a look.


Also see another method I am trying in which I have all 3 objects imported as a separate vrml and I called via one vrml. I tried different translate-rotate combination but nothings working out :wacko:

Now I am being able to attach it on LAVA, can you show me where I am making mistake.

Also about the zooming thing methods you have suggested will zoom in/out complete scene, I wanted only particular part to be zoom.

Thanks VugieAttached File  SCARA 33v09.zip   47.71KB   181 downloads