LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D Picture Control Using Solid Works VRML File and Moving Individual Components

Hi, i am new to these forums and am looking for help concerning 3d picture control, i am a undergraduate student doing a second year project to control a 4DoF UAV.

 

I'm trying to sort out the 3d simulation of it, i have made the solid works drawings and assembly then exported that to a single WRL file (in the correct format ie. ver. 97) however when trying to import that to Labview i am having difficulty setting the relationships so different parts rotate etc. in the assembly.

 

i'll attach the corresponding example vi from labview and my solid work files.

 

Any help is very much appreciated

 

Thanks

 

Tom

Download All
0 Kudos
Message 1 of 9
(4,608 Views)

Can't look at your stuff but I have worked with similar.

 

The issue for me was each of the components in the wrl file must be named for you get get at the parts. The name is the handle used to touch them. So if you get the wrl file right you should be able to get at the components.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 9
(4,602 Views)

thanks for your reply, i've seen other post saying similar things but assumed that the manes should be inserted automatically when saving the VRML file, i tried opening the file using notepad to enter manually however its quite complex and didn't know where to begin.

0 Kudos
Message 3 of 9
(4,598 Views)

@thomasorr wrote:

thanks for your reply, i've seen other post saying similar things but assumed that the manes should be inserted automatically when saving the VRML file, i tried opening the file using notepad to enter manually however its quite complex and didn't know where to begin.


 

I believe I found a definition of wrl files in wikipeadia.

 

Start there.

 

I had to hack my file to add the names but it worked.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 9
(4,596 Views)

i'll have a look

 

thanks

0 Kudos
Message 5 of 9
(4,593 Views)

hi again,

 

i've tried your suggestion with the naming however, i am using seperate VRML files for the different components and using the main vrml file to control the prent-child relationship etc. however when trying to access that file through labview it can't open it. this is the code within the vrml file

 

#VRML V2.0 utf8
DEF assembly Transform {
Children [
Inline {
url [" Bottom Base.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
DEF Revolve Transform {
Children [
Inline {
url [" Top Base.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
DEF Elevation Transform {
Children [
Inline {
url [" Arm Pivot.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
DEF Connector Transform {
Children [
Inline {
url [" Rod-Base Connector.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
DEF Rod Transform {
Children [
Inline {
url [" Rod.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
DEF Roll Transform {
Children [
Inline {
url [" Mount Connector.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
DEF Pitch Transform {
Children [
Inline {
url [" Mount Pivot.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
DEF Mount Transform {
Inline {
url [" Arm Mount.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Chassis Transform {
Inline {
url [" Chassis.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Gearhead1 Transform {
Inline {
url [" i_gearhead.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Gearhead2 Transform {
Inline {
url [" i_gearhead-1.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Gearhead3 Transform {
Inline {
url [" i_gearhead-2.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Gearhead4 Transform {
Inline {
url [" i_gearhead-3.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Shaft1 Transform {
Inline {
url [" i_shaft.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Shaft2 Transform {
Inline {
url [" i_shaft-1.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Shaft2 Transform {
Inline {
url [" i_shaft-2.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Shaft3 Transform {
Inline {
url [" i_shaft-3.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Prop1 Transform {
Inline {
url [" Propeller.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Prop2 Transform {
Inline {
url [" Propeller-1.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Prop3 Transform {
Inline {
url [" Propeller-2.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Prop4 Transform {
Inline {
url [" Propeller-3.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Shell Transform {
Inline {
url [" Shell.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
DEF Dome Transform {
Inline {
url [" Dome.wrl "]
bboxSize -1.000000 -1.000000 -1.000000
bboxCenter 0.000000 0.000000 0.000000
}
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}

 

 

0 Kudos
Message 6 of 9
(4,585 Views)

Hey Thomas

 

I have no experience with VRML but in other coding languages you generally have to pass a reference of the controls in the top level code for other programs to gain access to them. I see you have calls all your models but no syntax as to what to do with them other than dimensions. Again I stress that I have no knowledge of VRML so this is all speculation. 

Matthew Trott
Applications Engineer
National Instruments UK
www.ni.com/ask
0 Kudos
Message 7 of 9
(4,574 Views)

I dont know if you have seen these links as well but I thought they may prove helpful.

 

Create Advanced User Interfaces with OpenGL Based 3D Visualization

http://zone.ni.com/devzone/cda/tut/p/id/3170

 

LabVIEW Support for VRML Files

http://digital.ni.com/public.nsf/allkb/94E716A426FAD46B862575CA005747E0

The bottom of the first link seems to be most relevant.


Matthew Trott
Applications Engineer
National Instruments UK
www.ni.com/ask
Message 8 of 9
(4,571 Views)

thanks for everyones help, i think i've managed to sort it now, just need to make a few adjustments

 

Cheers

0 Kudos
Message 9 of 9
(4,564 Views)