04-10-2009 09:04 AM
04-15-2009 07:37 AM
Hi Tom,
I believe the problem is due to the references and complexity of the model file.
In the example code from your link the application first breaks the much simpler file down into objects / shapes. This file only contains 5 shapes. It is the reference to the shape that is passed to the "to more specific class" node. An individual shape can be converted to a Mesh, and the Vertex Array then extracted.
The reason that your code does not function is you are not passing in a reference to a specific shape, but to the specific entire object. LabVIEW cannot convert this to a mesh.
Playing around with the file it contains more than 4000 separate shapes and LabVIEW does not know which to convert to a mesh unless you give it a more specific reference.
My suggestion is to get the mesh dimensions for a single shape, as you know how big each shape is you can scale the entire model based on these dimensions.
The most efficient way to locate a shape in a file of this size is to search for it. Unfortunately the shapes in the file did not contain defined names, so I added a defined name to the first shape in the file in order to get the code to function correctly.
Line 10 in the file contained: "Shape {"
I replaced this with: "DEF LVtest Shape {"
This allows me to then search for that shape in LabVIEW using the attached example code.
Have a play around and let me know if this resolves your issue.
Best regards,
John
04-15-2009 01:17 PM
John,
Thankyou very much for that. I worked around the problem by creating a single vertex in Google Sktech up of the same (known) length of the the craft and then read back that single object from the exported VRML file using your file change and it worked.
Cheers again,
Tom.
05-07-2013 05:13 PM
Hi I am loading vrml files and it runs the model very slow in 3D. Could you give some advice to run it faster?
Cheers,
Ronie