Jump to content

3D Picture control Parent Child Relation with Solidworks


Recommended Posts

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. SCARA.zip

Link to post

No One sad.gif

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. SCARA.zip

Link to post

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:

post-7450-0-87766900-1299573218_thumb.pn

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

  • Like 1
Link to post

worshippy.gif THANK YOUworshippy.gif

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:

post-7450-0-87766900-1299573218_thumb.pn

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

Link to post
  • 3 weeks later...

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

Link to post

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)

  • Like 1
Link to post

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
Link to post

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

Link to post

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 VugieSCARA 33v09.zip

Link to post

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.