02-22-2012 07:25 AM
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
02-22-2012 08:50 AM
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
02-22-2012 08:56 AM
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.
02-22-2012 08:59 AM
@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
02-22-2012 09:10 AM
i'll have a look
thanks
02-22-2012 01:27 PM
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
}
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
02-23-2012 05:16 AM
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.
02-23-2012 05:58 AM
I dont know if you have seen these links as well but I thought they may prove helpful.
The bottom of the first link seems to be most relevant.
02-23-2012 07:15 AM
thanks for everyones help, i think i've managed to sort it now, just need to make a few adjustments
Cheers